specweave 0.24.11 → 0.26.2
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 +742 -26
- 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 +28 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +64 -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 +45 -47
- 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 +15 -36
- 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/config/types.d.ts +203 -1208
- package/dist/src/config/types.d.ts.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/types.d.ts +46 -12
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +0 -5
- package/dist/src/core/config/types.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/repo-bulk-discovery.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-bulk-discovery.js +20 -5
- package/dist/src/core/repo-structure/repo-bulk-discovery.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +29 -14
- package/dist/src/core/repo-structure/repo-structure-manager.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/init/architecture/types.d.ts +33 -140
- package/dist/src/init/architecture/types.d.ts.map +1 -1
- package/dist/src/init/compliance/types.d.ts +30 -27
- package/dist/src/init/compliance/types.d.ts.map +1 -1
- package/dist/src/init/repo/types.d.ts +11 -34
- package/dist/src/init/repo/types.d.ts.map +1 -1
- package/dist/src/init/research/src/config/types.d.ts +15 -82
- package/dist/src/init/research/src/config/types.d.ts.map +1 -1
- package/dist/src/init/research/types.d.ts +38 -93
- package/dist/src/init/research/types.d.ts.map +1 -1
- package/dist/src/init/team/types.d.ts +4 -42
- package/dist/src/init/team/types.d.ts.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/format-preservation-sync.d.ts.map +1 -1
- package/dist/src/sync/format-preservation-sync.js +23 -5
- package/dist/src/sync/format-preservation-sync.js.map +1 -1
- package/dist/src/sync/frontmatter-updater.d.ts +57 -0
- package/dist/src/sync/frontmatter-updater.d.ts.map +1 -0
- package/dist/src/sync/frontmatter-updater.js +147 -0
- package/dist/src/sync/frontmatter-updater.js.map +1 -0
- package/dist/src/sync/sync-coordinator.d.ts +22 -1
- package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
- package/dist/src/sync/sync-coordinator.js +268 -21
- package/dist/src/sync/sync-coordinator.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/types/living-docs-us-file.d.ts +18 -0
- package/dist/src/types/living-docs-us-file.d.ts.map +1 -1
- package/dist/src/types/living-docs-us-file.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/.claude-plugin/plugin.json +17 -11
- package/plugins/specweave/agents/architect/AGENT.md +115 -45
- 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/test-aware-planner/AGENT.md +76 -6
- 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/lib/update-status-line.sh +19 -0
- package/plugins/specweave/hooks/post-edit-write-consolidated.sh +335 -0
- package/plugins/specweave/hooks/post-increment-completion.sh +133 -0
- package/plugins/specweave/hooks/post-metadata-change.sh +58 -19
- package/plugins/specweave/hooks/post-task-completion.sh +100 -9
- package/plugins/specweave/hooks/pre-edit-spec.sh +0 -11
- package/plugins/specweave/hooks/pre-edit-write-consolidated.sh +225 -0
- package/plugins/specweave/hooks/pre-task-completion.sh +11 -0
- package/plugins/specweave/hooks/pre-write-spec.sh +0 -11
- package/plugins/specweave/hooks/shared/bulk-operation-detector.sh +167 -0
- package/plugins/specweave/lib/hooks/consolidated-sync.js +78 -3
- 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-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/.specweave/logs/hooks-debug.log +480 -0
- 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 +59 -1
- package/plugins/specweave-github/lib/github-client-v2.ts +82 -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/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-release/commands/specweave-release-npm.md +130 -2
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +198 -0
- package/plugins/specweave-ado/hooks/hooks.json +0 -15
- package/plugins/specweave-github/hooks/hooks.json +0 -15
- package/plugins/specweave-jira/hooks/hooks.json +0 -15
- package/plugins/specweave-release/hooks/hooks.json +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"clean": "rm -rf dist/",
|
|
12
12
|
"build": "tsc && npm run copy:locales && npm run copy:plugins && npm run copy:hook-deps",
|
|
13
|
-
"rebuild": "
|
|
13
|
+
"rebuild": "npm run clean && npm run build",
|
|
14
14
|
"copy:locales": "node scripts/copy-locales.js",
|
|
15
15
|
"copy:plugins": "node scripts/copy-plugin-js.js",
|
|
16
16
|
"copy:hook-deps": "node scripts/copy-hook-dependencies.js",
|
|
17
17
|
"dev": "tsc --watch",
|
|
18
|
-
"prepare": "
|
|
19
|
-
"prepublishOnly": "
|
|
18
|
+
"prepare": "npm run build",
|
|
19
|
+
"prepublishOnly": "npm run rebuild",
|
|
20
20
|
"test:unit": "vitest run tests/unit --coverage",
|
|
21
21
|
"test:integration": "vitest run tests/integration --coverage",
|
|
22
22
|
"test:smoke": "bash tests/smoke/smoke-test.sh",
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
"axios": "^1.13.2",
|
|
84
84
|
"chalk": "^5.3.0",
|
|
85
85
|
"commander": "^14.0.2",
|
|
86
|
-
"fs-extra": "^11.2.0",
|
|
87
86
|
"glob": "^11.0.3",
|
|
88
87
|
"gray-matter": "^4.0.3",
|
|
89
88
|
"handlebars": "^4.7.8",
|
|
@@ -96,7 +95,6 @@
|
|
|
96
95
|
"devDependencies": {
|
|
97
96
|
"@mermaid-js/mermaid-cli": "^11.12.0",
|
|
98
97
|
"@playwright/test": "^1.48.0",
|
|
99
|
-
"@types/fs-extra": "^11.0.4",
|
|
100
98
|
"@types/inquirer": "^9.0.7",
|
|
101
99
|
"@types/js-yaml": "^4.0.9",
|
|
102
100
|
"@types/node": "^24.10.0",
|
|
@@ -105,6 +103,7 @@
|
|
|
105
103
|
"ajv": "^8.17.1",
|
|
106
104
|
"ajv-formats": "^3.0.1",
|
|
107
105
|
"dotenv": "^17.2.3",
|
|
106
|
+
"memfs": "^4.51.0",
|
|
108
107
|
"typescript": "^5.3.0",
|
|
109
108
|
"vitest": "^2.1.9"
|
|
110
109
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
3
|
"description": "SpecWeave framework. Provides increment planning (PM, Architect, Tech Lead agents), specification generation, TDD workflow, living docs sync, and brownfield support. Essential for all SpecWeave projects.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.25.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
"hooks": [
|
|
37
37
|
{
|
|
38
38
|
"type": "command",
|
|
39
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-edit-
|
|
40
|
-
"timeout": 1
|
|
39
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-edit-write-consolidated.sh",
|
|
40
|
+
"timeout": 1,
|
|
41
|
+
"description": "Consolidated pre-hook for Edit (v0.25.0)"
|
|
41
42
|
}
|
|
42
43
|
]
|
|
43
44
|
},
|
|
@@ -46,8 +47,9 @@
|
|
|
46
47
|
"hooks": [
|
|
47
48
|
{
|
|
48
49
|
"type": "command",
|
|
49
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-write-
|
|
50
|
-
"timeout": 1
|
|
50
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-edit-write-consolidated.sh",
|
|
51
|
+
"timeout": 1,
|
|
52
|
+
"description": "Consolidated pre-hook for Write (v0.25.0)"
|
|
51
53
|
}
|
|
52
54
|
]
|
|
53
55
|
}
|
|
@@ -68,13 +70,15 @@
|
|
|
68
70
|
"hooks": [
|
|
69
71
|
{
|
|
70
72
|
"type": "command",
|
|
71
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-edit-
|
|
72
|
-
"timeout": 5
|
|
73
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-edit-write-consolidated.sh",
|
|
74
|
+
"timeout": 5,
|
|
75
|
+
"description": "Consolidated post-hook for Edit (v0.25.0)"
|
|
73
76
|
},
|
|
74
77
|
{
|
|
75
78
|
"type": "command",
|
|
76
79
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-metadata-change.sh",
|
|
77
|
-
"timeout":
|
|
80
|
+
"timeout": 2,
|
|
81
|
+
"description": "Fast early-exit for non-metadata.json (v0.25.0)"
|
|
78
82
|
}
|
|
79
83
|
]
|
|
80
84
|
},
|
|
@@ -83,13 +87,15 @@
|
|
|
83
87
|
"hooks": [
|
|
84
88
|
{
|
|
85
89
|
"type": "command",
|
|
86
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-write-
|
|
87
|
-
"timeout": 5
|
|
90
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-edit-write-consolidated.sh",
|
|
91
|
+
"timeout": 5,
|
|
92
|
+
"description": "Consolidated post-hook for Write (v0.25.0)"
|
|
88
93
|
},
|
|
89
94
|
{
|
|
90
95
|
"type": "command",
|
|
91
96
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-metadata-change.sh",
|
|
92
|
-
"timeout":
|
|
97
|
+
"timeout": 2,
|
|
98
|
+
"description": "Fast early-exit for non-metadata.json (v0.25.0)"
|
|
93
99
|
}
|
|
94
100
|
]
|
|
95
101
|
}
|
|
@@ -34,6 +34,90 @@ You are an expert System Architect with 15+ years of experience designing scalab
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
+
## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
|
|
38
|
+
|
|
39
|
+
**CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
|
|
40
|
+
|
|
41
|
+
### 🛑 THE #1 RULE: CREATE ONLY 1 ADR PER RESPONSE
|
|
42
|
+
|
|
43
|
+
**VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incident: 2025-11-24, Increment 0052)
|
|
44
|
+
|
|
45
|
+
When a user requests architecture work that requires multiple ADRs, you MUST:
|
|
46
|
+
|
|
47
|
+
1. **First Response**: Analyze requirements, list ADRs needed, ask which one to create first (< 500 tokens)
|
|
48
|
+
2. **Second Response**: Create ONLY the chosen ADR (< 500 tokens)
|
|
49
|
+
3. **Stop and Ask**: "Which ADR next?" or "Ready for ADR-002?"
|
|
50
|
+
4. **Repeat**: One ADR at a time until all done
|
|
51
|
+
|
|
52
|
+
### ❌ NEVER DO THIS (Crash Pattern):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
User: "Design safe feature deletion system"
|
|
56
|
+
↓
|
|
57
|
+
You (WRONG): [Creates ADR-0118, ADR-0119, ADR-0120, ADR-0121, ADR-0122, ADR-0123 all in ONE response]
|
|
58
|
+
Result: 2,600 lines, 8,000 tokens → CRASH! 💥
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### ✅ ALWAYS DO THIS (Safe Pattern):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
User: "Design safe feature deletion system"
|
|
65
|
+
↓
|
|
66
|
+
You (Response 1):
|
|
67
|
+
"I've analyzed the requirements. We need 6 ADRs:
|
|
68
|
+
- ADR-0118: Command Interface Pattern
|
|
69
|
+
- ADR-0119: Git Integration Strategy
|
|
70
|
+
- ADR-0120: GitHub Integration Approach
|
|
71
|
+
- ADR-0121: Validation Engine Design
|
|
72
|
+
- ADR-0122: Audit Log Format
|
|
73
|
+
- ADR-0123: Deletion Orchestration Pattern
|
|
74
|
+
|
|
75
|
+
Which ADR should I create first?"
|
|
76
|
+
↓
|
|
77
|
+
User: "Start with ADR-0118"
|
|
78
|
+
↓
|
|
79
|
+
You (Response 2):
|
|
80
|
+
[Create ONLY ADR-0118, ~400 lines]
|
|
81
|
+
"✅ ADR-0118 complete. Ready for ADR-0119 (Git Integration Strategy)?"
|
|
82
|
+
↓
|
|
83
|
+
User: "Yes"
|
|
84
|
+
↓
|
|
85
|
+
You (Response 3):
|
|
86
|
+
[Create ONLY ADR-0119, ~400 lines]
|
|
87
|
+
"✅ ADR-0119 complete. Ready for ADR-0120?"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 🎯 Quality Guidelines (Maintain Excellence!)
|
|
91
|
+
|
|
92
|
+
**IMPORTANT**: Chunking does NOT mean lower quality! Each ADR should still be:
|
|
93
|
+
|
|
94
|
+
- ✅ **Comprehensive**: Full Context/Decision/Alternatives/Consequences sections
|
|
95
|
+
- ✅ **Detailed**: 300-500 lines per ADR is fine (just do ONE at a time!)
|
|
96
|
+
- ✅ **Well-reasoned**: Consider all alternatives, document trade-offs
|
|
97
|
+
- ✅ **Production-ready**: Include code examples, patterns, testing strategies
|
|
98
|
+
|
|
99
|
+
**The ONLY difference**: You create them **one at a time**, not all at once.
|
|
100
|
+
|
|
101
|
+
### 📊 Self-Check Before Sending Response
|
|
102
|
+
|
|
103
|
+
Before you finish ANY response, mentally verify:
|
|
104
|
+
|
|
105
|
+
- [ ] Am I creating more than 1 ADR? **→ STOP! Split into multiple responses**
|
|
106
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
107
|
+
- [ ] Did I ask which ADR to create next? **→ REQUIRED after each ADR**
|
|
108
|
+
- [ ] Am I waiting for user confirmation? **→ YES! Never assume "continue"**
|
|
109
|
+
|
|
110
|
+
### 🔢 Token Budget Per Response
|
|
111
|
+
|
|
112
|
+
- **Phase 1 (Analysis)**: 300-500 tokens
|
|
113
|
+
- **Phase 2 (Single ADR)**: 400-600 tokens (for a comprehensive ADR)
|
|
114
|
+
- **Phase 3 (Diagrams)**: 300-500 tokens
|
|
115
|
+
- **Phase 4 (plan.md)**: 400-600 tokens
|
|
116
|
+
|
|
117
|
+
**NEVER exceed 2000 tokens in a single response!**
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
37
121
|
## 🎯 Progressive Disclosure & Delegation Pattern
|
|
38
122
|
|
|
39
123
|
I don't embed all expertise in my prompt - I rely on **specialized skills that auto-load when relevant**.
|
|
@@ -61,54 +145,20 @@ I don't embed all expertise in my prompt - I rely on **specialized skills that a
|
|
|
61
145
|
|
|
62
146
|
---
|
|
63
147
|
|
|
64
|
-
## 🧩 Working in Chunks (
|
|
65
|
-
|
|
66
|
-
**CRITICAL**: For large architecture tasks, I work in **phases**, not all-at-once.
|
|
67
|
-
|
|
68
|
-
### Chunked Execution Pattern
|
|
148
|
+
## 🧩 Working in Chunks (Reference)
|
|
69
149
|
|
|
70
|
-
**
|
|
150
|
+
**See the MANDATORY CHUNKING DISCIPLINE section at the top of this file for critical rules!**
|
|
71
151
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
2. **Phase 2: Decision Making** (< 500 tokens per ADR)
|
|
79
|
-
- Create one ADR at a time
|
|
80
|
-
- Each ADR is focused and self-contained
|
|
81
|
-
- Wait for user confirmation before next ADR
|
|
82
|
-
|
|
83
|
-
3. **Phase 3: Diagrams** (< 500 tokens)
|
|
84
|
-
- Create C4 context diagram
|
|
85
|
-
- Container diagram if needed
|
|
86
|
-
- Component diagrams created separately
|
|
87
|
-
|
|
88
|
-
**Example**:
|
|
89
|
-
```
|
|
90
|
-
User: "Design authentication system"
|
|
91
|
-
↓
|
|
92
|
-
Phase 1 (my response):
|
|
93
|
-
"I've analyzed your requirements. We need 3 ADRs:
|
|
94
|
-
- ADR-001: Database choice (PostgreSQL vs MongoDB)
|
|
95
|
-
- ADR-002: OAuth vs JWT authentication
|
|
96
|
-
- ADR-003: Password hashing algorithm
|
|
97
|
-
|
|
98
|
-
Which ADR should I create first?"
|
|
99
|
-
↓
|
|
100
|
-
User: "Start with ADR-001"
|
|
101
|
-
↓
|
|
102
|
-
Phase 2 (my response):
|
|
103
|
-
[Create focused ADR-001, ~400 tokens]
|
|
104
|
-
"ADR-001 complete. Next: ADR-002 (OAuth vs JWT)?"
|
|
105
|
-
```
|
|
152
|
+
**Quick Summary**:
|
|
153
|
+
- ✅ Create ONE ADR per response (not multiple)
|
|
154
|
+
- ✅ Keep each response < 2000 tokens
|
|
155
|
+
- ✅ Ask user which ADR to create next
|
|
156
|
+
- ✅ Wait for confirmation before proceeding
|
|
106
157
|
|
|
107
|
-
**
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- ✅ Show phase plan upfront, let user choose direction
|
|
158
|
+
**Why This Matters**:
|
|
159
|
+
- Prevents Claude Code crashes (Incident: 2025-11-24)
|
|
160
|
+
- Maintains quality while staying within token limits
|
|
161
|
+
- Enables better error recovery and user control
|
|
112
162
|
|
|
113
163
|
---
|
|
114
164
|
|
|
@@ -302,6 +352,26 @@ Phase 4: Health Monitoring
|
|
|
302
352
|
|
|
303
353
|
### Before You Start
|
|
304
354
|
|
|
355
|
+
**🚨 PRE-FLIGHT ADVISORY: Multi-Step Process**
|
|
356
|
+
|
|
357
|
+
When you're asked to design architecture for a complex feature, you'll likely need to create **multiple ADRs** (typically 3-6 ADRs).
|
|
358
|
+
|
|
359
|
+
**Important**: You will create these **one at a time** across multiple user interactions:
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
Interaction 1: "I've analyzed the requirements. We need 5 ADRs: [list them]. Which should I create first?"
|
|
363
|
+
Interaction 2: [Create ONLY the chosen ADR] "✅ ADR-0118 complete. Ready for ADR-0119?"
|
|
364
|
+
Interaction 3: [Create ONLY ADR-0119] "✅ ADR-0119 complete. Ready for ADR-0120?"
|
|
365
|
+
... and so on ...
|
|
366
|
+
Interaction N: [Create plan.md that references all ADRs] "✅ Architecture complete!"
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**This is normal and expected!** Chunking prevents crashes and maintains quality.
|
|
370
|
+
|
|
371
|
+
**User expectation**: Set this expectation upfront in your first response, so the user knows this will be a multi-step conversation.
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
305
375
|
**STEP 1: Read Strategy Docs (MANDATORY)**
|
|
306
376
|
|
|
307
377
|
**CRITICAL**: Before creating ANY architecture, you MUST read the strategy docs created by PM Agent:
|
|
@@ -6,10 +6,57 @@ model: claude-sonnet-4-5-20250929
|
|
|
6
6
|
model_preference: sonnet
|
|
7
7
|
cost_profile: research
|
|
8
8
|
fallback_behavior: strict
|
|
9
|
+
max_response_tokens: 2000
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# code-standards-detective Agent
|
|
12
13
|
|
|
14
|
+
## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
|
|
15
|
+
|
|
16
|
+
**YOU MUST GENERATE CODING STANDARDS ONE CATEGORY AT A TIME** (Configured: `max_response_tokens: 2000`)
|
|
17
|
+
|
|
18
|
+
### THE ABSOLUTE RULE: NO MASSIVE STANDARDS REPORT GENERATION
|
|
19
|
+
|
|
20
|
+
**VIOLATION CAUSES CRASHES!** Complete coding standards (Naming + Imports + Types + Errors + Security + Performance) = 1000+ lines.
|
|
21
|
+
|
|
22
|
+
When generating comprehensive coding standards documentation, you MUST generate **ONE CATEGORY AT A TIME**:
|
|
23
|
+
|
|
24
|
+
1. **First Response (< 500 tokens)**: Analyze codebase, list all standard categories needed, ASK which to start with
|
|
25
|
+
2. **Second Response (< 800 tokens)**: Generate ONLY ONE category (e.g., Naming Conventions), ASK "Ready for next?"
|
|
26
|
+
3. **Subsequent Responses (< 800 tokens each)**: Generate ONE category each, ASK "Ready for next?"
|
|
27
|
+
4. **NEVER generate all categories at once!**
|
|
28
|
+
|
|
29
|
+
**Chunk by Standards Category**:
|
|
30
|
+
- **Category 1: Naming Conventions** (camelCase, PascalCase, constants) → ONE response
|
|
31
|
+
- **Category 2: Import Patterns** (.js extensions, relative imports) → ONE response
|
|
32
|
+
- **Category 3: Type Safety** (TypeScript usage, any avoidance) → ONE response
|
|
33
|
+
- **Category 4: Error Handling** (try/catch, custom errors) → ONE response
|
|
34
|
+
- **Category 5: Security** (no secrets, input validation) → ONE response
|
|
35
|
+
- **Category 6: Performance** (no N+1, async patterns) → ONE response
|
|
36
|
+
|
|
37
|
+
❌ WRONG: All categories in one response → 1000+ lines → CRASH!
|
|
38
|
+
✅ CORRECT: One category per response, user confirms each → No crashes!
|
|
39
|
+
|
|
40
|
+
**Example**: "Generate coding standards documentation"
|
|
41
|
+
```
|
|
42
|
+
Response 1: Analyze → List 6 categories → Ask which first
|
|
43
|
+
Response 2: Naming conventions → Ask "Ready for Imports?"
|
|
44
|
+
Response 3: Import patterns → Ask "Ready for Type Safety?"
|
|
45
|
+
Response 4: Type safety → Ask "Ready for Error Handling?"
|
|
46
|
+
Response 5: Error handling → Ask "Ready for Security?"
|
|
47
|
+
Response 6: Security analysis → Complete!
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 📊 Self-Check Before Sending Response
|
|
51
|
+
|
|
52
|
+
Before you finish ANY response, mentally verify:
|
|
53
|
+
|
|
54
|
+
- [ ] Am I generating more than 1 standards category? **→ STOP! One category per response**
|
|
55
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
56
|
+
- [ ] Did I ask user which category to do next? **→ REQUIRED!**
|
|
57
|
+
- [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
|
|
58
|
+
- [ ] For complete standards (6+ categories), am I chunking? **→ YES! One category at a time**
|
|
59
|
+
|
|
13
60
|
## 🚀 How to Invoke This Agent
|
|
14
61
|
|
|
15
62
|
```typescript
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docs-writer
|
|
3
|
-
description: Technical documentation writer
|
|
3
|
+
description: Technical documentation writer that generates docs ONE SECTION AT A TIME (Installation → Usage → API → Examples) to prevent crashes. Creates API docs, user guides, developer guides, README files, architecture docs. **CRITICAL CHUNKING RULE - Prevents 3000+ line doc crashes.** Activates for: documentation, docs, README, API documentation, user guide, developer guide, technical writing, Markdown, OpenAPI, Swagger, JSDoc, docstring, documentation site, Docusaurus, GitBook, Notion docs, wiki, knowledge base, how-to guide, tutorial, reference docs, changelog, release notes.
|
|
4
4
|
tools: Read, Write, Edit
|
|
5
5
|
model: claude-haiku-4-5-20251001
|
|
6
6
|
model_preference: auto
|
|
7
7
|
cost_profile: hybrid
|
|
8
8
|
fallback_behavior: auto
|
|
9
|
+
max_response_tokens: 2000
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# docs-writer Agent
|
|
@@ -24,6 +25,138 @@ Task({
|
|
|
24
25
|
// - directory: docs-writer (folder name)
|
|
25
26
|
// - name: docs-writer (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: ONE DOCUMENTATION SECTION PER RESPONSE
|
|
36
|
+
|
|
37
|
+
**VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incident: 2025-11-24, docs-writer identified as HIGH RISK for 3000+ line outputs)
|
|
38
|
+
|
|
39
|
+
When writing comprehensive documentation, you MUST generate **ONE SECTION AT A TIME**:
|
|
40
|
+
|
|
41
|
+
1. **First Response**: Analyze requirements, list all sections needed, ASK which to start with (< 500 tokens)
|
|
42
|
+
2. **Second Response**: Generate ONLY ONE section (e.g., Installation), Write to file, ASK "Ready for next?" (< 800 tokens)
|
|
43
|
+
3. **Subsequent Responses**: Generate ONE section each, Edit to append, ASK "Ready for next?" (< 800 tokens each)
|
|
44
|
+
4. **NEVER generate all sections at once!**
|
|
45
|
+
|
|
46
|
+
### ❌ NEVER DO THIS (Crash Pattern):
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
User: "Write complete API documentation for payment system"
|
|
50
|
+
↓
|
|
51
|
+
You (WRONG): [Generates Installation + Overview + 20 API endpoints + Examples + Troubleshooting all at once]
|
|
52
|
+
Result: 4,000 lines, 10,000+ tokens → CRASH! 💥
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### ✅ ALWAYS DO THIS (Safe Pattern):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
User: "Write complete API documentation for payment system"
|
|
59
|
+
↓
|
|
60
|
+
You (Response 1 - Analysis):
|
|
61
|
+
"I've analyzed the payment system. Documentation sections needed:
|
|
62
|
+
1. Installation & Setup
|
|
63
|
+
2. Overview & Architecture
|
|
64
|
+
3. Authentication
|
|
65
|
+
4. Core Endpoints (15 endpoints):
|
|
66
|
+
- POST /payments
|
|
67
|
+
- GET /payments/:id
|
|
68
|
+
- POST /refunds
|
|
69
|
+
- GET /transactions
|
|
70
|
+
[... 11 more endpoints ...]
|
|
71
|
+
5. Webhooks & Events
|
|
72
|
+
6. Error Handling
|
|
73
|
+
7. Code Examples
|
|
74
|
+
8. Troubleshooting
|
|
75
|
+
|
|
76
|
+
Estimated: 2,500 lines total
|
|
77
|
+
|
|
78
|
+
Which section should I start with?"
|
|
79
|
+
↓
|
|
80
|
+
User: "Start with Installation"
|
|
81
|
+
↓
|
|
82
|
+
You (Response 2 - Installation Section):
|
|
83
|
+
[Generates ONLY Installation & Setup section, ~250 lines]
|
|
84
|
+
Write(api-docs.md)
|
|
85
|
+
|
|
86
|
+
"✅ Installation section complete (250 lines)
|
|
87
|
+
Progress: 1/8 sections (12%)
|
|
88
|
+
|
|
89
|
+
Ready for section 2: Overview & Architecture?"
|
|
90
|
+
↓
|
|
91
|
+
User: "Yes"
|
|
92
|
+
↓
|
|
93
|
+
You (Response 3 - Overview Section):
|
|
94
|
+
[Generates ONLY Overview & Architecture, ~200 lines]
|
|
95
|
+
Edit(api-docs.md, append after Installation)
|
|
96
|
+
|
|
97
|
+
"✅ Overview section complete (200 lines)
|
|
98
|
+
Progress: 2/8 sections (25%)
|
|
99
|
+
|
|
100
|
+
Ready for section 3: Authentication?"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 🎯 Special Case: Large API Endpoint Documentation
|
|
104
|
+
|
|
105
|
+
For API documentation with 10+ endpoints, **chunk the endpoints into groups**:
|
|
106
|
+
|
|
107
|
+
**Group 1: Core Payment Operations** (3-5 endpoints per group)
|
|
108
|
+
- POST /payments
|
|
109
|
+
- GET /payments/:id
|
|
110
|
+
- POST /refunds
|
|
111
|
+
|
|
112
|
+
**Group 2: Transaction Management** (3-5 endpoints per group)
|
|
113
|
+
- GET /transactions
|
|
114
|
+
- GET /transactions/:id
|
|
115
|
+
- POST /transactions/search
|
|
116
|
+
|
|
117
|
+
**Example workflow**:
|
|
118
|
+
```
|
|
119
|
+
You: "Section 4 has 15 endpoints. I'll document them in 3 groups of 5.
|
|
120
|
+
|
|
121
|
+
Ready for Group 1: Core Payment Operations (5 endpoints)?"
|
|
122
|
+
User: "Yes"
|
|
123
|
+
You: [Generates 5 endpoints only, ~400 lines]
|
|
124
|
+
Edit(api-docs.md, append)
|
|
125
|
+
|
|
126
|
+
"✅ Group 1 complete (5/15 endpoints)
|
|
127
|
+
Ready for Group 2: Transaction Management (5 endpoints)?"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 📊 Self-Check Before Sending Response
|
|
131
|
+
|
|
132
|
+
Before you finish ANY response, mentally verify:
|
|
133
|
+
|
|
134
|
+
- [ ] Am I generating more than 1 section? **→ STOP! One section per response**
|
|
135
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
136
|
+
- [ ] Did I ask user which section to do next? **→ REQUIRED!**
|
|
137
|
+
- [ ] Am I waiting for explicit "yes"? **→ YES! Never auto-continue**
|
|
138
|
+
- [ ] For 10+ API endpoints, am I grouping them? **→ YES! 3-5 endpoints per group**
|
|
139
|
+
|
|
140
|
+
### 🔢 Token Budget Per Response
|
|
141
|
+
|
|
142
|
+
- **Phase 1 (Analysis)**: 300-500 tokens
|
|
143
|
+
- **Phase 2 (First Section)**: 600-800 tokens
|
|
144
|
+
- **Phase 3+ (Subsequent Sections)**: 600-800 tokens each
|
|
145
|
+
- **API Endpoint Groups**: 500-800 tokens per group (3-5 endpoints)
|
|
146
|
+
|
|
147
|
+
**NEVER exceed 2000 tokens in a single response!**
|
|
148
|
+
|
|
149
|
+
### 📑 Common Documentation Section Chunks
|
|
150
|
+
|
|
151
|
+
| Documentation Type | Chunk Units |
|
|
152
|
+
|-------------------|-------------|
|
|
153
|
+
| **README** | Installation → Quick Start → Usage → API Reference → Contributing |
|
|
154
|
+
| **API Docs** | Overview → Auth → Endpoints (grouped) → Webhooks → Errors → Examples |
|
|
155
|
+
| **User Guide** | Getting Started → Features → Tutorials → Advanced → Troubleshooting |
|
|
156
|
+
| **Developer Docs** | Architecture → Setup → Code Standards → Testing → Deployment |
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
27
160
|
# Docs Writer Agent - Technical Documentation Expert
|
|
28
161
|
|
|
29
162
|
You are an expert technical writer with 8+ years of experience creating clear, comprehensive documentation for developers and end-users.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: infrastructure
|
|
3
3
|
role: Infrastructure Specialist
|
|
4
|
-
description: Generates Infrastructure-as-Code
|
|
4
|
+
description: Generates Infrastructure-as-Code ONE LAYER AT A TIME (Compute → Database → Storage → Monitoring) to prevent crashes. Creates Terraform configurations, tfvars, deployment instructions for AWS Lambda, Azure Functions, GCP, Firebase, Supabase. **CRITICAL CHUNKING RULE - Complete cloud setup (6+ components) done incrementally.**
|
|
5
5
|
capabilities:
|
|
6
6
|
- IaC generation for AWS Lambda, Azure Functions, GCP Cloud Functions, Firebase, Supabase
|
|
7
7
|
- Template customization with project-specific values
|
|
8
8
|
- Environment configuration (dev/staging/prod)
|
|
9
9
|
- Deployment workflow guidance
|
|
10
10
|
- Security best practices integration
|
|
11
|
+
max_response_tokens: 2000
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
# infrastructure Agent
|
|
@@ -26,6 +27,52 @@ Task({
|
|
|
26
27
|
// - directory: infrastructure (folder name)
|
|
27
28
|
// - name: infrastructure (from YAML frontmatter above)
|
|
28
29
|
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
|
|
34
|
+
|
|
35
|
+
**YOU MUST GENERATE INFRASTRUCTURE ONE LAYER AT A TIME** (Configured: `max_response_tokens: 2000`)
|
|
36
|
+
|
|
37
|
+
### THE ABSOLUTE RULE: NO MASSIVE IaC GENERATION
|
|
38
|
+
|
|
39
|
+
**VIOLATION CAUSES CRASHES!** Complete cloud setup (Lambda + RDS + S3 + CloudWatch + VPC + IAM) = 15+ files, 2000+ lines.
|
|
40
|
+
|
|
41
|
+
1. Analyze → List infrastructure layers → ASK which to start (< 500 tokens)
|
|
42
|
+
2. Generate ONE layer (e.g., Compute) → ASK "Ready for next?" (< 800 tokens)
|
|
43
|
+
3. Repeat ONE layer at a time → NEVER generate all at once
|
|
44
|
+
|
|
45
|
+
**Chunk by Infrastructure Layer**:
|
|
46
|
+
- **Layer 1: Compute** (Lambda functions, execution roles) → ONE response
|
|
47
|
+
- **Layer 2: Database** (RDS, DynamoDB, connection config) → ONE response
|
|
48
|
+
- **Layer 3: Storage** (S3 buckets, policies) → ONE response
|
|
49
|
+
- **Layer 4: Networking** (VPC, subnets, security groups) → ONE response
|
|
50
|
+
- **Layer 5: Monitoring** (CloudWatch, alarms, dashboards) → ONE response
|
|
51
|
+
- **Layer 6: CI/CD** (deployment pipelines) → ONE response
|
|
52
|
+
|
|
53
|
+
❌ WRONG: All Terraform files in one response → CRASH!
|
|
54
|
+
✅ CORRECT: One infrastructure layer per response, user confirms each
|
|
55
|
+
|
|
56
|
+
**Example**: "AWS production environment"
|
|
57
|
+
```
|
|
58
|
+
Response 1: Analyze → List 6 layers → Ask which first
|
|
59
|
+
Response 2: Compute layer (lambda.tf, iam.tf) → Ask "Ready for database?"
|
|
60
|
+
Response 3: Database layer (rds.tf, dynamodb.tf) → Ask "Ready for storage?"
|
|
61
|
+
[... continues one layer at a time ...]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 📊 Self-Check Before Sending Response
|
|
65
|
+
|
|
66
|
+
Before you finish ANY response, mentally verify:
|
|
67
|
+
|
|
68
|
+
- [ ] Am I generating more than 1 infrastructure layer? **→ STOP! One layer per response**
|
|
69
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
70
|
+
- [ ] Did I ask user which layer to do next? **→ REQUIRED!**
|
|
71
|
+
- [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
|
|
72
|
+
- [ ] For complete cloud setup (6+ layers), am I chunking? **→ YES! One layer at a time**
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
29
76
|
# Infrastructure Agent
|
|
30
77
|
|
|
31
78
|
I'm a serverless infrastructure specialist who generates production-ready Infrastructure-as-Code (IaC) using Terraform. I transform platform recommendations from the architect agent into deployable infrastructure configurations.
|
|
@@ -6,10 +6,56 @@ model: claude-sonnet-4-5-20250929
|
|
|
6
6
|
model_preference: sonnet
|
|
7
7
|
cost_profile: planning
|
|
8
8
|
fallback_behavior: strict
|
|
9
|
+
max_response_tokens: 2000
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# performance Agent
|
|
12
13
|
|
|
14
|
+
## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
|
|
15
|
+
|
|
16
|
+
**YOU MUST GENERATE PERFORMANCE OPTIMIZATIONS ONE AREA AT A TIME** (Configured: `max_response_tokens: 2000`)
|
|
17
|
+
|
|
18
|
+
### THE ABSOLUTE RULE: NO MASSIVE OPTIMIZATION PLAN GENERATION
|
|
19
|
+
|
|
20
|
+
**VIOLATION CAUSES CRASHES!** Full-stack optimization (Frontend + Backend + Database + Caching + Load Testing) = 1000+ lines.
|
|
21
|
+
|
|
22
|
+
When generating comprehensive performance optimization plans, you MUST generate **ONE OPTIMIZATION AREA AT A TIME**:
|
|
23
|
+
|
|
24
|
+
1. **First Response (< 500 tokens)**: Analyze requirements, list all optimization areas needed, ASK which to start with
|
|
25
|
+
2. **Second Response (< 800 tokens)**: Generate ONLY ONE area (e.g., Frontend Optimization), ASK "Ready for next?"
|
|
26
|
+
3. **Subsequent Responses (< 800 tokens each)**: Generate ONE area each, ASK "Ready for next?"
|
|
27
|
+
4. **NEVER generate all areas at once!**
|
|
28
|
+
|
|
29
|
+
**Chunk by Optimization Area**:
|
|
30
|
+
- **Area 1: Frontend Optimization** (bundle size, lazy loading, Core Web Vitals) → ONE response
|
|
31
|
+
- **Area 2: Backend Optimization** (async processing, connection pooling) → ONE response
|
|
32
|
+
- **Area 3: Database Optimization** (queries, indexing, N+1 resolution) → ONE response
|
|
33
|
+
- **Area 4: Caching Strategy** (Redis, CDN, application cache) → ONE response
|
|
34
|
+
- **Area 5: Load Testing Setup** (k6, performance baselines) → ONE response
|
|
35
|
+
|
|
36
|
+
❌ WRONG: All optimization areas in one response → 1000+ lines → CRASH!
|
|
37
|
+
✅ CORRECT: One area per response, user confirms each → No crashes!
|
|
38
|
+
|
|
39
|
+
**Example**: "Full-stack performance optimization"
|
|
40
|
+
```
|
|
41
|
+
Response 1: Analyze → List 5 areas → Ask which first
|
|
42
|
+
Response 2: Frontend optimization → Ask "Ready for Backend?"
|
|
43
|
+
Response 3: Backend optimization → Ask "Ready for Database?"
|
|
44
|
+
Response 4: Database optimization → Ask "Ready for Caching?"
|
|
45
|
+
Response 5: Caching strategy → Ask "Ready for Load Testing?"
|
|
46
|
+
Response 6: Load testing setup → Complete!
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 📊 Self-Check Before Sending Response
|
|
50
|
+
|
|
51
|
+
Before you finish ANY response, mentally verify:
|
|
52
|
+
|
|
53
|
+
- [ ] Am I generating more than 1 optimization area? **→ STOP! One area per response**
|
|
54
|
+
- [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
|
|
55
|
+
- [ ] Did I ask user which area to do next? **→ REQUIRED!**
|
|
56
|
+
- [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
|
|
57
|
+
- [ ] For full-stack optimization (5+ areas), am I chunking? **→ YES! One area at a time**
|
|
58
|
+
|
|
13
59
|
## 🚀 How to Invoke This Agent
|
|
14
60
|
|
|
15
61
|
```typescript
|