[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75GXA0CRSDPMH062RWA55YV":3,"skill-same:01M75GXA0CRSDPMH062RWA55YV":83},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75GXA0CRSDPMH062RWA55YV","forge-2-tech",null,"Create a technical specification from an existing PRD in the forge pipeline. Use when user runs \u002Ffeature-forge:forge-2-tech or asks to create a tech spec for a forge feature after PRD completion. Do NOT trigger for general technical design discussions, architecture reviews, or tech specs outside the forge pipeline.","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\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\n# GENERATED — DO NOT EDIT. Source: skills\u002Fforge-2-tech\u002FSKILL.md. Regenerate: python3 scripts\u002Fbuild-adapters.py\nname: forge-2-tech\ndescription: Create a technical specification from an existing PRD in the forge pipeline. Use when user runs \u002Ffeature-forge:forge-2-tech or asks to create a tech spec for a forge feature after PRD completion. Do NOT trigger for general technical design discussions, architecture reviews, or tech specs outside the forge pipeline.\nargument-hint: \u003Cfeature-name>\n---\n\n# forge-2-tech — Technical Specification Driver\n\nCreate a thorough technical specification by interviewing the user about technology decisions, grounded in PRD requirements.\n\n## Prerequisites\n\nRead and follow `references\u002Fshared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.\n\n## Step 1: Validate Prerequisites\n\n**Resolve the feature directory first** via the **Feature Directory Resolution** block in `references\u002Fshared-conventions.md`, setting `{resolvedFeatureDir}`.\n\n**Prerequisite check:** Read `{resolvedFeatureDir}\u002F.pipeline-state.json`. If not in force mode and `forge-1-prd` is not `complete`, STOP and tell the user: \"The PRD for '{feature}' isn't complete yet. Run `\u002Ffeature-forge:forge-1-prd {feature}` first.\"\n\n**Carried-over note check.** If that state's top-level `notes` is a non-empty string, surface it verbatim before proceeding and treat it as input to this stage — it was persisted for exactly this cross-session handoff (often at the previous stage's exit). It never overrides the PRD or config; raise any conflict instead of silently following either side.\n\nAfter the prerequisite check, invoke the **Stage-Entry Guard** block in `references\u002Fshared-conventions.md` with `{stage}` = `forge-2-tech` — it detects an interrupted or already-complete tech-spec, runs the resume\u002Frestart or new-version gate, and stamps `status: \"in-progress\"` + `startedAt` + `currentStage` before the research and interview.\n\nRead `{resolvedFeatureDir}\u002FPRD.md` into context. This is your foundation — every technology decision must trace back to a PRD requirement.\n\nAfter reading the PRD, invoke the **Epic Context Injection** block in `references\u002Fshared-conventions.md`. It self-gates on the resolved feature's `epic` back-pointer: for a standalone feature it is a no-op; for an epic member it loads EPIC.md, this feature's charter, and the completed direct dependencies' specs into context before the research and interview.\n\n## Step 2: Examine Existing Context\n\nBefore interviewing, you need to understand the existing codebase. This involves reading many files across the project, which consumes context.\n\n### Recommended: Delegate to forge-researcher Subagent\n\nSpawn the `forge-researcher` subagent via the `Agent` tool to scan the codebase. Pass a prompt like: \"Research the codebase for planning the {feature} feature. Focus on integration points, established patterns, and relevant packages.\"\n\nIf this feature belongs to an epic, also add to the dispatch prompt: \"If this feature belongs to an epic, also account for these epic contracts: {paste this feature's `consumes` and the `exposes` of its direct deps}, and the completed dependency tech-specs at {paths}. Do not re-research transitive deps.\" This threads epic context into the researcher without changing the agent's behavior.\n\nThe researcher runs in its own context window, reads the project structure, and returns a concise integration report. This keeps your main conversation context clean for the interactive interview.\n\n**Single vs. parallel research.** For a small or well-understood codebase, **one**\nresearcher is the right default. For a **large codebase or uncertain scope** (many\npackages, several integration surfaces, monorepo), dispatch **multiple `forge-researcher`\nsubagents in parallel — a single message with multiple Agent calls** (the\n`superpowers:dispatching-parallel-agents` pattern), each scoped to a **disjoint focus**\nso they don't re-read the same ground:\n- one on **project structure & conventions** (layout, build, naming, error\u002Ftest patterns),\n- one per **major integration area \u002F subsystem** the feature touches (its exports, types,\n  public API),\n- optionally one on **existing feature specs & in-progress conflicts**.\n\nEach returns its own report; **you merge them** into a single integration picture for the\ninterview. This cuts latency and deepens coverage versus one researcher sweeping\neverything serially. No agent change is needed — `forge-researcher` already returns a\nself-contained report; just give each instance a narrower focus.\n\nIf the `forge-researcher` subagent is not available, perform the research inline (steps below).\n\n### Manual Research (fallback)\n\n1. **Read the PRD thoroughly**: Understand all requirements and constraints\n2. **Check for project-level stack decisions**: Look for a project stack-decisions file, first existing path wins: `.feature-forge\u002Fstack-decisions.md` (preferred), then `.agents\u002Freferences\u002Fstack-decisions.md`, then `.claude\u002Freferences\u002Fstack-decisions.md` (legacy alias). If present, read it — these are established technology choices that should be respected unless there's a strong reason to deviate.\n3. **Read the plugin's default stack reference**: Read `references\u002Fstack-discovery-checklist.md` for general stack context (only if no project-level override exists)\n4. **Examine the existing codebase**: Look at `package.json` files, existing packages, directory structure, and established patterns. Understand what conventions are already in place.\n5. **Review other features' tech specs**: Check `{specsDir}\u002F*\u002Ftech-spec.md` and `{specsDir}\u002F*\u002F*\u002Ftech-spec.md` (depth-2, to find nested epic members) for consistency in approach and to identify shared infrastructure. Apply the **feature-shaped-dir bound**: only treat a directory as a feature if it directly contains a `.pipeline-state.json` (filter matches whose parent directory holds one, or enumerate members via the helper). A flat-only tree has no depth-2 feature dirs, so this gains no new matches there (REQ-COMPAT-01).\n6. **Identify integration points**: For each existing package that this feature touches, read its exports, types, and public API. Document these as constraints.\n\n### Stack Detection and Persistence\n\nAfter researching the codebase, identify the primary stack (language, build tool, package manager, framework). Read `references\u002Fstack-resolution.md` for the full resolution protocol.\n\n1. Check if `forge.config.json` already has a `stack` field — if so, use it\n2. Otherwise, detect from project files and use `AskUserQuestion` to confirm: \"I detected this as a {stack} project. Correct?\"\n3. Update `forge.config.json` with `stack`, `typeCheckCommand`, and `testCommand`. If the feature has a runtime entrypoint (HTTP server, CLI, worker, or a library with a bootstrap contract), also offer to set `smokeCommand` — an end-to-end command that boots the wired app and drives one happy-path request (exit 0 = pass). It is distinct from `testCommand` (unit tests, which may self-bootstrap) and powers impl-verify's runnability check; leave it `null` for a pure library with no runnable surface.\n4. Verify that a matching stack profile exists at `references\u002Fstacks\u002F{stack}.md`. If it does, load it for stack-specific guidance during this and all subsequent stages. If no profile exists, inform the user: \"No dedicated profile for {stack}. Using generic fallback — spec conventions, verification checks, and examples will be language-neutral. Consider creating a project-level override at `.feature-forge\u002Fstack-decisions.md`.\" Then load `references\u002Fstacks\u002F_generic.md`.\n\n## Step 3: Conduct the Interview\n\nInterview the user about technology decisions. Unlike the PRD interview, here you SHOULD discuss specific technologies, libraries, patterns, and architecture.\n\n### Interview Approach\n\n**Turn structure:** Output your research findings, analysis, or technical proposals as regular text. Then use `AskUserQuestion` for the actual questions. NEVER put questions in your text output — they MUST go through `AskUserQuestion`. At rung 2\u002F3, follow the Interaction Capability Ladder.\n\n**Pacing:** Present 1-2 decision areas per `AskUserQuestion` call and STOP to wait for the user's response before continuing. After receiving answers, probe deeper on anything incomplete before moving to the next topic. Signal progress in your text before the next question batch. Do NOT dump all decision areas in a single message — the interview is a conversation, not a document.\n\n**First message pattern:** Output the research summary as text, then use `AskUserQuestion` to confirm the stack and ask about the first decision area (typically package\u002Fmodule structure). Wait for the user to respond before proceeding to subsequent areas.\n\n**Question strategies** (use these as content for `AskUserQuestion`, not as inline prose). Follow the **Decision Support** protocol in `references\u002Fshared-conventions.md` — this interview is the richest decision surface in the pipeline, so don't just list options; lead with a recommended approach, put the trade-off in each option's description, and give a one-line rationale:\n- For each PRD requirement, propose a technical approach **with its trade-off and your recommendation**, then ask for confirmation or alternatives — don't present competing approaches flatly. You've just researched the codebase; spend that research here.\n- Recommend approaches consistent with the established stack, and say *why* the convention favors it (evidence-backed mode). Where the choice is genuine taste (e.g. folder layout, naming), give a default but flag it as preference.\n- Challenge over-engineering: does the feature need this, or is a simpler approach sufficient? Frame the simpler option's trade-off (less flexibility now vs. less to maintain).\n- Ask about every integration point and how the feature interacts with existing modules.\n- For competing module structures or code-shape choices, use the `AskUserQuestion` `preview` field to show the candidates side-by-side.\n\n**Parking lot:** If the user raises a concern that belongs to a different pipeline stage (e.g., backlog granularity, documentation format), acknowledge it and persist it **immediately, at the moment it is raised** — never deferred to stage closure — by running `state-note` (fenced immediately below) with a concise one-line statement of the concern, then say \"Good point — I've noted that for the [specs\u002Fbacklog\u002Fdocs stage]. Let's continue with the tech spec.\" Add `--epic \"{epic}\"` to that call when this feature is an epic member — required, per the Pipeline State Protocol in `references\u002Fshared-conventions.md`; omitting it for a member is an error and must never fall back to a same-named flat feature. `state-note` **overwrites** the single top-level `notes` string rather than appending, so when a note already exists, read the current `notes` value out of the feature's `.pipeline-state.json` first and pass one combined concise string in a single `--note` — never edit or round-trip the JSON by hand. This interview-time call is separate from the optional completion note in Step 6 and must not be folded into it. If the call exits 2, surface the `Error:` line verbatim with the named feature (and epic) and the recovery instruction, and **stop claiming the concern was recorded** — it was not. The full recipe is single-sourced as **Immediate Downstream Note (Parking Lot)** in `references\u002Fshared-conventions.md`.\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\" state-note \\\n  --feature \"{feature}\" --note \"\u003Cconcise downstream concern>\" \\\n  --specs-dir \"{specsDir}\"\n```\n\n**Epic-level concern (backflow):** The parking lot above is for concerns about a *later stage of THIS feature*. If instead the design reveals the **epic decomposition itself** is wrong — a **sibling feature must be added**, a **frozen boundary between features must move**, a feature must **split**, or a **dependency edge is wrong** — that is an *epic-level* concern and does **not** go in `notes`. It only applies when this feature is an epic member (its `.pipeline-state.json` has an `epic` back-pointer); for a standalone feature there is no epic to reconcile. To record one, run `state-ecr` (fenced below) with `--kind` (`add-feature`|`redep`|`move-boundary`|`split`), `--target`, `--rationale`, `--raised-by forge-2-tech` and `--blocks-current` — it appends the entry to the member state's `epicChangeRequests[]` array, filling in `raisedAt` (ISO-8601 UTC) and `status: \"open\"` for you. Set `blocksCurrent: true` when the change alters a contract (`exposes`\u002F`consumes`) or dependency edge this feature relies on for its *next* stage — proceeding to specs would build on a soon-to-change decomposition (this is the point of no cheap return, so bias toward `true`); `false` for a peer\u002Fdownstream change this feature does not consume. When a contract\u002Fdep edge is touched and the classification is ambiguous, confirm `blocksCurrent` with a single `AskUserQuestion`, defaulting to `true`. **Do not** edit `epic-manifest.json` here — recording is not applying; only `\u002Ffeature-forge:forge-0-epic` edit mode mutates the epic. Then acknowledge without blocking and continue the tech spec.\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\" state-ecr \\\n  --feature \"{feature}\" --epic \"{epic}\" --kind \"\u003Ckind>\" --target \"\u003Ctarget>\" \\\n  --rationale \"\u003Cwhy>\" --raised-by forge-2-tech --blocks-current \"\u003Ctrue|false>\" \\\n  --specs-dir \"{specsDir}\"\n```\n\n### Key Decision Areas to Cover\n\nWork through these areas across multiple turns, grouping related areas (1-2 per message):\n\n- **Package\u002Fmodule structure**: Where does this live in the project? What are its exports? (For non-monorepo projects, this becomes module organization — where the code lives, how it's organized, and what its exports are.)\n- **Data model**: What are the key entities, their schemas, and storage approach?\n- **API design**: What endpoints or interfaces does this expose?\n- **Dependencies**: What external and internal packages are needed?\n- **Patterns**: Which established patterns from the codebase apply here?\n- **Error handling**: How are errors surfaced, propagated, and recovered from?\n- **Testing strategy**: Unit, integration, e2e — what approach for this feature?\n- **Configuration**: What's configurable? How is it configured?\n- **Migration\u002Fdeployment**: Any special rollout considerations?\n\n### Requirement Traceability\n\nEvery technical decision MUST reference the PRD requirement(s) it addresses. Use the format:\n\n```\n### JWT-based Session Tokens (REQ-AUTH-01, REQ-SEC-02)\nSessions will use signed JWT tokens with...\n```\n\nIf you find yourself writing a technical section that doesn't trace to any PRD requirement, STOP and ask: \"I'm about to specify X, but I can't find a PRD requirement for it. Should we add one, or is this unnecessary?\"\n\n## Step 4: Integration Analysis (Required)\n\nBefore finalizing the tech spec, this section is MANDATORY:\n\n1. List every existing package this feature depends on\n2. List every existing package that will need to import from this feature\n3. For each integration point, document:\n   - Which types or contracts are shared\n   - How data flows between packages\n   - Any patterns established by existing code that must be followed\n   - The EXACT function signatures and import paths verified from source code. If you cannot locate an expected export, note explicitly: \"WARNING: Could not locate X export in {module} — verify this exists before implementing.\"\n4. Check for potential conflicts with in-progress features (other spec directories)\n\n## Step 5: Write the Tech Spec\n\nWrite `{resolvedFeatureDir}\u002Ftech-spec.md` with this structure:\n\n```markdown\n# {Feature Name} — Technical Specification\n\n## 1. Overview\nBrief technical summary and key architectural decisions.\n\n## 2. Module Structure\nProject location, directory layout, public API surface.\n\n## 3. Technical Decisions\n### 3.1 {Decision Area} (REQ-XXX-NN)\nDecision, rationale, alternatives considered.\n\n## 4. Data Model\nSchemas, types, storage approach.\n\n## 5. API Design\nEndpoints, interfaces, contracts.\n\n## 6. Integration Points\nHow this feature connects to existing packages.\n\n## 7. Error Handling\nError types, propagation, recovery.\n\n## 8. Testing Approach\nStrategy, tooling, coverage targets.\n\n## 9. Dependencies\nExternal packages, internal packages, version constraints.\n\n## 10. Open Technical Questions\nUnresolved technical decisions.\n```\n\n## Step 6: Review with User\n\nThis is a **blocking review** — per the **Stage Review Gate** in `references\u002Fshared-conventions.md`, do not proceed until the user confirms.\n\nPresent the complete tech spec. Ask:\n- \"Does this capture all the technical decisions correctly?\"\n- \"Any patterns from the existing codebase I missed?\"\n- \"Are the integration points complete?\"\n\nUse `AskUserQuestion` to collect this feedback.\n\n## Step 7: Update Pipeline State and Commit\n\nBefore writing state or running the stage exit, invoke the **Stage-Completion Re-check** block in `references\u002Fshared-conventions.md` with `{stage}` = `forge-2-tech` — a resumed mid-stage continuation must not overwrite a committed `tech-spec.md` or re-fire a finished exit.\n\nPipeline state is written by the `state-*` verbs — see the Pipeline State Protocol in `references\u002Fshared-conventions.md`.\n\n1. Record completion by running `state-complete` (below) with `--version`, one `--artifact` per file this stage produced, and `--based-on forge-1-prd=\u003Ccurrent forge-1-prd version>`. It sets `status: \"complete\"`, `completedAt`, the version and `basedOnVersions`, and applies the downstream staleness cascade deterministically, so no downstream status is set by hand.\n2. **Offer a note — don't force one.** As a statement (not a blocking question), let the user know they can jot anything worth preserving across sessions and you'll store it in the `notes` field. If they volunteer something, store it via `state-note` — it **overwrites** the single `notes` string (latest note wins), so fold any still-relevant existing note into the one combined string; otherwise proceed. The next stage's Step 1 reads and surfaces this note.\n3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references\u002Fshared-conventions.md`: stage files, attempt commit with message `\"{commitPrefix}({feature}): complete tech-spec v{n}\"` (marking `stages.forge-2-tech.status` `complete` with `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success. If commit fails, leave status as `in-progress`.\n4. **Close with the Stage Exit Protocol** (single-sourced in `references\u002Fstage-exit-protocol.md`; do not improvise a \"Next steps\" list):\n\nThe `state-complete` call for item 1 — and the `state-note` call only when the user volunteered a note in item 2 — with the portable plugin-root prelude. Add `--epic \"{epic}\"` to each call when this feature is an epic member — required, per the Pipeline State Protocol in `references\u002Fshared-conventions.md`:\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\" state-complete \\\n  --feature \"{feature}\" --stage forge-2-tech --version {n} \\\n  --based-on \"forge-1-prd=\u003Cn>\" --artifact tech-spec.md --specs-dir \"{specsDir}\"\n# ONLY run the next call if the user volunteered a note in item 2 — otherwise stop here.\npython3 \"$R\u002Fscripts\u002Fforge-session.py\" state-note \\\n  --feature \"{feature}\" --note \"\u003Cwhat the user volunteered>\" --specs-dir \"{specsDir}\"\n```\n\n**Determine `--verify-capability` before running the exit** per **Host and capability determination** in `references\u002Fstage-exit-protocol.md` (summarized under **Verify Capability** in `references\u002Fshared-conventions.md`): pass `interactive` only when a question mechanism equivalent to `AskUserQuestion` is available **and** dispatching a clean-room `forge-verifier` is *permitted* (the test is \"may I dispatch right now\", not tool presence) — otherwise `manual`. That reference owns the full rule, including why a consent-only bar is still `interactive` and the `none`-gate consent variant. Add `--epic \"{epic}\"` to the call below when this feature is an epic member.\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 \"{feature}\" --stage forge-2-tech --specs-dir \"{specsDir}\" --host claude --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## Gotchas\n\n- Don't duplicate the PRD. The tech spec answers HOW, not WHAT. If you find yourself restating requirements, reference them by ID instead.\n- When the user's stack decisions differ from what you'd recommend, document their choice AND note your concern as an \"Alternatives Considered\" item — don't silently override their preference.\n- Integration points are the #1 source of implementation surprises. Spend extra time here. Read the actual code of packages this feature touches, don't just guess at their APIs.\n- If the existing codebase has inconsistent patterns (it happens), call it out and ask which pattern should be followed for this feature.\n","# forge-2-tech — Technical Specification Driver\n\nCreate a thorough technical specification by interviewing the user about technology decisions, grounded in PRD requirements.\n\n## Prerequisites\n\nRead and follow `references\u002Fshared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.\n\n## Step 1: Validate Prerequisites\n\n**Resolve the feature directory first** via the **Feature Directory Resolution** block in `references\u002Fshared-conventions.md`, setting `{resolvedFeatureDir}`.\n\n**Prerequisite check:** Read `{resolvedFeatureDir}\u002F.pipeline-state.json`. If not in force mode and `forge-1-prd` is not `complete`, STOP and tell the user: \"The PRD for '{feature}' isn't complete yet. Run `\u002Ffeature-forge:forge-1-prd {feature}` first.\"\n\n**Carried-over note check.** If that state's top-level `notes` is a non-empty string, surface it verbatim before proceeding and treat it as input to this stage — it was persisted for exactly this cross-session handoff (often at the previous stage's exit). It never overrides the PRD or config; raise any conflict instead of silently following either side.\n\nAfter the prerequisite check, invoke the **Stage-Entry Guard** block in `references\u002Fshared-conventions.md` with `{stage}` = `forge-2-tech` — it detects an interrupted or already-complete tech-spec, runs the resume\u002Frestart or new-version gate, and stamps `status: \"in-progress\"` + `startedAt` + `currentStage` before the research and interview.\n\nRead `{resolvedFeatureDir}\u002FPRD.md` into context. This is your foundation — every technology decision must trace back to a PRD requirement.\n\nAfter reading the PRD, invoke the **Epic Context Injection** block in `references\u002Fshared-conventions.md`. It self-gates on the resolved feature's `epic` back-pointer: for a standalone feature it is a no-op; for an epic member it loads EPIC.md, this feature's charter, and the completed direct dependencies' specs into context before the research and interview.\n\n## Step 2: Examine Existing Context\n\nBefore interviewing, you need to understand the existing codebase. This involves reading many files across the project, which consumes context.\n\n### Recommended: Delegate to forge-researcher Subagent\n\nSpawn the `forge-researcher` subagent via the `Agent` tool to scan the codebase. Pass a prompt like: \"Research the codebase for planning the {feature} feature. Focus on integration points, established patterns, and relevant packages.\"\n\nIf this feature belongs to an epic, also add to the dispatch prompt: \"If this feature belongs to an epic, also account for these epic contracts: {paste this feature's `consumes` and the `exposes` of its direct deps}, and the completed dependency tech-specs at {paths}. Do not re-research transitive deps.\" This threads epic context into the researcher without changing the agent's behavior.\n\nThe researcher runs in its own context window, reads the project structure, and returns a concise integration report. This keeps your main conversation context clean for the interactive interview.\n\n**Single vs. parallel research.** For a small or well-understood codebase, **one**\nresearcher is the right default. For a **large codebase or uncertain scope** (many\npackages, several integration surfaces, monorepo), dispatch **multiple `forge-researcher`\nsubagents in parallel — a single message with multiple Agent calls** (the\n`superpowers:dispatching-parallel-agents` pattern), each scoped to a **disjoint focus**\nso they don't re-read the same ground:\n- one on **project structure & conventions** (layout, build, naming, error\u002Ftest patterns),\n- one per **major integration area \u002F subsystem** the feature touches (its exports, types,\n  public API),\n- optionally one on **existing feature specs & in-progress conflicts**.\n\nEach returns its own report; **you merge them** into a single integration picture for the\ninterview. This cuts latency and deepens coverage versus one researcher sweeping\neverything serially. No agent change is needed — `forge-researcher` already returns a\nself-contained report; just give each instance a narrower focus.\n\nIf the `forge-researcher` subagent is not available, perform the research inline (steps below).\n\n### Manual Research (fallback)\n\n1. **Read the PRD thoroughly**: Understand all requirements and constraints\n2. **Check for project-level stack decisions**: Look for a project stack-decisions file, first existing path wins: `.feature-forge\u002Fstack-decisions.md` (preferred), then `.agents\u002Freferences\u002Fstack-decisions.md`, then `.claude\u002Freferences\u002Fstack-decisions.md` (legacy alias). If present, read it — these are established technology choices that should be respected unless there's a strong reason to deviate.\n3. **Read the plugin's default stack reference**: Read `references\u002Fstack-discovery-checklist.md` for general stack context (only if no project-level override exists)\n4. **Examine the existing codebase**: Look at `package.json` files, existing packages, directory structure, and established patterns. Understand what conventions are already in place.\n5. **Review other features' tech specs**: Check `{specsDir}\u002F*\u002Ftech-spec.md` and `{specsDir}\u002F*\u002F*\u002Ftech-spec.md` (depth-2, to find nested epic members) for consistency in approach and to identify shared infrastructure. Apply the **feature-shaped-dir bound**: only treat a directory as a feature if it directly contains a `.pipeline-state.json` (filter matches whose parent directory holds one, or enumerate members via the helper). A flat-only tree has no depth-2 feature dirs, so this gains no new matches there (REQ-COMPAT-01).\n6. **Identify integration points**: For each existing package that this feature touches, read its exports, types, and public API. Document these as constraints.\n\n### Stack Detection and Persistence\n\nAfter researching the codebase, identify the primary stack (language, build tool, package manager, framework). Read `references\u002Fstack-resolution.md` for the full resolution protocol.\n\n1. Check if `forge.config.json` already has a `stack` field — if so, use it\n2. Otherwise, detect from project files and use `AskUserQuestion` to confirm: \"I detected this as a {stack} project. Correct?\"\n3. Update `forge.config.json` with `stack`, `typeCheckCommand`, and `testCommand`. If the feature has a runtime entrypoint (HTTP server, CLI, worker, or a library with a bootstrap contract), also offer to set `smokeCommand` — an end-to-end command that boots the wired app and drives one happy-path request (exit 0 = pass). It is distinct from `testCommand` (unit tests, which may self-bootstrap) and powers impl-verify's runnability check; leave it `null` for a pure library with no runnable surface.\n4. Verify that a matching stack profile exists at `references\u002Fstacks\u002F{stack}.md`. If it does, load it for stack-specific guidance during this and all subsequent stages. If no profile exists, inform the user: \"No dedicated profile for {stack}. Using generic fallback — spec conventions, verification checks, and examples will be language-neutral. Consider creating a project-level override at `.feature-forge\u002Fstack-decisions.md`.\" Then load `references\u002Fstacks\u002F_generic.md`.\n\n## Step 3: Conduct the Interview\n\nInterview the user about technology decisions. Unlike the PRD interview, here you SHOULD discuss specific technologies, libraries, patterns, and architecture.\n\n### Interview Approach\n\n**Turn structure:** Output your research findings, analysis, or technical proposals as regular text. Then use `AskUserQuestion` for the actual questions. NEVER put questions in your text output — they MUST go through `AskUserQuestion`. At rung 2\u002F3, follow the Interaction Capability Ladder.\n\n**Pacing:** Present 1-2 decision areas per `AskUserQuestion` call and STOP to wait for the user's response before continuing. After receiving answers, probe deeper on anything incomplete before moving to the next topic. Signal progress in your text before the next question batch. Do NOT dump all decision areas in a single message — the interview is a conversation, not a document.\n\n**First message pattern:** Output the research summary as text, then use `AskUserQuestion` to confirm the stack and ask about the first decision area (typically package\u002Fmodule structure). Wait for the user to respond before proceeding to subsequent areas.\n\n**Question strategies** (use these as content for `AskUserQuestion`, not as inline prose). Follow the **Decision Support** protocol in `references\u002Fshared-conventions.md` — this interview is the richest decision surface in the pipeline, so don't just list options; lead with a recommended approach, put the trade-off in each option's description, and give a one-line rationale:\n- For each PRD requirement, propose a technical approach **with its trade-off and your recommendation**, then ask for confirmation or alternatives — don't present competing approaches flatly. You've just researched the codebase; spend that research here.\n- Recommend approaches consistent with the established stack, and say *why* the convention favors it (evidence-backed mode). Where the choice is genuine taste (e.g. folder layout, naming), give a default but flag it as preference.\n- Challenge over-engineering: does the feature need this, or is a simpler approach sufficient? Frame the simpler option's trade-off (less flexibility now vs. less to maintain).\n- Ask about every integration point and how the feature interacts with existing modules.\n- For competing module structures or code-shape choices, use the `AskUserQuestion` `preview` field to show the candidates side-by-side.\n\n**Parking lot:** If the user raises a concern that belongs to a different pipeline stage (e.g., backlog granularity, documentation format), acknowledge it and persist it **immediately, at the moment it is raised** — never deferred to stage closure — by running `state-note` (fenced immediately below) with a concise one-line statement of the concern, then say \"Good point — I've noted that for the [specs\u002Fbacklog\u002Fdocs stage]. Let's continue with the tech spec.\" Add `--epic \"{epic}\"` to that call when this feature is an epic member — required, per the Pipeline State Protocol in `references\u002Fshared-conventions.md`; omitting it for a member is an error and must never fall back to a same-named flat feature. `state-note` **overwrites** the single top-level `notes` string rather than appending, so when a note already exists, read the current `notes` value out of the feature's `.pipeline-state.json` first and pass one combined concise string in a single `--note` — never edit or round-trip the JSON by hand. This interview-time call is separate from the optional completion note in Step 6 and must not be folded into it. If the call exits 2, surface the `Error:` line verbatim with the named feature (and epic) and the recovery instruction, and **stop claiming the concern was recorded** — it was not. The full recipe is single-sourced as **Immediate Downstream Note (Parking Lot)** in `references\u002Fshared-conventions.md`.\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\" state-note \\\n  --feature \"{feature}\" --note \"\u003Cconcise downstream concern>\" \\\n  --specs-dir \"{specsDir}\"\n```\n\n**Epic-level concern (backflow):** The parking lot above is for concerns about a *later stage of THIS feature*. If instead the design reveals the **epic decomposition itself** is wrong — a **sibling feature must be added**, a **frozen boundary between features must move**, a feature must **split**, or a **dependency edge is wrong** — that is an *epic-level* concern and does **not** go in `notes`. It only applies when this feature is an epic member (its `.pipeline-state.json` has an `epic` back-pointer); for a standalone feature there is no epic to reconcile. To record one, run `state-ecr` (fenced below) with `--kind` (`add-feature`|`redep`|`move-boundary`|`split`), `--target`, `--rationale`, `--raised-by forge-2-tech` and `--blocks-current` — it appends the entry to the member state's `epicChangeRequests[]` array, filling in `raisedAt` (ISO-8601 UTC) and `status: \"open\"` for you. Set `blocksCurrent: true` when the change alters a contract (`exposes`\u002F`consumes`) or dependency edge this feature relies on for its *next* stage — proceeding to specs would build on a soon-to-change decomposition (this is the point of no cheap return, so bias toward `true`); `false` for a peer\u002Fdownstream change this feature does not consume. When a contract\u002Fdep edge is touched and the classification is ambiguous, confirm `blocksCurrent` with a single `AskUserQuestion`, defaulting to `true`. **Do not** edit `epic-manifest.json` here — recording is not applying; only `\u002Ffeature-forge:forge-0-epic` edit mode mutates the epic. Then acknowledge without blocking and continue the tech spec.\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\" state-ecr \\\n  --feature \"{feature}\" --epic \"{epic}\" --kind \"\u003Ckind>\" --target \"\u003Ctarget>\" \\\n  --rationale \"\u003Cwhy>\" --raised-by forge-2-tech --blocks-current \"\u003Ctrue|false>\" \\\n  --specs-dir \"{specsDir}\"\n```\n\n### Key Decision Areas to Cover\n\nWork through these areas across multiple turns, grouping related areas (1-2 per message):\n\n- **Package\u002Fmodule structure**: Where does this live in the project? What are its exports? (For non-monorepo projects, this becomes module organization — where the code lives, how it's organized, and what its exports are.)\n- **Data model**: What are the key entities, their schemas, and storage approach?\n- **API design**: What endpoints or interfaces does this expose?\n- **Dependencies**: What external and internal packages are needed?\n- **Patterns**: Which established patterns from the codebase apply here?\n- **Error handling**: How are errors surfaced, propagated, and recovered from?\n- **Testing strategy**: Unit, integration, e2e — what approach for this feature?\n- **Configuration**: What's configurable? How is it configured?\n- **Migration\u002Fdeployment**: Any special rollout considerations?\n\n### Requirement Traceability\n\nEvery technical decision MUST reference the PRD requirement(s) it addresses. Use the format:\n\n```\n### JWT-based Session Tokens (REQ-AUTH-01, REQ-SEC-02)\nSessions will use signed JWT tokens with...\n```\n\nIf you find yourself writing a technical section that doesn't trace to any PRD requirement, STOP and ask: \"I'm about to specify X, but I can't find a PRD requirement for it. Should we add one, or is this unnecessary?\"\n\n## Step 4: Integration Analysis (Required)\n\nBefore finalizing the tech spec, this section is MANDATORY:\n\n1. List every existing package this feature depends on\n2. List every existing package that will need to import from this feature\n3. For each integration point, document:\n   - Which types or contracts are shared\n   - How data flows between packages\n   - Any patterns established by existing code that must be followed\n   - The EXACT function signatures and import paths verified from source code. If you cannot locate an expected export, note explicitly: \"WARNING: Could not locate X export in {module} — verify this exists before implementing.\"\n4. Check for potential conflicts with in-progress features (other spec directories)\n\n## Step 5: Write the Tech Spec\n\nWrite `{resolvedFeatureDir}\u002Ftech-spec.md` with this structure:\n\n```markdown\n# {Feature Name} — Technical Specification\n\n## 1. Overview\nBrief technical summary and key architectural decisions.\n\n## 2. Module Structure\nProject location, directory layout, public API surface.\n\n## 3. Technical Decisions\n### 3.1 {Decision Area} (REQ-XXX-NN)\nDecision, rationale, alternatives considered.\n\n## 4. Data Model\nSchemas, types, storage approach.\n\n## 5. API Design\nEndpoints, interfaces, contracts.\n\n## 6. Integration Points\nHow this feature connects to existing packages.\n\n## 7. Error Handling\nError types, propagation, recovery.\n\n## 8. Testing Approach\nStrategy, tooling, coverage targets.\n\n## 9. Dependencies\nExternal packages, internal packages, version constraints.\n\n## 10. Open Technical Questions\nUnresolved technical decisions.\n```\n\n## Step 6: Review with User\n\nThis is a **blocking review** — per the **Stage Review Gate** in `references\u002Fshared-conventions.md`, do not proceed until the user confirms.\n\nPresent the complete tech spec. Ask:\n- \"Does this capture all the technical decisions correctly?\"\n- \"Any patterns from the existing codebase I missed?\"\n- \"Are the integration points complete?\"\n\nUse `AskUserQuestion` to collect this feedback.\n\n## Step 7: Update Pipeline State and Commit\n\nBefore writing state or running the stage exit, invoke the **Stage-Completion Re-check** block in `references\u002Fshared-conventions.md` with `{stage}` = `forge-2-tech` — a resumed mid-stage continuation must not overwrite a committed `tech-spec.md` or re-fire a finished exit.\n\nPipeline state is written by the `state-*` verbs — see the Pipeline State Protocol in `references\u002Fshared-conventions.md`.\n\n1. Record completion by running `state-complete` (below) with `--version`, one `--artifact` per file this stage produced, and `--based-on forge-1-prd=\u003Ccurrent forge-1-prd version>`. It sets `status: \"complete\"`, `completedAt`, the version and `basedOnVersions`, and applies the downstream staleness cascade deterministically, so no downstream status is set by hand.\n2. **Offer a note — don't force one.** As a statement (not a blocking question), let the user know they can jot anything worth preserving across sessions and you'll store it in the `notes` field. If they volunteer something, store it via `state-note` — it **overwrites** the single `notes` string (latest note wins), so fold any still-relevant existing note into the one combined string; otherwise proceed. The next stage's Step 1 reads and surfaces this note.\n3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references\u002Fshared-conventions.md`: stage files, attempt commit with message `\"{commitPrefix}({feature}): complete tech-spec v{n}\"` (marking `stages.forge-2-tech.status` `complete` with `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success. If commit fails, leave status as `in-progress`.\n4. **Close with the Stage Exit Protocol** (single-sourced in `references\u002Fstage-exit-protocol.md`; do not improvise a \"Next steps\" list):\n\nThe `state-complete` call for item 1 — and the `state-note` call only when the user volunteered a note in item 2 — with the portable plugin-root prelude. Add `--epic \"{epic}\"` to each call when this feature is an epic member — required, per the Pipeline State Protocol in `references\u002Fshared-conventions.md`:\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\" state-complete \\\n  --feature \"{feature}\" --stage forge-2-tech --version {n} \\\n  --based-on \"forge-1-prd=\u003Cn>\" --artifact tech-spec.md --specs-dir \"{specsDir}\"\n# ONLY run the next call if the user volunteered a note in item 2 — otherwise stop here.\npython3 \"$R\u002Fscripts\u002Fforge-session.py\" state-note \\\n  --feature \"{feature}\" --note \"\u003Cwhat the user volunteered>\" --specs-dir \"{specsDir}\"\n```\n\n**Determine `--verify-capability` before running the exit** per **Host and capability determination** in `references\u002Fstage-exit-protocol.md` (summarized under **Verify Capability** in `references\u002Fshared-conventions.md`): pass `interactive` only when a question mechanism equivalent to `AskUserQuestion` is available **and** dispatching a clean-room `forge-verifier` is *permitted* (the test is \"may I dispatch right now\", not tool presence) — otherwise `manual`. That reference owns the full rule, including why a consent-only bar is still `interactive` and the `none`-gate consent variant. Add `--epic \"{epic}\"` to the call below when this feature is an epic member.\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 \"{feature}\" --stage forge-2-tech --specs-dir \"{specsDir}\" --host claude --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## Gotchas\n\n- Don't duplicate the PRD. The tech spec answers HOW, not WHAT. If you find yourself restating requirements, reference them by ID instead.\n- When the user's stack decisions differ from what you'd recommend, document their choice AND note your concern as an \"Alternatives Considered\" item — don't silently override their preference.\n- Integration points are the #1 source of implementation surprises. Spend extra time here. Read the actual code of packages this feature touches, don't just guess at their APIs.\n- If the existing codebase has inconsistent patterns (it happens), call it out and ask which pattern should be followed for this feature.\n",{"name":5,"description":7,"argument-hint":23},"\u003Cfeature-name>","main","ce0d6d40bba1d87039b0397041d15cb56c934037","adapters\u002Fclaude\u002Fskills\u002Fforge-2-tech","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":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add garygentry\u002Ffeature-forge --skill forge-2-tech",{"tool":37,"command":38},"bunx","bunx skills add garygentry\u002Ffeature-forge --skill forge-2-tech",{"tool":40,"command":41},"pnpm","pnpm dlx skills add garygentry\u002Ffeature-forge --skill forge-2-tech","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002FSKILL.md",true,[45,51,55,59,63,67,71,75,79],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fshared-conventions.md","REFERENCE","参考文档",74013,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fshared-conventions.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fstack-discovery-checklist.md",3630,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstack-discovery-checklist.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fstack-resolution.md",3020,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstack-resolution.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fstacks\u002F_generic.md",5709,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstacks\u002F_generic.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fstacks\u002Fgo.md",8684,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstacks\u002Fgo.md",{"path":68,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fstacks\u002Fpython.md",8212,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstacks\u002Fpython.md",{"path":72,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fstacks\u002Frust.md",9621,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstacks\u002Frust.md",{"path":76,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fstacks\u002Ftypescript.md",6648,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstacks\u002Ftypescript.md",{"path":80,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fstage-exit-protocol.md",35663,"https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Fadapters\u002Fclaude\u002Fskills\u002Fforge-2-tech\u002Freferences\u002Fstage-exit-protocol.md",[84,91,96,102,107,113],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"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":92,"name":86,"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":93,"categories":94,"keywords":95,"publishedAt":18},"01M75H8QXKFS116EF1009KB3CY","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-malformed\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":97,"name":86,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"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":103,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M75H8MAV261C8QJ4S8CGRHV5","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-crlf\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":108,"name":86,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M75H8KDW98YF0PBHPD5V1GKR","foo: bar","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-colon-value\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":114,"name":86,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M75H8JFYFCGYNRCRTS4PMKKX","A valid description.","https:\u002F\u002Fgithub.com\u002Fgarygentry\u002Ffeature-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Freader-blank-lines\u002Fskills\u002Falpha\u002FSKILL.md",[],[]]