metagit-graph-maintain
Skill4 starsChanged 12 days agoMITView on GitHub
Discover, suggest, promote, validate, and ingest cross-repo graph.relationships in .metagit.yml for GitNexus overlay and dependency maps. Use for first-time graph bootstrap or ongoing workspace graph maintenance.
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-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
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 this skill to discover and keep durable cross-repo edges in .metagit.yml graph.relationships, then sync them into GitNexus.
- Distinctive: line 22
Do not apply until the operator approves the discovery report.
- Very specific: line 38
After sign-off, continue with the maintenance workflow below (or metagit prompt workspace -k graph-maintain).
- Distinctive: line 105
After repos are indexed, align the workspace with a GitNexus group:
- Very specific: line 131
Default --min-confidence medium.
- Distinctive: line 132
Never remove or rewrite existing manual relationships
- Very specific: line 133
Use --dry-run / dry_run: true before first apply in a workspace
- Very specific: line 134
Do not ingest Cypher until metagit config validate passes
≈ “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
Workspace graph maintenance
Use this skill to discover and keep durable cross-repo edges in .metagit.yml graph.relationships, then sync them into GitNexus.
When to use
| Phase | Trigger |
| Discover | New umbrella workspace, empty graph.relationships, or first graph authoring pass |
| Maintain | After adding repos, promoting inferred deps, or refreshing GitNexus overlay |
First-time discovery (report only)
Do not apply until the operator approves the discovery report.
export METAGIT_AGENT_MODE=true
metagit prompt workspace -c .metagit.yml -k graph-discover --text-only
metagit workspace list -c .metagit.yml --json
metagit config graph suggest -c .metagit.yml --json --include-declared --min-confidence allDeliver a Graph Discovery Report:
- inferred edges grouped by confidence (
high/medium/low) - gap pairs with no machine path (need operator interview)
proposed_manual_edges[]from interview answersoperations_previewJSON — not applied
After sign-off, continue with the maintenance workflow below (or metagit prompt workspace -k graph-maintain).
Maintenance workflow
CLI flags: -c on config graph suggest|export is the manifest path (trailing leaf -c is valid). --workspace-root is the checkout root used to scan inferred deps. Global metagit -c configures appconfig, not .metagit.yml.
1. Bootstrap context
export METAGIT_AGENT_MODE=true
metagit prompt workspace -c .metagit.yml -k graph-maintain --text-only
metagit workspace list -c .metagit.yml --json2. Suggest candidates
metagit config graph suggest -c .metagit.yml --json
metagit config graph suggest -c .metagit.yml --min-confidence high --jsonMCP: metagit_suggest_graph_relationships
Review candidates[] for confidence, evidence, and source_edge_type. Skip low-confidence edges unless the operator approves.
Also review stale_manual[] — active manual relationships with no supporting inferred edge under the current scan, matched on endpoints so a differing relationship type still counts as support (report-only; do not edit/remove without operator confirmation). Use --verbose when candidates are empty to confirm scan roots and ignore prune counts.
3. Preview and apply
# Save operations from suggest JSON to ops.json, then:
metagit config preview -c .metagit.yml --file ops.json
# Apply all suggested candidates (medium+ confidence by default)
metagit config graph suggest -c .metagit.yml --apply
# Apply selected ids only
metagit config graph suggest -c .metagit.yml --apply \
--candidate-id alpha-api-to-beta-worker-depends_on
metagit config validate -c .metagit.ymlMCP: metagit_apply_graph_relationships (dry_run: true to preview, save: true to persist)
4. Export and ingest GitNexus overlay
./skills/metagit-gitnexus/scripts/ingest-workspace-graph.sh -c .metagit.ymlOr manually:
metagit config graph export -c .metagit.yml --format tool-calls --output /tmp/graph-tool-calls.jsonThen run each gitnexus_cypher call (or use the ingest script).
5. Refresh per-repo indexes
./skills/metagit-gitnexus/scripts/analyze-targets.sh <workspace_root> <project>6. Sync GitNexus group (cross-index)
After repos are indexed, align the workspace with a GitNexus group:
./skills/metagit-gitnexus/scripts/sync-group.sh -c .metagit.yml
# MCP: metagit_gitnexus_group_syncEnables gitnexus group query / group impact across member repos.
Output contract
Return:
- candidate count and applied count
- validation result after apply
- GitNexus ingest status (schema + statement count)
- repos still stale/missing in GitNexus registry
Lifecycle
- Promoted edges are written with
status: active,provenance: promoted. - Deprecate retired edges by setting
status: deprecatedrather than deleting them. stale_manual[]from suggest is report-only: confirm with the operator before editing or removing the flagged edges.
Safety
- Default
--min-confidence medium; require operator approval for--min-confidence all - Never remove or rewrite existing manual relationships
- Use
--dry-run/dry_run: truebefore first apply in a workspace - Do not ingest Cypher until
metagit config validatepasses
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.

