specweave 0.18.0 → 0.20.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/CLAUDE.md +229 -1817
- package/README.md +68 -0
- package/bin/specweave.js +62 -6
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +287 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +3 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +21 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js +162 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +112 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.js +301 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +3 -3
- package/dist/plugins/specweave-github/lib/duplicate-detector.js +3 -3
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +70 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js +258 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +51 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +2 -2
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +20 -5
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +87 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.js +412 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +64 -13
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts +78 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js +237 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +97 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js +301 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +83 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +386 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +28 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +156 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts +57 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +248 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts +82 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.js +13 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts +49 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js +316 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts +70 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.js +23 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts +85 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js +281 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts +75 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js +238 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js.map +1 -0
- package/dist/spec-parser.js +629 -0
- package/dist/src/cli/commands/import-docs.js +4 -4
- package/dist/src/cli/commands/import-docs.js.map +1 -1
- package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
- package/dist/src/cli/commands/init-multiproject.js +17 -18
- package/dist/src/cli/commands/init-multiproject.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +107 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.js +8 -4
- package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
- package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
- package/dist/src/cli/commands/switch-project.js +9 -26
- package/dist/src/cli/commands/switch-project.js.map +1 -1
- package/dist/src/cli/commands/sync-spec-content.js +3 -0
- package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
- package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
- package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
- package/dist/src/core/deduplication/command-deduplicator.js +254 -0
- package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
- package/dist/src/core/increment/active-increment-manager.d.ts +42 -15
- package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
- package/dist/src/core/increment/active-increment-manager.js +113 -46
- package/dist/src/core/increment/active-increment-manager.js.map +1 -1
- package/dist/src/core/increment/conflict-resolver.d.ts +40 -0
- package/dist/src/core/increment/conflict-resolver.d.ts.map +1 -0
- package/dist/src/core/increment/conflict-resolver.js +219 -0
- package/dist/src/core/increment/conflict-resolver.js.map +1 -0
- package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
- package/dist/src/core/increment/discipline-checker.js +7 -1
- package/dist/src/core/increment/discipline-checker.js.map +1 -1
- package/dist/src/core/increment/duplicate-detector.d.ts +52 -0
- package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -0
- package/dist/src/core/increment/duplicate-detector.js +276 -0
- package/dist/src/core/increment/duplicate-detector.js.map +1 -0
- package/dist/src/core/increment/increment-archiver.d.ts +90 -0
- package/dist/src/core/increment/increment-archiver.d.ts.map +1 -0
- package/dist/src/core/increment/increment-archiver.js +368 -0
- package/dist/src/core/increment/increment-archiver.js.map +1 -0
- package/dist/src/core/increment/increment-reopener.d.ts +165 -0
- package/dist/src/core/increment/increment-reopener.d.ts.map +1 -0
- package/dist/src/core/increment/increment-reopener.js +390 -0
- package/dist/src/core/increment/increment-reopener.js.map +1 -0
- package/dist/src/core/increment/metadata-manager.d.ts +26 -1
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +143 -5
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/recent-work-scanner.d.ts +121 -0
- package/dist/src/core/increment/recent-work-scanner.d.ts.map +1 -0
- package/dist/src/core/increment/recent-work-scanner.js +303 -0
- package/dist/src/core/increment/recent-work-scanner.js.map +1 -0
- package/dist/src/core/increment/types.d.ts +1 -0
- package/dist/src/core/increment/types.d.ts.map +1 -1
- package/dist/src/core/increment-utils.d.ts +112 -0
- package/dist/src/core/increment-utils.d.ts.map +1 -0
- package/dist/src/core/increment-utils.js +210 -0
- package/dist/src/core/increment-utils.js.map +1 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.d.ts +65 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.js +175 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.js.map +1 -0
- package/dist/src/core/living-docs/feature-archiver.d.ts +130 -0
- package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -0
- package/dist/src/core/living-docs/feature-archiver.js +549 -0
- package/dist/src/core/living-docs/feature-archiver.js.map +1 -0
- package/dist/src/core/living-docs/feature-id-manager.d.ts +81 -0
- package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -0
- package/dist/src/core/living-docs/feature-id-manager.js +339 -0
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts +144 -83
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +488 -270
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/index.d.ts +6 -0
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +6 -0
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/project-detector.d.ts +6 -0
- package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
- package/dist/src/core/living-docs/project-detector.js +35 -1
- package/dist/src/core/living-docs/project-detector.js.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.d.ts +100 -26
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.js +1275 -258
- package/dist/src/core/living-docs/spec-distributor.js.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts +109 -0
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/task-project-specific-generator.js +221 -0
- package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -0
- package/dist/src/core/living-docs/types.d.ts +143 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -1
- package/dist/src/core/project-manager.d.ts +2 -17
- package/dist/src/core/project-manager.d.ts.map +1 -1
- package/dist/src/core/project-manager.js +68 -48
- package/dist/src/core/project-manager.js.map +1 -1
- package/dist/src/core/spec-content-sync.d.ts +1 -1
- package/dist/src/core/spec-content-sync.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.d.ts +32 -54
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.js +142 -138
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
- package/dist/src/core/sync/performance-optimizer.d.ts +153 -0
- package/dist/src/core/sync/performance-optimizer.d.ts.map +1 -0
- package/dist/src/core/sync/performance-optimizer.js +220 -0
- package/dist/src/core/sync/performance-optimizer.js.map +1 -0
- package/dist/src/core/sync/retry-handler.d.ts +98 -0
- package/dist/src/core/sync/retry-handler.d.ts.map +1 -0
- package/dist/src/core/sync/retry-handler.js +196 -0
- package/dist/src/core/sync/retry-handler.js.map +1 -0
- package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
- package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
- package/dist/src/core/sync/spec-content-sync.js +5 -0
- package/dist/src/core/sync/spec-content-sync.js.map +1 -0
- package/dist/src/core/sync/types.d.ts +52 -0
- package/dist/src/core/sync/types.d.ts.map +1 -0
- package/dist/src/core/sync/types.js +5 -0
- package/dist/src/core/sync/types.js.map +1 -0
- package/dist/src/core/types/config.d.ts +125 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +25 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +10 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js +10 -1
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.js +4 -8
- package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
- package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-mapper.js +4 -8
- package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/plugins/specweave/COMMANDS.md +13 -4
- package/plugins/specweave/agents/pm/AGENT.md +159 -12
- package/plugins/specweave/commands/specweave-abandon.md +22 -20
- package/plugins/specweave/commands/specweave-archive-features.md +121 -0
- package/plugins/specweave/commands/specweave-archive-increments.md +82 -0
- package/plugins/specweave/commands/specweave-archive.md +363 -0
- package/plugins/specweave/commands/specweave-backlog.md +211 -0
- package/plugins/specweave/commands/specweave-fix-duplicates.md +517 -0
- package/plugins/specweave/commands/specweave-increment.md +4 -3
- package/plugins/specweave/commands/specweave-progress.md +176 -27
- package/plugins/specweave/commands/specweave-reopen.md +391 -0
- package/plugins/specweave/commands/specweave-restore-feature.md +90 -0
- package/plugins/specweave/commands/specweave-restore.md +309 -0
- package/plugins/specweave/commands/specweave-resume.md +51 -23
- package/plugins/specweave/commands/specweave-status.md +41 -7
- package/plugins/specweave/commands/specweave-sync-specs.md +425 -0
- package/plugins/specweave/commands/specweave.md +70 -405
- package/plugins/specweave/hooks/hooks.json +4 -0
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
- package/plugins/specweave/hooks/post-increment-planning.sh +26 -2
- package/plugins/specweave/hooks/post-task-completion.sh +39 -0
- package/plugins/specweave/hooks/pre-command-deduplication.sh +83 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.js +2 -0
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +4 -0
- package/plugins/specweave/lib/hooks/update-ac-status.js +102 -0
- package/plugins/specweave/lib/hooks/update-ac-status.ts +192 -0
- package/plugins/specweave/skills/archive-increments/SKILL.md +198 -0
- package/plugins/specweave/skills/increment-planner/scripts/feature-utils.js +14 -0
- package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +244 -0
- package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
- package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-confluent/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-confluent/README.md +375 -0
- package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +306 -0
- package/plugins/specweave-confluent/skills/confluent-kafka-connect/SKILL.md +453 -0
- package/plugins/specweave-confluent/skills/confluent-ksqldb/SKILL.md +470 -0
- package/plugins/specweave-confluent/skills/confluent-schema-registry/SKILL.md +316 -0
- package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +2 -2
- package/plugins/specweave-github/agents/user-story-updater/AGENT.md +148 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
- package/plugins/specweave-github/commands/specweave-github-update-user-story.md +156 -0
- package/plugins/specweave-github/hooks/post-task-completion.sh +42 -9
- package/plugins/specweave-github/lib/completion-calculator.js +262 -0
- package/plugins/specweave-github/lib/completion-calculator.ts +434 -0
- package/plugins/specweave-github/lib/duplicate-detector.js +3 -3
- package/plugins/specweave-github/lib/duplicate-detector.ts +4 -4
- package/plugins/specweave-github/lib/epic-content-builder.js +265 -0
- package/plugins/specweave-github/lib/epic-content-builder.ts +376 -0
- package/plugins/specweave-github/lib/github-client-v2.js +49 -0
- package/plugins/specweave-github/lib/github-client-v2.ts +59 -0
- package/plugins/specweave-github/lib/github-epic-sync.js +23 -24
- package/plugins/specweave-github/lib/github-epic-sync.ts +30 -5
- package/plugins/specweave-github/lib/github-feature-sync.js +381 -0
- package/plugins/specweave-github/lib/github-feature-sync.ts +568 -0
- package/plugins/specweave-github/lib/github-spec-content-sync.js +40 -10
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +82 -14
- package/plugins/specweave-github/lib/progress-comment-builder.js +229 -0
- package/plugins/specweave-github/lib/progress-comment-builder.ts +324 -0
- package/plugins/specweave-github/lib/user-story-content-builder.js +299 -0
- package/plugins/specweave-github/lib/user-story-content-builder.ts +413 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.js +344 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.ts +543 -0
- package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +189 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
- package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +26 -0
- package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +483 -0
- package/plugins/specweave-kafka/README.md +242 -0
- package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +235 -0
- package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +209 -0
- package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +266 -0
- package/plugins/specweave-kafka/commands/deploy.md +99 -0
- package/plugins/specweave-kafka/commands/dev-env.md +176 -0
- package/plugins/specweave-kafka/commands/mcp-configure.md +101 -0
- package/plugins/specweave-kafka/commands/monitor-setup.md +96 -0
- package/plugins/specweave-kafka/docker/kafka-local/docker-compose.yml +187 -0
- package/plugins/specweave-kafka/docker/redpanda/docker-compose.yml +199 -0
- package/plugins/specweave-kafka/docker/templates/consumer-nodejs.js +225 -0
- package/plugins/specweave-kafka/docker/templates/consumer-python.py +220 -0
- package/plugins/specweave-kafka/docker/templates/producer-nodejs.js +168 -0
- package/plugins/specweave-kafka/docker/templates/producer-python.py +167 -0
- package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.js +438 -0
- package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.ts +541 -0
- package/plugins/specweave-kafka/lib/adapters/platform-adapter.js +47 -0
- package/plugins/specweave-kafka/lib/adapters/platform-adapter.ts +343 -0
- package/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +258 -0
- package/plugins/specweave-kafka/lib/cli/kcat-wrapper.ts +298 -0
- package/plugins/specweave-kafka/lib/cli/types.js +10 -0
- package/plugins/specweave-kafka/lib/cli/types.ts +92 -0
- package/plugins/specweave-kafka/lib/connectors/connector-catalog.js +305 -0
- package/plugins/specweave-kafka/lib/connectors/connector-catalog.ts +528 -0
- package/plugins/specweave-kafka/lib/documentation/diagram-generator.js +114 -0
- package/plugins/specweave-kafka/lib/documentation/diagram-generator.ts +195 -0
- package/plugins/specweave-kafka/lib/documentation/exporter.js +210 -0
- package/plugins/specweave-kafka/lib/documentation/exporter.ts +338 -0
- package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.js +60 -0
- package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.ts +130 -0
- package/plugins/specweave-kafka/lib/documentation/topology-generator.js +143 -0
- package/plugins/specweave-kafka/lib/documentation/topology-generator.ts +290 -0
- package/plugins/specweave-kafka/lib/mcp/detector.js +298 -0
- package/plugins/specweave-kafka/lib/mcp/detector.ts +352 -0
- package/plugins/specweave-kafka/lib/mcp/types.js +21 -0
- package/plugins/specweave-kafka/lib/mcp/types.ts +77 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.js +193 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.ts +362 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.js +188 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.ts +359 -0
- package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.js +195 -0
- package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.ts +380 -0
- package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.js +209 -0
- package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.ts +358 -0
- package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.js +354 -0
- package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.ts +563 -0
- package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.js +259 -0
- package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.ts +516 -0
- package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.js +233 -0
- package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.ts +423 -0
- package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.js +266 -0
- package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.ts +445 -0
- package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.js +312 -0
- package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.ts +561 -0
- package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.js +289 -0
- package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.ts +607 -0
- package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.js +264 -0
- package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.ts +498 -0
- package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.js +263 -0
- package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.ts +549 -0
- package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.js +205 -0
- package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.ts +399 -0
- package/plugins/specweave-kafka/lib/performance/performance-optimizer.js +249 -0
- package/plugins/specweave-kafka/lib/performance/performance-optimizer.ts +427 -0
- package/plugins/specweave-kafka/lib/security/kafka-security.js +252 -0
- package/plugins/specweave-kafka/lib/security/kafka-security.ts +494 -0
- package/plugins/specweave-kafka/lib/utils/capacity-planner.js +203 -0
- package/plugins/specweave-kafka/lib/utils/capacity-planner.ts +469 -0
- package/plugins/specweave-kafka/lib/utils/config-validator.js +419 -0
- package/plugins/specweave-kafka/lib/utils/config-validator.ts +564 -0
- package/plugins/specweave-kafka/lib/utils/partitioning.js +329 -0
- package/plugins/specweave-kafka/lib/utils/partitioning.ts +473 -0
- package/plugins/specweave-kafka/lib/utils/sizing.js +221 -0
- package/plugins/specweave-kafka/lib/utils/sizing.ts +374 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-broker-metrics.json +628 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-cluster-overview.json +564 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-consumer-lag.json +509 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-jvm-metrics.json +674 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-topic-metrics.json +578 -0
- package/plugins/specweave-kafka/monitoring/grafana/provisioning/dashboards/kafka.yml +17 -0
- package/plugins/specweave-kafka/monitoring/grafana/provisioning/datasources/prometheus.yml +17 -0
- package/plugins/specweave-kafka/monitoring/prometheus/kafka-alerts.yml +415 -0
- package/plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml +256 -0
- package/plugins/specweave-kafka/package.json +41 -0
- package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +647 -0
- package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +433 -0
- package/plugins/specweave-kafka/skills/kafka-iac-deployment/SKILL.md +449 -0
- package/plugins/specweave-kafka/skills/kafka-kubernetes/SKILL.md +667 -0
- package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +273 -0
- package/plugins/specweave-kafka/skills/kafka-observability/SKILL.md +576 -0
- package/plugins/specweave-kafka/templates/config/broker-production.properties +254 -0
- package/plugins/specweave-kafka/templates/config/consumer-low-latency.properties +112 -0
- package/plugins/specweave-kafka/templates/config/producer-high-throughput.properties +120 -0
- package/plugins/specweave-kafka/templates/migration/mirrormaker2-config.properties +234 -0
- package/plugins/specweave-kafka/templates/monitoring/grafana/multi-cluster-dashboard.json +686 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/main.tf +347 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/outputs.tf +107 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/templates/kafka-broker-init.sh.tpl +216 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/variables.tf +156 -0
- package/plugins/specweave-kafka/terraform/aws-msk/main.tf +362 -0
- package/plugins/specweave-kafka/terraform/aws-msk/outputs.tf +93 -0
- package/plugins/specweave-kafka/terraform/aws-msk/templates/server.properties.tpl +32 -0
- package/plugins/specweave-kafka/terraform/aws-msk/variables.tf +235 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/main.tf +281 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/outputs.tf +118 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/variables.tf +148 -0
- package/plugins/specweave-kafka/tsconfig.json +21 -0
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-kafka-streams/README.md +310 -0
- package/plugins/specweave-kafka-streams/skills/kafka-streams-topology/SKILL.md +539 -0
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-n8n/README.md +354 -0
- package/plugins/specweave-n8n/skills/n8n-kafka-workflows/SKILL.md +504 -0
- package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
- package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
- package/src/templates/AGENTS.md.template +601 -7
- package/src/templates/CLAUDE.md.template +188 -88
- package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +0 -255
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +0 -248
- package/plugins/specweave-github/commands/specweave-github-sync-from.md +0 -147
- package/plugins/specweave-github/commands/specweave-github-sync-spec.md +0 -208
- package/plugins/specweave-github/commands/specweave-github-sync-tasks.md +0 -530
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +0 -267
- package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +0 -240
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-ac-status.js","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/update-ac-status.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAQ7B;;GAEG;AACH,KAAK,UAAU,cAAc,CAAC,WAAmB;IAC/C,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC;QAEnF,0BAA0B;QAC1B,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,KAAK,CAAC,eAAe,WAAW,iBAAiB,aAAa,EAAE,CAAC,CAAC;YAC1E,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,uCAAuC,WAAW,KAAK,CAAC,CAAC;QAErE,8CAA8C;QAC9C,MAAM,YAAY,GAAG,MAAM,4BAA4B,CAAC,aAAa,CAAC,CAAC;QAEvE,IAAI,YAAY,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;YACpE,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,WAAW,YAAY,CAAC,IAAI,iCAAiC,CAAC,CAAC;QAE3E,oCAAoC;QACpC,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAE/E,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,aAAa,YAA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IAClB,CAAC;IAED,cAAc,CAAC,WAAW,CAAC;SACxB,IAAI,CAAC,GAAG,EAAE;QACT,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ado-spec-content-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/ado-spec-content-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAOL,iBAAiB,EAClB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"ado-spec-content-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/ado-spec-content-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAOL,iBAAiB,EAClB,MAAM,wCAAwC,CAAC;AAMhD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CA0C5B;AA6RD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAShF"}
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* - State (New/Active/Resolved/Closed): ADO → SpecWeave (we read)
|
|
10
10
|
*/
|
|
11
11
|
import { parseSpecContent, detectContentChanges, hasExternalLink, updateSpecWithExternalLink, } from '../../../src/core/spec-content-sync.js';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { SpecIncrementMapper } from '../../../src/core/sync/spec-increment-mapper.js';
|
|
13
|
+
import * as path from 'path';
|
|
14
|
+
import * as fs from 'fs/promises';
|
|
14
15
|
/**
|
|
15
16
|
* Sync spec content to ADO feature
|
|
16
17
|
* Creates feature if it doesn't exist, updates if it does
|
|
@@ -57,9 +58,11 @@ export async function syncSpecContentToAdo(options) {
|
|
|
57
58
|
async function createAdoFeature(client, spec, options) {
|
|
58
59
|
const { specPath, dryRun, verbose } = options;
|
|
59
60
|
try {
|
|
61
|
+
// Get task mappings (if available)
|
|
62
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
60
63
|
// Build feature title and description
|
|
61
64
|
const title = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
62
|
-
const description = buildAdoDescription(spec);
|
|
65
|
+
const description = buildAdoDescription(spec, tasks);
|
|
63
66
|
if (verbose) {
|
|
64
67
|
console.log(`\n📝 Creating ADO feature:`);
|
|
65
68
|
console.log(` Title: ${title}`);
|
|
@@ -138,9 +141,11 @@ async function updateAdoFeature(client, spec, workItemId, options) {
|
|
|
138
141
|
console.log(` - ${change}`);
|
|
139
142
|
}
|
|
140
143
|
}
|
|
144
|
+
// Get task mappings (if available)
|
|
145
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
141
146
|
// Build updated content
|
|
142
147
|
const newTitle = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
143
|
-
const newDescription = buildAdoDescription(spec);
|
|
148
|
+
const newDescription = buildAdoDescription(spec, tasks);
|
|
144
149
|
if (dryRun) {
|
|
145
150
|
console.log('\n🔍 Dry run - would update feature:');
|
|
146
151
|
console.log(` Title: ${newTitle}`);
|
|
@@ -178,10 +183,10 @@ async function updateAdoFeature(client, spec, workItemId, options) {
|
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
/**
|
|
181
|
-
* Build ADO description from spec content
|
|
186
|
+
* Build ADO description from spec content with optional task mappings
|
|
182
187
|
* ADO supports HTML in description
|
|
183
188
|
*/
|
|
184
|
-
function buildAdoDescription(spec) {
|
|
189
|
+
function buildAdoDescription(spec, tasks) {
|
|
185
190
|
let html = '';
|
|
186
191
|
// Add spec description
|
|
187
192
|
if (spec.description) {
|
|
@@ -202,12 +207,66 @@ function buildAdoDescription(spec) {
|
|
|
202
207
|
}
|
|
203
208
|
}
|
|
204
209
|
}
|
|
210
|
+
// Add task mappings (if provided)
|
|
211
|
+
if (tasks && tasks.length > 0) {
|
|
212
|
+
html += '<h2>Implementation Tasks</h2>';
|
|
213
|
+
html += '<ul>';
|
|
214
|
+
for (const task of tasks) {
|
|
215
|
+
html += `<li><strong>${task.id}</strong>: ${escapeHtml(task.title)}`;
|
|
216
|
+
if (task.userStories && task.userStories.length > 0) {
|
|
217
|
+
html += ` (${task.userStories.join(', ')})`;
|
|
218
|
+
}
|
|
219
|
+
html += '</li>';
|
|
220
|
+
}
|
|
221
|
+
html += '</ul>';
|
|
222
|
+
}
|
|
205
223
|
// Add metadata
|
|
206
224
|
if (spec.metadata.priority) {
|
|
207
225
|
html += `<p><strong>Priority:</strong> ${spec.metadata.priority}</p>`;
|
|
208
226
|
}
|
|
209
227
|
return html;
|
|
210
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Get task mappings for a spec (if available)
|
|
231
|
+
*/
|
|
232
|
+
async function getTaskMappings(specPath, specId) {
|
|
233
|
+
try {
|
|
234
|
+
// Find SpecWeave root
|
|
235
|
+
const rootDir = await findSpecWeaveRoot(specPath);
|
|
236
|
+
// Use SpecIncrementMapper to get task mappings
|
|
237
|
+
const mapper = new SpecIncrementMapper(rootDir);
|
|
238
|
+
const mapping = await mapper.mapSpecToIncrements(specId);
|
|
239
|
+
if (mapping.increments.length > 0) {
|
|
240
|
+
// Return tasks from the first (most recent) increment
|
|
241
|
+
return mapping.increments[0].tasks;
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
// If mapping fails, just return undefined (not critical)
|
|
247
|
+
return undefined;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Find SpecWeave root directory from spec path
|
|
252
|
+
*/
|
|
253
|
+
async function findSpecWeaveRoot(specPath) {
|
|
254
|
+
let currentDir = path.dirname(specPath);
|
|
255
|
+
while (true) {
|
|
256
|
+
const specweaveDir = path.join(currentDir, '.specweave');
|
|
257
|
+
try {
|
|
258
|
+
await fs.access(specweaveDir);
|
|
259
|
+
return currentDir;
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
const parentDir = path.dirname(currentDir);
|
|
263
|
+
if (parentDir === currentDir) {
|
|
264
|
+
throw new Error('.specweave directory not found');
|
|
265
|
+
}
|
|
266
|
+
currentDir = parentDir;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
211
270
|
/**
|
|
212
271
|
* Escape HTML special characters
|
|
213
272
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ado-spec-content-sync.js","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/ado-spec-content-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EAEpB,eAAe,EACf,0BAA0B,GAG3B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ado-spec-content-sync.js","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/ado-spec-content-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EAEpB,eAAe,EACf,0BAA0B,GAG3B,MAAM,w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descriptions.
|
|
5
|
+
*/
|
|
6
|
+
export interface EnhancedAdoSyncOptions {
|
|
7
|
+
specPath: string;
|
|
8
|
+
organization?: string;
|
|
9
|
+
project?: string;
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface EnhancedAdoSyncResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
action: 'created' | 'updated' | 'no-change' | 'error';
|
|
16
|
+
featureId?: number;
|
|
17
|
+
featureUrl?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
tasksLinked?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Enhanced sync with rich content including task mappings
|
|
23
|
+
*/
|
|
24
|
+
export declare function syncSpecToAdoWithEnhancedContent(options: EnhancedAdoSyncOptions): Promise<EnhancedAdoSyncResult>;
|
|
25
|
+
//# sourceMappingURL=enhanced-ado-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-ado-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/enhanced-ado-sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAgIhC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Azure DevOps Spec Content Sync
|
|
3
|
+
*
|
|
4
|
+
* Uses EnhancedContentBuilder and SpecIncrementMapper for rich feature descriptions.
|
|
5
|
+
*/
|
|
6
|
+
import { AdoClientV2 } from './ado-client-v2.js';
|
|
7
|
+
import { EnhancedContentBuilder } from '../../../src/core/sync/enhanced-content-builder.js';
|
|
8
|
+
import { SpecIncrementMapper } from '../../../src/core/sync/spec-increment-mapper.js';
|
|
9
|
+
import { parseSpecContent } from '../../../src/core/spec-content-sync.js';
|
|
10
|
+
import path from 'path';
|
|
11
|
+
import fs from 'fs/promises';
|
|
12
|
+
/**
|
|
13
|
+
* Enhanced sync with rich content including task mappings
|
|
14
|
+
*/
|
|
15
|
+
export async function syncSpecToAdoWithEnhancedContent(options) {
|
|
16
|
+
const { specPath, organization, project, dryRun = false, verbose = false } = options;
|
|
17
|
+
try {
|
|
18
|
+
// 1. Parse spec content
|
|
19
|
+
const baseSpec = await parseSpecContent(specPath);
|
|
20
|
+
if (!baseSpec) {
|
|
21
|
+
return {
|
|
22
|
+
success: false,
|
|
23
|
+
action: 'error',
|
|
24
|
+
error: 'Failed to parse spec content',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (verbose) {
|
|
28
|
+
console.log(`📄 Parsed spec: ${baseSpec.identifier.compact}`);
|
|
29
|
+
}
|
|
30
|
+
// 2. Build enhanced spec with task mappings
|
|
31
|
+
const specId = baseSpec.identifier.full || baseSpec.identifier.compact;
|
|
32
|
+
const rootDir = await findSpecWeaveRoot(specPath);
|
|
33
|
+
const mapper = new SpecIncrementMapper(rootDir);
|
|
34
|
+
const mapping = await mapper.mapSpecToIncrements(specId);
|
|
35
|
+
if (verbose) {
|
|
36
|
+
console.log(`🔗 Found ${mapping.increments.length} related increments`);
|
|
37
|
+
}
|
|
38
|
+
// 3. Build enhanced spec content
|
|
39
|
+
const taskMapping = buildTaskMapping(mapping.increments, organization, project);
|
|
40
|
+
const architectureDocs = await findArchitectureDocs(rootDir, specId);
|
|
41
|
+
const enhancedSpec = {
|
|
42
|
+
...baseSpec,
|
|
43
|
+
summary: baseSpec.description,
|
|
44
|
+
taskMapping,
|
|
45
|
+
architectureDocs
|
|
46
|
+
};
|
|
47
|
+
// 4. Build external description
|
|
48
|
+
const builder = new EnhancedContentBuilder();
|
|
49
|
+
const description = builder.buildExternalDescription(enhancedSpec);
|
|
50
|
+
if (verbose) {
|
|
51
|
+
console.log(`📝 Generated description: ${description.length} characters`);
|
|
52
|
+
}
|
|
53
|
+
if (dryRun) {
|
|
54
|
+
console.log('🔍 DRY RUN - Would create/update feature with:');
|
|
55
|
+
console.log(` Title: ${baseSpec.title}`);
|
|
56
|
+
console.log(` Description length: ${description.length}`);
|
|
57
|
+
return {
|
|
58
|
+
success: true,
|
|
59
|
+
action: 'no-change',
|
|
60
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
// 5. Create or update ADO feature
|
|
64
|
+
if (!organization || !project) {
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
action: 'error',
|
|
68
|
+
error: 'Azure DevOps organization/project not specified',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
// Create a sync profile for the ADO client
|
|
72
|
+
const profile = {
|
|
73
|
+
provider: 'ado',
|
|
74
|
+
displayName: `${organization}/${project}`,
|
|
75
|
+
config: {
|
|
76
|
+
organization,
|
|
77
|
+
project
|
|
78
|
+
},
|
|
79
|
+
timeRange: { default: '1M', max: '6M' }
|
|
80
|
+
};
|
|
81
|
+
const pat = process.env.AZURE_DEVOPS_PAT || '';
|
|
82
|
+
const client = new AdoClientV2(profile, pat);
|
|
83
|
+
// Check if feature already exists
|
|
84
|
+
const existingFeature = await findExistingFeature(client, baseSpec.identifier.compact);
|
|
85
|
+
let result;
|
|
86
|
+
if (existingFeature) {
|
|
87
|
+
// Update existing feature
|
|
88
|
+
await client.updateWorkItem(existingFeature.id, {
|
|
89
|
+
title: `[${baseSpec.identifier.compact}] ${baseSpec.title}`,
|
|
90
|
+
description
|
|
91
|
+
});
|
|
92
|
+
result = {
|
|
93
|
+
success: true,
|
|
94
|
+
action: 'updated',
|
|
95
|
+
featureId: existingFeature.id,
|
|
96
|
+
featureUrl: `https://dev.azure.com/${organization}/${project}/_workitems/edit/${existingFeature.id}`,
|
|
97
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// Create new feature (using createEpic which creates Feature work item type)
|
|
102
|
+
const feature = await client.createEpic({
|
|
103
|
+
title: `[${baseSpec.identifier.compact}] ${baseSpec.title}`,
|
|
104
|
+
description,
|
|
105
|
+
tags: ['spec', 'external-tool-sync']
|
|
106
|
+
});
|
|
107
|
+
result = {
|
|
108
|
+
success: true,
|
|
109
|
+
action: 'created',
|
|
110
|
+
featureId: feature.id,
|
|
111
|
+
featureUrl: `https://dev.azure.com/${organization}/${project}/_workitems/edit/${feature.id}`,
|
|
112
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (verbose) {
|
|
116
|
+
console.log(`✅ ${result.action === 'created' ? 'Created' : 'Updated'} feature #${result.featureId}`);
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
return {
|
|
122
|
+
success: false,
|
|
123
|
+
action: 'error',
|
|
124
|
+
error: error.message
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Helper functions
|
|
129
|
+
async function findSpecWeaveRoot(specPath) {
|
|
130
|
+
let currentDir = path.dirname(specPath);
|
|
131
|
+
while (true) {
|
|
132
|
+
const specweaveDir = path.join(currentDir, '.specweave');
|
|
133
|
+
try {
|
|
134
|
+
await fs.access(specweaveDir);
|
|
135
|
+
return currentDir;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
const parentDir = path.dirname(currentDir);
|
|
139
|
+
if (parentDir === currentDir) {
|
|
140
|
+
throw new Error('.specweave directory not found');
|
|
141
|
+
}
|
|
142
|
+
currentDir = parentDir;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function buildTaskMapping(increments, organization, project) {
|
|
147
|
+
if (increments.length === 0)
|
|
148
|
+
return undefined;
|
|
149
|
+
const firstIncrement = increments[0];
|
|
150
|
+
const tasks = firstIncrement.tasks.map((task) => ({
|
|
151
|
+
id: task.id,
|
|
152
|
+
title: task.title,
|
|
153
|
+
userStories: task.userStories
|
|
154
|
+
}));
|
|
155
|
+
return {
|
|
156
|
+
incrementId: firstIncrement.id,
|
|
157
|
+
tasks,
|
|
158
|
+
tasksUrl: `https://dev.azure.com/${organization}/${project}/_git/repo?path=/.specweave/increments/${firstIncrement.id}/tasks.md`
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
async function findArchitectureDocs(rootDir, specId) {
|
|
162
|
+
const docs = [];
|
|
163
|
+
const archDir = path.join(rootDir, '.specweave/docs/internal/architecture');
|
|
164
|
+
try {
|
|
165
|
+
const adrDir = path.join(archDir, 'adr');
|
|
166
|
+
try {
|
|
167
|
+
const adrs = await fs.readdir(adrDir);
|
|
168
|
+
const relatedAdrs = adrs.filter(file => file.includes(specId.replace('spec-', '')));
|
|
169
|
+
for (const adr of relatedAdrs) {
|
|
170
|
+
docs.push({
|
|
171
|
+
type: 'adr',
|
|
172
|
+
path: path.join(adrDir, adr),
|
|
173
|
+
title: adr.replace('.md', '').replace(/-/g, ' ')
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch { }
|
|
178
|
+
}
|
|
179
|
+
catch { }
|
|
180
|
+
return docs;
|
|
181
|
+
}
|
|
182
|
+
async function findExistingFeature(client, specId) {
|
|
183
|
+
try {
|
|
184
|
+
const features = await client.queryWorkItems(`[System.Title] Contains '[${specId}]' AND [System.WorkItemType] = 'Feature'`);
|
|
185
|
+
return features[0] || null;
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=enhanced-ado-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-ado-sync.js","sourceRoot":"","sources":["../../../../plugins/specweave-ado/lib/enhanced-ado-sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAuB,MAAM,oDAAoD,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAY,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,aAAa,CAAC;AAmB7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,OAA+B;IAE/B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAErF,IAAI,CAAC;QACH,wBAAwB;QACxB,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,8BAA8B;aACtC,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,QAAQ,CAAC,UAAU,CAAC,OAA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AAO,EAAE,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACtC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAEpF,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;gBAC9B,IAAI,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;oBAC5B,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;iBACjD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,MAAmB,EAAE,MAAc;IACpE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,6BAA6B,MAAM,0CAA0C,CAAC,CAAC;QAC5H,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion Calculator - Verifies actual work completion from markdown checkboxes
|
|
3
|
+
*
|
|
4
|
+
* CRITICAL FIX: Prevents premature GitHub issue closure by verifying actual
|
|
5
|
+
* AC and Task completion state, not just frontmatter status.
|
|
6
|
+
*
|
|
7
|
+
* Problem:
|
|
8
|
+
* - OLD: Issues closed based on frontmatter `status: complete`
|
|
9
|
+
* - Issue #574: Closed with 0/5 ACs complete!
|
|
10
|
+
*
|
|
11
|
+
* Solution:
|
|
12
|
+
* - NEW: Parse actual checkbox states ([x] vs [ ])
|
|
13
|
+
* - Close ONLY when ALL ACs and ALL tasks are verified [x]
|
|
14
|
+
*
|
|
15
|
+
* Architecture:
|
|
16
|
+
* - Acceptance Criteria: Read from us-*.md files
|
|
17
|
+
* - Tasks: Read from increment's tasks.md
|
|
18
|
+
* - Verification Gate: 100% completion required
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Acceptance Criteria with completion status
|
|
22
|
+
*/
|
|
23
|
+
export interface AcceptanceCriteria {
|
|
24
|
+
id: string;
|
|
25
|
+
description: string;
|
|
26
|
+
completed: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Implementation Task with completion status
|
|
30
|
+
*/
|
|
31
|
+
export interface Task {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
completed: boolean;
|
|
35
|
+
userStories: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Complete verification status
|
|
39
|
+
*/
|
|
40
|
+
export interface CompletionStatus {
|
|
41
|
+
acsTotal: number;
|
|
42
|
+
acsCompleted: number;
|
|
43
|
+
acsPercentage: number;
|
|
44
|
+
tasksTotal: number;
|
|
45
|
+
tasksCompleted: number;
|
|
46
|
+
tasksPercentage: number;
|
|
47
|
+
overallComplete: boolean;
|
|
48
|
+
blockingAcs: string[];
|
|
49
|
+
blockingTasks: string[];
|
|
50
|
+
}
|
|
51
|
+
export declare class CompletionCalculator {
|
|
52
|
+
private projectRoot;
|
|
53
|
+
constructor(projectRoot: string);
|
|
54
|
+
/**
|
|
55
|
+
* Calculate ACTUAL completion from markdown checkboxes
|
|
56
|
+
*
|
|
57
|
+
* Returns true only if:
|
|
58
|
+
* - All ACs have [x] (not [ ])
|
|
59
|
+
* - All Tasks have **Status**: [x] (not [ ])
|
|
60
|
+
* - At least 1 AC exists (no empty user stories)
|
|
61
|
+
*
|
|
62
|
+
* @param userStoryPath - Path to us-*.md file
|
|
63
|
+
* @returns Completion status with detailed metrics
|
|
64
|
+
*/
|
|
65
|
+
calculateCompletion(userStoryPath: string): Promise<CompletionStatus>;
|
|
66
|
+
/**
|
|
67
|
+
* Parse User Story frontmatter
|
|
68
|
+
*/
|
|
69
|
+
private parseUserStoryFrontmatter;
|
|
70
|
+
/**
|
|
71
|
+
* Extract Acceptance Criteria with checkbox state
|
|
72
|
+
*
|
|
73
|
+
* Supports TWO formats:
|
|
74
|
+
* - Format 1 (preferred): AC-US1-01, AC-US1-02 (project-specific)
|
|
75
|
+
* - Format 2 (legacy): AC-001, AC-002, AC-020 (global)
|
|
76
|
+
*
|
|
77
|
+
* Patterns:
|
|
78
|
+
* - [x] **AC-US1-01**: Description (completed)
|
|
79
|
+
* - [ ] **AC-US1-01**: Description (not completed)
|
|
80
|
+
* - **AC-US1-01**: Description (no checkbox, default to not completed)
|
|
81
|
+
*/
|
|
82
|
+
private extractAcceptanceCriteria;
|
|
83
|
+
/**
|
|
84
|
+
* Extract tasks from increment's tasks.md that map to this User Story
|
|
85
|
+
*
|
|
86
|
+
* Process:
|
|
87
|
+
* 1. Find increment link in user story's "Implementation" section
|
|
88
|
+
* 2. Read increment's tasks.md
|
|
89
|
+
* 3. Filter tasks that reference this user story's ACs
|
|
90
|
+
* 4. Extract completion status from **Status**: [x] or [ ]
|
|
91
|
+
*/
|
|
92
|
+
private extractTasks;
|
|
93
|
+
/**
|
|
94
|
+
* Build completion comment for GitHub issue closure
|
|
95
|
+
*
|
|
96
|
+
* Used when closing issue after verification
|
|
97
|
+
*/
|
|
98
|
+
buildCompletionComment(completion: CompletionStatus): string;
|
|
99
|
+
/**
|
|
100
|
+
* Build progress comment for GitHub issue update
|
|
101
|
+
*
|
|
102
|
+
* Used when issue stays open (not 100% complete)
|
|
103
|
+
*/
|
|
104
|
+
buildProgressComment(completion: CompletionStatus): string;
|
|
105
|
+
/**
|
|
106
|
+
* Build reopen comment for GitHub issue
|
|
107
|
+
*
|
|
108
|
+
* Used when reopening prematurely closed issue
|
|
109
|
+
*/
|
|
110
|
+
buildReopenComment(completion: CompletionStatus, reason?: string): string;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=completion-calculator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion-calculator.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/completion-calculator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAE/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAGtB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IAGxB,eAAe,EAAE,OAAO,CAAC;IAGzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAaD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,EAAE,MAAM;IAI/B;;;;;;;;;;OAUG;IACG,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsC3E;;OAEG;IACH,OAAO,CAA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