@ginkoai/cli 1.0.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 +230 -0
- package/dist/adapters/ai-adapter.d.ts +25 -0
- package/dist/adapters/ai-adapter.d.ts.map +1 -0
- package/dist/adapters/ai-adapter.js +21 -0
- package/dist/adapters/ai-adapter.js.map +1 -0
- package/dist/adapters/ai-completion.d.ts +35 -0
- package/dist/adapters/ai-completion.d.ts.map +1 -0
- package/dist/adapters/ai-completion.js +118 -0
- package/dist/adapters/ai-completion.js.map +1 -0
- package/dist/adapters/base.d.ts +64 -0
- package/dist/adapters/base.d.ts.map +1 -0
- package/dist/adapters/base.js +48 -0
- package/dist/adapters/base.js.map +1 -0
- package/dist/adapters/claude-adapter.d.ts +18 -0
- package/dist/adapters/claude-adapter.d.ts.map +1 -0
- package/dist/adapters/claude-adapter.js +73 -0
- package/dist/adapters/claude-adapter.js.map +1 -0
- package/dist/adapters/claude.d.ts +20 -0
- package/dist/adapters/claude.d.ts.map +1 -0
- package/dist/adapters/claude.js +91 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/copilot-adapter.d.ts +16 -0
- package/dist/adapters/copilot-adapter.d.ts.map +1 -0
- package/dist/adapters/copilot-adapter.js +288 -0
- package/dist/adapters/copilot-adapter.js.map +1 -0
- package/dist/adapters/cursor-adapter.d.ts +22 -0
- package/dist/adapters/cursor-adapter.d.ts.map +1 -0
- package/dist/adapters/cursor-adapter.js +108 -0
- package/dist/adapters/cursor-adapter.js.map +1 -0
- package/dist/adapters/detector.d.ts +29 -0
- package/dist/adapters/detector.d.ts.map +1 -0
- package/dist/adapters/detector.js +132 -0
- package/dist/adapters/detector.js.map +1 -0
- package/dist/adapters/generic-adapter.d.ts +18 -0
- package/dist/adapters/generic-adapter.d.ts.map +1 -0
- package/dist/adapters/generic-adapter.js +37 -0
- package/dist/adapters/generic-adapter.js.map +1 -0
- package/dist/adapters/gpt4.d.ts +20 -0
- package/dist/adapters/gpt4.d.ts.map +1 -0
- package/dist/adapters/gpt4.js +114 -0
- package/dist/adapters/gpt4.js.map +1 -0
- package/dist/adapters/grok-adapter.d.ts +18 -0
- package/dist/adapters/grok-adapter.d.ts.map +1 -0
- package/dist/adapters/grok-adapter.js +94 -0
- package/dist/adapters/grok-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +18 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +71 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/openai-adapter.d.ts +18 -0
- package/dist/adapters/openai-adapter.d.ts.map +1 -0
- package/dist/adapters/openai-adapter.js +97 -0
- package/dist/adapters/openai-adapter.js.map +1 -0
- package/dist/adapters/universal.d.ts +20 -0
- package/dist/adapters/universal.d.ts.map +1 -0
- package/dist/adapters/universal.js +80 -0
- package/dist/adapters/universal.js.map +1 -0
- package/dist/analysis/deep-analyzer.d.ts +61 -0
- package/dist/analysis/deep-analyzer.d.ts.map +1 -0
- package/dist/analysis/deep-analyzer.js +349 -0
- package/dist/analysis/deep-analyzer.js.map +1 -0
- package/dist/analysis/project-analyzer.d.ts +25 -0
- package/dist/analysis/project-analyzer.d.ts.map +1 -0
- package/dist/analysis/project-analyzer.js +244 -0
- package/dist/analysis/project-analyzer.js.map +1 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts +82 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.js +649 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.js.map +1 -0
- package/dist/commands/architecture/architecture-pipeline.d.ts +105 -0
- package/dist/commands/architecture/architecture-pipeline.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-pipeline.js +510 -0
- package/dist/commands/architecture/architecture-pipeline.js.map +1 -0
- package/dist/commands/architecture/architecture-reflection.d.ts +67 -0
- package/dist/commands/architecture/architecture-reflection.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-reflection.js +508 -0
- package/dist/commands/architecture/architecture-reflection.js.map +1 -0
- package/dist/commands/architecture/index.d.ts +21 -0
- package/dist/commands/architecture/index.d.ts.map +1 -0
- package/dist/commands/architecture/index.js +41 -0
- package/dist/commands/architecture/index.js.map +1 -0
- package/dist/commands/architecture.d.ts +20 -0
- package/dist/commands/architecture.d.ts.map +1 -0
- package/dist/commands/architecture.js +223 -0
- package/dist/commands/architecture.js.map +1 -0
- package/dist/commands/backlog/ai-enhanced.d.ts +83 -0
- package/dist/commands/backlog/ai-enhanced.d.ts.map +1 -0
- package/dist/commands/backlog/ai-enhanced.js +462 -0
- package/dist/commands/backlog/ai-enhanced.js.map +1 -0
- package/dist/commands/backlog/ai-prompt.d.ts +21 -0
- package/dist/commands/backlog/ai-prompt.d.ts.map +1 -0
- package/dist/commands/backlog/ai-prompt.js +373 -0
- package/dist/commands/backlog/ai-prompt.js.map +1 -0
- package/dist/commands/backlog/ai-template.d.ts +21 -0
- package/dist/commands/backlog/ai-template.d.ts.map +1 -0
- package/dist/commands/backlog/ai-template.js +374 -0
- package/dist/commands/backlog/ai-template.js.map +1 -0
- package/dist/commands/backlog/ai.d.ts +21 -0
- package/dist/commands/backlog/ai.d.ts.map +1 -0
- package/dist/commands/backlog/ai.js +76 -0
- package/dist/commands/backlog/ai.js.map +1 -0
- package/dist/commands/backlog/backlog-pipeline.d.ts +103 -0
- package/dist/commands/backlog/backlog-pipeline.d.ts.map +1 -0
- package/dist/commands/backlog/backlog-pipeline.js +538 -0
- package/dist/commands/backlog/backlog-pipeline.js.map +1 -0
- package/dist/commands/backlog/backlog-reflection.d.ts +48 -0
- package/dist/commands/backlog/backlog-reflection.d.ts.map +1 -0
- package/dist/commands/backlog/backlog-reflection.js +231 -0
- package/dist/commands/backlog/backlog-reflection.js.map +1 -0
- package/dist/commands/backlog/base.d.ts +95 -0
- package/dist/commands/backlog/base.d.ts.map +1 -0
- package/dist/commands/backlog/base.js +291 -0
- package/dist/commands/backlog/base.js.map +1 -0
- package/dist/commands/backlog/complete.d.ts +20 -0
- package/dist/commands/backlog/complete.d.ts.map +1 -0
- package/dist/commands/backlog/complete.js +83 -0
- package/dist/commands/backlog/complete.js.map +1 -0
- package/dist/commands/backlog/context-gatherer.d.ts +76 -0
- package/dist/commands/backlog/context-gatherer.d.ts.map +1 -0
- package/dist/commands/backlog/context-gatherer.js +216 -0
- package/dist/commands/backlog/context-gatherer.js.map +1 -0
- package/dist/commands/backlog/create.d.ts +25 -0
- package/dist/commands/backlog/create.d.ts.map +1 -0
- package/dist/commands/backlog/create.js +131 -0
- package/dist/commands/backlog/create.js.map +1 -0
- package/dist/commands/backlog/index.d.ts +17 -0
- package/dist/commands/backlog/index.d.ts.map +1 -0
- package/dist/commands/backlog/index.js +177 -0
- package/dist/commands/backlog/index.js.map +1 -0
- package/dist/commands/backlog/list.d.ts +25 -0
- package/dist/commands/backlog/list.d.ts.map +1 -0
- package/dist/commands/backlog/list.js +136 -0
- package/dist/commands/backlog/list.js.map +1 -0
- package/dist/commands/backlog/quick-query.d.ts +16 -0
- package/dist/commands/backlog/quick-query.d.ts.map +1 -0
- package/dist/commands/backlog/quick-query.js +126 -0
- package/dist/commands/backlog/quick-query.js.map +1 -0
- package/dist/commands/backlog/show.d.ts +20 -0
- package/dist/commands/backlog/show.d.ts.map +1 -0
- package/dist/commands/backlog/show.js +95 -0
- package/dist/commands/backlog/show.js.map +1 -0
- package/dist/commands/backlog/update.d.ts +25 -0
- package/dist/commands/backlog/update.d.ts.map +1 -0
- package/dist/commands/backlog/update.js +113 -0
- package/dist/commands/backlog/update.js.map +1 -0
- package/dist/commands/bug/bug-context-gatherer.d.ts +58 -0
- package/dist/commands/bug/bug-context-gatherer.d.ts.map +1 -0
- package/dist/commands/bug/bug-context-gatherer.js +228 -0
- package/dist/commands/bug/bug-context-gatherer.js.map +1 -0
- package/dist/commands/bug/bug-reflection.d.ts +70 -0
- package/dist/commands/bug/bug-reflection.d.ts.map +1 -0
- package/dist/commands/bug/bug-reflection.js +343 -0
- package/dist/commands/bug/bug-reflection.js.map +1 -0
- package/dist/commands/capture/capture-reflection.d.ts +139 -0
- package/dist/commands/capture/capture-reflection.d.ts.map +1 -0
- package/dist/commands/capture/capture-reflection.js +583 -0
- package/dist/commands/capture/capture-reflection.js.map +1 -0
- package/dist/commands/capture.d.ts +22 -0
- package/dist/commands/capture.d.ts.map +1 -0
- package/dist/commands/capture.js +301 -0
- package/dist/commands/capture.js.map +1 -0
- package/dist/commands/changelog/changelog-reflection.d.ts +65 -0
- package/dist/commands/changelog/changelog-reflection.d.ts.map +1 -0
- package/dist/commands/changelog/changelog-reflection.js +252 -0
- package/dist/commands/changelog/changelog-reflection.js.map +1 -0
- package/dist/commands/compact.d.ts +15 -0
- package/dist/commands/compact.d.ts.map +1 -0
- package/dist/commands/compact.js +113 -0
- package/dist/commands/compact.js.map +1 -0
- package/dist/commands/config.d.ts +10 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +85 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/context-new.d.ts +18 -0
- package/dist/commands/context-new.d.ts.map +1 -0
- package/dist/commands/context-new.js +265 -0
- package/dist/commands/context-new.js.map +1 -0
- package/dist/commands/context.d.ts +16 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +82 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts +130 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.js +716 -0
- package/dist/commands/documentation/documentation-pipeline.js.map +1 -0
- package/dist/commands/documentation/documentation-reflection.d.ts +54 -0
- package/dist/commands/documentation/documentation-reflection.d.ts.map +1 -0
- package/dist/commands/documentation/documentation-reflection.js +338 -0
- package/dist/commands/documentation/documentation-reflection.js.map +1 -0
- package/dist/commands/explore/explore-reflection-pipeline.d.ts +117 -0
- package/dist/commands/explore/explore-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/explore/explore-reflection-pipeline.js +503 -0
- package/dist/commands/explore/explore-reflection-pipeline.js.map +1 -0
- package/dist/commands/explore/index.d.ts +29 -0
- package/dist/commands/explore/index.d.ts.map +1 -0
- package/dist/commands/explore/index.js +30 -0
- package/dist/commands/explore/index.js.map +1 -0
- package/dist/commands/explore.d.ts +20 -0
- package/dist/commands/explore.d.ts.map +1 -0
- package/dist/commands/explore.js +224 -0
- package/dist/commands/explore.js.map +1 -0
- package/dist/commands/git/git-context-gatherer.d.ts +101 -0
- package/dist/commands/git/git-context-gatherer.d.ts.map +1 -0
- package/dist/commands/git/git-context-gatherer.js +284 -0
- package/dist/commands/git/git-context-gatherer.js.map +1 -0
- package/dist/commands/git/git-pipeline.d.ts +75 -0
- package/dist/commands/git/git-pipeline.d.ts.map +1 -0
- package/dist/commands/git/git-pipeline.js +530 -0
- package/dist/commands/git/git-pipeline.js.map +1 -0
- package/dist/commands/git/git-reflection.d.ts +50 -0
- package/dist/commands/git/git-reflection.d.ts.map +1 -0
- package/dist/commands/git/git-reflection.js +193 -0
- package/dist/commands/git/git-reflection.js.map +1 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts +106 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.js +534 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.js.map +1 -0
- package/dist/commands/handoff/handoff-save.d.ts +16 -0
- package/dist/commands/handoff/handoff-save.d.ts.map +1 -0
- package/dist/commands/handoff/handoff-save.js +72 -0
- package/dist/commands/handoff/handoff-save.js.map +1 -0
- package/dist/commands/handoff/index.d.ts +19 -0
- package/dist/commands/handoff/index.d.ts.map +1 -0
- package/dist/commands/handoff/index.js +55 -0
- package/dist/commands/handoff/index.js.map +1 -0
- package/dist/commands/handoff-ai-orig.d.ts +27 -0
- package/dist/commands/handoff-ai-orig.d.ts.map +1 -0
- package/dist/commands/handoff-ai-orig.js +405 -0
- package/dist/commands/handoff-ai-orig.js.map +1 -0
- package/dist/commands/handoff-ai.d.ts +27 -0
- package/dist/commands/handoff-ai.d.ts.map +1 -0
- package/dist/commands/handoff-ai.js +405 -0
- package/dist/commands/handoff-ai.js.map +1 -0
- package/dist/commands/handoff-enhanced-orig.d.ts +25 -0
- package/dist/commands/handoff-enhanced-orig.d.ts.map +1 -0
- package/dist/commands/handoff-enhanced-orig.js +349 -0
- package/dist/commands/handoff-enhanced-orig.js.map +1 -0
- package/dist/commands/handoff-enhanced.d.ts +25 -0
- package/dist/commands/handoff-enhanced.d.ts.map +1 -0
- package/dist/commands/handoff-enhanced.js +349 -0
- package/dist/commands/handoff-enhanced.js.map +1 -0
- package/dist/commands/handoff-orig.d.ts +10 -0
- package/dist/commands/handoff-orig.d.ts.map +1 -0
- package/dist/commands/handoff-orig.js +167 -0
- package/dist/commands/handoff-orig.js.map +1 -0
- package/dist/commands/handoff.d.ts +10 -0
- package/dist/commands/handoff.d.ts.map +1 -0
- package/dist/commands/handoff.js +167 -0
- package/dist/commands/handoff.js.map +1 -0
- package/dist/commands/init-copilot.d.ts +6 -0
- package/dist/commands/init-copilot.d.ts.map +1 -0
- package/dist/commands/init-copilot.js +151 -0
- package/dist/commands/init-copilot.js.map +1 -0
- package/dist/commands/init-cursor.d.ts +5 -0
- package/dist/commands/init-cursor.d.ts.map +1 -0
- package/dist/commands/init-cursor.js +95 -0
- package/dist/commands/init-cursor.js.map +1 -0
- package/dist/commands/init-enhanced.d.ts +20 -0
- package/dist/commands/init-enhanced.d.ts.map +1 -0
- package/dist/commands/init-enhanced.js +430 -0
- package/dist/commands/init-enhanced.js.map +1 -0
- package/dist/commands/init.d.ts +16 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +213 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/magic-prompt.d.ts +20 -0
- package/dist/commands/magic-prompt.d.ts.map +1 -0
- package/dist/commands/magic-prompt.js +166 -0
- package/dist/commands/magic-prompt.js.map +1 -0
- package/dist/commands/magic-simple.d.ts +20 -0
- package/dist/commands/magic-simple.d.ts.map +1 -0
- package/dist/commands/magic-simple.js +32 -0
- package/dist/commands/magic-simple.js.map +1 -0
- package/dist/commands/magic.d.ts +20 -0
- package/dist/commands/magic.d.ts.map +1 -0
- package/dist/commands/magic.js +144 -0
- package/dist/commands/magic.js.map +1 -0
- package/dist/commands/plan/plan-reflection-pipeline.d.ts +126 -0
- package/dist/commands/plan/plan-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/plan/plan-reflection-pipeline.js +554 -0
- package/dist/commands/plan/plan-reflection-pipeline.js.map +1 -0
- package/dist/commands/plan.d.ts +20 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +253 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/prd/index.d.ts +21 -0
- package/dist/commands/prd/index.d.ts.map +1 -0
- package/dist/commands/prd/index.js +41 -0
- package/dist/commands/prd/index.js.map +1 -0
- package/dist/commands/prd/prd-pipeline-enhanced.d.ts +82 -0
- package/dist/commands/prd/prd-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/prd/prd-pipeline-enhanced.js +565 -0
- package/dist/commands/prd/prd-pipeline-enhanced.js.map +1 -0
- package/dist/commands/prd/prd-pipeline.d.ts +106 -0
- package/dist/commands/prd/prd-pipeline.d.ts.map +1 -0
- package/dist/commands/prd/prd-pipeline.js +491 -0
- package/dist/commands/prd/prd-pipeline.js.map +1 -0
- package/dist/commands/prd/prd-reflection-enhanced.d.ts +63 -0
- package/dist/commands/prd/prd-reflection-enhanced.d.ts.map +1 -0
- package/dist/commands/prd/prd-reflection-enhanced.js +310 -0
- package/dist/commands/prd/prd-reflection-enhanced.js.map +1 -0
- package/dist/commands/prd/prd-reflection.d.ts +59 -0
- package/dist/commands/prd/prd-reflection.d.ts.map +1 -0
- package/dist/commands/prd/prd-reflection.js +548 -0
- package/dist/commands/prd/prd-reflection.js.map +1 -0
- package/dist/commands/reflect.d.ts +24 -0
- package/dist/commands/reflect.d.ts.map +1 -0
- package/dist/commands/reflect.js +135 -0
- package/dist/commands/reflect.js.map +1 -0
- package/dist/commands/ship/ship-reflection.d.ts +164 -0
- package/dist/commands/ship/ship-reflection.d.ts.map +1 -0
- package/dist/commands/ship/ship-reflection.js +732 -0
- package/dist/commands/ship/ship-reflection.js.map +1 -0
- package/dist/commands/ship-ai.d.ts +28 -0
- package/dist/commands/ship-ai.d.ts.map +1 -0
- package/dist/commands/ship-ai.js +318 -0
- package/dist/commands/ship-ai.js.map +1 -0
- package/dist/commands/ship.d.ts +17 -0
- package/dist/commands/ship.d.ts.map +1 -0
- package/dist/commands/ship.js +175 -0
- package/dist/commands/ship.js.map +1 -0
- package/dist/commands/sprint/index.d.ts +21 -0
- package/dist/commands/sprint/index.d.ts.map +1 -0
- package/dist/commands/sprint/index.js +39 -0
- package/dist/commands/sprint/index.js.map +1 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.d.ts +142 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.js +822 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.js.map +1 -0
- package/dist/commands/sprint/sprint-pipeline.d.ts +72 -0
- package/dist/commands/sprint/sprint-pipeline.d.ts.map +1 -0
- package/dist/commands/sprint/sprint-pipeline.js +363 -0
- package/dist/commands/sprint/sprint-pipeline.js.map +1 -0
- package/dist/commands/start/index.d.ts +19 -0
- package/dist/commands/start/index.d.ts.map +1 -0
- package/dist/commands/start/index.js +41 -0
- package/dist/commands/start/index.js.map +1 -0
- package/dist/commands/start/start-reflection-pipeline.d.ts +99 -0
- package/dist/commands/start/start-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/start/start-reflection-pipeline.js +458 -0
- package/dist/commands/start/start-reflection-pipeline.js.map +1 -0
- package/dist/commands/start/start-reflection.d.ts +89 -0
- package/dist/commands/start/start-reflection.d.ts.map +1 -0
- package/dist/commands/start/start-reflection.js +572 -0
- package/dist/commands/start/start-reflection.js.map +1 -0
- package/dist/commands/start/start-with-synthesis.d.ts +20 -0
- package/dist/commands/start/start-with-synthesis.d.ts.map +1 -0
- package/dist/commands/start/start-with-synthesis.js +134 -0
- package/dist/commands/start/start-with-synthesis.js.map +1 -0
- package/dist/commands/start-enhanced-orig.d.ts +19 -0
- package/dist/commands/start-enhanced-orig.d.ts.map +1 -0
- package/dist/commands/start-enhanced-orig.js +434 -0
- package/dist/commands/start-enhanced-orig.js.map +1 -0
- package/dist/commands/start-enhanced.d.ts +19 -0
- package/dist/commands/start-enhanced.d.ts.map +1 -0
- package/dist/commands/start-enhanced.js +434 -0
- package/dist/commands/start-enhanced.js.map +1 -0
- package/dist/commands/start-orig.d.ts +10 -0
- package/dist/commands/start-orig.d.ts.map +1 -0
- package/dist/commands/start-orig.js +119 -0
- package/dist/commands/start-orig.js.map +1 -0
- package/dist/commands/start.d.ts +10 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +119 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +11 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +119 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/testing/index.d.ts +21 -0
- package/dist/commands/testing/index.d.ts.map +1 -0
- package/dist/commands/testing/index.js +41 -0
- package/dist/commands/testing/index.js.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts +94 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.js +760 -0
- package/dist/commands/testing/testing-pipeline-enhanced.js.map +1 -0
- package/dist/commands/testing/testing-pipeline.d.ts +77 -0
- package/dist/commands/testing/testing-pipeline.d.ts.map +1 -0
- package/dist/commands/testing/testing-pipeline.js +479 -0
- package/dist/commands/testing/testing-pipeline.js.map +1 -0
- package/dist/commands/uninstall-copilot.d.ts +5 -0
- package/dist/commands/uninstall-copilot.d.ts.map +1 -0
- package/dist/commands/uninstall-copilot.js +143 -0
- package/dist/commands/uninstall-copilot.js.map +1 -0
- package/dist/commands/uninstall-cursor.d.ts +6 -0
- package/dist/commands/uninstall-cursor.d.ts.map +1 -0
- package/dist/commands/uninstall-cursor.js +124 -0
- package/dist/commands/uninstall-cursor.js.map +1 -0
- package/dist/commands/vibecheck-ai.d.ts +25 -0
- package/dist/commands/vibecheck-ai.d.ts.map +1 -0
- package/dist/commands/vibecheck-ai.js +260 -0
- package/dist/commands/vibecheck-ai.js.map +1 -0
- package/dist/commands/vibecheck-aware.d.ts +19 -0
- package/dist/commands/vibecheck-aware.d.ts.map +1 -0
- package/dist/commands/vibecheck-aware.js +350 -0
- package/dist/commands/vibecheck-aware.js.map +1 -0
- package/dist/commands/vibecheck-final.d.ts +22 -0
- package/dist/commands/vibecheck-final.d.ts.map +1 -0
- package/dist/commands/vibecheck-final.js +132 -0
- package/dist/commands/vibecheck-final.js.map +1 -0
- package/dist/commands/vibecheck-natural.d.ts +18 -0
- package/dist/commands/vibecheck-natural.d.ts.map +1 -0
- package/dist/commands/vibecheck-natural.js +105 -0
- package/dist/commands/vibecheck-natural.js.map +1 -0
- package/dist/commands/vibecheck-simple.d.ts +20 -0
- package/dist/commands/vibecheck-simple.d.ts.map +1 -0
- package/dist/commands/vibecheck-simple.js +136 -0
- package/dist/commands/vibecheck-simple.js.map +1 -0
- package/dist/commands/vibecheck.d.ts +10 -0
- package/dist/commands/vibecheck.d.ts.map +1 -0
- package/dist/commands/vibecheck.js +95 -0
- package/dist/commands/vibecheck.js.map +1 -0
- package/dist/core/adapters/path-adapter.d.ts +144 -0
- package/dist/core/adapters/path-adapter.d.ts.map +1 -0
- package/dist/core/adapters/path-adapter.js +245 -0
- package/dist/core/adapters/path-adapter.js.map +1 -0
- package/dist/core/command-shortcuts.d.ts +62 -0
- package/dist/core/command-shortcuts.d.ts.map +1 -0
- package/dist/core/command-shortcuts.js +124 -0
- package/dist/core/command-shortcuts.js.map +1 -0
- package/dist/core/config/config-aware-reflection.d.ts +37 -0
- package/dist/core/config/config-aware-reflection.d.ts.map +1 -0
- package/dist/core/config/config-aware-reflection.js +97 -0
- package/dist/core/config/config-aware-reflection.js.map +1 -0
- package/dist/core/config/config-loader.d.ts +154 -0
- package/dist/core/config/config-loader.d.ts.map +1 -0
- package/dist/core/config/config-loader.js +424 -0
- package/dist/core/config/config-loader.js.map +1 -0
- package/dist/core/config/config-migrator.d.ts +150 -0
- package/dist/core/config/config-migrator.d.ts.map +1 -0
- package/dist/core/config/config-migrator.js +423 -0
- package/dist/core/config/config-migrator.js.map +1 -0
- package/dist/core/config/config-schema.d.ts +276 -0
- package/dist/core/config/config-schema.d.ts.map +1 -0
- package/dist/core/config/config-schema.js +277 -0
- package/dist/core/config/config-schema.js.map +1 -0
- package/dist/core/config/index.d.ts +260 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +283 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/config/interactive-config.d.ts +76 -0
- package/dist/core/config/interactive-config.d.ts.map +1 -0
- package/dist/core/config/interactive-config.js +315 -0
- package/dist/core/config/interactive-config.js.map +1 -0
- package/dist/core/config/path-config.d.ts +121 -0
- package/dist/core/config/path-config.d.ts.map +1 -0
- package/dist/core/config/path-config.js +210 -0
- package/dist/core/config/path-config.js.map +1 -0
- package/dist/core/config/path-resolver.d.ts +151 -0
- package/dist/core/config/path-resolver.d.ts.map +1 -0
- package/dist/core/config/path-resolver.js +343 -0
- package/dist/core/config/path-resolver.js.map +1 -0
- package/dist/core/config/project-detector.d.ts +58 -0
- package/dist/core/config/project-detector.d.ts.map +1 -0
- package/dist/core/config/project-detector.js +310 -0
- package/dist/core/config/project-detector.js.map +1 -0
- package/dist/core/config-backup/config-aware-reflection.d.ts +37 -0
- package/dist/core/config-backup/config-aware-reflection.d.ts.map +1 -0
- package/dist/core/config-backup/config-aware-reflection.js +97 -0
- package/dist/core/config-backup/config-aware-reflection.js.map +1 -0
- package/dist/core/config-backup/config-loader.d.ts +71 -0
- package/dist/core/config-backup/config-loader.d.ts.map +1 -0
- package/dist/core/config-backup/config-loader.js +288 -0
- package/dist/core/config-backup/config-loader.js.map +1 -0
- package/dist/core/config-backup/interactive-config.d.ts +76 -0
- package/dist/core/config-backup/interactive-config.d.ts.map +1 -0
- package/dist/core/config-backup/interactive-config.js +315 -0
- package/dist/core/config-backup/interactive-config.js.map +1 -0
- package/dist/core/config-backup/path-config.d.ts +121 -0
- package/dist/core/config-backup/path-config.d.ts.map +1 -0
- package/dist/core/config-backup/path-config.js +210 -0
- package/dist/core/config-backup/path-config.js.map +1 -0
- package/dist/core/config-backup/project-detector.d.ts +58 -0
- package/dist/core/config-backup/project-detector.d.ts.map +1 -0
- package/dist/core/config-backup/project-detector.js +310 -0
- package/dist/core/config-backup/project-detector.js.map +1 -0
- package/dist/core/documents/document-manager.d.ts +97 -0
- package/dist/core/documents/document-manager.d.ts.map +1 -0
- package/dist/core/documents/document-manager.js +441 -0
- package/dist/core/documents/document-manager.js.map +1 -0
- package/dist/core/documents/document-migrator.d.ts +138 -0
- package/dist/core/documents/document-migrator.d.ts.map +1 -0
- package/dist/core/documents/document-migrator.js +349 -0
- package/dist/core/documents/document-migrator.js.map +1 -0
- package/dist/core/documents/document-namer.d.ts +111 -0
- package/dist/core/documents/document-namer.d.ts.map +1 -0
- package/dist/core/documents/document-namer.js +225 -0
- package/dist/core/documents/document-namer.js.map +1 -0
- package/dist/core/documents/examples.d.ts +74 -0
- package/dist/core/documents/examples.d.ts.map +1 -0
- package/dist/core/documents/examples.js +273 -0
- package/dist/core/documents/examples.js.map +1 -0
- package/dist/core/documents/file-system.d.ts +93 -0
- package/dist/core/documents/file-system.d.ts.map +1 -0
- package/dist/core/documents/file-system.js +432 -0
- package/dist/core/documents/file-system.js.map +1 -0
- package/dist/core/documents/index.d.ts +97 -0
- package/dist/core/documents/index.d.ts.map +1 -0
- package/dist/core/documents/index.js +119 -0
- package/dist/core/documents/index.js.map +1 -0
- package/dist/core/documents/markdown-processor.d.ts +84 -0
- package/dist/core/documents/markdown-processor.d.ts.map +1 -0
- package/dist/core/documents/markdown-processor.js +302 -0
- package/dist/core/documents/markdown-processor.js.map +1 -0
- package/dist/core/documents/sequence-manager.d.ts +107 -0
- package/dist/core/documents/sequence-manager.d.ts.map +1 -0
- package/dist/core/documents/sequence-manager.js +246 -0
- package/dist/core/documents/sequence-manager.js.map +1 -0
- package/dist/core/documents/template-engine.d.ts +101 -0
- package/dist/core/documents/template-engine.d.ts.map +1 -0
- package/dist/core/documents/template-engine.js +440 -0
- package/dist/core/documents/template-engine.js.map +1 -0
- package/dist/core/handoff-quality.d.ts +164 -0
- package/dist/core/handoff-quality.d.ts.map +1 -0
- package/dist/core/handoff-quality.js +590 -0
- package/dist/core/handoff-quality.js.map +1 -0
- package/dist/core/platform/hook-adapter.d.ts +109 -0
- package/dist/core/platform/hook-adapter.d.ts.map +1 -0
- package/dist/core/platform/hook-adapter.js +527 -0
- package/dist/core/platform/hook-adapter.js.map +1 -0
- package/dist/core/platform/hook-migration.d.ts +73 -0
- package/dist/core/platform/hook-migration.d.ts.map +1 -0
- package/dist/core/platform/hook-migration.js +339 -0
- package/dist/core/platform/hook-migration.js.map +1 -0
- package/dist/core/platform/hook-migrator.d.ts +49 -0
- package/dist/core/platform/hook-migrator.d.ts.map +1 -0
- package/dist/core/platform/hook-migrator.js +305 -0
- package/dist/core/platform/hook-migrator.js.map +1 -0
- package/dist/core/platform/hook-templates.d.ts +60 -0
- package/dist/core/platform/hook-templates.d.ts.map +1 -0
- package/dist/core/platform/hook-templates.js +352 -0
- package/dist/core/platform/hook-templates.js.map +1 -0
- package/dist/core/platform/index.d.ts +82 -0
- package/dist/core/platform/index.d.ts.map +1 -0
- package/dist/core/platform/index.js +173 -0
- package/dist/core/platform/index.js.map +1 -0
- package/dist/core/platform/path-normalizer.d.ts +117 -0
- package/dist/core/platform/path-normalizer.d.ts.map +1 -0
- package/dist/core/platform/path-normalizer.js +333 -0
- package/dist/core/platform/path-normalizer.js.map +1 -0
- package/dist/core/platform/path-resolver.d.ts +120 -0
- package/dist/core/platform/path-resolver.d.ts.map +1 -0
- package/dist/core/platform/path-resolver.js +339 -0
- package/dist/core/platform/path-resolver.js.map +1 -0
- package/dist/core/platform/platform-adapter.d.ts +101 -0
- package/dist/core/platform/platform-adapter.d.ts.map +1 -0
- package/dist/core/platform/platform-adapter.js +243 -0
- package/dist/core/platform/platform-adapter.js.map +1 -0
- package/dist/core/platform/platform-detector.d.ts +122 -0
- package/dist/core/platform/platform-detector.d.ts.map +1 -0
- package/dist/core/platform/platform-detector.js +318 -0
- package/dist/core/platform/platform-detector.js.map +1 -0
- package/dist/core/platform/platform-templates.d.ts +62 -0
- package/dist/core/platform/platform-templates.d.ts.map +1 -0
- package/dist/core/platform/platform-templates.js +364 -0
- package/dist/core/platform/platform-templates.js.map +1 -0
- package/dist/core/platform/types.d.ts +54 -0
- package/dist/core/platform/types.d.ts.map +1 -0
- package/dist/core/platform/types.js +12 -0
- package/dist/core/platform/types.js.map +1 -0
- package/dist/core/polyglot-example.d.ts +115 -0
- package/dist/core/polyglot-example.d.ts.map +1 -0
- package/dist/core/polyglot-example.js +341 -0
- package/dist/core/polyglot-example.js.map +1 -0
- package/dist/core/pressure-monitor.d.ts +76 -0
- package/dist/core/pressure-monitor.d.ts.map +1 -0
- package/dist/core/pressure-monitor.js +156 -0
- package/dist/core/pressure-monitor.js.map +1 -0
- package/dist/core/reflection-pattern.d.ts +99 -0
- package/dist/core/reflection-pattern.d.ts.map +1 -0
- package/dist/core/reflection-pattern.js +294 -0
- package/dist/core/reflection-pattern.js.map +1 -0
- package/dist/core/session-log-manager.d.ts +83 -0
- package/dist/core/session-log-manager.d.ts.map +1 -0
- package/dist/core/session-log-manager.js +288 -0
- package/dist/core/session-log-manager.js.map +1 -0
- package/dist/core/simple-pipeline-base.d.ts +130 -0
- package/dist/core/simple-pipeline-base.d.ts.map +1 -0
- package/dist/core/simple-pipeline-base.js +240 -0
- package/dist/core/simple-pipeline-base.js.map +1 -0
- package/dist/core/simple-pipeline.d.ts +70 -0
- package/dist/core/simple-pipeline.d.ts.map +1 -0
- package/dist/core/simple-pipeline.js +241 -0
- package/dist/core/simple-pipeline.js.map +1 -0
- package/dist/core/utils/paths.d.ts +50 -0
- package/dist/core/utils/paths.d.ts.map +1 -0
- package/dist/core/utils/paths.js +75 -0
- package/dist/core/utils/paths.js.map +1 -0
- package/dist/core/validators/command-argument-validator.d.ts +102 -0
- package/dist/core/validators/command-argument-validator.d.ts.map +1 -0
- package/dist/core/validators/command-argument-validator.js +377 -0
- package/dist/core/validators/command-argument-validator.js.map +1 -0
- package/dist/core/validators/config-validator.d.ts +111 -0
- package/dist/core/validators/config-validator.d.ts.map +1 -0
- package/dist/core/validators/config-validator.js +433 -0
- package/dist/core/validators/config-validator.js.map +1 -0
- package/dist/core/validators/environment-validator.d.ts +138 -0
- package/dist/core/validators/environment-validator.d.ts.map +1 -0
- package/dist/core/validators/environment-validator.js +516 -0
- package/dist/core/validators/environment-validator.js.map +1 -0
- package/dist/core/validators/git-validator.d.ts +100 -0
- package/dist/core/validators/git-validator.d.ts.map +1 -0
- package/dist/core/validators/git-validator.js +288 -0
- package/dist/core/validators/git-validator.js.map +1 -0
- package/dist/core/validators/git-validator.test.d.ts +12 -0
- package/dist/core/validators/git-validator.test.d.ts.map +1 -0
- package/dist/core/validators/git-validator.test.js +40 -0
- package/dist/core/validators/git-validator.test.js.map +1 -0
- package/dist/core/validators/index.d.ts +90 -0
- package/dist/core/validators/index.d.ts.map +1 -0
- package/dist/core/validators/index.js +166 -0
- package/dist/core/validators/index.js.map +1 -0
- package/dist/core/validators/input-validator.d.ts +117 -0
- package/dist/core/validators/input-validator.d.ts.map +1 -0
- package/dist/core/validators/input-validator.js +368 -0
- package/dist/core/validators/input-validator.js.map +1 -0
- package/dist/core/validators/temp_index.d.ts +56 -0
- package/dist/core/validators/temp_index.d.ts.map +1 -0
- package/dist/core/validators/temp_index.js +94 -0
- package/dist/core/validators/temp_index.js.map +1 -0
- package/dist/core/validators/validation-error-handler.d.ts +107 -0
- package/dist/core/validators/validation-error-handler.d.ts.map +1 -0
- package/dist/core/validators/validation-error-handler.js +379 -0
- package/dist/core/validators/validation-error-handler.js.map +1 -0
- package/dist/core/validators/validation-orchestrator.d.ts +128 -0
- package/dist/core/validators/validation-orchestrator.d.ts.map +1 -0
- package/dist/core/validators/validation-orchestrator.js +301 -0
- package/dist/core/validators/validation-orchestrator.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +316 -0
- package/dist/index.js.map +1 -0
- package/dist/services/active-context-manager.d.ts +118 -0
- package/dist/services/active-context-manager.d.ts.map +1 -0
- package/dist/services/active-context-manager.js +435 -0
- package/dist/services/active-context-manager.js.map +1 -0
- package/dist/services/ai-service.d.ts +71 -0
- package/dist/services/ai-service.d.ts.map +1 -0
- package/dist/services/ai-service.js +329 -0
- package/dist/services/ai-service.js.map +1 -0
- package/dist/services/context-search.d.ts +98 -0
- package/dist/services/context-search.d.ts.map +1 -0
- package/dist/services/context-search.js +289 -0
- package/dist/services/context-search.js.map +1 -0
- package/dist/services/insight-extractor.d.ts +69 -0
- package/dist/services/insight-extractor.d.ts.map +1 -0
- package/dist/services/insight-extractor.js +343 -0
- package/dist/services/insight-extractor.js.map +1 -0
- package/dist/services/insight-quality-controller.d.ts +167 -0
- package/dist/services/insight-quality-controller.d.ts.map +1 -0
- package/dist/services/insight-quality-controller.js +543 -0
- package/dist/services/insight-quality-controller.js.map +1 -0
- package/dist/services/module-generator.d.ts +108 -0
- package/dist/services/module-generator.d.ts.map +1 -0
- package/dist/services/module-generator.js +561 -0
- package/dist/services/module-generator.js.map +1 -0
- package/dist/services/statusline-tracker.d.ts +139 -0
- package/dist/services/statusline-tracker.d.ts.map +1 -0
- package/dist/services/statusline-tracker.js +360 -0
- package/dist/services/statusline-tracker.js.map +1 -0
- package/dist/templates/ai-instructions-template.d.ts +39 -0
- package/dist/templates/ai-instructions-template.d.ts.map +1 -0
- package/dist/templates/ai-instructions-template.js +222 -0
- package/dist/templates/ai-instructions-template.js.map +1 -0
- package/dist/types/config.d.ts +128 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +49 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/documents.d.ts +87 -0
- package/dist/types/documents.d.ts.map +1 -0
- package/dist/types/documents.js +12 -0
- package/dist/types/documents.js.map +1 -0
- package/dist/types/session-log.d.ts +83 -0
- package/dist/types/session-log.d.ts.map +1 -0
- package/dist/types/session-log.js +12 -0
- package/dist/types/session-log.js.map +1 -0
- package/dist/types/session.d.ts +257 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +12 -0
- package/dist/types/session.js.map +1 -0
- package/dist/utils/ai-templates.d.ts +98 -0
- package/dist/utils/ai-templates.d.ts.map +1 -0
- package/dist/utils/ai-templates.js +179 -0
- package/dist/utils/ai-templates.js.map +1 -0
- package/dist/utils/ginko-root.d.ts +51 -0
- package/dist/utils/ginko-root.d.ts.map +1 -0
- package/dist/utils/ginko-root.js +96 -0
- package/dist/utils/ginko-root.js.map +1 -0
- package/dist/utils/helpers.d.ts +19 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +107 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/progressive-learning.d.ts +42 -0
- package/dist/utils/progressive-learning.d.ts.map +1 -0
- package/dist/utils/progressive-learning.js +248 -0
- package/dist/utils/progressive-learning.js.map +1 -0
- package/dist/utils/session-collector.d.ts +81 -0
- package/dist/utils/session-collector.d.ts.map +1 -0
- package/dist/utils/session-collector.js +387 -0
- package/dist/utils/session-collector.js.map +1 -0
- package/dist/utils/session-logger.d.ts +125 -0
- package/dist/utils/session-logger.d.ts.map +1 -0
- package/dist/utils/session-logger.js +359 -0
- package/dist/utils/session-logger.js.map +1 -0
- package/dist/utils/session-synthesizer.d.ts +36 -0
- package/dist/utils/session-synthesizer.d.ts.map +1 -0
- package/dist/utils/session-synthesizer.js +239 -0
- package/dist/utils/session-synthesizer.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: command
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2025-09-16
|
|
5
|
+
* @tags: [architecture, adr, pipeline, builder, safe-defaults]
|
|
6
|
+
* @related: [../../core/simple-pipeline-base.ts, ./architecture-pipeline.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [simple-pipeline-base, fs-extra]
|
|
10
|
+
*/
|
|
11
|
+
import { SimplePipelineBase } from '../../core/simple-pipeline-base.js';
|
|
12
|
+
import fs from 'fs-extra';
|
|
13
|
+
import * as path from 'path';
|
|
14
|
+
import chalk from 'chalk';
|
|
15
|
+
import { getGinkoDir } from '../../utils/helpers.js';
|
|
16
|
+
/**
|
|
17
|
+
* Enhanced Architecture Pipeline with Safe Defaults (ADR-014)
|
|
18
|
+
*
|
|
19
|
+
* Provides intelligent ADR generation with:
|
|
20
|
+
* - Automatic conflict detection (opt-out with --noconflict)
|
|
21
|
+
* - Architecture validation by default
|
|
22
|
+
* - Impact analysis (enhanced with --impacts)
|
|
23
|
+
* - Alternative evaluation (enhanced with --alternatives)
|
|
24
|
+
*/
|
|
25
|
+
export class EnhancedArchitecturePipeline extends SimplePipelineBase {
|
|
26
|
+
ginkoDir = '';
|
|
27
|
+
options;
|
|
28
|
+
analysis;
|
|
29
|
+
constructor(intent = 'Generate ADR', options = {}) {
|
|
30
|
+
super(intent);
|
|
31
|
+
this.withDomain('architecture');
|
|
32
|
+
// Apply safe defaults (ADR-014)
|
|
33
|
+
this.options = {
|
|
34
|
+
noconflict: false,
|
|
35
|
+
novalidate: false,
|
|
36
|
+
nowarn: false,
|
|
37
|
+
...options
|
|
38
|
+
};
|
|
39
|
+
// Initialize analysis
|
|
40
|
+
this.analysis = {
|
|
41
|
+
conflicts: [],
|
|
42
|
+
impacts: {
|
|
43
|
+
components: [],
|
|
44
|
+
performance: 'neutral',
|
|
45
|
+
security: 'unchanged',
|
|
46
|
+
complexity: 'unchanged',
|
|
47
|
+
risk: 'medium'
|
|
48
|
+
},
|
|
49
|
+
validation: {
|
|
50
|
+
hasContext: false,
|
|
51
|
+
hasDecision: false,
|
|
52
|
+
hasAlternatives: false,
|
|
53
|
+
hasConsequences: false,
|
|
54
|
+
completeness: 0
|
|
55
|
+
},
|
|
56
|
+
warnings: [],
|
|
57
|
+
recommendations: []
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Initialize pipeline
|
|
62
|
+
*/
|
|
63
|
+
async initialize() {
|
|
64
|
+
console.log(chalk.cyan('🏗️ Initializing enhanced architecture pipeline...'));
|
|
65
|
+
this.ginkoDir = await getGinkoDir();
|
|
66
|
+
this.adjustConfidence(0.95); // High confidence for architecture decisions
|
|
67
|
+
if (this.options.dryrun) {
|
|
68
|
+
console.log(chalk.yellow(' ⚡ DRY RUN MODE - No files will be saved'));
|
|
69
|
+
}
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Load ADR template
|
|
74
|
+
*/
|
|
75
|
+
async loadTemplate() {
|
|
76
|
+
const template = {
|
|
77
|
+
requiredSections: [
|
|
78
|
+
'title',
|
|
79
|
+
'status',
|
|
80
|
+
'context',
|
|
81
|
+
'decision',
|
|
82
|
+
'consequences',
|
|
83
|
+
'alternatives_considered'
|
|
84
|
+
],
|
|
85
|
+
optionalSections: [
|
|
86
|
+
'trade_offs',
|
|
87
|
+
'implementation_notes',
|
|
88
|
+
'references',
|
|
89
|
+
'review_notes'
|
|
90
|
+
],
|
|
91
|
+
contextToConsider: [
|
|
92
|
+
'existing_architecture',
|
|
93
|
+
'related_adrs',
|
|
94
|
+
'technical_constraints',
|
|
95
|
+
'non_functional_requirements',
|
|
96
|
+
'team_expertise'
|
|
97
|
+
],
|
|
98
|
+
rulesAndConstraints: [
|
|
99
|
+
'ADRs must be immutable once accepted',
|
|
100
|
+
'Decisions should be reversible when possible',
|
|
101
|
+
'Consider long-term maintainability',
|
|
102
|
+
'Document why alternatives were rejected',
|
|
103
|
+
'Include both positive and negative consequences'
|
|
104
|
+
]
|
|
105
|
+
};
|
|
106
|
+
this.withTemplate(template);
|
|
107
|
+
console.log(chalk.gray(' ✓ Enhanced ADR template loaded'));
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gather context with enhanced analysis
|
|
112
|
+
*/
|
|
113
|
+
async gatherContext() {
|
|
114
|
+
console.log(chalk.cyan('🔍 Gathering enhanced architecture context...'));
|
|
115
|
+
const parsedIntent = this.parseArchitectureIntent(this.ctx.intent);
|
|
116
|
+
// Conflict detection (default: on)
|
|
117
|
+
if (!this.options.noconflict) {
|
|
118
|
+
console.log(chalk.gray(' → Checking for conflicting ADRs...'));
|
|
119
|
+
this.analysis.conflicts = await this.detectConflicts(parsedIntent);
|
|
120
|
+
if (this.analysis.conflicts.length > 0) {
|
|
121
|
+
this.analysis.conflicts.forEach(conflict => {
|
|
122
|
+
if (conflict.type === 'contradicts') {
|
|
123
|
+
this.analysis.warnings.push(`Contradicts ${conflict.adr}: ${conflict.description}`);
|
|
124
|
+
}
|
|
125
|
+
else if (conflict.type === 'supersedes') {
|
|
126
|
+
this.analysis.recommendations.push(`Consider marking ${conflict.adr} as superseded by this decision`);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Validation checks (default: on)
|
|
132
|
+
if (!this.options.novalidate) {
|
|
133
|
+
console.log(chalk.gray(' → Validating architecture decision...'));
|
|
134
|
+
await this.validateDecision(parsedIntent);
|
|
135
|
+
}
|
|
136
|
+
// Impact analysis (opt-in with --impacts)
|
|
137
|
+
if (this.options.impacts) {
|
|
138
|
+
console.log(chalk.gray(' → Analyzing system-wide impacts...'));
|
|
139
|
+
this.analysis.impacts = await this.analyzeImpacts(parsedIntent);
|
|
140
|
+
}
|
|
141
|
+
// Alternative analysis (opt-in with --alternatives)
|
|
142
|
+
let alternatives = null;
|
|
143
|
+
if (this.options.alternatives) {
|
|
144
|
+
console.log(chalk.gray(' → Evaluating alternatives in depth...'));
|
|
145
|
+
alternatives = await this.evaluateAlternatives(parsedIntent);
|
|
146
|
+
}
|
|
147
|
+
// Get related ADRs
|
|
148
|
+
const relatedADRs = await this.findRelatedADRs(parsedIntent);
|
|
149
|
+
const context = {
|
|
150
|
+
parsedIntent,
|
|
151
|
+
analysis: this.analysis,
|
|
152
|
+
relatedADRs,
|
|
153
|
+
alternatives,
|
|
154
|
+
adrNumber: await this.getNextADRNumber()
|
|
155
|
+
};
|
|
156
|
+
this.withContext(context);
|
|
157
|
+
console.log(chalk.gray(' ✓ Enhanced context gathered'));
|
|
158
|
+
// Show warnings if not suppressed
|
|
159
|
+
if (!this.options.nowarn && this.analysis.warnings.length > 0) {
|
|
160
|
+
console.log(chalk.yellow('\n⚠️ Architecture Decision Warnings:'));
|
|
161
|
+
this.analysis.warnings.forEach(w => console.log(chalk.yellow(` • ${w}`)));
|
|
162
|
+
}
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Generate ADR content
|
|
167
|
+
*/
|
|
168
|
+
generateContent() {
|
|
169
|
+
console.log(chalk.cyan('📝 Generating enhanced ADR...'));
|
|
170
|
+
const context = this.ctx.context;
|
|
171
|
+
const sections = [];
|
|
172
|
+
// Header
|
|
173
|
+
const adrNumber = String(context.adrNumber).padStart(3, '0');
|
|
174
|
+
sections.push(`# ADR-${adrNumber}: ${context.parsedIntent.title}\n`);
|
|
175
|
+
sections.push(`**Status**: Proposed`);
|
|
176
|
+
sections.push(`**Date**: ${new Date().toISOString().split('T')[0]}`);
|
|
177
|
+
sections.push(`**Deciders**: Development Team`);
|
|
178
|
+
sections.push(`**Category**: ${context.parsedIntent.category || 'Architecture'}`);
|
|
179
|
+
sections.push(`**Analysis Mode**: ${this.getAnalysisMode()}\n`);
|
|
180
|
+
// Conflict Warning (if applicable)
|
|
181
|
+
if (this.analysis.conflicts.length > 0 && !this.options.noconflict) {
|
|
182
|
+
sections.push(`## ⚠️ Related ADRs\n`);
|
|
183
|
+
this.analysis.conflicts.forEach(conflict => {
|
|
184
|
+
const icon = conflict.type === 'contradicts' ? '❌' :
|
|
185
|
+
conflict.type === 'supersedes' ? '🔄' : '🔗';
|
|
186
|
+
sections.push(`- ${icon} ${conflict.adr}: ${conflict.description}`);
|
|
187
|
+
});
|
|
188
|
+
sections.push('');
|
|
189
|
+
}
|
|
190
|
+
// Context
|
|
191
|
+
sections.push(`## Context\n`);
|
|
192
|
+
sections.push(context.parsedIntent.context || 'Describe the architectural issue or decision trigger.');
|
|
193
|
+
sections.push('');
|
|
194
|
+
// Problem
|
|
195
|
+
sections.push(`### Problem Statement\n`);
|
|
196
|
+
sections.push(context.parsedIntent.problem || 'What specific problem are we solving?');
|
|
197
|
+
sections.push('');
|
|
198
|
+
// Constraints
|
|
199
|
+
sections.push(`### Constraints\n`);
|
|
200
|
+
sections.push('- Technical constraints');
|
|
201
|
+
sections.push('- Time constraints');
|
|
202
|
+
sections.push('- Resource constraints');
|
|
203
|
+
sections.push('');
|
|
204
|
+
// Decision
|
|
205
|
+
sections.push(`## Decision\n`);
|
|
206
|
+
sections.push(context.parsedIntent.decision || 'We will implement [specific solution].');
|
|
207
|
+
sections.push('');
|
|
208
|
+
// Rationale
|
|
209
|
+
sections.push(`### Rationale\n`);
|
|
210
|
+
sections.push('The key reasons for this decision:');
|
|
211
|
+
sections.push('1. Primary benefit');
|
|
212
|
+
sections.push('2. Alignment with goals');
|
|
213
|
+
sections.push('3. Technical advantages');
|
|
214
|
+
sections.push('');
|
|
215
|
+
// Alternatives Considered
|
|
216
|
+
sections.push(`## Alternatives Considered\n`);
|
|
217
|
+
if (context.alternatives && this.options.alternatives) {
|
|
218
|
+
// Detailed alternatives from analysis
|
|
219
|
+
context.alternatives.forEach((alt) => {
|
|
220
|
+
sections.push(`### ${alt.name}`);
|
|
221
|
+
sections.push(`**Pros**: ${alt.pros.join(', ')}`);
|
|
222
|
+
sections.push(`**Cons**: ${alt.cons.join(', ')}`);
|
|
223
|
+
sections.push(`**Rejected because**: ${alt.rejectionReason}\n`);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
// Basic alternatives
|
|
228
|
+
sections.push('### Alternative 1: Do Nothing');
|
|
229
|
+
sections.push('- **Pros**: No change required');
|
|
230
|
+
sections.push('- **Cons**: Problem persists');
|
|
231
|
+
sections.push('');
|
|
232
|
+
sections.push('### Alternative 2: Different Approach');
|
|
233
|
+
sections.push('- **Pros**: May be simpler');
|
|
234
|
+
sections.push('- **Cons**: Does not fully address the problem');
|
|
235
|
+
}
|
|
236
|
+
sections.push('');
|
|
237
|
+
// Consequences
|
|
238
|
+
sections.push(`## Consequences\n`);
|
|
239
|
+
sections.push('### Positive');
|
|
240
|
+
sections.push('- Improved system quality');
|
|
241
|
+
sections.push('- Better maintainability');
|
|
242
|
+
sections.push('- Clear architecture direction');
|
|
243
|
+
sections.push('');
|
|
244
|
+
sections.push('### Negative');
|
|
245
|
+
sections.push('- Implementation effort required');
|
|
246
|
+
sections.push('- Learning curve for team');
|
|
247
|
+
sections.push('- Potential migration costs');
|
|
248
|
+
sections.push('');
|
|
249
|
+
sections.push('### Neutral');
|
|
250
|
+
sections.push('- Changes to development workflow');
|
|
251
|
+
sections.push('- New patterns to follow');
|
|
252
|
+
sections.push('');
|
|
253
|
+
// Impact Analysis (if enabled)
|
|
254
|
+
if (this.options.impacts) {
|
|
255
|
+
sections.push(`## 🎯 Impact Analysis\n`);
|
|
256
|
+
sections.push(`- **Affected Components**: ${this.analysis.impacts.components.join(', ') || 'TBD'}`);
|
|
257
|
+
sections.push(`- **Performance Impact**: ${this.analysis.impacts.performance}`);
|
|
258
|
+
sections.push(`- **Security Impact**: ${this.analysis.impacts.security}`);
|
|
259
|
+
sections.push(`- **Complexity Impact**: ${this.analysis.impacts.complexity}`);
|
|
260
|
+
sections.push(`- **Risk Level**: ${this.analysis.impacts.risk}`);
|
|
261
|
+
sections.push('');
|
|
262
|
+
}
|
|
263
|
+
// Trade-offs (if enabled)
|
|
264
|
+
if (this.options.tradeoffs) {
|
|
265
|
+
sections.push(`## ⚖️ Trade-offs\n`);
|
|
266
|
+
sections.push('| Gain | Loss |');
|
|
267
|
+
sections.push('|------|------|');
|
|
268
|
+
sections.push('| Improved maintainability | Initial development time |');
|
|
269
|
+
sections.push('| Better performance | Increased complexity |');
|
|
270
|
+
sections.push('| Standardization | Flexibility |');
|
|
271
|
+
sections.push('');
|
|
272
|
+
}
|
|
273
|
+
// Implementation Notes
|
|
274
|
+
sections.push(`## Implementation Notes\n`);
|
|
275
|
+
sections.push('- Migration strategy required');
|
|
276
|
+
sections.push('- Documentation updates needed');
|
|
277
|
+
sections.push('- Team training considerations');
|
|
278
|
+
sections.push('');
|
|
279
|
+
// Validation Report (if not disabled)
|
|
280
|
+
if (!this.options.novalidate && this.analysis.validation.completeness < 100) {
|
|
281
|
+
sections.push(`## ✅ Validation Report\n`);
|
|
282
|
+
sections.push(`**Completeness**: ${this.analysis.validation.completeness}%\n`);
|
|
283
|
+
if (!this.analysis.validation.hasContext) {
|
|
284
|
+
sections.push('- ⚠️ Context needs more detail');
|
|
285
|
+
}
|
|
286
|
+
if (!this.analysis.validation.hasAlternatives) {
|
|
287
|
+
sections.push('- ⚠️ Consider more alternatives');
|
|
288
|
+
}
|
|
289
|
+
if (!this.analysis.validation.hasConsequences) {
|
|
290
|
+
sections.push('- ⚠️ Document both positive and negative consequences');
|
|
291
|
+
}
|
|
292
|
+
sections.push('');
|
|
293
|
+
}
|
|
294
|
+
// Warnings Summary
|
|
295
|
+
if (this.analysis.warnings.length > 0 && !this.options.nowarn) {
|
|
296
|
+
sections.push(`## ⚠️ Architecture Warnings\n`);
|
|
297
|
+
this.analysis.warnings.forEach(warning => {
|
|
298
|
+
sections.push(`- ${warning}`);
|
|
299
|
+
});
|
|
300
|
+
sections.push('');
|
|
301
|
+
}
|
|
302
|
+
// Recommendations
|
|
303
|
+
if (this.analysis.recommendations.length > 0) {
|
|
304
|
+
sections.push(`## 💡 Recommendations\n`);
|
|
305
|
+
this.analysis.recommendations.forEach(rec => {
|
|
306
|
+
sections.push(`- ${rec}`);
|
|
307
|
+
});
|
|
308
|
+
sections.push('');
|
|
309
|
+
}
|
|
310
|
+
// References
|
|
311
|
+
sections.push(`## References\n`);
|
|
312
|
+
if (context.relatedADRs?.length > 0) {
|
|
313
|
+
sections.push('### Related ADRs');
|
|
314
|
+
context.relatedADRs.forEach((adr) => {
|
|
315
|
+
sections.push(`- ${adr}`);
|
|
316
|
+
});
|
|
317
|
+
sections.push('');
|
|
318
|
+
}
|
|
319
|
+
sections.push('- [Architecture Decision Records](https://adr.github.io/)');
|
|
320
|
+
sections.push('- Project documentation');
|
|
321
|
+
sections.push('');
|
|
322
|
+
// Footer
|
|
323
|
+
sections.push('---');
|
|
324
|
+
sections.push(`**Generated**: ${new Date().toISOString()}`);
|
|
325
|
+
sections.push(`**Pipeline**: EnhancedArchitecturePipeline v2.0`);
|
|
326
|
+
sections.push(`**Analysis**: ${this.getAnalysisMode()}`);
|
|
327
|
+
sections.push(`**Confidence**: ${Math.round(this.ctx.confidence * 100)}%`);
|
|
328
|
+
this.ctx.content = sections.join('\n');
|
|
329
|
+
console.log(chalk.gray(' ✓ Enhanced ADR generated'));
|
|
330
|
+
return this;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Validate content with strict mode
|
|
334
|
+
*/
|
|
335
|
+
validateContent() {
|
|
336
|
+
if (!this.ctx.content) {
|
|
337
|
+
this.ctx.errors.push('No ADR content generated');
|
|
338
|
+
this.adjustConfidence(0.3);
|
|
339
|
+
return this;
|
|
340
|
+
}
|
|
341
|
+
// Strict mode validation
|
|
342
|
+
if (this.options.strict) {
|
|
343
|
+
if (this.analysis.warnings.length > 0) {
|
|
344
|
+
this.ctx.errors.push(`Strict mode: ${this.analysis.warnings.length} warnings present`);
|
|
345
|
+
this.adjustConfidence(0.4);
|
|
346
|
+
}
|
|
347
|
+
if (this.analysis.conflicts.some(c => c.type === 'contradicts')) {
|
|
348
|
+
this.ctx.errors.push('Strict mode: Contradicting ADRs detected');
|
|
349
|
+
this.adjustConfidence(0.3);
|
|
350
|
+
}
|
|
351
|
+
if (this.analysis.validation.completeness < 80) {
|
|
352
|
+
this.ctx.errors.push(`Strict mode: ADR only ${this.analysis.validation.completeness}% complete`);
|
|
353
|
+
this.adjustConfidence(0.5);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
console.log(chalk.gray(' ✓ Content validated'));
|
|
357
|
+
return this;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Save ADR (skip if dryrun)
|
|
361
|
+
*/
|
|
362
|
+
async save() {
|
|
363
|
+
if (this.options.dryrun) {
|
|
364
|
+
console.log(chalk.yellow('\n📋 DRY RUN - ADR not saved'));
|
|
365
|
+
console.log(chalk.dim('ADR would be saved to: docs/adr/'));
|
|
366
|
+
return this;
|
|
367
|
+
}
|
|
368
|
+
if (!this.ctx.content) {
|
|
369
|
+
console.error(chalk.red('No content to save'));
|
|
370
|
+
return this;
|
|
371
|
+
}
|
|
372
|
+
console.log(chalk.cyan('💾 Saving ADR...'));
|
|
373
|
+
const adrDir = path.join(process.cwd(), 'docs', 'adr');
|
|
374
|
+
await fs.ensureDir(adrDir);
|
|
375
|
+
const adrNumber = this.ctx.context?.adrNumber || 1;
|
|
376
|
+
const title = this.ctx.context?.parsedIntent?.title || 'untitled';
|
|
377
|
+
const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, '-');
|
|
378
|
+
const filename = `ADR-${String(adrNumber).padStart(3, '0')}-${slug}.md`;
|
|
379
|
+
const filepath = path.join(adrDir, filename);
|
|
380
|
+
await fs.writeFile(filepath, this.ctx.content, 'utf-8');
|
|
381
|
+
console.log(chalk.green(` ✅ ADR saved to: ${path.relative(process.cwd(), filepath)}`));
|
|
382
|
+
if (!this.ctx.metadata) {
|
|
383
|
+
this.ctx.metadata = {};
|
|
384
|
+
}
|
|
385
|
+
this.ctx.metadata.savedPath = filepath;
|
|
386
|
+
return this;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Execute final actions
|
|
390
|
+
*/
|
|
391
|
+
async execute() {
|
|
392
|
+
if (!this.options.dryrun && !this.ctx.metadata?.savedPath) {
|
|
393
|
+
throw new Error('ADR was not saved');
|
|
394
|
+
}
|
|
395
|
+
console.log(chalk.green('\n✨ Enhanced architecture pipeline completed successfully!'));
|
|
396
|
+
return this.ctx;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Main build method
|
|
400
|
+
*/
|
|
401
|
+
async build() {
|
|
402
|
+
try {
|
|
403
|
+
return await this.initialize()
|
|
404
|
+
.then(p => p.loadTemplate())
|
|
405
|
+
.then(p => p.gatherContext())
|
|
406
|
+
.then(p => {
|
|
407
|
+
p.generateContent();
|
|
408
|
+
p.validateContent();
|
|
409
|
+
return p;
|
|
410
|
+
})
|
|
411
|
+
.then(p => p.validate())
|
|
412
|
+
.then(p => p.recover())
|
|
413
|
+
.then(p => p.save())
|
|
414
|
+
.then(p => p.execute())
|
|
415
|
+
.then(ctx => {
|
|
416
|
+
if (this.options.dryrun) {
|
|
417
|
+
console.log('\n' + chalk.dim('='.repeat(60)));
|
|
418
|
+
console.log(ctx.content);
|
|
419
|
+
console.log(chalk.dim('='.repeat(60)) + '\n');
|
|
420
|
+
}
|
|
421
|
+
return ctx.metadata?.savedPath || '';
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
catch (error) {
|
|
425
|
+
console.error(chalk.red(`Enhanced architecture pipeline failed: ${error}`));
|
|
426
|
+
throw error;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
// Helper methods
|
|
430
|
+
parseArchitectureIntent(intent) {
|
|
431
|
+
const title = intent.split('.')[0].split(':')[0].trim();
|
|
432
|
+
const context = intent;
|
|
433
|
+
// Try to extract decision
|
|
434
|
+
let decision = '';
|
|
435
|
+
if (intent.includes('will') || intent.includes('should')) {
|
|
436
|
+
decision = intent.split(/will|should/)[1]?.trim() || '';
|
|
437
|
+
}
|
|
438
|
+
// Detect category
|
|
439
|
+
let category = 'Architecture';
|
|
440
|
+
if (intent.match(/database|data|storage/i))
|
|
441
|
+
category = 'Data';
|
|
442
|
+
if (intent.match(/api|service|microservice/i))
|
|
443
|
+
category = 'Services';
|
|
444
|
+
if (intent.match(/security|auth|encryption/i))
|
|
445
|
+
category = 'Security';
|
|
446
|
+
if (intent.match(/performance|cache|optimization/i))
|
|
447
|
+
category = 'Performance';
|
|
448
|
+
return {
|
|
449
|
+
title,
|
|
450
|
+
context,
|
|
451
|
+
decision,
|
|
452
|
+
category,
|
|
453
|
+
problem: intent,
|
|
454
|
+
raw: intent
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
async detectConflicts(parsedIntent) {
|
|
458
|
+
const conflicts = [];
|
|
459
|
+
const adrDir = path.join(process.cwd(), 'docs', 'adr');
|
|
460
|
+
if (await fs.pathExists(adrDir)) {
|
|
461
|
+
const files = await fs.readdir(adrDir);
|
|
462
|
+
for (const file of files) {
|
|
463
|
+
if (file.endsWith('.md') && file !== 'README.md') {
|
|
464
|
+
const content = await fs.readFile(path.join(adrDir, file), 'utf-8');
|
|
465
|
+
// Check for topic overlap
|
|
466
|
+
const overlap = this.checkTopicOverlap(parsedIntent, content);
|
|
467
|
+
if (overlap.score > 0.3) {
|
|
468
|
+
conflicts.push({
|
|
469
|
+
adr: file.split('-').slice(0, 2).join('-'),
|
|
470
|
+
type: overlap.type,
|
|
471
|
+
description: overlap.description
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return conflicts;
|
|
478
|
+
}
|
|
479
|
+
checkTopicOverlap(parsedIntent, content) {
|
|
480
|
+
// Extract key terms from intent
|
|
481
|
+
const intentTerms = parsedIntent.raw.toLowerCase().split(/\s+/);
|
|
482
|
+
const contentLower = content.toLowerCase();
|
|
483
|
+
let matchCount = 0;
|
|
484
|
+
intentTerms.forEach((term) => {
|
|
485
|
+
if (term.length > 4 && contentLower.includes(term)) {
|
|
486
|
+
matchCount++;
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
const score = matchCount / intentTerms.length;
|
|
490
|
+
// Determine conflict type
|
|
491
|
+
let type = 'overlaps';
|
|
492
|
+
let description = 'Related architecture decision';
|
|
493
|
+
if (content.includes('superseded') || content.includes('deprecated')) {
|
|
494
|
+
type = 'supersedes';
|
|
495
|
+
description = 'This decision may supersede the existing one';
|
|
496
|
+
}
|
|
497
|
+
else if (score > 0.6) {
|
|
498
|
+
type = 'contradicts';
|
|
499
|
+
description = 'Potentially conflicting architecture decision';
|
|
500
|
+
}
|
|
501
|
+
return { score, type, description };
|
|
502
|
+
}
|
|
503
|
+
async validateDecision(parsedIntent) {
|
|
504
|
+
let score = 0;
|
|
505
|
+
const maxScore = 4;
|
|
506
|
+
if (parsedIntent.context?.length > 50) {
|
|
507
|
+
this.analysis.validation.hasContext = true;
|
|
508
|
+
score++;
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
this.analysis.warnings.push('Context section needs more detail');
|
|
512
|
+
}
|
|
513
|
+
if (parsedIntent.decision?.length > 20) {
|
|
514
|
+
this.analysis.validation.hasDecision = true;
|
|
515
|
+
score++;
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
this.analysis.warnings.push('Decision statement should be more explicit');
|
|
519
|
+
}
|
|
520
|
+
// Check for alternatives mentioned
|
|
521
|
+
if (parsedIntent.raw.match(/alternative|option|instead|versus|vs/i)) {
|
|
522
|
+
this.analysis.validation.hasAlternatives = true;
|
|
523
|
+
score++;
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
this.analysis.recommendations.push('Consider documenting alternative approaches');
|
|
527
|
+
}
|
|
528
|
+
// Check for consequences mentioned
|
|
529
|
+
if (parsedIntent.raw.match(/consequence|result|impact|effect/i)) {
|
|
530
|
+
this.analysis.validation.hasConsequences = true;
|
|
531
|
+
score++;
|
|
532
|
+
}
|
|
533
|
+
this.analysis.validation.completeness = Math.round((score / maxScore) * 100);
|
|
534
|
+
}
|
|
535
|
+
async analyzeImpacts(parsedIntent) {
|
|
536
|
+
const impacts = {
|
|
537
|
+
components: [],
|
|
538
|
+
performance: 'neutral',
|
|
539
|
+
security: 'unchanged',
|
|
540
|
+
complexity: 'unchanged',
|
|
541
|
+
risk: 'medium'
|
|
542
|
+
};
|
|
543
|
+
// Detect affected components
|
|
544
|
+
if (parsedIntent.raw.match(/api|service/i)) {
|
|
545
|
+
impacts.components.push('API Layer');
|
|
546
|
+
}
|
|
547
|
+
if (parsedIntent.raw.match(/database|data|storage/i)) {
|
|
548
|
+
impacts.components.push('Data Layer');
|
|
549
|
+
}
|
|
550
|
+
if (parsedIntent.raw.match(/ui|frontend|component/i)) {
|
|
551
|
+
impacts.components.push('UI Layer');
|
|
552
|
+
}
|
|
553
|
+
// Analyze performance impact
|
|
554
|
+
if (parsedIntent.raw.match(/cache|optimize|performance/i)) {
|
|
555
|
+
impacts.performance = 'positive';
|
|
556
|
+
}
|
|
557
|
+
else if (parsedIntent.raw.match(/additional|extra|more/i)) {
|
|
558
|
+
impacts.performance = 'negative';
|
|
559
|
+
}
|
|
560
|
+
// Analyze security impact
|
|
561
|
+
if (parsedIntent.raw.match(/security|encryption|auth/i)) {
|
|
562
|
+
impacts.security = 'improved';
|
|
563
|
+
}
|
|
564
|
+
// Analyze complexity
|
|
565
|
+
if (parsedIntent.raw.match(/simplif|streamline|reduce/i)) {
|
|
566
|
+
impacts.complexity = 'reduced';
|
|
567
|
+
}
|
|
568
|
+
else if (parsedIntent.raw.match(/additional|complex|distributed/i)) {
|
|
569
|
+
impacts.complexity = 'increased';
|
|
570
|
+
impacts.risk = 'high';
|
|
571
|
+
}
|
|
572
|
+
return impacts;
|
|
573
|
+
}
|
|
574
|
+
async evaluateAlternatives(parsedIntent) {
|
|
575
|
+
// Generate common alternatives based on the decision type
|
|
576
|
+
const alternatives = [];
|
|
577
|
+
// Always include "do nothing" option
|
|
578
|
+
alternatives.push({
|
|
579
|
+
name: 'Maintain Status Quo',
|
|
580
|
+
pros: ['No implementation effort', 'No risk of breaking changes'],
|
|
581
|
+
cons: ['Problem remains unsolved', 'Technical debt accumulates'],
|
|
582
|
+
rejectionReason: 'Does not address the core problem'
|
|
583
|
+
});
|
|
584
|
+
// Add context-specific alternatives
|
|
585
|
+
if (parsedIntent.category === 'Data') {
|
|
586
|
+
alternatives.push({
|
|
587
|
+
name: 'NoSQL Solution',
|
|
588
|
+
pros: ['Flexible schema', 'Better scalability'],
|
|
589
|
+
cons: ['Eventual consistency', 'Learning curve'],
|
|
590
|
+
rejectionReason: 'Team lacks NoSQL expertise'
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
if (parsedIntent.category === 'Services') {
|
|
594
|
+
alternatives.push({
|
|
595
|
+
name: 'Monolithic Approach',
|
|
596
|
+
pros: ['Simpler deployment', 'Easier debugging'],
|
|
597
|
+
cons: ['Scaling limitations', 'Deployment coupling'],
|
|
598
|
+
rejectionReason: 'Does not align with microservices strategy'
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
return alternatives;
|
|
602
|
+
}
|
|
603
|
+
async findRelatedADRs(parsedIntent) {
|
|
604
|
+
const related = [];
|
|
605
|
+
const adrDir = path.join(process.cwd(), 'docs', 'adr');
|
|
606
|
+
if (await fs.pathExists(adrDir)) {
|
|
607
|
+
const files = await fs.readdir(adrDir);
|
|
608
|
+
// Return ADRs that might be related (simplified)
|
|
609
|
+
return files
|
|
610
|
+
.filter(f => f.endsWith('.md') && f !== 'README.md')
|
|
611
|
+
.slice(0, 5);
|
|
612
|
+
}
|
|
613
|
+
return related;
|
|
614
|
+
}
|
|
615
|
+
async getNextADRNumber() {
|
|
616
|
+
const adrDir = path.join(process.cwd(), 'docs', 'adr');
|
|
617
|
+
if (!await fs.pathExists(adrDir)) {
|
|
618
|
+
return 1;
|
|
619
|
+
}
|
|
620
|
+
const files = await fs.readdir(adrDir);
|
|
621
|
+
const adrNumbers = files
|
|
622
|
+
.filter(f => f.match(/ADR-\d+/))
|
|
623
|
+
.map(f => parseInt(f.match(/ADR-(\d+)/)?.[1] || '0'))
|
|
624
|
+
.filter(n => !isNaN(n));
|
|
625
|
+
return adrNumbers.length > 0 ? Math.max(...adrNumbers) + 1 : 1;
|
|
626
|
+
}
|
|
627
|
+
getAnalysisMode() {
|
|
628
|
+
const modes = [];
|
|
629
|
+
if (!this.options.noconflict)
|
|
630
|
+
modes.push('Conflict Check');
|
|
631
|
+
if (!this.options.novalidate)
|
|
632
|
+
modes.push('Validation');
|
|
633
|
+
if (!this.options.nowarn)
|
|
634
|
+
modes.push('Warnings');
|
|
635
|
+
if (this.options.impacts)
|
|
636
|
+
modes.push('Impact Analysis');
|
|
637
|
+
if (this.options.alternatives)
|
|
638
|
+
modes.push('Alternatives');
|
|
639
|
+
if (this.options.tradeoffs)
|
|
640
|
+
modes.push('Trade-offs');
|
|
641
|
+
if (this.options.strict)
|
|
642
|
+
modes.push('Strict');
|
|
643
|
+
if (this.options.dryrun)
|
|
644
|
+
modes.push('DryRun');
|
|
645
|
+
return modes.length > 0 ? modes.join(', ') : 'Standard';
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
export default EnhancedArchitecturePipeline;
|
|
649
|
+
//# sourceMappingURL=architecture-pipeline-enhanced.js.map
|