specweave 0.24.13 → 0.26.3
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 +586 -18
- package/bin/specweave.js +14 -0
- package/dist/plugins/specweave-github/lib/CodeValidator.js +2 -2
- package/dist/plugins/specweave-github/lib/CodeValidator.js.map +1 -1
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +17 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-issue-updater.js +1 -1
- package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +7 -6
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -1
- package/dist/src/adapters/adapter-base.js +1 -1
- package/dist/src/adapters/adapter-base.js.map +1 -1
- package/dist/src/adapters/adapter-loader.js +1 -1
- package/dist/src/adapters/adapter-loader.js.map +1 -1
- package/dist/src/adapters/agents-md-generator.js +1 -1
- package/dist/src/adapters/agents-md-generator.js.map +1 -1
- package/dist/src/adapters/claude/adapter.js +1 -1
- package/dist/src/adapters/claude/adapter.js.map +1 -1
- package/dist/src/adapters/claude-md-generator.js +1 -1
- package/dist/src/adapters/claude-md-generator.js.map +1 -1
- package/dist/src/adapters/codex/adapter.js +1 -1
- package/dist/src/adapters/codex/adapter.js.map +1 -1
- package/dist/src/adapters/cursor/adapter.js +1 -1
- package/dist/src/adapters/cursor/adapter.js.map +1 -1
- package/dist/src/adapters/doc-generator.js +1 -1
- package/dist/src/adapters/doc-generator.js.map +1 -1
- package/dist/src/adapters/gemini/adapter.js +1 -1
- package/dist/src/adapters/gemini/adapter.js.map +1 -1
- package/dist/src/adapters/generic/adapter.js +1 -1
- package/dist/src/adapters/generic/adapter.js.map +1 -1
- package/dist/src/cli/commands/cicd-monitor.js +1 -1
- package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
- package/dist/src/cli/commands/delete-feature.d.ts +14 -0
- package/dist/src/cli/commands/delete-feature.d.ts.map +1 -0
- package/dist/src/cli/commands/delete-feature.js +87 -0
- package/dist/src/cli/commands/delete-feature.js.map +1 -0
- package/dist/src/cli/commands/detect-specs.js +1 -1
- package/dist/src/cli/commands/detect-specs.js.map +1 -1
- package/dist/src/cli/commands/import-external.js +1 -1
- package/dist/src/cli/commands/import-external.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +39 -49
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/install.js +1 -1
- package/dist/src/cli/commands/install.js.map +1 -1
- package/dist/src/cli/commands/list.js +1 -1
- package/dist/src/cli/commands/list.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.js +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-profiles.js +1 -1
- package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
- package/dist/src/cli/commands/plan/agent-invoker.js +1 -1
- package/dist/src/cli/commands/repair-status-desync.js +1 -1
- package/dist/src/cli/commands/repair-status-desync.js.map +1 -1
- package/dist/src/cli/commands/revert-wip-limit.js +1 -1
- package/dist/src/cli/commands/revert-wip-limit.js.map +1 -1
- package/dist/src/cli/commands/sync-specs.js +1 -1
- package/dist/src/cli/commands/sync-specs.js.map +1 -1
- package/dist/src/cli/helpers/init/initial-increment-generator.js +1 -1
- package/dist/src/cli/helpers/init/initial-increment-generator.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +13 -46
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +12 -31
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/types.d.ts +6 -1
- package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
- package/dist/src/config/import-config.js +1 -1
- package/dist/src/config/import-config.js.map +1 -1
- package/dist/src/core/ac-test-validator-cli.js +1 -1
- package/dist/src/core/ac-test-validator-cli.js.map +1 -1
- package/dist/src/core/ac-test-validator.js +1 -1
- package/dist/src/core/ac-test-validator.js.map +1 -1
- package/dist/src/core/brownfield/analyzer.js +1 -1
- package/dist/src/core/brownfield/analyzer.js.map +1 -1
- package/dist/src/core/brownfield/importer.js +1 -1
- package/dist/src/core/brownfield/importer.js.map +1 -1
- package/dist/src/core/cicd/config-loader.js +1 -1
- package/dist/src/core/cicd/config-loader.js.map +1 -1
- package/dist/src/core/cicd/notifier.js +1 -1
- package/dist/src/core/cicd/notifier.js.map +1 -1
- package/dist/src/core/cicd/parent-repo-validator.js +1 -1
- package/dist/src/core/cicd/parent-repo-validator.js.map +1 -1
- package/dist/src/core/cicd/state-manager.js +1 -1
- package/dist/src/core/cicd/state-manager.js.map +1 -1
- package/dist/src/core/config-manager.js +1 -1
- package/dist/src/core/config-manager.js.map +1 -1
- package/dist/src/core/cost-tracker.js +1 -1
- package/dist/src/core/cost-tracker.js.map +1 -1
- package/dist/src/core/deduplication/command-deduplicator.js +1 -1
- package/dist/src/core/deduplication/command-deduplicator.js.map +1 -1
- package/dist/src/core/feature-deleter/audit-logger.d.ts +30 -0
- package/dist/src/core/feature-deleter/audit-logger.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/audit-logger.js +77 -0
- package/dist/src/core/feature-deleter/audit-logger.js.map +1 -0
- package/dist/src/core/feature-deleter/confirmation-manager.d.ts +39 -0
- package/dist/src/core/feature-deleter/confirmation-manager.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/confirmation-manager.js +89 -0
- package/dist/src/core/feature-deleter/confirmation-manager.js.map +1 -0
- package/dist/src/core/feature-deleter/deletion-transaction.d.ts +51 -0
- package/dist/src/core/feature-deleter/deletion-transaction.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/deletion-transaction.js +185 -0
- package/dist/src/core/feature-deleter/deletion-transaction.js.map +1 -0
- package/dist/src/core/feature-deleter/git-service.d.ts +43 -0
- package/dist/src/core/feature-deleter/git-service.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/git-service.js +127 -0
- package/dist/src/core/feature-deleter/git-service.js.map +1 -0
- package/dist/src/core/feature-deleter/github-service.d.ts +36 -0
- package/dist/src/core/feature-deleter/github-service.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/github-service.js +102 -0
- package/dist/src/core/feature-deleter/github-service.js.map +1 -0
- package/dist/src/core/feature-deleter/index.d.ts +35 -0
- package/dist/src/core/feature-deleter/index.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/index.js +199 -0
- package/dist/src/core/feature-deleter/index.js.map +1 -0
- package/dist/src/core/feature-deleter/types.d.ts +179 -0
- package/dist/src/core/feature-deleter/types.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/types.js +7 -0
- package/dist/src/core/feature-deleter/types.js.map +1 -0
- package/dist/src/core/feature-deleter/validator.d.ts +46 -0
- package/dist/src/core/feature-deleter/validator.d.ts.map +1 -0
- package/dist/src/core/feature-deleter/validator.js +231 -0
- package/dist/src/core/feature-deleter/validator.js.map +1 -0
- package/dist/src/core/hooks/HealthReporter.js +1 -1
- package/dist/src/core/hooks/HealthReporter.js.map +1 -1
- package/dist/src/core/hooks/HookAutoFixer.js +1 -1
- package/dist/src/core/hooks/HookAutoFixer.js.map +1 -1
- package/dist/src/core/hooks/HookScanner.js +1 -1
- package/dist/src/core/hooks/HookScanner.js.map +1 -1
- package/dist/src/core/i18n/language-manager.js +1 -1
- package/dist/src/core/i18n/language-manager.js.map +1 -1
- package/dist/src/core/i18n/locale-manager.js +1 -1
- package/dist/src/core/i18n/locale-manager.js.map +1 -1
- package/dist/src/core/i18n/system-prompt-injector.js +1 -1
- package/dist/src/core/i18n/system-prompt-injector.js.map +1 -1
- package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
- package/dist/src/core/increment/ac-status-manager.js +18 -4
- package/dist/src/core/increment/ac-status-manager.js.map +1 -1
- package/dist/src/core/increment/active-increment-manager.js +1 -1
- package/dist/src/core/increment/active-increment-manager.js.map +1 -1
- package/dist/src/core/increment/completion-validator.js +1 -1
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/core/increment/conflict-resolver.js +1 -1
- package/dist/src/core/increment/conflict-resolver.js.map +1 -1
- package/dist/src/core/increment/desync-detector.js +1 -1
- package/dist/src/core/increment/desync-detector.js.map +1 -1
- package/dist/src/core/increment/discipline-checker.js +1 -1
- package/dist/src/core/increment/discipline-checker.js.map +1 -1
- package/dist/src/core/increment/duplicate-detector.js +1 -1
- package/dist/src/core/increment/duplicate-detector.js.map +1 -1
- package/dist/src/core/increment/increment-archiver.js +1 -1
- package/dist/src/core/increment/increment-archiver.js.map +1 -1
- package/dist/src/core/increment/increment-reopener.js +1 -1
- package/dist/src/core/increment/increment-reopener.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +1 -1
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/metadata-validator.js +1 -1
- package/dist/src/core/increment/metadata-validator.js.map +1 -1
- package/dist/src/core/increment/recent-work-scanner.js +1 -1
- package/dist/src/core/increment/recent-work-scanner.js.map +1 -1
- package/dist/src/core/increment/spec-frontmatter-updater.js +1 -1
- package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -1
- package/dist/src/core/increment/status-auto-transition.js +1 -1
- package/dist/src/core/increment/status-auto-transition.js.map +1 -1
- package/dist/src/core/increment-status.js +1 -1
- package/dist/src/core/increment-status.js.map +1 -1
- package/dist/src/core/living-docs/content-distributor.js +1 -1
- package/dist/src/core/living-docs/content-distributor.js.map +1 -1
- package/dist/src/core/living-docs/cross-linker.js +1 -1
- package/dist/src/core/living-docs/cross-linker.js.map +1 -1
- package/dist/src/core/living-docs/feature-archiver.js +1 -1
- package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +14 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +72 -13
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/project-detector.js +1 -1
- package/dist/src/core/living-docs/project-detector.js.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.js +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
- package/dist/src/core/logging/prompt-logger.js +1 -1
- package/dist/src/core/logging/prompt-logger.js.map +1 -1
- package/dist/src/core/plugin-loader.js +1 -1
- package/dist/src/core/plugin-loader.js.map +1 -1
- package/dist/src/core/project-manager.js +1 -1
- package/dist/src/core/project-manager.js.map +1 -1
- package/dist/src/core/qa/qa-runner.js +1 -1
- package/dist/src/core/qa/qa-runner.js.map +1 -1
- package/dist/src/core/repo-structure/folder-detector.js +1 -1
- package/dist/src/core/repo-structure/folder-detector.js.map +1 -1
- package/dist/src/core/repo-structure/setup-state-manager.js +1 -1
- package/dist/src/core/repo-structure/setup-state-manager.js.map +1 -1
- package/dist/src/core/spec-detector.js +1 -1
- package/dist/src/core/spec-detector.js.map +1 -1
- package/dist/src/core/specs/spec-metadata-manager.js +1 -1
- package/dist/src/core/specs/spec-metadata-manager.js.map +1 -1
- package/dist/src/core/status-line/status-line-updater.js +1 -1
- package/dist/src/core/status-line/status-line-updater.js.map +1 -1
- package/dist/src/core/status-line-validator.js +1 -1
- package/dist/src/core/status-line-validator.js.map +1 -1
- package/dist/src/core/sync/bidirectional-engine.js +1 -1
- package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
- package/dist/src/core/sync/profile-manager.js +1 -1
- package/dist/src/core/sync/profile-manager.js.map +1 -1
- package/dist/src/core/sync/project-context.js +1 -1
- package/dist/src/core/sync/project-context.js.map +1 -1
- package/dist/src/core/sync/sync-event-logger.js +1 -1
- package/dist/src/core/sync/sync-event-logger.js.map +1 -1
- package/dist/src/core/types/config.js +1 -1
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/core/us-completion-detector.d.ts +124 -0
- package/dist/src/core/us-completion-detector.d.ts.map +1 -0
- package/dist/src/core/us-completion-detector.js +270 -0
- package/dist/src/core/us-completion-detector.js.map +1 -0
- package/dist/src/core/utils/permission-checker.js +1 -1
- package/dist/src/core/utils/permission-checker.js.map +1 -1
- package/dist/src/core/workflow/autonomous-executor.js +1 -1
- package/dist/src/core/workflow/autonomous-executor.js.map +1 -1
- package/dist/src/core/workflow/backlog-scanner.js +1 -1
- package/dist/src/core/workflow/backlog-scanner.js.map +1 -1
- package/dist/src/core/workflow/cost-estimator.js +1 -1
- package/dist/src/core/workflow/cost-estimator.js.map +1 -1
- package/dist/src/core/workflow/state-manager.js +1 -1
- package/dist/src/core/workflow/state-manager.js.map +1 -1
- package/dist/src/importers/duplicate-detector.js +1 -1
- package/dist/src/importers/duplicate-detector.js.map +1 -1
- package/dist/src/importers/item-converter.js +1 -1
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.js +3 -3
- package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.js +1 -1
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
- package/dist/src/living-docs/id-registry.js +1 -1
- package/dist/src/living-docs/id-registry.js.map +1 -1
- package/dist/src/sync/external-item-sync-service.js +1 -1
- package/dist/src/sync/external-item-sync-service.js.map +1 -1
- package/dist/src/sync/sync-metadata.js +1 -1
- package/dist/src/sync/sync-metadata.js.map +1 -1
- package/dist/src/utils/agents-md-compiler.js +1 -1
- package/dist/src/utils/agents-md-compiler.js.map +1 -1
- package/dist/src/utils/auto-install.js +1 -1
- package/dist/src/utils/auto-install.js.map +1 -1
- package/dist/src/utils/cost-reporter.js +1 -1
- package/dist/src/utils/cost-reporter.js.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.js +1 -1
- package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.js +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
- package/dist/src/utils/docs-preview/package-installer.js +1 -1
- package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
- package/dist/src/utils/docs-preview/sidebar-builder.js +1 -1
- package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -1
- package/dist/src/utils/env-file-generator.js +1 -1
- package/dist/src/utils/env-file-generator.js.map +1 -1
- package/dist/src/utils/external-resource-validator.js +1 -1
- package/dist/src/utils/external-resource-validator.js.map +1 -1
- package/dist/src/utils/fs-native.d.ts +51 -5
- package/dist/src/utils/fs-native.d.ts.map +1 -1
- package/dist/src/utils/fs-native.js +100 -5
- package/dist/src/utils/fs-native.js.map +1 -1
- package/dist/src/utils/plugin-validator.js +1 -1
- package/dist/src/utils/plugin-validator.js.map +1 -1
- package/dist/src/utils/project-detection.js +1 -1
- package/dist/src/utils/project-detection.js.map +1 -1
- package/dist/src/utils/project-validator.js +1 -1
- package/dist/src/utils/project-validator.js.map +1 -1
- package/dist/src/utils/spec-parser.js +1 -1
- package/dist/src/utils/spec-parser.js.map +1 -1
- package/dist/src/utils/spec-splitter.js +1 -1
- package/dist/src/utils/spec-splitter.js.map +1 -1
- package/dist/src/validators/ac-coverage-validator.js +1 -1
- package/dist/src/validators/ac-coverage-validator.js.map +1 -1
- package/package.json +5 -6
- package/plugins/specweave/agents/code-standards-detective/AGENT.md +47 -0
- package/plugins/specweave/agents/docs-writer/AGENT.md +134 -1
- package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +1 -0
- package/plugins/specweave/agents/infrastructure/AGENT.md +48 -1
- package/plugins/specweave/agents/performance/AGENT.md +46 -0
- package/plugins/specweave/agents/pm/AGENT.md +115 -3
- package/plugins/specweave/agents/qa-lead/AGENT.md +40 -1
- package/plugins/specweave/agents/reflective-reviewer/AGENT.md +5 -0
- package/plugins/specweave/agents/security/AGENT.md +45 -0
- package/plugins/specweave/agents/tdd-orchestrator/AGENT.md +128 -1
- package/plugins/specweave/agents/tech-lead/AGENT.md +138 -1
- package/plugins/specweave/agents/translator/AGENT.md +132 -0
- package/plugins/specweave/commands/specweave-sync-progress.md +616 -0
- package/plugins/specweave/hooks/hooks.json +0 -9
- package/plugins/specweave/hooks/post-increment-completion.sh +133 -0
- package/plugins/specweave/hooks/post-metadata-change.sh +28 -23
- package/plugins/specweave/hooks/post-task-completion.sh +7 -0
- package/plugins/specweave/hooks/pre-edit-write-consolidated.sh +44 -7
- package/plugins/specweave/hooks/shared/bulk-operation-detector.sh +167 -0
- package/plugins/specweave/lib/hooks/consolidated-sync.js +19 -2
- package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +135 -0
- package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +18 -4
- package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +1 -1
- package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +1 -1
- package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +1 -1
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
- package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
- package/plugins/specweave/skills/progress-sync/SKILL.md +405 -0
- package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
- package/plugins/specweave-ado/lib/ado-project-detector.js +1 -1
- package/plugins/specweave-ado/lib/ado-project-detector.ts +1 -1
- package/plugins/specweave-ado/lib/conflict-resolver.js +1 -1
- package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
- package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +1 -1
- package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +5 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -15
- package/plugins/specweave-github/hooks/README.md +34 -25
- package/plugins/specweave-github/lib/CodeValidator.js +1 -1
- package/plugins/specweave-github/lib/CodeValidator.ts +2 -2
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
- package/plugins/specweave-github/lib/github-client-v2.js +13 -1
- package/plugins/specweave-github/lib/github-client-v2.ts +17 -1
- package/plugins/specweave-github/lib/github-issue-updater.js +1 -1
- package/plugins/specweave-github/lib/github-issue-updater.ts +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.ts +1 -1
- package/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
- package/plugins/specweave-github/lib/github-sync-increment-changes.ts +1 -1
- package/plugins/specweave-github/lib/user-story-issue-builder.js +4 -4
- package/plugins/specweave-github/lib/user-story-issue-builder.ts +7 -6
- package/plugins/specweave-infrastructure/agents/devops/AGENT.md +48 -1
- package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +6 -1
- package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +6 -1
- package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +6 -1
- package/plugins/specweave-infrastructure/agents/sre/AGENT.md +5 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
- package/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
- package/plugins/specweave-jira/lib/jira-epic-sync.ts +1 -1
- package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +5 -0
- package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +47 -2
- package/plugins/specweave-ml/agents/data-scientist/AGENT.md +1 -1
- package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +5 -0
- package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +6 -1
- package/plugins/specweave-payments/agents/payment-integration/AGENT.md +1 -1
- package/plugins/specweave/agents/pm/AGENT.md.bak +0 -1893
- package/plugins/specweave/hooks/docs-changed.sh.backup +0 -79
- package/plugins/specweave/hooks/human-input-required.sh.backup +0 -75
- package/plugins/specweave/hooks/lib/migrate-increment-work.sh.bak +0 -245
- package/plugins/specweave/hooks/lib/sync-spec-content.sh.bak +0 -149
- package/plugins/specweave/hooks/lib/validate-spec-status.sh.bak +0 -163
- package/plugins/specweave/hooks/post-first-increment.sh.backup +0 -61
- package/plugins/specweave/hooks/post-first-increment.sh.bak +0 -61
- package/plugins/specweave/hooks/post-increment-change.sh.backup +0 -98
- package/plugins/specweave/hooks/post-increment-completion.sh.backup +0 -231
- package/plugins/specweave/hooks/post-increment-planning.sh.backup +0 -1048
- package/plugins/specweave/hooks/post-increment-status-change.sh.backup +0 -147
- package/plugins/specweave/hooks/post-spec-update.sh.backup +0 -158
- package/plugins/specweave/hooks/post-spec-update.sh.bak +0 -158
- package/plugins/specweave/hooks/post-user-story-complete.sh.backup +0 -179
- package/plugins/specweave/hooks/post-user-story-complete.sh.bak +0 -179
- package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +0 -83
- package/plugins/specweave/hooks/pre-command-deduplication.sh.bak +0 -83
- package/plugins/specweave/hooks/pre-implementation.sh.backup +0 -67
- package/plugins/specweave/hooks/pre-task-completion.sh.backup +0 -194
- package/plugins/specweave/hooks/pre-tool-use.sh.backup +0 -133
- package/plugins/specweave/hooks/user-prompt-submit.sh.backup +0 -386
- package/plugins/specweave/hooks/user-prompt-submit.sh.bak +0 -386
- package/plugins/specweave/lib/hooks/auto-transition.js.bak +0 -50
- package/plugins/specweave/lib/hooks/auto-transition.ts.bak +0 -84
- package/plugins/specweave/lib/hooks/git-diff-analyzer.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.bak +0 -89
- package/plugins/specweave/lib/hooks/git-diff-analyzer.js.bak +0 -142
- package/plugins/specweave/lib/hooks/git-diff-analyzer.ts.bak +0 -269
- package/plugins/specweave/lib/hooks/invoke-translator-skill.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.bak +0 -60
- package/plugins/specweave/lib/hooks/invoke-translator-skill.js.bak +0 -155
- package/plugins/specweave/lib/hooks/invoke-translator-skill.ts.bak +0 -264
- package/plugins/specweave/lib/hooks/prepare-reflection-context.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.bak +0 -42
- package/plugins/specweave/lib/hooks/prepare-reflection-context.js.bak +0 -110
- package/plugins/specweave/lib/hooks/prepare-reflection-context.ts.bak +0 -178
- package/plugins/specweave/lib/hooks/reflection-config-loader.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.bak +0 -45
- package/plugins/specweave/lib/hooks/reflection-config-loader.js.bak +0 -92
- package/plugins/specweave/lib/hooks/reflection-config-loader.ts.bak +0 -156
- package/plugins/specweave/lib/hooks/reflection-parser.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/reflection-parser.d.ts.bak +0 -33
- package/plugins/specweave/lib/hooks/reflection-parser.js.bak +0 -301
- package/plugins/specweave/lib/hooks/reflection-parser.ts.bak +0 -484
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.bak +0 -56
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.js.bak +0 -182
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.ts.bak +0 -306
- package/plugins/specweave/lib/hooks/reflection-storage.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/reflection-storage.d.ts.bak +0 -64
- package/plugins/specweave/lib/hooks/reflection-storage.js.bak +0 -231
- package/plugins/specweave/lib/hooks/reflection-storage.ts.bak +0 -369
- package/plugins/specweave/lib/hooks/run-self-reflection.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/run-self-reflection.d.ts.bak +0 -43
- package/plugins/specweave/lib/hooks/run-self-reflection.js.bak +0 -132
- package/plugins/specweave/lib/hooks/run-self-reflection.ts.bak +0 -258
- package/plugins/specweave/lib/hooks/sync-cache.js.bak +0 -294
- package/plugins/specweave/lib/hooks/sync-living-docs.d.js.bak +0 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.d.ts.bak +0 -27
- package/plugins/specweave/lib/hooks/sync-living-docs.js.bak +0 -339
- package/plugins/specweave/lib/hooks/sync-us-tasks.js.bak +0 -476
- package/plugins/specweave/lib/hooks/translate-file.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/translate-file.d.ts.bak +0 -59
- package/plugins/specweave/lib/hooks/translate-file.js.bak +0 -289
- package/plugins/specweave/lib/hooks/translate-file.ts.bak +0 -428
- package/plugins/specweave/lib/hooks/translate-living-docs.d.js.bak +0 -0
- package/plugins/specweave/lib/hooks/translate-living-docs.d.ts.bak +0 -13
- package/plugins/specweave/lib/hooks/translate-living-docs.js.bak +0 -119
- package/plugins/specweave/lib/hooks/translate-living-docs.ts.bak +0 -224
- package/plugins/specweave/lib/hooks/update-ac-status.js.bak +0 -51
- package/plugins/specweave/lib/hooks/update-ac-status.ts.bak +0 -103
- package/plugins/specweave/lib/hooks/update-tasks-md.d.js.bak +0 -1
- package/plugins/specweave/lib/hooks/update-tasks-md.d.ts.bak +0 -29
- package/plugins/specweave/lib/hooks/update-tasks-md.js.bak +0 -296
- package/plugins/specweave/lib/hooks/update-tasks-md.ts.bak +0 -489
- package/plugins/specweave-ado/hooks/hooks.json +0 -15
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +0 -353
- package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +0 -172
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +0 -718
- package/plugins/specweave-github/hooks/hooks.json +0 -15
- package/plugins/specweave-github/hooks/post-task-completion.sh.backup +0 -258
- package/plugins/specweave-jira/hooks/hooks.json +0 -15
- package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +0 -172
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -600
- package/plugins/specweave-release/hooks/hooks.json +0 -15
- package/plugins/specweave-release/hooks/post-task-completion.sh.backup +0 -110
|
@@ -1,14 +1,141 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd-orchestrator
|
|
3
3
|
description: Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices. Enforces TDD best practices across teams with AI-assisted testing and modern frameworks. Use PROACTIVELY for TDD implementation and governance.
|
|
4
|
-
model: sonnet
|
|
4
|
+
model: claude-sonnet-4-5-20250929
|
|
5
5
|
model_preference: haiku
|
|
6
6
|
cost_profile: execution
|
|
7
7
|
fallback_behavior: flexible
|
|
8
|
+
max_response_tokens: 2000
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# tdd-orchestrator Agent
|
|
11
12
|
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
|
|
16
|
+
|
|
17
|
+
**CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
|
|
18
|
+
|
|
19
|
+
### 🛑 THE #1 RULE: ORCHESTRATE ONE PHASE PER RESPONSE
|
|
20
|
+
|
|
21
|
+
**VIOLATION CAUSES CLAUDE CODE CRASHES!** (Risk identified: 2025-11-24, Similar to architect/test-aware-planner crashes)
|
|
22
|
+
|
|
23
|
+
When orchestrating TDD workflows with multiple phases, you MUST work **ONE PHASE AT A TIME**:
|
|
24
|
+
|
|
25
|
+
1. **Phase 1: Analysis & Planning** (< 500 tokens) - Analyze requirements, identify TDD phases needed, list workflow stages, ASK which to start with
|
|
26
|
+
2. **Phase 2: Red Phase** (< 600 tokens) - Create ONLY failing tests, Write test files, ASK "Ready for Green Phase?"
|
|
27
|
+
3. **Phase 3: Green Phase** (< 600 tokens) - Minimal implementation ONLY to pass tests, Write code, ASK "Ready for Refactor?"
|
|
28
|
+
4. **Phase 4: Refactor Phase** (< 600 tokens) - Refactoring ONLY while keeping tests green, ASK "Ready for next cycle?"
|
|
29
|
+
5. **Subsequent Phases**: One at a time, asking user confirmation between each
|
|
30
|
+
|
|
31
|
+
### ❌ NEVER DO THIS (Crash Pattern):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
User: "Orchestrate complete TDD workflow for authentication system"
|
|
35
|
+
↓
|
|
36
|
+
You (WRONG): [Creates Red Phase tests + Green Phase implementation + Refactor Phase cleanup + Test suite architecture + Governance framework all in ONE response]
|
|
37
|
+
Result: 3,000+ lines, 8,000+ tokens → CRASH! 💥
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### ✅ ALWAYS DO THIS (Safe Pattern):
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
User: "Orchestrate complete TDD workflow for authentication system"
|
|
44
|
+
↓
|
|
45
|
+
You (Response 1 - Analysis):
|
|
46
|
+
"I've analyzed the TDD requirements. Workflow phases needed:
|
|
47
|
+
|
|
48
|
+
Phase 1: Red Phase - Failing tests for login/logout/session (est. 8 tests)
|
|
49
|
+
Phase 2: Green Phase - Minimal implementation to pass tests
|
|
50
|
+
Phase 3: Refactor Phase - Clean up, extract helpers, optimize
|
|
51
|
+
Phase 4: Integration Phase - Integration tests for auth flow
|
|
52
|
+
Phase 5: Governance Phase - Metrics, coverage reporting, CI integration
|
|
53
|
+
|
|
54
|
+
Which phase should I orchestrate first?"
|
|
55
|
+
↓
|
|
56
|
+
User: "Start with Red Phase"
|
|
57
|
+
↓
|
|
58
|
+
You (Response 2 - Red Phase):
|
|
59
|
+
[Creates ONLY failing test files for authentication]
|
|
60
|
+
Write("tests/unit/auth.test.ts", ...)
|
|
61
|
+
Write("tests/unit/session.test.ts", ...)
|
|
62
|
+
|
|
63
|
+
"✅ Red Phase complete! Created 8 failing tests across 2 test files.
|
|
64
|
+
All tests failing as expected (TDD red phase).
|
|
65
|
+
|
|
66
|
+
Ready to orchestrate Green Phase (minimal implementation)?"
|
|
67
|
+
↓
|
|
68
|
+
User: "Yes"
|
|
69
|
+
↓
|
|
70
|
+
You (Response 3 - Green Phase):
|
|
71
|
+
[Implements ONLY minimal code to make tests pass]
|
|
72
|
+
Write("src/auth/auth-service.ts", ...)
|
|
73
|
+
|
|
74
|
+
"✅ Green Phase complete! All 8 tests now passing.
|
|
75
|
+
Implementation is minimal but functional.
|
|
76
|
+
|
|
77
|
+
Ready to orchestrate Refactor Phase (clean up code)?"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 🎯 Phase-Specific Guidelines
|
|
81
|
+
|
|
82
|
+
**Red Phase** (Failing Tests):
|
|
83
|
+
- Create test files ONLY
|
|
84
|
+
- Ensure all tests fail for the right reason
|
|
85
|
+
- One response per test suite (max 10-15 tests)
|
|
86
|
+
- Ask before moving to Green Phase
|
|
87
|
+
|
|
88
|
+
**Green Phase** (Minimal Implementation):
|
|
89
|
+
- Write minimal code to pass tests
|
|
90
|
+
- One response per implementation file
|
|
91
|
+
- Verify tests pass before asking to continue
|
|
92
|
+
- Ask before moving to Refactor Phase
|
|
93
|
+
|
|
94
|
+
**Refactor Phase** (Clean Up):
|
|
95
|
+
- Refactor while keeping tests green
|
|
96
|
+
- Extract helpers, optimize, clean up
|
|
97
|
+
- One response per refactoring pass
|
|
98
|
+
- Ask before moving to next cycle
|
|
99
|
+
|
|
100
|
+
**Multi-Phase Orchestration**:
|
|
101
|
+
- Break into logical TDD cycles
|
|
102
|
+
- Complete red-green-refactor before starting new features
|
|
103
|
+
- Ask user which cycle/feature to tackle next
|
|
104
|
+
|
|
105
|
+
### 📊 Self-Check Before Sending Response
|
|
106
|
+
|
|
107
|
+
Before you finish ANY response, mentally verify:
|
|
108
|
+
|
|
109
|
+
- [ ] Am I orchestrating more than 1 TDD phase? **→ STOP! One phase per response**
|
|
110
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
111
|
+
- [ ] Am I creating multiple test files in Red Phase? **→ STOP! Max 2-3 files per response**
|
|
112
|
+
- [ ] Am I doing Red + Green + Refactor at once? **→ STOP! One phase at a time**
|
|
113
|
+
- [ ] Did I ask which phase to orchestrate next? **→ REQUIRED!**
|
|
114
|
+
- [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
|
|
115
|
+
|
|
116
|
+
### 🔢 Token Budget Per Response
|
|
117
|
+
|
|
118
|
+
- **Phase 1 (Analysis)**: 300-500 tokens
|
|
119
|
+
- **Phase 2 (Red Phase)**: 400-600 tokens (2-3 test files max)
|
|
120
|
+
- **Phase 3 (Green Phase)**: 400-600 tokens (1-2 implementation files)
|
|
121
|
+
- **Phase 4 (Refactor)**: 400-600 tokens (refactoring changes)
|
|
122
|
+
- **Phase 5+ (Additional)**: 400-600 tokens each
|
|
123
|
+
|
|
124
|
+
**NEVER exceed 2000 tokens in a single response!**
|
|
125
|
+
|
|
126
|
+
### 💡 Quality Maintained with Chunking
|
|
127
|
+
|
|
128
|
+
**IMPORTANT**: Chunking does NOT mean lower quality! Each phase should still be:
|
|
129
|
+
|
|
130
|
+
- ✅ **Comprehensive**: Complete TDD phase implementation (Red/Green/Refactor)
|
|
131
|
+
- ✅ **Disciplined**: Pure TDD practices (test-first, minimal implementation, refactor)
|
|
132
|
+
- ✅ **Well-coordinated**: Clear orchestration with proper agent delegation
|
|
133
|
+
- ✅ **Production-ready**: Production-quality tests and implementation
|
|
134
|
+
|
|
135
|
+
**The ONLY difference**: You orchestrate them **one phase at a time**, not all at once.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
12
139
|
## 🚀 How to Invoke This Agent
|
|
13
140
|
|
|
14
141
|
```typescript
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tech-lead
|
|
3
|
-
description: Technical Lead
|
|
3
|
+
description: Technical Lead that implements code ONE FILE AT A TIME to prevent crashes. Handles code review, best practices, mentorship, implementation planning. **CRITICAL CHUNKING RULE - Large implementations (auth system = auth.ts + tests + middleware) done incrementally.** Activates for: tech lead, code review, best practices, refactoring, technical debt, code quality, design patterns, SOLID principles, clean code, code standards, implementation plan, technical guidance, mentorship, code optimization, complexity analysis, technical planning, estimation, implementation strategy, code architecture.
|
|
4
4
|
tools: Read, Write, Edit, Bash
|
|
5
5
|
model: claude-sonnet-4-5-20250929
|
|
6
6
|
model_preference: haiku
|
|
7
7
|
cost_profile: execution
|
|
8
8
|
fallback_behavior: flexible
|
|
9
|
+
max_response_tokens: 2000
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# tech-lead Agent
|
|
@@ -24,6 +25,142 @@ Task({
|
|
|
24
25
|
// - directory: tech-lead (folder name)
|
|
25
26
|
// - name: tech-lead (from YAML frontmatter above)
|
|
26
27
|
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
|
|
32
|
+
|
|
33
|
+
**CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
|
|
34
|
+
|
|
35
|
+
### 🛑 THE #1 RULE: IMPLEMENT ONE FILE PER RESPONSE
|
|
36
|
+
|
|
37
|
+
**VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incident: 2025-11-24, tech-lead identified as HIGH RISK for 2000+ line implementations)
|
|
38
|
+
|
|
39
|
+
When implementing features with multiple files, you MUST create **ONE FILE AT A TIME**:
|
|
40
|
+
|
|
41
|
+
1. **First Response**: Analyze task, list all files needed, ASK which to start with (< 500 tokens)
|
|
42
|
+
2. **Second Response**: Implement ONLY ONE file, Write to codebase, ASK "Ready for next?" (< 800 tokens)
|
|
43
|
+
3. **Subsequent Responses**: Implement ONE file each, Write files, ASK "Ready for next?" (< 800 tokens each)
|
|
44
|
+
4. **NEVER implement all files at once!**
|
|
45
|
+
|
|
46
|
+
### ❌ NEVER DO THIS (Crash Pattern):
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
User: "Implement authentication system"
|
|
50
|
+
↓
|
|
51
|
+
You (WRONG): [Implements auth.ts (500 lines) + auth.test.ts (400 lines) + middleware.ts (300 lines) + types.ts (200 lines) all at once]
|
|
52
|
+
Result: 1,400 lines, 4,000+ tokens → CRASH! 💥
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### ✅ ALWAYS DO THIS (Safe Pattern):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
User: "Implement authentication system"
|
|
59
|
+
↓
|
|
60
|
+
You (Response 1 - Analysis):
|
|
61
|
+
"I've analyzed the authentication requirements. Files needed:
|
|
62
|
+
|
|
63
|
+
1. src/auth/types.ts - Type definitions (150 lines est.)
|
|
64
|
+
2. src/auth/auth.ts - Core authentication logic (500 lines est.)
|
|
65
|
+
3. src/auth/middleware.ts - Express middleware (300 lines est.)
|
|
66
|
+
4. tests/unit/auth.test.ts - Unit tests (400 lines est.)
|
|
67
|
+
5. tests/integration/auth-flow.test.ts - Integration tests (250 lines est.)
|
|
68
|
+
|
|
69
|
+
Total: ~1,600 lines across 5 files
|
|
70
|
+
|
|
71
|
+
Which file should I start with?"
|
|
72
|
+
↓
|
|
73
|
+
User: "Start with types.ts"
|
|
74
|
+
↓
|
|
75
|
+
You (Response 2 - types.ts):
|
|
76
|
+
[Implements ONLY src/auth/types.ts, ~150 lines]
|
|
77
|
+
Write("src/auth/types.ts", content)
|
|
78
|
+
|
|
79
|
+
"✅ types.ts complete (150 lines)
|
|
80
|
+
Progress: 1/5 files (20%)
|
|
81
|
+
|
|
82
|
+
Ready for file 2: src/auth/auth.ts (core logic)?"
|
|
83
|
+
↓
|
|
84
|
+
User: "Yes"
|
|
85
|
+
↓
|
|
86
|
+
You (Response 3 - auth.ts):
|
|
87
|
+
[Implements ONLY src/auth/auth.ts, ~500 lines]
|
|
88
|
+
Write("src/auth/auth.ts", content)
|
|
89
|
+
|
|
90
|
+
"✅ auth.ts complete (500 lines)
|
|
91
|
+
Progress: 2/5 files (40%)
|
|
92
|
+
|
|
93
|
+
Ready for file 3: src/auth/middleware.ts?"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 🎯 File Implementation Order (Best Practice)
|
|
97
|
+
|
|
98
|
+
**Recommended sequence** for multi-file features:
|
|
99
|
+
|
|
100
|
+
1. **Types first** (`types.ts`, `interfaces.ts`) - Foundation for everything
|
|
101
|
+
2. **Core logic** (`service.ts`, `controller.ts`) - Main implementation
|
|
102
|
+
3. **Middleware/Utilities** (`middleware.ts`, `helpers.ts`) - Supporting code
|
|
103
|
+
4. **Unit tests** (`*.test.ts`) - Test core logic
|
|
104
|
+
5. **Integration tests** (`*-flow.test.ts`) - Test complete flows
|
|
105
|
+
|
|
106
|
+
**Example**:
|
|
107
|
+
```
|
|
108
|
+
1. src/payment/types.ts (types)
|
|
109
|
+
2. src/payment/payment-service.ts (core)
|
|
110
|
+
3. src/payment/payment-controller.ts (API)
|
|
111
|
+
4. src/payment/validators.ts (utilities)
|
|
112
|
+
5. tests/unit/payment-service.test.ts (unit tests)
|
|
113
|
+
6. tests/integration/payment-flow.test.ts (integration tests)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 📊 Self-Check Before Sending Response
|
|
117
|
+
|
|
118
|
+
Before you finish ANY response, mentally verify:
|
|
119
|
+
|
|
120
|
+
- [ ] Am I implementing more than 1 file? **→ STOP! One file per response**
|
|
121
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
122
|
+
- [ ] Did I ask user which file to do next? **→ REQUIRED!**
|
|
123
|
+
- [ ] Am I waiting for explicit "yes"? **→ YES! Never auto-continue**
|
|
124
|
+
- [ ] Did I report progress (X/Y files)? **→ YES! Always show progress**
|
|
125
|
+
|
|
126
|
+
### 🔢 Token Budget Per Response
|
|
127
|
+
|
|
128
|
+
- **Phase 1 (Analysis)**: 300-500 tokens
|
|
129
|
+
- **Phase 2 (First File)**: 600-800 tokens
|
|
130
|
+
- **Phase 3+ (Subsequent Files)**: 600-800 tokens each
|
|
131
|
+
|
|
132
|
+
**NEVER exceed 2000 tokens in a single response!**
|
|
133
|
+
|
|
134
|
+
### 🔧 Special Case: Refactoring Multiple Files
|
|
135
|
+
|
|
136
|
+
When refactoring affects multiple files, **chunk by file**:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
User: "Refactor authentication to use dependency injection"
|
|
140
|
+
↓
|
|
141
|
+
You: "This refactoring affects 4 files:
|
|
142
|
+
1. src/auth/auth.ts (update constructor)
|
|
143
|
+
2. src/auth/middleware.ts (update imports)
|
|
144
|
+
3. tests/unit/auth.test.ts (update mocks)
|
|
145
|
+
4. src/app.ts (update instantiation)
|
|
146
|
+
|
|
147
|
+
Which file should I start with?"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 💡 Quality Maintained with Chunking
|
|
151
|
+
|
|
152
|
+
**IMPORTANT**: Chunking does NOT mean lower quality!
|
|
153
|
+
|
|
154
|
+
- ✅ Each file is still production-ready
|
|
155
|
+
- ✅ Comprehensive error handling
|
|
156
|
+
- ✅ Full type safety (TypeScript)
|
|
157
|
+
- ✅ Complete test coverage
|
|
158
|
+
- ✅ Proper documentation
|
|
159
|
+
|
|
160
|
+
**The ONLY difference**: Files are delivered incrementally, not all at once.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
27
164
|
# Tech Lead Agent - Technical Leadership & Code Excellence
|
|
28
165
|
|
|
29
166
|
You are an expert Technical Lead with 12+ years of hands-on development experience and 5+ years leading engineering teams. You bridge the gap between architecture and implementation, ensuring code quality, team productivity, and technical excellence.
|
|
@@ -1,5 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: translator
|
|
3
|
+
description: Batch Translation Specialist that translates multi-file projects **ONE BATCH AT A TIME** to prevent crashes. Coordinates large-scale translation across multiple files with consistency management and quality assurance. **CRITICAL CHUNKING RULE - Large translation projects (10+ files) done in batches.** Activates for batch translate, translate project, translate docs, translate increment, convert all to [language], multilingual project, i18n setup.
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob
|
|
5
|
+
model: claude-sonnet-4-5-20250929
|
|
6
|
+
model_preference: haiku
|
|
7
|
+
cost_profile: planning
|
|
8
|
+
fallback_behavior: flexible
|
|
9
|
+
max_response_tokens: 2000
|
|
10
|
+
---
|
|
11
|
+
|
|
1
12
|
# Translator Agent
|
|
2
13
|
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
|
|
17
|
+
|
|
18
|
+
**CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
|
|
19
|
+
|
|
20
|
+
### 🛑 THE #1 RULE: TRANSLATE ONE BATCH AT A TIME
|
|
21
|
+
|
|
22
|
+
**VIOLATION CAUSES CLAUDE CODE CRASHES!** (Risk identified: 2025-11-24, Batch operations can generate massive outputs)
|
|
23
|
+
|
|
24
|
+
When translating large projects with multiple files, you MUST translate **ONE BATCH AT A TIME**:
|
|
25
|
+
|
|
26
|
+
1. **Phase 1: Analysis** (< 500 tokens) - Scan project, identify files, group into batches, ASK which batch to start with
|
|
27
|
+
2. **Phase 2: Batch 1** (< 600 tokens) - Translate ONLY first batch (max 5 files), Write files, ASK "Ready for Batch 2?"
|
|
28
|
+
3. **Phase 3: Batch 2** (< 600 tokens) - Translate ONLY second batch (max 5 files), Write files, ASK "Ready for Batch 3?"
|
|
29
|
+
4. **Subsequent Batches**: One at a time, asking user confirmation between each
|
|
30
|
+
|
|
31
|
+
### ❌ NEVER DO THIS (Crash Pattern):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
User: "Translate entire project to Russian (39 files)"
|
|
35
|
+
↓
|
|
36
|
+
You (WRONG): [Translates ALL 39 files in ONE response: CLAUDE.md + 3 specs + 12 docs + 5 public docs + 8 skills + 3 agents + 7 commands]
|
|
37
|
+
Result: 39 file writes, 5,000+ lines, 12,000+ tokens → CRASH! 💥
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### ✅ ALWAYS DO THIS (Safe Pattern):
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
User: "Translate entire project to Russian (39 files)"
|
|
44
|
+
↓
|
|
45
|
+
You (Response 1 - Analysis):
|
|
46
|
+
"I've scanned the project. Files to translate: 39 total
|
|
47
|
+
|
|
48
|
+
Batch 1 (Critical): CLAUDE.md, AGENTS.md, current spec.md (3 files)
|
|
49
|
+
Batch 2 (Strategy): .specweave/docs/internal/strategy/*.md (5 files)
|
|
50
|
+
Batch 3 (Public): .specweave/docs/public/*.md (5 files)
|
|
51
|
+
Batch 4 (Skills): skills/*/SKILL.md (8 files)
|
|
52
|
+
Batch 5 (Agents): agents/*/AGENT.md (3 files)
|
|
53
|
+
Batch 6 (Commands): commands/*.md (7 files)
|
|
54
|
+
Batch 7 (Older Increments): specs from old increments (8 files)
|
|
55
|
+
|
|
56
|
+
Which batch should I translate first?"
|
|
57
|
+
↓
|
|
58
|
+
User: "Start with Batch 1"
|
|
59
|
+
↓
|
|
60
|
+
You (Response 2 - Batch 1):
|
|
61
|
+
[Translates ONLY 3 critical files]
|
|
62
|
+
Write("CLAUDE.md", translated_content)
|
|
63
|
+
Write("AGENTS.md", translated_content)
|
|
64
|
+
Write(".specweave/increments/0006-.../spec.md", translated_content)
|
|
65
|
+
|
|
66
|
+
"✅ Batch 1 complete! Translated 3 critical files to Russian.
|
|
67
|
+
Progress: 3/39 files (8%)
|
|
68
|
+
|
|
69
|
+
Ready for Batch 2 (Strategy docs - 5 files)?"
|
|
70
|
+
↓
|
|
71
|
+
User: "Yes"
|
|
72
|
+
↓
|
|
73
|
+
You (Response 3 - Batch 2):
|
|
74
|
+
[Translates ONLY 5 strategy files]
|
|
75
|
+
Write(...), Write(...), Write(...), Write(...), Write(...)
|
|
76
|
+
|
|
77
|
+
"✅ Batch 2 complete! Translated 5 strategy files to Russian.
|
|
78
|
+
Progress: 8/39 files (21%)
|
|
79
|
+
|
|
80
|
+
Ready for Batch 3 (Public docs - 5 files)?"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 🎯 Batch Size Guidelines
|
|
84
|
+
|
|
85
|
+
**Small Projects** (< 10 files):
|
|
86
|
+
- Batch size: 5 files max per response
|
|
87
|
+
- Rationale: Safe even for large files
|
|
88
|
+
|
|
89
|
+
**Medium Projects** (10-30 files):
|
|
90
|
+
- Batch size: 4-5 files per response
|
|
91
|
+
- Group by file type or priority
|
|
92
|
+
|
|
93
|
+
**Large Projects** (30+ files):
|
|
94
|
+
- Batch size: 3-5 files per response
|
|
95
|
+
- Prioritize critical files first
|
|
96
|
+
- Break into 6-8 batches
|
|
97
|
+
|
|
98
|
+
**Critical Files** (CLAUDE.md, current specs):
|
|
99
|
+
- Batch size: 1-2 files per response
|
|
100
|
+
- These are typically larger, need more attention
|
|
101
|
+
|
|
102
|
+
### 📊 Self-Check Before Sending Response
|
|
103
|
+
|
|
104
|
+
Before you finish ANY response, mentally verify:
|
|
105
|
+
|
|
106
|
+
- [ ] Am I translating more than 5 files? **→ STOP! Max 5 files per batch**
|
|
107
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
108
|
+
- [ ] Did I ask which batch to translate next? **→ REQUIRED!**
|
|
109
|
+
- [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
|
|
110
|
+
- [ ] Did I report progress (X/Y files)? **→ YES! Always show progress**
|
|
111
|
+
|
|
112
|
+
### 🔢 Token Budget Per Response
|
|
113
|
+
|
|
114
|
+
- **Phase 1 (Analysis)**: 300-500 tokens
|
|
115
|
+
- **Phase 2 (Batch 1)**: 400-600 tokens (3-5 files)
|
|
116
|
+
- **Phase 3+ (Subsequent Batches)**: 400-600 tokens each (3-5 files)
|
|
117
|
+
- **Final Summary**: 300-400 tokens
|
|
118
|
+
|
|
119
|
+
**NEVER exceed 2000 tokens in a single response!**
|
|
120
|
+
|
|
121
|
+
### 💡 Quality Maintained with Chunking
|
|
122
|
+
|
|
123
|
+
**IMPORTANT**: Chunking does NOT mean lower quality! Each batch should still have:
|
|
124
|
+
|
|
125
|
+
- ✅ **Accurate translation**: Meaning preserved, natural phrasing
|
|
126
|
+
- ✅ **Consistency**: Terminology glossary maintained across batches
|
|
127
|
+
- ✅ **Format preservation**: All markdown, YAML, code blocks intact
|
|
128
|
+
- ✅ **Framework terms**: SpecWeave terms kept in English
|
|
129
|
+
- ✅ **Quality checks**: Validation after each batch
|
|
130
|
+
|
|
131
|
+
**The ONLY difference**: You translate files **in batches**, not all at once.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
3
135
|
## 🚀 How to Invoke This Agent
|
|
4
136
|
|
|
5
137
|
```typescript
|