一键导入
ecosystem
Cross-repo ecosystem coordination (Phase 9 Tier 1). Activates when the user invokes /ecosystem or asks momentum to run the ecosystem recipe.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Cross-repo ecosystem coordination (Phase 9 Tier 1). Activates when the user invokes /ecosystem or asks momentum to run the ecosystem recipe.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Begin a new implementation phase. Activates when the user invokes /start-phase or asks momentum to run the start-phase recipe.
Work with concurrent workstreams (Rule 15). Activates when the session involves multiple active branches, cross-lane coordination, or when starting work that should not live on the current branch.
Record a new backlog item (bug, feature, tech debt, or enhancement) when you discover work that needs tracking. Activates when the session identifies unplanned work that should be tracked in the backlog.
Check spec structure health of the momentum project. Activates when the user runs `/validate`, asks for a health check, or when spec changes need verification before phase completion.
>-
Drive a single repo through its phase as part of a swarm. Activates when spawned by the conductor (the user's primary session) with a spawn directive. State lives in files; the conductor reads board.json between turns. Loads on the swarm-supervisor invocation only — not invoked directly by the user.
| name | ecosystem |
| description | Cross-repo ecosystem coordination (Phase 9 Tier 1). Activates when the user invokes /ecosystem or asks momentum to run the ecosystem recipe. |
Cross-repo ecosystem coordination (Phase 9 Tier 1).
The ecosystem layer threads multiple momentum-installed repos into one coherent unit of work. Use it when a feature or release spans more than one repo and you want shared status, shared initiative tracking, and a shared daily session log.
Per-repo phases, backlog, and history stay where they are. The ecosystem layer is additive — it never writes into a member repo's
specs/. The only touch is one fenced line in CLAUDE.md / AGENTS.md.
<ecosystem-root>/initiatives/NNNN-<slug>.md.Always start by checking for an ecosystem root:
# Walk up from $PWD (bounded to 5 parents) AND scan siblings for
# ecosystem.json — the helper in core/ecosystem/lib/index.js does this.
node -e "console.log(require('./core/ecosystem/lib').findRoot(process.cwd()))"
If no ecosystem root exists and the work clearly spans repos, suggest:
momentum ecosystem init <name> from the parent directory.
statusmomentum ecosystem status
Prints the manifest (name, members, dependency edges) and per-member git state (modified files + last commit). Use this as the first read when context-switching into multi-repo work.
add <repo-path>momentum ecosystem add ../<repo-name> --role <platform|client|library|infra|bench|other> [--id <id>]
Registers a momentum-installed repo as a member of the current ecosystem. Idempotent — safe to re-run. Writes one fenced line into the target's CLAUDE.md / AGENTS.md pointing back at the ecosystem.
Pre-flight: target must have CLAUDE.md or AGENTS.md (i.e. have been
through momentum init). The command refuses non-momentum targets.
remove <id>momentum ecosystem remove <member-id>
Strips the member from ecosystem.json and removes the fenced pointer
from the target's primary instruction file. Tolerant of missing target
(the manifest is updated even if the member directory is gone).
init [name]momentum ecosystem init <name>
Scaffolds a fresh ecosystem root: ecosystem.json, initiatives/,
sessions/, .state/, README.md, .gitignore. Runs git init and
produces the initial commit (best-effort — if git identity is missing
the scaffold is still valid, user can commit later).
<ecosystem-root>/
├── ecosystem.json ← manifest (members, roles, dep edges)
├── README.md
├── initiatives/ ← cross-repo features (see /initiative)
│ └── NNNN-<slug>.md
├── sessions/ ← daily activity log
│ └── YYYY-MM-DD.md ← appended by member-repo PostToolUse hook
├── .state/ ← runtime state (gitignored)
│ ├── active-initiative
│ └── last-session
└── .gitignore
See core/ecosystem/layout.md for the full reference.
Today's session file (sessions/$(date -u +%F).md) is auto-populated
by member-repo hooks every time a git commit or gh pr {merge,create}
runs. Each line:
HH:MMZ [<member-id>] <kind>: <summary> (<context>)
For a narrated entry not tied to a tool event, use the /session slash
command (/session log "...").
cat <ecosystem-root>/ecosystem.json
Or programmatically:
const lib = require('<momentum>/core/ecosystem/lib');
const root = lib.findRoot(process.cwd());
const manifest = lib.loadManifest(root);
manifest.members.forEach((m) => console.log(m.id, m.role, m.path));
/initiative — manage individual cross-repo features inside this
ecosystem (create, status, close, list). See its recipe./session log <message> — append a manual narrative entry to
today's session log./track — backlog item tracking; lives inside each member repo's
specs/backlog/. The ecosystem doesn't aggregate backlogs (yet —
Tier 2 work).momentum init — adds a brand-new momentum project. The ecosystem
layer only registers existing momentum-installed repos.cd into one, or momentum ecosystem init <name>
to create one.add
doesn't have CLAUDE.md / AGENTS.md. Run momentum init on the
target first.--id <different> or remove the existing entry first.specs/ or any
file beyond the one fenced line in its primary instruction file.add is safe to re-run; remove is safe even when
the target is gone.