@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,513 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: operations-runbook
|
|
3
|
+
description: Dev environment setup, CI/CD pipeline design, deployment, monitoring, and incident response
|
|
4
|
+
topics: [operations, cicd, deployment, monitoring, dev-environment, incident-response, local-dev]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Dev Environment Setup
|
|
8
|
+
|
|
9
|
+
A productive development environment lets a developer (or AI agent) go from cloning the repo to running the application in under 5 minutes. The fewer manual steps, the fewer things that can go wrong.
|
|
10
|
+
|
|
11
|
+
### Local Development Prerequisites
|
|
12
|
+
|
|
13
|
+
Document every system-level dependency with exact versions:
|
|
14
|
+
|
|
15
|
+
| Dependency | Version | Why |
|
|
16
|
+
|------------|---------|-----|
|
|
17
|
+
| Node.js | 20.x LTS | Runtime |
|
|
18
|
+
| Python | 3.12+ | Backend scripts |
|
|
19
|
+
| PostgreSQL | 16+ | Primary database |
|
|
20
|
+
| Redis | 7+ | Caching and sessions |
|
|
21
|
+
| Docker | 24+ | Database containers (optional) |
|
|
22
|
+
|
|
23
|
+
**Version management:** Recommend a version manager for each language runtime:
|
|
24
|
+
- Node.js: `nvm`, `fnm`, or `.nvmrc` for automatic version switching
|
|
25
|
+
- Python: `pyenv` with `.python-version`
|
|
26
|
+
- Ruby: `rbenv` with `.ruby-version`
|
|
27
|
+
|
|
28
|
+
Check in a `.node-version` or `.nvmrc` file so tools auto-select the correct version.
|
|
29
|
+
|
|
30
|
+
### Environment Variables
|
|
31
|
+
|
|
32
|
+
Every project needs a clear environment variable strategy:
|
|
33
|
+
|
|
34
|
+
**`.env.example`** — Template committed to git with all required variables, default values for local development, and comments explaining each variable:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Application
|
|
38
|
+
APP_PORT=3000 # Port for the dev server
|
|
39
|
+
APP_ENV=development # development | staging | production
|
|
40
|
+
APP_URL=http://localhost:3000 # Base URL for the app
|
|
41
|
+
|
|
42
|
+
# Database
|
|
43
|
+
DATABASE_URL=postgresql://localhost:5432/myapp_dev # Local PostgreSQL
|
|
44
|
+
DATABASE_POOL_SIZE=5 # Connection pool size
|
|
45
|
+
|
|
46
|
+
# Authentication
|
|
47
|
+
JWT_SECRET=local-dev-secret-change-in-production # JWT signing key
|
|
48
|
+
SESSION_SECRET=local-session-secret # Session cookie secret
|
|
49
|
+
|
|
50
|
+
# External Services (optional for local dev)
|
|
51
|
+
# STRIPE_SECRET_KEY=sk_test_... # Uncomment when testing payments
|
|
52
|
+
# SENDGRID_API_KEY=SG.... # Uncomment when testing emails
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**`.env`** — Actual local configuration, gitignored. Created by copying `.env.example`.
|
|
56
|
+
|
|
57
|
+
**Required vs. optional:** Clearly mark which variables are required for the app to start and which are optional (features degrade gracefully without them).
|
|
58
|
+
|
|
59
|
+
### One-Command Setup
|
|
60
|
+
|
|
61
|
+
Provide a single command that installs all dependencies, creates the database, runs migrations, seeds data, and starts the dev server:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# First time setup
|
|
65
|
+
make setup # or: npm run setup
|
|
66
|
+
|
|
67
|
+
# Daily development
|
|
68
|
+
make dev # or: npm run dev
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The setup command should be idempotent — safe to run twice without breaking anything.
|
|
72
|
+
|
|
73
|
+
### Database Setup for Local Development
|
|
74
|
+
|
|
75
|
+
**Option A: Local installation**
|
|
76
|
+
- Install database server natively
|
|
77
|
+
- Create dev database: `createdb myapp_dev` (PostgreSQL)
|
|
78
|
+
- Run migrations: `make db-migrate`
|
|
79
|
+
- Seed data: `make db-seed`
|
|
80
|
+
|
|
81
|
+
**Option B: Docker Compose**
|
|
82
|
+
```yaml
|
|
83
|
+
services:
|
|
84
|
+
db:
|
|
85
|
+
image: postgres:16
|
|
86
|
+
ports: ["5432:5432"]
|
|
87
|
+
environment:
|
|
88
|
+
POSTGRES_DB: myapp_dev
|
|
89
|
+
POSTGRES_USER: postgres
|
|
90
|
+
POSTGRES_PASSWORD: postgres
|
|
91
|
+
volumes:
|
|
92
|
+
- pgdata:/var/lib/postgresql/data
|
|
93
|
+
|
|
94
|
+
redis:
|
|
95
|
+
image: redis:7
|
|
96
|
+
ports: ["6379:6379"]
|
|
97
|
+
|
|
98
|
+
volumes:
|
|
99
|
+
pgdata:
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Docker Compose is convenient for managing service dependencies but adds startup time and complexity. For simple stacks (SQLite, single service), skip Docker entirely.
|
|
103
|
+
|
|
104
|
+
**Option C: SQLite for development**
|
|
105
|
+
- No setup required
|
|
106
|
+
- Create database file on first run
|
|
107
|
+
- Fast, zero-configuration
|
|
108
|
+
- Trade-off: behavior differences from production PostgreSQL (no JSONB, different SQL dialect)
|
|
109
|
+
|
|
110
|
+
### Hot Reloading Configuration
|
|
111
|
+
|
|
112
|
+
The dev server must reload automatically when code changes:
|
|
113
|
+
|
|
114
|
+
- **Frontend:** Vite HMR (React, Vue, Svelte), Next.js Fast Refresh, or webpack HMR
|
|
115
|
+
- **Backend (Node.js):** `tsx watch`, `nodemon`, or `ts-node-dev` for TypeScript; `node --watch` for plain Node
|
|
116
|
+
- **Backend (Python):** `uvicorn --reload` (FastAPI), `flask run --debug` (Flask), `manage.py runserver` (Django)
|
|
117
|
+
- **Full-stack:** Run frontend and backend concurrently with a process manager (`concurrently`, `honcho`, or Makefile with `&`)
|
|
118
|
+
|
|
119
|
+
### Common Dev Commands
|
|
120
|
+
|
|
121
|
+
Every project should have a consistent set of commands. Use whatever mechanism fits the stack:
|
|
122
|
+
|
|
123
|
+
| Command | Purpose | Implementation |
|
|
124
|
+
|---------|---------|---------------|
|
|
125
|
+
| `make dev` | Start dev server with hot reload | Frontend + backend concurrently |
|
|
126
|
+
| `make test` | Run all tests | Test runner with coverage |
|
|
127
|
+
| `make test-watch` | Run tests in watch mode | Test runner in watch mode |
|
|
128
|
+
| `make lint` | Check code style | Linter for each language |
|
|
129
|
+
| `make format` | Auto-fix formatting | Formatter for each language |
|
|
130
|
+
| `make db-migrate` | Run pending migrations | Migration tool |
|
|
131
|
+
| `make db-seed` | Seed database with sample data | Seed script |
|
|
132
|
+
| `make db-reset` | Drop, recreate, migrate, seed | Compose the above |
|
|
133
|
+
| `make check` | Run all quality gates | lint + type-check + test |
|
|
134
|
+
|
|
135
|
+
Commands should be:
|
|
136
|
+
- Short and memorable (not `npx jest --runInBand --coverage --passWithNoTests`)
|
|
137
|
+
- Documented with help text
|
|
138
|
+
- Idempotent where possible
|
|
139
|
+
- Fast enough to run frequently
|
|
140
|
+
|
|
141
|
+
### Troubleshooting Guide
|
|
142
|
+
|
|
143
|
+
Document solutions for common development issues:
|
|
144
|
+
|
|
145
|
+
**Port already in use:**
|
|
146
|
+
```bash
|
|
147
|
+
lsof -i :3000 # Find the process
|
|
148
|
+
kill -9 <PID> # Kill it
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Database connection refused:**
|
|
152
|
+
- Is the database running? `pg_isready` or `docker ps`
|
|
153
|
+
- Is the connection string correct? Check `.env`
|
|
154
|
+
- Is the port correct? Check for port conflicts
|
|
155
|
+
|
|
156
|
+
**Dependencies out of sync:**
|
|
157
|
+
```bash
|
|
158
|
+
rm -rf node_modules && npm install # Node.js
|
|
159
|
+
rm -rf .venv && python -m venv .venv && pip install -r requirements.txt # Python
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Migrations out of date:**
|
|
163
|
+
```bash
|
|
164
|
+
make db-migrate # Run pending migrations
|
|
165
|
+
make db-reset # Nuclear option: start fresh
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## CI/CD Pipeline
|
|
169
|
+
|
|
170
|
+
### Pipeline Architecture
|
|
171
|
+
|
|
172
|
+
A CI/CD pipeline automates the path from code commit to production deployment. Design it in stages:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Push to branch
|
|
176
|
+
-> Stage 1: Fast checks (30s)
|
|
177
|
+
Lint, format check, type check
|
|
178
|
+
-> Stage 2: Tests (2-5 min)
|
|
179
|
+
Unit tests, integration tests (parallel)
|
|
180
|
+
-> Stage 3: Build (1-2 min)
|
|
181
|
+
Compile, bundle, generate artifacts
|
|
182
|
+
-> Stage 4: Deploy (2-5 min, only on main)
|
|
183
|
+
Deploy to staging/production
|
|
184
|
+
|
|
185
|
+
PR merge to main
|
|
186
|
+
-> All stages above
|
|
187
|
+
-> Stage 5: Post-deploy verification
|
|
188
|
+
Smoke tests against deployed environment
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Stage Design
|
|
192
|
+
|
|
193
|
+
**Stage 1: Fast Checks**
|
|
194
|
+
- Run on every push and PR
|
|
195
|
+
- Fail fast: if linting fails, don't bother running tests
|
|
196
|
+
- Cache dependencies between runs
|
|
197
|
+
- Target: <30 seconds
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
# GitHub Actions example
|
|
201
|
+
lint:
|
|
202
|
+
runs-on: ubuntu-latest
|
|
203
|
+
steps:
|
|
204
|
+
- uses: actions/checkout@v4
|
|
205
|
+
- uses: actions/setup-node@v4
|
|
206
|
+
with: { node-version-file: '.nvmrc' }
|
|
207
|
+
- run: npm ci --ignore-scripts
|
|
208
|
+
- run: npm run lint
|
|
209
|
+
- run: npm run type-check
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Stage 2: Tests**
|
|
213
|
+
- Run unit and integration tests in parallel
|
|
214
|
+
- Use a service container for the test database
|
|
215
|
+
- Upload coverage reports as artifacts
|
|
216
|
+
- Target: <5 minutes
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
test:
|
|
220
|
+
runs-on: ubuntu-latest
|
|
221
|
+
services:
|
|
222
|
+
postgres:
|
|
223
|
+
image: postgres:16
|
|
224
|
+
env:
|
|
225
|
+
POSTGRES_DB: test
|
|
226
|
+
POSTGRES_PASSWORD: test
|
|
227
|
+
ports: ['5432:5432']
|
|
228
|
+
steps:
|
|
229
|
+
- uses: actions/checkout@v4
|
|
230
|
+
- uses: actions/setup-node@v4
|
|
231
|
+
- run: npm ci
|
|
232
|
+
- run: npm run test:ci
|
|
233
|
+
env:
|
|
234
|
+
DATABASE_URL: postgresql://postgres:test@localhost:5432/test
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Stage 3: Build**
|
|
238
|
+
- Compile TypeScript, bundle frontend assets, generate Docker image
|
|
239
|
+
- Verify the build artifact is valid (start the server and check health endpoint)
|
|
240
|
+
- Store the build artifact for deployment
|
|
241
|
+
|
|
242
|
+
**Stage 4: Deploy**
|
|
243
|
+
- Only runs on main branch (after PR merge)
|
|
244
|
+
- Deploy the build artifact from Stage 3
|
|
245
|
+
- Run database migrations before starting new version
|
|
246
|
+
- Verify health check after deployment
|
|
247
|
+
|
|
248
|
+
### Parallelization and Caching
|
|
249
|
+
|
|
250
|
+
**Parallel jobs:** Run lint, unit tests, and integration tests as separate parallel jobs. The total pipeline time equals the longest individual job, not the sum.
|
|
251
|
+
|
|
252
|
+
**Dependency caching:** Cache `node_modules/` (keyed by `package-lock.json` hash), Python virtual environments, Docker layer cache. This turns a 60-second install into a 5-second cache restore.
|
|
253
|
+
|
|
254
|
+
**Test parallelization:** Split test files across multiple runners. Most test frameworks support `--shard` or `--split` modes.
|
|
255
|
+
|
|
256
|
+
### Artifact Management
|
|
257
|
+
|
|
258
|
+
- Build artifacts (compiled code, Docker images) should be built once and deployed to all environments
|
|
259
|
+
- Store artifacts in a registry (Docker Hub, GitHub Container Registry, S3)
|
|
260
|
+
- Tag artifacts with the git SHA for traceability
|
|
261
|
+
- Set retention policies (keep last 30 days, keep releases forever)
|
|
262
|
+
|
|
263
|
+
## Deployment Strategies
|
|
264
|
+
|
|
265
|
+
### Blue-Green Deployment
|
|
266
|
+
|
|
267
|
+
Run two identical production environments (blue and green). At any time, one is live (serving traffic) and one is idle (ready for the next version).
|
|
268
|
+
|
|
269
|
+
**Process:**
|
|
270
|
+
1. Deploy new version to the idle environment
|
|
271
|
+
2. Run smoke tests against the idle environment
|
|
272
|
+
3. Switch the load balancer to point to the idle environment
|
|
273
|
+
4. The previously-live environment becomes idle
|
|
274
|
+
|
|
275
|
+
**Advantages:** Instant rollback (switch back), zero-downtime deployment, full environment testing before cutover.
|
|
276
|
+
|
|
277
|
+
**Disadvantages:** Requires double the infrastructure. Database migrations need careful handling (both environments share the database).
|
|
278
|
+
|
|
279
|
+
### Canary Deployment
|
|
280
|
+
|
|
281
|
+
Route a small percentage of traffic (1-5%) to the new version while the majority continues on the current version.
|
|
282
|
+
|
|
283
|
+
**Process:**
|
|
284
|
+
1. Deploy new version alongside current version
|
|
285
|
+
2. Route 1% of traffic to the new version
|
|
286
|
+
3. Monitor error rates, latency, and business metrics
|
|
287
|
+
4. If metrics are healthy, gradually increase traffic (5%, 25%, 50%, 100%)
|
|
288
|
+
5. If metrics degrade, route all traffic back to the current version
|
|
289
|
+
|
|
290
|
+
**Advantages:** Catches production-only issues with minimal blast radius. Real user traffic validates the deployment.
|
|
291
|
+
|
|
292
|
+
**Disadvantages:** Requires traffic routing infrastructure. Database schema changes must be compatible with both versions simultaneously.
|
|
293
|
+
|
|
294
|
+
### Rolling Deployment
|
|
295
|
+
|
|
296
|
+
Replace instances one at a time. When a new instance is healthy, take down an old one.
|
|
297
|
+
|
|
298
|
+
**Process:**
|
|
299
|
+
1. Start a new instance with the new version
|
|
300
|
+
2. Wait for health check to pass
|
|
301
|
+
3. Add the new instance to the load balancer
|
|
302
|
+
4. Remove one old instance
|
|
303
|
+
5. Repeat until all instances are new
|
|
304
|
+
|
|
305
|
+
**Advantages:** No extra infrastructure needed. Gradual rollout.
|
|
306
|
+
|
|
307
|
+
**Disadvantages:** During deployment, both versions run simultaneously (must be compatible). Rollback requires re-deploying the old version.
|
|
308
|
+
|
|
309
|
+
### Feature Flags
|
|
310
|
+
|
|
311
|
+
Decouple deployment from release. Code is deployed but features are toggled off until ready.
|
|
312
|
+
|
|
313
|
+
**When to use:**
|
|
314
|
+
- Large features that take multiple PRs to complete
|
|
315
|
+
- Gradual rollout to users (A/B testing)
|
|
316
|
+
- Kill switch for risky features in production
|
|
317
|
+
|
|
318
|
+
**Implementation options:**
|
|
319
|
+
- Environment variables (simple, requires redeployment to change)
|
|
320
|
+
- Configuration file (slightly more flexible)
|
|
321
|
+
- Feature flag service (LaunchDarkly, Unleash, Flipt — most flexible, adds dependency)
|
|
322
|
+
|
|
323
|
+
### Rollback Procedures
|
|
324
|
+
|
|
325
|
+
Every deployment strategy needs a documented rollback plan:
|
|
326
|
+
|
|
327
|
+
| Strategy | Rollback Method | Time to Rollback |
|
|
328
|
+
|----------|----------------|-----------------|
|
|
329
|
+
| Blue-green | Switch load balancer back | Seconds |
|
|
330
|
+
| Canary | Route 100% to old version | Seconds |
|
|
331
|
+
| Rolling | Re-deploy previous version | Minutes |
|
|
332
|
+
| Feature flags | Disable the flag | Seconds |
|
|
333
|
+
|
|
334
|
+
**Database rollback:** If the deployment included database migrations, rollback requires reverse migrations. Test reverse migrations before deploying. Some migrations are irreversible (dropping columns) — have a recovery plan.
|
|
335
|
+
|
|
336
|
+
## Monitoring and Alerting
|
|
337
|
+
|
|
338
|
+
### Four Golden Signals
|
|
339
|
+
|
|
340
|
+
Monitor these four metrics for every service:
|
|
341
|
+
|
|
342
|
+
**Latency:** How long requests take.
|
|
343
|
+
- Track p50, p95, p99 latency
|
|
344
|
+
- Separate success latency from error latency (errors are often fast — don't let them hide slow successes)
|
|
345
|
+
- Set thresholds based on user expectations (API: <200ms p95, page load: <1s p95)
|
|
346
|
+
|
|
347
|
+
**Traffic:** How many requests the service is handling.
|
|
348
|
+
- Requests per second, broken down by endpoint and status code
|
|
349
|
+
- Unusual traffic patterns indicate either success (organic growth) or problems (attack, bot traffic, retry storm)
|
|
350
|
+
|
|
351
|
+
**Errors:** The rate of failed requests.
|
|
352
|
+
- Track error rate as a percentage of total requests
|
|
353
|
+
- Categorize errors: client errors (4xx) vs. server errors (5xx)
|
|
354
|
+
- A sudden spike in 5xx errors is an incident. A gradual increase in 4xx may indicate a UX problem.
|
|
355
|
+
|
|
356
|
+
**Saturation:** How "full" the service is.
|
|
357
|
+
- CPU utilization, memory utilization, disk I/O, database connection pool usage
|
|
358
|
+
- Set alerts before hitting capacity (80% utilization triggers warning, 95% triggers critical)
|
|
359
|
+
|
|
360
|
+
### Dashboard Design
|
|
361
|
+
|
|
362
|
+
Dashboards should answer one question: "Is the system healthy right now?"
|
|
363
|
+
|
|
364
|
+
**Overview dashboard:**
|
|
365
|
+
- Request rate (last 1 hour, with 24-hour comparison)
|
|
366
|
+
- Error rate (last 1 hour, with threshold lines)
|
|
367
|
+
- Latency percentiles (p50, p95, p99 — last 1 hour)
|
|
368
|
+
- Active users / sessions (if applicable)
|
|
369
|
+
- Key business metrics (orders/minute, signups/hour)
|
|
370
|
+
|
|
371
|
+
**Per-service dashboard:**
|
|
372
|
+
- Same golden signals but scoped to a single service
|
|
373
|
+
- Database connection pool (active, idle, waiting)
|
|
374
|
+
- Cache hit rate
|
|
375
|
+
- External dependency latency and error rates
|
|
376
|
+
|
|
377
|
+
### Alerting Thresholds
|
|
378
|
+
|
|
379
|
+
Set alerts based on user impact, not arbitrary numbers:
|
|
380
|
+
|
|
381
|
+
| Alert | Condition | Severity | Response |
|
|
382
|
+
|-------|-----------|----------|----------|
|
|
383
|
+
| High error rate | 5xx rate > 1% for 5 minutes | Critical | Page on-call |
|
|
384
|
+
| High latency | p95 > 2s for 10 minutes | Warning | Investigate |
|
|
385
|
+
| Database saturation | Connection pool > 80% for 5 minutes | Warning | Scale or optimize |
|
|
386
|
+
| Disk space | < 20% free | Warning | Expand or clean up |
|
|
387
|
+
| Certificate expiry | < 14 days | Warning | Renew certificate |
|
|
388
|
+
| External API failure | > 50% error rate for 5 minutes | Critical | Activate circuit breaker |
|
|
389
|
+
|
|
390
|
+
**Alert fatigue prevention:**
|
|
391
|
+
- Every alert must have a documented response action. If nobody knows what to do when it fires, remove it.
|
|
392
|
+
- Use warning (investigate when convenient) vs. critical (respond now) to reduce noise
|
|
393
|
+
- Aggregate related alerts — don't page for each of 100 failing requests; page once for the pattern
|
|
394
|
+
- Tune thresholds based on historical data, not guesses
|
|
395
|
+
|
|
396
|
+
### On-Call Rotation
|
|
397
|
+
|
|
398
|
+
If the project has a team:
|
|
399
|
+
- Define rotation schedule (weekly rotations are common)
|
|
400
|
+
- Document escalation paths (who to contact if on-call can't resolve)
|
|
401
|
+
- Ensure handoff includes current incidents and known issues
|
|
402
|
+
- Post-rotation review: were there incidents? Were runbooks adequate?
|
|
403
|
+
|
|
404
|
+
## Incident Response
|
|
405
|
+
|
|
406
|
+
### Runbook Format
|
|
407
|
+
|
|
408
|
+
Every anticipated failure mode should have a runbook entry:
|
|
409
|
+
|
|
410
|
+
```markdown
|
|
411
|
+
## Runbook: Database Connection Pool Exhausted
|
|
412
|
+
|
|
413
|
+
### Symptoms
|
|
414
|
+
- Error logs: "Connection pool exhausted"
|
|
415
|
+
- API returns 503 for database-dependent endpoints
|
|
416
|
+
- Monitoring: connection pool utilization at 100%
|
|
417
|
+
|
|
418
|
+
### Likely Causes
|
|
419
|
+
1. Long-running queries holding connections
|
|
420
|
+
2. Missing connection release in error paths
|
|
421
|
+
3. Sudden traffic spike exceeding pool size
|
|
422
|
+
4. Database server under load
|
|
423
|
+
|
|
424
|
+
### Resolution Steps
|
|
425
|
+
1. Check active queries: `SELECT * FROM pg_stat_activity WHERE state = 'active';`
|
|
426
|
+
2. Kill long-running queries: `SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE duration > interval '5 minutes';`
|
|
427
|
+
3. If caused by traffic spike: increase pool size in config and restart
|
|
428
|
+
4. If caused by code bug: identify the query, create a fix task, increase pool temporarily
|
|
429
|
+
|
|
430
|
+
### Prevention
|
|
431
|
+
- Set query timeout (30 seconds for API queries, 5 minutes for background jobs)
|
|
432
|
+
- Monitor pool utilization with alerts at 80%
|
|
433
|
+
- Review N+1 queries in code review
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Escalation Paths
|
|
437
|
+
|
|
438
|
+
Define when to escalate and to whom:
|
|
439
|
+
|
|
440
|
+
| Severity | Response Time | Who | Action |
|
|
441
|
+
|----------|--------------|-----|--------|
|
|
442
|
+
| SEV-1 (outage) | <15 minutes | On-call + team lead | All hands, user communication |
|
|
443
|
+
| SEV-2 (degraded) | <1 hour | On-call | Investigate and mitigate |
|
|
444
|
+
| SEV-3 (minor) | Next business day | Assigned engineer | Fix in normal workflow |
|
|
445
|
+
|
|
446
|
+
### Post-Mortem Template
|
|
447
|
+
|
|
448
|
+
After every SEV-1 or SEV-2 incident:
|
|
449
|
+
|
|
450
|
+
```markdown
|
|
451
|
+
## Incident Post-Mortem: [Title]
|
|
452
|
+
|
|
453
|
+
### Summary
|
|
454
|
+
One-paragraph description of what happened, impact, and duration.
|
|
455
|
+
|
|
456
|
+
### Timeline
|
|
457
|
+
- HH:MM — First alert fired
|
|
458
|
+
- HH:MM — On-call acknowledged
|
|
459
|
+
- HH:MM — Root cause identified
|
|
460
|
+
- HH:MM — Mitigation applied
|
|
461
|
+
- HH:MM — Service fully recovered
|
|
462
|
+
|
|
463
|
+
### Root Cause
|
|
464
|
+
Technical description of what went wrong and why.
|
|
465
|
+
|
|
466
|
+
### Impact
|
|
467
|
+
- Duration: X hours
|
|
468
|
+
- Users affected: N
|
|
469
|
+
- Revenue impact: $X (if applicable)
|
|
470
|
+
|
|
471
|
+
### What Went Well
|
|
472
|
+
- Detection was fast (alert fired within 2 minutes)
|
|
473
|
+
- Runbook was accurate
|
|
474
|
+
|
|
475
|
+
### What Went Wrong
|
|
476
|
+
- Rollback procedure was untested
|
|
477
|
+
- Escalation was delayed due to unclear ownership
|
|
478
|
+
|
|
479
|
+
### Action Items
|
|
480
|
+
| Action | Owner | Due Date |
|
|
481
|
+
|--------|-------|----------|
|
|
482
|
+
| Add database timeout | @alice | 2026-03-21 |
|
|
483
|
+
| Test rollback procedure monthly | @bob | Ongoing |
|
|
484
|
+
| Update runbook with new symptoms | @alice | 2026-03-18 |
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### SLA Definitions
|
|
488
|
+
|
|
489
|
+
Define service level targets for the application:
|
|
490
|
+
|
|
491
|
+
| Metric | Target | Measurement Period |
|
|
492
|
+
|--------|--------|-------------------|
|
|
493
|
+
| Availability | 99.9% (8.7 hours downtime/year) | Monthly |
|
|
494
|
+
| API Latency (p95) | < 200ms | Monthly |
|
|
495
|
+
| Error Rate | < 0.1% | Weekly |
|
|
496
|
+
| Deploy Frequency | Daily | Weekly |
|
|
497
|
+
| Mean Time to Recovery | < 1 hour | Per incident |
|
|
498
|
+
|
|
499
|
+
## Common Pitfalls
|
|
500
|
+
|
|
501
|
+
**Missing rollback procedures.** Deploying without a tested rollback plan. When the deployment breaks production, the team scrambles to figure out how to revert. Fix: every deployment strategy includes a documented, tested rollback procedure.
|
|
502
|
+
|
|
503
|
+
**Alert fatigue.** Too many alerts firing for non-critical issues. The on-call person starts ignoring alerts because most are noise. A real incident gets missed. Fix: every alert must have a clear response action. Remove alerts that routinely fire without requiring action.
|
|
504
|
+
|
|
505
|
+
**No local dev story.** "It works on the CI server" but developers can't run the application locally. Fix: document the local setup, make it one command, test it regularly by having new team members follow the instructions.
|
|
506
|
+
|
|
507
|
+
**Manual deployment steps.** Deployment requires an engineer to SSH into a server and run commands. This is error-prone, unreproducible, and blocks deployment on individual availability. Fix: fully automate deployment. A merge to main should trigger deployment automatically.
|
|
508
|
+
|
|
509
|
+
**No monitoring before launch.** Monitoring is added after the first incident, when it's most needed and least available. Fix: set up monitoring as part of the infrastructure phase, before any user traffic.
|
|
510
|
+
|
|
511
|
+
**Secrets in code.** API keys, database passwords, or JWT secrets committed to the repository. Fix: use environment variables loaded from a secrets manager. Scan the repository for accidentally committed secrets (git-secrets, truffleHog).
|
|
512
|
+
|
|
513
|
+
**Testing in production without feature flags.** Deploying untested features directly to all users. Fix: use feature flags to gradually expose new features. Test with a small percentage of traffic before full rollout.
|