@garygentry/feature-forge 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/adapters/GENERATION-REPORT.md +128 -0
- package/adapters/claude/agents/forge-researcher.md +137 -0
- package/adapters/claude/agents/forge-spec-writer.md +115 -0
- package/adapters/claude/agents/forge-verifier.md +121 -0
- package/adapters/claude/references/epic-manifest-schema.json +120 -0
- package/adapters/claude/references/forge-config-schema.json +166 -0
- package/adapters/claude/references/pipeline-state-schema.json +110 -0
- package/adapters/claude/references/portable-root.md +56 -0
- package/adapters/claude/references/process-overview.md +123 -0
- package/adapters/claude/references/ralph-loop-contract.md +221 -0
- package/adapters/claude/references/shared-conventions.md +144 -0
- package/adapters/claude/references/skill-frontmatter.schema.json +17 -0
- package/adapters/claude/references/stack-resolution.md +51 -0
- package/adapters/claude/references/stacks/_generic.md +90 -0
- package/adapters/claude/references/stacks/go.md +138 -0
- package/adapters/claude/references/stacks/python.md +163 -0
- package/adapters/claude/references/stacks/rust.md +151 -0
- package/adapters/claude/references/stacks/typescript.md +111 -0
- package/adapters/claude/references/vendor-construct-inventory.md +49 -0
- package/adapters/claude/scripts/forge-root.sh +50 -0
- package/adapters/claude/skills/forge/SKILL.md +165 -0
- package/adapters/claude/skills/forge-0-epic/SKILL.md +303 -0
- package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/claude/skills/forge-1-prd/SKILL.md +121 -0
- package/adapters/claude/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/claude/skills/forge-2-tech/SKILL.md +198 -0
- package/adapters/claude/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/claude/skills/forge-3-specs/SKILL.md +154 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/claude/skills/forge-4-backlog/SKILL.md +146 -0
- package/adapters/claude/skills/forge-5-loop/SKILL.md +303 -0
- package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/claude/skills/forge-6-docs/SKILL.md +179 -0
- package/adapters/claude/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/claude/skills/forge-fix/SKILL.md +65 -0
- package/adapters/claude/skills/forge-init/SKILL.md +29 -0
- package/adapters/claude/skills/forge-verify/SKILL.md +219 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/codex/agents/forge-researcher.md +133 -0
- package/adapters/codex/agents/forge-spec-writer.md +112 -0
- package/adapters/codex/agents/forge-verifier.md +115 -0
- package/adapters/codex/agents/openai.yaml +10 -0
- package/adapters/codex/references/epic-manifest-schema.json +120 -0
- package/adapters/codex/references/forge-config-schema.json +166 -0
- package/adapters/codex/references/pipeline-state-schema.json +110 -0
- package/adapters/codex/references/portable-root.md +56 -0
- package/adapters/codex/references/process-overview.md +123 -0
- package/adapters/codex/references/ralph-loop-contract.md +221 -0
- package/adapters/codex/references/shared-conventions.md +144 -0
- package/adapters/codex/references/skill-frontmatter.schema.json +17 -0
- package/adapters/codex/references/stack-resolution.md +51 -0
- package/adapters/codex/references/stacks/_generic.md +90 -0
- package/adapters/codex/references/stacks/go.md +138 -0
- package/adapters/codex/references/stacks/python.md +163 -0
- package/adapters/codex/references/stacks/rust.md +151 -0
- package/adapters/codex/references/stacks/typescript.md +111 -0
- package/adapters/codex/references/vendor-construct-inventory.md +49 -0
- package/adapters/codex/scripts/forge-root.sh +50 -0
- package/adapters/codex/skills/forge/forge.md +164 -0
- package/adapters/codex/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/codex/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/codex/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/codex/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/codex/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/codex/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/codex/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/codex/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/codex/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/codex/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/codex/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/codex/skills/forge-init/forge-init.md +29 -0
- package/adapters/codex/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/copilot/agents/forge-researcher.md +133 -0
- package/adapters/copilot/agents/forge-spec-writer.md +112 -0
- package/adapters/copilot/agents/forge-verifier.md +115 -0
- package/adapters/copilot/references/epic-manifest-schema.json +120 -0
- package/adapters/copilot/references/forge-config-schema.json +166 -0
- package/adapters/copilot/references/pipeline-state-schema.json +110 -0
- package/adapters/copilot/references/portable-root.md +56 -0
- package/adapters/copilot/references/process-overview.md +123 -0
- package/adapters/copilot/references/ralph-loop-contract.md +221 -0
- package/adapters/copilot/references/shared-conventions.md +144 -0
- package/adapters/copilot/references/skill-frontmatter.schema.json +17 -0
- package/adapters/copilot/references/stack-resolution.md +51 -0
- package/adapters/copilot/references/stacks/_generic.md +90 -0
- package/adapters/copilot/references/stacks/go.md +138 -0
- package/adapters/copilot/references/stacks/python.md +163 -0
- package/adapters/copilot/references/stacks/rust.md +151 -0
- package/adapters/copilot/references/stacks/typescript.md +111 -0
- package/adapters/copilot/references/vendor-construct-inventory.md +49 -0
- package/adapters/copilot/scripts/forge-root.sh +50 -0
- package/adapters/copilot/skills/forge/forge.md +164 -0
- package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/copilot/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/copilot/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/copilot/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/copilot/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/copilot/skills/forge-init/forge-init.md +29 -0
- package/adapters/copilot/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/cursor/agents/forge-researcher.mdc +134 -0
- package/adapters/cursor/agents/forge-spec-writer.mdc +113 -0
- package/adapters/cursor/agents/forge-verifier.mdc +116 -0
- package/adapters/cursor/references/epic-manifest-schema.json +120 -0
- package/adapters/cursor/references/forge-config-schema.json +166 -0
- package/adapters/cursor/references/pipeline-state-schema.json +110 -0
- package/adapters/cursor/references/portable-root.md +56 -0
- package/adapters/cursor/references/process-overview.md +123 -0
- package/adapters/cursor/references/ralph-loop-contract.md +221 -0
- package/adapters/cursor/references/shared-conventions.md +144 -0
- package/adapters/cursor/references/skill-frontmatter.schema.json +17 -0
- package/adapters/cursor/references/stack-resolution.md +51 -0
- package/adapters/cursor/references/stacks/_generic.md +90 -0
- package/adapters/cursor/references/stacks/go.md +138 -0
- package/adapters/cursor/references/stacks/python.md +163 -0
- package/adapters/cursor/references/stacks/rust.md +151 -0
- package/adapters/cursor/references/stacks/typescript.md +111 -0
- package/adapters/cursor/references/vendor-construct-inventory.md +49 -0
- package/adapters/cursor/scripts/forge-root.sh +50 -0
- package/adapters/cursor/skills/forge/forge.mdc +165 -0
- package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +303 -0
- package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +121 -0
- package/adapters/cursor/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +198 -0
- package/adapters/cursor/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +154 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +146 -0
- package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +303 -0
- package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +179 -0
- package/adapters/cursor/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/cursor/skills/forge-fix/forge-fix.mdc +65 -0
- package/adapters/cursor/skills/forge-init/forge-init.mdc +30 -0
- package/adapters/cursor/skills/forge-verify/forge-verify.mdc +219 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/gemini/agents/forge-researcher.md +133 -0
- package/adapters/gemini/agents/forge-spec-writer.md +112 -0
- package/adapters/gemini/agents/forge-verifier.md +115 -0
- package/adapters/gemini/gemini-extension.json +54 -0
- package/adapters/gemini/references/epic-manifest-schema.json +120 -0
- package/adapters/gemini/references/forge-config-schema.json +166 -0
- package/adapters/gemini/references/pipeline-state-schema.json +110 -0
- package/adapters/gemini/references/portable-root.md +56 -0
- package/adapters/gemini/references/process-overview.md +123 -0
- package/adapters/gemini/references/ralph-loop-contract.md +221 -0
- package/adapters/gemini/references/shared-conventions.md +144 -0
- package/adapters/gemini/references/skill-frontmatter.schema.json +17 -0
- package/adapters/gemini/references/stack-resolution.md +51 -0
- package/adapters/gemini/references/stacks/_generic.md +90 -0
- package/adapters/gemini/references/stacks/go.md +138 -0
- package/adapters/gemini/references/stacks/python.md +163 -0
- package/adapters/gemini/references/stacks/rust.md +151 -0
- package/adapters/gemini/references/stacks/typescript.md +111 -0
- package/adapters/gemini/references/vendor-construct-inventory.md +49 -0
- package/adapters/gemini/scripts/forge-root.sh +50 -0
- package/adapters/gemini/skills/forge/forge.md +164 -0
- package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/gemini/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/gemini/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/gemini/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/gemini/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/gemini/skills/forge-init/forge-init.md +29 -0
- package/adapters/gemini/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +379 -0
- package/dist/agent-targets.d.ts +70 -0
- package/dist/agent-targets.js +111 -0
- package/dist/apply.d.ts +49 -0
- package/dist/apply.js +246 -0
- package/dist/cli.d.ts +94 -0
- package/dist/cli.js +508 -0
- package/dist/detect.d.ts +45 -0
- package/dist/detect.js +72 -0
- package/dist/fsutil.d.ts +56 -0
- package/dist/fsutil.js +175 -0
- package/dist/hash.d.ts +50 -0
- package/dist/hash.js +107 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/manifest.d.ts +72 -0
- package/dist/manifest.js +222 -0
- package/dist/plan.d.ts +66 -0
- package/dist/plan.js +166 -0
- package/dist/rauf.d.ts +83 -0
- package/dist/rauf.js +118 -0
- package/dist/report.d.ts +35 -0
- package/dist/report.js +110 -0
- package/dist/source.d.ts +69 -0
- package/dist/source.js +164 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.js +57 -0
- package/package.json +42 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
# GENERATED — DO NOT EDIT. Source: skills/forge-1-prd/SKILL.md. Regenerate: python3 scripts/build-adapters.py
|
|
3
|
+
name: forge-1-prd
|
|
4
|
+
description: Create a requirements PRD for a feature through structured interview. Use when user runs /feature-forge:forge-1-prd or explicitly asks to start the forge pipeline for a new feature. Do NOT trigger for general requirements discussions, project scoping outside forge, or PRD questions unrelated to the forge pipeline.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# forge-1-prd — Requirements Interviewer
|
|
8
|
+
|
|
9
|
+
Create a thorough, requirements-only PRD through relentless structured interviewing. The PRD captures WHAT the feature must do, not HOW it will be built.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
|
|
14
|
+
|
|
15
|
+
## Step 1: Read Configuration and Check State
|
|
16
|
+
|
|
17
|
+
### Branch Setup (if using git)
|
|
18
|
+
If `gitCommitAfterStage` is true and the project uses git, use `AskUserQuestion` to offer: "Want me to create a `forge/{feature}` branch for this pipeline? (Recommended — keeps forge work isolated.)" If yes, create and checkout the branch before proceeding.
|
|
19
|
+
|
|
20
|
+
Set the working directory by invoking the **Feature Directory Resolution** block in `references/shared-conventions.md`, which yields `{resolvedFeatureDir}`. Note one PRD-specific caveat: at PRD time a brand-new standalone feature may have NO directory yet, so resolution is expected to fail `not-found` for a never-started standalone feature — in that case forge-1 creates `{specsDir}/{feature}/` as today. For an epic member the directory already exists (created empty by forge-0-epic with an `epic` back-pointer), so resolution succeeds and yields the nested path.
|
|
21
|
+
|
|
22
|
+
If `.pipeline-state.json` exists for this feature and `forge-1-prd` is already marked complete, use `AskUserQuestion` to warn: "A PRD already exists for '{feature}'. Continuing will create a new version. Proceed?"
|
|
23
|
+
|
|
24
|
+
## Step 2: Examine Existing Context
|
|
25
|
+
|
|
26
|
+
Before starting the interview, invoke the **Epic Context Injection** block in `references/shared-conventions.md`. This block self-gates: it skips entirely if the feature has no `epic` back-pointer, so standalone behavior is unchanged. If this feature is an epic member, the injected charter's `exposes`/`consumes` are requirement inputs — every contract obligation must appear as a REQ in the PRD.
|
|
27
|
+
|
|
28
|
+
1. **Check the project structure**: Read the project's build configuration and dependency manifests to understand what modules/packages exist. Look for `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `pom.xml`, workspace configs, or equivalent.
|
|
29
|
+
2. **Check existing specs**: Look at `{specsDir}/` for other features' PRDs to understand conventions and the overall system
|
|
30
|
+
3. **Check existing docs**: Look at the docs directory for architecture documentation
|
|
31
|
+
4. **Note integration surfaces**: Identify which existing packages might be relevant to this feature
|
|
32
|
+
|
|
33
|
+
This context helps you ask informed questions and spot gaps the user might not think of.
|
|
34
|
+
|
|
35
|
+
## Step 3: Conduct the Interview
|
|
36
|
+
|
|
37
|
+
Interview the user relentlessly. Your goal is to extract complete, unambiguous requirements.
|
|
38
|
+
|
|
39
|
+
Read `references/prd-template.md` for the interview structure and question categories. Cover every category. Don't rush — missing a requirement now costs 10x to fix later.
|
|
40
|
+
|
|
41
|
+
### CRITICAL GUARDRAIL: No Technology Decisions
|
|
42
|
+
|
|
43
|
+
The PRD is EXCLUSIVELY about requirements. You MUST enforce this boundary:
|
|
44
|
+
|
|
45
|
+
**When the user says something like:**
|
|
46
|
+
- "I want to use Zod for validation" → Capture as: "Runtime schema validation with type inference is required." Note their Zod preference as a constraint but not a requirement.
|
|
47
|
+
- "We'll store it in Drizzle/PostgreSQL" → Capture as: "Persistent storage required for X data with Y query patterns."
|
|
48
|
+
- "I want a React component that..." → Capture as: "A user interface is required that allows users to..."
|
|
49
|
+
- "We should use WebSockets for..." → Capture as: "Real-time updates are required when X changes, with latency under Y."
|
|
50
|
+
- "I want a REST API" → Capture as: "An HTTP-accessible interface is required for X operations"
|
|
51
|
+
- "We need a microservice for X" → Capture as: "X must be independently deployable and scalable"
|
|
52
|
+
- "Use a queue for Y" → Capture as: "Y must be processed asynchronously with guaranteed delivery"
|
|
53
|
+
|
|
54
|
+
**When YOU start drifting into technology:**
|
|
55
|
+
If you catch yourself writing about specific libraries, API designs, database schemas, or implementation patterns — STOP. Ask yourself: "Is this a requirement or an implementation choice?" Rewrite it as the underlying requirement.
|
|
56
|
+
|
|
57
|
+
**The one exception:** When a technology choice IS the requirement (e.g., "must integrate with the existing @repo/auth package" or "must work with our Hono backend"). These are constraints, and they belong in the Constraints section of the PRD, clearly labeled as such.
|
|
58
|
+
|
|
59
|
+
A technology constraint is valid when it stems from organizational mandate, existing infrastructure, or team expertise — not from preference. Ask "Why must it be X specifically?" If the answer is "because we already run X in production," that's a legitimate constraint. If the answer is "because it's fast," capture the performance requirement instead.
|
|
60
|
+
|
|
61
|
+
### Interview Approach
|
|
62
|
+
|
|
63
|
+
**Turn structure:** Output your analysis or context as regular text, then use `AskUserQuestion` for the actual questions. NEVER put questions in your text output — they MUST go through `AskUserQuestion`.
|
|
64
|
+
|
|
65
|
+
**Pacing:** Cover one topic area at a time, asking 2-3 related questions per `AskUserQuestion` call. After receiving answers, probe deeper on anything incomplete before moving to the next topic. Signal progress in your text before the next question batch.
|
|
66
|
+
|
|
67
|
+
**Question strategies** (use these as content for `AskUserQuestion`, not as inline prose):
|
|
68
|
+
- Probe deeper after each answer: failure modes, stakeholders, minimum viable version
|
|
69
|
+
- Challenge assumptions: which users specifically, what does "fast" mean quantitatively
|
|
70
|
+
- Identify edge cases: empty input, concurrent access, scale
|
|
71
|
+
- Capture non-functional requirements: performance, security, accessibility, observability
|
|
72
|
+
- Ask about what's OUT of scope — as important as what's in scope
|
|
73
|
+
|
|
74
|
+
**Completion criteria:** The interview is complete when:
|
|
75
|
+
1. Every category in `references/prd-template.md` has been covered with at least one question
|
|
76
|
+
2. The user has confirmed there's nothing else to add
|
|
77
|
+
3. You can draft every PRD section without leaving TBD placeholders
|
|
78
|
+
|
|
79
|
+
Before moving to Step 4, summarize your coverage as text, then use `AskUserQuestion` to ask: "Anything I'm missing?"
|
|
80
|
+
|
|
81
|
+
**Parking lot:** If the user raises a concern that belongs to a different pipeline stage, acknowledge it and note it in the pipeline state's `notes` field: "Good point — I've noted that for the [tech spec/implementation specs]. Let's continue with [current stage]."
|
|
82
|
+
|
|
83
|
+
## Step 4: Write the PRD
|
|
84
|
+
|
|
85
|
+
Once the interview is thorough, write `{resolvedFeatureDir}/PRD.md` following the structure in `references/prd-template.md`.
|
|
86
|
+
|
|
87
|
+
Every requirement MUST have a unique ID (e.g., REQ-AUTH-01, REQ-PERF-01). These IDs are referenced by all downstream documents.
|
|
88
|
+
|
|
89
|
+
## Step 5: Review with User
|
|
90
|
+
|
|
91
|
+
Present the complete PRD to the user. Ask:
|
|
92
|
+
- "Does this capture everything? Any requirements missing?"
|
|
93
|
+
- "Are the priorities correct?"
|
|
94
|
+
- "Anything in here that should be out of scope?"
|
|
95
|
+
|
|
96
|
+
Use `AskUserQuestion` to collect this feedback.
|
|
97
|
+
|
|
98
|
+
Iterate until the user confirms the PRD is complete.
|
|
99
|
+
|
|
100
|
+
## Step 6: Update Pipeline State and Commit
|
|
101
|
+
|
|
102
|
+
Write pipeline state conforming to `references/pipeline-state-schema.json`.
|
|
103
|
+
|
|
104
|
+
1. Create or update `{resolvedFeatureDir}/.pipeline-state.json`:
|
|
105
|
+
- Set `currentStage` to `forge-2-tech`
|
|
106
|
+
- Set `stages.forge-1-prd.version` to 1 (or increment if revising)
|
|
107
|
+
- Record `artifacts`, `completedAt`
|
|
108
|
+
- Set `stages.forge-1-prd.basedOnVersions` to `{}` (no upstream dependencies)
|
|
109
|
+
- Check downstream stages (`forge-2-tech`, `forge-3-specs`, `forge-4-backlog`, `forge-5-loop`, `forge-6-docs`). If any have `basedOnVersions` referencing an older version of `forge-1-prd`, set their status to `stale`.
|
|
110
|
+
2. Use `AskUserQuestion` to ask: "Anything you want to note before we wrap? (preserved across sessions)"
|
|
111
|
+
- If yes, store in the `notes` field
|
|
112
|
+
3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files, attempt commit with message `"{commitPrefix}({feature}): complete PRD v{n}"`, then set `stages.forge-1-prd.status` to `complete` with commit hash only on success. If commit fails, leave status as `in-progress`.
|
|
113
|
+
5. Tell the user: "PRD complete. Next steps:\n - `/feature-forge:forge-verify {feature}` to verify the PRD\n - `/feature-forge:forge-2-tech {feature}` to start the tech spec\n - `/feature-forge:forge {feature}` to see full pipeline status"
|
|
114
|
+
|
|
115
|
+
## Gotchas
|
|
116
|
+
|
|
117
|
+
- Users often front-load their feature description with tech decisions because that's how engineers think. Gently but firmly redirect to requirements. Don't be preachy about it — just reframe what they said.
|
|
118
|
+
- If the user provides a very detailed initial description, don't skip the interview. Use their description as a starting point but probe for what's missing. Long descriptions often have big gaps in edge cases and non-functional requirements.
|
|
119
|
+
- Don't number requirements sequentially across categories (REQ-01, REQ-02...). Use category prefixes (REQ-AUTH-01, REQ-PERF-01) so inserting new requirements doesn't require renumbering.
|
|
120
|
+
- The PRD should be readable by a non-technical stakeholder. If a section requires deep technical knowledge to understand, it probably belongs in the tech spec, not the PRD.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# PRD Template and Interview Guide
|
|
2
|
+
|
|
3
|
+
This reference defines the standard PRD structure and the interview questions to cover for each section.
|
|
4
|
+
|
|
5
|
+
## PRD Document Structure
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# {Feature Name} — Product Requirements Document
|
|
9
|
+
|
|
10
|
+
## 1. Problem Statement
|
|
11
|
+
What problem does this feature solve? Who has this problem? Why does it matter now?
|
|
12
|
+
|
|
13
|
+
## 2. User Stories
|
|
14
|
+
As a [role], I want [capability], so that [benefit].
|
|
15
|
+
- Include primary actors and secondary actors
|
|
16
|
+
- Include admin/operator stories, not just end-user stories
|
|
17
|
+
|
|
18
|
+
## 3. Functional Requirements
|
|
19
|
+
|
|
20
|
+
### 3.1 {Capability Area}
|
|
21
|
+
- REQ-{CAT}-01: {Requirement description}
|
|
22
|
+
- Priority: P0 (must have) | P1 (should have) | P2 (nice to have)
|
|
23
|
+
- Notes: {Any clarification}
|
|
24
|
+
|
|
25
|
+
### 3.2 {Another Capability Area}
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
## 4. Non-Functional Requirements
|
|
29
|
+
|
|
30
|
+
### 4.1 Performance
|
|
31
|
+
- REQ-PERF-01: ...
|
|
32
|
+
|
|
33
|
+
### 4.2 Security
|
|
34
|
+
- REQ-SEC-01: ...
|
|
35
|
+
|
|
36
|
+
### 4.3 Observability
|
|
37
|
+
- REQ-OBS-01: ...
|
|
38
|
+
|
|
39
|
+
### 4.4 Accessibility
|
|
40
|
+
- REQ-A11Y-01: ...
|
|
41
|
+
|
|
42
|
+
### 4.5 Scalability
|
|
43
|
+
- REQ-SCALE-01: ...
|
|
44
|
+
|
|
45
|
+
## 5. Constraints
|
|
46
|
+
Technical, organizational, or external constraints that must be respected.
|
|
47
|
+
(This is where technology mandates go — e.g., "must integrate with existing @repo/auth package")
|
|
48
|
+
|
|
49
|
+
## 6. Out of Scope
|
|
50
|
+
Explicitly list what this feature will NOT do in this version.
|
|
51
|
+
|
|
52
|
+
## 7. Open Questions
|
|
53
|
+
Unresolved items that need answers before or during implementation.
|
|
54
|
+
|
|
55
|
+
## 8. Success Criteria
|
|
56
|
+
How do we know this feature is done and working correctly?
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Interview Question Categories
|
|
60
|
+
|
|
61
|
+
Cover ALL of these areas during the interview. Don't move on until each is addressed.
|
|
62
|
+
|
|
63
|
+
### Core Understanding
|
|
64
|
+
- What is the feature in one sentence?
|
|
65
|
+
- Who are the primary users? Secondary users? Admins/operators?
|
|
66
|
+
- What workflow or process does this support?
|
|
67
|
+
- What exists today that this replaces or augments?
|
|
68
|
+
|
|
69
|
+
### Functional Depth
|
|
70
|
+
- Walk me through the happy path end to end
|
|
71
|
+
- What are the key data entities involved?
|
|
72
|
+
- What inputs does the system accept? What are valid/invalid inputs?
|
|
73
|
+
- What outputs does the system produce?
|
|
74
|
+
- What states can things be in? What transitions are allowed?
|
|
75
|
+
- What happens when the user makes a mistake?
|
|
76
|
+
|
|
77
|
+
### Error and Edge Cases
|
|
78
|
+
- What happens when X is unavailable?
|
|
79
|
+
- What if two users do Y at the same time?
|
|
80
|
+
- What happens with empty inputs? Huge inputs? Malformed inputs?
|
|
81
|
+
- What does partial failure look like?
|
|
82
|
+
- How should the system recover from crashes mid-operation?
|
|
83
|
+
|
|
84
|
+
### Integration
|
|
85
|
+
- What existing parts of the system does this interact with?
|
|
86
|
+
- What data does it need from other features?
|
|
87
|
+
- What data does it provide to other features?
|
|
88
|
+
- Are there external systems or APIs involved?
|
|
89
|
+
|
|
90
|
+
### Non-Functional
|
|
91
|
+
- What's the expected load? (requests/sec, concurrent users, data volume)
|
|
92
|
+
- What are the latency requirements?
|
|
93
|
+
- What security considerations exist? (authn, authz, data sensitivity)
|
|
94
|
+
- What needs to be logged, monitored, or alerted on?
|
|
95
|
+
- Are there accessibility requirements?
|
|
96
|
+
|
|
97
|
+
### Scope and Priority
|
|
98
|
+
- What's the minimum viable version of this?
|
|
99
|
+
- What would you cut if you had to ship in half the time?
|
|
100
|
+
- What's explicitly NOT part of this feature?
|
|
101
|
+
- Are there follow-up features that depend on decisions made here?
|
|
102
|
+
|
|
103
|
+
### Success
|
|
104
|
+
- How do you know this feature is working correctly?
|
|
105
|
+
- What would a user complain about if we got it wrong?
|
|
106
|
+
- Are there quantitative targets? (latency < Xms, uptime > Y%)
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
# GENERATED — DO NOT EDIT. Source: skills/forge-2-tech/SKILL.md. Regenerate: python3 scripts/build-adapters.py
|
|
3
|
+
name: forge-2-tech
|
|
4
|
+
description: Create a technical specification from an existing PRD in the forge pipeline. Use when user runs /feature-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.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# forge-2-tech — Technical Specification Driver
|
|
8
|
+
|
|
9
|
+
Create a thorough technical specification by interviewing the user about technology decisions, grounded in PRD requirements.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
|
|
14
|
+
|
|
15
|
+
## Step 1: Validate Prerequisites
|
|
16
|
+
|
|
17
|
+
**Resolve the feature directory first** via the **Feature Directory Resolution** block in `references/shared-conventions.md`, setting `{resolvedFeatureDir}`.
|
|
18
|
+
|
|
19
|
+
**Prerequisite check:** Read `{resolvedFeatureDir}/.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 `/feature-forge:forge-1-prd {feature}` first."
|
|
20
|
+
|
|
21
|
+
Read `{resolvedFeatureDir}/PRD.md` into context. This is your foundation — every technology decision must trace back to a PRD requirement.
|
|
22
|
+
|
|
23
|
+
After reading the PRD, invoke the **Epic Context Injection** block in `references/shared-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.
|
|
24
|
+
|
|
25
|
+
## Step 2: Examine Existing Context
|
|
26
|
+
|
|
27
|
+
Before interviewing, you need to understand the existing codebase. This involves reading many files across the project, which consumes context.
|
|
28
|
+
|
|
29
|
+
### Recommended: Delegate to forge-researcher Subagent
|
|
30
|
+
|
|
31
|
+
Spawn 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."
|
|
32
|
+
|
|
33
|
+
If 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.
|
|
34
|
+
|
|
35
|
+
The 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.
|
|
36
|
+
|
|
37
|
+
**Single vs. parallel research.** For a small or well-understood codebase, **one**
|
|
38
|
+
researcher is the right default. For a **large codebase or uncertain scope** (many
|
|
39
|
+
packages, several integration surfaces, monorepo), dispatch **multiple `forge-researcher`
|
|
40
|
+
subagents in parallel — a single message with multiple Agent calls** (the
|
|
41
|
+
`superpowers:dispatching-parallel-agents` pattern), each scoped to a **disjoint focus**
|
|
42
|
+
so they don't re-read the same ground:
|
|
43
|
+
- one on **project structure & conventions** (layout, build, naming, error/test patterns),
|
|
44
|
+
- one per **major integration area / subsystem** the feature touches (its exports, types,
|
|
45
|
+
public API),
|
|
46
|
+
- optionally one on **existing feature specs & in-progress conflicts**.
|
|
47
|
+
|
|
48
|
+
Each returns its own report; **you merge them** into a single integration picture for the
|
|
49
|
+
interview. This cuts latency and deepens coverage versus one researcher sweeping
|
|
50
|
+
everything serially. No agent change is needed — `forge-researcher` already returns a
|
|
51
|
+
self-contained report; just give each instance a narrower focus.
|
|
52
|
+
|
|
53
|
+
If the `forge-researcher` subagent is not available, perform the research inline (steps below).
|
|
54
|
+
|
|
55
|
+
### Manual Research (fallback)
|
|
56
|
+
|
|
57
|
+
1. **Read the PRD thoroughly**: Understand all requirements and constraints
|
|
58
|
+
2. **Check for project-level stack decisions**: Look for `.claude/references/stack-decisions.md` in the project root. If present, read it — these are established technology choices that should be respected unless there's a strong reason to deviate.
|
|
59
|
+
3. **Read the plugin's default stack reference**: Read `references/stack-discovery-checklist.md` for general stack context (only if no project-level override exists)
|
|
60
|
+
4. **Examine the existing codebase**: Look at `package.json` files, existing packages, directory structure, and established patterns. Understand what conventions are already in place.
|
|
61
|
+
5. **Review other features' tech specs**: Check `{specsDir}/*/tech-spec.md` and `{specsDir}/*/*/tech-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).
|
|
62
|
+
6. **Identify integration points**: For each existing package that this feature touches, read its exports, types, and public API. Document these as constraints.
|
|
63
|
+
|
|
64
|
+
### Stack Detection and Persistence
|
|
65
|
+
|
|
66
|
+
After researching the codebase, identify the primary stack (language, build tool, package manager, framework). Read `references/stack-resolution.md` for the full resolution protocol.
|
|
67
|
+
|
|
68
|
+
1. Check if `forge.config.json` already has a `stack` field — if so, use it
|
|
69
|
+
2. Otherwise, detect from project files and use `AskUserQuestion` to confirm: "I detected this as a {stack} project. Correct?"
|
|
70
|
+
3. Update `forge.config.json` with `stack`, `typeCheckCommand`, and `testCommand`
|
|
71
|
+
4. Verify that a matching stack profile exists at `references/stacks/{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 `.claude/references/stack-decisions.md`." Then load `references/stacks/_generic.md`.
|
|
72
|
+
|
|
73
|
+
## Step 3: Conduct the Interview
|
|
74
|
+
|
|
75
|
+
Interview the user about technology decisions. Unlike the PRD interview, here you SHOULD discuss specific technologies, libraries, patterns, and architecture.
|
|
76
|
+
|
|
77
|
+
### Interview Approach
|
|
78
|
+
|
|
79
|
+
**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`.
|
|
80
|
+
|
|
81
|
+
**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.
|
|
82
|
+
|
|
83
|
+
**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/module structure). Wait for the user to respond before proceeding to subsequent areas.
|
|
84
|
+
|
|
85
|
+
**Question strategies** (use these as content for `AskUserQuestion`, not as inline prose):
|
|
86
|
+
- For each PRD requirement, propose a technical approach and ask for confirmation or alternatives
|
|
87
|
+
- Proactively suggest approaches consistent with the established stack
|
|
88
|
+
- Challenge over-engineering: does the feature need this, or is a simpler approach sufficient?
|
|
89
|
+
- Ask about every integration point and how the feature interacts with existing modules
|
|
90
|
+
|
|
91
|
+
**Parking lot:** If the user raises a concern that belongs to a different pipeline stage (e.g., backlog granularity, documentation format), acknowledge it and note it in the pipeline state's `notes` field: "Good point — I've noted that for the [specs/backlog/docs stage]. Let's continue with the tech spec."
|
|
92
|
+
|
|
93
|
+
### Key Decision Areas to Cover
|
|
94
|
+
|
|
95
|
+
Work through these areas across multiple turns, grouping related areas (1-2 per message):
|
|
96
|
+
|
|
97
|
+
- **Package/module 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.)
|
|
98
|
+
- **Data model**: What are the key entities, their schemas, and storage approach?
|
|
99
|
+
- **API design**: What endpoints or interfaces does this expose?
|
|
100
|
+
- **Dependencies**: What external and internal packages are needed?
|
|
101
|
+
- **Patterns**: Which established patterns from the codebase apply here?
|
|
102
|
+
- **Error handling**: How are errors surfaced, propagated, and recovered from?
|
|
103
|
+
- **Testing strategy**: Unit, integration, e2e — what approach for this feature?
|
|
104
|
+
- **Configuration**: What's configurable? How is it configured?
|
|
105
|
+
- **Migration/deployment**: Any special rollout considerations?
|
|
106
|
+
|
|
107
|
+
### Requirement Traceability
|
|
108
|
+
|
|
109
|
+
Every technical decision MUST reference the PRD requirement(s) it addresses. Use the format:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
### JWT-based Session Tokens (REQ-AUTH-01, REQ-SEC-02)
|
|
113
|
+
Sessions will use signed JWT tokens with...
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If 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?"
|
|
117
|
+
|
|
118
|
+
## Step 4: Integration Analysis (Required)
|
|
119
|
+
|
|
120
|
+
Before finalizing the tech spec, this section is MANDATORY:
|
|
121
|
+
|
|
122
|
+
1. List every existing package this feature depends on
|
|
123
|
+
2. List every existing package that will need to import from this feature
|
|
124
|
+
3. For each integration point, document:
|
|
125
|
+
- Which types or contracts are shared
|
|
126
|
+
- How data flows between packages
|
|
127
|
+
- Any patterns established by existing code that must be followed
|
|
128
|
+
- 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."
|
|
129
|
+
4. Check for potential conflicts with in-progress features (other spec directories)
|
|
130
|
+
|
|
131
|
+
## Step 5: Write the Tech Spec
|
|
132
|
+
|
|
133
|
+
Write `{resolvedFeatureDir}/tech-spec.md` with this structure:
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
# {Feature Name} — Technical Specification
|
|
137
|
+
|
|
138
|
+
## 1. Overview
|
|
139
|
+
Brief technical summary and key architectural decisions.
|
|
140
|
+
|
|
141
|
+
## 2. Module Structure
|
|
142
|
+
Project location, directory layout, public API surface.
|
|
143
|
+
|
|
144
|
+
## 3. Technical Decisions
|
|
145
|
+
### 3.1 {Decision Area} (REQ-XXX-NN)
|
|
146
|
+
Decision, rationale, alternatives considered.
|
|
147
|
+
|
|
148
|
+
## 4. Data Model
|
|
149
|
+
Schemas, types, storage approach.
|
|
150
|
+
|
|
151
|
+
## 5. API Design
|
|
152
|
+
Endpoints, interfaces, contracts.
|
|
153
|
+
|
|
154
|
+
## 6. Integration Points
|
|
155
|
+
How this feature connects to existing packages.
|
|
156
|
+
|
|
157
|
+
## 7. Error Handling
|
|
158
|
+
Error types, propagation, recovery.
|
|
159
|
+
|
|
160
|
+
## 8. Testing Approach
|
|
161
|
+
Strategy, tooling, coverage targets.
|
|
162
|
+
|
|
163
|
+
## 9. Dependencies
|
|
164
|
+
External packages, internal packages, version constraints.
|
|
165
|
+
|
|
166
|
+
## 10. Open Technical Questions
|
|
167
|
+
Unresolved technical decisions.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Step 6: Review with User
|
|
171
|
+
|
|
172
|
+
Present the complete tech spec. Ask:
|
|
173
|
+
- "Does this capture all the technical decisions correctly?"
|
|
174
|
+
- "Any patterns from the existing codebase I missed?"
|
|
175
|
+
- "Are the integration points complete?"
|
|
176
|
+
|
|
177
|
+
Use `AskUserQuestion` to collect this feedback.
|
|
178
|
+
|
|
179
|
+
## Step 7: Update Pipeline State and Commit
|
|
180
|
+
|
|
181
|
+
Write pipeline state conforming to `references/pipeline-state-schema.json`.
|
|
182
|
+
|
|
183
|
+
1. Update `{resolvedFeatureDir}/.pipeline-state.json`:
|
|
184
|
+
- Set `currentStage` to `forge-3-specs`
|
|
185
|
+
- Record `artifacts`, `completedAt`, `version`
|
|
186
|
+
- Set `stages.forge-2-tech.basedOnVersions` to `{"forge-1-prd": <current forge-1-prd version>}`
|
|
187
|
+
- Check downstream stages (forge-3-specs, forge-4-backlog, forge-5-loop, forge-6-docs). If any have `basedOnVersions` referencing an older version of forge-2-tech, set their status to `stale`
|
|
188
|
+
2. Use `AskUserQuestion` to ask about notes to persist
|
|
189
|
+
3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files, attempt commit with message `"{commitPrefix}({feature}): complete tech-spec v{n}"`, then set `stages.forge-2-tech.status` to `complete` with commit hash only on success. If commit fails, leave status as `in-progress`.
|
|
190
|
+
5. Tell the user: "Tech spec complete. Next steps:\n - `/feature-forge:forge-verify {feature}` to verify the tech spec\n - `/feature-forge:forge-3-specs {feature}` to create implementation specs\n - `/feature-forge:forge {feature}` to see full pipeline status"
|
|
191
|
+
|
|
192
|
+
## Gotchas
|
|
193
|
+
|
|
194
|
+
- Don't duplicate the PRD. The tech spec answers HOW, not WHAT. If you find yourself restating requirements, reference them by ID instead.
|
|
195
|
+
- 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.
|
|
196
|
+
- 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.
|
|
197
|
+
- If the existing codebase has inconsistent patterns (it happens), call it out and ask which pattern should be followed for this feature.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Stack Discovery Checklist (Plugin Default)
|
|
2
|
+
|
|
3
|
+
This file contains a default stack discovery protocol for the feature-forge plugin. Projects can override this by placing a `stack-decisions.md` in `.claude/references/` at the project root.
|
|
4
|
+
|
|
5
|
+
## Note to Agent
|
|
6
|
+
|
|
7
|
+
This is a DISCOVERY PROTOCOL — it helps you identify what stack the project uses. It is NOT a set of decisions. Always check `.claude/references/stack-decisions.md` first — if present, it takes precedence.
|
|
8
|
+
|
|
9
|
+
After discovering the stack, check if `references/stacks/{stack}.md` exists in the plugin for stack-specific guidance. See `references/stack-resolution.md` for the full resolution protocol.
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
This is a default discovery guide for understanding a project's technology stack. Projects should create `.claude/references/stack-decisions.md` with their actual stack decisions, which takes precedence over this checklist.
|
|
14
|
+
|
|
15
|
+
## Stack Discovery Protocol
|
|
16
|
+
|
|
17
|
+
### 1. Identify the Primary Language and Runtime
|
|
18
|
+
|
|
19
|
+
Check for project manifests:
|
|
20
|
+
- `package.json` → Node.js / Bun (JavaScript/TypeScript)
|
|
21
|
+
- `pyproject.toml`, `setup.py`, `setup.cfg` → Python
|
|
22
|
+
- `go.mod` → Go
|
|
23
|
+
- `Cargo.toml` → Rust
|
|
24
|
+
- `pom.xml`, `build.gradle`, `build.gradle.kts` → Java / Kotlin
|
|
25
|
+
- `*.csproj`, `*.sln` → .NET (C#/F#)
|
|
26
|
+
- `mix.exs` → Elixir
|
|
27
|
+
- `Gemfile` → Ruby
|
|
28
|
+
- `Package.swift` → Swift
|
|
29
|
+
|
|
30
|
+
### 2. Identify the Package Manager
|
|
31
|
+
|
|
32
|
+
Check for lock files:
|
|
33
|
+
- `bun.lockb` → Bun
|
|
34
|
+
- `pnpm-lock.yaml` → pnpm
|
|
35
|
+
- `package-lock.json` → npm
|
|
36
|
+
- `yarn.lock` → Yarn
|
|
37
|
+
- `uv.lock` → uv
|
|
38
|
+
- `poetry.lock` → Poetry
|
|
39
|
+
- `go.sum` → Go modules
|
|
40
|
+
- `Cargo.lock` → Cargo
|
|
41
|
+
|
|
42
|
+
### 3. Identify Project Structure
|
|
43
|
+
|
|
44
|
+
Check for monorepo/workspace configurations:
|
|
45
|
+
- `turbo.json` → Turborepo
|
|
46
|
+
- `nx.json` → Nx
|
|
47
|
+
- `lerna.json` → Lerna
|
|
48
|
+
- `pnpm-workspace.yaml` → pnpm workspaces
|
|
49
|
+
- `pants.toml` → Pants (Python/Go/Java)
|
|
50
|
+
- `go.work` → Go workspaces
|
|
51
|
+
- `Cargo.toml` with `[workspace]` → Cargo workspaces
|
|
52
|
+
|
|
53
|
+
If none found, this is likely a single-project repository.
|
|
54
|
+
|
|
55
|
+
### 4. Identify Frameworks and Libraries
|
|
56
|
+
|
|
57
|
+
Examine the dependency manifest for:
|
|
58
|
+
- **Web frameworks**: Hono, Express, Fastify, FastAPI, Django, Flask, Gin, Actix, Spring Boot, etc.
|
|
59
|
+
- **Frontend**: React, Vue, Svelte, Solid, etc.
|
|
60
|
+
- **Database/ORM**: Drizzle, Prisma, SQLAlchemy, GORM, Diesel, etc.
|
|
61
|
+
- **Validation**: Zod, Pydantic, etc.
|
|
62
|
+
- **Testing**: Vitest, pytest, go test, etc.
|
|
63
|
+
|
|
64
|
+
### 5. Identify Build and Type Checking
|
|
65
|
+
|
|
66
|
+
- Check for CI config (`.github/workflows/`, `Makefile`, `justfile`) to find build, test, and type check commands
|
|
67
|
+
- Check `package.json` scripts, `pyproject.toml` `[tool.*]` sections, or `Makefile` targets
|
|
68
|
+
|
|
69
|
+
## How to Create a Project-Level Override
|
|
70
|
+
|
|
71
|
+
Create `.claude/references/stack-decisions.md` in your project root with your specific stack decisions. See `references/stacks/typescript.md` or `references/stacks/python.md` for stack-specific examples of what to include.
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
# Stack Decisions
|
|
75
|
+
|
|
76
|
+
## Runtime & Build
|
|
77
|
+
- [Language and version]
|
|
78
|
+
- [Package manager]
|
|
79
|
+
- [Build tool / monorepo orchestration if applicable]
|
|
80
|
+
|
|
81
|
+
## Backend
|
|
82
|
+
- [Web framework]
|
|
83
|
+
- [Database / ORM]
|
|
84
|
+
- [Validation library]
|
|
85
|
+
|
|
86
|
+
## Frontend (if applicable)
|
|
87
|
+
- [UI framework]
|
|
88
|
+
- [Component library]
|
|
89
|
+
- [Styling approach]
|
|
90
|
+
|
|
91
|
+
## Conventions
|
|
92
|
+
- [Testing framework and approach]
|
|
93
|
+
- [Type checking / linting command]
|
|
94
|
+
- [Module organization patterns]
|
|
95
|
+
```
|