@zigrivers/scaffold 2.1.2 → 2.28.1
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 +272 -59
- package/knowledge/core/adr-craft.md +53 -0
- package/knowledge/core/ai-memory-management.md +246 -0
- package/knowledge/core/api-design.md +4 -0
- package/knowledge/core/claude-md-patterns.md +254 -0
- package/knowledge/core/coding-conventions.md +246 -0
- package/knowledge/core/database-design.md +4 -0
- package/knowledge/core/design-system-tokens.md +465 -0
- package/knowledge/core/dev-environment.md +223 -0
- package/knowledge/core/domain-modeling.md +4 -0
- package/knowledge/core/eval-craft.md +1008 -0
- package/knowledge/core/multi-model-review-dispatch.md +250 -0
- package/knowledge/core/operations-runbook.md +37 -226
- package/knowledge/core/project-structure-patterns.md +231 -0
- package/knowledge/core/review-step-template.md +247 -0
- package/knowledge/core/{security-review.md → security-best-practices.md} +5 -1
- package/knowledge/core/task-decomposition.md +57 -34
- package/knowledge/core/task-tracking.md +225 -0
- package/knowledge/core/tech-stack-selection.md +214 -0
- package/knowledge/core/testing-strategy.md +63 -70
- package/knowledge/core/user-stories.md +69 -60
- package/knowledge/core/user-story-innovation.md +57 -0
- package/knowledge/core/ux-specification.md +5 -148
- package/knowledge/finalization/apply-fixes-and-freeze.md +165 -14
- package/knowledge/product/prd-craft.md +55 -34
- package/knowledge/review/review-adr.md +32 -0
- package/knowledge/review/{review-api-contracts.md → review-api-design.md} +34 -1
- package/knowledge/review/{review-database-schema.md → review-database-design.md} +27 -1
- package/knowledge/review/review-domain-modeling.md +33 -0
- package/knowledge/review/review-implementation-tasks.md +50 -0
- package/knowledge/review/review-operations.md +55 -0
- package/knowledge/review/review-prd.md +33 -0
- package/knowledge/review/review-security.md +53 -0
- package/knowledge/review/review-system-architecture.md +28 -0
- package/knowledge/review/review-testing-strategy.md +51 -0
- package/knowledge/review/review-user-stories.md +54 -0
- package/knowledge/review/{review-ux-spec.md → review-ux-specification.md} +37 -1
- package/methodology/custom-defaults.yml +32 -3
- package/methodology/deep.yml +32 -3
- package/methodology/mvp.yml +32 -3
- package/package.json +2 -1
- package/pipeline/architecture/review-architecture.md +18 -6
- package/pipeline/architecture/system-architecture.md +14 -2
- package/pipeline/consolidation/claude-md-optimization.md +73 -0
- package/pipeline/consolidation/workflow-audit.md +73 -0
- package/pipeline/decisions/adrs.md +14 -2
- package/pipeline/decisions/review-adrs.md +18 -5
- package/pipeline/environment/ai-memory-setup.md +70 -0
- package/pipeline/environment/automated-pr-review.md +70 -0
- package/pipeline/environment/design-system.md +73 -0
- package/pipeline/environment/dev-env-setup.md +65 -0
- package/pipeline/environment/git-workflow.md +71 -0
- package/pipeline/finalization/apply-fixes-and-freeze.md +1 -1
- package/pipeline/finalization/developer-onboarding-guide.md +1 -1
- package/pipeline/finalization/implementation-playbook.md +3 -3
- package/pipeline/foundation/beads.md +68 -0
- package/pipeline/foundation/coding-standards.md +68 -0
- package/pipeline/foundation/project-structure.md +69 -0
- package/pipeline/foundation/tdd.md +60 -0
- package/pipeline/foundation/tech-stack.md +74 -0
- package/pipeline/integration/add-e2e-testing.md +65 -0
- package/pipeline/modeling/domain-modeling.md +14 -2
- package/pipeline/modeling/review-domain-modeling.md +18 -5
- package/pipeline/parity/platform-parity-review.md +70 -0
- package/pipeline/planning/implementation-plan-review.md +56 -0
- package/pipeline/planning/{implementation-tasks.md → implementation-plan.md} +29 -9
- package/pipeline/pre/create-prd.md +13 -4
- package/pipeline/pre/innovate-prd.md +37 -8
- package/pipeline/pre/innovate-user-stories.md +38 -7
- package/pipeline/pre/review-prd.md +18 -6
- package/pipeline/pre/review-user-stories.md +23 -6
- package/pipeline/pre/user-stories.md +12 -2
- package/pipeline/quality/create-evals.md +102 -0
- package/pipeline/quality/operations.md +38 -13
- package/pipeline/quality/review-operations.md +17 -5
- package/pipeline/quality/review-security.md +17 -5
- package/pipeline/quality/review-testing.md +20 -8
- package/pipeline/quality/security.md +25 -3
- package/pipeline/quality/story-tests.md +73 -0
- package/pipeline/specification/api-contracts.md +17 -2
- package/pipeline/specification/database-schema.md +17 -2
- package/pipeline/specification/review-api.md +18 -6
- package/pipeline/specification/review-database.md +18 -6
- package/pipeline/specification/review-ux.md +19 -7
- package/pipeline/specification/ux-spec.md +29 -10
- package/pipeline/validation/critical-path-walkthrough.md +34 -7
- package/pipeline/validation/cross-phase-consistency.md +34 -7
- package/pipeline/validation/decision-completeness.md +34 -7
- package/pipeline/validation/dependency-graph-validation.md +34 -7
- package/pipeline/validation/implementability-dry-run.md +34 -7
- package/pipeline/validation/scope-creep-check.md +34 -7
- package/pipeline/validation/traceability-matrix.md +34 -7
- package/skills/multi-model-dispatch/SKILL.md +326 -0
- package/skills/scaffold-pipeline/SKILL.md +195 -0
- package/skills/scaffold-runner/SKILL.md +465 -0
- package/pipeline/planning/review-tasks.md +0 -38
- package/pipeline/quality/testing-strategy.md +0 -42
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scaffold
|
|
2
2
|
|
|
3
|
-
A TypeScript CLI that assembles AI-powered prompts at runtime to guide you from "I have an idea" to working software. Scaffold walks you through
|
|
3
|
+
A TypeScript CLI that assembles AI-powered prompts at runtime to guide you from "I have an idea" to working software. Scaffold walks you through 51 structured pipeline steps — organized into 14 phases — and Claude Code handles the research, planning, and implementation for you.
|
|
4
4
|
|
|
5
5
|
By the end, you'll have a fully planned, standards-documented, implementation-ready project with working code.
|
|
6
6
|
|
|
@@ -16,7 +16,12 @@ Here's how it works:
|
|
|
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
|
-
You can run steps
|
|
19
|
+
You can run steps two ways:
|
|
20
|
+
|
|
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
|
+
- **Slash commands**: `/scaffold:create-prd` in Claude Code — uses pre-rendered, self-contained prompts. Best for quick access to individual commands without the full pipeline ceremony.
|
|
23
|
+
|
|
24
|
+
Either way, Scaffold constructs the prompt and Claude does the work. The CLI tracks pipeline state and dependencies; slash commands are fire-and-forget.
|
|
20
25
|
|
|
21
26
|
## Key Concepts
|
|
22
27
|
|
|
@@ -24,15 +29,17 @@ You can run steps via the CLI (`scaffold run create-prd`) or via slash commands
|
|
|
24
29
|
|
|
25
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.
|
|
26
31
|
|
|
27
|
-
**Knowledge base** —
|
|
32
|
+
**Knowledge base** — 49 domain expertise entries in `knowledge/` covering testing strategy, domain modeling, API design, security best practices, eval craft, 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.
|
|
28
33
|
|
|
29
34
|
**Methodology presets** — Three built-in presets control which steps run and how deep the analysis goes:
|
|
30
|
-
- **deep** (depth 5) — all
|
|
35
|
+
- **deep** (depth 5) — all steps enabled, exhaustive analysis
|
|
31
36
|
- **mvp** (depth 1) — 7 critical steps, get to code fast
|
|
32
37
|
- **custom** (depth 1-5) — you choose which steps to enable and how deep each one goes
|
|
33
38
|
|
|
34
39
|
**Depth scale** (1-5) — Controls how thorough each step's output is, from "focus on the core deliverable" (1) to "explore all angles, tradeoffs, and edge cases" (5). Depth resolves with 4-level precedence: CLI flag > step override > custom default > preset default.
|
|
35
40
|
|
|
41
|
+
**Multi-model validation** — At depth 4-5, all 19 review and validation steps can dispatch independent reviews to Codex and/or Gemini CLIs. Two independent models catch more blind spots than one. When both CLIs are available, findings are reconciled by confidence level (both agree = high confidence, single model P0 = still actionable). Auth is verified before every dispatch (`codex login status`, `NO_BROWSER=true gemini -p "respond with ok"`). See the [Multi-Model Review](#multi-model-review) section.
|
|
42
|
+
|
|
36
43
|
**State management** — Pipeline progress is tracked in `.scaffold/state.json` with atomic file writes and crash recovery. An advisory lock prevents concurrent runs. Decisions are logged to an append-only `decisions.jsonl`.
|
|
37
44
|
|
|
38
45
|
**Dependency graph** — Steps declare their prerequisites in frontmatter. Scaffold builds a DAG, runs topological sort (Kahn's algorithm), detects cycles, and computes which steps are eligible at any point.
|
|
@@ -57,16 +64,22 @@ The AI coding assistant that runs the assembled prompts. Claude Code is a comman
|
|
|
57
64
|
|
|
58
65
|
### Optional
|
|
59
66
|
|
|
67
|
+
**Codex CLI** (for multi-model review)
|
|
68
|
+
Independent code review from a different AI model. Used at depth 4-5 by all review steps.
|
|
69
|
+
- Install: `npm install -g @openai/codex`
|
|
70
|
+
- Requires: ChatGPT subscription (Plus/Pro/Team)
|
|
71
|
+
- Verify: `codex --version`
|
|
72
|
+
|
|
73
|
+
**Gemini CLI** (for multi-model review)
|
|
74
|
+
Independent review from Google's model. Can run alongside or instead of Codex.
|
|
75
|
+
- Install: `npm install -g @google/gemini-cli`
|
|
76
|
+
- Requires: Google account (free tier available)
|
|
77
|
+
- Verify: `gemini --version`
|
|
78
|
+
|
|
60
79
|
**Playwright MCP** (web apps only)
|
|
61
80
|
Lets Claude control a real browser for visual testing and screenshots.
|
|
62
81
|
- Install: `claude mcp add playwright npx @playwright/mcp@latest`
|
|
63
82
|
|
|
64
|
-
**ChatGPT subscription** (for multi-model review)
|
|
65
|
-
One optional step (`multi-model-review`) sets up automated code review using both Claude and OpenAI's Codex. Requires a ChatGPT subscription (Plus, Pro, or Team). Skip this step if you don't have one.
|
|
66
|
-
|
|
67
|
-
**Codex CLI and/or Gemini CLI** (for multi-model stories review)
|
|
68
|
-
One optional step (`user-stories-multi-model-review`) runs independent AI reviewers against your user stories. You need at least one of: Codex CLI (requires ChatGPT subscription) or Gemini CLI (free tier available). See [Multi-Model Stories Review Setup](docs/multi-model-stories-review-setup.md).
|
|
69
|
-
|
|
70
83
|
## Installation
|
|
71
84
|
|
|
72
85
|
Scaffold has two parts that install separately:
|
|
@@ -93,16 +106,39 @@ brew install scaffold
|
|
|
93
106
|
|
|
94
107
|
Verify: `scaffold version`
|
|
95
108
|
|
|
96
|
-
### Step 2: Add
|
|
109
|
+
### Step 2: Add the plugin (recommended)
|
|
97
110
|
|
|
98
|
-
|
|
111
|
+
Install the Scaffold plugin inside Claude Code for slash commands AND the interactive runner skill:
|
|
99
112
|
|
|
100
113
|
```
|
|
101
114
|
/plugin marketplace add zigrivers/scaffold
|
|
102
115
|
/plugin install scaffold@zigrivers-scaffold
|
|
103
116
|
```
|
|
104
117
|
|
|
105
|
-
This
|
|
118
|
+
This gives you:
|
|
119
|
+
- **Slash commands** (`/scaffold:create-prd`, `/scaffold:tdd`, etc.) — quick access to any pipeline step
|
|
120
|
+
- **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
|
+
- **Pipeline reference skill** — shows pipeline ordering, dependencies, and completion status
|
|
122
|
+
- **Multi-model dispatch skill** — correct invocation patterns for Codex and Gemini CLIs
|
|
123
|
+
|
|
124
|
+
**Usage** — just tell Claude Code what you want in natural language:
|
|
125
|
+
```
|
|
126
|
+
"Run the next scaffold step" → previews prompt, asks decisions, executes
|
|
127
|
+
"Run scaffold create-prd" → same for a specific step
|
|
128
|
+
"Where am I in the pipeline?" → shows progress and next eligible steps
|
|
129
|
+
"What's left?" → compact view of remaining steps only
|
|
130
|
+
"Skip design-system and add-e2e-testing" → batch skip with reason
|
|
131
|
+
"Is add-e2e-testing applicable?" → checks platform detection without running
|
|
132
|
+
"Use depth 3 for everything" → remembers preference for the session
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
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
|
+
|
|
137
|
+
> **CLI-only users**: If you prefer not to install the plugin, add skills with one command:
|
|
138
|
+
> ```bash
|
|
139
|
+
> scaffold skill install
|
|
140
|
+
> ```
|
|
141
|
+
> This copies the Scaffold Runner, Pipeline Reference, and Multi-Model Dispatch skills to `.claude/skills/` in your project.
|
|
106
142
|
|
|
107
143
|
## Updating
|
|
108
144
|
|
|
@@ -126,6 +162,20 @@ brew upgrade scaffold
|
|
|
126
162
|
|
|
127
163
|
Or: `/plugin marketplace update zigrivers-scaffold`
|
|
128
164
|
|
|
165
|
+
### Existing projects
|
|
166
|
+
|
|
167
|
+
After upgrading the CLI, existing projects migrate automatically. 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.
|
|
168
|
+
|
|
169
|
+
**Step migrations handled automatically:**
|
|
170
|
+
- `add-playwright` / `add-maestro` → `add-e2e-testing`
|
|
171
|
+
- `multi-model-review` → `automated-pr-review`
|
|
172
|
+
- `user-stories-multi-model-review` → removed (folded into `review-user-stories`)
|
|
173
|
+
- `claude-code-permissions` → removed (folded into `git-workflow` + `tech-stack`)
|
|
174
|
+
- `multi-model-review-tasks` → removed (folded into `implementation-plan-review`)
|
|
175
|
+
- `testing-strategy` → `tdd`, `implementation-tasks` → `implementation-plan`, `review-tasks` → `implementation-plan-review`
|
|
176
|
+
|
|
177
|
+
The PRD is always created as `docs/plan.md`. If you have a legacy `docs/prd.md` from an older version, the context gatherer resolves aliased paths so downstream steps find your PRD regardless.
|
|
178
|
+
|
|
129
179
|
## Quick Start
|
|
130
180
|
|
|
131
181
|
**1. Create a new project and initialize Scaffold**
|
|
@@ -168,7 +218,7 @@ scaffold run user-stories
|
|
|
168
218
|
# ... and so on
|
|
169
219
|
```
|
|
170
220
|
|
|
171
|
-
Each step tells you what to run next. Use `scaffold status` at any time to see the full pipeline state, or `scaffold dashboard` to open a visual progress dashboard in your browser.
|
|
221
|
+
Each step tells you what to run next. Use `scaffold status` at any time to see the full pipeline state, `scaffold status --compact` for just the remaining work, or `scaffold dashboard` to open a visual progress dashboard in your browser.
|
|
172
222
|
|
|
173
223
|
## The Pipeline
|
|
174
224
|
|
|
@@ -183,9 +233,41 @@ Define what you're building.
|
|
|
183
233
|
| `review-prd` | Structured review of the PRD for completeness and quality |
|
|
184
234
|
| `user-stories` | Creates detailed user stories for every PRD feature |
|
|
185
235
|
| `innovate-user-stories` | Gap analysis and UX innovation pass on user stories |
|
|
186
|
-
| `review-user-stories` | Structured review
|
|
236
|
+
| `review-user-stories` | Structured review with optional multi-model validation and requirements traceability at depth 4-5 |
|
|
237
|
+
|
|
238
|
+
### Phase 2 — Project Foundation (foundation)
|
|
239
|
+
|
|
240
|
+
Set up tooling, standards, and project structure.
|
|
241
|
+
|
|
242
|
+
| Step | What It Does |
|
|
243
|
+
|------|-------------|
|
|
244
|
+
| `beads` | Initialize Beads task tracking and create CLAUDE.md *(optional)* |
|
|
245
|
+
| `tech-stack` | Research and document technology choices; adds stack-specific safety rules |
|
|
246
|
+
| `coding-standards` | Create coding standards with linter/formatter configs |
|
|
247
|
+
| `tdd` | Define testing conventions, TDD workflow, test pyramid, coverage strategy |
|
|
248
|
+
| `project-structure` | Design and scaffold the directory layout |
|
|
249
|
+
|
|
250
|
+
### Phase 3 — Development Environment (environment)
|
|
187
251
|
|
|
188
|
-
|
|
252
|
+
Configure the working environment.
|
|
253
|
+
|
|
254
|
+
| Step | What It Does |
|
|
255
|
+
|------|-------------|
|
|
256
|
+
| `dev-env-setup` | Set up local dev environment with live reload |
|
|
257
|
+
| `design-system` | Create design tokens and component patterns *(web apps only)* |
|
|
258
|
+
| `git-workflow` | Configure branching, CI, worktree scripts, and project safety permissions |
|
|
259
|
+
| `automated-pr-review` | Agent-driven PR review with local CLI or external reviewers *(optional)* |
|
|
260
|
+
| `ai-memory-setup` | Configure AI memory: modular `.claude/rules/`, optional MCP memory server, external docs |
|
|
261
|
+
|
|
262
|
+
### Phase 4 — Testing Integration (integration)
|
|
263
|
+
|
|
264
|
+
Add E2E testing frameworks.
|
|
265
|
+
|
|
266
|
+
| Step | What It Does |
|
|
267
|
+
|------|-------------|
|
|
268
|
+
| `add-e2e-testing` | Auto-detects platform, configures Playwright (web) and/or Maestro (mobile) *(optional)* |
|
|
269
|
+
|
|
270
|
+
### Phase 5 — Domain Modeling (modeling)
|
|
189
271
|
|
|
190
272
|
Understand the problem domain.
|
|
191
273
|
|
|
@@ -194,7 +276,7 @@ Understand the problem domain.
|
|
|
194
276
|
| `domain-modeling` | DDD analysis — bounded contexts, aggregates, value objects |
|
|
195
277
|
| `review-domain-modeling` | Review of domain model for correctness and completeness |
|
|
196
278
|
|
|
197
|
-
### Phase
|
|
279
|
+
### Phase 6 — Architecture Decisions (decisions)
|
|
198
280
|
|
|
199
281
|
Record key technical decisions.
|
|
200
282
|
|
|
@@ -203,7 +285,7 @@ Record key technical decisions.
|
|
|
203
285
|
| `adrs` | Creates Architecture Decision Records for major choices |
|
|
204
286
|
| `review-adrs` | Review of ADRs for completeness and rationale |
|
|
205
287
|
|
|
206
|
-
### Phase
|
|
288
|
+
### Phase 7 — System Architecture (architecture)
|
|
207
289
|
|
|
208
290
|
Design the system.
|
|
209
291
|
|
|
@@ -212,42 +294,60 @@ Design the system.
|
|
|
212
294
|
| `system-architecture` | Component design, layering, patterns, scalability |
|
|
213
295
|
| `review-architecture` | Structured architecture review |
|
|
214
296
|
|
|
215
|
-
### Phase
|
|
297
|
+
### Phase 8 — Specifications (specification)
|
|
216
298
|
|
|
217
299
|
Detail the interfaces.
|
|
218
300
|
|
|
219
301
|
| Step | What It Does |
|
|
220
302
|
|------|-------------|
|
|
221
|
-
| `database-schema` | Database design — normalization, indexing, migrations |
|
|
222
|
-
| `review-database` | Review of database schema |
|
|
223
|
-
| `api-contracts` | REST/GraphQL contracts, versioning, error handling |
|
|
224
|
-
| `review-api` | Review of API contracts |
|
|
225
|
-
| `ux-spec` | Interaction design, usability, user flows |
|
|
226
|
-
| `review-ux` | Review of UX specification |
|
|
303
|
+
| `database-schema` | Database design — normalization, indexing, migrations *(if applicable)* |
|
|
304
|
+
| `review-database` | Review of database schema *(if applicable)* |
|
|
305
|
+
| `api-contracts` | REST/GraphQL contracts, versioning, error handling *(if applicable)* |
|
|
306
|
+
| `review-api` | Review of API contracts *(if applicable)* |
|
|
307
|
+
| `ux-spec` | Interaction design, usability, user flows *(if applicable)* |
|
|
308
|
+
| `review-ux` | Review of UX specification *(if applicable)* |
|
|
227
309
|
|
|
228
|
-
### Phase
|
|
310
|
+
### Phase 9 — Quality (quality)
|
|
229
311
|
|
|
230
312
|
Plan for quality, security, and operations.
|
|
231
313
|
|
|
232
314
|
| Step | What It Does |
|
|
233
315
|
|------|-------------|
|
|
234
|
-
| `testing-strategy` | Test pyramid, patterns, coverage strategy |
|
|
235
316
|
| `review-testing` | Review of testing strategy |
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
317
|
+
| `story-tests` | Generate tagged test skeletons from user story acceptance criteria |
|
|
318
|
+
| `create-evals` | Generate project-specific eval checks from standards docs |
|
|
238
319
|
| `operations` | CI/CD, deployment, monitoring, runbooks |
|
|
239
320
|
| `review-operations` | Review of operations plan |
|
|
321
|
+
| `security` | OWASP, threat modeling, security controls |
|
|
322
|
+
| `review-security` | Security review — **highest priority for multi-model validation** |
|
|
240
323
|
|
|
241
|
-
### Phase
|
|
324
|
+
### Phase 10 — Platform Parity (parity)
|
|
325
|
+
|
|
326
|
+
Cross-platform parity audits.
|
|
327
|
+
|
|
328
|
+
| Step | What It Does |
|
|
329
|
+
|------|-------------|
|
|
330
|
+
| `platform-parity-review` | Audit platform coverage across docs *(multi-platform only)* |
|
|
331
|
+
|
|
332
|
+
### Phase 11 — Consolidation (consolidation)
|
|
333
|
+
|
|
334
|
+
Clean up and verify before planning implementation.
|
|
335
|
+
|
|
336
|
+
| Step | What It Does |
|
|
337
|
+
|------|-------------|
|
|
338
|
+
| `claude-md-optimization` | Consolidate and optimize CLAUDE.md |
|
|
339
|
+
| `workflow-audit` | Verify workflow consistency across all docs |
|
|
340
|
+
|
|
341
|
+
### Phase 12 — Planning (planning)
|
|
242
342
|
|
|
243
343
|
Break work into implementable tasks.
|
|
244
344
|
|
|
245
345
|
| Step | What It Does |
|
|
246
346
|
|------|-------------|
|
|
247
|
-
| `implementation-
|
|
248
|
-
| `review
|
|
347
|
+
| `implementation-plan` | Decompose stories into a task graph with dependencies |
|
|
348
|
+
| `implementation-plan-review` | Review task quality, coverage, sizing, and multi-model validation (depth 4+) |
|
|
249
349
|
|
|
250
|
-
### Phase
|
|
350
|
+
### Phase 13 — Validation (validation)
|
|
251
351
|
|
|
252
352
|
Cross-phase audits before implementation.
|
|
253
353
|
|
|
@@ -261,25 +361,74 @@ Cross-phase audits before implementation.
|
|
|
261
361
|
| `cross-phase-consistency` | Alignment check across all phases |
|
|
262
362
|
| `critical-path-walkthrough` | Identify the critical implementation path |
|
|
263
363
|
|
|
264
|
-
### Phase
|
|
364
|
+
### Phase 14 — Finalization (finalization)
|
|
265
365
|
|
|
266
366
|
Lock it down and start building.
|
|
267
367
|
|
|
268
368
|
| Step | What It Does |
|
|
269
369
|
|------|-------------|
|
|
270
|
-
| `
|
|
271
|
-
| `developer-onboarding-guide` |
|
|
272
|
-
| `
|
|
370
|
+
| `apply-fixes-and-freeze` | Apply all validation findings and freeze documentation |
|
|
371
|
+
| `developer-onboarding-guide` | "Start here" guide for new contributors and AI agents |
|
|
372
|
+
| `implementation-playbook` | Operational guide agents follow during implementation |
|
|
373
|
+
|
|
374
|
+
## Multi-Model Review
|
|
375
|
+
|
|
376
|
+
At depth 4-5, all 19 review and validation steps can dispatch independent reviews to Codex and/or Gemini CLIs. This catches blind spots that a single model misses — what Claude considers correct, Codex or Gemini may flag as problematic. Auth is verified before every dispatch — previous auth failures do not exempt subsequent dispatches.
|
|
377
|
+
|
|
378
|
+
### How It Works
|
|
379
|
+
|
|
380
|
+
1. Claude completes its own structured multi-pass review first
|
|
381
|
+
2. The artifact is bundled with upstream references into a review prompt
|
|
382
|
+
3. Each available CLI reviews the artifact independently (they don't see each other's output)
|
|
383
|
+
4. Findings are reconciled by confidence level:
|
|
384
|
+
|
|
385
|
+
| Scenario | Confidence | Action |
|
|
386
|
+
|----------|-----------|--------|
|
|
387
|
+
| Both models flag the same issue | **High** | Fix immediately |
|
|
388
|
+
| Both models approve | **High** | Proceed confidently |
|
|
389
|
+
| One flags P0, other approves | **High** | Fix it (P0 is critical) |
|
|
390
|
+
| One flags P1, other approves | **Medium** | Review before fixing |
|
|
391
|
+
| Models contradict each other | **Low** | Present both to user |
|
|
392
|
+
|
|
393
|
+
### Which Steps Support It
|
|
394
|
+
|
|
395
|
+
**All 11 domain review steps**: review-prd, review-domain-modeling, review-adrs, review-architecture, review-database, review-api, review-ux, review-testing, review-operations, review-security, implementation-plan-review
|
|
396
|
+
|
|
397
|
+
**All 7 validation steps**: cross-phase-consistency, traceability-matrix, critical-path-walkthrough, implementability-dry-run, decision-completeness, dependency-graph-validation, scope-creep-check
|
|
398
|
+
|
|
399
|
+
**Plus 2 steps with built-in multi-model**: review-user-stories (depth 5), automated-pr-review (local CLI mode)
|
|
400
|
+
|
|
401
|
+
### CLI Invocation
|
|
402
|
+
|
|
403
|
+
The `multi-model-dispatch` skill documents the correct patterns:
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
# Codex (headless mode — use "exec", NOT bare "codex")
|
|
407
|
+
codex exec --skip-git-repo-check -s read-only --ephemeral "Review this artifact..." 2>/dev/null
|
|
408
|
+
|
|
409
|
+
# Gemini (headless mode — use "-p" flag, NO_BROWSER prevents consent prompt hang)
|
|
410
|
+
NO_BROWSER=true gemini -p "Review this artifact..." --output-format json --approval-mode yolo 2>/dev/null
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Checking CLI Availability
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
scaffold check add-e2e-testing # platform detection + brownfield
|
|
417
|
+
scaffold check automated-pr-review # GitHub remote + CLI detection
|
|
418
|
+
scaffold check ai-memory-setup # .claude/rules/, MCP servers, hooks
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
The `scaffold check` command reports which CLIs are available and recommends the appropriate review mode.
|
|
273
422
|
|
|
274
423
|
## Methodology Presets
|
|
275
424
|
|
|
276
|
-
Not every project needs all
|
|
425
|
+
Not every project needs all 51 steps. Choose a methodology when you run `scaffold init`:
|
|
277
426
|
|
|
278
427
|
### deep (depth 5)
|
|
279
|
-
All
|
|
428
|
+
All steps enabled. Comprehensive analysis of every angle — domain modeling, ADRs, security review, traceability matrix, the works. At depth 4-5, review steps dispatch to Codex/Gemini CLIs for multi-model validation. Best for complex systems, team projects, or when you want thorough documentation.
|
|
280
429
|
|
|
281
430
|
### mvp (depth 1)
|
|
282
|
-
Only 7 critical steps: create-prd, review-prd, user-stories, review-user-stories,
|
|
431
|
+
Only 7 critical steps: create-prd, review-prd, user-stories, review-user-stories, tdd, implementation-plan, and implementation-playbook. Minimal ceremony — get to code fast. Best for prototypes, hackathons, or solo projects.
|
|
283
432
|
|
|
284
433
|
### custom (configurable)
|
|
285
434
|
You choose which steps to enable and set a default depth (1-5). You can also override depth per step. Best when you know which parts of the pipeline matter for your project.
|
|
@@ -294,10 +443,12 @@ You can change methodology mid-pipeline with `scaffold init --methodology <prese
|
|
|
294
443
|
| `scaffold run <step>` | Execute a pipeline step (assembles and outputs the full prompt) |
|
|
295
444
|
| `scaffold build` | Generate platform adapter output (commands/, AGENTS.md, etc.) |
|
|
296
445
|
| `scaffold adopt` | Bootstrap state from existing artifacts (brownfield projects) |
|
|
297
|
-
| `scaffold skip <step
|
|
446
|
+
| `scaffold skip <step> [<step2>...]` | Skip one or more steps with a reason |
|
|
447
|
+
| `scaffold complete <step>` | Mark a step as completed (for steps executed outside `scaffold run`) |
|
|
298
448
|
| `scaffold reset <step>` | Reset a step back to pending |
|
|
299
|
-
| `scaffold status` | Show pipeline progress
|
|
449
|
+
| `scaffold status [--compact]` | Show pipeline progress (`--compact` shows only remaining work) |
|
|
300
450
|
| `scaffold next` | List next unblocked step(s) |
|
|
451
|
+
| `scaffold check <step>` | Check if a conditional step applies to this project |
|
|
301
452
|
| `scaffold validate` | Validate meta-prompts, config, state, and dependency graph |
|
|
302
453
|
| `scaffold list` | List all steps with status |
|
|
303
454
|
| `scaffold info <step>` | Show full metadata for a step |
|
|
@@ -306,20 +457,62 @@ You can change methodology mid-pipeline with `scaffold init --methodology <prese
|
|
|
306
457
|
| `scaffold dashboard` | Open a visual progress dashboard in your browser |
|
|
307
458
|
| `scaffold decisions` | Show all logged decisions |
|
|
308
459
|
| `scaffold knowledge` | Manage project-local knowledge base overrides |
|
|
460
|
+
| `scaffold skill install` | Install scaffold skills into the current project |
|
|
461
|
+
| `scaffold skill list` | Show available skills and installation status |
|
|
462
|
+
| `scaffold skill remove` | Remove scaffold skills from the current project |
|
|
463
|
+
|
|
464
|
+
### Examples
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
# Initialize a new project with deep methodology
|
|
468
|
+
scaffold init
|
|
469
|
+
|
|
470
|
+
# Run a specific step
|
|
471
|
+
scaffold run create-prd
|
|
472
|
+
|
|
473
|
+
# See what's next
|
|
474
|
+
scaffold next
|
|
475
|
+
|
|
476
|
+
# Check full pipeline status
|
|
477
|
+
scaffold status
|
|
478
|
+
|
|
479
|
+
# See only remaining work
|
|
480
|
+
scaffold status --compact
|
|
481
|
+
|
|
482
|
+
# Skip multiple steps at once
|
|
483
|
+
scaffold skip design-system add-e2e-testing --reason "backend-only project"
|
|
484
|
+
|
|
485
|
+
# Check if a step applies before running it
|
|
486
|
+
scaffold check add-e2e-testing
|
|
487
|
+
# → Applicable: yes | Platform: web | Brownfield: no | Mode: fresh
|
|
488
|
+
|
|
489
|
+
scaffold check automated-pr-review
|
|
490
|
+
# → Applicable: yes | GitHub remote: yes | Available CLIs: codex, gemini | Recommended: local-cli (dual-model)
|
|
491
|
+
|
|
492
|
+
scaffold check ai-memory-setup
|
|
493
|
+
# → Rules: no | MCP server: none | Hooks: none | Mode: fresh
|
|
494
|
+
|
|
495
|
+
# Re-run a completed step in update mode
|
|
496
|
+
scaffold reset review-prd --force
|
|
497
|
+
scaffold run review-prd
|
|
498
|
+
|
|
499
|
+
# Open the visual dashboard
|
|
500
|
+
scaffold dashboard
|
|
501
|
+
```
|
|
309
502
|
|
|
310
503
|
## Knowledge System
|
|
311
504
|
|
|
312
|
-
Scaffold ships with
|
|
505
|
+
Scaffold ships with 49 domain expertise entries organized in five categories:
|
|
313
506
|
|
|
314
|
-
- **core/** (
|
|
507
|
+
- **core/** (23 entries) — eval craft, testing strategy, domain modeling, API design, database design, system architecture, ADR craft, security best practices, operations, task decomposition, user stories, UX specification, design system tokens, user story innovation, AI memory management, coding conventions, tech stack selection, project structure patterns, task tracking, CLAUDE.md patterns, multi-model review dispatch, review step template, dev environment
|
|
315
508
|
- **product/** (3 entries) — PRD craft, PRD innovation, gap analysis
|
|
316
|
-
- **review/** (
|
|
317
|
-
- **validation/** (7 entries) — critical path analysis, cross-phase consistency, scope management, traceability, implementability
|
|
509
|
+
- **review/** (13 entries) — review methodology (shared), plus domain-specific review passes for PRD, user stories, domain modeling, ADRs, architecture, API design, database design, UX specification, testing, security, operations, implementation tasks
|
|
510
|
+
- **validation/** (7 entries) — critical path analysis, cross-phase consistency, scope management, traceability, implementability, decision completeness, dependency validation
|
|
318
511
|
- **finalization/** (3 entries) — implementation playbook, developer onboarding, apply-fixes-and-freeze
|
|
319
512
|
|
|
320
|
-
Each pipeline step declares which knowledge entries it needs in its frontmatter. The assembly engine injects them automatically.
|
|
513
|
+
Each pipeline step declares which knowledge entries it needs in its frontmatter. The assembly engine injects them automatically. Knowledge files with a `## Deep Guidance` section are optimized for the CLI — only the deep guidance content is loaded into the assembled prompt, skipping the summary to avoid redundancy with the prompt text.
|
|
321
514
|
|
|
322
|
-
### Project-local overrides
|
|
515
|
+
### Project-local overrides
|
|
323
516
|
|
|
324
517
|
Teams can create project-specific knowledge entries in `.scaffold/knowledge/` that layer over the global entries:
|
|
325
518
|
|
|
@@ -380,10 +573,11 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
|
|
|
380
573
|
| **CLAUDE.md** | A configuration file in your project root that tells Claude Code how to work in your project. |
|
|
381
574
|
| **Depth** | A 1-5 scale controlling how thorough each step's analysis is, from MVP-focused (1) to exhaustive (5). |
|
|
382
575
|
| **Frontmatter** | The YAML metadata block at the top of meta-prompt files, declaring dependencies, outputs, knowledge entries, and other configuration. |
|
|
383
|
-
| **Knowledge base** |
|
|
576
|
+
| **Knowledge base** | 49 domain expertise entries that get injected into prompts. Can be extended with project-local overrides. |
|
|
384
577
|
| **MCP** | Model Context Protocol. A way for Claude to use external tools like a headless browser. |
|
|
385
578
|
| **Meta-prompt** | A short intent declaration in `pipeline/` that gets assembled into a full prompt at runtime. |
|
|
386
579
|
| **Methodology** | A preset (deep, mvp, custom) controlling which steps run and at what depth. |
|
|
580
|
+
| **Multi-model review** | Independent validation from Codex/Gemini CLIs at depth 4-5, catching blind spots a single model misses. |
|
|
387
581
|
| **PRD** | Product Requirements Document. The foundation for everything Scaffold builds. |
|
|
388
582
|
| **Slash commands** | Commands in Claude Code starting with `/`. For example, `/scaffold:create-prd`. |
|
|
389
583
|
| **Worktrees** | A git feature for multiple working copies. Scaffold uses these for parallel agent execution. |
|
|
@@ -394,10 +588,10 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
|
|
|
394
588
|
Make sure Scaffold is installed — run `scaffold version` or `/scaffold:prompt-pipeline` in Claude Code.
|
|
395
589
|
|
|
396
590
|
**Which steps can I skip?**
|
|
397
|
-
Use `scaffold skip <step> --reason "..."` to skip any step. The mvp preset only enables 7 critical steps by default. With the custom preset, you choose exactly which steps to run.
|
|
591
|
+
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.
|
|
398
592
|
|
|
399
593
|
**Can I go back and re-run a step?**
|
|
400
|
-
Yes. Use `scaffold reset <step
|
|
594
|
+
Yes. Use `scaffold reset <step> --force` to reset it to pending, then `scaffold run <step>`. When re-running a completed step, Scaffold uses update mode — it loads the existing artifact and generates improvements rather than starting from scratch.
|
|
401
595
|
|
|
402
596
|
**Do I need to run every step in one sitting?**
|
|
403
597
|
No. Pipeline state is persisted in `.scaffold/state.json`. Run `scaffold status` when you come back to see where you left off, or `scaffold next` for what's unblocked.
|
|
@@ -411,6 +605,24 @@ Yes. Run `scaffold init` — the project detector will identify it as brownfield
|
|
|
411
605
|
**How do I customize the knowledge base for my project?**
|
|
412
606
|
Use `scaffold knowledge update <name>` to create a project-local override in `.scaffold/knowledge/`. It layers over the global entry and is committable for team sharing.
|
|
413
607
|
|
|
608
|
+
**How do I check if an optional step applies to my project?**
|
|
609
|
+
Run `scaffold check <step>`. For example, `scaffold check add-e2e-testing` detects whether your project has a web or mobile frontend. `scaffold check automated-pr-review` checks for a GitHub remote and available review CLIs.
|
|
610
|
+
|
|
611
|
+
**Codex CLI fails with "stdin is not a terminal"**
|
|
612
|
+
Use `codex exec "prompt"` (headless mode), not bare `codex "prompt"` (interactive TUI). The `multi-model-dispatch` skill documents the correct invocation patterns.
|
|
613
|
+
|
|
614
|
+
**Codex CLI fails with "Not inside a trusted directory"**
|
|
615
|
+
Add `--skip-git-repo-check` flag: `codex exec --skip-git-repo-check -s read-only --ephemeral "prompt"`. This is required when the project hasn't initialized git yet.
|
|
616
|
+
|
|
617
|
+
**Gemini CLI hangs on "Opening authentication page" or returns empty output**
|
|
618
|
+
Gemini's child process relaunch shows a consent prompt that hangs in non-TTY shells. All scaffold Gemini invocations now include `NO_BROWSER=true` to suppress this. If you're invoking Gemini manually, prepend `NO_BROWSER=true gemini -p "..."`. If auth tokens have actually expired, run `! gemini -p "hello"` to re-authenticate interactively. For CI/headless: set `GEMINI_API_KEY` env var instead of OAuth.
|
|
619
|
+
|
|
620
|
+
**Codex CLI auth expired ("refresh token", "sign in again")**
|
|
621
|
+
Run `! codex login` to re-authenticate interactively. For CI/headless: set `CODEX_API_KEY` env var. Check auth status with `codex login status`.
|
|
622
|
+
|
|
623
|
+
**I upgraded and my pipeline shows old step names**
|
|
624
|
+
Run `scaffold status` — the state manager automatically migrates old step names (e.g., `add-playwright` → `add-e2e-testing`, `multi-model-review` → `automated-pr-review`) and removes retired steps.
|
|
625
|
+
|
|
414
626
|
## Architecture (for contributors)
|
|
415
627
|
|
|
416
628
|
The project is a TypeScript CLI (`@zigrivers/scaffold`) built with yargs, targeting ES2022/Node16 ESM.
|
|
@@ -419,7 +631,7 @@ The project is a TypeScript CLI (`@zigrivers/scaffold`) built with yargs, target
|
|
|
419
631
|
|
|
420
632
|
```
|
|
421
633
|
src/
|
|
422
|
-
├── cli/commands/ #
|
|
634
|
+
├── cli/commands/ # 18 CLI command implementations
|
|
423
635
|
├── cli/middleware/ # Project root detection, output mode resolution
|
|
424
636
|
├── cli/output/ # Output strategies (interactive, json, auto)
|
|
425
637
|
├── core/assembly/ # Assembly engine — meta-prompt → full prompt
|
|
@@ -439,24 +651,25 @@ src/
|
|
|
439
651
|
### Key modules
|
|
440
652
|
|
|
441
653
|
- **Assembly engine** (`src/core/assembly/engine.ts`) — Pure orchestrator with no I/O. Constructs 7-section prompts from meta-prompt + knowledge + context + methodology + instructions + depth guidance.
|
|
442
|
-
- **State manager** (`src/state/state-manager.ts`) — Atomic writes via tmp + `fs.renameSync()`. Tracks step status, in-progress records, and next-eligible cache.
|
|
654
|
+
- **State manager** (`src/state/state-manager.ts`) — Atomic writes via tmp + `fs.renameSync()`. Tracks step status, in-progress records, and next-eligible cache. Includes migration system for step renames and retired steps.
|
|
443
655
|
- **Dependency graph** (`src/core/dependency/`) — Kahn's algorithm topological sort with phase-aware ordering and cycle detection.
|
|
444
656
|
- **Platform adapters** (`src/core/adapters/`) — 3-step lifecycle (initialize → generateStepWrapper → finalize) producing Claude Code commands, Codex AGENTS.md, or universal markdown.
|
|
445
657
|
- **Project detector** (`src/project/detector.ts`) — Scans for file system signals to classify projects as greenfield, brownfield, or v1-migration.
|
|
658
|
+
- **Check command** (`src/cli/commands/check.ts`) — Applicability detection for conditional steps (platform detection, GitHub remote detection, CLI availability).
|
|
446
659
|
|
|
447
660
|
### Content layout
|
|
448
661
|
|
|
449
662
|
```
|
|
450
|
-
pipeline/ #
|
|
451
|
-
knowledge/ #
|
|
663
|
+
pipeline/ # 51 meta-prompts organized by 14 phases
|
|
664
|
+
knowledge/ # 49 domain expertise entries (core, product, review, validation, finalization)
|
|
452
665
|
methodology/ # 3 YAML presets (deep, mvp, custom)
|
|
453
|
-
commands/ #
|
|
454
|
-
skills/ # Claude Code
|
|
666
|
+
commands/ # 67 Claude Code slash commands (51 pipeline + 16 utility)
|
|
667
|
+
skills/ # 3 Claude Code skills (pipeline reference, runner, multi-model dispatch)
|
|
455
668
|
```
|
|
456
669
|
|
|
457
670
|
### Testing
|
|
458
671
|
|
|
459
|
-
- **Vitest** for unit and E2E tests (
|
|
672
|
+
- **Vitest** for unit and E2E tests (67 test files, 772 tests)
|
|
460
673
|
- **Performance benchmarks** — assembly p95 < 500ms, state I/O p95 < 100ms, graph build p95 < 2s
|
|
461
674
|
- **Shell script tests** via bats
|
|
462
675
|
- Run: `npm test` (unit + E2E), `npm run test:bench` (benchmarks), `make check` (full CI gate)
|
|
@@ -467,7 +680,7 @@ skills/ # Claude Code plugin skill definition
|
|
|
467
680
|
2. Run `scaffold build` to regenerate `commands/` from pipeline meta-prompts
|
|
468
681
|
3. Run `npm run check` (lint + type-check + test) before submitting
|
|
469
682
|
4. Knowledge entries live in `knowledge/` — follow the existing frontmatter schema
|
|
470
|
-
5. ADRs documenting architectural decisions are in `docs/v2/adrs/`
|
|
683
|
+
5. ADRs documenting architectural decisions are in `docs/v2/adrs/`
|
|
471
684
|
|
|
472
685
|
## License
|
|
473
686
|
|
|
@@ -251,6 +251,55 @@ Technology decisions often cluster. Rather than 20 individual ADRs for each pack
|
|
|
251
251
|
|
|
252
252
|
Each group ADR can cover multiple decisions if they are tightly coupled and were evaluated together.
|
|
253
253
|
|
|
254
|
+
## Example ADR
|
|
255
|
+
|
|
256
|
+
The following shows a complete ADR following the structure and quality guidelines above:
|
|
257
|
+
|
|
258
|
+
```markdown
|
|
259
|
+
# ADR-003: Use PostgreSQL for Persistent Storage
|
|
260
|
+
|
|
261
|
+
## Status
|
|
262
|
+
Accepted
|
|
263
|
+
|
|
264
|
+
## Context
|
|
265
|
+
The application (per PRD Section 2) manages financial transaction data with strict
|
|
266
|
+
consistency requirements, flexible metadata per transaction type, and projected volume
|
|
267
|
+
of 500K transactions/month within the first year. The team has strong SQL experience
|
|
268
|
+
and the project is AI-built, favoring well-documented technologies.
|
|
269
|
+
|
|
270
|
+
## Decision
|
|
271
|
+
We will use PostgreSQL 16 for all persistent storage in this application.
|
|
272
|
+
|
|
273
|
+
## Alternatives Considered
|
|
274
|
+
|
|
275
|
+
### SQLite
|
|
276
|
+
- **Why considered:** Zero operational overhead, embedded, excellent for small-to-medium
|
|
277
|
+
read-heavy workloads.
|
|
278
|
+
- **Why rejected:** Single-writer limitation is incompatible with concurrent transaction
|
|
279
|
+
processing. No built-in network access for multi-instance deployment.
|
|
280
|
+
|
|
281
|
+
### MongoDB
|
|
282
|
+
- **Why considered:** Flexible schema matches variable transaction metadata. Strong
|
|
283
|
+
horizontal scaling story.
|
|
284
|
+
- **Why rejected:** Weaker ACID guarantees for multi-document transactions. Team has
|
|
285
|
+
limited MongoDB experience. Less well-represented in AI training data than PostgreSQL,
|
|
286
|
+
increasing hallucination risk for query patterns.
|
|
287
|
+
|
|
288
|
+
## Consequences
|
|
289
|
+
|
|
290
|
+
### Benefits
|
|
291
|
+
- JSONB columns provide flexible metadata storage without sacrificing relational integrity
|
|
292
|
+
- Strong ACID compliance for financial transaction consistency
|
|
293
|
+
- Most widely adopted open-source RDBMS — extensive AI training data coverage
|
|
294
|
+
- Rich ecosystem: pg_stat_statements for monitoring, pg_dump for backups, mature ORMs
|
|
295
|
+
|
|
296
|
+
### Costs and Risks
|
|
297
|
+
- Operational overhead: requires backup configuration, connection pooling, and monitoring
|
|
298
|
+
- JSONB queries are less performant than MongoDB's native document queries for deeply
|
|
299
|
+
nested structures
|
|
300
|
+
- Schema migrations require planning for zero-downtime deployments
|
|
301
|
+
```
|
|
302
|
+
|
|
254
303
|
## Common Pitfalls
|
|
255
304
|
|
|
256
305
|
**Recording decisions without alternatives.** An ADR that says "We'll use React" without mentioning Vue or Svelte provides no insight into the decision process. When a new team member asks "why not Vue?", there's no answer. Fix: always document at least one alternative and why it was rejected.
|
|
@@ -279,3 +328,7 @@ An ADR set is likely complete when:
|
|
|
279
328
|
- **The ADR set covers all layers.** Backend, frontend (if applicable), database, infrastructure, developer tooling, deployment, testing, and security all have decisions recorded.
|
|
280
329
|
- **Status is current.** No accepted ADRs that actually describe how things used to work. Superseded and deprecated ADRs are marked.
|
|
281
330
|
- **Cross-references are complete.** Related ADRs link to each other. ADRs link to the requirements they address.
|
|
331
|
+
|
|
332
|
+
## See Also
|
|
333
|
+
|
|
334
|
+
- [tech-stack-selection](../core/tech-stack-selection.md) — Technology selection as ADRs
|