@zigrivers/scaffold 3.1.0 → 3.4.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/README.md +53 -40
- package/content/knowledge/core/test-skeleton-generation.md +313 -0
- package/{knowledge → content/knowledge}/execution/enhancement-workflow.md +1 -1
- package/content/knowledge/product/vision-innovation.md +273 -0
- package/{knowledge → content/knowledge}/tools/post-implementation-review-methodology.md +1 -1
- package/{pipeline → content/pipeline}/consolidation/workflow-audit.md +1 -1
- package/{pipeline → content/pipeline}/decisions/review-adrs.md +1 -1
- package/{pipeline → content/pipeline}/environment/design-system.md +1 -1
- package/{pipeline → content/pipeline}/finalization/implementation-playbook.md +2 -2
- package/{pipeline → content/pipeline}/foundation/tech-stack.md +1 -1
- package/{pipeline → content/pipeline}/modeling/review-domain-modeling.md +1 -1
- package/{pipeline → content/pipeline}/planning/implementation-plan-review.md +2 -1
- package/{pipeline → content/pipeline}/quality/review-testing.md +1 -1
- package/{pipeline → content/pipeline}/quality/story-tests.md +2 -2
- package/{pipeline → content/pipeline}/vision/innovate-vision.md +1 -1
- package/content/skills/mmr/SKILL.md +65 -0
- package/content/skills/multi-model-dispatch/SKILL.md +327 -0
- package/{agent-skills → content/skills}/scaffold-pipeline/SKILL.md +14 -8
- package/{agent-skills → content/skills}/scaffold-runner/SKILL.md +64 -19
- package/{tools → content/tools}/post-implementation-review.md +2 -2
- package/{tools → content/tools}/prompt-pipeline.md +7 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +17 -1
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/build.test.js +6 -5
- package/dist/cli/commands/build.test.js.map +1 -1
- package/dist/cli/commands/info.test.js +2 -2
- package/dist/cli/commands/info.test.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +9 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.test.js +6 -0
- package/dist/cli/commands/init.test.js.map +1 -1
- package/dist/cli/commands/list.test.js +8 -8
- package/dist/cli/commands/list.test.js.map +1 -1
- package/dist/cli/commands/run.test.js +4 -4
- package/dist/cli/commands/run.test.js.map +1 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +16 -86
- package/dist/cli/commands/skill.js.map +1 -1
- package/dist/cli/commands/skill.test.js +27 -46
- package/dist/cli/commands/skill.test.js.map +1 -1
- package/dist/cli/middleware/project-root.d.ts.map +1 -1
- package/dist/cli/middleware/project-root.js +16 -0
- package/dist/cli/middleware/project-root.js.map +1 -1
- package/dist/cli/middleware/project-root.test.js +20 -0
- package/dist/cli/middleware/project-root.test.js.map +1 -1
- package/dist/core/adapters/gemini.js +2 -2
- package/dist/core/adapters/gemini.js.map +1 -1
- package/dist/core/adapters/gemini.test.js +1 -1
- package/dist/core/adapters/gemini.test.js.map +1 -1
- package/dist/core/skills/sync.d.ts +36 -0
- package/dist/core/skills/sync.d.ts.map +1 -0
- package/dist/core/skills/sync.js +119 -0
- package/dist/core/skills/sync.js.map +1 -0
- package/dist/core/skills/sync.test.d.ts +2 -0
- package/dist/core/skills/sync.test.d.ts.map +1 -0
- package/dist/core/skills/sync.test.js +166 -0
- package/dist/core/skills/sync.test.js.map +1 -0
- package/dist/e2e/commands.test.js +10 -10
- package/dist/e2e/commands.test.js.map +1 -1
- package/dist/e2e/knowledge.test.js +5 -4
- package/dist/e2e/knowledge.test.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/project/adopt.test.js +8 -8
- package/dist/project/adopt.test.js.map +1 -1
- package/dist/utils/fs.d.ts +5 -5
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +15 -15
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/fs.test.js +9 -9
- package/dist/utils/fs.test.js.map +1 -1
- package/dist/validation/index.test.js +2 -2
- package/dist/validation/index.test.js.map +1 -1
- package/package.json +3 -6
- package/skills/mmr/SKILL.md +65 -0
- package/skills/scaffold-pipeline/SKILL.md +3 -3
- /package/{knowledge → content/knowledge}/core/adr-craft.md +0 -0
- /package/{knowledge → content/knowledge}/core/ai-memory-management.md +0 -0
- /package/{knowledge → content/knowledge}/core/api-design.md +0 -0
- /package/{knowledge → content/knowledge}/core/automated-review-tooling.md +0 -0
- /package/{knowledge → content/knowledge}/core/claude-md-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/coding-conventions.md +0 -0
- /package/{knowledge → content/knowledge}/core/database-design.md +0 -0
- /package/{knowledge → content/knowledge}/core/design-system-tokens.md +0 -0
- /package/{knowledge → content/knowledge}/core/dev-environment.md +0 -0
- /package/{knowledge → content/knowledge}/core/domain-modeling.md +0 -0
- /package/{knowledge → content/knowledge}/core/eval-craft.md +0 -0
- /package/{knowledge → content/knowledge}/core/git-workflow-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/multi-model-review-dispatch.md +0 -0
- /package/{knowledge → content/knowledge}/core/operations-runbook.md +0 -0
- /package/{knowledge → content/knowledge}/core/project-structure-patterns.md +0 -0
- /package/{knowledge → content/knowledge}/core/review-step-template.md +0 -0
- /package/{knowledge → content/knowledge}/core/security-best-practices.md +0 -0
- /package/{knowledge → content/knowledge}/core/system-architecture.md +0 -0
- /package/{knowledge → content/knowledge}/core/task-decomposition.md +0 -0
- /package/{knowledge → content/knowledge}/core/task-tracking.md +0 -0
- /package/{knowledge → content/knowledge}/core/tech-stack-selection.md +0 -0
- /package/{knowledge → content/knowledge}/core/testing-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/core/user-stories.md +0 -0
- /package/{knowledge → content/knowledge}/core/user-story-innovation.md +0 -0
- /package/{knowledge → content/knowledge}/core/ux-specification.md +0 -0
- /package/{knowledge → content/knowledge}/execution/task-claiming-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/execution/tdd-execution-loop.md +0 -0
- /package/{knowledge → content/knowledge}/execution/worktree-management.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/apply-fixes-and-freeze.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/developer-onboarding.md +0 -0
- /package/{knowledge → content/knowledge}/finalization/implementation-playbook.md +0 -0
- /package/{knowledge → content/knowledge}/product/gap-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/product/prd-craft.md +0 -0
- /package/{knowledge → content/knowledge}/product/prd-innovation.md +0 -0
- /package/{knowledge → content/knowledge}/product/vision-craft.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-adr.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-api-design.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-database-design.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-domain-modeling.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-implementation-tasks.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-methodology.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-operations.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-prd.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-security.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-system-architecture.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-testing-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-user-stories.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-ux-specification.md +0 -0
- /package/{knowledge → content/knowledge}/review/review-vision.md +0 -0
- /package/{knowledge → content/knowledge}/tools/release-management.md +0 -0
- /package/{knowledge → content/knowledge}/tools/session-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/tools/version-strategy.md +0 -0
- /package/{knowledge → content/knowledge}/validation/critical-path-analysis.md +0 -0
- /package/{knowledge → content/knowledge}/validation/cross-phase-consistency.md +0 -0
- /package/{knowledge → content/knowledge}/validation/decision-completeness.md +0 -0
- /package/{knowledge → content/knowledge}/validation/dependency-validation.md +0 -0
- /package/{knowledge → content/knowledge}/validation/implementability-review.md +0 -0
- /package/{knowledge → content/knowledge}/validation/scope-management.md +0 -0
- /package/{knowledge → content/knowledge}/validation/traceability.md +0 -0
- /package/{methodology → content/methodology}/README.md +0 -0
- /package/{methodology → content/methodology}/custom-defaults.yml +0 -0
- /package/{methodology → content/methodology}/deep.yml +0 -0
- /package/{methodology → content/methodology}/mvp.yml +0 -0
- /package/{pipeline → content/pipeline}/architecture/review-architecture.md +0 -0
- /package/{pipeline → content/pipeline}/architecture/system-architecture.md +0 -0
- /package/{pipeline → content/pipeline}/build/multi-agent-resume.md +0 -0
- /package/{pipeline → content/pipeline}/build/multi-agent-start.md +0 -0
- /package/{pipeline → content/pipeline}/build/new-enhancement.md +0 -0
- /package/{pipeline → content/pipeline}/build/quick-task.md +0 -0
- /package/{pipeline → content/pipeline}/build/single-agent-resume.md +0 -0
- /package/{pipeline → content/pipeline}/build/single-agent-start.md +0 -0
- /package/{pipeline → content/pipeline}/consolidation/claude-md-optimization.md +0 -0
- /package/{pipeline → content/pipeline}/decisions/adrs.md +0 -0
- /package/{pipeline → content/pipeline}/environment/ai-memory-setup.md +0 -0
- /package/{pipeline → content/pipeline}/environment/automated-pr-review.md +0 -0
- /package/{pipeline → content/pipeline}/environment/dev-env-setup.md +0 -0
- /package/{pipeline → content/pipeline}/environment/git-workflow.md +0 -0
- /package/{pipeline → content/pipeline}/finalization/apply-fixes-and-freeze.md +0 -0
- /package/{pipeline → content/pipeline}/finalization/developer-onboarding-guide.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/beads.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/coding-standards.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/project-structure.md +0 -0
- /package/{pipeline → content/pipeline}/foundation/tdd.md +0 -0
- /package/{pipeline → content/pipeline}/integration/add-e2e-testing.md +0 -0
- /package/{pipeline → content/pipeline}/modeling/domain-modeling.md +0 -0
- /package/{pipeline → content/pipeline}/parity/platform-parity-review.md +0 -0
- /package/{pipeline → content/pipeline}/planning/implementation-plan.md +0 -0
- /package/{pipeline → content/pipeline}/pre/create-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/innovate-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/innovate-user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/pre/review-prd.md +0 -0
- /package/{pipeline → content/pipeline}/pre/review-user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/pre/user-stories.md +0 -0
- /package/{pipeline → content/pipeline}/quality/create-evals.md +0 -0
- /package/{pipeline → content/pipeline}/quality/operations.md +0 -0
- /package/{pipeline → content/pipeline}/quality/review-operations.md +0 -0
- /package/{pipeline → content/pipeline}/quality/review-security.md +0 -0
- /package/{pipeline → content/pipeline}/quality/security.md +0 -0
- /package/{pipeline → content/pipeline}/specification/api-contracts.md +0 -0
- /package/{pipeline → content/pipeline}/specification/database-schema.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-api.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-database.md +0 -0
- /package/{pipeline → content/pipeline}/specification/review-ux.md +0 -0
- /package/{pipeline → content/pipeline}/specification/ux-spec.md +0 -0
- /package/{pipeline → content/pipeline}/validation/critical-path-walkthrough.md +0 -0
- /package/{pipeline → content/pipeline}/validation/cross-phase-consistency.md +0 -0
- /package/{pipeline → content/pipeline}/validation/decision-completeness.md +0 -0
- /package/{pipeline → content/pipeline}/validation/dependency-graph-validation.md +0 -0
- /package/{pipeline → content/pipeline}/validation/implementability-dry-run.md +0 -0
- /package/{pipeline → content/pipeline}/validation/scope-creep-check.md +0 -0
- /package/{pipeline → content/pipeline}/validation/traceability-matrix.md +0 -0
- /package/{pipeline → content/pipeline}/vision/create-vision.md +0 -0
- /package/{pipeline → content/pipeline}/vision/review-vision.md +0 -0
- /package/{tools → content/tools}/dashboard.md +0 -0
- /package/{tools → content/tools}/release.md +0 -0
- /package/{tools → content/tools}/review-code.md +0 -0
- /package/{tools → content/tools}/review-pr.md +0 -0
- /package/{tools → content/tools}/session-analyzer.md +0 -0
- /package/{tools → content/tools}/update.md +0 -0
- /package/{tools → content/tools}/version-bump.md +0 -0
- /package/{tools → content/tools}/version.md +0 -0
package/README.md
CHANGED
|
@@ -12,24 +12,24 @@ Here's how it works:
|
|
|
12
12
|
|
|
13
13
|
1. **Initialize** — run `scaffold init` in your project directory. The init wizard detects whether you're starting fresh (greenfield) or working with an existing codebase (brownfield), and lets you pick a methodology preset (deep, mvp, or custom).
|
|
14
14
|
|
|
15
|
-
2. **Run steps** — each step is a composable meta-prompt (a short intent declaration in `pipeline/`) that gets assembled at runtime into a full 7-section prompt. The assembly engine injects relevant knowledge base entries, project context from prior steps, methodology settings, and depth-appropriate instructions.
|
|
15
|
+
2. **Run steps** — each step is a composable meta-prompt (a short intent declaration in `content/pipeline/`) that gets assembled at runtime into a full 7-section prompt. The assembly engine injects relevant knowledge base entries, project context from prior steps, methodology settings, and depth-appropriate instructions.
|
|
16
16
|
|
|
17
17
|
3. **Follow the dependency graph** — Scaffold tracks which steps are complete, which are eligible, and which are blocked. Run `scaffold next` to see what's unblocked, or `scaffold status` for the full picture. Each step produces a specific artifact — a planning document, architecture decision, specification, or actual code.
|
|
18
18
|
|
|
19
19
|
You can run steps two ways:
|
|
20
20
|
|
|
21
21
|
- **CLI**: `scaffold run create-prd` — the assembly engine builds a full prompt from the meta-prompt, knowledge base entries, and project context. Best for the structured pipeline with dependency tracking.
|
|
22
|
-
- **
|
|
22
|
+
- **Runner skill**: In Claude Code or Gemini, the scaffold-runner skill provides an interactive wrapper that surfaces decision points (depth level, strictness, optional sections) before execution instead of letting the AI pick defaults silently.
|
|
23
23
|
|
|
24
|
-
Either way, Scaffold constructs the prompt and the target AI tool does the work. The CLI tracks pipeline state and dependencies;
|
|
24
|
+
Either way, Scaffold constructs the prompt and the target AI tool does the work. The CLI tracks pipeline state and dependencies; the runner skill adds interactive decision surfacing on top.
|
|
25
25
|
|
|
26
26
|
## Key Concepts
|
|
27
27
|
|
|
28
|
-
**Meta-prompts** — Each pipeline step is defined as a short `.md` file in `pipeline/` with YAML frontmatter (dependencies, outputs, knowledge entries) and a markdown body describing the step's intent. These are *not* the prompts Claude sees — they're assembled into full prompts at runtime.
|
|
28
|
+
**Meta-prompts** — Each pipeline step is defined as a short `.md` file in `content/pipeline/` with YAML frontmatter (dependencies, outputs, knowledge entries) and a markdown body describing the step's intent. These are *not* the prompts Claude sees — they're assembled into full prompts at runtime.
|
|
29
29
|
|
|
30
30
|
**Assembly engine** — At execution time, Scaffold builds a 7-section prompt from: system metadata, the meta-prompt, knowledge base entries, project context (artifacts from prior steps), methodology settings, layered instructions, and depth-specific execution guidance.
|
|
31
31
|
|
|
32
|
-
**Knowledge base** — 60 domain expertise entries in `knowledge/` organized in seven categories (core, product, review, validation, finalization, execution, tools) covering testing strategy, domain modeling, API design, security best practices, eval craft, TDD execution, task claiming, worktree management, release management, and more. These get injected into prompts based on each step's `knowledge-base` frontmatter field. Knowledge files with a `## Deep Guidance` section are optimized for CLI assembly — only the deep guidance content is loaded, avoiding redundancy with the prompt text. Teams can add project-local overrides in `.scaffold/knowledge/` that layer on top of the global entries.
|
|
32
|
+
**Knowledge base** — 60 domain expertise entries in `content/knowledge/` organized in seven categories (core, product, review, validation, finalization, execution, tools) covering testing strategy, domain modeling, API design, security best practices, eval craft, TDD execution, task claiming, worktree management, release management, and more. These get injected into prompts based on each step's `knowledge-base` frontmatter field. Knowledge files with a `## Deep Guidance` section are optimized for CLI assembly — only the deep guidance content is loaded, avoiding redundancy with the prompt text. Teams can add project-local overrides in `.scaffold/knowledge/` that layer on top of the global entries.
|
|
33
33
|
|
|
34
34
|
**Methodology presets** — Three built-in presets control which steps run and how deep the analysis goes:
|
|
35
35
|
- **deep** (depth 5) — all steps enabled, exhaustive analysis
|
|
@@ -85,7 +85,7 @@ Lets Claude control a real browser for visual testing and screenshots.
|
|
|
85
85
|
Scaffold has two parts that install separately:
|
|
86
86
|
|
|
87
87
|
- **CLI** (`scaffold`) — the core tool. Install via npm or Homebrew. Use it from your terminal or from Claude Code with `! scaffold run <step>`.
|
|
88
|
-
- **Plugin**
|
|
88
|
+
- **Plugin** — optional Claude Code plugin that auto-activates the scaffold runner and pipeline reference skills for interactive guidance.
|
|
89
89
|
|
|
90
90
|
### Step 1: Install the CLI
|
|
91
91
|
|
|
@@ -108,7 +108,7 @@ Verify: `scaffold version`
|
|
|
108
108
|
|
|
109
109
|
### Step 2: Add the plugin (recommended)
|
|
110
110
|
|
|
111
|
-
Install the Scaffold plugin inside Claude Code for
|
|
111
|
+
Install the Scaffold plugin inside Claude Code for auto-activated skills:
|
|
112
112
|
|
|
113
113
|
```
|
|
114
114
|
/plugin marketplace add zigrivers/scaffold
|
|
@@ -116,7 +116,6 @@ Install the Scaffold plugin inside Claude Code for slash commands AND the intera
|
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
This gives you:
|
|
119
|
-
- **Slash commands** (`/scaffold:create-prd`, `/scaffold:tdd`, etc.) — quick access to any pipeline step
|
|
120
119
|
- **Scaffold Runner skill** — intelligent interactive wrapper that surfaces decision points (depth level, strictness, optional sections) before execution instead of letting Claude pick defaults silently
|
|
121
120
|
- **Pipeline reference skill** — shows pipeline ordering, dependencies, and phase structure
|
|
122
121
|
- **Multi-model dispatch skill** — correct invocation patterns for Codex and Gemini CLIs
|
|
@@ -134,13 +133,9 @@ This gives you:
|
|
|
134
133
|
|
|
135
134
|
The plugin is optional — everything it does can also be done with `scaffold run <step>` from the CLI. But you lose the interactive decision surfacing without the Scaffold Runner skill.
|
|
136
135
|
|
|
137
|
-
> **CLI-only users**: If you prefer not to install the plugin,
|
|
138
|
-
> ```bash
|
|
139
|
-
> scaffold skill install
|
|
140
|
-
> ```
|
|
141
|
-
> This copies the Scaffold Runner and Pipeline Reference skills to both `.claude/skills/` and `.agents/skills/` in your project.
|
|
136
|
+
> **CLI-only users**: If you prefer not to install the plugin, skills are installed automatically — `scaffold init` sets them up, and any subsequent CLI command keeps them current after upgrades. No manual `scaffold skill install` needed.
|
|
142
137
|
|
|
143
|
-
> **Gemini users**: `scaffold build` keeps a root `GEMINI.md` in sync with the shared runner instructions and generates `.gemini/commands/scaffold/*.toml`
|
|
138
|
+
> **Gemini users**: `scaffold build` keeps a root `GEMINI.md` in sync with the shared runner instructions and generates `.gemini/commands/scaffold/*.toml` wrappers. Plain prompts like `scaffold status` work because Gemini loads `GEMINI.md`.
|
|
144
139
|
|
|
145
140
|
## Updating
|
|
146
141
|
|
|
@@ -159,11 +154,9 @@ brew upgrade scaffold
|
|
|
159
154
|
### Plugin
|
|
160
155
|
|
|
161
156
|
```
|
|
162
|
-
/scaffold
|
|
157
|
+
/plugin marketplace update zigrivers-scaffold
|
|
163
158
|
```
|
|
164
159
|
|
|
165
|
-
Or: `/plugin marketplace update zigrivers-scaffold`
|
|
166
|
-
|
|
167
160
|
### Existing projects
|
|
168
161
|
|
|
169
162
|
After upgrading the CLI, existing projects still get automatic state migrations. Run `scaffold status` in your project directory — the state manager detects and renames old step keys, removes retired steps, normalizes artifact paths, and persists the changes atomically. No manual editing of `.scaffold/state.json` is needed.
|
|
@@ -189,7 +182,7 @@ The canonical execution entrypoints are still `scaffold run <step>` and the inst
|
|
|
189
182
|
This release is a clean breaking change for generated adapter output. To migrate an existing project:
|
|
190
183
|
|
|
191
184
|
1. Upgrade Scaffold.
|
|
192
|
-
2. Remove old root-level generated Scaffold output if present: `
|
|
185
|
+
2. Remove old root-level generated Scaffold output if present: `prompts/`, `codex-prompts/`, `commands/`, and root `AGENTS.md` only if it was Scaffold-generated. Run `scaffold status` — it warns about any legacy output.
|
|
193
186
|
3. Run `scaffold build`.
|
|
194
187
|
4. Review the Scaffold-managed block in `.gitignore`.
|
|
195
188
|
5. Commit `.gitignore` plus the intended committed `.scaffold/` state files (`config.yml`, `state.json`, `decisions.jsonl`, `instructions/`).
|
|
@@ -551,11 +544,24 @@ npm install -g @google/gemini-cli
|
|
|
551
544
|
|
|
552
545
|
You don't need both — Scaffold works with whichever CLIs are available. Having both gives the strongest review (three independent perspectives). See [Prerequisites](#prerequisites) for auth setup and verification commands.
|
|
553
546
|
|
|
547
|
+
### mmr — Multi-Model Review CLI
|
|
548
|
+
|
|
549
|
+
Scaffold includes `mmr`, a standalone CLI that automates multi-model code review dispatch, monitoring, and reconciliation. Instead of manually running each review channel, `mmr` handles it all:
|
|
550
|
+
|
|
551
|
+
```bash
|
|
552
|
+
mmr review --pr 47 --focus "auth flow" # Dispatch to all channels (async)
|
|
553
|
+
mmr status mmr-a1b2c3 # Poll progress
|
|
554
|
+
mmr results mmr-a1b2c3 # Reconciled findings + gate
|
|
555
|
+
mmr config test # Pre-flight auth check
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
`mmr` is installed alongside Scaffold, or independently via `npm install -g @zigrivers/mmr`. Run `mmr config init` to auto-detect installed CLIs and generate a `.mmr.yaml` config. See the [mmr design spec](docs/superpowers/specs/2026-04-05-mmr-multi-model-review-design.md) for full details.
|
|
559
|
+
|
|
554
560
|
### How It Works
|
|
555
561
|
|
|
556
562
|
1. **Claude reviews first** — completes its own structured multi-pass review using different review lenses (coverage, consistency, quality, downstream readiness)
|
|
557
563
|
2. **Independent external review** — the document being reviewed is sent to each available CLI. They don't see Claude's findings or each other's output — every review is independent.
|
|
558
|
-
3. **Findings are reconciled** — Scaffold merges all findings by confidence level:
|
|
564
|
+
3. **Findings are reconciled** — Scaffold (or `mmr`) merges all findings by confidence level:
|
|
559
565
|
|
|
560
566
|
| Scenario | Confidence | Action |
|
|
561
567
|
|----------|-----------|--------|
|
|
@@ -616,7 +622,7 @@ You can change methodology mid-pipeline with `scaffold init --methodology <prese
|
|
|
616
622
|
| `scaffold dashboard` | Open a visual progress dashboard in your browser |
|
|
617
623
|
| `scaffold decisions` | Show all logged decisions |
|
|
618
624
|
| `scaffold knowledge` | Manage project-local knowledge base overrides |
|
|
619
|
-
| `scaffold skill install` | Install scaffold skills into the current project |
|
|
625
|
+
| `scaffold skill install` | Install scaffold skills into the current project (automatic — rarely needed manually) |
|
|
620
626
|
| `scaffold skill list` | Show available skills and installation status |
|
|
621
627
|
| `scaffold skill remove` | Remove scaffold skills from the current project |
|
|
622
628
|
|
|
@@ -705,7 +711,7 @@ These are stateless pipeline steps — they appear in `scaffold next` once Phase
|
|
|
705
711
|
|
|
706
712
|
### Utility Tools
|
|
707
713
|
|
|
708
|
-
These are orthogonal to the pipeline — usable at any time, not tied to pipeline state. Defined in `tools/` with `category: tool` frontmatter. Run `scaffold list --section tools` for a complete listing (or `--verbose` for argument hints, `--format json` for machine-readable output):
|
|
714
|
+
These are orthogonal to the pipeline — usable at any time, not tied to pipeline state. Defined in `content/tools/` with `category: tool` frontmatter. Run `scaffold list --section tools` for a complete listing (or `--verbose` for argument hints, `--format json` for machine-readable output):
|
|
709
715
|
|
|
710
716
|
| Command | When to Use |
|
|
711
717
|
|---------|-------------|
|
|
@@ -722,14 +728,14 @@ These are orthogonal to the pipeline — usable at any time, not tied to pipelin
|
|
|
722
728
|
|
|
723
729
|
Use `scaffold run review-code` before commit or push when you want a local gate on the current delivery candidate. Use `scaffold run review-pr` after a GitHub PR exists.
|
|
724
730
|
|
|
725
|
-
|
|
731
|
+
Run any of these via the CLI or ask the scaffold runner skill in Claude Code or Gemini.
|
|
726
732
|
|
|
727
733
|
## Releasing Your Project
|
|
728
734
|
|
|
729
735
|
### Version bumps (development milestones)
|
|
730
736
|
|
|
731
737
|
```
|
|
732
|
-
|
|
738
|
+
scaffold run version-bump
|
|
733
739
|
```
|
|
734
740
|
|
|
735
741
|
Bumps the version number and updates the changelog, but doesn't create tags, push, or run the formal release ceremony. Think of it as a checkpoint.
|
|
@@ -737,10 +743,10 @@ Bumps the version number and updates the changelog, but doesn't create tags, pus
|
|
|
737
743
|
### Creating a release
|
|
738
744
|
|
|
739
745
|
```
|
|
740
|
-
|
|
746
|
+
scaffold run release
|
|
741
747
|
```
|
|
742
748
|
|
|
743
|
-
|
|
749
|
+
The AI analyzes your commits since the last release, suggests whether this is a major, minor, or patch version bump, and walks you through:
|
|
744
750
|
1. Running your project's tests
|
|
745
751
|
2. Updating the version number in your project files
|
|
746
752
|
3. Generating a changelog entry
|
|
@@ -748,7 +754,7 @@ Claude analyzes your commits since the last release, suggests whether this is a
|
|
|
748
754
|
|
|
749
755
|
Depending on the target project, that may include a Git tag, hosted release,
|
|
750
756
|
package publish, deployment, registry update, or another project-specific
|
|
751
|
-
release step.
|
|
757
|
+
release step. `scaffold run release` is intentionally generic; it follows
|
|
752
758
|
the target project's own documented workflow rather than assuming npm or GitHub
|
|
753
759
|
for every project.
|
|
754
760
|
|
|
@@ -764,17 +770,17 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
|
|
|
764
770
|
| **Frontmatter** | The YAML metadata block at the top of meta-prompt files, declaring dependencies, outputs, knowledge entries, and other configuration. |
|
|
765
771
|
| **Knowledge base** | 60 domain expertise entries that get injected into prompts. Can be extended with project-local overrides. |
|
|
766
772
|
| **MCP** | Model Context Protocol. A way for Claude to use external tools like a headless browser. |
|
|
767
|
-
| **Meta-prompt** | A short intent declaration in `pipeline/` that gets assembled into a full prompt at runtime. |
|
|
773
|
+
| **Meta-prompt** | A short intent declaration in `content/pipeline/` that gets assembled into a full prompt at runtime. |
|
|
768
774
|
| **Methodology** | A preset (deep, mvp, custom) controlling which steps run and at what depth. |
|
|
769
775
|
| **Multi-model review** | Independent validation from Codex/Gemini CLIs at depth 4-5, catching blind spots a single model misses. |
|
|
770
776
|
| **PRD** | Product Requirements Document. The foundation for everything Scaffold builds. |
|
|
771
|
-
| **
|
|
777
|
+
| **Runner skill** | Auto-activated Claude Code/Gemini skill that surfaces decision points before executing pipeline steps. |
|
|
772
778
|
| **Worktrees** | A git feature for multiple working copies. Scaffold uses these for parallel agent execution. |
|
|
773
779
|
|
|
774
780
|
## Troubleshooting / FAQ
|
|
775
781
|
|
|
776
782
|
**I ran a command and nothing happened.**
|
|
777
|
-
Make sure Scaffold is installed — run `scaffold version`
|
|
783
|
+
Make sure Scaffold is installed — run `scaffold version` in your terminal.
|
|
778
784
|
|
|
779
785
|
**Which steps can I skip?**
|
|
780
786
|
Use `scaffold skip <step> --reason "..."` to skip any step. You can skip multiple steps at once: `scaffold skip design-system add-e2e-testing --reason "backend-only"`. The mvp preset only enables 7 critical steps by default. With the custom preset, you choose exactly which steps to run.
|
|
@@ -859,14 +865,21 @@ src/
|
|
|
859
865
|
|
|
860
866
|
### Content layout
|
|
861
867
|
|
|
868
|
+
All build inputs live under `content/`:
|
|
869
|
+
|
|
870
|
+
```
|
|
871
|
+
content/
|
|
872
|
+
├── pipeline/ # 60 meta-prompts organized by 16 phases (phases 0-15, including build)
|
|
873
|
+
├── tools/ # 10 tool meta-prompts (stateless, category: tool)
|
|
874
|
+
├── knowledge/ # 61 domain expertise entries (core, product, review, validation, finalization, execution, tools)
|
|
875
|
+
├── methodology/ # 3 YAML presets (deep, mvp, custom)
|
|
876
|
+
└── skills/ # 3 skill templates with {{markers}} for multi-platform resolution
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
Generated output (gitignored):
|
|
862
880
|
```
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
knowledge/ # 61 domain expertise entries (core, product, review, validation, finalization, execution, tools)
|
|
866
|
-
methodology/ # 3 YAML presets (deep, mvp, custom)
|
|
867
|
-
commands/ # 72 Claude Code slash commands (60 pipeline + 9 tools + 3 supplemental)
|
|
868
|
-
skills/ # 3 Claude Code skills (pipeline reference, runner, multi-model dispatch)
|
|
869
|
-
agent-skills/ # 2 shared agent skills packaged for Claude Code and Gemini installs
|
|
881
|
+
skills/ # Resolved skills (built from content/skills/ templates)
|
|
882
|
+
dist/ # Compiled TypeScript output
|
|
870
883
|
```
|
|
871
884
|
|
|
872
885
|
### Testing
|
|
@@ -880,12 +893,12 @@ agent-skills/ # 2 shared agent skills packaged for Claude Code and Gemin
|
|
|
880
893
|
|
|
881
894
|
### Contributing
|
|
882
895
|
|
|
883
|
-
1. Meta-prompt content lives in `pipeline/` — edit the relevant `.md` file
|
|
896
|
+
1. Meta-prompt content lives in `content/pipeline/` — edit the relevant `.md` file
|
|
884
897
|
2. If you changed adapter behavior, run `scaffold build` in a test project and inspect the generated artifacts under `.scaffold/generated/` plus the Gemini project-local outputs (`.agents/skills/`, `GEMINI.md`, `.gemini/commands/scaffold/`).
|
|
885
898
|
3. Run `make check-all` (lint + type-check + test + evals) before submitting
|
|
886
|
-
4. Knowledge entries live in `knowledge/` — follow the existing frontmatter schema
|
|
887
|
-
5. ADRs documenting architectural decisions are in `docs/
|
|
888
|
-
6. Run `make hooks` to install git hooks (ShellCheck, frontmatter validation
|
|
899
|
+
4. Knowledge entries live in `content/knowledge/` — follow the existing frontmatter schema
|
|
900
|
+
5. ADRs documenting architectural decisions are in `docs/architecture/adrs/`
|
|
901
|
+
6. Run `make hooks` to install git hooks (ShellCheck, frontmatter validation)
|
|
889
902
|
|
|
890
903
|
## License
|
|
891
904
|
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-skeleton-generation
|
|
3
|
+
description: Patterns for translating acceptance criteria into framework-specific test skeleton files
|
|
4
|
+
topics: [testing, test-generation, acceptance-criteria, tdd, test-skeletons]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test Skeleton Generation
|
|
8
|
+
|
|
9
|
+
This knowledge covers the translation of user story acceptance criteria (Given/When/Then format) into framework-specific test skeleton files. Skeletons are pending/skipped test stubs — they document expected behavior and provide a TDD starting point, but contain no implementation logic.
|
|
10
|
+
|
|
11
|
+
This is distinct from testing strategy (`testing-strategy`), which covers overall test architecture, and user stories (`user-stories`), which covers story authoring. This knowledge bridges the two: given well-written ACs and a chosen test framework, produce a complete set of traceable test skeletons.
|
|
12
|
+
|
|
13
|
+
## Summary
|
|
14
|
+
|
|
15
|
+
- **Purpose**: Translate user story acceptance criteria (Given/When/Then) into pending test cases in the project's test framework, one test per AC.
|
|
16
|
+
- **Output format**: One test file per story (or per epic), with each AC as a pending/skipped test case that documents the expected behavior without implementing it.
|
|
17
|
+
- **Framework mapping**: `describe` = story, `it`/`test` = AC criterion. For frameworks without pending support, use `it.skip` or `@pytest.mark.skip` with the AC text as the test name.
|
|
18
|
+
- **Layer assignment**: Each test skeleton is tagged with its execution layer (unit, integration, e2e) based on what the AC tests — data validation = unit, API flow = integration, user workflow = e2e.
|
|
19
|
+
- **ID tracing**: Every test name includes the story ID and criterion ID (e.g., `US-3.2: Given a logged-in user...`) so implementation agents can trace tests back to requirements.
|
|
20
|
+
- **Story-tests-map**: A traceability matrix (`docs/story-tests-map.md`) maps every story to its test files, every AC to its test case, and assigns execution layers.
|
|
21
|
+
|
|
22
|
+
## Deep Guidance
|
|
23
|
+
|
|
24
|
+
### Scope Boundary
|
|
25
|
+
|
|
26
|
+
**In scope:**
|
|
27
|
+
- Translating GWT acceptance criteria into pending test stubs
|
|
28
|
+
- Assigning test execution layers (unit, integration, e2e)
|
|
29
|
+
- Creating the story-tests-map traceability matrix
|
|
30
|
+
- Framework-specific skeleton patterns (vitest, pytest, bats, Go, etc.)
|
|
31
|
+
- Test file naming and directory conventions
|
|
32
|
+
|
|
33
|
+
**Out of scope:**
|
|
34
|
+
- Implementing test logic (skeletons are stubs only)
|
|
35
|
+
- Choosing the test framework (read `docs/tech-stack.md`)
|
|
36
|
+
- Writing acceptance criteria (that's the user stories step)
|
|
37
|
+
- Test infrastructure setup (that's the TDD standards step)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### Translation Rules
|
|
42
|
+
|
|
43
|
+
**Given/When/Then to Test Structure:**
|
|
44
|
+
|
|
45
|
+
The GWT format maps directly to the Arrange/Act/Assert pattern used in every test framework:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Given [precondition] -> test setup / arrange
|
|
49
|
+
When [action] -> act / trigger
|
|
50
|
+
Then [expected outcome] -> assert / verify
|
|
51
|
+
And [additional outcome] -> additional assertion
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Multiple `Given` clauses become multiple setup steps. Multiple `Then` clauses become multiple assertions in the same test. `And` following a `Given` is another precondition; `And` following a `Then` is another assertion.
|
|
55
|
+
|
|
56
|
+
**Compound ACs:**
|
|
57
|
+
|
|
58
|
+
When an AC has multiple `When` clauses, each `When` is a separate test case. The common `Given` preconditions are shared setup (a `beforeEach` or fixture), and each `When/Then` pair becomes its own test.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Framework-Specific Patterns
|
|
63
|
+
|
|
64
|
+
#### vitest / jest (TypeScript/JavaScript)
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { describe, it } from 'vitest';
|
|
68
|
+
|
|
69
|
+
describe('US-3: User can reset their password', () => {
|
|
70
|
+
it.skip('AC-3.1: Given a registered user, when they request a password reset, then a reset email is sent', () => {
|
|
71
|
+
// Arrange: registered user exists
|
|
72
|
+
// Act: request password reset
|
|
73
|
+
// Assert: reset email sent
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it.skip('AC-3.2: Given a valid reset token, when the user submits a new password, then the password is updated', () => {
|
|
77
|
+
// Arrange: valid reset token exists
|
|
78
|
+
// Act: submit new password
|
|
79
|
+
// Assert: password updated in database
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it.skip('AC-3.3: Given an expired reset token, when the user submits a new password, then an error is shown', () => {
|
|
83
|
+
// Arrange: expired reset token
|
|
84
|
+
// Act: submit new password
|
|
85
|
+
// Assert: error message displayed, password unchanged
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### pytest (Python)
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
import pytest
|
|
94
|
+
|
|
95
|
+
class TestUS3UserCanResetPassword:
|
|
96
|
+
"""US-3: User can reset their password"""
|
|
97
|
+
|
|
98
|
+
@pytest.mark.skip(reason="skeleton")
|
|
99
|
+
def test_ac_3_1_given_registered_user_when_request_reset_then_email_sent(self):
|
|
100
|
+
"""AC-3.1: Given a registered user, when they request a password reset, then a reset email is sent"""
|
|
101
|
+
# Arrange: registered user exists
|
|
102
|
+
# Act: request password reset
|
|
103
|
+
# Assert: reset email sent
|
|
104
|
+
pass
|
|
105
|
+
|
|
106
|
+
@pytest.mark.skip(reason="skeleton")
|
|
107
|
+
def test_ac_3_2_given_valid_token_when_submit_password_then_updated(self):
|
|
108
|
+
"""AC-3.2: Given a valid reset token, when the user submits a new password, then the password is updated"""
|
|
109
|
+
# Arrange: valid reset token exists
|
|
110
|
+
# Act: submit new password
|
|
111
|
+
# Assert: password updated in database
|
|
112
|
+
pass
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### bats (Bash)
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# US-3: User can reset their password
|
|
119
|
+
|
|
120
|
+
@test "AC-3.1: Given a registered user, when they request a password reset, then a reset email is sent" {
|
|
121
|
+
skip "skeleton"
|
|
122
|
+
# Arrange: registered user exists
|
|
123
|
+
# Act: request password reset
|
|
124
|
+
# Assert: reset email sent
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@test "AC-3.2: Given a valid reset token, when the user submits a new password, then the password is updated" {
|
|
128
|
+
skip "skeleton"
|
|
129
|
+
# Arrange: valid reset token exists
|
|
130
|
+
# Act: submit new password
|
|
131
|
+
# Assert: password updated in database
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### Go testing
|
|
136
|
+
|
|
137
|
+
```go
|
|
138
|
+
func TestUS3_UserCanResetPassword(t *testing.T) {
|
|
139
|
+
t.Run("AC-3.1: Given a registered user, when they request a password reset, then a reset email is sent", func(t *testing.T) {
|
|
140
|
+
t.Skip("skeleton")
|
|
141
|
+
// Arrange: registered user exists
|
|
142
|
+
// Act: request password reset
|
|
143
|
+
// Assert: reset email sent
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
t.Run("AC-3.2: Given a valid reset token, when the user submits a new password, then the password is updated", func(t *testing.T) {
|
|
147
|
+
t.Skip("skeleton")
|
|
148
|
+
// Arrange: valid reset token exists
|
|
149
|
+
// Act: submit new password
|
|
150
|
+
// Assert: password updated in database
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Framework-Specific Summary Table
|
|
156
|
+
|
|
157
|
+
| Framework | Story Group | Test Case | Pending Marker |
|
|
158
|
+
|-----------|------------|-----------|----------------|
|
|
159
|
+
| vitest/jest | `describe('US-3: Story title')` | `it('AC-3.1: Given X when Y then Z')` | `it.skip(...)` or `it.todo(...)` |
|
|
160
|
+
| pytest | `class TestUS3StoryTitle:` | `def test_ac_3_1_given_x_when_y_then_z(self):` | `@pytest.mark.skip(reason='skeleton')` |
|
|
161
|
+
| bats | comment block with story ID | `@test "AC-3.1: Given X when Y then Z"` | `skip "skeleton"` |
|
|
162
|
+
| Go testing | `func TestUS3_StoryTitle(t *testing.T)` | `t.Run("AC-3.1: Given X when Y then Z", ...)` | `t.Skip("skeleton")` |
|
|
163
|
+
| RSpec | `describe 'US-3: Story title'` | `it 'AC-3.1: ...'` | `xit 'AC-3.1: ...'` or `pending` |
|
|
164
|
+
| JUnit 5 | `@Nested class US3_StoryTitle` | `@Test @Disabled("skeleton")` | `@Disabled("skeleton")` |
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### Layer Assignment Heuristic
|
|
169
|
+
|
|
170
|
+
Each test skeleton is tagged with its execution layer. This determines where the test runs in CI and what infrastructure it requires.
|
|
171
|
+
|
|
172
|
+
| AC Pattern | Layer | Example |
|
|
173
|
+
|------------|-------|---------|
|
|
174
|
+
| Validates input/output of a single function | Unit | "Then the email format is validated" |
|
|
175
|
+
| Tests interaction between components | Integration | "Then the order is saved to the database" |
|
|
176
|
+
| Tests a user-visible workflow end-to-end | E2E | "Then the user sees a confirmation page" |
|
|
177
|
+
| Tests error handling at a boundary | Integration | "Then a 400 error is returned with details" |
|
|
178
|
+
| Tests a non-functional requirement | Varies | Perf = benchmark, security = integration |
|
|
179
|
+
|
|
180
|
+
#### Layer Decision Rules
|
|
181
|
+
|
|
182
|
+
When the layer is ambiguous, apply these rules in order:
|
|
183
|
+
|
|
184
|
+
1. **Does the AC mention a UI element or user-visible state?** → E2E
|
|
185
|
+
2. **Does the AC cross a service or component boundary?** → Integration
|
|
186
|
+
3. **Does the AC test a single function's behavior with known inputs/outputs?** → Unit
|
|
187
|
+
4. **Does the AC test data persistence or retrieval?** → Integration
|
|
188
|
+
5. **Does the AC test an external service interaction?** → Integration (with mocks)
|
|
189
|
+
|
|
190
|
+
#### Layer Tags in Test Files
|
|
191
|
+
|
|
192
|
+
Add layer tags as comments or test metadata so CI can filter by layer:
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// @layer: integration
|
|
196
|
+
describe('US-3: User can reset their password', () => { ... });
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
@pytest.mark.integration
|
|
201
|
+
class TestUS3UserCanResetPassword:
|
|
202
|
+
...
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### Test File Naming and Organization
|
|
208
|
+
|
|
209
|
+
#### File Naming Convention
|
|
210
|
+
|
|
211
|
+
Test files follow the pattern: `{story-id}-{slug}.test.{ext}`
|
|
212
|
+
|
|
213
|
+
Examples:
|
|
214
|
+
- `us-1-user-registration.test.ts`
|
|
215
|
+
- `us-2-password-reset.test.ts`
|
|
216
|
+
- `us-3-profile-management.test.ts`
|
|
217
|
+
|
|
218
|
+
The story ID prefix ensures files sort in story order. The slug provides human-readable context.
|
|
219
|
+
|
|
220
|
+
#### Directory Structure
|
|
221
|
+
|
|
222
|
+
Test skeletons go in the acceptance test directory defined in `docs/project-structure.md`. If no convention exists, default to:
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
tests/
|
|
226
|
+
acceptance/
|
|
227
|
+
us-1-user-registration.test.ts
|
|
228
|
+
us-2-password-reset.test.ts
|
|
229
|
+
us-3-profile-management.test.ts
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
For projects that split tests by layer:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
tests/
|
|
236
|
+
unit/
|
|
237
|
+
us-1-user-registration.unit.test.ts
|
|
238
|
+
integration/
|
|
239
|
+
us-1-user-registration.integration.test.ts
|
|
240
|
+
e2e/
|
|
241
|
+
us-1-user-registration.e2e.test.ts
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Story-Tests-Map Format
|
|
247
|
+
|
|
248
|
+
The `docs/story-tests-map.md` output maps every story to its test files. This is the primary traceability artifact.
|
|
249
|
+
|
|
250
|
+
```markdown
|
|
251
|
+
# Story-Tests Map
|
|
252
|
+
|
|
253
|
+
## Coverage Summary
|
|
254
|
+
|
|
255
|
+
| Metric | Value |
|
|
256
|
+
|--------|-------|
|
|
257
|
+
| Total stories | 12 |
|
|
258
|
+
| Stories with tests | 12 |
|
|
259
|
+
| Total ACs | 47 |
|
|
260
|
+
| ACs with test cases | 47 |
|
|
261
|
+
| Coverage | 100% |
|
|
262
|
+
|
|
263
|
+
## Traceability Matrix
|
|
264
|
+
|
|
265
|
+
| Story ID | Story Title | Test File | Layer | AC Count |
|
|
266
|
+
|----------|------------|-----------|-------|----------|
|
|
267
|
+
| US-1 | User registration | tests/acceptance/us-1-registration.test.ts | integration | 4 |
|
|
268
|
+
| US-2 | Password reset | tests/acceptance/us-2-password-reset.test.ts | e2e | 3 |
|
|
269
|
+
| US-3 | Profile management | tests/acceptance/us-3-profile.test.ts | unit | 5 |
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The map must be updated whenever stories are added, removed, or have ACs changed. In update mode, new rows are appended and the coverage summary is recalculated.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
### Handling Edge Cases
|
|
277
|
+
|
|
278
|
+
#### Stories Without GWT Format
|
|
279
|
+
|
|
280
|
+
If acceptance criteria are not in Given/When/Then format, convert them:
|
|
281
|
+
- "Users can search by keyword" → "Given a user on the search page, when they enter a keyword and submit, then matching results are displayed"
|
|
282
|
+
- Preserve the original AC text as a comment in the test case
|
|
283
|
+
|
|
284
|
+
#### Stories With Many ACs
|
|
285
|
+
|
|
286
|
+
Stories with more than 10 ACs may indicate the story is too large. Flag this in the story-tests-map but generate all skeletons regardless — the story decomposition is a separate concern.
|
|
287
|
+
|
|
288
|
+
#### Shared Preconditions
|
|
289
|
+
|
|
290
|
+
When multiple ACs share the same `Given` precondition, use the framework's shared setup:
|
|
291
|
+
- vitest/jest: `beforeEach` or `beforeAll`
|
|
292
|
+
- pytest: `@pytest.fixture`
|
|
293
|
+
- bats: `setup()`
|
|
294
|
+
- Go: helper function called at the start of each subtest
|
|
295
|
+
|
|
296
|
+
#### Negative Test Cases
|
|
297
|
+
|
|
298
|
+
For deep methodology, generate negative test cases for each happy-path AC:
|
|
299
|
+
- "Given X, when Y, then Z" → also generate "Given NOT X, when Y, then error"
|
|
300
|
+
- Negative cases get their own AC IDs: `AC-3.1-NEG`
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### Anti-Patterns
|
|
305
|
+
|
|
306
|
+
- Don't implement test logic — skeletons are pending/skipped stubs only
|
|
307
|
+
- Don't combine multiple ACs into one test — one AC = one test case
|
|
308
|
+
- Don't omit the story/criterion ID from test names — traceability is the point
|
|
309
|
+
- Don't guess the test framework — read `docs/tech-stack.md` and `docs/tdd-standards.md`
|
|
310
|
+
- Don't create test files outside the project's test directory convention
|
|
311
|
+
- Don't add assertion logic to skeletons — that's the implementation agent's job
|
|
312
|
+
- Don't generate skeletons for non-functional requirements unless they have explicit ACs
|
|
313
|
+
- Don't skip the story-tests-map — it's the verification artifact that proves coverage
|
|
@@ -42,7 +42,7 @@ Read these documents in order before proposing any changes:
|
|
|
42
42
|
1. **Product vision** (`docs/vision.md` or equivalent) — understand the project's purpose and direction
|
|
43
43
|
2. **PRD** (`docs/prd.md`) — understand existing requirements and constraints
|
|
44
44
|
3. **User stories** (`docs/user-stories.md`) — understand who uses the system and how
|
|
45
|
-
4. **Architecture** (`docs/architecture.md` or ADRs) — understand the technical structure
|
|
45
|
+
4. **Architecture** (`docs/system-architecture.md` or ADRs) — understand the technical structure
|
|
46
46
|
5. **Coding standards** (`docs/coding-standards.md`) — understand conventions you must follow
|
|
47
47
|
6. **TDD standards** (`docs/tdd-standards.md`) — understand testing expectations
|
|
48
48
|
7. **Project structure** (`docs/project-structure.md`) — understand where code lives
|