一键导入
initiative
Manage cross-repo initiatives in an ecosystem. Activates when the user invokes /initiative or asks momentum to run the initiative recipe.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage cross-repo initiatives in an ecosystem. Activates when the user invokes /initiative or asks momentum to run the initiative 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 | initiative |
| description | Manage cross-repo initiatives in an ecosystem. Activates when the user invokes /initiative or asks momentum to run the initiative recipe. |
Manage cross-repo initiatives in an ecosystem.
Initiatives are first-class records of features that span multiple
member repos. Each initiative is one markdown file under
<ecosystem-root>/initiatives/NNNN-<slug>.md with a small YAML
frontmatter block (id, slug, status, started, owner, repos).
This command must be run from inside an ecosystem root or any of its member repos (the ecosystem root is discovered by walking up).
/initiative create <slug> Create a new initiative + activate it
/initiative status [<slug>] Print the named (or active) initiative card
/initiative close <slug> Populate the Close section + deactivate
/initiative list List all initiatives in this ecosystem
createLocate the ecosystem root via the walk-up helper
(core/ecosystem/lib/index.js → findRoot). If none found, abort
with a clear message: "Not inside an ecosystem. Run momentum ecosystem init first."
Validate the <slug> matches /^[a-z][a-z0-9-]*$/. If not, abort.
Allocate the next initiative id via nextInitiativeId(root)
(scans existing files for the highest NNNN- prefix).
Prompt the user (one question at a time) for:
Render the initiative file from
core/ecosystem/templates/initiative-template.md, substituting the
frontmatter + the user's "Why" text. Leave the
"Per-repo contributions", "Linked decisions", "Deploy chronology"
sections empty (they'll fill in as work lands).
Write the file to <root>/initiatives/<NNNN>-<slug>.md via
writeInitiative(filePath, frontmatter, content). This re-validates
the frontmatter.
Set the slug as the active initiative:
setActive(root, slug) (writes <root>/.state/active-initiative).
Print confirmation:
Created initiative 0042-<slug>.md. Active.
statusResolve the target slug: argument if given; else read
<root>/.state/active-initiative; else abort with
"No active initiative. Pass or /initiative create first."
Load the file via loadInitiative(root, slug). Print:
repos[], run gh pr list --repo <owner>/<repo> --state open --json number,title,headRefName (best-effort; degrade
gracefully if gh not authenticated) and append a one-line
summary per open PR.git -C <repo-path> log -3 --oneline.If <root>/.state/active-initiative matches this slug, print:
(active) in the header.
closeResolve slug from argument (required for close — no implicit "close the active one" to avoid surprises).
Load the initiative; abort if already status: closed.
Prompt the user (one question at a time):
Append a populated ## Close section (preserving any existing
sections above it). Set frontmatter status: closed and
closed: <today>. Write back via writeInitiative.
If this slug was active, clear .state/active-initiative via
clearActive(root).
Print confirmation:
Closed initiative <slug>. State cleared.
listRead every NNNN-*.md file in <root>/initiatives/. Sort by
numeric id ascending.
For each, print:
NNNN <slug> status started→closed-or-‹in-progress› repos: a, b, c
If .state/active-initiative is set, mark that row with ←active.
/initiative create <existing-slug>
must refuse with a clear error, never silently overwrite.specs/. The member-repo phases stay
authoritative for their own work; initiatives link across them.