@zigrivers/scaffold 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +477 -0
- package/dist/cli/commands/adopt.d.ts +12 -0
- package/dist/cli/commands/adopt.d.ts.map +1 -0
- package/dist/cli/commands/adopt.js +107 -0
- package/dist/cli/commands/adopt.js.map +1 -0
- package/dist/cli/commands/adopt.test.d.ts +2 -0
- package/dist/cli/commands/adopt.test.d.ts.map +1 -0
- package/dist/cli/commands/adopt.test.js +277 -0
- package/dist/cli/commands/adopt.test.js.map +1 -0
- package/dist/cli/commands/build.d.ts +12 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +105 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/build.test.d.ts +2 -0
- package/dist/cli/commands/build.test.d.ts.map +1 -0
- package/dist/cli/commands/build.test.js +272 -0
- package/dist/cli/commands/build.test.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +14 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +102 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/dashboard.test.d.ts +2 -0
- package/dist/cli/commands/dashboard.test.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.test.js +142 -0
- package/dist/cli/commands/dashboard.test.js.map +1 -0
- package/dist/cli/commands/decisions.d.ts +13 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/decisions.js +62 -0
- package/dist/cli/commands/decisions.js.map +1 -0
- package/dist/cli/commands/decisions.test.d.ts +2 -0
- package/dist/cli/commands/decisions.test.d.ts.map +1 -0
- package/dist/cli/commands/decisions.test.js +154 -0
- package/dist/cli/commands/decisions.test.js.map +1 -0
- package/dist/cli/commands/info.d.ts +12 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +110 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/info.test.d.ts +2 -0
- package/dist/cli/commands/info.test.d.ts.map +1 -0
- package/dist/cli/commands/info.test.js +392 -0
- package/dist/cli/commands/info.test.js.map +1 -0
- package/dist/cli/commands/init.d.ts +13 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +46 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/init.test.d.ts +2 -0
- package/dist/cli/commands/init.test.d.ts.map +1 -0
- package/dist/cli/commands/init.test.js +156 -0
- package/dist/cli/commands/init.test.js.map +1 -0
- package/dist/cli/commands/knowledge.d.ts +4 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.js +346 -0
- package/dist/cli/commands/knowledge.js.map +1 -0
- package/dist/cli/commands/knowledge.test.d.ts +2 -0
- package/dist/cli/commands/knowledge.test.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.test.js +293 -0
- package/dist/cli/commands/knowledge.test.js.map +1 -0
- package/dist/cli/commands/list.d.ts +12 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +73 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/list.test.d.ts +2 -0
- package/dist/cli/commands/list.test.d.ts.map +1 -0
- package/dist/cli/commands/list.test.js +166 -0
- package/dist/cli/commands/list.test.js.map +1 -0
- package/dist/cli/commands/next.d.ts +12 -0
- package/dist/cli/commands/next.d.ts.map +1 -0
- package/dist/cli/commands/next.js +75 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/next.test.d.ts +2 -0
- package/dist/cli/commands/next.test.d.ts.map +1 -0
- package/dist/cli/commands/next.test.js +236 -0
- package/dist/cli/commands/next.test.js.map +1 -0
- package/dist/cli/commands/reset.d.ts +13 -0
- package/dist/cli/commands/reset.d.ts.map +1 -0
- package/dist/cli/commands/reset.js +105 -0
- package/dist/cli/commands/reset.js.map +1 -0
- package/dist/cli/commands/reset.test.d.ts +2 -0
- package/dist/cli/commands/reset.test.d.ts.map +1 -0
- package/dist/cli/commands/reset.test.js +211 -0
- package/dist/cli/commands/reset.test.js.map +1 -0
- package/dist/cli/commands/run.d.ts +14 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +379 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/run.test.d.ts +2 -0
- package/dist/cli/commands/run.test.d.ts.map +1 -0
- package/dist/cli/commands/run.test.js +535 -0
- package/dist/cli/commands/run.test.js.map +1 -0
- package/dist/cli/commands/skip.d.ts +13 -0
- package/dist/cli/commands/skip.d.ts.map +1 -0
- package/dist/cli/commands/skip.js +123 -0
- package/dist/cli/commands/skip.js.map +1 -0
- package/dist/cli/commands/skip.test.d.ts +2 -0
- package/dist/cli/commands/skip.test.d.ts.map +1 -0
- package/dist/cli/commands/skip.test.js +339 -0
- package/dist/cli/commands/skip.test.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +79 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/status.test.d.ts +2 -0
- package/dist/cli/commands/status.test.d.ts.map +1 -0
- package/dist/cli/commands/status.test.js +245 -0
- package/dist/cli/commands/status.test.js.map +1 -0
- package/dist/cli/commands/update.d.ts +11 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +159 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/update.test.d.ts +2 -0
- package/dist/cli/commands/update.test.d.ts.map +1 -0
- package/dist/cli/commands/update.test.js +140 -0
- package/dist/cli/commands/update.test.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +12 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +65 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/validate.test.d.ts +2 -0
- package/dist/cli/commands/validate.test.d.ts.map +1 -0
- package/dist/cli/commands/validate.test.js +159 -0
- package/dist/cli/commands/validate.test.js.map +1 -0
- package/dist/cli/commands/version.d.ts +13 -0
- package/dist/cli/commands/version.d.ts.map +1 -0
- package/dist/cli/commands/version.js +89 -0
- package/dist/cli/commands/version.js.map +1 -0
- package/dist/cli/commands/version.test.d.ts +2 -0
- package/dist/cli/commands/version.test.d.ts.map +1 -0
- package/dist/cli/commands/version.test.js +63 -0
- package/dist/cli/commands/version.test.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +72 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.test.d.ts +2 -0
- package/dist/cli/index.test.d.ts.map +1 -0
- package/dist/cli/index.test.js +8 -0
- package/dist/cli/index.test.js.map +1 -0
- package/dist/cli/middleware/output-mode.d.ts +21 -0
- package/dist/cli/middleware/output-mode.d.ts.map +1 -0
- package/dist/cli/middleware/output-mode.js +27 -0
- package/dist/cli/middleware/output-mode.js.map +1 -0
- package/dist/cli/middleware/output-mode.test.d.ts +2 -0
- package/dist/cli/middleware/output-mode.test.d.ts.map +1 -0
- package/dist/cli/middleware/output-mode.test.js +41 -0
- package/dist/cli/middleware/output-mode.test.js.map +1 -0
- package/dist/cli/middleware/project-root.d.ts +21 -0
- package/dist/cli/middleware/project-root.d.ts.map +1 -0
- package/dist/cli/middleware/project-root.js +54 -0
- package/dist/cli/middleware/project-root.js.map +1 -0
- package/dist/cli/middleware/project-root.test.d.ts +2 -0
- package/dist/cli/middleware/project-root.test.d.ts.map +1 -0
- package/dist/cli/middleware/project-root.test.js +112 -0
- package/dist/cli/middleware/project-root.test.js.map +1 -0
- package/dist/cli/output/auto.d.ts +18 -0
- package/dist/cli/output/auto.d.ts.map +1 -0
- package/dist/cli/output/auto.js +43 -0
- package/dist/cli/output/auto.js.map +1 -0
- package/dist/cli/output/context.d.ts +19 -0
- package/dist/cli/output/context.d.ts.map +1 -0
- package/dist/cli/output/context.js +15 -0
- package/dist/cli/output/context.js.map +1 -0
- package/dist/cli/output/context.test.d.ts +2 -0
- package/dist/cli/output/context.test.d.ts.map +1 -0
- package/dist/cli/output/context.test.js +335 -0
- package/dist/cli/output/context.test.js.map +1 -0
- package/dist/cli/output/error-display.d.ts +31 -0
- package/dist/cli/output/error-display.d.ts.map +1 -0
- package/dist/cli/output/error-display.js +79 -0
- package/dist/cli/output/error-display.js.map +1 -0
- package/dist/cli/output/error-display.test.d.ts +2 -0
- package/dist/cli/output/error-display.test.d.ts.map +1 -0
- package/dist/cli/output/error-display.test.js +230 -0
- package/dist/cli/output/error-display.test.js.map +1 -0
- package/dist/cli/output/interactive.d.ts +22 -0
- package/dist/cli/output/interactive.d.ts.map +1 -0
- package/dist/cli/output/interactive.js +126 -0
- package/dist/cli/output/interactive.js.map +1 -0
- package/dist/cli/output/json.d.ts +17 -0
- package/dist/cli/output/json.d.ts.map +1 -0
- package/dist/cli/output/json.js +62 -0
- package/dist/cli/output/json.js.map +1 -0
- package/dist/cli/types.d.ts +11 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/config/loader.d.ts +22 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +159 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/loader.test.d.ts +2 -0
- package/dist/config/loader.test.d.ts.map +1 -0
- package/dist/config/loader.test.js +226 -0
- package/dist/config/loader.test.js.map +1 -0
- package/dist/config/migration.d.ts +15 -0
- package/dist/config/migration.d.ts.map +1 -0
- package/dist/config/migration.js +39 -0
- package/dist/config/migration.js.map +1 -0
- package/dist/config/migration.test.d.ts +2 -0
- package/dist/config/migration.test.d.ts.map +1 -0
- package/dist/config/migration.test.js +44 -0
- package/dist/config/migration.test.js.map +1 -0
- package/dist/config/schema.d.ts +121 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +22 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/schema.test.d.ts +2 -0
- package/dist/config/schema.test.d.ts.map +1 -0
- package/dist/config/schema.test.js +126 -0
- package/dist/config/schema.test.js.map +1 -0
- package/dist/core/adapters/adapter.d.ts +64 -0
- package/dist/core/adapters/adapter.d.ts.map +1 -0
- package/dist/core/adapters/adapter.js +25 -0
- package/dist/core/adapters/adapter.js.map +1 -0
- package/dist/core/adapters/adapter.test.d.ts +2 -0
- package/dist/core/adapters/adapter.test.d.ts.map +1 -0
- package/dist/core/adapters/adapter.test.js +175 -0
- package/dist/core/adapters/adapter.test.js.map +1 -0
- package/dist/core/adapters/claude-code.d.ts +9 -0
- package/dist/core/adapters/claude-code.d.ts.map +1 -0
- package/dist/core/adapters/claude-code.js +34 -0
- package/dist/core/adapters/claude-code.js.map +1 -0
- package/dist/core/adapters/claude-code.test.d.ts +2 -0
- package/dist/core/adapters/claude-code.test.d.ts.map +1 -0
- package/dist/core/adapters/claude-code.test.js +100 -0
- package/dist/core/adapters/claude-code.test.js.map +1 -0
- package/dist/core/adapters/codex.d.ts +10 -0
- package/dist/core/adapters/codex.d.ts.map +1 -0
- package/dist/core/adapters/codex.js +61 -0
- package/dist/core/adapters/codex.js.map +1 -0
- package/dist/core/adapters/codex.test.d.ts +2 -0
- package/dist/core/adapters/codex.test.d.ts.map +1 -0
- package/dist/core/adapters/codex.test.js +122 -0
- package/dist/core/adapters/codex.test.js.map +1 -0
- package/dist/core/adapters/universal.d.ts +10 -0
- package/dist/core/adapters/universal.d.ts.map +1 -0
- package/dist/core/adapters/universal.js +45 -0
- package/dist/core/adapters/universal.js.map +1 -0
- package/dist/core/adapters/universal.test.d.ts +2 -0
- package/dist/core/adapters/universal.test.d.ts.map +1 -0
- package/dist/core/adapters/universal.test.js +121 -0
- package/dist/core/adapters/universal.test.js.map +1 -0
- package/dist/core/assembly/context-gatherer.d.ts +17 -0
- package/dist/core/assembly/context-gatherer.d.ts.map +1 -0
- package/dist/core/assembly/context-gatherer.js +49 -0
- package/dist/core/assembly/context-gatherer.js.map +1 -0
- package/dist/core/assembly/context-gatherer.test.d.ts +2 -0
- package/dist/core/assembly/context-gatherer.test.d.ts.map +1 -0
- package/dist/core/assembly/context-gatherer.test.js +252 -0
- package/dist/core/assembly/context-gatherer.test.js.map +1 -0
- package/dist/core/assembly/depth-resolver.d.ts +11 -0
- package/dist/core/assembly/depth-resolver.d.ts.map +1 -0
- package/dist/core/assembly/depth-resolver.js +23 -0
- package/dist/core/assembly/depth-resolver.js.map +1 -0
- package/dist/core/assembly/depth-resolver.test.d.ts +2 -0
- package/dist/core/assembly/depth-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/depth-resolver.test.js +100 -0
- package/dist/core/assembly/depth-resolver.test.js.map +1 -0
- package/dist/core/assembly/engine.d.ts +22 -0
- package/dist/core/assembly/engine.d.ts.map +1 -0
- package/dist/core/assembly/engine.js +215 -0
- package/dist/core/assembly/engine.js.map +1 -0
- package/dist/core/assembly/engine.test.d.ts +2 -0
- package/dist/core/assembly/engine.test.d.ts.map +1 -0
- package/dist/core/assembly/engine.test.js +462 -0
- package/dist/core/assembly/engine.test.js.map +1 -0
- package/dist/core/assembly/instruction-loader.d.ts +16 -0
- package/dist/core/assembly/instruction-loader.d.ts.map +1 -0
- package/dist/core/assembly/instruction-loader.js +40 -0
- package/dist/core/assembly/instruction-loader.js.map +1 -0
- package/dist/core/assembly/instruction-loader.test.d.ts +2 -0
- package/dist/core/assembly/instruction-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/instruction-loader.test.js +109 -0
- package/dist/core/assembly/instruction-loader.test.js.map +1 -0
- package/dist/core/assembly/knowledge-loader.d.ts +34 -0
- package/dist/core/assembly/knowledge-loader.d.ts.map +1 -0
- package/dist/core/assembly/knowledge-loader.js +204 -0
- package/dist/core/assembly/knowledge-loader.js.map +1 -0
- package/dist/core/assembly/knowledge-loader.test.d.ts +2 -0
- package/dist/core/assembly/knowledge-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/knowledge-loader.test.js +205 -0
- package/dist/core/assembly/knowledge-loader.test.js.map +1 -0
- package/dist/core/assembly/meta-prompt-loader.d.ts +13 -0
- package/dist/core/assembly/meta-prompt-loader.d.ts.map +1 -0
- package/dist/core/assembly/meta-prompt-loader.js +91 -0
- package/dist/core/assembly/meta-prompt-loader.js.map +1 -0
- package/dist/core/assembly/meta-prompt-loader.test.d.ts +2 -0
- package/dist/core/assembly/meta-prompt-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/meta-prompt-loader.test.js +232 -0
- package/dist/core/assembly/meta-prompt-loader.test.js.map +1 -0
- package/dist/core/assembly/methodology-change.d.ts +27 -0
- package/dist/core/assembly/methodology-change.d.ts.map +1 -0
- package/dist/core/assembly/methodology-change.js +41 -0
- package/dist/core/assembly/methodology-change.js.map +1 -0
- package/dist/core/assembly/methodology-change.test.d.ts +2 -0
- package/dist/core/assembly/methodology-change.test.d.ts.map +1 -0
- package/dist/core/assembly/methodology-change.test.js +145 -0
- package/dist/core/assembly/methodology-change.test.js.map +1 -0
- package/dist/core/assembly/methodology-resolver.d.ts +11 -0
- package/dist/core/assembly/methodology-resolver.d.ts.map +1 -0
- package/dist/core/assembly/methodology-resolver.js +19 -0
- package/dist/core/assembly/methodology-resolver.js.map +1 -0
- package/dist/core/assembly/methodology-resolver.test.d.ts +2 -0
- package/dist/core/assembly/methodology-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/methodology-resolver.test.js +87 -0
- package/dist/core/assembly/methodology-resolver.test.js.map +1 -0
- package/dist/core/assembly/preset-loader.d.ts +26 -0
- package/dist/core/assembly/preset-loader.d.ts.map +1 -0
- package/dist/core/assembly/preset-loader.js +146 -0
- package/dist/core/assembly/preset-loader.js.map +1 -0
- package/dist/core/assembly/preset-loader.test.d.ts +2 -0
- package/dist/core/assembly/preset-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/preset-loader.test.js +107 -0
- package/dist/core/assembly/preset-loader.test.js.map +1 -0
- package/dist/core/assembly/update-mode.d.ts +25 -0
- package/dist/core/assembly/update-mode.d.ts.map +1 -0
- package/dist/core/assembly/update-mode.js +70 -0
- package/dist/core/assembly/update-mode.js.map +1 -0
- package/dist/core/assembly/update-mode.test.d.ts +2 -0
- package/dist/core/assembly/update-mode.test.d.ts.map +1 -0
- package/dist/core/assembly/update-mode.test.js +235 -0
- package/dist/core/assembly/update-mode.test.js.map +1 -0
- package/dist/core/dependency/dependency.d.ts +20 -0
- package/dist/core/dependency/dependency.d.ts.map +1 -0
- package/dist/core/dependency/dependency.js +104 -0
- package/dist/core/dependency/dependency.js.map +1 -0
- package/dist/core/dependency/dependency.test.d.ts +2 -0
- package/dist/core/dependency/dependency.test.d.ts.map +1 -0
- package/dist/core/dependency/dependency.test.js +166 -0
- package/dist/core/dependency/dependency.test.js.map +1 -0
- package/dist/core/dependency/eligibility.d.ts +17 -0
- package/dist/core/dependency/eligibility.d.ts.map +1 -0
- package/dist/core/dependency/eligibility.js +60 -0
- package/dist/core/dependency/eligibility.js.map +1 -0
- package/dist/core/dependency/eligibility.test.d.ts +2 -0
- package/dist/core/dependency/eligibility.test.d.ts.map +1 -0
- package/dist/core/dependency/eligibility.test.js +198 -0
- package/dist/core/dependency/eligibility.test.js.map +1 -0
- package/dist/core/dependency/graph.d.ts +12 -0
- package/dist/core/dependency/graph.d.ts.map +1 -0
- package/dist/core/dependency/graph.js +34 -0
- package/dist/core/dependency/graph.js.map +1 -0
- package/dist/core/knowledge/knowledge-update-assembler.d.ts +24 -0
- package/dist/core/knowledge/knowledge-update-assembler.d.ts.map +1 -0
- package/dist/core/knowledge/knowledge-update-assembler.js +46 -0
- package/dist/core/knowledge/knowledge-update-assembler.js.map +1 -0
- package/dist/core/knowledge/knowledge-update-assembler.test.d.ts +2 -0
- package/dist/core/knowledge/knowledge-update-assembler.test.d.ts.map +1 -0
- package/dist/core/knowledge/knowledge-update-assembler.test.js +93 -0
- package/dist/core/knowledge/knowledge-update-assembler.test.js.map +1 -0
- package/dist/core/knowledge/knowledge-update-template.md +55 -0
- package/dist/dashboard/generator.d.ts +37 -0
- package/dist/dashboard/generator.d.ts.map +1 -0
- package/dist/dashboard/generator.js +42 -0
- package/dist/dashboard/generator.js.map +1 -0
- package/dist/dashboard/generator.test.d.ts +2 -0
- package/dist/dashboard/generator.test.d.ts.map +1 -0
- package/dist/dashboard/generator.test.js +186 -0
- package/dist/dashboard/generator.test.js.map +1 -0
- package/dist/dashboard/template.d.ts +4 -0
- package/dist/dashboard/template.d.ts.map +1 -0
- package/dist/dashboard/template.js +190 -0
- package/dist/dashboard/template.js.map +1 -0
- package/dist/e2e/commands.test.d.ts +9 -0
- package/dist/e2e/commands.test.d.ts.map +1 -0
- package/dist/e2e/commands.test.js +499 -0
- package/dist/e2e/commands.test.js.map +1 -0
- package/dist/e2e/init.test.d.ts +10 -0
- package/dist/e2e/init.test.d.ts.map +1 -0
- package/dist/e2e/init.test.js +180 -0
- package/dist/e2e/init.test.js.map +1 -0
- package/dist/e2e/knowledge.test.d.ts +2 -0
- package/dist/e2e/knowledge.test.d.ts.map +1 -0
- package/dist/e2e/knowledge.test.js +103 -0
- package/dist/e2e/knowledge.test.js.map +1 -0
- package/dist/e2e/pipeline.test.d.ts +8 -0
- package/dist/e2e/pipeline.test.d.ts.map +1 -0
- package/dist/e2e/pipeline.test.js +295 -0
- package/dist/e2e/pipeline.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/project/adopt.d.ts +28 -0
- package/dist/project/adopt.d.ts.map +1 -0
- package/dist/project/adopt.js +49 -0
- package/dist/project/adopt.js.map +1 -0
- package/dist/project/adopt.test.d.ts +2 -0
- package/dist/project/adopt.test.d.ts.map +1 -0
- package/dist/project/adopt.test.js +220 -0
- package/dist/project/adopt.test.js.map +1 -0
- package/dist/project/claude-md.d.ts +33 -0
- package/dist/project/claude-md.d.ts.map +1 -0
- package/dist/project/claude-md.js +112 -0
- package/dist/project/claude-md.js.map +1 -0
- package/dist/project/claude-md.test.d.ts +2 -0
- package/dist/project/claude-md.test.d.ts.map +1 -0
- package/dist/project/claude-md.test.js +151 -0
- package/dist/project/claude-md.test.js.map +1 -0
- package/dist/project/detector.d.ts +7 -0
- package/dist/project/detector.d.ts.map +1 -0
- package/dist/project/detector.js +78 -0
- package/dist/project/detector.js.map +1 -0
- package/dist/project/detector.test.d.ts +2 -0
- package/dist/project/detector.test.d.ts.map +1 -0
- package/dist/project/detector.test.js +137 -0
- package/dist/project/detector.test.js.map +1 -0
- package/dist/project/frontmatter.d.ts +17 -0
- package/dist/project/frontmatter.d.ts.map +1 -0
- package/dist/project/frontmatter.js +236 -0
- package/dist/project/frontmatter.js.map +1 -0
- package/dist/project/frontmatter.test.d.ts +2 -0
- package/dist/project/frontmatter.test.d.ts.map +1 -0
- package/dist/project/frontmatter.test.js +218 -0
- package/dist/project/frontmatter.test.js.map +1 -0
- package/dist/project/signals.d.ts +12 -0
- package/dist/project/signals.d.ts.map +1 -0
- package/dist/project/signals.js +2 -0
- package/dist/project/signals.js.map +1 -0
- package/dist/state/completion.d.ts +22 -0
- package/dist/state/completion.d.ts.map +1 -0
- package/dist/state/completion.js +82 -0
- package/dist/state/completion.js.map +1 -0
- package/dist/state/completion.test.d.ts +2 -0
- package/dist/state/completion.test.d.ts.map +1 -0
- package/dist/state/completion.test.js +246 -0
- package/dist/state/completion.test.js.map +1 -0
- package/dist/state/decision-logger.d.ts +16 -0
- package/dist/state/decision-logger.d.ts.map +1 -0
- package/dist/state/decision-logger.js +80 -0
- package/dist/state/decision-logger.js.map +1 -0
- package/dist/state/decision-logger.test.d.ts +2 -0
- package/dist/state/decision-logger.test.d.ts.map +1 -0
- package/dist/state/decision-logger.test.js +182 -0
- package/dist/state/decision-logger.test.js.map +1 -0
- package/dist/state/lock-manager.d.ts +18 -0
- package/dist/state/lock-manager.d.ts.map +1 -0
- package/dist/state/lock-manager.js +134 -0
- package/dist/state/lock-manager.js.map +1 -0
- package/dist/state/lock-manager.test.d.ts +2 -0
- package/dist/state/lock-manager.test.d.ts.map +1 -0
- package/dist/state/lock-manager.test.js +190 -0
- package/dist/state/lock-manager.test.js.map +1 -0
- package/dist/state/state-manager.d.ts +37 -0
- package/dist/state/state-manager.d.ts.map +1 -0
- package/dist/state/state-manager.js +125 -0
- package/dist/state/state-manager.js.map +1 -0
- package/dist/state/state-manager.test.d.ts +2 -0
- package/dist/state/state-manager.test.d.ts.map +1 -0
- package/dist/state/state-manager.test.js +240 -0
- package/dist/state/state-manager.test.js.map +1 -0
- package/dist/types/adapter.d.ts +24 -0
- package/dist/types/adapter.d.ts.map +1 -0
- package/dist/types/adapter.js +2 -0
- package/dist/types/adapter.js.map +1 -0
- package/dist/types/assembly.d.ts +89 -0
- package/dist/types/assembly.d.ts.map +1 -0
- package/dist/types/assembly.js +2 -0
- package/dist/types/assembly.js.map +1 -0
- package/dist/types/claude-md.d.ts +11 -0
- package/dist/types/claude-md.d.ts.map +1 -0
- package/dist/types/claude-md.js +2 -0
- package/dist/types/claude-md.js.map +1 -0
- package/dist/types/cli.d.ts +15 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +2 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/config.d.ts +40 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/decision.d.ts +14 -0
- package/dist/types/decision.d.ts.map +1 -0
- package/dist/types/decision.js +2 -0
- package/dist/types/decision.js.map +1 -0
- package/dist/types/dependency.d.ts +12 -0
- package/dist/types/dependency.d.ts.map +1 -0
- package/dist/types/dependency.js +2 -0
- package/dist/types/dependency.js.map +1 -0
- package/dist/types/enums.d.ts +23 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +11 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/enums.test.d.ts +2 -0
- package/dist/types/enums.test.d.ts.map +1 -0
- package/dist/types/enums.test.js +13 -0
- package/dist/types/enums.test.js.map +1 -0
- package/dist/types/errors.d.ts +24 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +2 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/frontmatter.d.ts +43 -0
- package/dist/types/frontmatter.d.ts.map +1 -0
- package/dist/types/frontmatter.js +2 -0
- package/dist/types/frontmatter.js.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +14 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lock.d.ts +10 -0
- package/dist/types/lock.d.ts.map +1 -0
- package/dist/types/lock.js +2 -0
- package/dist/types/lock.js.map +1 -0
- package/dist/types/state.d.ts +49 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +2 -0
- package/dist/types/state.js.map +1 -0
- package/dist/types/wizard.d.ts +14 -0
- package/dist/types/wizard.d.ts.map +1 -0
- package/dist/types/wizard.js +2 -0
- package/dist/types/wizard.js.map +1 -0
- package/dist/utils/errors.d.ts +42 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +232 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/errors.test.d.ts +2 -0
- package/dist/utils/errors.test.d.ts.map +1 -0
- package/dist/utils/errors.test.js +91 -0
- package/dist/utils/errors.test.js.map +1 -0
- package/dist/utils/fs.d.ts +11 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +20 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/fs.test.d.ts +2 -0
- package/dist/utils/fs.test.d.ts.map +1 -0
- package/dist/utils/fs.test.js +93 -0
- package/dist/utils/fs.test.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/levenshtein.d.ts +11 -0
- package/dist/utils/levenshtein.d.ts.map +1 -0
- package/dist/utils/levenshtein.js +37 -0
- package/dist/utils/levenshtein.js.map +1 -0
- package/dist/utils/levenshtein.test.d.ts +2 -0
- package/dist/utils/levenshtein.test.d.ts.map +1 -0
- package/dist/utils/levenshtein.test.js +34 -0
- package/dist/utils/levenshtein.test.js.map +1 -0
- package/dist/validation/config-validator.d.ts +10 -0
- package/dist/validation/config-validator.d.ts.map +1 -0
- package/dist/validation/config-validator.js +11 -0
- package/dist/validation/config-validator.js.map +1 -0
- package/dist/validation/dependency-validator.d.ts +10 -0
- package/dist/validation/dependency-validator.d.ts.map +1 -0
- package/dist/validation/dependency-validator.js +34 -0
- package/dist/validation/dependency-validator.js.map +1 -0
- package/dist/validation/frontmatter-validator.d.ts +12 -0
- package/dist/validation/frontmatter-validator.d.ts.map +1 -0
- package/dist/validation/frontmatter-validator.js +50 -0
- package/dist/validation/frontmatter-validator.js.map +1 -0
- package/dist/validation/index.d.ts +19 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +64 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/index.test.d.ts +2 -0
- package/dist/validation/index.test.d.ts.map +1 -0
- package/dist/validation/index.test.js +241 -0
- package/dist/validation/index.test.js.map +1 -0
- package/dist/validation/state-validator.d.ts +15 -0
- package/dist/validation/state-validator.d.ts.map +1 -0
- package/dist/validation/state-validator.js +104 -0
- package/dist/validation/state-validator.js.map +1 -0
- package/dist/wizard/questions.d.ts +18 -0
- package/dist/wizard/questions.d.ts.map +1 -0
- package/dist/wizard/questions.js +46 -0
- package/dist/wizard/questions.js.map +1 -0
- package/dist/wizard/suggestion.d.ts +10 -0
- package/dist/wizard/suggestion.d.ts.map +1 -0
- package/dist/wizard/suggestion.js +17 -0
- package/dist/wizard/suggestion.js.map +1 -0
- package/dist/wizard/wizard.d.ts +19 -0
- package/dist/wizard/wizard.d.ts.map +1 -0
- package/dist/wizard/wizard.js +104 -0
- package/dist/wizard/wizard.js.map +1 -0
- package/dist/wizard/wizard.test.d.ts +2 -0
- package/dist/wizard/wizard.test.d.ts.map +1 -0
- package/dist/wizard/wizard.test.js +167 -0
- package/dist/wizard/wizard.test.js.map +1 -0
- package/knowledge/core/adr-craft.md +281 -0
- package/knowledge/core/api-design.md +501 -0
- package/knowledge/core/database-design.md +380 -0
- package/knowledge/core/domain-modeling.md +317 -0
- package/knowledge/core/operations-runbook.md +513 -0
- package/knowledge/core/security-review.md +523 -0
- package/knowledge/core/system-architecture.md +402 -0
- package/knowledge/core/task-decomposition.md +372 -0
- package/knowledge/core/testing-strategy.md +409 -0
- package/knowledge/core/user-stories.md +337 -0
- package/knowledge/core/user-story-innovation.md +171 -0
- package/knowledge/core/ux-specification.md +380 -0
- package/knowledge/finalization/apply-fixes-and-freeze.md +93 -0
- package/knowledge/finalization/developer-onboarding.md +376 -0
- package/knowledge/finalization/implementation-playbook.md +404 -0
- package/knowledge/product/gap-analysis.md +305 -0
- package/knowledge/product/prd-craft.md +324 -0
- package/knowledge/product/prd-innovation.md +204 -0
- package/knowledge/review/review-adr.md +203 -0
- package/knowledge/review/review-api-contracts.md +233 -0
- package/knowledge/review/review-database-schema.md +229 -0
- package/knowledge/review/review-domain-modeling.md +288 -0
- package/knowledge/review/review-implementation-tasks.md +202 -0
- package/knowledge/review/review-methodology.md +215 -0
- package/knowledge/review/review-operations.md +212 -0
- package/knowledge/review/review-prd.md +235 -0
- package/knowledge/review/review-security.md +213 -0
- package/knowledge/review/review-system-architecture.md +296 -0
- package/knowledge/review/review-testing-strategy.md +176 -0
- package/knowledge/review/review-user-stories.md +172 -0
- package/knowledge/review/review-ux-spec.md +208 -0
- package/knowledge/validation/critical-path-analysis.md +203 -0
- package/knowledge/validation/cross-phase-consistency.md +181 -0
- package/knowledge/validation/decision-completeness.md +218 -0
- package/knowledge/validation/dependency-validation.md +233 -0
- package/knowledge/validation/implementability-review.md +252 -0
- package/knowledge/validation/scope-management.md +223 -0
- package/knowledge/validation/traceability.md +198 -0
- package/methodology/custom-defaults.yml +43 -0
- package/methodology/deep.yml +42 -0
- package/methodology/mvp.yml +42 -0
- package/package.json +58 -0
- package/pipeline/architecture/review-architecture.md +44 -0
- package/pipeline/architecture/system-architecture.md +45 -0
- package/pipeline/decisions/adrs.md +45 -0
- package/pipeline/decisions/review-adrs.md +39 -0
- package/pipeline/finalization/apply-fixes-and-freeze.md +39 -0
- package/pipeline/finalization/developer-onboarding-guide.md +36 -0
- package/pipeline/finalization/implementation-playbook.md +45 -0
- package/pipeline/modeling/domain-modeling.md +57 -0
- package/pipeline/modeling/review-domain-modeling.md +41 -0
- package/pipeline/planning/implementation-tasks.md +57 -0
- package/pipeline/planning/review-tasks.md +38 -0
- package/pipeline/pre/create-prd.md +45 -0
- package/pipeline/pre/innovate-prd.md +47 -0
- package/pipeline/pre/innovate-user-stories.md +47 -0
- package/pipeline/pre/review-prd.md +44 -0
- package/pipeline/pre/review-user-stories.md +43 -0
- package/pipeline/pre/user-stories.md +48 -0
- package/pipeline/quality/operations.md +42 -0
- package/pipeline/quality/review-operations.md +37 -0
- package/pipeline/quality/review-security.md +40 -0
- package/pipeline/quality/review-testing.md +39 -0
- package/pipeline/quality/security.md +44 -0
- package/pipeline/quality/testing-strategy.md +42 -0
- package/pipeline/specification/api-contracts.md +44 -0
- package/pipeline/specification/database-schema.md +41 -0
- package/pipeline/specification/review-api.md +40 -0
- package/pipeline/specification/review-database.md +39 -0
- package/pipeline/specification/review-ux.md +38 -0
- package/pipeline/specification/ux-spec.md +43 -0
- package/pipeline/validation/critical-path-walkthrough.md +37 -0
- package/pipeline/validation/cross-phase-consistency.md +35 -0
- package/pipeline/validation/decision-completeness.md +36 -0
- package/pipeline/validation/dependency-graph-validation.md +36 -0
- package/pipeline/validation/implementability-dry-run.md +36 -0
- package/pipeline/validation/scope-creep-check.md +38 -0
- package/pipeline/validation/traceability-matrix.md +36 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import yaml from 'js-yaml';
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Hoisted mocks
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
vi.mock('../project/detector.js', () => ({
|
|
10
|
+
detectProjectMode: vi.fn(() => ({
|
|
11
|
+
mode: 'greenfield',
|
|
12
|
+
signals: [],
|
|
13
|
+
methodologySuggestion: 'deep',
|
|
14
|
+
})),
|
|
15
|
+
}));
|
|
16
|
+
vi.mock('../core/assembly/meta-prompt-loader.js', () => ({
|
|
17
|
+
discoverMetaPrompts: vi.fn(() => new Map()),
|
|
18
|
+
}));
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Imports (after mocks)
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
import { detectProjectMode } from '../project/detector.js';
|
|
23
|
+
import { runWizard } from './wizard.js';
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// Helpers
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
function makeTempDir() {
|
|
28
|
+
return fs.mkdtempSync(path.join(os.tmpdir(), 'scaffold-wizard-test-'));
|
|
29
|
+
}
|
|
30
|
+
function makeOutputContext() {
|
|
31
|
+
return {
|
|
32
|
+
success: vi.fn(),
|
|
33
|
+
info: vi.fn(),
|
|
34
|
+
warn: vi.fn(),
|
|
35
|
+
error: vi.fn(),
|
|
36
|
+
result: vi.fn(),
|
|
37
|
+
prompt: vi.fn().mockResolvedValue(''),
|
|
38
|
+
confirm: vi.fn().mockResolvedValue(false),
|
|
39
|
+
startSpinner: vi.fn(),
|
|
40
|
+
stopSpinner: vi.fn(),
|
|
41
|
+
startProgress: vi.fn(),
|
|
42
|
+
updateProgress: vi.fn(),
|
|
43
|
+
stopProgress: vi.fn(),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// Tests
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
describe('runWizard', () => {
|
|
50
|
+
const mockDetectProjectMode = vi.mocked(detectProjectMode);
|
|
51
|
+
let tmpDir;
|
|
52
|
+
beforeEach(() => {
|
|
53
|
+
tmpDir = makeTempDir();
|
|
54
|
+
mockDetectProjectMode.mockReturnValue({
|
|
55
|
+
mode: 'greenfield',
|
|
56
|
+
signals: [],
|
|
57
|
+
methodologySuggestion: 'deep',
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
afterEach(() => {
|
|
61
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
62
|
+
vi.restoreAllMocks();
|
|
63
|
+
});
|
|
64
|
+
// Test 1: Creates .scaffold/ directory
|
|
65
|
+
it('creates .scaffold/ directory', async () => {
|
|
66
|
+
const output = makeOutputContext();
|
|
67
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
68
|
+
expect(fs.existsSync(path.join(tmpDir, '.scaffold'))).toBe(true);
|
|
69
|
+
});
|
|
70
|
+
// Test 2: Writes valid config.yml with YAML content
|
|
71
|
+
it('writes valid config.yml with YAML content', async () => {
|
|
72
|
+
const output = makeOutputContext();
|
|
73
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
74
|
+
const configPath = path.join(tmpDir, '.scaffold', 'config.yml');
|
|
75
|
+
expect(fs.existsSync(configPath)).toBe(true);
|
|
76
|
+
const content = fs.readFileSync(configPath, 'utf8');
|
|
77
|
+
const parsed = yaml.load(content);
|
|
78
|
+
expect(parsed).toMatchObject({ version: 2, methodology: expect.any(String) });
|
|
79
|
+
expect(Array.isArray(parsed['platforms'])).toBe(true);
|
|
80
|
+
expect(parsed['platforms'].length).toBeGreaterThan(0);
|
|
81
|
+
});
|
|
82
|
+
// Test 3: Creates state.json
|
|
83
|
+
it('creates state.json', async () => {
|
|
84
|
+
const output = makeOutputContext();
|
|
85
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
86
|
+
const statePath = path.join(tmpDir, '.scaffold', 'state.json');
|
|
87
|
+
expect(fs.existsSync(statePath)).toBe(true);
|
|
88
|
+
const parsed = JSON.parse(fs.readFileSync(statePath, 'utf8'));
|
|
89
|
+
expect(parsed['schema-version']).toBe(1);
|
|
90
|
+
});
|
|
91
|
+
// Test 4: Creates empty decisions.jsonl
|
|
92
|
+
it('creates empty decisions.jsonl', async () => {
|
|
93
|
+
const output = makeOutputContext();
|
|
94
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
95
|
+
const decisionsPath = path.join(tmpDir, '.scaffold', 'decisions.jsonl');
|
|
96
|
+
expect(fs.existsSync(decisionsPath)).toBe(true);
|
|
97
|
+
expect(fs.readFileSync(decisionsPath, 'utf8')).toBe('');
|
|
98
|
+
});
|
|
99
|
+
// Test 5: Creates .scaffold/instructions/ directory
|
|
100
|
+
it('creates .scaffold/instructions/ directory', async () => {
|
|
101
|
+
const output = makeOutputContext();
|
|
102
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
103
|
+
expect(fs.existsSync(path.join(tmpDir, '.scaffold', 'instructions'))).toBe(true);
|
|
104
|
+
expect(fs.statSync(path.join(tmpDir, '.scaffold', 'instructions')).isDirectory()).toBe(true);
|
|
105
|
+
});
|
|
106
|
+
// Test 6: Returns INIT_SCAFFOLD_EXISTS error when .scaffold/ exists without --force
|
|
107
|
+
it('returns INIT_SCAFFOLD_EXISTS error when .scaffold/ exists and force=false', async () => {
|
|
108
|
+
fs.mkdirSync(path.join(tmpDir, '.scaffold'));
|
|
109
|
+
const output = makeOutputContext();
|
|
110
|
+
const result = await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
111
|
+
expect(result.success).toBe(false);
|
|
112
|
+
expect(result.errors.length).toBeGreaterThan(0);
|
|
113
|
+
expect(result.errors[0].code).toBe('INIT_SCAFFOLD_EXISTS');
|
|
114
|
+
});
|
|
115
|
+
// Test 7: With --force, backs up existing .scaffold/ and reinitializes
|
|
116
|
+
it('backs up existing .scaffold/ when force=true and reinitializes', async () => {
|
|
117
|
+
const scaffoldDir = path.join(tmpDir, '.scaffold');
|
|
118
|
+
fs.mkdirSync(scaffoldDir);
|
|
119
|
+
fs.writeFileSync(path.join(scaffoldDir, 'marker.txt'), 'original');
|
|
120
|
+
const output = makeOutputContext();
|
|
121
|
+
const result = await runWizard({ projectRoot: tmpDir, auto: true, force: true, output });
|
|
122
|
+
expect(result.success).toBe(true);
|
|
123
|
+
// Original .scaffold/ backed up — a .scaffold.backup dir should exist
|
|
124
|
+
const backupExists = fs.existsSync(path.join(tmpDir, '.scaffold.backup'));
|
|
125
|
+
expect(backupExists).toBe(true);
|
|
126
|
+
// New .scaffold/ should exist and have config.yml, not marker.txt
|
|
127
|
+
expect(fs.existsSync(path.join(scaffoldDir, 'config.yml'))).toBe(true);
|
|
128
|
+
expect(fs.existsSync(path.join(scaffoldDir, 'marker.txt'))).toBe(false);
|
|
129
|
+
});
|
|
130
|
+
// Test 8: --auto mode uses suggestion as methodology without prompting
|
|
131
|
+
it('uses suggestion methodology in auto mode without calling prompt', async () => {
|
|
132
|
+
const output = makeOutputContext();
|
|
133
|
+
await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
134
|
+
expect(output.prompt).not.toHaveBeenCalled();
|
|
135
|
+
const configPath = path.join(tmpDir, '.scaffold', 'config.yml');
|
|
136
|
+
const parsed = yaml.load(fs.readFileSync(configPath, 'utf8'));
|
|
137
|
+
// Default suggestion from greenfield is 'deep'
|
|
138
|
+
expect(parsed['methodology']).toBe('deep');
|
|
139
|
+
});
|
|
140
|
+
// Test 9: --methodology 'mvp' skips methodology question and uses it
|
|
141
|
+
it('uses pre-set --methodology flag without prompting', async () => {
|
|
142
|
+
const output = makeOutputContext();
|
|
143
|
+
const result = await runWizard({
|
|
144
|
+
projectRoot: tmpDir,
|
|
145
|
+
auto: true,
|
|
146
|
+
force: false,
|
|
147
|
+
methodology: 'mvp',
|
|
148
|
+
output,
|
|
149
|
+
});
|
|
150
|
+
expect(result.success).toBe(true);
|
|
151
|
+
expect(result.methodology).toBe('mvp');
|
|
152
|
+
const configPath = path.join(tmpDir, '.scaffold', 'config.yml');
|
|
153
|
+
const parsed = yaml.load(fs.readFileSync(configPath, 'utf8'));
|
|
154
|
+
expect(parsed['methodology']).toBe('mvp');
|
|
155
|
+
expect(output.prompt).not.toHaveBeenCalled();
|
|
156
|
+
});
|
|
157
|
+
// Test 10: Result has success: true on successful init
|
|
158
|
+
it('returns success: true on successful init', async () => {
|
|
159
|
+
const output = makeOutputContext();
|
|
160
|
+
const result = await runWizard({ projectRoot: tmpDir, auto: true, force: false, output });
|
|
161
|
+
expect(result.success).toBe(true);
|
|
162
|
+
expect(result.errors).toHaveLength(0);
|
|
163
|
+
expect(result.projectRoot).toBe(tmpDir);
|
|
164
|
+
expect(result.configPath).toBe(path.join(tmpDir, '.scaffold', 'config.yml'));
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
//# sourceMappingURL=wizard.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wizard.test.js","sourceRoot":"","sources":["../../src/wizard/wizard.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACxE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC;IACvC,iBAAiB,EAAE,EAAE,CAAC,EAAE,CAAC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MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adr-craft
|
|
3
|
+
description: Writing effective architecture decision records including technology selection
|
|
4
|
+
topics: [adr, architecture-decisions, tech-stack, decision-documentation, technology-selection]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What Warrants an ADR
|
|
8
|
+
|
|
9
|
+
An Architecture Decision Record captures a decision that is architecturally significant — one that affects the system's structure, non-functional characteristics, dependencies, interfaces, or construction techniques. Not every decision needs an ADR. The litmus test: would a new team member need to know why this choice was made to work effectively?
|
|
10
|
+
|
|
11
|
+
### Categories That Always Warrant ADRs
|
|
12
|
+
|
|
13
|
+
**Technology selection decisions:**
|
|
14
|
+
|
|
15
|
+
- Programming language and runtime (Node.js vs. Python, JVM version)
|
|
16
|
+
- Framework selection (Next.js vs. Remix, FastAPI vs. Django, Express vs. Fastify)
|
|
17
|
+
- Database engine (PostgreSQL vs. SQLite vs. MongoDB, and why)
|
|
18
|
+
- ORM or data access layer (Prisma vs. Drizzle vs. raw SQL)
|
|
19
|
+
- Infrastructure and hosting (Vercel vs. AWS vs. self-hosted)
|
|
20
|
+
- Authentication provider (Auth0 vs. Clerk vs. custom)
|
|
21
|
+
- CI/CD platform (GitHub Actions vs. CircleCI)
|
|
22
|
+
- Dev tooling choices (linter, formatter, test runner, build tool)
|
|
23
|
+
|
|
24
|
+
Each technology choice should compare the top 2-3 realistic options, state the selection criteria weighted for the project, and document the winner with honest trade-offs.
|
|
25
|
+
|
|
26
|
+
**Architectural pattern decisions:**
|
|
27
|
+
|
|
28
|
+
- Monolith vs. microservices vs. modular monolith
|
|
29
|
+
- Layered architecture vs. hexagonal vs. event-driven
|
|
30
|
+
- Server-side rendering vs. client-side rendering vs. hybrid
|
|
31
|
+
- Synchronous communication vs. event-driven vs. mixed
|
|
32
|
+
- Caching strategy (when, where, what eviction policy)
|
|
33
|
+
|
|
34
|
+
**Data architecture decisions:**
|
|
35
|
+
|
|
36
|
+
- Normalization level and deliberate denormalizations
|
|
37
|
+
- Event sourcing vs. state-based persistence
|
|
38
|
+
- Read/write model separation (CQRS)
|
|
39
|
+
- Data migration strategy (rolling vs. downtime)
|
|
40
|
+
- Multi-tenancy approach (database per tenant, schema per tenant, row-level)
|
|
41
|
+
|
|
42
|
+
**Integration decisions:**
|
|
43
|
+
|
|
44
|
+
- API style (REST vs. GraphQL vs. gRPC)
|
|
45
|
+
- Authentication mechanism (JWT vs. session vs. API key)
|
|
46
|
+
- Third-party service selections (payment processor, email provider, CDN)
|
|
47
|
+
- Message broker selection (when async is chosen)
|
|
48
|
+
|
|
49
|
+
**Development process decisions:**
|
|
50
|
+
|
|
51
|
+
- Branching strategy (trunk-based, GitFlow, simplified flow)
|
|
52
|
+
- Testing strategy (what gets unit tests vs. integration vs. e2e)
|
|
53
|
+
- Deployment strategy (blue-green, canary, rolling)
|
|
54
|
+
- Monitoring approach (what to instrument, which platform)
|
|
55
|
+
|
|
56
|
+
### What Does NOT Warrant an ADR
|
|
57
|
+
|
|
58
|
+
- Code style preferences (tabs vs. spaces, semicolons) — use linter configuration
|
|
59
|
+
- Library utility choices (lodash vs. ramda for a single function) — too granular
|
|
60
|
+
- Implementation details within a bounded context (which sorting algorithm) — unless performance-critical
|
|
61
|
+
- Temporary decisions (experiment with X for a spike) — not architectural
|
|
62
|
+
- Decisions that have no realistic alternatives — if there's only one viable option, just use it
|
|
63
|
+
|
|
64
|
+
## ADR Structure
|
|
65
|
+
|
|
66
|
+
### Title
|
|
67
|
+
|
|
68
|
+
Format: `ADR-NNN: <decision statement>`
|
|
69
|
+
|
|
70
|
+
The title should be a concise decision statement, not a question. It states what was decided.
|
|
71
|
+
|
|
72
|
+
- Good: `ADR-003: Use PostgreSQL for persistent storage`
|
|
73
|
+
- Good: `ADR-007: Adopt hexagonal architecture for core services`
|
|
74
|
+
- Bad: `ADR-003: Database selection` (not a decision)
|
|
75
|
+
- Bad: `ADR-007: Architecture discussion` (no decision recorded)
|
|
76
|
+
|
|
77
|
+
### Status
|
|
78
|
+
|
|
79
|
+
Every ADR has exactly one status:
|
|
80
|
+
|
|
81
|
+
- **Proposed** — Under consideration, not yet accepted. Include in the document but flag that implementation should not proceed based on this decision.
|
|
82
|
+
- **Accepted** — Active and binding. The team follows this decision.
|
|
83
|
+
- **Deprecated** — No longer relevant due to changing requirements. The decision was correct when made but circumstances changed. Link to what replaced it.
|
|
84
|
+
- **Superseded** — Replaced by a newer ADR. Always link to the superseding ADR: "Superseded by ADR-015."
|
|
85
|
+
|
|
86
|
+
### Context
|
|
87
|
+
|
|
88
|
+
Describe the forces at play. What problem are we solving? What constraints exist? What options are available?
|
|
89
|
+
|
|
90
|
+
The context section answers: why is this decision necessary right now?
|
|
91
|
+
|
|
92
|
+
**Good context includes:**
|
|
93
|
+
|
|
94
|
+
- The specific requirement or constraint driving the decision (link to PRD section or user story)
|
|
95
|
+
- Technical constraints (performance needs, team expertise, existing infrastructure)
|
|
96
|
+
- Business constraints (budget, timeline, compliance requirements)
|
|
97
|
+
- Assumptions being made (and their risk of being wrong)
|
|
98
|
+
|
|
99
|
+
**Anti-pattern: missing context.** An ADR that says "We chose React" without explaining what drove the decision is useless. When requirements change, nobody can evaluate whether this ADR should be revisited because nobody knows what forces shaped it.
|
|
100
|
+
|
|
101
|
+
### Decision
|
|
102
|
+
|
|
103
|
+
State the decision clearly and directly. "We will use PostgreSQL for all persistent storage in this application."
|
|
104
|
+
|
|
105
|
+
The decision should be:
|
|
106
|
+
- Unambiguous — one reasonable interpretation
|
|
107
|
+
- Actionable — someone can implement based on this statement
|
|
108
|
+
- Scoped — clear what this decision applies to and what it doesn't
|
|
109
|
+
|
|
110
|
+
### Consequences
|
|
111
|
+
|
|
112
|
+
Every decision has trade-offs. Document both the benefits and the costs honestly.
|
|
113
|
+
|
|
114
|
+
**Benefits:**
|
|
115
|
+
|
|
116
|
+
- What does this decision enable?
|
|
117
|
+
- What risks does it mitigate?
|
|
118
|
+
- What becomes simpler?
|
|
119
|
+
|
|
120
|
+
**Costs and risks:**
|
|
121
|
+
|
|
122
|
+
- What becomes harder or more complex?
|
|
123
|
+
- What options does this decision foreclose?
|
|
124
|
+
- What new risks does it introduce?
|
|
125
|
+
- What operational burden does it add?
|
|
126
|
+
|
|
127
|
+
**Anti-pattern: consequence-free decisions.** If an ADR lists only benefits with no costs, the analysis is incomplete. Every technology and pattern choice involves trade-offs. Honest cost documentation builds trust and helps future decision-makers.
|
|
128
|
+
|
|
129
|
+
### Alternatives Considered
|
|
130
|
+
|
|
131
|
+
For each rejected alternative, document:
|
|
132
|
+
|
|
133
|
+
- What the alternative was
|
|
134
|
+
- Why it was considered (what made it a realistic option)
|
|
135
|
+
- Why it was rejected (specific reasons, not "we prefer X")
|
|
136
|
+
|
|
137
|
+
**Anti-pattern: straw-man alternatives.** Listing alternatives that were never seriously considered (or that are obviously wrong) undermines the ADR's credibility. Only include alternatives that were genuinely viable.
|
|
138
|
+
|
|
139
|
+
## Evaluation Framework
|
|
140
|
+
|
|
141
|
+
### For Technology Decisions
|
|
142
|
+
|
|
143
|
+
When evaluating technology options (language, framework, database, infrastructure), assess against these criteria:
|
|
144
|
+
|
|
145
|
+
**Team and AI expertise** — For AI-built projects, prioritize technologies with extensive representation in training data. Well-documented, widely-adopted tools produce fewer hallucinations and bugs. Niche or bleeding-edge tools increase error rates.
|
|
146
|
+
|
|
147
|
+
**Fit with requirements** — Does the technology naturally support the features described in the PRD? A real-time collaboration app needs WebSocket support. A data-heavy analytics dashboard needs efficient query capabilities. Don't force a technology into a use case it wasn't designed for.
|
|
148
|
+
|
|
149
|
+
**Community and ecosystem** — Active maintenance, frequent releases, responsive issue tracking, rich plugin/extension ecosystem. Check: when was the last release? How many open issues? Is there a single maintainer (bus factor risk)?
|
|
150
|
+
|
|
151
|
+
**Integration complexity** — How well does this technology compose with the other choices in the stack? Technologies that require elaborate glue code or adapter layers add maintenance burden.
|
|
152
|
+
|
|
153
|
+
**Operational complexity** — What does this technology require to run in production? PostgreSQL needs backups, monitoring, and tuning. SQLite needs none of that. Match operational complexity to team capacity.
|
|
154
|
+
|
|
155
|
+
**License compatibility** — Verify the license permits your intended use (commercial, SaaS, redistribution). Watch for "source available" licenses masquerading as open source (SSPL, BSL).
|
|
156
|
+
|
|
157
|
+
**Long-term maintenance** — Is this technology likely to be maintained in 3-5 years? Check: backing company/foundation, contributor diversity, adoption trajectory (growing, stable, declining).
|
|
158
|
+
|
|
159
|
+
### Evaluation Matrix
|
|
160
|
+
|
|
161
|
+
For significant decisions, use a weighted evaluation matrix:
|
|
162
|
+
|
|
163
|
+
| Criterion | Weight | Option A | Option B | Option C |
|
|
164
|
+
|-----------|--------|----------|----------|----------|
|
|
165
|
+
| AI familiarity | 25% | 9 | 7 | 4 |
|
|
166
|
+
| Fit with requirements | 25% | 8 | 9 | 7 |
|
|
167
|
+
| Community/ecosystem | 15% | 9 | 8 | 6 |
|
|
168
|
+
| Integration complexity | 15% | 7 | 8 | 5 |
|
|
169
|
+
| Operational complexity | 10% | 6 | 8 | 9 |
|
|
170
|
+
| Long-term maintenance | 10% | 8 | 7 | 5 |
|
|
171
|
+
| **Weighted total** | | **8.05** | **7.90** | **5.80** |
|
|
172
|
+
|
|
173
|
+
Weights should reflect project priorities. An AI-built project weights AI familiarity higher. A startup weights speed-to-market higher. An enterprise weights long-term maintenance higher.
|
|
174
|
+
|
|
175
|
+
### For Architectural Decisions
|
|
176
|
+
|
|
177
|
+
Evaluate architectural patterns against:
|
|
178
|
+
|
|
179
|
+
- **Complexity vs. value** — Does the added complexity deliver proportional value? Microservices for a CRUD app with one developer is over-engineering. A monolith for a system with clearly independent scaling needs is under-engineering.
|
|
180
|
+
- **Reversibility** — How expensive is it to change this decision later? Prefer reversible decisions (can switch ORMs in a week) over irreversible ones (entire system depends on event sourcing). Invest more analysis time in irreversible decisions.
|
|
181
|
+
- **Alignment with domain model** — Does the architecture naturally express the domain? A modular monolith with modules matching bounded contexts aligns well. A layered architecture that spreads domain concepts across layers does not.
|
|
182
|
+
- **Operational readiness** — Can the team (or AI agents) actually operate this in production? A Kubernetes-based microservices deployment requires expertise that a single-developer team may lack.
|
|
183
|
+
|
|
184
|
+
## ADR Lifecycle
|
|
185
|
+
|
|
186
|
+
### When to Create
|
|
187
|
+
|
|
188
|
+
- Create ADRs before implementation, not after. The ADR guides the implementation, not the other way around.
|
|
189
|
+
- For technology decisions: create during the tech stack selection phase, before any code is written.
|
|
190
|
+
- For architectural decisions: create during the architecture phase, after domain modeling and before implementation planning.
|
|
191
|
+
- For emergent decisions: when implementation reveals that an assumption was wrong, create an ADR documenting the pivot before changing course.
|
|
192
|
+
|
|
193
|
+
### When to Supersede
|
|
194
|
+
|
|
195
|
+
- When a decision is reversed (different technology chosen, different pattern adopted), create a new ADR and mark the old one as superseded.
|
|
196
|
+
- The superseding ADR must reference the original and explain what changed to invalidate the original decision.
|
|
197
|
+
- Never delete a superseded ADR. The history of decisions is valuable context for understanding why things are the way they are.
|
|
198
|
+
|
|
199
|
+
### When to Deprecate
|
|
200
|
+
|
|
201
|
+
- When a decision becomes irrelevant (the feature it relates to was removed, the technology it selected was swapped out as part of a broader change), mark it as deprecated.
|
|
202
|
+
- Link to the change that made it irrelevant.
|
|
203
|
+
|
|
204
|
+
### Cross-Referencing
|
|
205
|
+
|
|
206
|
+
- Related ADRs should reference each other. "See also ADR-005 for the database migration strategy that supports this caching decision."
|
|
207
|
+
- ADRs should reference the PRD sections or requirements that motivated them.
|
|
208
|
+
- Implementation tasks should reference the ADRs that guide them. "Implements ADR-003: PostgreSQL persistent storage."
|
|
209
|
+
|
|
210
|
+
### Recording Implicit Decisions
|
|
211
|
+
|
|
212
|
+
Many architectural decisions are made implicitly — someone starts using a library, a pattern emerges from code review, a deployment approach is chosen during a sprint. These are still architectural decisions.
|
|
213
|
+
|
|
214
|
+
Periodically audit the codebase for implicit decisions:
|
|
215
|
+
- Dependencies added to package.json/requirements.txt without documented rationale
|
|
216
|
+
- Architectural patterns used consistently without a recorded decision
|
|
217
|
+
- Infrastructure configurations that embody decisions (environment variables, Docker configurations)
|
|
218
|
+
- Test patterns that imply testing strategy decisions
|
|
219
|
+
|
|
220
|
+
Create retroactive ADRs for implicit decisions that meet the significance threshold.
|
|
221
|
+
|
|
222
|
+
## Technology Selection as ADRs
|
|
223
|
+
|
|
224
|
+
Technology selection is one of the most impactful categories of architectural decisions. The v1 scaffold pipeline treated tech stack as a separate document; in the current architecture, each technology choice is an ADR.
|
|
225
|
+
|
|
226
|
+
### Structure for Tech Stack ADRs
|
|
227
|
+
|
|
228
|
+
Each technology ADR should cover:
|
|
229
|
+
|
|
230
|
+
**What the document must capture:**
|
|
231
|
+
- The specific library/framework and version
|
|
232
|
+
- Rationale tied to project requirements (not generic praise for the technology)
|
|
233
|
+
- Why alternatives were rejected (specific technical reasons)
|
|
234
|
+
- AI compatibility assessment: how well-represented in training data, known AI pitfalls
|
|
235
|
+
|
|
236
|
+
**Guiding principles for AI-built projects:**
|
|
237
|
+
- Convention over configuration — opinionated frameworks with clear patterns reduce AI errors
|
|
238
|
+
- Minimal dependency surface — fewer dependencies mean fewer version conflicts and security risks
|
|
239
|
+
- Strong typing and validation — static types catch AI mistakes at build time
|
|
240
|
+
- Mature ecosystem — stable, well-documented libraries with active maintenance
|
|
241
|
+
|
|
242
|
+
### Grouping Related Decisions
|
|
243
|
+
|
|
244
|
+
Technology decisions often cluster. Rather than 20 individual ADRs for each package, group related decisions:
|
|
245
|
+
|
|
246
|
+
- "Backend technology stack" (language + framework + ORM + auth library)
|
|
247
|
+
- "Frontend technology stack" (framework + state management + styling + build tool)
|
|
248
|
+
- "Database and data access" (engine + migration tool + caching layer)
|
|
249
|
+
- "Infrastructure and deployment" (hosting + CI/CD + monitoring)
|
|
250
|
+
- "Developer tooling" (linter + formatter + test runner + pre-commit hooks)
|
|
251
|
+
|
|
252
|
+
Each group ADR can cover multiple decisions if they are tightly coupled and were evaluated together.
|
|
253
|
+
|
|
254
|
+
## Common Pitfalls
|
|
255
|
+
|
|
256
|
+
**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.
|
|
257
|
+
|
|
258
|
+
**Missing rationale.** "We chose PostgreSQL" is a fact, not a decision record. The rationale — "because we need JSONB for flexible metadata, strong ACID compliance for financial data, and it's the most AI-familiar relational database" — is the valuable part. Fix: the context and consequences sections should be longer than the decision section.
|
|
259
|
+
|
|
260
|
+
**Contradicting other ADRs without acknowledgment.** ADR-003 says "minimize dependencies" but ADR-008 adds a heavy utility library. This isn't necessarily wrong — trade-offs are legitimate — but the contradiction must be acknowledged in ADR-008. Fix: cross-reference related ADRs and explicitly address conflicts.
|
|
261
|
+
|
|
262
|
+
**Failing to record implicit decisions.** The codebase uses a specific error handling pattern everywhere, but no ADR documents why. When a new agent builds a feature, it invents a different error handling pattern. Fix: audit for implicit decisions periodically.
|
|
263
|
+
|
|
264
|
+
**Technology hype bias.** Choosing a technology because it's trending rather than because it fits the requirements. "Let's use Rust for the API because it's fast" when the bottleneck is database queries, not CPU-bound computation. Fix: evaluate against project-specific criteria, not general popularity.
|
|
265
|
+
|
|
266
|
+
**Premature decisions.** Recording a decision before gathering sufficient context. Choosing a database engine before understanding the data model leads to decisions that constrain the design unnecessarily. Fix: defer decisions until the last responsible moment — when further delay would reduce options.
|
|
267
|
+
|
|
268
|
+
**Stale ADRs.** Accepted ADRs that no longer reflect reality because the codebase has evolved. The ADR says "modular monolith" but the system has been split into services. Fix: review ADRs periodically and update status (supersede, deprecate) as needed.
|
|
269
|
+
|
|
270
|
+
## Quality Indicators
|
|
271
|
+
|
|
272
|
+
An ADR set is likely complete when:
|
|
273
|
+
|
|
274
|
+
- **Every technology in the dependency manifest has a corresponding ADR.** No mystery dependencies.
|
|
275
|
+
- **Every ADR is traceable to a requirement or constraint.** No decisions exist in a vacuum.
|
|
276
|
+
- **Alternatives are genuinely considered.** Rejected alternatives have specific, defensible rejection reasons — not "we prefer X."
|
|
277
|
+
- **Consequences are honest.** Every ADR lists at least one downside or risk. A consequence-free ADR is incomplete.
|
|
278
|
+
- **No contradictions between ADRs.** Or, if contradictions exist, they are acknowledged and explained.
|
|
279
|
+
- **The ADR set covers all layers.** Backend, frontend (if applicable), database, infrastructure, developer tooling, deployment, testing, and security all have decisions recorded.
|
|
280
|
+
- **Status is current.** No accepted ADRs that actually describe how things used to work. Superseded and deprecated ADRs are marked.
|
|
281
|
+
- **Cross-references are complete.** Related ADRs link to each other. ADRs link to the requirements they address.
|