[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75H38DX5F815N95XTPSBPBN":3,"skill-same:01M75H38DX5F815N95XTPSBPBN":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75H38DX5F815N95XTPSBPBN","forge-0-epic",null,"Create or edit a forge epic: decompose a large change into discrete member features with dependencies, charters, and structured contracts, producing epic-manifest.json + EPIC.md. Re-run on an existing epic to enter edit mode (add\u002Fremove\u002Freorder features, change dependencies). Use when the user runs \u002Fskill:forge-0-epic or explicitly asks to start\u002Fmodify an epic. Do NOT trigger for single-feature PRD work (that is forge-1-prd) or for general project planning outside forge.","garygentry\u002Ffeature-forge","garygentry","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12444042?v=4","01M75GWTRXHQMKFWDVG9N8ENNS","01M75GWTSZ5NV3MYKFWVCZJKW4",0,"MIT","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\n# GENERATED — DO NOT EDIT. Source: skills\u002Fforge-0-epic\u002FSKILL.md. Regenerate: python3 scripts\u002Fbuild-adapters.py\nname: forge-0-epic\ndescription: 'Create or edit a forge epic: decompose a large change into discrete member features with dependencies, charters, and structured contracts, producing epic-manifest.json + EPIC.md. Re-run on an existing epic to enter edit mode (add\u002Fremove\u002Freorder features, change dependencies). Use when the user runs \u002Fskill:forge-0-epic or explicitly asks to start\u002Fmodify an epic. Do NOT trigger for single-feature PRD work (that is forge-1-prd) or for general project planning outside forge.'\n---\n\n# forge-0-epic — Epic Decomposition & Orchestration\n\nCreate an epic — a named grouping of related forge features with declared dependencies\nand shared contracts — through a structured decomposition interview, OR edit an existing\nepic. The manifest is the source of truth; EPIC.md mirrors it. All graph\u002Fvalidation work\nis delegated to `scripts\u002Fepic-manifest.py`.\n\nThis skill **composes** JSON and **issues** helper commands. It NEVER eyeballs a dependency\ngraph for cycles, NEVER hand-rolls a manifest write where a mutator exists, and NEVER asks a\nquestion in inline prose — every question goes through `AskUserQuestion`.\n\n## Prerequisites\n\nRead and follow `references\u002Fshared-conventions.md` for:\n- the **Feature Name Requirement** (applied here to the *epic* name — see below),\n- the **User Input Protocol** (the `AskUserQuestion` guardrail — all questions go through the tool),\n- **Configuration Reading**, and\n- the **Git Commit Protocol**.\n\n**Epic name handling.** The single positional argument is the **epic** name (not a feature).\nIf no name is given, STOP and ask for one — do not guess. Convert multi-word input to a single\nkebab-case token. The name must satisfy `SAFE_NAME_RE` (`^[a-z0-9]+(?:-[a-z0-9]+)*$`); the\nhelper rejects unsafe names. Member feature names are elicited later, in the interview.\n\n**Force mode.** `--force` is honored as in shared-conventions: skip pipeline-state prerequisite\nchecks but still load any on-disk artifacts.\n\n**Config values read** (defaults from shared-conventions): `specsDir` (default `.\u002Fspecs`),\n`gitCommitAfterStage` (default true), `commitPrefix` (default `forge`).\n\n**Helper invocation.** Every helper call uses the convention from 01 §2.2 — the absolute\nplugin path and the configured specs dir:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" \u003Csubcommand> ... --specs-dir \"{specsDir}\"\n```\n\n`$R` resolves to the installed plugin root via the portable resolver (`scripts\u002Fforge-root.sh`,\nbootstrapped by the prelude above; see `references\u002Fportable-root.md`). Pass `--specs-dir \"{specsDir}\"`\non every invocation.\n\n---\n\n## Step 0 — Dispatch Detection\n\nResolve the epic subtree path `{specsDir}\u002F{epic}\u002F` and decide which branch to run.\n\n1. **Collision check — is this name already a standalone feature?** If `{specsDir}\u002F{epic}\u002F`\n   exists and directly contains a `.pipeline-state.json` of its own (i.e. it is itself a\n   *feature* directory, not an epic root), STOP. Surface verbatim:\n   > `{epic}` is already a standalone feature, not an epic. Choose a different epic name or\n   > relocate the feature.\n\n2. **Manifest existence probe** — does this epic already have a manifest?\n\n   ```bash\n   test -f \"{specsDir}\u002F{epic}\u002Fepic-manifest.json\" && echo EXISTS || echo NEW\n   ```\n\n   - **NEW** (no `epic-manifest.json`) → **Creation branch** (Step C1 onward).\n   - **EXISTS** → **Edit branch** (§ Edit Mode below).\n\n   This manifest-existence dispatch **is** forge-0-epic's stage-entry guard: a re-entry on an existing epic lands in Edit Mode (helper-mutated, re-validated) rather than re-running the creation interview, so the **Stage-Entry Guard** block used by `forge-1-prd`..`forge-4-backlog` does not apply here (an epic has no self `.pipeline-state.json` to stamp — it writes member states).\n\n3. **Pre-flight epic-name uniqueness (creation only).** Before composing anything for a NEW\n   epic, confirm the epic name itself does not collide with any existing feature or epic:\n\n   ```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" check-name \"{epic}\" --specs-dir \"{specsDir}\"\n   ```\n\n   - Exit `0` → the name is free; proceed to C1.\n   - Exit `1` (`duplicate-name`) → STOP and surface the helper's finding **verbatim**; ask\n     for a different epic name, then re-run check-name.\n   - Exit `2` (unsafe name) → STOP and surface the finding; ask for a corrected name.\n\n---\n\n## Creation Branch\n\n### Step 1 — Branch Setup\n\nInvoke the **Branch Setup** block in `references\u002Fshared-conventions.md` with `{label}` = `{epic}` and\n`{scope}` = `epic`. It self-gates (skips when not a git repo or when `branchPerFeature` is false),\ndetects whether you're on the default branch, and strongly recommends — still optionally — creating\n`{branchPrefix}{epic}` when you are. Each member feature's `forge-1-prd` inherits this branch rather\nthan prompting again.\n\n### Step C1 — Epic Framing Interview\n\nOutput context as text (what an epic is, that a decomposition interview will follow). Then\ncall `AskUserQuestion` to elicit:\n\n1. **Epic goal \u002F problem** — the overarching change being decomposed. Becomes the EPIC.md\n   \"Overall Goal\" narrative and seeds the manifest `description`.\n2. **One-paragraph description** — a confirmed\u002Fedited summary. Becomes the manifest `description`.\n\nThe epic `name` is the validated CLI argument from Step 0 — do NOT prompt for it again.\n\n### Step C2 — Feature-List Interview\n\nDrive a decomposition dialogue. Output your analysis as text first (how the goal might split,\nright-sizing guidance: each feature should be a single pipeline-sized unit — a unit forge-1-prd\nthrough forge-5-loop would carry end-to-end — not item-level interleaving). Then use\n`AskUserQuestion` to elicit the candidate feature list. Per the **Decision Support** protocol in `references\u002Fshared-conventions.md`, lead with a **recommended decomposition** and a one-line rationale rather than asking the user to invent it unaided, then probe its seams (\"Is any of these two really one? Is any one really two?\"), naming the trade-off (more features = more parallelism but more edges). Iterate until the user confirms.\n\nFor **each** proposed feature name, before accepting it into the set, enforce global uniqueness\nand name safety via the helper:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" check-name \"{feature}\" --specs-dir \"{specsDir}\"\n```\n\n- Exit `0` → accept the name.\n- Exit `1` (`duplicate-name`) → reject that name; surface the finding verbatim and re-prompt\n  for a different name.\n- Exit `2` (`unsafe-name`) → reject; surface the finding and re-prompt.\n\nNever accept a feature name that has not passed `check-name` exit 0.\n\n### Step C3 — Per-Feature Charter + Structured Contracts\n\nFor each confirmed feature, run a focused `AskUserQuestion` batch (one feature at a time,\n2–3 questions per call) eliciting:\n\n- **Charter** — a single paragraph: scope statement + contract obligations. This is a\n  **charter only, NOT a PRD**. Do NOT conduct a full requirements interview here. If the user\n  starts dictating detailed requirements, redirect (as context text, then continue the batch):\n  > \"That's PRD-level detail — `forge-1-prd` will capture it when this feature is ready. For\n  > the charter I just need the one-paragraph scope and what it must expose\u002Fconsume.\"\n- **`exposes`** — zero or more structured `Contract` objects this feature provides to\n  dependents. Each is `{ \"name\", \"kind\", \"summary\" }` where `kind` ∈\n  `function | type | endpoint | module | event`.\n- **`consumes`** — zero or more structured `ConsumedContract` objects this feature relies on.\n  Each is `{ \"from\", \"name\", \"summary\" }`, where `from` is a sibling feature name in this epic.\n\nCollect these into plain JSON objects per feature. Do NOT free-form the contracts in prose —\nthe structured arrays are the source of truth; EPIC.md renders them as prose later (Step C6).\n\n### Step C4 — Dependency-Edge Interview\n\nFor each feature, use `AskUserQuestion`: \"Which sibling features must be complete before this\none can build?\" → populates `dependsOn: [names]`.\n\n**Seed the suggestion from `consumes`:** a `consumes.from` X strongly implies `dependsOn` X. Per the **Decision Support** protocol, offer the union of each feature's `consumes.from` set as the **recommended default**, evidence-backed — but flag the cost (each edge serializes the loop and blocks dependents, so add only what contracts require). User confirms\u002Foverrides; `dependsOn` is authoritative.\n\nThe `features[]` array order is the user-declared sequence from C2 (order is a presentation\nsequence, **not** a dependency ordering). Preserve the C2 order unless the user asks to reorder.\n\n### Step C5 — Compose & Validate the Manifest\n\nCompose the full `epic-manifest.json` per the 00 §2 schema, setting:\n\n- `schemaVersion`: `1`\n- `revision`: `1` — the canonical artifact revision epic-scoped verification freshness compares against. Creation always writes `1`; every later mutation bumps it exactly once via the helper mutators. Never hand-edit it.\n- `epic`: `\"{epic}\"`\n- `description`: from C1\n- `status`: `\"active\"`\n- `narrativeDoc`: `\"EPIC.md\"`\n- `createdAt` and `updatedAt`: the **same** current ISO-8601 UTC timestamp (`createdAt == updatedAt`)\n- `features[]`: in declared order, each with `name`, `charter`, `dependsOn`, `exposes`,\n  `consumes`. **No per-feature `status` field** — including one makes the manifest fail\n  validation (the `cached-status` finding).\n\nWrite the composed JSON to `{specsDir}\u002F{epic}\u002Fepic-manifest.json` (creating the epic dir first).\nFor the *initial* creation write the skill writes the file directly — atomic guarantees are only\nrequired for in-place mutation, which is the helper mutators' job. Creating the epic dir first creates `{specsDir}\u002F`, so after writing the manifest invoke the **Specs Directory Hygiene** block in `references\u002Fshared-conventions.md` (idempotent; stage anything it writes with this stage's commit). Then validate:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" validate \"{epic}\" --specs-dir \"{specsDir}\" --json\n```\n\n- Exit `0` → proceed to C6.\n- Exit `1` → the manifest is malformed. Surface **every** `findings[]` entry **verbatim**, do\n  NOT proceed, and loop back into the relevant interview step to correct, then re-compose and\n  re-validate:\n  - `cycle` → re-open the dependency interview (C4).\n  - `dangling-ref` → re-open C4 (bad `dependsOn`) or C3 (bad `consumes.from`).\n  - `duplicate-name` \u002F `unsafe-name` → re-open the feature-list interview (C2).\n  - `cached-status` \u002F schema violation → fix the composed JSON and re-validate.\n- Exit `2` → IO\u002Fusage error (missing manifest or unreadable). Surface and STOP.\n\nAcyclicity, uniqueness, and dangling-ref checks are thus ALWAYS performed by the helper, never\nby the LLM eyeballing the graph.\n\n> **Contracts have no mutator.** There is intentionally no `--exposes-json`\u002F`--consumes-json`\n> flag. At creation, the skill populates each feature's `exposes`\u002F`consumes` directly in the\n> composed manifest entry (above), then re-runs `validate` — exactly as described here. The\n> same pattern applies after an edit-mode `add-feature` (see Edit Mode).\n\n### Step C6 — Generate EPIC.md\n\nGenerate `{specsDir}\u002F{epic}\u002FEPIC.md` from the **validated** manifest. It is the human-readable\n**mirror** of the manifest (the manifest is the source of truth). For the full EPIC.md structure\nskeleton, read `references\u002Fedit-mode.md` (EPIC.md Mirror Template section) — the same template the\nedit-mode E5 patch applies.\n\n**The mirror rule.** Render each feature's `exposes`\u002F`consumes` arrays as prose, one bullet per\ncontract entry, preserving `name`, `kind`\u002F`from`, and `summary`. Do not invent a contract that\nis not in the manifest, and do not omit one that is. The Overall Goal and Decomposition\nRationale are the only prose without a 1:1 manifest counterpart. The skill does NOT itself diff\nEPIC.md against the manifest — drift detection is `forge-verify` epic mode CHECK-E06.\n\n### Step C7 — Create Member Subdirectories + Back-Pointer States\n\nAfter the manifest validates and EPIC.md is written, create one subdirectory per member feature\nso the navigator and resolver can see them before any stage runs. For each `features[].name`:\n\n1. Create `{specsDir}\u002F{epic}\u002F{feature}\u002F`.\n2. Write `{specsDir}\u002F{epic}\u002F{feature}\u002F.pipeline-state.json` conforming to\n   `references\u002Fpipeline-state-schema.json`, carrying:\n   - `epic`: `\"{epic}\"` — the back-pointer.\n   - `currentStage`: `\"forge-1-prd\"` — the next actionable stage for the member.\n   - `stages[\"forge-0-epic\"]`: `{ \"status\": \"complete\", \"version\": 1, \"completedAt\": \"\u003Cts>\" }`\n     — recording that the epic stage seeded this member.\n   - No other stages (all other stages absent\u002Fpending), exactly as a freshly-initialized\n     standalone feature. **No per-feature `status` beyond the stage entry** — the member state\n     holds derived stage progress only.\n\nFor an example member state, read `references\u002Fedit-mode.md` (Member State Example section). This stub is written by hand rather than by a `state-*` verb — deliberately: no verb writes the `epic` back-pointer a brand-new member needs, so this is a sanctioned exception to the Pipeline State Protocol.\n\nThe member subtree holds the **same** artifact set a standalone feature holds; only\n`.pipeline-state.json` exists at creation. No PRD\u002Fspecs are authored here. The epic subtree is\nnow self-contained: manifest + EPIC.md + one subdirectory per member.\n\n### Step C8 — Review, Pipeline State & Commit\n\n1. **Review.** Present a summary (epic name, N features, dependency edges, contracts) as text, then use `AskUserQuestion`: \"Does this epic decomposition look right? Any feature, dependency, or contract to change before I commit?\" If the user wants changes, loop back to the relevant creation step, re-compose, and re-validate.\n\n2. **Commit (Git Commit Protocol).** If `gitCommitAfterStage` is true, follow the Git Commit Protocol in shared-conventions:\n   - Stage the whole epic subtree only: `git add {specsDir}\u002F{epic}\u002F` — never `git add -A`. This captures `epic-manifest.json`, `EPIC.md`, and all member `.pipeline-state.json` files atomically.\n   - Commit with message `\"{commitPrefix}({epic}): create epic with {N} features\"`.\n   - On success, capture the commit hash for the closing message only — the epic manifest has no `commitHash` field, so nothing is written back into a committed file and the two-commit step of the Git Commit Protocol does not apply here. On failure (pre-commit hook, conflict), report and do not mark complete; never use `--amend`\u002F`--no-verify`\u002F`--force`.\n\n3. **Closing message — the Stage Exit Protocol.** Congratulate the user (\"Epic `{epic}` created with {N} features.\"), then close with the Stage Exit Protocol below (single-sourced in `references\u002Fstage-exit-protocol.md`; the epic → first-PRD boundary is a full stage boundary — do not improvise a \"Next steps\" list). `{first-actionable-feature}` = any feature with empty `dependsOn` (or the first entry of `render-status`'s `actionable` set):\n\nDetermine `{verify-capability}` per the **Host and capability determination** section of `references\u002Fstage-exit-protocol.md`: `interactive` needs both a question mechanism and *permission* to dispatch the clean-room `forge-verifier`, and a session that merely needs consent first is still `interactive`.\n\n**Close this stage with the Scripted Stage Exit** (contract: `references\u002Fstage-exit-protocol.md`; do not improvise a \"Next steps\" list). Run:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fforge-session.py\" stage-exit --feature \"{epic}\" --stage forge-0-epic --next-feature \"{first-actionable-feature}\" --specs-dir \"{specsDir}\" --host pi --verify-capability \"{verify-capability}\"\n```\n\nObey the DIRECTIVES it prints, in the consumption order this protocol fixes: surface `invalidAutoVerifyKeys` and every `warnings` entry first; `runInStageVerify: true` → run the in-stage clean-room verify chain now (honoring `autoFixEligible`, and asking through the Standard Verify Gate first when you may not dispatch unsolicited); `verifyGate: \"standard\"` → present the Standard Verify Gate; `verifyGate: \"manual-print\"` → print the `verifyCommand` for the user and do **not** dispatch inline. Then, and only when `terminalOwnedBy` is `\"self\"`, **print the NEXT-STEPS block verbatim as your absolute last output — nothing after its sentinel line.** A `terminalOwnedBy: \"outer\"` payload carries `nextSteps: null`: return your structured result to the caller and print no terminal block at all.\n\n---\n\n## Edit Mode\n\nEntered from Step 0 when `{specsDir}\u002F{epic}\u002Fepic-manifest.json` already exists (the **EXISTS**\nbranch). The edit branch mutates the manifest **only** through helper mutators — atomic\n(temp file + `os.replace`) and internally re-validated, so a refused write leaves the manifest\n**byte-identical**; the skill never hand-rolls an in-place write. Every question goes through\n`AskUserQuestion`, and **every mutation is committed individually** so git history is the audit trail.\n\nFor the full E1–E6 mechanics — the E1 refuse-if-invalid protocol, E2 operation→mutator table, E3\ncontracts\u002Fremove-feature caveats (incl. the verbatim WARN block), E4 impact-warning rules, E5\nEPIC.md patch rule, and the E6 Observability \u002F Pipeline State & Commit machinery\n(`.epic-state.json` schema, `updatedAt` rules, Git Commit Protocol shared with C8) — read\n`references\u002Fedit-mode.md`. For the exact `epic-manifest.py` mutator flag surface and\nper-subcommand exit-code (`0`\u002F`1`\u002F`2`) handling, read `references\u002Fepic-manifest-subcommands.md`.\n\nAn edit-mode mutation closes through the **same** Scripted Stage Exit command Step C8 runs — there is one scripted exit for this skill, not one per branch. Only the argument differs: edit mode re-reads live epic status **after** the mutation and its commit, passes the resulting concrete member as `--next-feature`, and **omits that flag entirely** when no member is actionable (so the router hands back to the epic dashboard instead of naming a member it cannot resolve). Those substitution rules, the `render-status` failure path, and the script's member fallback warning are all in `references\u002Fedit-mode.md` — do not improvise a closing pointer here.\n\n---\n\n## Error Handling\n\nThe skill **never** repairs a corrupt manifest automatically and **never** proceeds past a gating\nhelper exit `≥ 1`. All findings are surfaced **verbatim**. For the full condition → helper-signal →\nskill-behavior disposition table, read `references\u002Fepic-manifest-subcommands.md` (Error Handling\nsection).\n\n---\n\n## Gotchas\n\n- The argument names an **epic**, not a feature — this is the only stage where that is true.\n  Member feature names come from the C2 interview, each gated through `check-name`.\n- Never eyeball the dependency graph for cycles. Compose the manifest, run `validate`, and\n  surface findings. The helper owns acyclicity, uniqueness, dangling-ref, and schema checks.\n- A charter is one paragraph, not a PRD. Redirect requirement-level detail to `forge-1-prd`.\n- Contracts have no mutator: edit `exposes`\u002F`consumes` in the composed manifest entry, then\n  re-run `validate`.\n- All questions go through `AskUserQuestion`, never text. Rung 2\u002F3: Interaction Capability Ladder.\n\n---\n\n## Host execution notes (Pi)\n\nThis Pi bundle preserves Claude's `AskUserQuestion` references because it ships a Pi compatibility extension registering an `AskUserQuestion` tool. On Pi:\n\n- **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other\u002Fcustom answers.\n- **Non-interactive (`-p`\u002F`--mode json`):** `AskUserQuestion` is stripped from the tool list, so its absence alone cannot tell you the rung — read that from the Interaction Capability Ladder's `interaction-mode` record. A call attempted anyway fails with `Error: UI not available (running in non-interactive mode)` — never read that as a decline. Take the Interaction Capability Ladder's declared conservative default, state it in your output, and use `no-default: abort — \u003Cquestion> requires a human answer` for an interview question with no sane default (`references\u002Fshared-conventions.md`).\n- **Skill dispatch:** Pi uses `\u002Fskill:\u003Cname>` commands. If you cannot invoke a skill directly, print the exact `\u002Fskill:\u003Cname> ...` command for the user to run. A **forge-invocation-args** compatibility extension wraps the arguments of a `\u002Fskill:forge-*` command in a `\u003Cfeature-forge-invocation>` envelope before Pi expands it, so read the feature name from that envelope's `\u003Carguments>` element (an empty element means none was supplied) rather than from unlabeled trailing text — see `references\u002Fshared-conventions.md` § Feature Name Requirement.\n- **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: \"forge-verifier\", task: \"...\" }`, or fan several out concurrently with `{ tasks: [{ agent: \"forge-spec-writer\", task: \"...\" }, ...] }`. If no `subagent` tool is available, run that step inline yourself.\n- **Background \u002F monitoring (forge-5-loop):** run the loop through **rauf's Pi package** (`pi install npm:@garygentry\u002Frauf`, rauf >= 0.18.0), whose `rauf-loop-supervisor` extension registers `rauf_loop_launch`, `rauf_loop_status`, `rauf_loop_wait` and `rauf_loop_stop`. Launch with `rauf_loop_launch`; it starts the loop **detached** (it outlives this session), posts a one-line card per completed item, and **wakes this session** on needs-human, blocked, stuck, review failure, loop errors and completion — so end your turn after the launch: do not poll, sleep, tail, run the loop in the foreground or behind `nohup`\u002F`&`, or hand it to a subagent (the extension blocks those calls). Read `rauf_loop_status` before acting on a wake; use `rauf_loop_stop` only to deliberately stop the runner. Full detail: `references\u002Frunner-contract.md` Steps 3b\u002F3d. If the `rauf_loop_*` tools are not registered, `forge-session.py doctor` says how to install the package; until then use the `rauf loop wait` recipe there.\n","# forge-0-epic — Epic Decomposition & Orchestration\n\nCreate an epic — a named grouping of related forge features with declared dependencies\nand shared contracts — through a structured decomposition interview, OR edit an existing\nepic. The manifest is the source of truth; EPIC.md mirrors it. All graph\u002Fvalidation work\nis delegated to `scripts\u002Fepic-manifest.py`.\n\nThis skill **composes** JSON and **issues** helper commands. It NEVER eyeballs a dependency\ngraph for cycles, NEVER hand-rolls a manifest write where a mutator exists, and NEVER asks a\nquestion in inline prose — every question goes through `AskUserQuestion`.\n\n## Prerequisites\n\nRead and follow `references\u002Fshared-conventions.md` for:\n- the **Feature Name Requirement** (applied here to the *epic* name — see below),\n- the **User Input Protocol** (the `AskUserQuestion` guardrail — all questions go through the tool),\n- **Configuration Reading**, and\n- the **Git Commit Protocol**.\n\n**Epic name handling.** The single positional argument is the **epic** name (not a feature).\nIf no name is given, STOP and ask for one — do not guess. Convert multi-word input to a single\nkebab-case token. The name must satisfy `SAFE_NAME_RE` (`^[a-z0-9]+(?:-[a-z0-9]+)*$`); the\nhelper rejects unsafe names. Member feature names are elicited later, in the interview.\n\n**Force mode.** `--force` is honored as in shared-conventions: skip pipeline-state prerequisite\nchecks but still load any on-disk artifacts.\n\n**Config values read** (defaults from shared-conventions): `specsDir` (default `.\u002Fspecs`),\n`gitCommitAfterStage` (default true), `commitPrefix` (default `forge`).\n\n**Helper invocation.** Every helper call uses the convention from 01 §2.2 — the absolute\nplugin path and the configured specs dir:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" \u003Csubcommand> ... --specs-dir \"{specsDir}\"\n```\n\n`$R` resolves to the installed plugin root via the portable resolver (`scripts\u002Fforge-root.sh`,\nbootstrapped by the prelude above; see `references\u002Fportable-root.md`). Pass `--specs-dir \"{specsDir}\"`\non every invocation.\n\n---\n\n## Step 0 — Dispatch Detection\n\nResolve the epic subtree path `{specsDir}\u002F{epic}\u002F` and decide which branch to run.\n\n1. **Collision check — is this name already a standalone feature?** If `{specsDir}\u002F{epic}\u002F`\n   exists and directly contains a `.pipeline-state.json` of its own (i.e. it is itself a\n   *feature* directory, not an epic root), STOP. Surface verbatim:\n   > `{epic}` is already a standalone feature, not an epic. Choose a different epic name or\n   > relocate the feature.\n\n2. **Manifest existence probe** — does this epic already have a manifest?\n\n   ```bash\n   test -f \"{specsDir}\u002F{epic}\u002Fepic-manifest.json\" && echo EXISTS || echo NEW\n   ```\n\n   - **NEW** (no `epic-manifest.json`) → **Creation branch** (Step C1 onward).\n   - **EXISTS** → **Edit branch** (§ Edit Mode below).\n\n   This manifest-existence dispatch **is** forge-0-epic's stage-entry guard: a re-entry on an existing epic lands in Edit Mode (helper-mutated, re-validated) rather than re-running the creation interview, so the **Stage-Entry Guard** block used by `forge-1-prd`..`forge-4-backlog` does not apply here (an epic has no self `.pipeline-state.json` to stamp — it writes member states).\n\n3. **Pre-flight epic-name uniqueness (creation only).** Before composing anything for a NEW\n   epic, confirm the epic name itself does not collide with any existing feature or epic:\n\n   ```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" check-name \"{epic}\" --specs-dir \"{specsDir}\"\n   ```\n\n   - Exit `0` → the name is free; proceed to C1.\n   - Exit `1` (`duplicate-name`) → STOP and surface the helper's finding **verbatim**; ask\n     for a different epic name, then re-run check-name.\n   - Exit `2` (unsafe name) → STOP and surface the finding; ask for a corrected name.\n\n---\n\n## Creation Branch\n\n### Step 1 — Branch Setup\n\nInvoke the **Branch Setup** block in `references\u002Fshared-conventions.md` with `{label}` = `{epic}` and\n`{scope}` = `epic`. It self-gates (skips when not a git repo or when `branchPerFeature` is false),\ndetects whether you're on the default branch, and strongly recommends — still optionally — creating\n`{branchPrefix}{epic}` when you are. Each member feature's `forge-1-prd` inherits this branch rather\nthan prompting again.\n\n### Step C1 — Epic Framing Interview\n\nOutput context as text (what an epic is, that a decomposition interview will follow). Then\ncall `AskUserQuestion` to elicit:\n\n1. **Epic goal \u002F problem** — the overarching change being decomposed. Becomes the EPIC.md\n   \"Overall Goal\" narrative and seeds the manifest `description`.\n2. **One-paragraph description** — a confirmed\u002Fedited summary. Becomes the manifest `description`.\n\nThe epic `name` is the validated CLI argument from Step 0 — do NOT prompt for it again.\n\n### Step C2 — Feature-List Interview\n\nDrive a decomposition dialogue. Output your analysis as text first (how the goal might split,\nright-sizing guidance: each feature should be a single pipeline-sized unit — a unit forge-1-prd\nthrough forge-5-loop would carry end-to-end — not item-level interleaving). Then use\n`AskUserQuestion` to elicit the candidate feature list. Per the **Decision Support** protocol in `references\u002Fshared-conventions.md`, lead with a **recommended decomposition** and a one-line rationale rather than asking the user to invent it unaided, then probe its seams (\"Is any of these two really one? Is any one really two?\"), naming the trade-off (more features = more parallelism but more edges). Iterate until the user confirms.\n\nFor **each** proposed feature name, before accepting it into the set, enforce global uniqueness\nand name safety via the helper:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" check-name \"{feature}\" --specs-dir \"{specsDir}\"\n```\n\n- Exit `0` → accept the name.\n- Exit `1` (`duplicate-name`) → reject that name; surface the finding verbatim and re-prompt\n  for a different name.\n- Exit `2` (`unsafe-name`) → reject; surface the finding and re-prompt.\n\nNever accept a feature name that has not passed `check-name` exit 0.\n\n### Step C3 — Per-Feature Charter + Structured Contracts\n\nFor each confirmed feature, run a focused `AskUserQuestion` batch (one feature at a time,\n2–3 questions per call) eliciting:\n\n- **Charter** — a single paragraph: scope statement + contract obligations. This is a\n  **charter only, NOT a PRD**. Do NOT conduct a full requirements interview here. If the user\n  starts dictating detailed requirements, redirect (as context text, then continue the batch):\n  > \"That's PRD-level detail — `forge-1-prd` will capture it when this feature is ready. For\n  > the charter I just need the one-paragraph scope and what it must expose\u002Fconsume.\"\n- **`exposes`** — zero or more structured `Contract` objects this feature provides to\n  dependents. Each is `{ \"name\", \"kind\", \"summary\" }` where `kind` ∈\n  `function | type | endpoint | module | event`.\n- **`consumes`** — zero or more structured `ConsumedContract` objects this feature relies on.\n  Each is `{ \"from\", \"name\", \"summary\" }`, where `from` is a sibling feature name in this epic.\n\nCollect these into plain JSON objects per feature. Do NOT free-form the contracts in prose —\nthe structured arrays are the source of truth; EPIC.md renders them as prose later (Step C6).\n\n### Step C4 — Dependency-Edge Interview\n\nFor each feature, use `AskUserQuestion`: \"Which sibling features must be complete before this\none can build?\" → populates `dependsOn: [names]`.\n\n**Seed the suggestion from `consumes`:** a `consumes.from` X strongly implies `dependsOn` X. Per the **Decision Support** protocol, offer the union of each feature's `consumes.from` set as the **recommended default**, evidence-backed — but flag the cost (each edge serializes the loop and blocks dependents, so add only what contracts require). User confirms\u002Foverrides; `dependsOn` is authoritative.\n\nThe `features[]` array order is the user-declared sequence from C2 (order is a presentation\nsequence, **not** a dependency ordering). Preserve the C2 order unless the user asks to reorder.\n\n### Step C5 — Compose & Validate the Manifest\n\nCompose the full `epic-manifest.json` per the 00 §2 schema, setting:\n\n- `schemaVersion`: `1`\n- `revision`: `1` — the canonical artifact revision epic-scoped verification freshness compares against. Creation always writes `1`; every later mutation bumps it exactly once via the helper mutators. Never hand-edit it.\n- `epic`: `\"{epic}\"`\n- `description`: from C1\n- `status`: `\"active\"`\n- `narrativeDoc`: `\"EPIC.md\"`\n- `createdAt` and `updatedAt`: the **same** current ISO-8601 UTC timestamp (`createdAt == updatedAt`)\n- `features[]`: in declared order, each with `name`, `charter`, `dependsOn`, `exposes`,\n  `consumes`. **No per-feature `status` field** — including one makes the manifest fail\n  validation (the `cached-status` finding).\n\nWrite the composed JSON to `{specsDir}\u002F{epic}\u002Fepic-manifest.json` (creating the epic dir first).\nFor the *initial* creation write the skill writes the file directly — atomic guarantees are only\nrequired for in-place mutation, which is the helper mutators' job. Creating the epic dir first creates `{specsDir}\u002F`, so after writing the manifest invoke the **Specs Directory Hygiene** block in `references\u002Fshared-conventions.md` (idempotent; stage anything it writes with this stage's commit). Then validate:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fepic-manifest.py\" validate \"{epic}\" --specs-dir \"{specsDir}\" --json\n```\n\n- Exit `0` → proceed to C6.\n- Exit `1` → the manifest is malformed. Surface **every** `findings[]` entry **verbatim**, do\n  NOT proceed, and loop back into the relevant interview step to correct, then re-compose and\n  re-validate:\n  - `cycle` → re-open the dependency interview (C4).\n  - `dangling-ref` → re-open C4 (bad `dependsOn`) or C3 (bad `consumes.from`).\n  - `duplicate-name` \u002F `unsafe-name` → re-open the feature-list interview (C2).\n  - `cached-status` \u002F schema violation → fix the composed JSON and re-validate.\n- Exit `2` → IO\u002Fusage error (missing manifest or unreadable). Surface and STOP.\n\nAcyclicity, uniqueness, and dangling-ref checks are thus ALWAYS performed by the helper, never\nby the LLM eyeballing the graph.\n\n> **Contracts have no mutator.** There is intentionally no `--exposes-json`\u002F`--consumes-json`\n> flag. At creation, the skill populates each feature's `exposes`\u002F`consumes` directly in the\n> composed manifest entry (above), then re-runs `validate` — exactly as described here. The\n> same pattern applies after an edit-mode `add-feature` (see Edit Mode).\n\n### Step C6 — Generate EPIC.md\n\nGenerate `{specsDir}\u002F{epic}\u002FEPIC.md` from the **validated** manifest. It is the human-readable\n**mirror** of the manifest (the manifest is the source of truth). For the full EPIC.md structure\nskeleton, read `references\u002Fedit-mode.md` (EPIC.md Mirror Template section) — the same template the\nedit-mode E5 patch applies.\n\n**The mirror rule.** Render each feature's `exposes`\u002F`consumes` arrays as prose, one bullet per\ncontract entry, preserving `name`, `kind`\u002F`from`, and `summary`. Do not invent a contract that\nis not in the manifest, and do not omit one that is. The Overall Goal and Decomposition\nRationale are the only prose without a 1:1 manifest counterpart. The skill does NOT itself diff\nEPIC.md against the manifest — drift detection is `forge-verify` epic mode CHECK-E06.\n\n### Step C7 — Create Member Subdirectories + Back-Pointer States\n\nAfter the manifest validates and EPIC.md is written, create one subdirectory per member feature\nso the navigator and resolver can see them before any stage runs. For each `features[].name`:\n\n1. Create `{specsDir}\u002F{epic}\u002F{feature}\u002F`.\n2. Write `{specsDir}\u002F{epic}\u002F{feature}\u002F.pipeline-state.json` conforming to\n   `references\u002Fpipeline-state-schema.json`, carrying:\n   - `epic`: `\"{epic}\"` — the back-pointer.\n   - `currentStage`: `\"forge-1-prd\"` — the next actionable stage for the member.\n   - `stages[\"forge-0-epic\"]`: `{ \"status\": \"complete\", \"version\": 1, \"completedAt\": \"\u003Cts>\" }`\n     — recording that the epic stage seeded this member.\n   - No other stages (all other stages absent\u002Fpending), exactly as a freshly-initialized\n     standalone feature. **No per-feature `status` beyond the stage entry** — the member state\n     holds derived stage progress only.\n\nFor an example member state, read `references\u002Fedit-mode.md` (Member State Example section). This stub is written by hand rather than by a `state-*` verb — deliberately: no verb writes the `epic` back-pointer a brand-new member needs, so this is a sanctioned exception to the Pipeline State Protocol.\n\nThe member subtree holds the **same** artifact set a standalone feature holds; only\n`.pipeline-state.json` exists at creation. No PRD\u002Fspecs are authored here. The epic subtree is\nnow self-contained: manifest + EPIC.md + one subdirectory per member.\n\n### Step C8 — Review, Pipeline State & Commit\n\n1. **Review.** Present a summary (epic name, N features, dependency edges, contracts) as text, then use `AskUserQuestion`: \"Does this epic decomposition look right? Any feature, dependency, or contract to change before I commit?\" If the user wants changes, loop back to the relevant creation step, re-compose, and re-validate.\n\n2. **Commit (Git Commit Protocol).** If `gitCommitAfterStage` is true, follow the Git Commit Protocol in shared-conventions:\n   - Stage the whole epic subtree only: `git add {specsDir}\u002F{epic}\u002F` — never `git add -A`. This captures `epic-manifest.json`, `EPIC.md`, and all member `.pipeline-state.json` files atomically.\n   - Commit with message `\"{commitPrefix}({epic}): create epic with {N} features\"`.\n   - On success, capture the commit hash for the closing message only — the epic manifest has no `commitHash` field, so nothing is written back into a committed file and the two-commit step of the Git Commit Protocol does not apply here. On failure (pre-commit hook, conflict), report and do not mark complete; never use `--amend`\u002F`--no-verify`\u002F`--force`.\n\n3. **Closing message — the Stage Exit Protocol.** Congratulate the user (\"Epic `{epic}` created with {N} features.\"), then close with the Stage Exit Protocol below (single-sourced in `references\u002Fstage-exit-protocol.md`; the epic → first-PRD boundary is a full stage boundary — do not improvise a \"Next steps\" list). `{first-actionable-feature}` = any feature with empty `dependsOn` (or the first entry of `render-status`'s `actionable` set):\n\nDetermine `{verify-capability}` per the **Host and capability determination** section of `references\u002Fstage-exit-protocol.md`: `interactive` needs both a question mechanism and *permission* to dispatch the clean-room `forge-verifier`, and a session that merely needs consent first is still `interactive`.\n\n**Close this stage with the Scripted Stage Exit** (contract: `references\u002Fstage-exit-protocol.md`; do not improvise a \"Next steps\" list). Run:\n\n```bash\nR=\"$(bash -c '[ -z \"${FEATURE_FORGE_ROOT:-}\" ] || [ -x \"$FEATURE_FORGE_ROOT\u002Fscripts\u002Fforge-root.sh\" ] || { echo \"feature-forge: FEATURE_FORGE_ROOT=$FEATURE_FORGE_ROOT has no scripts\u002Fforge-root.sh\" >&2; exit 2; }; for d in \"${FEATURE_FORGE_ROOT:-}\" \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\"\u002F.claude\u002Fskills\u002Ffeature-forge \"$HOME\"\u002F.claude\u002Fplugins\u002Fcache\u002F*\u002Ffeature-forge\u002F* \"$HOME\"\u002F.claude\u002Fplugins\u002F*\u002Ffeature-forge \"$HOME\"\u002F.agents\u002Fskills\u002Ffeature-forge .\u002F.agents\u002Fskills\u002Ffeature-forge; do [ -x \"$d\u002Fscripts\u002Fforge-root.sh\" ] && exec \"$d\u002Fscripts\u002Fforge-root.sh\"; done')\"\n[ -n \"$R\" ] || { echo \"feature-forge: cannot locate plugin root\" >&2; exit 1; }\npython3 \"$R\u002Fscripts\u002Fforge-session.py\" stage-exit --feature \"{epic}\" --stage forge-0-epic --next-feature \"{first-actionable-feature}\" --specs-dir \"{specsDir}\" --host pi --verify-capability \"{verify-capability}\"\n```\n\nObey the DIRECTIVES it prints, in the consumption order this protocol fixes: surface `invalidAutoVerifyKeys` and every `warnings` entry first; `runInStageVerify: true` → run the in-stage clean-room verify chain now (honoring `autoFixEligible`, and asking through the Standard Verify Gate first when you may not dispatch unsolicited); `verifyGate: \"standard\"` → present the Standard Verify Gate; `verifyGate: \"manual-print\"` → print the `verifyCommand` for the user and do **not** dispatch inline. Then, and only when `terminalOwnedBy` is `\"self\"`, **print the NEXT-STEPS block verbatim as your absolute last output — nothing after its sentinel line.** A `terminalOwnedBy: \"outer\"` payload carries `nextSteps: null`: return your structured result to the caller and print no terminal block at all.\n\n---\n\n## Edit Mode\n\nEntered from Step 0 when `{specsDir}\u002F{epic}\u002Fepic-manifest.json` already exists (the **EXISTS**\nbranch). The edit branch mutates the manifest **only** through helper mutators — atomic\n(temp file + `os.replace`) and internally re-validated, so a refused write leaves the manifest\n**byte-identical**; the skill never hand-rolls an in-place write. Every question goes through\n`AskUserQuestion`, and **every mutation is committed individually** so git history is the audit trail.\n\nFor the full E1–E6 mechanics — the E1 refuse-if-invalid protocol, E2 operation→mutator table, E3\ncontracts\u002Fremove-feature caveats (incl. the verbatim WARN block), E4 impact-warning rules, E5\nEPIC.md patch rule, and the E6 Observability \u002F Pipeline State & Commit machinery\n(`.epic-state.json` schema, `updatedAt` rules, Git Commit Protocol shared with C8) — read\n`references\u002Fedit-mode.md`. For the exact `epic-manifest.py` mutator flag surface and\nper-subcommand exit-code (`0`\u002F`1`\u002F`2`) handling, read `references\u002Fepic-manifest-subcommands.md`.\n\nAn edit-mode mutation closes through the **same** Scripted Stage Exit command Step C8 runs — there is one scripted exit for this skill, not one per branch. Only the argument differs: edit mode re-reads live epic status **after** the mutation and its commit, passes the resulting concrete member as `--next-feature`, and **omits that flag entirely** when no member is actionable (so the router hands back to the epic dashboard instead of naming a member it cannot resolve). Those substitution rules, the `render-status` failure path, and the script's member fallback warning are all in `references\u002Fedit-mode.md` — do not improvise a closing pointer here.\n\n---\n\n## Error Handling\n\nThe skill **never** repairs a corrupt manifest automatically and **never** proceeds past a gating\nhelper exit `≥ 1`. All findings are surfaced **verbatim**. For the full condition → helper-signal →\nskill-behavior disposition table, read `references\u002Fepic-manifest-subcommands.md` (Error Handling\nsection).\n\n---\n\n## Gotchas\n\n- The argument names an **epic**, not a feature — this is the only stage where that is true.\n  Member feature names come from the C2 interview, each gated through `check-name`.\n- Never eyeball the dependency graph for cycles. Compose the manifest, run `validate`, and\n  surface findings. The helper owns acyclicity, uniqueness, dangling-ref, and schema checks.\n- A charter is one paragraph, not a PRD. Redirect requirement-level detail to `forge-1-prd`.\n- Contracts have no mutator: edit `exposes`\u002F`consumes` in the composed manifest entry, then\n  re-run `validate`.\n- All questions go through `AskUserQuestion`, never text. Rung 2\u002F3: Interaction Capability Ladder.\n\n---\n\n## Host execution notes (Pi)\n\nThis Pi bundle preserves Claude's `AskUserQuestion` references because it ships a Pi compatibility extension registering an `AskUserQuestion` tool. On Pi:\n\n- **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other\u002Fcustom answers.\n- **Non-interactive (`-p`\u002F`--mode json`):** `AskUserQuestion` is stripped from the tool list, so its absence alone cannot tell you the rung — read that from the Interaction Capability Ladder's `interaction-mode` record. A call attempted anyway fails with `Error: UI not available (running in non-interactive mode)` — never read that as a decline. Take the Interaction Capability Ladder's declared conservative default, state it in your output, and use `no-default: abort — \u003Cquestion> requires a human answer` for an interview question with no sane default (`references\u002Fshared-conventions.md`).\n- **Skill dispatch:** Pi uses `\u002Fskill:\u003Cname>` commands. If you cannot invoke a skill directly, print the exact `\u002Fskill:\u003Cname> ...` command for the user to run. A **forge-invocation-args** compatibility extension wraps the arguments of a `\u002Fskill:forge-*` command in a `\u003Cfeature-forge-invocation>` envelope before Pi expands it, so read the feature name from that envelope's `\u003Carguments>` element (an empty element means none was supplied) rather than from unlabeled trailing text — see `references\u002Fshared-conventions.md` § Feature Name Requirement.\n- **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: \"forge-verifier\", task: \"...\" }`, or fan several out concurrently with `{ tasks: [{ agent: \"forge-spec-writer\", task: \"...\" }, ...] }`. If no `subagent` tool is available, run that step inline yourself.\n- **Background \u002F monitoring (forge-5-loop):** run the loop through **rauf's Pi package** (`pi install npm:@garygentry\u002Frauf`, rauf >= 0.18.0), whose `rauf-loop-supervisor` extension registers `rauf_loop_launch`, `rauf_loop_status`, `rauf_loop_wait` and `rauf_loop_stop`. Launch with `rauf_loop_launch`; it starts the loop **detached** (it outlives this session), posts a one-line card per completed item, and **wakes this session** on needs-human, blocked, stuck, review failure, loop errors and completion — so end your turn after the launch: do not poll, sleep, tail, run the loop in the foreground or behind `nohup`\u002F`&`, or hand it to a subagent (the extension blocks those calls). Read `rauf_loop_status` before acting on a wake; use `rauf_loop_stop` only to deliberately stop the runner. Full detail: `references\u002Frunner-contract.md` Steps 3b\u002F3d. If the `rauf_loop_*` tools are not registered, `forge-session.py doctor` says how to install the package; until then use the `rauf loop wait` recipe there.\n",{"name":5,"description":7},"main","ce0d6d40bba1d87039b0397041d15cb56c934037","adapters\u002Fpi\u002Fskills\u002Fforge-0-epic","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge","https:\u002F\u002Fgarygentry.github.io\u002Ffeature-forge\u002F","https:\u002F\u002Fgithub.com\u002Fgarygentry","2026-10-15 10:14:13",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add garygentry\u002Ffeature-forge --skill forge-0-epic",{"tool":36,"command":37},"bunx","bunx skills add garygentry\u002Ffeature-forge --skill forge-0-epic",{"tool":39,"command":40},"pnpm","pnpm dlx skills add garygentry\u002Ffeature-forge --skill forge-0-epic","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002FSKILL.md",true,[44,50,54,58,62,66],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fedit-mode.md","REFERENCE","参考文档",19074,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fedit-mode.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fepic-manifest-subcommands.md",6118,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fepic-manifest-subcommands.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fpipeline-state-schema.json",14777,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fpipeline-state-schema.json",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fportable-root.md",7163,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fportable-root.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fshared-conventions.md",73992,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fshared-conventions.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fstage-exit-protocol.md",35623,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fpi\u002Fskills\u002Fforge-0-epic\u002Freferences\u002Fstage-exit-protocol.md",[71,78,83,89,94,100],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M75H8RTWSJ2HYCPPKA3FRG42","alpha","A valid skill description.","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-nested-metadata\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":79,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M75H8QXKFS116EF1009KB3CY","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-malformed\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":84,"name":73,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M75H8PKNSV4WEREK6D91G9T4","This is a folded scalar description.","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-folded-scalar\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":90,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M75H8MAV261C8QJ4S8CGRHV5","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-crlf\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":95,"name":73,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M75H8KDW98YF0PBHPD5V1GKR","foo: bar","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-colon-value\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":101,"name":73,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M75H8JFYFCGYNRCRTS4PMKKX","A valid description.","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-blank-lines\u002Fskills\u002Falpha\u002FSKILL.md",[],[]]