metagit-rewrite-campaign
Skill4 starsChanged 13 days agoMITView on GitHub
Orchestrate a reference-implementation rewrite across source and target repos using campaigns, parity registry conventions, objectives, and subagent handoffs.
In this repository62 other files it gives its agents.
- agentsAGENTS.md
- docs/agents.mdAGENTS.md
- agentsAGENTS.md
- agentsCopilot instructions
- .cursor/rules/github-cli.mdcCursor rule
- .cursor/rules/project-level.mdcCursor rule
- llms.txtllms.txt
- gitnexus-cliSkill
- gitnexus-debuggingSkill
- gitnexus-exploringSkill
- gitnexus-guideSkill
- gitnexus-impact-analysisSkill
- gitnexus-refactoringSkill
- humanizerSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gatingSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-rewrite-campaignSkill
- metagit-sharing-stateSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- metagit-workspace-scopeSkill
- metagit-workspace-syncSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gatingSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-sharing-stateSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use when one source repo is the specification and one target repo is the rewrite — for example migrating metagit-cli from Python to Rust — …
- Very specific: line 74
Read _rewrite/parity-registry.yml.
- Very specific: line 108
Update parity registry module status in _rewrite/parity-registry.yml when acceptance passes.
- Distinctive: line 147
Treat source as spec until parity is explicitly marked done in the registry
- Very specific: line 148
Commit _campaigns/ and _rewrite/ to git for reviewable rollups
- Very specific: line 149
Run metagit campaign validate and metagit config validate in CI
- Distinctive: line 150
Use approvals for schema-breaking or destructive sync operations
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Metagit rewrite campaign skill
<!-- modality:native_campaigns --><!-- modality:objective_mr_approval_binding --><!-- modality:coordination_events_scope -->Use when one source repo is the specification and one target repo is the rewrite — for example migrating metagit-cli from Python to Rust — under a single umbrella workspace.
Docs: metagit-rewrite-workspace.md · campaigns.md
When to use
- Two-repo (or small N-repo) rewrite with frozen
reference_impl - Module parity tracked in
_rewrite/parity-registry.yml(BYO convention) - Orchestrator + subagents: controller sequences phases; repo agents implement
- MR rollups and objective spine without a separate spreadsheet
When not to use
- Simple single-repo feature work →
metagit-multi-repoor repo-scoped skills - Many-repo rollout without a reference pair →
metagit-campaignalone - You need automated AST/module diff gates → extend parity registry + CI yourself
Quick start
export METAGIT_AGENT_MODE=true
# Bootstrap coordinator (or copy examples/metagit-rewrite/.metagit.yml)
metagit init ./rewrite-coordinator --create --template metagit-rewrite
cd rewrite-coordinator
metagit config validate
metagit project sync --project rewrite
# Campaign (if not created by init template)
metagit campaign new --slug language-rewrite --title "Language rewrite" \
--repo rewrite/source --repo rewrite/target \
--reference rewrite/source \
--goal "CLI and MCP parity with reference implementation"
metagit campaign validate
metagit campaign expand --slug language-rewrite --dry-runGranularity model
| Layer | Where it lives | Granularity |
| Workspace pair | .metagit.yml projects/repos | Repo |
| Campaign rollup | _campaigns/<slug>.yml | Repo status, MR, notes |
| Module parity | _rewrite/parity-registry.yml | Phase → module → paths |
| Active work | .metagit/sessions/objectives.json | Objective id + acceptance |
| Cross-repo edge | graph.relationships | Source ↔ target semantics |
Objective id convention: rewrite-<phase>-<module> (see objectives.example.json in examples).
Orchestrator session loop
1) Bootstrap context
metagit context pack --tier 2 --json -c .metagit.yml
metagit prompt workspace -k session-start --text-only -c .metagit.yml
metagit campaign status --slug language-rewrite --json2) Pick the next parity module
Read _rewrite/parity-registry.yml. Choose the first module with status: pending
in the earliest incomplete phase. Upsert a workspace objective:
echo '{"id":"rewrite-foundation-config-manager","title":"Parity: config manager","status":"in_progress","repos":["rewrite/target"],"acceptance":"Target loads source manifest fixtures"}' \
| metagit context objective set3) Dispatch subagent (target repo)
metagit agent profile show -p rewrite -n target --json
metagit agent apply --vendor claude_code --project rewrite --repo target
metagit context repomix --profile rewrite-target --project rewrite --repo target
metagit prompt repo -k subagent-handoff --text-only -c .metagit.yml \
--project rewrite --repo targetSource analysis before large extractions:
metagit context repomix --profile rewrite-source --project rewrite --repo source
# GitNexus impact on source symbols (when indexed)4) Record progress
metagit campaign set --slug language-rewrite --repo rewrite/target \
--status mr-open --mr "https://github.com/org/repo/pull/1"
echo '{"id":"rewrite-foundation-config-manager","status":"done","mr_url":"https://…"}' \
| metagit context objective setUpdate parity registry module status in _rewrite/parity-registry.yml when acceptance passes.
5) Poll coordination (orchestrator)
metagit context events --campaign language-rewrite --since "<iso-cursor>" --json
metagit context handoff list --json
metagit campaign status --slug language-rewrite --jsonBundled script
SKILL_ROOT="$(python3 -c "import metagit, pathlib; print(pathlib.Path(metagit.__file__).parent / 'data/skills/metagit-rewrite-campaign')")"
"$SKILL_ROOT/scripts/rewrite-orchestrator-cycle.sh" . language-rewriteOr from a full skill install:
./scripts/rewrite-orchestrator-cycle.sh . language-rewriteRepomix profiles
Bundled profiles for scoped repo context:
| Profile | Use |
rewrite-source | Reference implementation analysis |
rewrite-target | Implementation work in the rewrite tree |
metagit context repomix --profile rewrite-source --project rewrite --repo source
metagit context repomix --profile rewrite-target --project rewrite --repo targetSafety
- Treat source as spec until parity is explicitly marked done in the registry
- Commit
_campaigns/and_rewrite/to git for reviewable rollups - Run
metagit campaign validateandmetagit config validatein CI - Use approvals for schema-breaking or destructive sync operations
campaign expand --dry-runbefore fanning out many objectives
Related skills
metagit-campaign— campaign YAML lifecycle and expandmetagit-multi-repo— cross-repo implementation sequencingmetagit-control-center— MCP control-plane polling loopmetagit-context-pack— tier 0/1/2 session boundariesmetagit-gitnexus— impact analysis on the source repometagit-graph-maintain— durablegraph.relationshipsfor source/target edges
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

