@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,404 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementation-playbook
|
|
3
|
+
description: Structuring work for AI agents — task execution, coding standards, git workflow, quality gates
|
|
4
|
+
topics: [playbook, agents, implementation, coding-standards, git-workflow]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Playbook
|
|
8
|
+
|
|
9
|
+
The implementation playbook is the definitive reference for AI agents executing implementation tasks. It covers how agents pick and execute work, what coding standards they must follow, how they use git, how they hand off work, and what quality gates must pass before a task is considered complete.
|
|
10
|
+
|
|
11
|
+
This is the most critical finalization document. If the onboarding guide tells agents "what this project is," the playbook tells them "how to do the work."
|
|
12
|
+
|
|
13
|
+
## Task Execution Protocol
|
|
14
|
+
|
|
15
|
+
### How Agents Pick Work
|
|
16
|
+
|
|
17
|
+
1. **Check for available tasks.** Query the task management system for unblocked, unclaimed tasks.
|
|
18
|
+
2. **Claim the task.** Mark the task as claimed with the agent's identity. This prevents two agents from working on the same task.
|
|
19
|
+
3. **Read the task brief.** Each task should have a context brief listing what to read, what patterns to follow, and what the expected output is.
|
|
20
|
+
4. **Verify dependencies are complete.** Before starting, confirm that all tasks this one depends on are actually done — code is merged, migrations are applied, APIs are available.
|
|
21
|
+
5. **Start implementation.** Follow the coding standards, patterns, and conventions documented below.
|
|
22
|
+
6. **Run quality gates.** Before marking complete, run all quality checks.
|
|
23
|
+
7. **Submit for review.** Create a pull request following the git workflow.
|
|
24
|
+
8. **Hand off.** After merge, update the task status and record any notes for downstream tasks.
|
|
25
|
+
|
|
26
|
+
### Task Size Guidelines
|
|
27
|
+
|
|
28
|
+
A well-sized task is:
|
|
29
|
+
- **Completable in a single session** — If a task takes more than one work session, it is too large.
|
|
30
|
+
- **Independently verifiable** — You can run tests and confirm the task works without completing other tasks.
|
|
31
|
+
- **Reviewable in one sitting** — A PR should be reviewable in under 30 minutes.
|
|
32
|
+
|
|
33
|
+
**If a task is too large,** split it before starting. Common splits:
|
|
34
|
+
- Backend + frontend → separate tasks
|
|
35
|
+
- Data model + API + UI → separate tasks per layer
|
|
36
|
+
- Multiple endpoints → one task per endpoint (or per resource if closely related)
|
|
37
|
+
- Feature + tests → do NOT split these. Every task includes its own tests.
|
|
38
|
+
|
|
39
|
+
### Context Requirements
|
|
40
|
+
|
|
41
|
+
Each task should specify its context brief — the minimum set of documents an agent needs to read before implementing:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
## Task T-015: Implement User Registration Endpoint
|
|
45
|
+
|
|
46
|
+
### Context Brief
|
|
47
|
+
Read before starting:
|
|
48
|
+
- docs/api-contracts.md §2.1 (registration endpoint spec)
|
|
49
|
+
- docs/system-architecture.md §4.2 (auth service design)
|
|
50
|
+
- docs/database-schema.md §3.1 (users table)
|
|
51
|
+
- src/middleware/auth.ts (auth middleware pattern)
|
|
52
|
+
- src/handlers/health.handler.ts (handler pattern example)
|
|
53
|
+
|
|
54
|
+
### Acceptance Criteria
|
|
55
|
+
- POST /auth/register accepts {email, password}
|
|
56
|
+
- Returns 201 with {user, token} on success
|
|
57
|
+
- Returns 409 if email already exists
|
|
58
|
+
- Returns 422 for invalid input with field-level errors
|
|
59
|
+
- Password is hashed with bcrypt (cost factor 12)
|
|
60
|
+
- Registration event is logged
|
|
61
|
+
- Tests cover all response codes
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If a task does not have a context brief, the agent should create one from the specification artifacts before starting.
|
|
65
|
+
|
|
66
|
+
## Coding Standards
|
|
67
|
+
|
|
68
|
+
Coding standards ensure consistency across agents. Every agent must follow these conventions without exception. Inconsistency between agents produces a codebase that feels like it was written by different teams — because it was.
|
|
69
|
+
|
|
70
|
+
### Naming Conventions
|
|
71
|
+
|
|
72
|
+
**Files:**
|
|
73
|
+
- Use kebab-case for file names: `user-registration.handler.ts`, `order.service.ts`
|
|
74
|
+
- Test files mirror source files: `user-registration.handler.test.ts`
|
|
75
|
+
- One primary export per file. The file name should match the export name.
|
|
76
|
+
- Group by feature/domain, not by type (put `user.handler.ts`, `user.service.ts`, `user.repository.ts` together, not all handlers in one directory).
|
|
77
|
+
|
|
78
|
+
**Variables and functions:**
|
|
79
|
+
- Use camelCase for variables and functions: `getUserById`, `isAuthenticated`
|
|
80
|
+
- Use PascalCase for classes and types: `UserService`, `OrderStatus`
|
|
81
|
+
- Use UPPER_SNAKE_CASE for constants: `MAX_RETRY_COUNT`, `DEFAULT_PAGE_SIZE`
|
|
82
|
+
- Boolean variables start with `is`, `has`, `can`, `should`: `isActive`, `hasPermission`
|
|
83
|
+
- Functions that return booleans match the same convention: `isValid()`, `canAccess()`
|
|
84
|
+
- Event handler functions start with `on` or `handle`: `onOrderCreated`, `handlePaymentFailed`
|
|
85
|
+
|
|
86
|
+
**Database:**
|
|
87
|
+
- Use snake_case for table and column names: `users`, `created_at`, `order_items`
|
|
88
|
+
- Table names are plural: `users`, `orders`, `products`
|
|
89
|
+
- Foreign key columns end with `_id`: `user_id`, `order_id`
|
|
90
|
+
- Boolean columns start with `is_` or `has_`: `is_active`, `has_verified_email`
|
|
91
|
+
- Timestamp columns end with `_at`: `created_at`, `updated_at`, `deleted_at`
|
|
92
|
+
- Index names follow the pattern: `idx_{table}_{columns}`: `idx_users_email`
|
|
93
|
+
|
|
94
|
+
**API:**
|
|
95
|
+
- Use kebab-case for URL paths: `/api/user-profiles`, `/api/order-items`
|
|
96
|
+
- Use camelCase for JSON field names: `{ "firstName": "...", "createdAt": "..." }`
|
|
97
|
+
- Resource names are plural: `/api/users`, `/api/orders`
|
|
98
|
+
|
|
99
|
+
These are defaults. The project's ADRs or specific style guide may override any of these. Always check the project-specific decisions first.
|
|
100
|
+
|
|
101
|
+
### Error Handling
|
|
102
|
+
|
|
103
|
+
**Principles:**
|
|
104
|
+
1. **Fail fast.** Validate inputs at the boundary (API handler). Do not pass invalid data through multiple layers before failing.
|
|
105
|
+
2. **Use typed errors.** Define custom error classes with error codes. Do not throw generic Error objects.
|
|
106
|
+
3. **Errors are data, not strings.** An error response has a code (machine-readable), a message (human-readable), and optionally field-level details.
|
|
107
|
+
4. **Handle errors at the right layer.** Domain logic throws domain errors. The handler catches and translates to HTTP responses. Do not mix HTTP concerns in domain logic.
|
|
108
|
+
5. **Never swallow errors.** Catch-and-ignore is a bug. If you catch an error, either handle it (retry, fallback, transform) or re-throw it.
|
|
109
|
+
|
|
110
|
+
**Error response format:**
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"error": {
|
|
114
|
+
"code": "VALIDATION_ERROR",
|
|
115
|
+
"message": "Invalid input",
|
|
116
|
+
"details": [
|
|
117
|
+
{ "field": "email", "message": "Email is required" },
|
|
118
|
+
{ "field": "password", "message": "Password must be at least 8 characters" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**HTTP status code mapping:**
|
|
125
|
+
| Error Type | HTTP Status | When |
|
|
126
|
+
|-----------|-------------|------|
|
|
127
|
+
| ValidationError | 422 | Input fails validation |
|
|
128
|
+
| NotFoundError | 404 | Requested entity does not exist |
|
|
129
|
+
| ConflictError | 409 | Duplicate or state conflict |
|
|
130
|
+
| AuthenticationError | 401 | Missing or invalid credentials |
|
|
131
|
+
| AuthorizationError | 403 | Valid credentials, insufficient permissions |
|
|
132
|
+
| RateLimitError | 429 | Too many requests |
|
|
133
|
+
| InternalError | 500 | Unexpected errors (log the full error, return generic message) |
|
|
134
|
+
|
|
135
|
+
### Logging
|
|
136
|
+
|
|
137
|
+
**What to log:**
|
|
138
|
+
- Every incoming request (method, path, status, duration)
|
|
139
|
+
- Every outgoing request to external services (target, duration, status)
|
|
140
|
+
- Every error (with stack trace for unexpected errors)
|
|
141
|
+
- Every significant business event (user registered, order placed, payment processed)
|
|
142
|
+
- Every state transition (order status change, account activation)
|
|
143
|
+
|
|
144
|
+
**What NOT to log:**
|
|
145
|
+
- Passwords, tokens, API keys, or any secrets
|
|
146
|
+
- Full request/response bodies for endpoints that handle PII
|
|
147
|
+
- Health check requests (too noisy)
|
|
148
|
+
|
|
149
|
+
**Log format:**
|
|
150
|
+
Use structured logging (JSON). Each log entry should include:
|
|
151
|
+
- `timestamp` — ISO 8601
|
|
152
|
+
- `level` — error, warn, info, debug
|
|
153
|
+
- `message` — Human-readable description
|
|
154
|
+
- `requestId` — Correlation ID from the request (for tracing)
|
|
155
|
+
- Context fields appropriate to the event
|
|
156
|
+
|
|
157
|
+
**Log levels:**
|
|
158
|
+
- `error` — Something is broken and needs attention. Trigger an alert.
|
|
159
|
+
- `warn` — Something unexpected happened but the system recovered. Review periodically.
|
|
160
|
+
- `info` — Normal operational events. Business events, request completion.
|
|
161
|
+
- `debug` — Detailed diagnostic information. Disabled in production.
|
|
162
|
+
|
|
163
|
+
### Import Ordering
|
|
164
|
+
|
|
165
|
+
Follow a consistent import order:
|
|
166
|
+
1. Standard library / runtime modules
|
|
167
|
+
2. Third-party packages (npm modules)
|
|
168
|
+
3. Internal modules (project code) — absolute paths
|
|
169
|
+
4. Relative imports (same module)
|
|
170
|
+
|
|
171
|
+
Separate each group with a blank line.
|
|
172
|
+
|
|
173
|
+
### File Structure
|
|
174
|
+
|
|
175
|
+
Each source file follows a consistent structure:
|
|
176
|
+
1. Imports
|
|
177
|
+
2. Type definitions (interfaces, types, enums)
|
|
178
|
+
3. Constants
|
|
179
|
+
4. Main export (class, function, or component)
|
|
180
|
+
5. Helper functions (private to this module)
|
|
181
|
+
|
|
182
|
+
## Git Workflow
|
|
183
|
+
|
|
184
|
+
### Branching Strategy
|
|
185
|
+
|
|
186
|
+
**Trunk-based development** is the default unless the project's ADRs specify otherwise.
|
|
187
|
+
|
|
188
|
+
- `main` is always deployable
|
|
189
|
+
- Feature branches are short-lived (merged within 1-2 days)
|
|
190
|
+
- Branch naming: `{type}/{task-id}-{brief-description}`
|
|
191
|
+
- Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
|
|
192
|
+
- Examples: `feat/T-015-user-registration`, `fix/T-042-cart-total-rounding`
|
|
193
|
+
|
|
194
|
+
### Commit Message Format
|
|
195
|
+
|
|
196
|
+
Follow the Conventional Commits specification:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
type(scope): description
|
|
200
|
+
|
|
201
|
+
[optional body]
|
|
202
|
+
|
|
203
|
+
[optional footer]
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Types:** `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `perf`, `ci`
|
|
207
|
+
|
|
208
|
+
**Scope:** The module or component affected. Use the short name: `auth`, `orders`, `cart`, `db`.
|
|
209
|
+
|
|
210
|
+
**Description:** Imperative mood, lowercase, no period. Describe WHAT changed, not HOW.
|
|
211
|
+
|
|
212
|
+
**Examples:**
|
|
213
|
+
```
|
|
214
|
+
feat(auth): add user registration endpoint
|
|
215
|
+
|
|
216
|
+
Implements POST /auth/register with email/password validation,
|
|
217
|
+
bcrypt password hashing, and JWT token generation.
|
|
218
|
+
|
|
219
|
+
Closes T-015
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
fix(cart): correct total calculation for discounted items
|
|
224
|
+
|
|
225
|
+
The discount was being applied to the original price instead of
|
|
226
|
+
the line item subtotal, causing overcharges on multi-quantity
|
|
227
|
+
discounted items.
|
|
228
|
+
|
|
229
|
+
Closes T-042
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Bad commit messages:**
|
|
233
|
+
- "fix stuff" (what stuff?)
|
|
234
|
+
- "WIP" (should not be merged)
|
|
235
|
+
- "updates" (meaningless)
|
|
236
|
+
- "Fixed the bug in the thing" (what bug? what thing?)
|
|
237
|
+
|
|
238
|
+
### Task ID in Commits
|
|
239
|
+
|
|
240
|
+
Every commit must reference a task ID. This maintains traceability from code back to requirements.
|
|
241
|
+
|
|
242
|
+
Format: Include `Closes T-XXX` or `[T-XXX]` in the commit message footer or body.
|
|
243
|
+
|
|
244
|
+
### PR Process
|
|
245
|
+
|
|
246
|
+
1. **Create the branch** from latest `main`.
|
|
247
|
+
2. **Implement the task.** Make focused commits — each commit should be atomic and meaningful.
|
|
248
|
+
3. **Run all quality gates** locally before pushing.
|
|
249
|
+
4. **Push the branch** and create a pull request.
|
|
250
|
+
5. **PR title** follows commit message format: `type(scope): description [T-XXX]`
|
|
251
|
+
6. **PR body** includes:
|
|
252
|
+
- What changed and why
|
|
253
|
+
- How to test it
|
|
254
|
+
- Any follow-up work needed
|
|
255
|
+
- Screenshots if UI changes (or description of visual changes)
|
|
256
|
+
7. **Wait for CI** to pass.
|
|
257
|
+
8. **Review and address feedback** — make new commits, do not force-push during review.
|
|
258
|
+
9. **Merge** using squash merge (single commit on main with clean history).
|
|
259
|
+
10. **Delete the branch** after merge.
|
|
260
|
+
|
|
261
|
+
### Merge Strategy
|
|
262
|
+
|
|
263
|
+
**Squash and merge** is the default. This produces a clean main branch history where each commit represents one completed task.
|
|
264
|
+
|
|
265
|
+
Exceptions:
|
|
266
|
+
- If a task has multiple meaningful commits that should be preserved, use rebase and merge.
|
|
267
|
+
- Never use merge commits (no `--no-ff`). They clutter the history.
|
|
268
|
+
|
|
269
|
+
### Rebasing
|
|
270
|
+
|
|
271
|
+
Before creating a PR, rebase on latest main:
|
|
272
|
+
```bash
|
|
273
|
+
git fetch origin
|
|
274
|
+
git rebase origin/main
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
If conflicts arise:
|
|
278
|
+
1. Resolve each conflict carefully.
|
|
279
|
+
2. Verify tests still pass after resolution.
|
|
280
|
+
3. Continue the rebase.
|
|
281
|
+
|
|
282
|
+
Do not blindly accept "theirs" or "ours" — each conflict needs thoughtful resolution.
|
|
283
|
+
|
|
284
|
+
## Quality Gates
|
|
285
|
+
|
|
286
|
+
Before a task is considered complete, all quality gates must pass.
|
|
287
|
+
|
|
288
|
+
### Gate 1: Tests Pass
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
npm test # All tests pass
|
|
292
|
+
npm run test:coverage # Coverage meets threshold
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Every task must include tests for the code it adds or modifies:
|
|
296
|
+
- **Unit tests** for business logic (services, utilities)
|
|
297
|
+
- **Integration tests** for data access (repositories, database operations)
|
|
298
|
+
- **Handler tests** for API endpoints (request → response)
|
|
299
|
+
- **Component tests** for UI components (render + interaction)
|
|
300
|
+
|
|
301
|
+
### Gate 2: Lint and Type Check
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
npm run lint # No lint errors (warnings are allowed but discouraged)
|
|
305
|
+
npm run typecheck # No type errors
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Do not disable lint rules with `eslint-disable` unless the rule is genuinely wrong for that specific case, and add a comment explaining why.
|
|
309
|
+
|
|
310
|
+
### Gate 3: Build Succeeds
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
npm run build # Production build succeeds
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
If the build fails with warnings, investigate. Warnings often become errors in stricter environments.
|
|
317
|
+
|
|
318
|
+
### Gate 4: Manual Verification
|
|
319
|
+
|
|
320
|
+
For UI changes: visually verify the change works as specified. For API changes: test with curl or a REST client. For background jobs: trigger the job and verify the result.
|
|
321
|
+
|
|
322
|
+
Automated tests are necessary but not sufficient. Always verify the feature works end-to-end.
|
|
323
|
+
|
|
324
|
+
### Gate 5: No Regressions
|
|
325
|
+
|
|
326
|
+
Run the full test suite, not just the tests for the changed code. New code can break existing features through unexpected interactions.
|
|
327
|
+
|
|
328
|
+
## Inter-Agent Handoff
|
|
329
|
+
|
|
330
|
+
When one agent completes a task and another agent will build on it, the completing agent must communicate:
|
|
331
|
+
|
|
332
|
+
### What to Record in the Task Completion
|
|
333
|
+
|
|
334
|
+
1. **What was done** — Brief summary of the implementation approach. Not a code walkthrough, but enough for the next agent to understand the shape of the solution.
|
|
335
|
+
2. **What assumptions were made** — Any decision not explicitly in the specifications. "The spec said 'validate input' but did not specify max length. I used 255 characters for string fields."
|
|
336
|
+
3. **What is left** — Any known limitations, TODOs, or follow-up items. "Rate limiting is not implemented — depends on T-050."
|
|
337
|
+
4. **What to watch out for** — Any gotchas the next agent should know. "The User model has a `toJSON` method that strips sensitive fields — do not bypass it when returning user data."
|
|
338
|
+
5. **What files were modified** — List of files touched, so the next agent knows what to review.
|
|
339
|
+
|
|
340
|
+
### Handoff Format
|
|
341
|
+
|
|
342
|
+
```markdown
|
|
343
|
+
## Task T-015 Completion: User Registration Endpoint
|
|
344
|
+
|
|
345
|
+
### Summary
|
|
346
|
+
Implemented POST /auth/register. User creation, bcrypt hashing,
|
|
347
|
+
JWT generation, email uniqueness check. Handler, service, repository
|
|
348
|
+
layers with tests.
|
|
349
|
+
|
|
350
|
+
### Assumptions Made
|
|
351
|
+
- Max email length: 255 chars (not specified, matches RFC 5321)
|
|
352
|
+
- Password max length: 128 chars (bcrypt input limit)
|
|
353
|
+
- JWT expiry: 24 hours (not specified, used common default)
|
|
354
|
+
|
|
355
|
+
### Not Included
|
|
356
|
+
- Email verification flow (separate task T-016)
|
|
357
|
+
- Rate limiting on registration (depends on T-050)
|
|
358
|
+
|
|
359
|
+
### Watch Out
|
|
360
|
+
- UserRepository.create() throws ConflictError on duplicate email —
|
|
361
|
+
the handler maps this to 409. Do not add a pre-check query;
|
|
362
|
+
rely on the database unique constraint.
|
|
363
|
+
|
|
364
|
+
### Files Modified
|
|
365
|
+
- src/handlers/auth.handler.ts (new)
|
|
366
|
+
- src/services/auth.service.ts (new)
|
|
367
|
+
- src/repositories/user.repository.ts (new)
|
|
368
|
+
- src/routes/auth.routes.ts (new)
|
|
369
|
+
- src/errors/conflict.error.ts (new)
|
|
370
|
+
- prisma/migrations/001_create_users/ (new)
|
|
371
|
+
- tests/handlers/auth.handler.test.ts (new)
|
|
372
|
+
- tests/services/auth.service.test.ts (new)
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Working with Multiple Agents
|
|
376
|
+
|
|
377
|
+
When multiple agents work in parallel:
|
|
378
|
+
|
|
379
|
+
### Rules for Parallel Work
|
|
380
|
+
|
|
381
|
+
1. **Never work on the same file simultaneously.** If two tasks touch the same file, they must be sequenced, not parallelized.
|
|
382
|
+
2. **Rebase frequently.** Other agents are merging to main. Rebase before pushing to avoid conflicts.
|
|
383
|
+
3. **Claim tasks atomically.** Check-then-claim is a race condition. Use atomic claim operations.
|
|
384
|
+
4. **Communicate through the task system.** Do not assume another agent knows what you are doing. Update task status and completion notes.
|
|
385
|
+
|
|
386
|
+
### Conflict Resolution
|
|
387
|
+
|
|
388
|
+
When merge conflicts occur:
|
|
389
|
+
1. Read both sides of the conflict carefully.
|
|
390
|
+
2. Understand what the other agent changed and why.
|
|
391
|
+
3. Merge both changes (do not discard either side unless one is clearly wrong).
|
|
392
|
+
4. Run all tests after resolution.
|
|
393
|
+
5. If the conflict is complex (both sides restructured the same function), coordinate through the task system.
|
|
394
|
+
|
|
395
|
+
## Playbook Maintenance
|
|
396
|
+
|
|
397
|
+
The playbook is a living document. Update it when:
|
|
398
|
+
- A new pattern is established (add to coding standards)
|
|
399
|
+
- A common mistake is discovered (add to conventions or gotchas)
|
|
400
|
+
- The git workflow changes (branching strategy, merge approach)
|
|
401
|
+
- Quality gate thresholds change (coverage targets, lint rules)
|
|
402
|
+
- Agent coordination issues arise (add to parallel work rules)
|
|
403
|
+
|
|
404
|
+
The playbook should be the first document agents read before their first task, and the document they reference throughout implementation. If an agent asks a question that the playbook should answer, the answer goes in the playbook.
|