@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,822 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: command
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2025-09-15
|
|
5
|
+
* @tags: [sprint, pipeline, builder, planning, agile, safe-defaults]
|
|
6
|
+
* @related: [../../core/simple-pipeline-base.ts, ./sprint-pipeline.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [simple-pipeline-base, simple-git, fs-extra]
|
|
10
|
+
*/
|
|
11
|
+
import { SimplePipelineBase } from '../../core/simple-pipeline-base.js';
|
|
12
|
+
import simpleGit from 'simple-git';
|
|
13
|
+
import fs from 'fs-extra';
|
|
14
|
+
import * as path from 'path';
|
|
15
|
+
import chalk from 'chalk';
|
|
16
|
+
import { getGinkoDir } from '../../utils/helpers.js';
|
|
17
|
+
/**
|
|
18
|
+
* Enhanced Sprint Pipeline with Safe Defaults (ADR-014)
|
|
19
|
+
*
|
|
20
|
+
* Provides intelligent sprint planning with:
|
|
21
|
+
* - Automatic dependency analysis (opt-out with --nodep)
|
|
22
|
+
* - Capacity validation by default
|
|
23
|
+
* - Traceability checking (enhanced with --trace)
|
|
24
|
+
* - Work breakdown structure (opt-in with --wbs)
|
|
25
|
+
*/
|
|
26
|
+
export class EnhancedSprintPipeline extends SimplePipelineBase {
|
|
27
|
+
git;
|
|
28
|
+
ginkoDir = '';
|
|
29
|
+
options;
|
|
30
|
+
analysis;
|
|
31
|
+
constructor(intent = 'Generate sprint plan', options = {}) {
|
|
32
|
+
super(intent);
|
|
33
|
+
this.withDomain('sprint');
|
|
34
|
+
// Apply safe defaults (ADR-014)
|
|
35
|
+
this.options = {
|
|
36
|
+
nodep: false,
|
|
37
|
+
nowarn: false,
|
|
38
|
+
...options
|
|
39
|
+
};
|
|
40
|
+
// Initialize analysis
|
|
41
|
+
this.analysis = {
|
|
42
|
+
requestedPoints: 0,
|
|
43
|
+
velocityTarget: 21,
|
|
44
|
+
isOverloaded: false,
|
|
45
|
+
dependencies: {
|
|
46
|
+
nodes: [],
|
|
47
|
+
edges: [],
|
|
48
|
+
ordering: [],
|
|
49
|
+
blockers: [],
|
|
50
|
+
parallelizable: [],
|
|
51
|
+
criticalPath: []
|
|
52
|
+
},
|
|
53
|
+
traceability: {
|
|
54
|
+
complete: [],
|
|
55
|
+
missingADRs: [],
|
|
56
|
+
missingBacklog: [],
|
|
57
|
+
orphanedItems: []
|
|
58
|
+
},
|
|
59
|
+
warnings: [],
|
|
60
|
+
recommendations: []
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Initialize pipeline dependencies
|
|
65
|
+
*/
|
|
66
|
+
async initialize() {
|
|
67
|
+
console.log(chalk.cyan('📋 Initializing enhanced sprint pipeline...'));
|
|
68
|
+
this.git = simpleGit();
|
|
69
|
+
this.ginkoDir = await getGinkoDir();
|
|
70
|
+
this.adjustConfidence(0.9);
|
|
71
|
+
if (this.options.dryrun) {
|
|
72
|
+
console.log(chalk.yellow(' ⚡ DRY RUN MODE - No files will be saved'));
|
|
73
|
+
}
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Load sprint template with safe defaults considerations
|
|
78
|
+
*/
|
|
79
|
+
async loadTemplate() {
|
|
80
|
+
const template = {
|
|
81
|
+
requiredSections: [
|
|
82
|
+
'sprint_goal',
|
|
83
|
+
'capacity_analysis', // Added for safe defaults
|
|
84
|
+
'dependency_check', // Added for safe defaults
|
|
85
|
+
'user_stories',
|
|
86
|
+
'technical_tasks',
|
|
87
|
+
'acceptance_criteria',
|
|
88
|
+
'risk_assessment',
|
|
89
|
+
'success_metrics'
|
|
90
|
+
],
|
|
91
|
+
contextToConsider: [
|
|
92
|
+
'requested_items',
|
|
93
|
+
'dependencies',
|
|
94
|
+
'velocity_history',
|
|
95
|
+
'team_capacity',
|
|
96
|
+
'traceability',
|
|
97
|
+
'technical_debt'
|
|
98
|
+
],
|
|
99
|
+
rulesAndConstraints: [
|
|
100
|
+
'Sprint capacity must not exceed velocity without explicit acknowledgment',
|
|
101
|
+
'Dependencies must be satisfied or explicitly waived',
|
|
102
|
+
'All PRDs should have traced ADRs and backlog items',
|
|
103
|
+
'Sprint goals must be SMART',
|
|
104
|
+
'Risk mitigation strategies required for identified risks'
|
|
105
|
+
]
|
|
106
|
+
};
|
|
107
|
+
this.withTemplate(template);
|
|
108
|
+
console.log(chalk.gray(' ✓ Enhanced sprint template loaded'));
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Gather context with enhanced analysis
|
|
113
|
+
*/
|
|
114
|
+
async gatherContext() {
|
|
115
|
+
console.log(chalk.cyan('🔍 Gathering enhanced sprint context...'));
|
|
116
|
+
// Parse intent for requested items
|
|
117
|
+
const parsedIntent = this.parseSprintIntent(this.ctx.intent);
|
|
118
|
+
// Basic context gathering
|
|
119
|
+
const backlogItems = await this.getBacklogItems();
|
|
120
|
+
const velocity = await this.calculateVelocity();
|
|
121
|
+
const capacity = this.calculateCapacity();
|
|
122
|
+
// Dependency analysis (default: on)
|
|
123
|
+
if (!this.options.nodep && parsedIntent.requestedItems.length > 0) {
|
|
124
|
+
console.log(chalk.gray(' → Analyzing dependencies...'));
|
|
125
|
+
this.analysis.dependencies = await this.analyzeDependencies(parsedIntent.requestedItems);
|
|
126
|
+
}
|
|
127
|
+
// Traceability check (enhanced with --trace)
|
|
128
|
+
if (this.options.trace && parsedIntent.requestedItems.length > 0) {
|
|
129
|
+
console.log(chalk.gray(' → Verifying traceability...'));
|
|
130
|
+
this.analysis.traceability = await this.verifyTraceability(parsedIntent.requestedItems);
|
|
131
|
+
}
|
|
132
|
+
// Work breakdown structure (opt-in with --wbs)
|
|
133
|
+
if (this.options.wbs && parsedIntent.requestedItems.length > 0) {
|
|
134
|
+
console.log(chalk.gray(' → Performing work breakdown...'));
|
|
135
|
+
const wbsItems = await this.performWorkBreakdown(parsedIntent.requestedItems);
|
|
136
|
+
backlogItems.tasks.push(...wbsItems.tasks);
|
|
137
|
+
backlogItems.userStories.push(...wbsItems.stories);
|
|
138
|
+
}
|
|
139
|
+
// Capacity analysis (always performed)
|
|
140
|
+
await this.analyzeCapacity(parsedIntent.requestedItems, velocity);
|
|
141
|
+
const context = {
|
|
142
|
+
parsedIntent,
|
|
143
|
+
backlogItems,
|
|
144
|
+
velocity,
|
|
145
|
+
capacity,
|
|
146
|
+
analysis: this.analysis,
|
|
147
|
+
sprintNumber: await this.getNextSprintNumber(),
|
|
148
|
+
startDate: new Date().toISOString().split('T')[0],
|
|
149
|
+
endDate: this.calculateEndDate(14)
|
|
150
|
+
};
|
|
151
|
+
this.withContext(context);
|
|
152
|
+
console.log(chalk.gray(' ✓ Enhanced context gathered'));
|
|
153
|
+
// Show warnings if not suppressed
|
|
154
|
+
if (!this.options.nowarn && this.analysis.warnings.length > 0) {
|
|
155
|
+
console.log(chalk.yellow('\n⚠️ Sprint Planning Warnings:'));
|
|
156
|
+
this.analysis.warnings.forEach(w => console.log(chalk.yellow(` • ${w}`)));
|
|
157
|
+
}
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Generate sprint content with enhanced sections
|
|
162
|
+
*/
|
|
163
|
+
generateContent() {
|
|
164
|
+
console.log(chalk.cyan('📝 Generating enhanced sprint plan...'));
|
|
165
|
+
const context = this.ctx.context;
|
|
166
|
+
const sections = [];
|
|
167
|
+
// Header
|
|
168
|
+
sections.push(`# Sprint ${context.sprintNumber}: ${context.parsedIntent.goal || 'Development Sprint'}\n`);
|
|
169
|
+
sections.push(`**Duration**: ${context.startDate} to ${context.endDate}`);
|
|
170
|
+
sections.push(`**Velocity Target**: ${context.velocity} story points`);
|
|
171
|
+
sections.push(`**Team Capacity**: ${context.capacity} hours`);
|
|
172
|
+
sections.push(`**Analysis Mode**: ${this.getAnalysisMode()}\n`);
|
|
173
|
+
// Capacity Analysis Section (Safe Default)
|
|
174
|
+
sections.push(`## 📊 Capacity Analysis\n`);
|
|
175
|
+
if (this.analysis.isOverloaded) {
|
|
176
|
+
sections.push(`### ⚠️ Sprint Overloaded`);
|
|
177
|
+
sections.push(`- **Requested**: ${this.analysis.requestedPoints} points`);
|
|
178
|
+
sections.push(`- **Capacity**: ${this.analysis.velocityTarget} points`);
|
|
179
|
+
sections.push(`- **Overload**: ${this.analysis.requestedPoints - this.analysis.velocityTarget} points`);
|
|
180
|
+
sections.push(`- **Risk**: High probability of sprint failure\n`);
|
|
181
|
+
if (this.analysis.recommendations.length > 0) {
|
|
182
|
+
sections.push(`### Recommendations`);
|
|
183
|
+
this.analysis.recommendations.forEach(rec => {
|
|
184
|
+
sections.push(`- ${rec}`);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
sections.push(`### ✅ Capacity Check Passed`);
|
|
190
|
+
sections.push(`- **Requested**: ${this.analysis.requestedPoints} points`);
|
|
191
|
+
sections.push(`- **Available**: ${this.analysis.velocityTarget} points`);
|
|
192
|
+
sections.push(`- **Buffer**: ${this.analysis.velocityTarget - this.analysis.requestedPoints} points`);
|
|
193
|
+
}
|
|
194
|
+
sections.push('');
|
|
195
|
+
// Dependency Analysis Section (Safe Default unless --nodep)
|
|
196
|
+
if (!this.options.nodep) {
|
|
197
|
+
sections.push(`## 🔗 Dependency Analysis\n`);
|
|
198
|
+
if (this.analysis.dependencies.blockers.length > 0) {
|
|
199
|
+
sections.push(`### ⚠️ Blocking Dependencies`);
|
|
200
|
+
this.analysis.dependencies.blockers.forEach(blocker => {
|
|
201
|
+
sections.push(`- ${blocker}`);
|
|
202
|
+
});
|
|
203
|
+
sections.push('');
|
|
204
|
+
}
|
|
205
|
+
if (this.analysis.dependencies.ordering.length > 0) {
|
|
206
|
+
sections.push(`### Recommended Execution Order`);
|
|
207
|
+
this.analysis.dependencies.ordering.forEach((item, i) => {
|
|
208
|
+
sections.push(`${i + 1}. ${item}`);
|
|
209
|
+
});
|
|
210
|
+
sections.push('');
|
|
211
|
+
}
|
|
212
|
+
if (this.analysis.dependencies.parallelizable.length > 0) {
|
|
213
|
+
sections.push(`### Parallelization Opportunities`);
|
|
214
|
+
this.analysis.dependencies.parallelizable.forEach(group => {
|
|
215
|
+
sections.push(`- [${group.join(', ')}] can be worked in parallel`);
|
|
216
|
+
});
|
|
217
|
+
sections.push('');
|
|
218
|
+
}
|
|
219
|
+
if (this.analysis.dependencies.criticalPath.length > 0) {
|
|
220
|
+
sections.push(`### Critical Path`);
|
|
221
|
+
sections.push(`${this.analysis.dependencies.criticalPath.join(' → ')}`);
|
|
222
|
+
sections.push('');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
sections.push(`## Dependencies\n`);
|
|
227
|
+
sections.push(`*Analysis skipped (--nodep flag)*\n`);
|
|
228
|
+
}
|
|
229
|
+
// Traceability Report (if --trace)
|
|
230
|
+
if (this.options.trace) {
|
|
231
|
+
sections.push(`## 🔍 Traceability Report\n`);
|
|
232
|
+
if (this.analysis.traceability.complete.length > 0) {
|
|
233
|
+
sections.push(`### ✅ Complete Traceability`);
|
|
234
|
+
this.analysis.traceability.complete.forEach(item => {
|
|
235
|
+
sections.push(`- ${item}: PRD → ADR → Backlog`);
|
|
236
|
+
});
|
|
237
|
+
sections.push('');
|
|
238
|
+
}
|
|
239
|
+
if (this.analysis.traceability.missingADRs.length > 0) {
|
|
240
|
+
sections.push(`### ⚠️ Missing Architecture Decisions`);
|
|
241
|
+
this.analysis.traceability.missingADRs.forEach(item => {
|
|
242
|
+
sections.push(`- ${item}: Needs ADR documentation`);
|
|
243
|
+
});
|
|
244
|
+
sections.push('');
|
|
245
|
+
}
|
|
246
|
+
if (this.analysis.traceability.missingBacklog.length > 0) {
|
|
247
|
+
sections.push(`### ⚠️ Missing Work Breakdown`);
|
|
248
|
+
this.analysis.traceability.missingBacklog.forEach(item => {
|
|
249
|
+
sections.push(`- ${item}: Needs backlog decomposition`);
|
|
250
|
+
});
|
|
251
|
+
sections.push('');
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// Sprint Goal
|
|
255
|
+
sections.push(`## 🎯 Sprint Goal\n`);
|
|
256
|
+
sections.push(`${context.parsedIntent.goal || 'Deliver value through iterative development'}\n`);
|
|
257
|
+
// Work Items (potentially from WBS)
|
|
258
|
+
sections.push(`## 📝 Sprint Backlog\n`);
|
|
259
|
+
if (context.parsedIntent.requestedItems.length > 0) {
|
|
260
|
+
sections.push(`### Requested Items`);
|
|
261
|
+
context.parsedIntent.requestedItems.forEach((item) => {
|
|
262
|
+
const points = this.estimatePoints(item);
|
|
263
|
+
sections.push(`- [ ] ${item} (${points} points)`);
|
|
264
|
+
});
|
|
265
|
+
sections.push('');
|
|
266
|
+
}
|
|
267
|
+
// User Stories
|
|
268
|
+
if (context.backlogItems?.userStories?.length > 0) {
|
|
269
|
+
sections.push(`### User Stories`);
|
|
270
|
+
context.backlogItems.userStories.forEach((story, i) => {
|
|
271
|
+
sections.push(`${i + 1}. **${story.title}**`);
|
|
272
|
+
sections.push(` - As a ${story.user}`);
|
|
273
|
+
sections.push(` - I want ${story.feature}`);
|
|
274
|
+
sections.push(` - So that ${story.benefit}`);
|
|
275
|
+
sections.push(` - Points: ${story.points || 3}`);
|
|
276
|
+
});
|
|
277
|
+
sections.push('');
|
|
278
|
+
}
|
|
279
|
+
// Technical Tasks
|
|
280
|
+
if (context.backlogItems?.tasks?.length > 0) {
|
|
281
|
+
sections.push(`### Technical Tasks`);
|
|
282
|
+
context.backlogItems.tasks.forEach((task) => {
|
|
283
|
+
sections.push(`- [ ] ${task.title} (${task.estimate || '4h'})`);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
sections.push('');
|
|
287
|
+
// Acceptance Criteria
|
|
288
|
+
sections.push(`## ✅ Acceptance Criteria\n`);
|
|
289
|
+
sections.push(`- [ ] All committed items completed`);
|
|
290
|
+
sections.push(`- [ ] Code coverage above 80%`);
|
|
291
|
+
sections.push(`- [ ] No critical bugs`);
|
|
292
|
+
sections.push(`- [ ] Documentation updated`);
|
|
293
|
+
if (!this.options.nodep) {
|
|
294
|
+
sections.push(`- [ ] All dependencies satisfied`);
|
|
295
|
+
}
|
|
296
|
+
sections.push('');
|
|
297
|
+
// Risk Assessment
|
|
298
|
+
sections.push(`## ⚠️ Risk Assessment\n`);
|
|
299
|
+
sections.push(`| Risk | Probability | Impact | Mitigation |`);
|
|
300
|
+
sections.push(`|------|------------|--------|------------|`);
|
|
301
|
+
if (this.analysis.isOverloaded) {
|
|
302
|
+
sections.push(`| Sprint overload | High | High | Defer lower priority items |`);
|
|
303
|
+
}
|
|
304
|
+
if (this.analysis.dependencies.blockers.length > 0) {
|
|
305
|
+
sections.push(`| Blocked dependencies | High | High | Resolve blockers first |`);
|
|
306
|
+
}
|
|
307
|
+
sections.push(`| Scope creep | Medium | High | Daily standups, clear priorities |`);
|
|
308
|
+
sections.push(`| Technical debt | Low | Medium | Allocate 20% for refactoring |`);
|
|
309
|
+
sections.push('');
|
|
310
|
+
// Success Metrics
|
|
311
|
+
sections.push(`## 📊 Success Metrics\n`);
|
|
312
|
+
sections.push(`- **Velocity**: Complete ${context.velocity} story points`);
|
|
313
|
+
sections.push(`- **Quality**: Zero critical bugs`);
|
|
314
|
+
sections.push(`- **Delivery**: 90% of committed stories`);
|
|
315
|
+
if (!this.options.nodep) {
|
|
316
|
+
sections.push(`- **Dependencies**: All satisfied or deferred`);
|
|
317
|
+
}
|
|
318
|
+
sections.push('');
|
|
319
|
+
// Warnings Summary (if any)
|
|
320
|
+
if (this.analysis.warnings.length > 0 && !this.options.nowarn) {
|
|
321
|
+
sections.push(`## ⚠️ Planning Warnings\n`);
|
|
322
|
+
this.analysis.warnings.forEach(warning => {
|
|
323
|
+
sections.push(`- ${warning}`);
|
|
324
|
+
});
|
|
325
|
+
sections.push('');
|
|
326
|
+
}
|
|
327
|
+
// Footer
|
|
328
|
+
sections.push('---');
|
|
329
|
+
sections.push(`**Generated**: ${new Date().toISOString()}`);
|
|
330
|
+
sections.push(`**Pipeline**: EnhancedSprintPipeline v2.0`);
|
|
331
|
+
sections.push(`**Analysis**: ${this.getAnalysisMode()}`);
|
|
332
|
+
sections.push(`**Confidence**: ${Math.round(this.ctx.confidence * 100)}%`);
|
|
333
|
+
this.ctx.content = sections.join('\n');
|
|
334
|
+
console.log(chalk.gray(' ✓ Enhanced sprint plan generated'));
|
|
335
|
+
return this;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Validate content with strict mode support
|
|
339
|
+
*/
|
|
340
|
+
validateContent() {
|
|
341
|
+
if (!this.ctx.content) {
|
|
342
|
+
this.ctx.errors.push('No sprint content generated');
|
|
343
|
+
this.adjustConfidence(0.3);
|
|
344
|
+
return this;
|
|
345
|
+
}
|
|
346
|
+
// Strict mode validation
|
|
347
|
+
if (this.options.strict) {
|
|
348
|
+
if (this.analysis.warnings.length > 0) {
|
|
349
|
+
this.ctx.errors.push(`Strict mode: ${this.analysis.warnings.length} warnings present`);
|
|
350
|
+
this.adjustConfidence(0.4);
|
|
351
|
+
}
|
|
352
|
+
if (this.analysis.dependencies.blockers.length > 0) {
|
|
353
|
+
this.ctx.errors.push(`Strict mode: ${this.analysis.dependencies.blockers.length} blocking dependencies`);
|
|
354
|
+
this.adjustConfidence(0.3);
|
|
355
|
+
}
|
|
356
|
+
if (this.analysis.isOverloaded) {
|
|
357
|
+
this.ctx.errors.push('Strict mode: Sprint capacity exceeded');
|
|
358
|
+
this.adjustConfidence(0.3);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
console.log(chalk.gray(' ✓ Content validated'));
|
|
362
|
+
return this;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Save sprint plan (skip if dryrun)
|
|
366
|
+
*/
|
|
367
|
+
async save() {
|
|
368
|
+
if (this.options.dryrun) {
|
|
369
|
+
console.log(chalk.yellow('\n📋 DRY RUN - Sprint plan not saved'));
|
|
370
|
+
console.log(chalk.dim('Plan would be saved to: .ginko/sprints/'));
|
|
371
|
+
return this;
|
|
372
|
+
}
|
|
373
|
+
if (!this.ctx.content) {
|
|
374
|
+
console.error(chalk.red('No content to save'));
|
|
375
|
+
return this;
|
|
376
|
+
}
|
|
377
|
+
console.log(chalk.cyan('💾 Saving sprint plan...'));
|
|
378
|
+
const sprintsDir = path.join(this.ginkoDir, 'sprints');
|
|
379
|
+
await fs.ensureDir(sprintsDir);
|
|
380
|
+
const sprintNumber = this.ctx.context?.sprintNumber || 1;
|
|
381
|
+
const filename = `sprint-${String(sprintNumber).padStart(3, '0')}.md`;
|
|
382
|
+
const filepath = path.join(sprintsDir, filename);
|
|
383
|
+
await fs.writeFile(filepath, this.ctx.content, 'utf-8');
|
|
384
|
+
console.log(chalk.green(` ✅ Sprint plan saved to: ${path.relative(process.cwd(), filepath)}`));
|
|
385
|
+
if (!this.ctx.metadata) {
|
|
386
|
+
this.ctx.metadata = {};
|
|
387
|
+
}
|
|
388
|
+
this.ctx.metadata.savedPath = filepath;
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Main build method with enhanced flow
|
|
393
|
+
*/
|
|
394
|
+
async build() {
|
|
395
|
+
try {
|
|
396
|
+
return await this.initialize()
|
|
397
|
+
.then(p => p.loadTemplate())
|
|
398
|
+
.then(p => p.gatherContext())
|
|
399
|
+
.then(p => {
|
|
400
|
+
p.generateContent();
|
|
401
|
+
p.validateContent();
|
|
402
|
+
return p;
|
|
403
|
+
})
|
|
404
|
+
.then(p => p.validate())
|
|
405
|
+
.then(p => p.recover())
|
|
406
|
+
.then(p => p.save())
|
|
407
|
+
.then(p => p.execute())
|
|
408
|
+
.then(ctx => {
|
|
409
|
+
if (this.options.dryrun) {
|
|
410
|
+
// In dryrun, display the content
|
|
411
|
+
console.log('\n' + chalk.dim('='.repeat(60)));
|
|
412
|
+
console.log(ctx.content);
|
|
413
|
+
console.log(chalk.dim('='.repeat(60)) + '\n');
|
|
414
|
+
}
|
|
415
|
+
return ctx.metadata?.savedPath || '';
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
console.error(chalk.red(`Enhanced sprint pipeline failed: ${error}`));
|
|
420
|
+
throw error;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
// Helper methods
|
|
424
|
+
/**
|
|
425
|
+
* Parse sprint intent for requested items
|
|
426
|
+
*/
|
|
427
|
+
parseSprintIntent(intent) {
|
|
428
|
+
const prdPattern = /PRD-[A-Z0-9]+/gi;
|
|
429
|
+
const adrPattern = /ADR-[A-Z0-9]+/gi;
|
|
430
|
+
const taskPattern = /TASK-[A-Z0-9]+/gi;
|
|
431
|
+
const backlogPattern = /BACKLOG-[A-Z0-9]+/gi;
|
|
432
|
+
const prds = intent.match(prdPattern) || [];
|
|
433
|
+
const adrs = intent.match(adrPattern) || [];
|
|
434
|
+
const tasks = intent.match(taskPattern) || [];
|
|
435
|
+
const backlogs = intent.match(backlogPattern) || [];
|
|
436
|
+
const allItems = [...prds, ...adrs, ...tasks, ...backlogs];
|
|
437
|
+
// Remove item references from goal
|
|
438
|
+
let goal = intent;
|
|
439
|
+
allItems.forEach(item => {
|
|
440
|
+
goal = goal.replace(item, '').replace(/,\s*,/g, ',').trim();
|
|
441
|
+
});
|
|
442
|
+
goal = goal.replace(/^[,\s]+|[,\s]+$/g, '');
|
|
443
|
+
return {
|
|
444
|
+
requestedItems: allItems,
|
|
445
|
+
prds,
|
|
446
|
+
adrs,
|
|
447
|
+
tasks,
|
|
448
|
+
backlogs,
|
|
449
|
+
goal: goal || `Work on ${allItems.join(', ')}`,
|
|
450
|
+
hasSpecificItems: allItems.length > 0
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Analyze dependencies between requested items
|
|
455
|
+
*/
|
|
456
|
+
async analyzeDependencies(items) {
|
|
457
|
+
const graph = {
|
|
458
|
+
nodes: items,
|
|
459
|
+
edges: [],
|
|
460
|
+
ordering: [],
|
|
461
|
+
blockers: [],
|
|
462
|
+
parallelizable: [],
|
|
463
|
+
criticalPath: []
|
|
464
|
+
};
|
|
465
|
+
// Analyze each item for dependencies
|
|
466
|
+
for (const item of items) {
|
|
467
|
+
const deps = await this.findItemDependencies(item);
|
|
468
|
+
for (const dep of deps) {
|
|
469
|
+
graph.edges.push({ from: item, to: dep, type: 'explicit' });
|
|
470
|
+
// Check if dependency is not in sprint
|
|
471
|
+
if (!items.includes(dep)) {
|
|
472
|
+
graph.blockers.push(`${item} depends on ${dep} (not in sprint)`);
|
|
473
|
+
this.analysis.warnings.push(`${item} has external dependency: ${dep}`);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
// Perform topological sort for ordering
|
|
478
|
+
graph.ordering = this.topologicalSort(graph);
|
|
479
|
+
// Find parallelizable groups
|
|
480
|
+
graph.parallelizable = this.findParallelGroups(graph);
|
|
481
|
+
// Calculate critical path
|
|
482
|
+
graph.criticalPath = this.findCriticalPath(graph);
|
|
483
|
+
return graph;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Find dependencies for a specific item
|
|
487
|
+
*/
|
|
488
|
+
async findItemDependencies(item) {
|
|
489
|
+
const deps = [];
|
|
490
|
+
// Try to load the item file
|
|
491
|
+
const itemPath = await this.findItemFile(item);
|
|
492
|
+
if (itemPath && await fs.pathExists(itemPath)) {
|
|
493
|
+
const content = await fs.readFile(itemPath, 'utf-8');
|
|
494
|
+
// Look for dependency patterns
|
|
495
|
+
const depPatterns = [
|
|
496
|
+
/depends?\s+on[:\s]+([\w-]+)/gi,
|
|
497
|
+
/requires?[:\s]+([\w-]+)/gi,
|
|
498
|
+
/prerequisite[:\s]+([\w-]+)/gi,
|
|
499
|
+
/after[:\s]+([\w-]+)/gi
|
|
500
|
+
];
|
|
501
|
+
for (const pattern of depPatterns) {
|
|
502
|
+
const matches = content.matchAll(pattern);
|
|
503
|
+
for (const match of matches) {
|
|
504
|
+
// Try to normalize to item format (PRD-X, ADR-Y, etc.)
|
|
505
|
+
const dep = match[1].toUpperCase();
|
|
506
|
+
if (dep.match(/^(PRD|ADR|TASK|BACKLOG)-/)) {
|
|
507
|
+
deps.push(dep);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
// Mock data for demonstration
|
|
513
|
+
if (item === 'PRD-C')
|
|
514
|
+
deps.push('PRD-A');
|
|
515
|
+
if (item === 'PRD-B')
|
|
516
|
+
deps.push('PRD-A', 'PRD-C');
|
|
517
|
+
return [...new Set(deps)];
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Verify traceability for requested items
|
|
521
|
+
*/
|
|
522
|
+
async verifyTraceability(items) {
|
|
523
|
+
const report = {
|
|
524
|
+
complete: [],
|
|
525
|
+
missingADRs: [],
|
|
526
|
+
missingBacklog: [],
|
|
527
|
+
orphanedItems: []
|
|
528
|
+
};
|
|
529
|
+
for (const item of items) {
|
|
530
|
+
if (item.startsWith('PRD-')) {
|
|
531
|
+
const hasADR = await this.checkForADR(item);
|
|
532
|
+
const hasBacklog = await this.checkForBacklog(item);
|
|
533
|
+
if (hasADR && hasBacklog) {
|
|
534
|
+
report.complete.push(item);
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
if (!hasADR) {
|
|
538
|
+
report.missingADRs.push(item);
|
|
539
|
+
this.analysis.warnings.push(`${item} lacks architecture decision record`);
|
|
540
|
+
}
|
|
541
|
+
if (!hasBacklog) {
|
|
542
|
+
report.missingBacklog.push(item);
|
|
543
|
+
this.analysis.warnings.push(`${item} lacks backlog decomposition`);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return report;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Perform work breakdown structure analysis
|
|
552
|
+
*/
|
|
553
|
+
async performWorkBreakdown(items) {
|
|
554
|
+
const wbsItems = { tasks: [], stories: [] };
|
|
555
|
+
for (const item of items) {
|
|
556
|
+
if (item.startsWith('PRD-')) {
|
|
557
|
+
// Generate user stories from PRD
|
|
558
|
+
wbsItems.stories.push({
|
|
559
|
+
title: `User story from ${item}`,
|
|
560
|
+
user: 'user',
|
|
561
|
+
feature: `functionality from ${item}`,
|
|
562
|
+
benefit: 'improved experience',
|
|
563
|
+
points: 5,
|
|
564
|
+
source: item
|
|
565
|
+
});
|
|
566
|
+
// Generate technical tasks
|
|
567
|
+
wbsItems.tasks.push({ title: `Implement backend for ${item}`, estimate: '8h', source: item }, { title: `Create UI for ${item}`, estimate: '6h', source: item }, { title: `Write tests for ${item}`, estimate: '4h', source: item });
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
console.log(chalk.gray(` → Generated ${wbsItems.stories.length} stories and ${wbsItems.tasks.length} tasks`));
|
|
571
|
+
return wbsItems;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Analyze capacity vs requested work
|
|
575
|
+
*/
|
|
576
|
+
async analyzeCapacity(items, velocity) {
|
|
577
|
+
// Estimate points for each item
|
|
578
|
+
let totalPoints = 0;
|
|
579
|
+
for (const item of items) {
|
|
580
|
+
const points = this.estimatePoints(item);
|
|
581
|
+
totalPoints += points;
|
|
582
|
+
}
|
|
583
|
+
this.analysis.requestedPoints = totalPoints;
|
|
584
|
+
this.analysis.velocityTarget = velocity;
|
|
585
|
+
if (totalPoints > velocity) {
|
|
586
|
+
this.analysis.isOverloaded = true;
|
|
587
|
+
this.analysis.warnings.push(`Sprint overloaded: ${totalPoints} points requested vs ${velocity} velocity`);
|
|
588
|
+
this.analysis.recommendations.push(`Split into ${Math.ceil(totalPoints / velocity)} sprints`, `Defer ${totalPoints - velocity} points of lower priority work`, `Consider increasing team capacity or reducing scope`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Estimate story points for an item
|
|
593
|
+
*/
|
|
594
|
+
estimatePoints(item) {
|
|
595
|
+
// Use Fibonacci sequence for estimates
|
|
596
|
+
if (item.startsWith('PRD-'))
|
|
597
|
+
return 13; // PRDs are typically large
|
|
598
|
+
if (item.startsWith('ADR-'))
|
|
599
|
+
return 5; // ADRs are medium
|
|
600
|
+
if (item.startsWith('TASK-'))
|
|
601
|
+
return 3; // Tasks are small
|
|
602
|
+
if (item.startsWith('BACKLOG-'))
|
|
603
|
+
return 3;
|
|
604
|
+
return 8; // Default medium estimate
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Find file path for an item
|
|
608
|
+
*/
|
|
609
|
+
async findItemFile(item) {
|
|
610
|
+
const type = item.split('-')[0];
|
|
611
|
+
const searchPaths = {
|
|
612
|
+
PRD: path.join(this.ginkoDir, '..', 'docs', 'PRD'),
|
|
613
|
+
ADR: path.join(this.ginkoDir, '..', 'docs', 'adr'),
|
|
614
|
+
TASK: path.join(this.ginkoDir, 'backlog'),
|
|
615
|
+
BACKLOG: path.join(this.ginkoDir, 'backlog')
|
|
616
|
+
};
|
|
617
|
+
const searchDir = searchPaths[type];
|
|
618
|
+
if (searchDir && await fs.pathExists(searchDir)) {
|
|
619
|
+
const files = await fs.readdir(searchDir);
|
|
620
|
+
const matchingFile = files.find(f => f.includes(item));
|
|
621
|
+
if (matchingFile) {
|
|
622
|
+
return path.join(searchDir, matchingFile);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Check if PRD has associated ADRs
|
|
629
|
+
*/
|
|
630
|
+
async checkForADR(prdId) {
|
|
631
|
+
// Simplified check - in reality would search ADR files for PRD reference
|
|
632
|
+
const adrDir = path.join(this.ginkoDir, '..', 'docs', 'adr');
|
|
633
|
+
if (await fs.pathExists(adrDir)) {
|
|
634
|
+
const files = await fs.readdir(adrDir);
|
|
635
|
+
return files.some(f => f.includes(prdId.replace('PRD', 'ADR')));
|
|
636
|
+
}
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Check if PRD has backlog items
|
|
641
|
+
*/
|
|
642
|
+
async checkForBacklog(prdId) {
|
|
643
|
+
// Simplified check - in reality would search backlog for PRD reference
|
|
644
|
+
const backlogDir = path.join(this.ginkoDir, 'backlog');
|
|
645
|
+
if (await fs.pathExists(backlogDir)) {
|
|
646
|
+
const files = await fs.readdir(backlogDir);
|
|
647
|
+
return files.length > 0; // Simplified
|
|
648
|
+
}
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Topological sort for dependency ordering
|
|
653
|
+
*/
|
|
654
|
+
topologicalSort(graph) {
|
|
655
|
+
const visited = new Set();
|
|
656
|
+
const stack = [];
|
|
657
|
+
const visit = (node) => {
|
|
658
|
+
if (visited.has(node))
|
|
659
|
+
return;
|
|
660
|
+
visited.add(node);
|
|
661
|
+
// Visit dependencies first
|
|
662
|
+
const deps = graph.edges
|
|
663
|
+
.filter(e => e.from === node)
|
|
664
|
+
.map(e => e.to)
|
|
665
|
+
.filter(dep => graph.nodes.includes(dep));
|
|
666
|
+
deps.forEach(dep => visit(dep));
|
|
667
|
+
stack.push(node);
|
|
668
|
+
};
|
|
669
|
+
graph.nodes.forEach(node => visit(node));
|
|
670
|
+
return stack;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Find groups of items that can be worked in parallel
|
|
674
|
+
*/
|
|
675
|
+
findParallelGroups(graph) {
|
|
676
|
+
const groups = [];
|
|
677
|
+
const assigned = new Set();
|
|
678
|
+
for (const node of graph.nodes) {
|
|
679
|
+
if (assigned.has(node))
|
|
680
|
+
continue;
|
|
681
|
+
// Find all nodes that don't depend on this node or its dependencies
|
|
682
|
+
const group = [node];
|
|
683
|
+
for (const other of graph.nodes) {
|
|
684
|
+
if (assigned.has(other) || other === node)
|
|
685
|
+
continue;
|
|
686
|
+
// Check if they can be parallel
|
|
687
|
+
const hasConflict = graph.edges.some(e => (e.from === node && e.to === other) ||
|
|
688
|
+
(e.from === other && e.to === node));
|
|
689
|
+
if (!hasConflict) {
|
|
690
|
+
group.push(other);
|
|
691
|
+
assigned.add(other);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (group.length > 1) {
|
|
695
|
+
groups.push(group);
|
|
696
|
+
}
|
|
697
|
+
assigned.add(node);
|
|
698
|
+
}
|
|
699
|
+
return groups;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Find critical path through dependencies
|
|
703
|
+
*/
|
|
704
|
+
findCriticalPath(graph) {
|
|
705
|
+
if (graph.ordering.length === 0)
|
|
706
|
+
return [];
|
|
707
|
+
// Simplified: return the longest dependency chain
|
|
708
|
+
// In reality, would calculate based on effort estimates
|
|
709
|
+
return graph.ordering.slice(0, Math.min(3, graph.ordering.length));
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Get backlog items from filesystem
|
|
713
|
+
*/
|
|
714
|
+
async getBacklogItems() {
|
|
715
|
+
const backlogPath = path.join(this.ginkoDir, 'backlog');
|
|
716
|
+
if (!await fs.pathExists(backlogPath)) {
|
|
717
|
+
return { tasks: [], userStories: [] };
|
|
718
|
+
}
|
|
719
|
+
const items = { tasks: [], userStories: [] };
|
|
720
|
+
const files = await fs.readdir(backlogPath);
|
|
721
|
+
for (const file of files.slice(0, 10)) {
|
|
722
|
+
if (file.endsWith('.md')) {
|
|
723
|
+
const content = await fs.readFile(path.join(backlogPath, file), 'utf-8');
|
|
724
|
+
if (content.includes('User Story')) {
|
|
725
|
+
items.userStories.push(this.parseUserStory(content));
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
items.tasks.push(this.parseTask(content));
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
return items;
|
|
733
|
+
}
|
|
734
|
+
parseUserStory(content) {
|
|
735
|
+
return {
|
|
736
|
+
title: content.match(/^#\s+(.+)$/m)?.[1] || 'User Story',
|
|
737
|
+
user: 'user',
|
|
738
|
+
feature: 'new functionality',
|
|
739
|
+
benefit: 'improved experience',
|
|
740
|
+
points: 3
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
parseTask(content) {
|
|
744
|
+
return {
|
|
745
|
+
title: content.match(/^#\s+(.+)$/m)?.[1] || 'Task',
|
|
746
|
+
estimate: '4h',
|
|
747
|
+
priority: 'MEDIUM'
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
async calculateVelocity() {
|
|
751
|
+
return 21; // Default 2-week sprint velocity
|
|
752
|
+
}
|
|
753
|
+
calculateCapacity() {
|
|
754
|
+
return 2 * 5 * 5 * 6; // 2 weeks × 5 devs × 5 days × 6 hours
|
|
755
|
+
}
|
|
756
|
+
calculateEndDate(days) {
|
|
757
|
+
const endDate = new Date();
|
|
758
|
+
endDate.setDate(endDate.getDate() + days);
|
|
759
|
+
return endDate.toISOString().split('T')[0];
|
|
760
|
+
}
|
|
761
|
+
async getNextSprintNumber() {
|
|
762
|
+
const sprintsDir = path.join(this.ginkoDir, 'sprints');
|
|
763
|
+
if (!await fs.pathExists(sprintsDir)) {
|
|
764
|
+
return 1;
|
|
765
|
+
}
|
|
766
|
+
const files = await fs.readdir(sprintsDir);
|
|
767
|
+
const sprintNumbers = files
|
|
768
|
+
.filter(f => f.match(/sprint-\d+\.md/))
|
|
769
|
+
.map(f => parseInt(f.match(/\d+/)?.[0] || '0'))
|
|
770
|
+
.filter(n => !isNaN(n));
|
|
771
|
+
return sprintNumbers.length > 0 ? Math.max(...sprintNumbers) + 1 : 1;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Get analysis mode description
|
|
775
|
+
*/
|
|
776
|
+
getAnalysisMode() {
|
|
777
|
+
const modes = [];
|
|
778
|
+
if (!this.options.nodep)
|
|
779
|
+
modes.push('Dependencies');
|
|
780
|
+
if (!this.options.nowarn)
|
|
781
|
+
modes.push('Warnings');
|
|
782
|
+
if (this.options.trace)
|
|
783
|
+
modes.push('Traceability');
|
|
784
|
+
if (this.options.wbs)
|
|
785
|
+
modes.push('WBS');
|
|
786
|
+
if (this.options.strict)
|
|
787
|
+
modes.push('Strict');
|
|
788
|
+
if (this.options.dryrun)
|
|
789
|
+
modes.push('DryRun');
|
|
790
|
+
return modes.length > 0 ? modes.join(', ') : 'Standard';
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* CLI Adapter
|
|
795
|
+
*/
|
|
796
|
+
export class EnhancedSprintReflectionCommand {
|
|
797
|
+
pipeline;
|
|
798
|
+
constructor() {
|
|
799
|
+
this.pipeline = new EnhancedSprintPipeline();
|
|
800
|
+
}
|
|
801
|
+
async execute(intent, options = {}) {
|
|
802
|
+
try {
|
|
803
|
+
// Convert CLI options to pipeline options
|
|
804
|
+
const pipelineOptions = {
|
|
805
|
+
wbs: options.wbs || false,
|
|
806
|
+
trace: options.trace || false,
|
|
807
|
+
dryrun: options.dryrun || false,
|
|
808
|
+
strict: options.strict || false,
|
|
809
|
+
nodep: options.nodep || false,
|
|
810
|
+
nowarn: options.nowarn || false
|
|
811
|
+
};
|
|
812
|
+
this.pipeline = new EnhancedSprintPipeline(intent, pipelineOptions);
|
|
813
|
+
await this.pipeline.build();
|
|
814
|
+
}
|
|
815
|
+
catch (error) {
|
|
816
|
+
console.error(chalk.red(`Sprint planning failed: ${error}`));
|
|
817
|
+
throw error;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
export default EnhancedSprintPipeline;
|
|
822
|
+
//# sourceMappingURL=sprint-pipeline-enhanced.js.map
|