specweave 0.4.1 → 0.6.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-plugin/README.md +325 -0
- package/.claude-plugin/marketplace.json +210 -0
- package/CLAUDE.md +871 -596
- package/README.md +188 -137
- package/bin/install-agents.sh +1 -1
- package/bin/install-commands.sh +66 -14
- package/bin/install-hooks.sh +1 -1
- package/bin/install-skills.sh +1 -1
- package/bin/specweave.js +2 -0
- package/dist/adapters/claude/adapter.d.ts +49 -11
- package/dist/adapters/claude/adapter.d.ts.map +1 -1
- package/dist/adapters/claude/adapter.js +175 -42
- package/dist/adapters/claude/adapter.js.map +1 -1
- package/dist/adapters/copilot/adapter.d.ts +20 -2
- package/dist/adapters/copilot/adapter.d.ts.map +1 -1
- package/dist/adapters/copilot/adapter.js +117 -7
- package/dist/adapters/copilot/adapter.js.map +1 -1
- package/dist/adapters/cursor/adapter.d.ts +18 -0
- package/dist/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/adapters/cursor/adapter.js +55 -3
- package/dist/adapters/cursor/adapter.js.map +1 -1
- package/dist/adapters/generic/adapter.d.ts +18 -0
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +55 -3
- package/dist/adapters/generic/adapter.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +346 -124
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +2 -0
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +28 -25
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +26 -24
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts +7 -1
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +72 -61
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/core/i18n/language-detector.d.ts +29 -0
- package/dist/core/i18n/language-detector.d.ts.map +1 -0
- package/dist/core/i18n/language-detector.js +143 -0
- package/dist/core/i18n/language-detector.js.map +1 -0
- package/dist/core/i18n/language-manager.d.ts +101 -0
- package/dist/core/i18n/language-manager.d.ts.map +1 -0
- package/dist/core/i18n/language-manager.js +232 -0
- package/dist/core/i18n/language-manager.js.map +1 -0
- package/dist/core/i18n/language-registry.d.ts +44 -0
- package/dist/core/i18n/language-registry.d.ts.map +1 -0
- package/dist/core/i18n/language-registry.js +234 -0
- package/dist/core/i18n/language-registry.js.map +1 -0
- package/dist/core/i18n/locale-manager.d.ts +62 -0
- package/dist/core/i18n/locale-manager.d.ts.map +1 -0
- package/dist/core/i18n/locale-manager.js +137 -0
- package/dist/core/i18n/locale-manager.js.map +1 -0
- package/dist/core/i18n/system-prompt-injector.d.ts +33 -0
- package/dist/core/i18n/system-prompt-injector.d.ts.map +1 -0
- package/dist/core/i18n/system-prompt-injector.js +131 -0
- package/dist/core/i18n/system-prompt-injector.js.map +1 -0
- package/dist/core/i18n/types.d.ts +151 -0
- package/dist/core/i18n/types.d.ts.map +1 -0
- package/dist/core/i18n/types.js +11 -0
- package/dist/core/i18n/types.js.map +1 -0
- package/dist/core/increment-status.d.ts +72 -0
- package/dist/core/increment-status.d.ts.map +1 -0
- package/dist/core/increment-status.js +227 -0
- package/dist/core/increment-status.js.map +1 -0
- package/dist/core/plugin-loader.d.ts +33 -13
- package/dist/core/plugin-loader.d.ts.map +1 -1
- package/dist/core/plugin-loader.js +145 -43
- package/dist/core/plugin-loader.js.map +1 -1
- package/dist/core/types/config.d.ts +51 -0
- package/dist/core/types/config.d.ts.map +1 -0
- package/dist/core/types/config.js +21 -0
- package/dist/core/types/config.js.map +1 -0
- package/dist/core/types/plugin.d.ts +73 -42
- package/dist/core/types/plugin.d.ts.map +1 -1
- package/dist/core/types/plugin.js +4 -3
- package/dist/core/types/plugin.js.map +1 -1
- package/dist/hooks/lib/sync-living-docs.d.ts +27 -0
- package/dist/hooks/lib/sync-living-docs.d.ts.map +1 -0
- package/dist/hooks/lib/sync-living-docs.js +116 -0
- package/dist/hooks/lib/sync-living-docs.js.map +1 -0
- package/dist/hooks/lib/translate-living-docs.d.ts +13 -0
- package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -0
- package/dist/hooks/lib/translate-living-docs.js +166 -0
- package/dist/hooks/lib/translate-living-docs.js.map +1 -0
- package/dist/hooks/lib/update-tasks-md.d.ts +29 -0
- package/dist/hooks/lib/update-tasks-md.d.ts.map +1 -0
- package/dist/hooks/lib/update-tasks-md.js +203 -0
- package/dist/hooks/lib/update-tasks-md.js.map +1 -0
- package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -1
- package/dist/integrations/jira/jira-mapper.js.map +1 -1
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +269 -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-github/lib/github-client.d.ts +86 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.js +275 -0
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
- package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/index.js +10 -0
- package/dist/plugins/specweave-github/lib/index.js.map +1 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
- package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
- package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/types.js +5 -0
- package/dist/plugins/specweave-github/lib/types.js.map +1 -0
- package/dist/utils/agents-md-compiler.d.ts +68 -0
- package/dist/utils/agents-md-compiler.d.ts.map +1 -0
- package/dist/utils/agents-md-compiler.js +420 -0
- package/dist/utils/agents-md-compiler.js.map +1 -0
- package/dist/utils/generate-skills-index.js +4 -4
- package/dist/utils/generate-skills-index.js.map +1 -1
- package/package.json +12 -13
- package/plugins/specweave-ado/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +626 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +208 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +1010 -0
- package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-core/.claude-plugin/plugin.json +25 -0
- package/{src → plugins/specweave-core}/agents/pm/AGENT.md +80 -0
- package/plugins/specweave-core/agents/translator/AGENT.md +282 -0
- package/{src → plugins/specweave-core}/commands/README.md +11 -11
- package/{src → plugins/specweave-core}/commands/specweave.costs.md +7 -7
- package/{src → plugins/specweave-core}/commands/specweave.do.md +34 -7
- package/{src → plugins/specweave-core}/commands/specweave.increment.md +83 -18
- package/{src → plugins/specweave-core}/commands/specweave.md +49 -17
- package/{src → plugins/specweave-core}/commands/specweave.sync-docs.md +5 -5
- package/plugins/specweave-core/commands/specweave.translate.md +425 -0
- package/{src → plugins/specweave-core}/commands/specweave.validate.md +1 -1
- package/plugins/specweave-core/hooks/hooks.json +13 -0
- package/plugins/specweave-core/hooks/post-task-completion.sh +265 -0
- package/plugins/specweave-core/skills/SKILLS-INDEX.md +229 -0
- package/{src → plugins/specweave-core}/skills/brownfield-analyzer/SKILL.md +66 -24
- package/{src → plugins/specweave-core}/skills/context-loader/SKILL.md +1 -1
- package/plugins/specweave-core/skills/context-optimizer/SKILL.md +588 -0
- package/plugins/specweave-core/skills/docs-updater/SKILL.md +0 -0
- package/{src → plugins/specweave-core}/skills/increment-planner/SKILL.md +81 -4
- package/plugins/specweave-core/skills/plugin-detector/SKILL.md +211 -0
- package/{src → plugins/specweave-core}/skills/project-kickstarter/SKILL.md +7 -7
- package/plugins/specweave-core/skills/rfc-generator/SKILL.md +369 -0
- package/{src → plugins/specweave-core}/skills/specweave-detector/SKILL.md +2 -2
- package/plugins/specweave-core/skills/specweave-framework/SKILL.md +498 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
- package/{src → plugins/specweave-core}/skills/tdd-workflow/SKILL.md +20 -20
- package/plugins/specweave-core/skills/translator/SKILL.md +172 -0
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-docs/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +526 -0
- package/plugins/specweave-figma/.claude-plugin/.mcp.json +12 -0
- package/plugins/specweave-figma/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-figma/ARCHITECTURE.md +453 -0
- package/plugins/specweave-figma/README.md +728 -0
- package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +632 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +29 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +27 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +28 -0
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +651 -0
- package/plugins/specweave-github/commands/github-close-issue.md +418 -0
- package/plugins/specweave-github/commands/github-create-issue.md +307 -0
- package/plugins/specweave-github/commands/github-status.md +533 -0
- package/plugins/specweave-github/commands/github-sync-tasks.md +530 -0
- package/plugins/specweave-github/commands/github-sync.md +443 -0
- package/plugins/specweave-github/lib/github-client.ts +330 -0
- package/plugins/specweave-github/lib/index.ts +10 -0
- package/plugins/specweave-github/lib/subtask-sync.ts +225 -0
- package/plugins/specweave-github/lib/task-parser.ts +246 -0
- package/plugins/specweave-github/lib/task-sync.ts +402 -0
- package/plugins/specweave-github/lib/types.ts +86 -0
- package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +497 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +461 -0
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-jira/.claude-plugin/plugin.json +8 -0
- package/{src → plugins/specweave-jira}/commands/specweave.sync-jira.md +18 -18
- package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-ml/.claude-plugin/plugin.json +39 -0
- package/plugins/specweave-ml/README.md +885 -0
- package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +402 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +116 -0
- package/plugins/specweave-ml/commands/ml-evaluate.md +87 -0
- package/plugins/specweave-ml/commands/ml-explain.md +83 -0
- package/plugins/specweave-ml/skills/anomaly-detector/SKILL.md +559 -0
- package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +485 -0
- package/plugins/specweave-ml/skills/cv-pipeline-builder/SKILL.md +157 -0
- package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +521 -0
- package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +535 -0
- package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +566 -0
- package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +345 -0
- package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +518 -0
- package/plugins/specweave-ml/skills/model-evaluator/SKILL.md +155 -0
- package/plugins/specweave-ml/skills/model-explainer/SKILL.md +227 -0
- package/plugins/specweave-ml/skills/model-registry/SKILL.md +541 -0
- package/plugins/specweave-ml/skills/nlp-pipeline-builder/SKILL.md +180 -0
- package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +569 -0
- package/plugins/specweave-payments/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-ui/.claude-plugin/plugin.json +106 -0
- package/plugins/specweave-ui/.mcp.json +14 -0
- package/plugins/specweave-ui/README.md +386 -0
- package/src/adapters/claude/adapter.ts +193 -46
- package/src/adapters/copilot/adapter.ts +132 -7
- package/src/adapters/cursor/adapter.ts +62 -3
- package/src/adapters/generic/adapter.ts +62 -3
- package/src/templates/AGENTS.md.template +170 -1
- package/src/templates/CLAUDE.md.template +122 -24
- package/src/templates/tasks.md.template +261 -0
- package/src/agents/ml-engineer/AGENT.md +0 -150
- package/src/commands/specweave.sync-github.md +0 -269
- package/src/hooks/post-task-completion.sh +0 -121
- package/src/skills/SKILLS-INDEX.md +0 -444
- package/src/skills/github-sync/SKILL.md +0 -234
- /package/{src → plugins/specweave-ado}/skills/ado-sync/README.md +0 -0
- /package/{src → plugins/specweave-ado}/skills/ado-sync/SKILL.md +0 -0
- /package/{src → plugins/specweave-ado}/skills/specweave-ado-mapper/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/agents/database-optimizer/AGENT.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/dotnet-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/nodejs-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/python-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/agents/architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/code-reviewer.md +0 -0
- /package/{src → plugins/specweave-core}/agents/docs-writer/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/performance/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/qa-lead/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/security/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/tdd-orchestrator/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/tech-lead/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.done.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.inc.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.list-increments.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.next.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.progress.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-cycle.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-green.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-red.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-refactor.md +0 -0
- /package/{src → plugins/specweave-core}/hooks/README.md +0 -0
- /package/{src → plugins/specweave-core}/hooks/docs-changed.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/human-input-required.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/post-increment-plugin-detect.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/pre-implementation.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/pre-task-plugin-detect.sh +0 -0
- /package/{src → plugins/specweave-core}/skills/brownfield-onboarder/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/docs-updater/README.md +0 -0
- /package/{src → plugins/specweave-core}/skills/increment-planner/scripts/feature-utils.js +0 -0
- /package/{src → plugins/specweave-core}/skills/increment-quality-judge/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/role-orchestrator/README.md +0 -0
- /package/{src → plugins/specweave-core}/skills/role-orchestrator/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/task-builder/README.md +0 -0
- /package/{src → plugins/specweave-cost-optimizer}/skills/cost-optimizer/SKILL.md +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-component-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-container-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-context-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/deployment-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/er-diagram-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/sequence-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-2-sequence.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/skills/diagrams-architect/SKILL.md +0 -0
- /package/{src → plugins/specweave-diagrams}/skills/diagrams-generator/SKILL.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/README.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/SKILL.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/README.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/design-system-architect/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/frontend/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/nextjs/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/devops/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/network-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/observability-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/performance-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/backend-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/database-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/infrastructure.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/monitoring.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/security-incidents.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/ui-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/01-high-cpu-usage.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/02-database-deadlock.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/03-memory-leak.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/04-slow-api-response.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/05-ddos-attack.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/06-disk-full.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/07-service-down.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/08-data-corruption.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/09-cascade-failure.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/10-rate-limit-exceeded.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/health-check.sh +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/log-analyzer.py +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/metrics-collector.sh +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/trace-analyzer.js +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/incident-report.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/mitigation-plan.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/post-mortem.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/runbook-template.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/commands/specweave.monitor-setup.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/commands/specweave.slo-implement.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/distributed-tracing/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/grafana-dashboards/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/README.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/prometheus-configuration/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/slo-implementation/SKILL.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/jira-sync/README.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/jira-sync/SKILL.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/specweave-jira-mapper/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/agents/kubernetes-architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/argocd-setup.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/sync-policies.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/references/chart-structure.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/configmap-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/deployment-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/service-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/deployment-spec.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/service-spec.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/assets/network-policy-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/references/rbac-patterns.md +0 -0
- /package/{src → plugins/specweave-ml}/agents/data-scientist/AGENT.md +0 -0
- /package/{src → plugins/specweave-ml}/agents/mlops-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-ml}/commands/specweave.ml-pipeline.md +0 -0
- /package/{src → plugins/specweave-ml}/skills/ml-pipeline-workflow/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/agents/payment-integration/AGENT.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/billing-automation/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/paypal-integration/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/pci-compliance/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/stripe-integration/SKILL.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/README.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/SKILL.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/execute.js +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/lib/utils.js +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/package.json +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/LICENSE.txt +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/SKILL.md +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/init_skill.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/package_skill.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/quick_validate.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-router/SKILL.md +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub CLI wrapper for SpecWeave
|
|
3
|
+
* Uses `gh` command for GitHub API operations
|
|
4
|
+
*/
|
|
5
|
+
import { GitHubIssue, GitHubMilestone } from './types';
|
|
6
|
+
export declare class GitHubClient {
|
|
7
|
+
private repo;
|
|
8
|
+
constructor(repo?: string);
|
|
9
|
+
/**
|
|
10
|
+
* Auto-detect GitHub repository from git remote
|
|
11
|
+
*/
|
|
12
|
+
private detectRepo;
|
|
13
|
+
/**
|
|
14
|
+
* Check if GitHub CLI is installed and authenticated
|
|
15
|
+
*/
|
|
16
|
+
static checkGitHubCLI(): {
|
|
17
|
+
installed: boolean;
|
|
18
|
+
authenticated: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Create or get existing milestone
|
|
23
|
+
*
|
|
24
|
+
* @param title Milestone title
|
|
25
|
+
* @param description Milestone description
|
|
26
|
+
* @param daysFromNow Days until milestone due (default: 2 days - SpecWeave AI velocity)
|
|
27
|
+
*/
|
|
28
|
+
createOrGetMilestone(title: string, description?: string, daysFromNow?: number): Promise<GitHubMilestone>;
|
|
29
|
+
/**
|
|
30
|
+
* Get milestone by title
|
|
31
|
+
*/
|
|
32
|
+
private getMilestoneByTitle;
|
|
33
|
+
/**
|
|
34
|
+
* Create epic issue (increment-level)
|
|
35
|
+
*/
|
|
36
|
+
createEpicIssue(title: string, body: string, milestone?: number | string, labels?: string[]): Promise<GitHubIssue>;
|
|
37
|
+
/**
|
|
38
|
+
* Create task issue (linked to epic)
|
|
39
|
+
*/
|
|
40
|
+
createTaskIssue(title: string, body: string, epicNumber: number, milestone?: number | string, labels?: string[]): Promise<GitHubIssue>;
|
|
41
|
+
/**
|
|
42
|
+
* Update issue body
|
|
43
|
+
*/
|
|
44
|
+
updateIssueBody(issueNumber: number, newBody: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Get issue details
|
|
47
|
+
*/
|
|
48
|
+
getIssue(issueNumber: number): Promise<GitHubIssue>;
|
|
49
|
+
/**
|
|
50
|
+
* Close issue
|
|
51
|
+
*/
|
|
52
|
+
closeIssue(issueNumber: number, comment?: string): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Add comment to issue
|
|
55
|
+
*/
|
|
56
|
+
addComment(issueNumber: number, comment: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Add labels to issue
|
|
59
|
+
*/
|
|
60
|
+
addLabels(issueNumber: number, labels: string[]): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Check rate limit status
|
|
63
|
+
*/
|
|
64
|
+
checkRateLimit(): Promise<{
|
|
65
|
+
remaining: number;
|
|
66
|
+
limit: number;
|
|
67
|
+
reset: Date;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Escape quotes in strings for shell commands
|
|
71
|
+
*/
|
|
72
|
+
private escapeQuotes;
|
|
73
|
+
/**
|
|
74
|
+
* Batch create issues with rate limit handling
|
|
75
|
+
*/
|
|
76
|
+
batchCreateIssues(issues: Array<{
|
|
77
|
+
title: string;
|
|
78
|
+
body: string;
|
|
79
|
+
labels?: string[];
|
|
80
|
+
}>, milestone?: number | string, epicNumber?: number, options?: {
|
|
81
|
+
batchSize?: number;
|
|
82
|
+
delayMs?: number;
|
|
83
|
+
}): Promise<GitHubIssue[]>;
|
|
84
|
+
private sleep;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=github-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-client.d.ts","sourceRoot":"","sources":["../../../../src/plugins/specweave-github/lib/github-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvD,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAS;gBAET,IAAI,CAAC,EAAE,MAAM;IAKzB;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;IAevF;;;;;;OAMG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,GAAE,MAAU,GACtB,OAAO,CAAC,eAAe,CAAC;IAuB3B;;OAEG;YACW,mBAAmB;IAUjC;;OAEG;IACG,eAAe,CACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAC3B,MAAM,GAAE,MAAM,EAAO,GACpB,OAAO,CAAC,WAAW,CAAC;IAgCvB;;OAEG;IACG,eAAe,CACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAC3B,MAAM,GAAE,MAAM,EAAO,GACpB,OAAO,CAAC,WAAW,CAAC;IAmCvB;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU1E;;OAEG;IACG,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAezD;;OAEG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IActE;;OAEG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrE;;OAEG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAarE;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,CAAC;IAelF;;OAEG;IACH,OAAO,CAAC,YAAY;IAQpB;;OAEG;IACG,iBAAiB,CACrB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,EACjE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAC3B,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO,GACrD,OAAO,CAAC,WAAW,EAAE,CAAC;IA+BzB,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub CLI wrapper for SpecWeave
|
|
3
|
+
* Uses `gh` command for GitHub API operations
|
|
4
|
+
*/
|
|
5
|
+
import { execSync } from 'child_process';
|
|
6
|
+
export class GitHubClient {
|
|
7
|
+
constructor(repo) {
|
|
8
|
+
// Auto-detect repo from git remote if not provided
|
|
9
|
+
this.repo = repo || this.detectRepo();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Auto-detect GitHub repository from git remote
|
|
13
|
+
*/
|
|
14
|
+
detectRepo() {
|
|
15
|
+
try {
|
|
16
|
+
const remote = execSync('git remote get-url origin', { encoding: 'utf-8' }).trim();
|
|
17
|
+
const match = remote.match(/github\.com[:/](.+\/.+?)(?:\.git)?$/);
|
|
18
|
+
if (!match) {
|
|
19
|
+
throw new Error('Could not detect GitHub repository from git remote');
|
|
20
|
+
}
|
|
21
|
+
return match[1];
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
throw new Error('Not a git repository or no GitHub remote configured');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if GitHub CLI is installed and authenticated
|
|
29
|
+
*/
|
|
30
|
+
static checkGitHubCLI() {
|
|
31
|
+
try {
|
|
32
|
+
execSync('gh --version', { encoding: 'utf-8', stdio: 'pipe' });
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return { installed: false, authenticated: false, error: 'GitHub CLI (gh) not installed' };
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
execSync('gh auth status', { encoding: 'utf-8', stdio: 'pipe' });
|
|
39
|
+
return { installed: true, authenticated: true };
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return { installed: true, authenticated: false, error: 'GitHub CLI not authenticated. Run: gh auth login' };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create or get existing milestone
|
|
47
|
+
*
|
|
48
|
+
* @param title Milestone title
|
|
49
|
+
* @param description Milestone description
|
|
50
|
+
* @param daysFromNow Days until milestone due (default: 2 days - SpecWeave AI velocity)
|
|
51
|
+
*/
|
|
52
|
+
async createOrGetMilestone(title, description, daysFromNow = 2) {
|
|
53
|
+
// Check if milestone already exists
|
|
54
|
+
const existing = await this.getMilestoneByTitle(title);
|
|
55
|
+
if (existing) {
|
|
56
|
+
return existing;
|
|
57
|
+
}
|
|
58
|
+
// Calculate due date (SpecWeave default: 1-2 days with AI assistance)
|
|
59
|
+
const dueDate = new Date();
|
|
60
|
+
dueDate.setDate(dueDate.getDate() + daysFromNow);
|
|
61
|
+
const dueDateISO = dueDate.toISOString();
|
|
62
|
+
// Create new milestone with due date
|
|
63
|
+
const cmd = `gh api repos/${this.repo}/milestones -f title="${title}" ${description ? `-f description="${description}"` : ''} -f due_on="${dueDateISO}" --jq '{number: .number, title: .title, description: .description, state: .state, due_on: .due_on}'`;
|
|
64
|
+
try {
|
|
65
|
+
const output = execSync(cmd, { encoding: 'utf-8' });
|
|
66
|
+
return JSON.parse(output);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
throw new Error(`Failed to create milestone: ${error.message}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get milestone by title
|
|
74
|
+
*/
|
|
75
|
+
async getMilestoneByTitle(title) {
|
|
76
|
+
try {
|
|
77
|
+
const cmd = `gh api repos/${this.repo}/milestones --jq '.[] | select(.title=="${title}") | {number: .number, title: .title, description: .description, state: .state}'`;
|
|
78
|
+
const output = execSync(cmd, { encoding: 'utf-8' }).trim();
|
|
79
|
+
return output ? JSON.parse(output) : null;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Create epic issue (increment-level)
|
|
87
|
+
*/
|
|
88
|
+
async createEpicIssue(title, body, milestone, labels = []) {
|
|
89
|
+
const labelArgs = labels.map(l => `-l "${l}"`).join(' ');
|
|
90
|
+
const milestoneArg = milestone ? `-m "${milestone}"` : '';
|
|
91
|
+
// Create issue (returns URL)
|
|
92
|
+
const createCmd = `gh issue create --repo ${this.repo} --title "${this.escapeQuotes(title)}" --body "${this.escapeQuotes(body)}" ${labelArgs} ${milestoneArg}`;
|
|
93
|
+
try {
|
|
94
|
+
const issueUrl = execSync(createCmd, { encoding: 'utf-8' }).trim();
|
|
95
|
+
// Extract issue number from URL (e.g., https://github.com/owner/repo/issues/123)
|
|
96
|
+
const issueNumber = parseInt(issueUrl.split('/').pop() || '0', 10);
|
|
97
|
+
if (!issueNumber) {
|
|
98
|
+
throw new Error('Failed to extract issue number from URL: ' + issueUrl);
|
|
99
|
+
}
|
|
100
|
+
// Fetch issue details
|
|
101
|
+
const viewCmd = `gh issue view ${issueNumber} --repo ${this.repo} --json number,title,body,state,url,labels,milestone`;
|
|
102
|
+
const output = execSync(viewCmd, { encoding: 'utf-8' });
|
|
103
|
+
const issue = JSON.parse(output);
|
|
104
|
+
return {
|
|
105
|
+
...issue,
|
|
106
|
+
html_url: issue.url,
|
|
107
|
+
labels: issue.labels?.map((l) => l.name) || []
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
throw new Error(`Failed to create epic issue: ${error.message}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Create task issue (linked to epic)
|
|
116
|
+
*/
|
|
117
|
+
async createTaskIssue(title, body, epicNumber, milestone, labels = []) {
|
|
118
|
+
// Add epic reference to body
|
|
119
|
+
const enhancedBody = `**Part of**: #${epicNumber}\n\n${body}`;
|
|
120
|
+
const labelArgs = labels.map(l => `-l "${l}"`).join(' ');
|
|
121
|
+
const milestoneArg = milestone ? `-m "${milestone}"` : '';
|
|
122
|
+
// Create issue (returns URL)
|
|
123
|
+
const createCmd = `gh issue create --repo ${this.repo} --title "${this.escapeQuotes(title)}" --body "${this.escapeQuotes(enhancedBody)}" ${labelArgs} ${milestoneArg}`;
|
|
124
|
+
try {
|
|
125
|
+
const issueUrl = execSync(createCmd, { encoding: 'utf-8' }).trim();
|
|
126
|
+
// Extract issue number from URL
|
|
127
|
+
const issueNumber = parseInt(issueUrl.split('/').pop() || '0', 10);
|
|
128
|
+
if (!issueNumber) {
|
|
129
|
+
throw new Error('Failed to extract issue number from URL: ' + issueUrl);
|
|
130
|
+
}
|
|
131
|
+
// Fetch issue details
|
|
132
|
+
const viewCmd = `gh issue view ${issueNumber} --repo ${this.repo} --json number,title,body,state,url,labels,milestone`;
|
|
133
|
+
const output = execSync(viewCmd, { encoding: 'utf-8' });
|
|
134
|
+
const issue = JSON.parse(output);
|
|
135
|
+
return {
|
|
136
|
+
...issue,
|
|
137
|
+
html_url: issue.url,
|
|
138
|
+
labels: issue.labels?.map((l) => l.name) || []
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
throw new Error(`Failed to create task issue: ${error.message}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Update issue body
|
|
147
|
+
*/
|
|
148
|
+
async updateIssueBody(issueNumber, newBody) {
|
|
149
|
+
const cmd = `gh issue edit ${issueNumber} --repo ${this.repo} --body "${this.escapeQuotes(newBody)}"`;
|
|
150
|
+
try {
|
|
151
|
+
execSync(cmd, { encoding: 'utf-8', stdio: 'pipe' });
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
throw new Error(`Failed to update issue #${issueNumber}: ${error.message}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get issue details
|
|
159
|
+
*/
|
|
160
|
+
async getIssue(issueNumber) {
|
|
161
|
+
const cmd = `gh issue view ${issueNumber} --repo ${this.repo} --json number,title,body,state,html_url,labels,milestone`;
|
|
162
|
+
try {
|
|
163
|
+
const output = execSync(cmd, { encoding: 'utf-8' });
|
|
164
|
+
const issue = JSON.parse(output);
|
|
165
|
+
return {
|
|
166
|
+
...issue,
|
|
167
|
+
labels: issue.labels?.map((l) => l.name) || []
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
throw new Error(`Failed to get issue #${issueNumber}: ${error.message}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Close issue
|
|
176
|
+
*/
|
|
177
|
+
async closeIssue(issueNumber, comment) {
|
|
178
|
+
if (comment) {
|
|
179
|
+
await this.addComment(issueNumber, comment);
|
|
180
|
+
}
|
|
181
|
+
const cmd = `gh issue close ${issueNumber} --repo ${this.repo}`;
|
|
182
|
+
try {
|
|
183
|
+
execSync(cmd, { encoding: 'utf-8', stdio: 'pipe' });
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
throw new Error(`Failed to close issue #${issueNumber}: ${error.message}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Add comment to issue
|
|
191
|
+
*/
|
|
192
|
+
async addComment(issueNumber, comment) {
|
|
193
|
+
const cmd = `gh issue comment ${issueNumber} --repo ${this.repo} --body "${this.escapeQuotes(comment)}"`;
|
|
194
|
+
try {
|
|
195
|
+
execSync(cmd, { encoding: 'utf-8', stdio: 'pipe' });
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
throw new Error(`Failed to add comment to issue #${issueNumber}: ${error.message}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Add labels to issue
|
|
203
|
+
*/
|
|
204
|
+
async addLabels(issueNumber, labels) {
|
|
205
|
+
if (labels.length === 0)
|
|
206
|
+
return;
|
|
207
|
+
const labelArgs = labels.map(l => `"${l}"`).join(',');
|
|
208
|
+
const cmd = `gh issue edit ${issueNumber} --repo ${this.repo} --add-label ${labelArgs}`;
|
|
209
|
+
try {
|
|
210
|
+
execSync(cmd, { encoding: 'utf-8', stdio: 'pipe' });
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
throw new Error(`Failed to add labels to issue #${issueNumber}: ${error.message}`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Check rate limit status
|
|
218
|
+
*/
|
|
219
|
+
async checkRateLimit() {
|
|
220
|
+
const cmd = `gh api rate_limit --jq '.rate | {remaining: .remaining, limit: .limit, reset: .reset}'`;
|
|
221
|
+
try {
|
|
222
|
+
const output = execSync(cmd, { encoding: 'utf-8' });
|
|
223
|
+
const data = JSON.parse(output);
|
|
224
|
+
return {
|
|
225
|
+
...data,
|
|
226
|
+
reset: new Date(data.reset * 1000)
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
throw new Error(`Failed to check rate limit: ${error.message}`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Escape quotes in strings for shell commands
|
|
235
|
+
*/
|
|
236
|
+
escapeQuotes(str) {
|
|
237
|
+
return str
|
|
238
|
+
.replace(/\\/g, '\\\\') // Escape backslashes first
|
|
239
|
+
.replace(/"/g, '\\"') // Escape double quotes
|
|
240
|
+
.replace(/`/g, '\\`') // Escape backticks
|
|
241
|
+
.replace(/\$/g, '\\$'); // Escape dollar signs
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Batch create issues with rate limit handling
|
|
245
|
+
*/
|
|
246
|
+
async batchCreateIssues(issues, milestone, epicNumber, options = {}) {
|
|
247
|
+
const { batchSize = 10, delayMs = 6000 } = options; // 10 issues per minute by default
|
|
248
|
+
const createdIssues = [];
|
|
249
|
+
for (let i = 0; i < issues.length; i += batchSize) {
|
|
250
|
+
const batch = issues.slice(i, i + batchSize);
|
|
251
|
+
console.log(`Creating issues ${i + 1}-${Math.min(i + batchSize, issues.length)} of ${issues.length}...`);
|
|
252
|
+
for (const issue of batch) {
|
|
253
|
+
try {
|
|
254
|
+
const created = epicNumber
|
|
255
|
+
? await this.createTaskIssue(issue.title, issue.body, epicNumber, milestone, issue.labels)
|
|
256
|
+
: await this.createEpicIssue(issue.title, issue.body, milestone, issue.labels);
|
|
257
|
+
createdIssues.push(created);
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
console.error(`Failed to create issue "${issue.title}":`, error.message);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// Delay between batches (except after last batch)
|
|
264
|
+
if (i + batchSize < issues.length) {
|
|
265
|
+
console.log(`Waiting ${delayMs / 1000}s to avoid rate limits...`);
|
|
266
|
+
await this.sleep(delayMs);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return createdIssues;
|
|
270
|
+
}
|
|
271
|
+
sleep(ms) {
|
|
272
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=github-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-client.js","sourceRoot":"","sources":["../../../../src/plugins/specweave-github/lib/github-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,OAAO,YAAY;IAGvB,YAAY,IAAa;QACvB,mDAAmD;QACnD,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACK,UAAU;QAChB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,QAAQ,CAAC,2BAA2B,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YACnF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAClE,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cA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CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpecWeave GitHub Plugin - Library Entry Point
|
|
3
|
+
* Task-level GitHub synchronization
|
|
4
|
+
*/
|
|
5
|
+
export { GitHubClient } from './github-client';
|
|
6
|
+
export { TaskParser } from './task-parser';
|
|
7
|
+
export { TaskSync } from './task-sync';
|
|
8
|
+
export { SubtaskSync } from './subtask-sync';
|
|
9
|
+
export * from './types';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/specweave-github/lib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpecWeave GitHub Plugin - Library Entry Point
|
|
3
|
+
* Task-level GitHub synchronization
|
|
4
|
+
*/
|
|
5
|
+
export { GitHubClient } from './github-client';
|
|
6
|
+
export { TaskParser } from './task-parser';
|
|
7
|
+
export { TaskSync } from './task-sync';
|
|
8
|
+
export { SubtaskSync } from './subtask-sync';
|
|
9
|
+
export * from './types';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/specweave-github/lib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subtask synchronization with GitHub issue checkboxes
|
|
3
|
+
* Updates GitHub issue body when subtasks complete
|
|
4
|
+
*/
|
|
5
|
+
export declare class SubtaskSync {
|
|
6
|
+
private client;
|
|
7
|
+
private incrementPath;
|
|
8
|
+
constructor(incrementPath: string, repo?: string);
|
|
9
|
+
/**
|
|
10
|
+
* Update subtask status in GitHub issue
|
|
11
|
+
*/
|
|
12
|
+
updateSubtaskStatus(taskId: string, subtaskId: string, completed: boolean): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Sync all subtasks for a task
|
|
15
|
+
*/
|
|
16
|
+
syncAllSubtasks(taskId: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Update checkbox in issue body
|
|
19
|
+
*/
|
|
20
|
+
private updateSubtaskCheckbox;
|
|
21
|
+
/**
|
|
22
|
+
* Check if all subtasks are done
|
|
23
|
+
*/
|
|
24
|
+
private areAllSubtasksDone;
|
|
25
|
+
/**
|
|
26
|
+
* Escape special regex characters
|
|
27
|
+
*/
|
|
28
|
+
private escapeRegex;
|
|
29
|
+
/**
|
|
30
|
+
* Post task completion comment to GitHub issue
|
|
31
|
+
*/
|
|
32
|
+
postTaskCompletionComment(taskId: string, stats: {
|
|
33
|
+
filesModified?: number;
|
|
34
|
+
linesAdded?: number;
|
|
35
|
+
linesDeleted?: number;
|
|
36
|
+
testsAdded?: number;
|
|
37
|
+
actualDuration?: string;
|
|
38
|
+
estimatedDuration?: string;
|
|
39
|
+
summary?: string;
|
|
40
|
+
nextTask?: string;
|
|
41
|
+
progress?: {
|
|
42
|
+
completed: number;
|
|
43
|
+
total: number;
|
|
44
|
+
};
|
|
45
|
+
}): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Update epic issue progress
|
|
48
|
+
*/
|
|
49
|
+
updateEpicProgress(epicIssueNumber: number, completed: number, total: number): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=subtask-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtask-sync.d.ts","sourceRoot":"","sources":["../../../../src/plugins/specweave-github/lib/subtask-sync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,aAAa,CAAS;gBAElB,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAKhD;;OAEG;IACG,mBAAmB,CACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,IAAI,CAAC;IAuChB;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBpD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAoB7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACG,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;QACL,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACjD,GACA,OAAO,CAAC,IAAI,CAAC;IAuChB;;OAEG;IACG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgCnG"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subtask synchronization with GitHub issue checkboxes
|
|
3
|
+
* Updates GitHub issue body when subtasks complete
|
|
4
|
+
*/
|
|
5
|
+
import { GitHubClient } from './github-client';
|
|
6
|
+
import { TaskParser } from './task-parser';
|
|
7
|
+
export class SubtaskSync {
|
|
8
|
+
constructor(incrementPath, repo) {
|
|
9
|
+
this.incrementPath = incrementPath;
|
|
10
|
+
this.client = new GitHubClient(repo);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Update subtask status in GitHub issue
|
|
14
|
+
*/
|
|
15
|
+
async updateSubtaskStatus(taskId, subtaskId, completed) {
|
|
16
|
+
// 1. Parse tasks to get task info
|
|
17
|
+
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
18
|
+
const task = tasks.find(t => t.id === taskId);
|
|
19
|
+
if (!task) {
|
|
20
|
+
throw new Error(`Task ${taskId} not found`);
|
|
21
|
+
}
|
|
22
|
+
if (!task.githubIssue) {
|
|
23
|
+
console.warn(`Task ${taskId} not synced to GitHub. Skipping subtask sync.`);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
// 2. Get current issue
|
|
27
|
+
const issue = await this.client.getIssue(task.githubIssue);
|
|
28
|
+
// 3. Update subtask checkbox in issue body
|
|
29
|
+
const updatedBody = this.updateSubtaskCheckbox(issue.body, subtaskId, completed);
|
|
30
|
+
// 4. Update GitHub issue
|
|
31
|
+
await this.client.updateIssueBody(task.githubIssue, updatedBody);
|
|
32
|
+
// 5. Check if all subtasks done
|
|
33
|
+
const allDone = this.areAllSubtasksDone(updatedBody);
|
|
34
|
+
if (allDone) {
|
|
35
|
+
await this.client.addComment(task.githubIssue, '✅ All subtasks completed!');
|
|
36
|
+
}
|
|
37
|
+
console.log(`✅ Updated subtask ${subtaskId} in GitHub issue #${task.githubIssue}`);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Sync all subtasks for a task
|
|
41
|
+
*/
|
|
42
|
+
async syncAllSubtasks(taskId) {
|
|
43
|
+
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
44
|
+
const task = tasks.find(t => t.id === taskId);
|
|
45
|
+
if (!task || !task.githubIssue || !task.subtasks) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const issue = await this.client.getIssue(task.githubIssue);
|
|
49
|
+
let updatedBody = issue.body;
|
|
50
|
+
// Update all subtasks
|
|
51
|
+
for (const subtask of task.subtasks) {
|
|
52
|
+
updatedBody = this.updateSubtaskCheckbox(updatedBody, subtask.id, subtask.completed);
|
|
53
|
+
}
|
|
54
|
+
await this.client.updateIssueBody(task.githubIssue, updatedBody);
|
|
55
|
+
console.log(`✅ Synced all subtasks for ${taskId} to GitHub issue #${task.githubIssue}`);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Update checkbox in issue body
|
|
59
|
+
*/
|
|
60
|
+
updateSubtaskCheckbox(body, subtaskId, completed) {
|
|
61
|
+
const checkbox = completed ? '[x]' : '[ ]';
|
|
62
|
+
// Try to find by subtask ID
|
|
63
|
+
const idPattern = new RegExp(`^(- \\[[ x]\\]\\s+${this.escapeRegex(subtaskId)}:.+)$`, 'm');
|
|
64
|
+
if (idPattern.test(body)) {
|
|
65
|
+
return body.replace(idPattern, (match) => {
|
|
66
|
+
return match.replace(/\[[ x]\]/, checkbox);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Fallback: try to find by description (less reliable)
|
|
70
|
+
// This is a basic approach - could be enhanced
|
|
71
|
+
return body;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check if all subtasks are done
|
|
75
|
+
*/
|
|
76
|
+
areAllSubtasksDone(body) {
|
|
77
|
+
const subtaskLines = body.match(/^- \[[ x]\] S-\d+-\d+:.+$/gm);
|
|
78
|
+
if (!subtaskLines || subtaskLines.length === 0) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
return subtaskLines.every(line => line.includes('[x]'));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Escape special regex characters
|
|
85
|
+
*/
|
|
86
|
+
escapeRegex(str) {
|
|
87
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Post task completion comment to GitHub issue
|
|
91
|
+
*/
|
|
92
|
+
async postTaskCompletionComment(taskId, stats) {
|
|
93
|
+
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
94
|
+
const task = tasks.find(t => t.id === taskId);
|
|
95
|
+
if (!task || !task.githubIssue) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const { filesModified = 0, linesAdded = 0, linesDeleted = 0, testsAdded = 0, actualDuration = 'Unknown', estimatedDuration = task.estimate, summary = 'No summary provided', nextTask = 'None', progress } = stats;
|
|
99
|
+
const comment = `✅ **Task Completed**
|
|
100
|
+
|
|
101
|
+
**Files Modified**: ${filesModified} files (+${linesAdded}/-${linesDeleted} lines)
|
|
102
|
+
**Tests**: ${testsAdded > 0 ? `All passing (${testsAdded} new tests)` : 'All passing'}
|
|
103
|
+
**Duration**: ${actualDuration} (estimated: ${estimatedDuration})
|
|
104
|
+
|
|
105
|
+
**What Changed**:
|
|
106
|
+
${summary}
|
|
107
|
+
|
|
108
|
+
**Next Task**: ${nextTask}
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
${progress ? `Progress: ${progress.completed}/${progress.total} tasks (${Math.round(progress.completed / progress.total * 100)}%)` : ''}
|
|
112
|
+
🤖 Posted by SpecWeave`;
|
|
113
|
+
await this.client.addComment(task.githubIssue, comment);
|
|
114
|
+
console.log(`✅ Posted completion comment to issue #${task.githubIssue}`);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Update epic issue progress
|
|
118
|
+
*/
|
|
119
|
+
async updateEpicProgress(epicIssueNumber, completed, total) {
|
|
120
|
+
const epic = await this.client.getIssue(epicIssueNumber);
|
|
121
|
+
// Update checkboxes in epic body
|
|
122
|
+
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
123
|
+
let updatedBody = epic.body;
|
|
124
|
+
for (const task of tasks) {
|
|
125
|
+
if (task.status === 'completed') {
|
|
126
|
+
// Find and check the checkbox for this task
|
|
127
|
+
const taskPattern = new RegExp(`^(- \\[[ x]\\] \\[${this.escapeRegex(task.id)}\\].+)$`, 'm');
|
|
128
|
+
if (taskPattern.test(updatedBody)) {
|
|
129
|
+
updatedBody = updatedBody.replace(taskPattern, (match) => {
|
|
130
|
+
return match.replace(/\[[ x]\]/, '[x]');
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
await this.client.updateIssueBody(epicIssueNumber, updatedBody);
|
|
136
|
+
// Post progress comment
|
|
137
|
+
const progressComment = `📊 **Progress Update**
|
|
138
|
+
|
|
139
|
+
${completed}/${total} tasks completed (${Math.round(completed / total * 100)}%)
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
🤖 Updated by SpecWeave`;
|
|
143
|
+
await this.client.addComment(epicIssueNumber, progressComment);
|
|
144
|
+
console.log(`✅ Updated epic issue #${epicIssueNumber} progress`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=subtask-sync.js.map
|
|
@@ -0,0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,KAAK,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC;QAE5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAChC,4CAA4C;gBAC5C,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,qBAAqB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC7F,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;oBAClC,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;wBACvD,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;oBAC1C,CAAC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;QAEhE,wBAAwB;QACxB,MAAM,eAAe,GAAG;;EAE1B,SAAS,IAAI,KAAK,qBAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC;;;wBAGpD,CAAC;QAErB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,yBAAyB,eAAe,WAAW,CAAC,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for tasks.md files
|
|
3
|
+
* Extracts task information for GitHub sync
|
|
4
|
+
*/
|
|
5
|
+
import { Task } from './types';
|
|
6
|
+
export declare class TaskParser {
|
|
7
|
+
/**
|
|
8
|
+
* Parse tasks.md file and extract all tasks
|
|
9
|
+
*/
|
|
10
|
+
static parseTasksFile(incrementPath: string): Task[];
|
|
11
|
+
/**
|
|
12
|
+
* Parse task content into structured Task objects
|
|
13
|
+
*/
|
|
14
|
+
static parseTasks(content: string): Task[];
|
|
15
|
+
/**
|
|
16
|
+
* Parse individual task section
|
|
17
|
+
*/
|
|
18
|
+
private static parseTask;
|
|
19
|
+
private static extractPriority;
|
|
20
|
+
private static extractEstimate;
|
|
21
|
+
private static extractStatus;
|
|
22
|
+
private static extractDescription;
|
|
23
|
+
private static extractGitHubIssue;
|
|
24
|
+
private static extractAssignee;
|
|
25
|
+
private static extractSubtasks;
|
|
26
|
+
private static extractFiles;
|
|
27
|
+
private static extractImplementation;
|
|
28
|
+
private static extractAcceptanceCriteria;
|
|
29
|
+
private static extractDependencies;
|
|
30
|
+
private static extractBlocks;
|
|
31
|
+
private static extractPhase;
|
|
32
|
+
/**
|
|
33
|
+
* Update tasks.md file with GitHub issue numbers
|
|
34
|
+
*/
|
|
35
|
+
static updateTasksWithGitHubIssues(incrementPath: string, taskIssueMap: Record<string, number>): void;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=task-parser.d.ts.map
|