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,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smart-reopen-detector
|
|
3
|
+
description: |
|
|
4
|
+
Detects when user reports issues with recently completed work and suggests reopening relevant tasks, user stories, or increments. Auto-activates on keywords: not working, broken, bug, issue, problem, failing, error, crash, regression, still broken, incorrect, missing, wrong. Scans active and recently completed (7 days) work to find related items. Provides smart suggestions with relevance scoring.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Smart Reopen Detector
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
When you report an issue with recently completed work, I'll automatically:
|
|
12
|
+
1. 🔍 **Scan your recent work** (active + completed in last 7 days)
|
|
13
|
+
2. 🎯 **Identify related items** using keyword matching
|
|
14
|
+
3. 💡 **Suggest what to reopen** with relevance scoring
|
|
15
|
+
4. ⚠️ **Check WIP limits** before suggesting reopen
|
|
16
|
+
|
|
17
|
+
## When I Activate
|
|
18
|
+
|
|
19
|
+
I automatically activate when you mention these keywords:
|
|
20
|
+
- **Not working**: "not working", "broken", "failing", "error", "crash"
|
|
21
|
+
- **Quality issues**: "bug", "issue", "problem", "wrong", "incorrect", "missing"
|
|
22
|
+
- **Regressions**: "still broken", "regression", "broken again", "came back"
|
|
23
|
+
|
|
24
|
+
## How I Help
|
|
25
|
+
|
|
26
|
+
### Example 1: Issue Report
|
|
27
|
+
```
|
|
28
|
+
User: "The GitHub sync isn't working, it was just completed yesterday"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
I'll respond with:
|
|
32
|
+
```
|
|
33
|
+
🔍 Scanning recent work...
|
|
34
|
+
|
|
35
|
+
Found 2 related item(s) in recent work:
|
|
36
|
+
|
|
37
|
+
📦 INCREMENT: 0031-external-tool-status-sync
|
|
38
|
+
Increment: 0031-external-tool-status-sync
|
|
39
|
+
Completed: 2 days ago
|
|
40
|
+
Relevance: 15 points
|
|
41
|
+
Matched: github, sync
|
|
42
|
+
|
|
43
|
+
✓ TASK: T-003 GitHub Content Sync
|
|
44
|
+
Increment: 0031-external-tool-status-sync
|
|
45
|
+
Completed: 1 day ago
|
|
46
|
+
Relevance: 14 points
|
|
47
|
+
Matched: github, sync
|
|
48
|
+
|
|
49
|
+
💡 Suggested action:
|
|
50
|
+
/specweave:reopen 0031-external-tool-status-sync --reason "GitHub sync not working"
|
|
51
|
+
|
|
52
|
+
Would you like me to:
|
|
53
|
+
1. Reopen the entire increment (checks WIP limits)
|
|
54
|
+
2. Reopen just task T-003 (targeted fix)
|
|
55
|
+
3. Show me the WIP status first
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Example 2: Specific Feature Broken
|
|
59
|
+
```
|
|
60
|
+
User: "The authentication is broken after the recent deployment"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
I'll respond with:
|
|
64
|
+
```
|
|
65
|
+
🔍 Scanning recent work...
|
|
66
|
+
|
|
67
|
+
Found 3 related item(s) in recent work:
|
|
68
|
+
|
|
69
|
+
✓ TASK: T-012 Authentication Service
|
|
70
|
+
Increment: 0025-user-auth
|
|
71
|
+
Completed: 3 days ago
|
|
72
|
+
Relevance: 10 points
|
|
73
|
+
Matched: authentication
|
|
74
|
+
|
|
75
|
+
✓ TASK: T-014 JWT Token Validation
|
|
76
|
+
Increment: 0025-user-auth
|
|
77
|
+
Completed: 3 days ago
|
|
78
|
+
Relevance: 7 points
|
|
79
|
+
Matched: authentication
|
|
80
|
+
|
|
81
|
+
💡 Suggested action:
|
|
82
|
+
/specweave:reopen 0025-user-auth --task T-012 --reason "Authentication broken after deployment"
|
|
83
|
+
|
|
84
|
+
⚠️ Note: Increment 0025 was completed 3 days ago. Consider checking deployment config first.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Example 3: No Recent Work Found
|
|
88
|
+
```
|
|
89
|
+
User: "The payment flow is not working"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
I'll respond with:
|
|
93
|
+
```
|
|
94
|
+
🔍 Scanning recent work...
|
|
95
|
+
|
|
96
|
+
🔍 No related work found in recent activity (last 7 days)
|
|
97
|
+
|
|
98
|
+
The payment functionality might be:
|
|
99
|
+
1. From an older increment (>7 days ago)
|
|
100
|
+
2. Not yet implemented
|
|
101
|
+
3. Part of external dependencies
|
|
102
|
+
|
|
103
|
+
Would you like me to:
|
|
104
|
+
1. Search all increments (not just recent)
|
|
105
|
+
2. Create a new bug increment for investigation
|
|
106
|
+
3. Check the backlog for related work
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## What I Do
|
|
110
|
+
|
|
111
|
+
### Step 1: Extract Keywords
|
|
112
|
+
From your message, I extract relevant keywords:
|
|
113
|
+
- Feature names (authentication, github, payment)
|
|
114
|
+
- Action words (sync, deploy, validate)
|
|
115
|
+
- Component names (api, database, frontend)
|
|
116
|
+
|
|
117
|
+
### Step 2: Scan Recent Work
|
|
118
|
+
I scan:
|
|
119
|
+
- ✅ **Active increments** (currently being worked on)
|
|
120
|
+
- ✅ **Recently completed** (last 7 days)
|
|
121
|
+
- ✅ **All tasks** from these increments
|
|
122
|
+
|
|
123
|
+
### Step 3: Score Matches
|
|
124
|
+
I assign relevance scores using:
|
|
125
|
+
- **+10 points**: Exact match in title/ID
|
|
126
|
+
- **+7 points**: Partial match in title
|
|
127
|
+
- **+5 points**: Match in increment ID
|
|
128
|
+
- **+3 points**: Match in description/AC
|
|
129
|
+
|
|
130
|
+
### Step 4: Suggest Actions
|
|
131
|
+
I provide:
|
|
132
|
+
- Top matches (up to 5)
|
|
133
|
+
- Relevance scores
|
|
134
|
+
- Suggested `/specweave:reopen` command
|
|
135
|
+
- WIP limit warnings (if applicable)
|
|
136
|
+
|
|
137
|
+
## Smart Suggestions
|
|
138
|
+
|
|
139
|
+
### For Increments
|
|
140
|
+
```bash
|
|
141
|
+
# Reopen entire increment
|
|
142
|
+
/specweave:reopen 0031-external-tool-status-sync --reason "GitHub sync failing"
|
|
143
|
+
|
|
144
|
+
# Check WIP limits first (recommended)
|
|
145
|
+
/specweave:status
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### For Specific Tasks
|
|
149
|
+
```bash
|
|
150
|
+
# Reopen single task (surgical fix)
|
|
151
|
+
/specweave:reopen 0031 --task T-003 --reason "GitHub API 500 error"
|
|
152
|
+
|
|
153
|
+
# Reopen multiple related tasks
|
|
154
|
+
/specweave:reopen 0031 --user-story US-001 --reason "All GitHub features broken"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Force Reopen (Bypass WIP Limits)
|
|
158
|
+
```bash
|
|
159
|
+
# Use --force for critical production issues
|
|
160
|
+
/specweave:reopen 0031 --force --reason "Production down, critical fix needed"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## WIP Limit Awareness
|
|
164
|
+
|
|
165
|
+
Before suggesting increment reopen, I check:
|
|
166
|
+
- ✅ Current active increment count
|
|
167
|
+
- ✅ Type-specific limits (feature: 2, refactor: 1, etc.)
|
|
168
|
+
- ⚠️ Warn if reopening will exceed limits
|
|
169
|
+
|
|
170
|
+
**Example Warning**:
|
|
171
|
+
```
|
|
172
|
+
⚠️ WIP LIMIT WARNING:
|
|
173
|
+
Current active: 2 features
|
|
174
|
+
Limit: 2 features
|
|
175
|
+
Reopening 0031-external-tool-status-sync will EXCEED the limit!
|
|
176
|
+
|
|
177
|
+
Options:
|
|
178
|
+
1. Pause another feature first: /specweave:pause 0030
|
|
179
|
+
2. Complete another feature: /specweave:done 0029
|
|
180
|
+
3. Force reopen (not recommended): --force
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Integration with Commands
|
|
184
|
+
|
|
185
|
+
I work seamlessly with:
|
|
186
|
+
- `/specweave:reopen` - Execute reopen action
|
|
187
|
+
- `/specweave:status` - Check WIP limits
|
|
188
|
+
- `/specweave:progress` - See increment progress
|
|
189
|
+
- `/specweave:pause` - Pause another increment to make room
|
|
190
|
+
|
|
191
|
+
## When NOT to Use
|
|
192
|
+
|
|
193
|
+
I don't activate for:
|
|
194
|
+
- ❌ General questions about code
|
|
195
|
+
- ❌ Feature requests (use `/specweave:increment`)
|
|
196
|
+
- ❌ Documentation questions
|
|
197
|
+
- ❌ Status inquiries (use `/specweave:status`)
|
|
198
|
+
|
|
199
|
+
I **only** activate when you explicitly report something is broken/not working.
|
|
200
|
+
|
|
201
|
+
## Technical Implementation
|
|
202
|
+
|
|
203
|
+
**Core Logic**:
|
|
204
|
+
- Uses `RecentWorkScanner` to find matches
|
|
205
|
+
- Keyword extraction from user message
|
|
206
|
+
- Relevance scoring algorithm
|
|
207
|
+
- WIP limit validation before suggestions
|
|
208
|
+
|
|
209
|
+
**Smart Features**:
|
|
210
|
+
- Deduplication (same increment from active + recent)
|
|
211
|
+
- Recency bias (prefer more recent completions)
|
|
212
|
+
- Contextual hints (deployment, config, dependencies)
|
|
213
|
+
|
|
214
|
+
## Examples of Activation
|
|
215
|
+
|
|
216
|
+
### ✅ Will Activate
|
|
217
|
+
- "GitHub sync not working"
|
|
218
|
+
- "Authentication is broken"
|
|
219
|
+
- "Tests are failing after the last commit"
|
|
220
|
+
- "Deployment crashed"
|
|
221
|
+
- "API returns 500 error"
|
|
222
|
+
- "Still broken after the fix"
|
|
223
|
+
|
|
224
|
+
### ❌ Won't Activate
|
|
225
|
+
- "How does GitHub sync work?"
|
|
226
|
+
- "Can you add authentication?"
|
|
227
|
+
- "What's the status of increment 0031?"
|
|
228
|
+
- "Show me the progress"
|
|
229
|
+
- "Create a new feature for payments"
|
|
230
|
+
|
|
231
|
+
## Success Metrics
|
|
232
|
+
|
|
233
|
+
I'm successful when:
|
|
234
|
+
- ✅ You find the related work quickly (<30 seconds)
|
|
235
|
+
- ✅ The suggested reopen command is correct
|
|
236
|
+
- ✅ No false positives (only relevant matches)
|
|
237
|
+
- ✅ WIP limits are respected
|
|
238
|
+
- ✅ Clear next steps provided
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
**Auto-loads when**: You report issues with recently completed work
|
|
243
|
+
**Commands**: `/specweave:reopen`, `/specweave:status`
|
|
244
|
+
**Related Skills**: `increment-planner`, `tdd-workflow`
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
hasExternalLink,
|
|
5
5
|
updateSpecWithExternalLink
|
|
6
6
|
} from "../../../src/core/spec-content-sync.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { SpecIncrementMapper } from "../../../src/core/sync/spec-increment-mapper.js";
|
|
8
|
+
import * as path from "path";
|
|
9
|
+
import * as fs from "fs/promises";
|
|
9
10
|
async function syncSpecContentToAdo(options) {
|
|
10
11
|
const { specPath, client, dryRun = false, verbose = false } = options;
|
|
11
12
|
try {
|
|
@@ -44,8 +45,9 @@ async function syncSpecContentToAdo(options) {
|
|
|
44
45
|
async function createAdoFeature(client, spec, options) {
|
|
45
46
|
const { specPath, dryRun, verbose } = options;
|
|
46
47
|
try {
|
|
48
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
47
49
|
const title = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
48
|
-
const description = buildAdoDescription(spec);
|
|
50
|
+
const description = buildAdoDescription(spec, tasks);
|
|
49
51
|
if (verbose) {
|
|
50
52
|
console.log(`
|
|
51
53
|
\u{1F4DD} Creating ADO feature:`);
|
|
@@ -125,8 +127,9 @@ async function updateAdoFeature(client, spec, workItemId, options) {
|
|
|
125
127
|
console.log(` - ${change}`);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
130
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
128
131
|
const newTitle = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
129
|
-
const newDescription = buildAdoDescription(spec);
|
|
132
|
+
const newDescription = buildAdoDescription(spec, tasks);
|
|
130
133
|
if (dryRun) {
|
|
131
134
|
console.log("\n\u{1F50D} Dry run - would update feature:");
|
|
132
135
|
console.log(` Title: ${newTitle}`);
|
|
@@ -160,7 +163,7 @@ ${newDescription}`);
|
|
|
160
163
|
};
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
|
-
function buildAdoDescription(spec) {
|
|
166
|
+
function buildAdoDescription(spec, tasks) {
|
|
164
167
|
let html = "";
|
|
165
168
|
if (spec.description) {
|
|
166
169
|
html += `<p>${escapeHtml(spec.description)}</p>`;
|
|
@@ -179,11 +182,52 @@ function buildAdoDescription(spec) {
|
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
184
|
}
|
|
185
|
+
if (tasks && tasks.length > 0) {
|
|
186
|
+
html += "<h2>Implementation Tasks</h2>";
|
|
187
|
+
html += "<ul>";
|
|
188
|
+
for (const task of tasks) {
|
|
189
|
+
html += `<li><strong>${task.id}</strong>: ${escapeHtml(task.title)}`;
|
|
190
|
+
if (task.userStories && task.userStories.length > 0) {
|
|
191
|
+
html += ` (${task.userStories.join(", ")})`;
|
|
192
|
+
}
|
|
193
|
+
html += "</li>";
|
|
194
|
+
}
|
|
195
|
+
html += "</ul>";
|
|
196
|
+
}
|
|
182
197
|
if (spec.metadata.priority) {
|
|
183
198
|
html += `<p><strong>Priority:</strong> ${spec.metadata.priority}</p>`;
|
|
184
199
|
}
|
|
185
200
|
return html;
|
|
186
201
|
}
|
|
202
|
+
async function getTaskMappings(specPath, specId) {
|
|
203
|
+
try {
|
|
204
|
+
const rootDir = await findSpecWeaveRoot(specPath);
|
|
205
|
+
const mapper = new SpecIncrementMapper(rootDir);
|
|
206
|
+
const mapping = await mapper.mapSpecToIncrements(specId);
|
|
207
|
+
if (mapping.increments.length > 0) {
|
|
208
|
+
return mapping.increments[0].tasks;
|
|
209
|
+
}
|
|
210
|
+
return void 0;
|
|
211
|
+
} catch (error) {
|
|
212
|
+
return void 0;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function findSpecWeaveRoot(specPath) {
|
|
216
|
+
let currentDir = path.dirname(specPath);
|
|
217
|
+
while (true) {
|
|
218
|
+
const specweaveDir = path.join(currentDir, ".specweave");
|
|
219
|
+
try {
|
|
220
|
+
await fs.access(specweaveDir);
|
|
221
|
+
return currentDir;
|
|
222
|
+
} catch {
|
|
223
|
+
const parentDir = path.dirname(currentDir);
|
|
224
|
+
if (parentDir === currentDir) {
|
|
225
|
+
throw new Error(".specweave directory not found");
|
|
226
|
+
}
|
|
227
|
+
currentDir = parentDir;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
187
231
|
function escapeHtml(text) {
|
|
188
232
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
189
233
|
}
|
|
@@ -20,8 +20,9 @@ import {
|
|
|
20
20
|
ContentSyncResult,
|
|
21
21
|
} from '../../../src/core/spec-content-sync.js';
|
|
22
22
|
import { SyncProfile } from '../../../src/core/types/sync-profile.js';
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import { SpecIncrementMapper, TaskInfo } from '../../../src/core/sync/spec-increment-mapper.js';
|
|
24
|
+
import * as path from 'path';
|
|
25
|
+
import * as fs from 'fs/promises';
|
|
25
26
|
|
|
26
27
|
export interface AdoContentSyncOptions {
|
|
27
28
|
specPath: string;
|
|
@@ -91,9 +92,12 @@ async function createAdoFeature(
|
|
|
91
92
|
const { specPath, dryRun, verbose } = options;
|
|
92
93
|
|
|
93
94
|
try {
|
|
95
|
+
// Get task mappings (if available)
|
|
96
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
97
|
+
|
|
94
98
|
// Build feature title and description
|
|
95
99
|
const title = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
96
|
-
const description = buildAdoDescription(spec);
|
|
100
|
+
const description = buildAdoDescription(spec, tasks);
|
|
97
101
|
|
|
98
102
|
if (verbose) {
|
|
99
103
|
console.log(`\n📝 Creating ADO feature:`);
|
|
@@ -196,9 +200,12 @@ async function updateAdoFeature(
|
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
|
|
203
|
+
// Get task mappings (if available)
|
|
204
|
+
const tasks = await getTaskMappings(specPath, spec.id);
|
|
205
|
+
|
|
199
206
|
// Build updated content
|
|
200
207
|
const newTitle = `[${spec.id.toUpperCase()}] ${spec.title}`;
|
|
201
|
-
const newDescription = buildAdoDescription(spec);
|
|
208
|
+
const newDescription = buildAdoDescription(spec, tasks);
|
|
202
209
|
|
|
203
210
|
if (dryRun) {
|
|
204
211
|
console.log('\n🔍 Dry run - would update feature:');
|
|
@@ -242,10 +249,10 @@ async function updateAdoFeature(
|
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
/**
|
|
245
|
-
* Build ADO description from spec content
|
|
252
|
+
* Build ADO description from spec content with optional task mappings
|
|
246
253
|
* ADO supports HTML in description
|
|
247
254
|
*/
|
|
248
|
-
function buildAdoDescription(spec: SpecContent): string {
|
|
255
|
+
function buildAdoDescription(spec: SpecContent, tasks?: TaskInfo[]): string {
|
|
249
256
|
let html = '';
|
|
250
257
|
|
|
251
258
|
// Add spec description
|
|
@@ -271,6 +278,20 @@ function buildAdoDescription(spec: SpecContent): string {
|
|
|
271
278
|
}
|
|
272
279
|
}
|
|
273
280
|
|
|
281
|
+
// Add task mappings (if provided)
|
|
282
|
+
if (tasks && tasks.length > 0) {
|
|
283
|
+
html += '<h2>Implementation Tasks</h2>';
|
|
284
|
+
html += '<ul>';
|
|
285
|
+
for (const task of tasks) {
|
|
286
|
+
html += `<li><strong>${task.id}</strong>: ${escapeHtml(task.title)}`;
|
|
287
|
+
if (task.userStories && task.userStories.length > 0) {
|
|
288
|
+
html += ` (${task.userStories.join(', ')})`;
|
|
289
|
+
}
|
|
290
|
+
html += '</li>';
|
|
291
|
+
}
|
|
292
|
+
html += '</ul>';
|
|
293
|
+
}
|
|
294
|
+
|
|
274
295
|
// Add metadata
|
|
275
296
|
if (spec.metadata.priority) {
|
|
276
297
|
html += `<p><strong>Priority:</strong> ${spec.metadata.priority}</p>`;
|
|
@@ -279,6 +300,51 @@ function buildAdoDescription(spec: SpecContent): string {
|
|
|
279
300
|
return html;
|
|
280
301
|
}
|
|
281
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Get task mappings for a spec (if available)
|
|
305
|
+
*/
|
|
306
|
+
async function getTaskMappings(specPath: string, specId: string): Promise<TaskInfo[] | undefined> {
|
|
307
|
+
try {
|
|
308
|
+
// Find SpecWeave root
|
|
309
|
+
const rootDir = await findSpecWeaveRoot(specPath);
|
|
310
|
+
|
|
311
|
+
// Use SpecIncrementMapper to get task mappings
|
|
312
|
+
const mapper = new SpecIncrementMapper(rootDir);
|
|
313
|
+
const mapping = await mapper.mapSpecToIncrements(specId);
|
|
314
|
+
|
|
315
|
+
if (mapping.increments.length > 0) {
|
|
316
|
+
// Return tasks from the first (most recent) increment
|
|
317
|
+
return mapping.increments[0].tasks;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return undefined;
|
|
321
|
+
} catch (error) {
|
|
322
|
+
// If mapping fails, just return undefined (not critical)
|
|
323
|
+
return undefined;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Find SpecWeave root directory from spec path
|
|
329
|
+
*/
|
|
330
|
+
async function findSpecWeaveRoot(specPath: string): Promise<string> {
|
|
331
|
+
let currentDir = path.dirname(specPath);
|
|
332
|
+
|
|
333
|
+
while (true) {
|
|
334
|
+
const specweaveDir = path.join(currentDir, '.specweave');
|
|
335
|
+
try {
|
|
336
|
+
await fs.access(specweaveDir);
|
|
337
|
+
return currentDir;
|
|
338
|
+
} catch {
|
|
339
|
+
const parentDir = path.dirname(currentDir);
|
|
340
|
+
if (parentDir === currentDir) {
|
|
341
|
+
throw new Error('.specweave directory not found');
|
|
342
|
+
}
|
|
343
|
+
currentDir = parentDir;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
282
348
|
/**
|
|
283
349
|
* Escape HTML special characters
|
|
284
350
|
*/
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { AdoClientV2 } from "./ado-client-v2.js";
|
|
2
|
+
import { EnhancedContentBuilder } from "../../../src/core/sync/enhanced-content-builder.js";
|
|
3
|
+
import { SpecIncrementMapper } from "../../../src/core/sync/spec-increment-mapper.js";
|
|
4
|
+
import { parseSpecContent } from "../../../src/core/spec-content-sync.js";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import fs from "fs/promises";
|
|
7
|
+
async function syncSpecToAdoWithEnhancedContent(options) {
|
|
8
|
+
const { specPath, organization, project, dryRun = false, verbose = false } = options;
|
|
9
|
+
try {
|
|
10
|
+
const baseSpec = await parseSpecContent(specPath);
|
|
11
|
+
if (!baseSpec) {
|
|
12
|
+
return {
|
|
13
|
+
success: false,
|
|
14
|
+
action: "error",
|
|
15
|
+
error: "Failed to parse spec content"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
if (verbose) {
|
|
19
|
+
console.log(`\u{1F4C4} Parsed spec: ${baseSpec.identifier.compact}`);
|
|
20
|
+
}
|
|
21
|
+
const specId = baseSpec.identifier.full || baseSpec.identifier.compact;
|
|
22
|
+
const rootDir = await findSpecWeaveRoot(specPath);
|
|
23
|
+
const mapper = new SpecIncrementMapper(rootDir);
|
|
24
|
+
const mapping = await mapper.mapSpecToIncrements(specId);
|
|
25
|
+
if (verbose) {
|
|
26
|
+
console.log(`\u{1F517} Found ${mapping.increments.length} related increments`);
|
|
27
|
+
}
|
|
28
|
+
const taskMapping = buildTaskMapping(mapping.increments, organization, project);
|
|
29
|
+
const architectureDocs = await findArchitectureDocs(rootDir, specId);
|
|
30
|
+
const enhancedSpec = {
|
|
31
|
+
...baseSpec,
|
|
32
|
+
summary: baseSpec.description,
|
|
33
|
+
taskMapping,
|
|
34
|
+
architectureDocs
|
|
35
|
+
};
|
|
36
|
+
const builder = new EnhancedContentBuilder();
|
|
37
|
+
const description = builder.buildExternalDescription(enhancedSpec);
|
|
38
|
+
if (verbose) {
|
|
39
|
+
console.log(`\u{1F4DD} Generated description: ${description.length} characters`);
|
|
40
|
+
}
|
|
41
|
+
if (dryRun) {
|
|
42
|
+
console.log("\u{1F50D} DRY RUN - Would create/update feature with:");
|
|
43
|
+
console.log(` Title: ${baseSpec.title}`);
|
|
44
|
+
console.log(` Description length: ${description.length}`);
|
|
45
|
+
return {
|
|
46
|
+
success: true,
|
|
47
|
+
action: "no-change",
|
|
48
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (!organization || !project) {
|
|
52
|
+
return {
|
|
53
|
+
success: false,
|
|
54
|
+
action: "error",
|
|
55
|
+
error: "Azure DevOps organization/project not specified"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const profile = {
|
|
59
|
+
provider: "ado",
|
|
60
|
+
displayName: `${organization}/${project}`,
|
|
61
|
+
config: {
|
|
62
|
+
organization,
|
|
63
|
+
project
|
|
64
|
+
},
|
|
65
|
+
timeRange: { default: "1M", max: "6M" }
|
|
66
|
+
};
|
|
67
|
+
const pat = process.env.AZURE_DEVOPS_PAT || "";
|
|
68
|
+
const client = new AdoClientV2(profile, pat);
|
|
69
|
+
const existingFeature = await findExistingFeature(client, baseSpec.identifier.compact);
|
|
70
|
+
let result;
|
|
71
|
+
if (existingFeature) {
|
|
72
|
+
await client.updateWorkItem(existingFeature.id, {
|
|
73
|
+
title: `[${baseSpec.identifier.compact}] ${baseSpec.title}`,
|
|
74
|
+
description
|
|
75
|
+
});
|
|
76
|
+
result = {
|
|
77
|
+
success: true,
|
|
78
|
+
action: "updated",
|
|
79
|
+
featureId: existingFeature.id,
|
|
80
|
+
featureUrl: `https://dev.azure.com/${organization}/${project}/_workitems/edit/${existingFeature.id}`,
|
|
81
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
82
|
+
};
|
|
83
|
+
} else {
|
|
84
|
+
const feature = await client.createEpic({
|
|
85
|
+
title: `[${baseSpec.identifier.compact}] ${baseSpec.title}`,
|
|
86
|
+
description,
|
|
87
|
+
tags: ["spec", "external-tool-sync"]
|
|
88
|
+
});
|
|
89
|
+
result = {
|
|
90
|
+
success: true,
|
|
91
|
+
action: "created",
|
|
92
|
+
featureId: feature.id,
|
|
93
|
+
featureUrl: `https://dev.azure.com/${organization}/${project}/_workitems/edit/${feature.id}`,
|
|
94
|
+
tasksLinked: taskMapping?.tasks.length || 0
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
if (verbose) {
|
|
98
|
+
console.log(`\u2705 ${result.action === "created" ? "Created" : "Updated"} feature #${result.featureId}`);
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
101
|
+
} catch (error) {
|
|
102
|
+
return {
|
|
103
|
+
success: false,
|
|
104
|
+
action: "error",
|
|
105
|
+
error: error.message
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async function findSpecWeaveRoot(specPath) {
|
|
110
|
+
let currentDir = path.dirname(specPath);
|
|
111
|
+
while (true) {
|
|
112
|
+
const specweaveDir = path.join(currentDir, ".specweave");
|
|
113
|
+
try {
|
|
114
|
+
await fs.access(specweaveDir);
|
|
115
|
+
return currentDir;
|
|
116
|
+
} catch {
|
|
117
|
+
const parentDir = path.dirname(currentDir);
|
|
118
|
+
if (parentDir === currentDir) {
|
|
119
|
+
throw new Error(".specweave directory not found");
|
|
120
|
+
}
|
|
121
|
+
currentDir = parentDir;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function buildTaskMapping(increments, organization, project) {
|
|
126
|
+
if (increments.length === 0) return void 0;
|
|
127
|
+
const firstIncrement = increments[0];
|
|
128
|
+
const tasks = firstIncrement.tasks.map((task) => ({
|
|
129
|
+
id: task.id,
|
|
130
|
+
title: task.title,
|
|
131
|
+
userStories: task.userStories
|
|
132
|
+
}));
|
|
133
|
+
return {
|
|
134
|
+
incrementId: firstIncrement.id,
|
|
135
|
+
tasks,
|
|
136
|
+
tasksUrl: `https://dev.azure.com/${organization}/${project}/_git/repo?path=/.specweave/increments/${firstIncrement.id}/tasks.md`
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
async function findArchitectureDocs(rootDir, specId) {
|
|
140
|
+
const docs = [];
|
|
141
|
+
const archDir = path.join(rootDir, ".specweave/docs/internal/architecture");
|
|
142
|
+
try {
|
|
143
|
+
const adrDir = path.join(archDir, "adr");
|
|
144
|
+
try {
|
|
145
|
+
const adrs = await fs.readdir(adrDir);
|
|
146
|
+
const relatedAdrs = adrs.filter((file) => file.includes(specId.replace("spec-", "")));
|
|
147
|
+
for (const adr of relatedAdrs) {
|
|
148
|
+
docs.push({
|
|
149
|
+
type: "adr",
|
|
150
|
+
path: path.join(adrDir, adr),
|
|
151
|
+
title: adr.replace(".md", "").replace(/-/g, " ")
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
} catch {
|
|
155
|
+
}
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
158
|
+
return docs;
|
|
159
|
+
}
|
|
160
|
+
async function findExistingFeature(client, specId) {
|
|
161
|
+
try {
|
|
162
|
+
const features = await client.queryWorkItems(`[System.Title] Contains '[${specId}]' AND [System.WorkItemType] = 'Feature'`);
|
|
163
|
+
return features[0] || null;
|
|
164
|
+
} catch {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
syncSpecToAdoWithEnhancedContent
|
|
170
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "specweave-confluent",
|
|
3
|
+
"description": "Confluent Cloud integration for SpecWeave - Schema Registry, ksqlDB, Kafka Connect, Flink, stream processing, and enterprise Kafka features",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "SpecWeave Team",
|
|
7
|
+
"url": "https://spec-weave.com"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/anton-abyzov/specweave",
|
|
10
|
+
"homepage": "https://spec-weave.com/docs/plugins/confluent",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"kafka",
|
|
14
|
+
"confluent",
|
|
15
|
+
"schema-registry",
|
|
16
|
+
"ksqldb",
|
|
17
|
+
"kafka-connect",
|
|
18
|
+
"flink",
|
|
19
|
+
"stream-processing",
|
|
20
|
+
"avro",
|
|
21
|
+
"protobuf"
|
|
22
|
+
]
|
|
23
|
+
}
|