assistant-claw/scripts/mirror-nuwa-to-moments.sh
Vega (Atlas iteration) 04e197c896 Hermes-compatible skill format + nuwa mirror prep + README rewrite
Three things in this commit:

1. Atlas skills now agentskills.io / Hermes-compatible
   - Each atlas/skills/claw-*/SKILL.md frontmatter enriched with version,
     author, license, and metadata.hermes block (tags, category,
     related_skills, boundaries)
   - New atlas/skills/DESCRIPTION.md per Hermes category convention
   - New atlas/INTEGRATION-hermes.md — step-by-step SOP to install Atlas
     onto hermes-agent runtime (cp skills, fetch nuwa upstream, configure
     env, wire cron, smoke test). Documents the branding override and
     self-improving-loop guardrail.

2. nuwa-skill mirror prep (waiting on org-repo creation)
   - scripts/mirror-nuwa-to-moments.sh — one-shot bare-clone + push --mirror
   - docs/decisions/0001-mirror-nuwa-skill.md — ADR explaining the why,
     the bot-token scope limitation, and the manual one-time repo creation
     step required at https://git.moments.top/repo/create

3. README rewrite
   - Atlas-forward navigation table ("想做什么 → 看哪里")
   - Quickstart sections for browsing, running tests locally, fetching
     nuwa upstream (public + air-gapped variants), and Hermes integration
   - Preserved all original Vega working agreements
   - Roadmap with explicit Atlas / Vega tracks

Bot account (multica-bot) lacks write:organization scope so cannot create
the nuwa-skill repo via API. After human creates the empty repo at
git.moments.top/Moments.top/nuwa-skill, run scripts/mirror-nuwa-to-moments.sh
to populate it.
2026-05-09 17:21:31 +08:00

43 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Mirror github.com/alchaincyf/nuwa-skill (MIT) into Moments private Gitea.
#
# Why we mirror: Atlas's claw-boss-distiller depends on nuwa-skill methodology
# (`references/extraction-framework.md`). For air-gapped client deployments where
# the client network cannot reach github.com, our private Gitea must serve nuwa.
#
# Prereq: a destination repo on git.moments.top must already exist (empty).
# Default target: https://git.moments.top/Moments.top/nuwa-skill.git
#
# Create it once via Gitea UI (the bot account doesn't have org-create scope):
# https://git.moments.top/repo/create → owner: Moments.top → name: nuwa-skill → empty
#
# Usage:
# ./scripts/mirror-nuwa-to-moments.sh
# ./scripts/mirror-nuwa-to-moments.sh https://git.moments.top/your-org/nuwa-skill.git
#
# After first mirror, schedule a weekly cron to re-mirror upstream changes.
set -euo pipefail
UPSTREAM="https://github.com/alchaincyf/nuwa-skill.git"
TARGET="${1:-https://git.moments.top/Moments.top/nuwa-skill.git}"
WORKDIR="$(mktemp -d -t nuwa-mirror-XXXXXX)"
echo "Mirror $UPSTREAM$TARGET"
echo "Workdir: $WORKDIR"
# Bare clone preserves all branches/tags/refs
git clone --mirror "$UPSTREAM" "$WORKDIR"
cd "$WORKDIR"
# Push everything (--mirror = all refs incl. delete on remote)
git push --mirror "$TARGET"
cd /
rm -rf "$WORKDIR"
echo "✅ Mirror complete: $TARGET"
echo
echo "Next: update atlas/skills/claw-boss-distiller/upstream/README.md to point"
echo " air-gapped deployments at the Moments mirror instead of GitHub."