specweave 1.0.593 → 2.0.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-plugin/marketplace.json +3 -3
- package/README.md +65 -88
- package/bin/specweave.js +206 -263
- package/dist/dashboard/assets/{index-DQb8E2_E.js → index-BiJhGDZV.js} +3 -3
- package/dist/dashboard/assets/index-heYRtWFf.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.js +3 -3
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.js.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.d.ts +5 -4
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js +14 -13
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.js +2 -2
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js +11 -9
- package/dist/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/core/increment/metadata-manager.d.ts +9 -5
- package/dist/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +70 -13
- package/dist/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/core/increment/status-auto-transition.d.ts +7 -3
- package/dist/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js +16 -12
- package/dist/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/core/tasks/task-id.d.ts +24 -0
- package/dist/plugins/specweave/lib/vendor/core/tasks/task-id.js +24 -0
- package/dist/plugins/specweave/lib/vendor/core/tasks/task-id.js.map +1 -0
- package/dist/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +86 -35
- package/dist/plugins/specweave/lib/vendor/core/types/increment-metadata.js +115 -47
- package/dist/plugins/specweave/lib/vendor/core/types/increment-metadata.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/generators/spec/task-parser.d.ts +18 -2
- package/dist/plugins/specweave/lib/vendor/generators/spec/task-parser.js +74 -6
- package/dist/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/sync/config.js +2 -2
- package/dist/plugins/specweave/lib/vendor/sync/config.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/sync/github-reconciler.js +2 -2
- package/dist/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/utils/auth-helpers.d.ts +37 -16
- package/dist/plugins/specweave/lib/vendor/utils/auth-helpers.js +88 -74
- package/dist/plugins/specweave/lib/vendor/utils/auth-helpers.js.map +1 -1
- package/dist/src/adapters/adapter-base.d.ts +0 -4
- package/dist/src/adapters/adapter-base.d.ts.map +1 -1
- package/dist/src/adapters/adapter-base.js +2 -18
- package/dist/src/adapters/adapter-base.js.map +1 -1
- package/dist/src/adapters/antigravity/adapter.d.ts.map +1 -1
- package/dist/src/adapters/antigravity/adapter.js +13 -7
- package/dist/src/adapters/antigravity/adapter.js.map +1 -1
- package/dist/src/adapters/claude/adapter.d.ts.map +1 -1
- package/dist/src/adapters/claude/adapter.js +7 -10
- package/dist/src/adapters/claude/adapter.js.map +1 -1
- package/dist/src/adapters/codex/adapter.d.ts.map +1 -1
- package/dist/src/adapters/codex/adapter.js +13 -7
- package/dist/src/adapters/codex/adapter.js.map +1 -1
- package/dist/src/adapters/gemini/adapter.d.ts.map +1 -1
- package/dist/src/adapters/gemini/adapter.js +13 -7
- package/dist/src/adapters/gemini/adapter.js.map +1 -1
- package/dist/src/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/src/adapters/generic/adapter.js +7 -3
- package/dist/src/adapters/generic/adapter.js.map +1 -1
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +15 -62
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/check-discipline.d.ts +4 -6
- package/dist/src/cli/commands/check-discipline.d.ts.map +1 -1
- package/dist/src/cli/commands/check-discipline.js +21 -27
- package/dist/src/cli/commands/check-discipline.js.map +1 -1
- package/dist/src/cli/commands/complete.d.ts +5 -1
- package/dist/src/cli/commands/complete.d.ts.map +1 -1
- package/dist/src/cli/commands/complete.js +22 -1
- package/dist/src/cli/commands/complete.js.map +1 -1
- package/dist/src/cli/commands/create-increment.d.ts +25 -4
- package/dist/src/cli/commands/create-increment.d.ts.map +1 -1
- package/dist/src/cli/commands/create-increment.js +45 -27
- package/dist/src/cli/commands/create-increment.js.map +1 -1
- package/dist/src/cli/commands/detect-intent.d.ts.map +1 -1
- package/dist/src/cli/commands/detect-intent.js +5 -12
- package/dist/src/cli/commands/detect-intent.js.map +1 -1
- package/dist/src/cli/commands/detect-project.js +3 -3
- package/dist/src/cli/commands/detect-project.js.map +1 -1
- package/dist/src/cli/commands/docs.d.ts.map +1 -1
- package/dist/src/cli/commands/docs.js +0 -80
- package/dist/src/cli/commands/docs.js.map +1 -1
- package/dist/src/cli/commands/doctor.d.ts +11 -0
- package/dist/src/cli/commands/doctor.d.ts.map +1 -1
- package/dist/src/cli/commands/doctor.js +28 -0
- package/dist/src/cli/commands/doctor.js.map +1 -1
- package/dist/src/cli/commands/export-skills.d.ts +45 -0
- package/dist/src/cli/commands/export-skills.d.ts.map +1 -1
- package/dist/src/cli/commands/export-skills.js +26 -6
- package/dist/src/cli/commands/export-skills.js.map +1 -1
- package/dist/src/cli/commands/gc.d.ts +13 -0
- package/dist/src/cli/commands/gc.d.ts.map +1 -0
- package/dist/src/cli/commands/gc.js +47 -0
- package/dist/src/cli/commands/gc.js.map +1 -0
- package/dist/src/cli/commands/hook.d.ts +6 -8
- package/dist/src/cli/commands/hook.d.ts.map +1 -1
- package/dist/src/cli/commands/hook.js +38 -38
- package/dist/src/cli/commands/hook.js.map +1 -1
- package/dist/src/cli/commands/hooks-cmd.d.ts +11 -15
- package/dist/src/cli/commands/hooks-cmd.d.ts.map +1 -1
- package/dist/src/cli/commands/hooks-cmd.js +37 -128
- package/dist/src/cli/commands/hooks-cmd.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +12 -33
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/interview.js +5 -5
- package/dist/src/cli/commands/interview.js.map +1 -1
- package/dist/src/cli/commands/plan/increment-detector.js +1 -1
- package/dist/src/cli/commands/plan/increment-detector.js.map +1 -1
- package/dist/src/cli/commands/plan/plan-orchestrator.js +2 -2
- package/dist/src/cli/commands/plan/plan-orchestrator.js.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.js +0 -16
- package/dist/src/cli/commands/refresh-plugins.js.map +1 -1
- package/dist/src/cli/commands/resume.d.ts +1 -6
- package/dist/src/cli/commands/resume.d.ts.map +1 -1
- package/dist/src/cli/commands/resume.js +2 -6
- package/dist/src/cli/commands/resume.js.map +1 -1
- package/dist/src/cli/commands/session.d.ts +1 -1
- package/dist/src/cli/commands/session.d.ts.map +1 -1
- package/dist/src/cli/commands/session.js +2 -26
- package/dist/src/cli/commands/session.js.map +1 -1
- package/dist/src/cli/commands/start.d.ts +10 -0
- package/dist/src/cli/commands/start.d.ts.map +1 -0
- package/dist/src/cli/commands/start.js +13 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/sync-gaps.d.ts +2 -13
- package/dist/src/cli/commands/sync-gaps.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-gaps.js +2 -51
- package/dist/src/cli/commands/sync-gaps.js.map +1 -1
- package/dist/src/cli/commands/sync-health.d.ts +5 -1
- package/dist/src/cli/commands/sync-health.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-health.js +7 -5
- package/dist/src/cli/commands/sync-health.js.map +1 -1
- package/dist/src/cli/commands/sync-living-docs.js +1 -1
- package/dist/src/cli/commands/sync-living-docs.js.map +1 -1
- package/dist/src/cli/commands/sync-progress.js +5 -5
- package/dist/src/cli/commands/sync-progress.js.map +1 -1
- package/dist/src/cli/commands/sync-setup.d.ts +2 -1
- package/dist/src/cli/commands/sync-setup.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-setup.js +7 -6
- package/dist/src/cli/commands/sync-setup.js.map +1 -1
- package/dist/src/cli/commands/sync-status.js +1 -1
- package/dist/src/cli/commands/sync-status.js.map +1 -1
- package/dist/src/cli/commands/sync.d.ts +125 -0
- package/dist/src/cli/commands/sync.d.ts.map +1 -0
- package/dist/src/cli/commands/sync.js +323 -0
- package/dist/src/cli/commands/sync.js.map +1 -0
- package/dist/src/cli/commands/task.d.ts +41 -0
- package/dist/src/cli/commands/task.d.ts.map +1 -0
- package/dist/src/cli/commands/task.js +325 -0
- package/dist/src/cli/commands/task.js.map +1 -0
- package/dist/src/cli/commands/update-instructions.d.ts +4 -2
- package/dist/src/cli/commands/update-instructions.d.ts.map +1 -1
- package/dist/src/cli/commands/update-instructions.js +87 -160
- package/dist/src/cli/commands/update-instructions.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts +5 -12
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +140 -174
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/commands/verify.d.ts +15 -0
- package/dist/src/cli/commands/verify.d.ts.map +1 -0
- package/dist/src/cli/commands/verify.js +57 -0
- package/dist/src/cli/commands/verify.js.map +1 -0
- package/dist/src/cli/helpers/get/bulk-get.d.ts +3 -3
- package/dist/src/cli/helpers/get/bulk-get.d.ts.map +1 -1
- package/dist/src/cli/helpers/get/bulk-get.js +8 -11
- package/dist/src/cli/helpers/get/bulk-get.js.map +1 -1
- package/dist/src/cli/helpers/init/bitbucket-repo-cloning.js +1 -1
- package/dist/src/cli/helpers/init/bitbucket-repo-cloning.js.map +1 -1
- package/dist/src/cli/helpers/init/directory-structure.d.ts +9 -2
- package/dist/src/cli/helpers/init/directory-structure.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/directory-structure.js +74 -156
- package/dist/src/cli/helpers/init/directory-structure.js.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +1 -1
- package/dist/src/cli/helpers/init/external-import.js.map +1 -1
- package/dist/src/cli/helpers/init/git-hooks-installer.d.ts +58 -0
- package/dist/src/cli/helpers/init/git-hooks-installer.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/git-hooks-installer.js +112 -8
- package/dist/src/cli/helpers/init/git-hooks-installer.js.map +1 -1
- package/dist/src/cli/helpers/init/gitignore-generator.d.ts +13 -0
- package/dist/src/cli/helpers/init/gitignore-generator.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/gitignore-generator.js +40 -0
- package/dist/src/cli/helpers/init/gitignore-generator.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +1 -1
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +1 -1
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/instruction-file-merger.d.ts +86 -7
- package/dist/src/cli/helpers/init/instruction-file-merger.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/instruction-file-merger.js +641 -202
- package/dist/src/cli/helpers/init/instruction-file-merger.js.map +1 -1
- package/dist/src/cli/helpers/init/instruction-file-writer.d.ts +53 -0
- package/dist/src/cli/helpers/init/instruction-file-writer.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/instruction-file-writer.js +85 -0
- package/dist/src/cli/helpers/init/instruction-file-writer.js.map +1 -0
- package/dist/src/cli/helpers/init/plugin-installer.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/plugin-installer.js +9 -4
- package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
- package/dist/src/cli/helpers/init/provider-detection.d.ts +3 -2
- package/dist/src/cli/helpers/init/provider-detection.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/provider-detection.js +5 -17
- package/dist/src/cli/helpers/init/provider-detection.js.map +1 -1
- package/dist/src/cli/helpers/init/skill-creator-installer.d.ts +21 -4
- package/dist/src/cli/helpers/init/skill-creator-installer.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/skill-creator-installer.js +30 -8
- package/dist/src/cli/helpers/init/skill-creator-installer.js.map +1 -1
- package/dist/src/cli/helpers/init/smart-defaults.d.ts +2 -3
- package/dist/src/cli/helpers/init/smart-defaults.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/smart-defaults.js +14 -57
- package/dist/src/cli/helpers/init/smart-defaults.js.map +1 -1
- package/dist/src/cli/helpers/init/stack-detector.d.ts +20 -0
- package/dist/src/cli/helpers/init/stack-detector.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/stack-detector.js +169 -0
- package/dist/src/cli/helpers/init/stack-detector.js.map +1 -0
- package/dist/src/cli/helpers/init/summary-banner.d.ts +1 -3
- package/dist/src/cli/helpers/init/summary-banner.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/summary-banner.js +9 -9
- package/dist/src/cli/helpers/init/summary-banner.js.map +1 -1
- package/dist/src/cli/helpers/init/testing-config.js +3 -3
- package/dist/src/cli/helpers/init/testing-config.js.map +1 -1
- package/dist/src/cli/helpers/init/types.d.ts +3 -3
- package/dist/src/cli/helpers/init/types.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/workspace-setup.d.ts +13 -0
- package/dist/src/cli/helpers/init/workspace-setup.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/workspace-setup.js +30 -0
- package/dist/src/cli/helpers/init/workspace-setup.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +2 -2
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.js +3 -4
- package/dist/src/cli/helpers/issue-tracker/github.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 +4 -9
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js +7 -12
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js.map +1 -1
- package/dist/src/config/types.d.ts +2 -2
- package/dist/src/core/config/config-manager.d.ts +8 -0
- package/dist/src/core/config/config-manager.d.ts.map +1 -1
- package/dist/src/core/config/config-manager.js +74 -1
- package/dist/src/core/config/config-manager.js.map +1 -1
- package/dist/src/core/config/index.d.ts +3 -0
- package/dist/src/core/config/index.d.ts.map +1 -1
- package/dist/src/core/config/index.js +3 -0
- package/dist/src/core/config/index.js.map +1 -1
- package/dist/src/core/config/limits-migrator.d.ts +11 -0
- package/dist/src/core/config/limits-migrator.d.ts.map +1 -0
- package/dist/src/core/config/limits-migrator.js +38 -0
- package/dist/src/core/config/limits-migrator.js.map +1 -0
- package/dist/src/core/config/migrate-config-file.d.ts +51 -0
- package/dist/src/core/config/migrate-config-file.d.ts.map +1 -0
- package/dist/src/core/config/migrate-config-file.js +95 -0
- package/dist/src/core/config/migrate-config-file.js.map +1 -0
- package/dist/src/core/config/migrate-to-2.d.ts +60 -0
- package/dist/src/core/config/migrate-to-2.d.ts.map +1 -0
- package/dist/src/core/config/migrate-to-2.js +185 -0
- package/dist/src/core/config/migrate-to-2.js.map +1 -0
- package/dist/src/core/config/schema-version.d.ts +12 -0
- package/dist/src/core/config/schema-version.d.ts.map +1 -0
- package/dist/src/core/config/schema-version.js +12 -0
- package/dist/src/core/config/schema-version.js.map +1 -0
- package/dist/src/core/config/types.d.ts +81 -422
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +31 -163
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/discrepancy/increment-generator.js +1 -1
- package/dist/src/core/discrepancy/increment-generator.js.map +1 -1
- package/dist/src/core/doctor/checkers/configuration-checker.d.ts +6 -2
- package/dist/src/core/doctor/checkers/configuration-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/configuration-checker.js +58 -79
- package/dist/src/core/doctor/checkers/configuration-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/environment-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/environment-checker.js +18 -8
- package/dist/src/core/doctor/checkers/environment-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/git-checker.d.ts +7 -0
- package/dist/src/core/doctor/checkers/git-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/git-checker.js +73 -0
- package/dist/src/core/doctor/checkers/git-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/hooks-checker.d.ts +13 -5
- package/dist/src/core/doctor/checkers/hooks-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/hooks-checker.js +105 -129
- package/dist/src/core/doctor/checkers/hooks-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/hygiene-checker.d.ts +21 -0
- package/dist/src/core/doctor/checkers/hygiene-checker.d.ts.map +1 -0
- package/dist/src/core/doctor/checkers/hygiene-checker.js +110 -0
- package/dist/src/core/doctor/checkers/hygiene-checker.js.map +1 -0
- package/dist/src/core/doctor/checkers/increments-checker.js +1 -1
- package/dist/src/core/doctor/checkers/increments-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/installation-health-checker.d.ts +66 -5
- package/dist/src/core/doctor/checkers/installation-health-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/installation-health-checker.js +237 -78
- package/dist/src/core/doctor/checkers/installation-health-checker.js.map +1 -1
- package/dist/src/core/doctor/checkers/instruction-files-checker.d.ts +33 -0
- package/dist/src/core/doctor/checkers/instruction-files-checker.d.ts.map +1 -0
- package/dist/src/core/doctor/checkers/instruction-files-checker.js +186 -0
- package/dist/src/core/doctor/checkers/instruction-files-checker.js.map +1 -0
- package/dist/src/core/doctor/checkers/project-structure-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/project-structure-checker.js +6 -5
- package/dist/src/core/doctor/checkers/project-structure-checker.js.map +1 -1
- package/dist/src/core/doctor/doctor.js +5 -5
- package/dist/src/core/doctor/doctor.js.map +1 -1
- package/dist/src/core/doctor/types.d.ts +2 -0
- package/dist/src/core/doctor/types.d.ts.map +1 -1
- package/dist/src/core/doctor/types.js.map +1 -1
- package/dist/src/core/hooks/LifecycleHookDispatcher.d.ts +3 -11
- package/dist/src/core/hooks/LifecycleHookDispatcher.d.ts.map +1 -1
- package/dist/src/core/hooks/LifecycleHookDispatcher.js +27 -82
- package/dist/src/core/hooks/LifecycleHookDispatcher.js.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.d.ts +10 -7
- package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.js +47 -93
- package/dist/src/core/hooks/handlers/hook-router.js.map +1 -1
- package/dist/src/core/hooks/handlers/index.d.ts +4 -4
- package/dist/src/core/hooks/handlers/index.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/index.js +3 -3
- package/dist/src/core/hooks/handlers/index.js.map +1 -1
- package/dist/src/core/hooks/handlers/pre-compact.d.ts +14 -24
- package/dist/src/core/hooks/handlers/pre-compact.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/pre-compact.js +58 -89
- package/dist/src/core/hooks/handlers/pre-compact.js.map +1 -1
- package/dist/src/core/hooks/handlers/pre-tool-use.d.ts +9 -4
- package/dist/src/core/hooks/handlers/pre-tool-use.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/pre-tool-use.js +40 -346
- package/dist/src/core/hooks/handlers/pre-tool-use.js.map +1 -1
- package/dist/src/core/hooks/handlers/session-start.d.ts +11 -3
- package/dist/src/core/hooks/handlers/session-start.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/session-start.js +131 -78
- package/dist/src/core/hooks/handlers/session-start.js.map +1 -1
- package/dist/src/core/hooks/handlers/stop.d.ts +24 -0
- package/dist/src/core/hooks/handlers/stop.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/stop.js +184 -0
- package/dist/src/core/hooks/handlers/stop.js.map +1 -0
- package/dist/src/core/hooks/handlers/types.d.ts +61 -41
- package/dist/src/core/hooks/handlers/types.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/types.js +100 -16
- package/dist/src/core/hooks/handlers/types.js.map +1 -1
- package/dist/src/core/hooks/handlers/utils.d.ts +27 -9
- package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/utils.js +86 -26
- package/dist/src/core/hooks/handlers/utils.js.map +1 -1
- package/dist/src/core/increment/auto-transition-manager.d.ts.map +1 -1
- package/dist/src/core/increment/auto-transition-manager.js +11 -9
- package/dist/src/core/increment/auto-transition-manager.js.map +1 -1
- package/dist/src/core/increment/completion-validator.d.ts +8 -20
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
- package/dist/src/core/increment/completion-validator.js +43 -239
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/core/increment/discipline-checker.d.ts +17 -38
- package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
- package/dist/src/core/increment/discipline-checker.js +49 -143
- package/dist/src/core/increment/discipline-checker.js.map +1 -1
- package/dist/src/core/increment/increment-artifacts.d.ts +38 -0
- package/dist/src/core/increment/increment-artifacts.d.ts.map +1 -0
- package/dist/src/core/increment/increment-artifacts.js +57 -0
- package/dist/src/core/increment/increment-artifacts.js.map +1 -0
- package/dist/src/core/increment/increment-reopener.d.ts +0 -27
- package/dist/src/core/increment/increment-reopener.d.ts.map +1 -1
- package/dist/src/core/increment/increment-reopener.js +3 -55
- package/dist/src/core/increment/increment-reopener.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.d.ts +9 -5
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +70 -13
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/spec-frontmatter-updater.d.ts.map +1 -1
- package/dist/src/core/increment/spec-frontmatter-updater.js +11 -3
- package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -1
- package/dist/src/core/increment/status-auto-transition.d.ts +7 -3
- package/dist/src/core/increment/status-auto-transition.d.ts.map +1 -1
- package/dist/src/core/increment/status-auto-transition.js +16 -12
- package/dist/src/core/increment/status-auto-transition.js.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.d.ts +0 -5
- package/dist/src/core/increment/status-change-sync-trigger.d.ts.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.js +42 -39
- package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
- package/dist/src/core/increment/status-commands.d.ts +21 -1
- package/dist/src/core/increment/status-commands.d.ts.map +1 -1
- package/dist/src/core/increment/status-commands.js +167 -88
- package/dist/src/core/increment/status-commands.js.map +1 -1
- package/dist/src/core/increment/template-creator.d.ts +24 -0
- package/dist/src/core/increment/template-creator.d.ts.map +1 -1
- package/dist/src/core/increment/template-creator.js +127 -175
- package/dist/src/core/increment/template-creator.js.map +1 -1
- package/dist/src/core/increment/types.d.ts +7 -21
- package/dist/src/core/increment/types.d.ts.map +1 -1
- package/dist/src/core/increment/types.js +1 -2
- package/dist/src/core/increment/types.js.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +7 -4
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.js +14 -17
- package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts +0 -6
- package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/index.js +1 -153
- package/dist/src/core/living-docs/intelligent-analyzer/index.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-enabled.d.ts +21 -0
- package/dist/src/core/living-docs/living-docs-enabled.d.ts.map +1 -0
- package/dist/src/core/living-docs/living-docs-enabled.js +31 -0
- package/dist/src/core/living-docs/living-docs-enabled.js.map +1 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts +9 -11
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +30 -49
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/types.d.ts +7 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -1
- package/dist/src/core/qa/qa-runner.d.ts.map +1 -1
- package/dist/src/core/qa/qa-runner.js +7 -26
- package/dist/src/core/qa/qa-runner.js.map +1 -1
- package/dist/src/core/repo-structure/setup-summary.js +1 -1
- package/dist/src/core/repo-structure/setup-summary.js.map +1 -1
- package/dist/src/core/rubric/rubric-evaluator.d.ts +2 -0
- package/dist/src/core/rubric/rubric-evaluator.d.ts.map +1 -1
- package/dist/src/core/rubric/rubric-evaluator.js +33 -0
- package/dist/src/core/rubric/rubric-evaluator.js.map +1 -1
- package/dist/src/core/rubric/rubric-generator.d.ts.map +1 -1
- package/dist/src/core/rubric/rubric-generator.js +8 -15
- package/dist/src/core/rubric/rubric-generator.js.map +1 -1
- package/dist/src/core/rubric/rubric-parser.js +1 -1
- package/dist/src/core/rubric/rubric-parser.js.map +1 -1
- package/dist/src/core/rubric/types.d.ts +8 -2
- package/dist/src/core/rubric/types.d.ts.map +1 -1
- package/dist/src/core/rubric/types.js.map +1 -1
- package/dist/src/core/session/handoff-doc-format.d.ts +37 -108
- package/dist/src/core/session/handoff-doc-format.d.ts.map +1 -1
- package/dist/src/core/session/handoff-doc-format.js +84 -179
- package/dist/src/core/session/handoff-doc-format.js.map +1 -1
- package/dist/src/core/session/handoff-git-state.d.ts +3 -14
- package/dist/src/core/session/handoff-git-state.d.ts.map +1 -1
- package/dist/src/core/session/handoff-git-state.js +68 -124
- package/dist/src/core/session/handoff-git-state.js.map +1 -1
- package/dist/src/core/session/install-handoff-context.d.ts.map +1 -1
- package/dist/src/core/session/install-handoff-context.js +15 -24
- package/dist/src/core/session/install-handoff-context.js.map +1 -1
- package/dist/src/core/session/work-handoff.d.ts +21 -55
- package/dist/src/core/session/work-handoff.d.ts.map +1 -1
- package/dist/src/core/session/work-handoff.js +146 -261
- package/dist/src/core/session/work-handoff.js.map +1 -1
- package/dist/src/core/skill-gen/types.d.ts +23 -1
- package/dist/src/core/skill-gen/types.d.ts.map +1 -1
- package/dist/src/core/skill-gen/types.js +1 -1
- package/dist/src/core/skills/skill-judge.d.ts +0 -7
- package/dist/src/core/skills/skill-judge.d.ts.map +1 -1
- package/dist/src/core/skills/skill-judge.js +10 -3
- package/dist/src/core/skills/skill-judge.js.map +1 -1
- package/dist/src/core/state/state-gc.d.ts +65 -0
- package/dist/src/core/state/state-gc.d.ts.map +1 -0
- package/dist/src/core/state/state-gc.js +234 -0
- package/dist/src/core/state/state-gc.js.map +1 -0
- package/dist/src/core/status-line/status-line-updater.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-updater.js +1 -0
- package/dist/src/core/status-line/status-line-updater.js.map +1 -1
- package/dist/src/core/status-line-validator.js +2 -2
- package/dist/src/core/status-line-validator.js.map +1 -1
- package/dist/src/core/tasks/closure-gate.d.ts +27 -0
- package/dist/src/core/tasks/closure-gate.d.ts.map +1 -0
- package/dist/src/core/tasks/closure-gate.js +72 -0
- package/dist/src/core/tasks/closure-gate.js.map +1 -0
- package/dist/src/core/tasks/increment-updated.d.ts +27 -0
- package/dist/src/core/tasks/increment-updated.d.ts.map +1 -0
- package/dist/src/core/tasks/increment-updated.js +47 -0
- package/dist/src/core/tasks/increment-updated.js.map +1 -0
- package/dist/src/core/tasks/ledger.d.ts +115 -0
- package/dist/src/core/tasks/ledger.d.ts.map +1 -0
- package/dist/src/core/tasks/ledger.js +250 -0
- package/dist/src/core/tasks/ledger.js.map +1 -0
- package/dist/src/core/tasks/resolve-increment.d.ts +47 -0
- package/dist/src/core/tasks/resolve-increment.d.ts.map +1 -0
- package/dist/src/core/tasks/resolve-increment.js +153 -0
- package/dist/src/core/tasks/resolve-increment.js.map +1 -0
- package/dist/src/core/tasks/run-shell.d.ts +27 -0
- package/dist/src/core/tasks/run-shell.d.ts.map +1 -0
- package/dist/src/core/tasks/run-shell.js +67 -0
- package/dist/src/core/tasks/run-shell.js.map +1 -0
- package/dist/src/core/tasks/supersede.d.ts +24 -0
- package/dist/src/core/tasks/supersede.d.ts.map +1 -0
- package/dist/src/core/tasks/supersede.js +86 -0
- package/dist/src/core/tasks/supersede.js.map +1 -0
- package/dist/src/core/tasks/task-board.d.ts +75 -0
- package/dist/src/core/tasks/task-board.d.ts.map +1 -0
- package/dist/src/core/tasks/task-board.js +259 -0
- package/dist/src/core/tasks/task-board.js.map +1 -0
- package/dist/src/core/tasks/task-id.d.ts +24 -0
- package/dist/src/core/tasks/task-id.d.ts.map +1 -0
- package/dist/src/core/tasks/task-id.js +24 -0
- package/dist/src/core/tasks/task-id.js.map +1 -0
- package/dist/src/core/tasks/verify-runner.d.ts +87 -0
- package/dist/src/core/tasks/verify-runner.d.ts.map +1 -0
- package/dist/src/core/tasks/verify-runner.js +166 -0
- package/dist/src/core/tasks/verify-runner.js.map +1 -0
- package/dist/src/core/team-lead/template-loader.js +1 -1
- package/dist/src/core/team-lead/template-loader.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +86 -35
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js +115 -47
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/dist/src/core/validation/increment-structure-validator.d.ts +2 -1
- package/dist/src/core/validation/increment-structure-validator.d.ts.map +1 -1
- package/dist/src/core/validation/increment-structure-validator.js +3 -13
- package/dist/src/core/validation/increment-structure-validator.js.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.js +12 -19
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/dashboard/server/data/dashboard-data-aggregator.js +1 -1
- package/dist/src/dashboard/server/data/dashboard-data-aggregator.js.map +1 -1
- package/dist/src/generators/spec/task-parser.d.ts +18 -2
- package/dist/src/generators/spec/task-parser.d.ts.map +1 -1
- package/dist/src/generators/spec/task-parser.js +74 -6
- package/dist/src/generators/spec/task-parser.js.map +1 -1
- package/dist/src/importers/github-importer.d.ts.map +1 -1
- package/dist/src/importers/github-importer.js +6 -4
- package/dist/src/importers/github-importer.js.map +1 -1
- package/dist/src/importers/import-to-increment.js +2 -2
- package/dist/src/importers/import-to-increment.js.map +1 -1
- package/dist/src/init/research/types.d.ts +1 -1
- package/dist/src/progress/us-progress-tracker.d.ts +4 -0
- package/dist/src/progress/us-progress-tracker.d.ts.map +1 -1
- package/dist/src/progress/us-progress-tracker.js +10 -3
- package/dist/src/progress/us-progress-tracker.js.map +1 -1
- package/dist/src/sync/config.js +2 -2
- package/dist/src/sync/config.js.map +1 -1
- package/dist/src/sync/external-sync-configured.d.ts +23 -0
- package/dist/src/sync/external-sync-configured.d.ts.map +1 -0
- package/dist/src/sync/external-sync-configured.js +51 -0
- package/dist/src/sync/external-sync-configured.js.map +1 -0
- package/dist/src/sync/github-reconciler.js +2 -2
- package/dist/src/sync/github-reconciler.js.map +1 -1
- package/dist/src/sync/sync-coordinator.js +4 -4
- package/dist/src/sync/sync-coordinator.js.map +1 -1
- package/dist/src/sync/sync-target-resolver.js +1 -1
- package/dist/src/sync/sync-target-resolver.js.map +1 -1
- package/dist/src/utils/auth-helpers.d.ts +37 -16
- package/dist/src/utils/auth-helpers.d.ts.map +1 -1
- package/dist/src/utils/auth-helpers.js +88 -74
- package/dist/src/utils/auth-helpers.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/notification-constants.js +1 -1
- package/dist/src/utils/notification-constants.js.map +1 -1
- package/dist/src/utils/port-reachable.d.ts +3 -0
- package/dist/src/utils/port-reachable.d.ts.map +1 -0
- package/dist/src/utils/port-reachable.js +22 -0
- package/dist/src/utils/port-reachable.js.map +1 -0
- package/package.json +14 -8
- package/plugins/PLUGINS-INDEX.md +25 -44
- package/plugins/specweave/.claude-plugin/plugin.json +10 -15
- package/plugins/specweave/.lint/skill-lint.test.ts +93 -0
- package/plugins/specweave/PLUGIN.md +40 -105
- package/plugins/specweave/agents/sw-closer.md +16 -25
- package/plugins/specweave/defaults/rubric-defaults.md +11 -11
- package/plugins/specweave/hooks/hooks.json +13 -65
- package/plugins/specweave/hooks/run-worker.mjs +229 -0
- package/plugins/specweave/hooks/run.mjs +72 -0
- package/plugins/specweave/lib/external-sync/README.md +2 -3
- package/plugins/specweave/lib/integrations/github/github-access-error.js +2 -2
- package/plugins/specweave/lib/integrations/github/github-access-error.ts +3 -3
- package/plugins/specweave/lib/integrations/github/github-client-v2.js +19 -40
- package/plugins/specweave/lib/integrations/github/github-client-v2.ts +19 -40
- package/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js +1 -1
- package/plugins/specweave/lib/integrations/github/github-feature-sync-cli.ts +1 -1
- package/plugins/specweave/lib/integrations/github/github-feature-sync.js +2 -2
- package/plugins/specweave/lib/integrations/github/github-feature-sync.ts +2 -2
- package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js +11 -9
- package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.d.ts +9 -5
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +70 -13
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.d.ts +7 -3
- package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js +16 -12
- package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/tasks/task-id.d.ts +24 -0
- package/plugins/specweave/lib/vendor/core/tasks/task-id.js +24 -0
- package/plugins/specweave/lib/vendor/core/tasks/task-id.js.map +1 -0
- package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +86 -35
- package/plugins/specweave/lib/vendor/core/types/increment-metadata.js +115 -47
- package/plugins/specweave/lib/vendor/core/types/increment-metadata.js.map +1 -1
- package/plugins/specweave/lib/vendor/generators/spec/task-parser.d.ts +18 -2
- package/plugins/specweave/lib/vendor/generators/spec/task-parser.js +74 -6
- package/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -1
- package/plugins/specweave/lib/vendor/sync/config.js +2 -2
- package/plugins/specweave/lib/vendor/sync/config.js.map +1 -1
- package/plugins/specweave/lib/vendor/sync/github-reconciler.js +2 -2
- package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
- package/plugins/specweave/lib/vendor/utils/auth-helpers.d.ts +37 -16
- package/plugins/specweave/lib/vendor/utils/auth-helpers.js +88 -74
- package/plugins/specweave/lib/vendor/utils/auth-helpers.js.map +1 -1
- package/plugins/specweave/marketplace.json +99 -91
- package/plugins/specweave/reference/ado/ado-specweave-mapping.md +5 -6
- package/plugins/specweave/reference/github/github-specweave-mapping.md +3 -4
- package/plugins/specweave/reference/jira/jira-specweave-mapping.md +5 -5
- package/plugins/specweave/scripts/README.md +23 -168
- package/plugins/specweave/scripts/jobs.js +3 -2
- package/plugins/specweave/scripts/progress.js +9 -8
- package/plugins/specweave/scripts/status.js +7 -6
- package/plugins/specweave/skills/auto/SKILL.md +47 -263
- package/plugins/specweave/skills/brainstorm/SKILL.md +53 -559
- package/plugins/specweave/skills/do/SKILL.md +31 -249
- package/plugins/specweave/skills/done/SKILL.md +23 -264
- package/plugins/specweave/skills/handoff/SKILL.md +22 -40
- package/plugins/specweave/skills/increment/SKILL.md +81 -489
- package/plugins/specweave/skills/qa/SKILL.md +45 -0
- package/plugins/specweave/skills/review/SKILL.md +102 -0
- package/plugins/specweave/skills/sync/SKILL.md +63 -0
- package/plugins/specweave/skills/team/SKILL.md +89 -0
- package/plugins/specweave/skills/{team-lead → team}/agents/_protocol.md +1 -1
- package/plugins/specweave/skills/{team-lead → team}/agents/architect.md +4 -2
- package/plugins/specweave/skills/{team-lead → team}/agents/backend.md +3 -3
- package/plugins/specweave/skills/{team-lead → team}/agents/database.md +2 -2
- package/plugins/specweave/skills/{team-lead → team}/agents/frontend.md +2 -2
- package/plugins/specweave/skills/{team-lead → team}/agents/pm.md +3 -2
- package/plugins/specweave/skills/{team-lead → team}/agents/security.md +2 -2
- package/plugins/specweave/skills/{team-lead → team}/agents/testing.md +4 -4
- package/src/templates/.gitattributes.template +3 -0
- package/src/templates/.gitignore.template +63 -27
- package/src/templates/AGENTS.md.template +52 -423
- package/src/templates/CLAUDE.md.template +50 -290
- package/src/templates/README.md.template +16 -146
- package/src/templates/git-hooks/pre-commit.template +22 -26
- package/dist/dashboard/assets/index-DAfC5dt1.css +0 -1
- package/dist/src/adapters/agents-md-generator.d.ts +0 -48
- package/dist/src/adapters/agents-md-generator.d.ts.map +0 -1
- package/dist/src/adapters/agents-md-generator.js +0 -129
- package/dist/src/adapters/agents-md-generator.js.map +0 -1
- package/dist/src/adapters/claude-md-generator.d.ts +0 -78
- package/dist/src/adapters/claude-md-generator.d.ts.map +0 -1
- package/dist/src/adapters/claude-md-generator.js +0 -248
- package/dist/src/adapters/claude-md-generator.js.map +0 -1
- package/dist/src/adapters/template-utils.d.ts +0 -16
- package/dist/src/adapters/template-utils.d.ts.map +0 -1
- package/dist/src/adapters/template-utils.js +0 -61
- package/dist/src/adapters/template-utils.js.map +0 -1
- package/dist/src/cli/commands/logs.d.ts +0 -13
- package/dist/src/cli/commands/logs.d.ts.map +0 -1
- package/dist/src/cli/commands/logs.js +0 -110
- package/dist/src/cli/commands/logs.js.map +0 -1
- package/dist/src/cli/commands/reflect-stop.d.ts +0 -30
- package/dist/src/cli/commands/reflect-stop.d.ts.map +0 -1
- package/dist/src/cli/commands/reflect-stop.js +0 -63
- package/dist/src/cli/commands/reflect-stop.js.map +0 -1
- package/dist/src/cli/commands/revert-wip-limit.d.ts +0 -8
- package/dist/src/cli/commands/revert-wip-limit.d.ts.map +0 -1
- package/dist/src/cli/commands/revert-wip-limit.js +0 -65
- package/dist/src/cli/commands/revert-wip-limit.js.map +0 -1
- package/dist/src/cli/commands/set-sync-target.d.ts +0 -41
- package/dist/src/cli/commands/set-sync-target.d.ts.map +0 -1
- package/dist/src/cli/commands/set-sync-target.js +0 -126
- package/dist/src/cli/commands/set-sync-target.js.map +0 -1
- package/dist/src/cli/commands/sync-flush.d.ts +0 -31
- package/dist/src/cli/commands/sync-flush.d.ts.map +0 -1
- package/dist/src/cli/commands/sync-flush.js +0 -114
- package/dist/src/cli/commands/sync-flush.js.map +0 -1
- package/dist/src/cli/commands/sync-scheduled.d.ts +0 -38
- package/dist/src/cli/commands/sync-scheduled.d.ts.map +0 -1
- package/dist/src/cli/commands/sync-scheduled.js +0 -171
- package/dist/src/cli/commands/sync-scheduled.js.map +0 -1
- package/dist/src/cli/commands/sync-task.d.ts +0 -16
- package/dist/src/cli/commands/sync-task.d.ts.map +0 -1
- package/dist/src/cli/commands/sync-task.js +0 -42
- package/dist/src/cli/commands/sync-task.js.map +0 -1
- package/dist/src/cli/commands/validate-jira.d.ts +0 -35
- package/dist/src/cli/commands/validate-jira.d.ts.map +0 -1
- package/dist/src/cli/commands/validate-jira.js +0 -116
- package/dist/src/cli/commands/validate-jira.js.map +0 -1
- package/dist/src/cli/helpers/init/claude-settings-permissions.d.ts +0 -20
- package/dist/src/cli/helpers/init/claude-settings-permissions.d.ts.map +0 -1
- package/dist/src/cli/helpers/init/claude-settings-permissions.js +0 -71
- package/dist/src/cli/helpers/init/claude-settings-permissions.js.map +0 -1
- package/dist/src/cli/helpers/init/dci-scripts-installer.d.ts +0 -21
- package/dist/src/cli/helpers/init/dci-scripts-installer.d.ts.map +0 -1
- package/dist/src/cli/helpers/init/dci-scripts-installer.js +0 -58
- package/dist/src/cli/helpers/init/dci-scripts-installer.js.map +0 -1
- package/dist/src/cli/helpers/init/deep-interview-config.d.ts +0 -35
- package/dist/src/cli/helpers/init/deep-interview-config.d.ts.map +0 -1
- package/dist/src/cli/helpers/init/deep-interview-config.js +0 -261
- package/dist/src/cli/helpers/init/deep-interview-config.js.map +0 -1
- package/dist/src/cli/helpers/init/quality-gates-config.d.ts +0 -57
- package/dist/src/cli/helpers/init/quality-gates-config.d.ts.map +0 -1
- package/dist/src/cli/helpers/init/quality-gates-config.js +0 -306
- package/dist/src/cli/helpers/init/quality-gates-config.js.map +0 -1
- package/dist/src/cli/helpers/init/translation-config.d.ts +0 -96
- package/dist/src/cli/helpers/init/translation-config.d.ts.map +0 -1
- package/dist/src/cli/helpers/init/translation-config.js +0 -472
- package/dist/src/cli/helpers/init/translation-config.js.map +0 -1
- package/dist/src/core/dashboard/dashboard-data.d.ts +0 -156
- package/dist/src/core/dashboard/dashboard-data.d.ts.map +0 -1
- package/dist/src/core/dashboard/dashboard-data.js +0 -186
- package/dist/src/core/dashboard/dashboard-data.js.map +0 -1
- package/dist/src/core/dashboard/index.d.ts +0 -9
- package/dist/src/core/dashboard/index.d.ts.map +0 -1
- package/dist/src/core/dashboard/index.js +0 -9
- package/dist/src/core/dashboard/index.js.map +0 -1
- package/dist/src/core/doctor/checkers/plugin-currency-checker.d.ts +0 -26
- package/dist/src/core/doctor/checkers/plugin-currency-checker.d.ts.map +0 -1
- package/dist/src/core/doctor/checkers/plugin-currency-checker.js +0 -128
- package/dist/src/core/doctor/checkers/plugin-currency-checker.js.map +0 -1
- package/dist/src/core/doctor/checkers/skill-currency-checker.d.ts +0 -25
- package/dist/src/core/doctor/checkers/skill-currency-checker.d.ts.map +0 -1
- package/dist/src/core/doctor/checkers/skill-currency-checker.js +0 -98
- package/dist/src/core/doctor/checkers/skill-currency-checker.js.map +0 -1
- package/dist/src/core/hooks/HealthReporter.d.ts +0 -57
- package/dist/src/core/hooks/HealthReporter.d.ts.map +0 -1
- package/dist/src/core/hooks/HealthReporter.js +0 -260
- package/dist/src/core/hooks/HealthReporter.js.map +0 -1
- package/dist/src/core/hooks/HookAutoFixer.d.ts +0 -44
- package/dist/src/core/hooks/HookAutoFixer.d.ts.map +0 -1
- package/dist/src/core/hooks/HookAutoFixer.js +0 -168
- package/dist/src/core/hooks/HookAutoFixer.js.map +0 -1
- package/dist/src/core/hooks/HookExecutor.d.ts +0 -57
- package/dist/src/core/hooks/HookExecutor.d.ts.map +0 -1
- package/dist/src/core/hooks/HookExecutor.js +0 -268
- package/dist/src/core/hooks/HookExecutor.js.map +0 -1
- package/dist/src/core/hooks/HookHealthChecker.d.ts +0 -52
- package/dist/src/core/hooks/HookHealthChecker.d.ts.map +0 -1
- package/dist/src/core/hooks/HookHealthChecker.js +0 -202
- package/dist/src/core/hooks/HookHealthChecker.js.map +0 -1
- package/dist/src/core/hooks/HookScanner.d.ts +0 -105
- package/dist/src/core/hooks/HookScanner.d.ts.map +0 -1
- package/dist/src/core/hooks/HookScanner.js +0 -307
- package/dist/src/core/hooks/HookScanner.js.map +0 -1
- package/dist/src/core/hooks/feature-id-resolver.d.ts +0 -16
- package/dist/src/core/hooks/feature-id-resolver.d.ts.map +0 -1
- package/dist/src/core/hooks/feature-id-resolver.js +0 -60
- package/dist/src/core/hooks/feature-id-resolver.js.map +0 -1
- package/dist/src/core/hooks/github-project-sync.d.ts +0 -16
- package/dist/src/core/hooks/github-project-sync.d.ts.map +0 -1
- package/dist/src/core/hooks/github-project-sync.js +0 -37
- package/dist/src/core/hooks/github-project-sync.js.map +0 -1
- package/dist/src/core/hooks/handlers/banner-check.d.ts +0 -42
- package/dist/src/core/hooks/handlers/banner-check.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/banner-check.js +0 -180
- package/dist/src/core/hooks/handlers/banner-check.js.map +0 -1
- package/dist/src/core/hooks/handlers/banner-state.d.ts +0 -44
- package/dist/src/core/hooks/handlers/banner-state.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/banner-state.js +0 -100
- package/dist/src/core/hooks/handlers/banner-state.js.map +0 -1
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts +0 -11
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.js +0 -75
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.js.map +0 -1
- package/dist/src/core/hooks/handlers/post-tool-use.d.ts +0 -11
- package/dist/src/core/hooks/handlers/post-tool-use.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/post-tool-use.js +0 -76
- package/dist/src/core/hooks/handlers/post-tool-use.js.map +0 -1
- package/dist/src/core/hooks/handlers/stop-auto.d.ts +0 -22
- package/dist/src/core/hooks/handlers/stop-auto.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/stop-auto.js +0 -227
- package/dist/src/core/hooks/handlers/stop-auto.js.map +0 -1
- package/dist/src/core/hooks/handlers/stop-reflect.d.ts +0 -14
- package/dist/src/core/hooks/handlers/stop-reflect.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/stop-reflect.js +0 -43
- package/dist/src/core/hooks/handlers/stop-reflect.js.map +0 -1
- package/dist/src/core/hooks/handlers/stop-sync.d.ts +0 -15
- package/dist/src/core/hooks/handlers/stop-sync.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/stop-sync.js +0 -68
- package/dist/src/core/hooks/handlers/stop-sync.js.map +0 -1
- package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts +0 -14
- package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts.map +0 -1
- package/dist/src/core/hooks/handlers/user-prompt-submit.js +0 -196
- package/dist/src/core/hooks/handlers/user-prompt-submit.js.map +0 -1
- package/dist/src/core/hooks/hook-health-tracker.d.ts +0 -54
- package/dist/src/core/hooks/hook-health-tracker.d.ts.map +0 -1
- package/dist/src/core/hooks/hook-health-tracker.js +0 -140
- package/dist/src/core/hooks/hook-health-tracker.js.map +0 -1
- package/dist/src/core/hooks/hook-logger.d.ts +0 -83
- package/dist/src/core/hooks/hook-logger.d.ts.map +0 -1
- package/dist/src/core/hooks/hook-logger.js +0 -120
- package/dist/src/core/hooks/hook-logger.js.map +0 -1
- package/dist/src/core/hooks/log-rotator.d.ts +0 -51
- package/dist/src/core/hooks/log-rotator.d.ts.map +0 -1
- package/dist/src/core/hooks/log-rotator.js +0 -85
- package/dist/src/core/hooks/log-rotator.js.map +0 -1
- package/dist/src/core/hooks/pretooluse-guard.d.ts +0 -37
- package/dist/src/core/hooks/pretooluse-guard.d.ts.map +0 -1
- package/dist/src/core/hooks/pretooluse-guard.js +0 -64
- package/dist/src/core/hooks/pretooluse-guard.js.map +0 -1
- package/dist/src/core/hooks/project-scope-guard.d.ts +0 -77
- package/dist/src/core/hooks/project-scope-guard.d.ts.map +0 -1
- package/dist/src/core/hooks/project-scope-guard.js +0 -206
- package/dist/src/core/hooks/project-scope-guard.js.map +0 -1
- package/dist/src/core/hooks/types.d.ts +0 -322
- package/dist/src/core/hooks/types.d.ts.map +0 -1
- package/dist/src/core/hooks/types.js +0 -10
- package/dist/src/core/hooks/types.js.map +0 -1
- package/dist/src/core/increment/limits.d.ts +0 -68
- package/dist/src/core/increment/limits.d.ts.map +0 -1
- package/dist/src/core/increment/limits.js +0 -227
- package/dist/src/core/increment/limits.js.map +0 -1
- package/dist/src/core/living-docs/delivery/delivery-generator.d.ts +0 -58
- package/dist/src/core/living-docs/delivery/delivery-generator.d.ts.map +0 -1
- package/dist/src/core/living-docs/delivery/delivery-generator.js +0 -501
- package/dist/src/core/living-docs/delivery/delivery-generator.js.map +0 -1
- package/dist/src/core/living-docs/delivery/index.d.ts +0 -8
- package/dist/src/core/living-docs/delivery/index.d.ts.map +0 -1
- package/dist/src/core/living-docs/delivery/index.js +0 -7
- package/dist/src/core/living-docs/delivery/index.js.map +0 -1
- package/dist/src/core/living-docs/diagrams/index.d.ts +0 -8
- package/dist/src/core/living-docs/diagrams/index.d.ts.map +0 -1
- package/dist/src/core/living-docs/diagrams/index.js +0 -7
- package/dist/src/core/living-docs/diagrams/index.js.map +0 -1
- package/dist/src/core/living-docs/diagrams/mermaid-generator.d.ts +0 -113
- package/dist/src/core/living-docs/diagrams/mermaid-generator.d.ts.map +0 -1
- package/dist/src/core/living-docs/diagrams/mermaid-generator.js +0 -533
- package/dist/src/core/living-docs/diagrams/mermaid-generator.js.map +0 -1
- package/dist/src/core/living-docs/governance/ecosystem-detector.d.ts +0 -38
- package/dist/src/core/living-docs/governance/ecosystem-detector.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/ecosystem-detector.js +0 -325
- package/dist/src/core/living-docs/governance/ecosystem-detector.js.map +0 -1
- package/dist/src/core/living-docs/governance/frontend-standards-parser.d.ts +0 -74
- package/dist/src/core/living-docs/governance/frontend-standards-parser.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/frontend-standards-parser.js +0 -366
- package/dist/src/core/living-docs/governance/frontend-standards-parser.js.map +0 -1
- package/dist/src/core/living-docs/governance/go-standards-parser.d.ts +0 -64
- package/dist/src/core/living-docs/governance/go-standards-parser.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/go-standards-parser.js +0 -229
- package/dist/src/core/living-docs/governance/go-standards-parser.js.map +0 -1
- package/dist/src/core/living-docs/governance/index.d.ts +0 -50
- package/dist/src/core/living-docs/governance/index.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/index.js +0 -56
- package/dist/src/core/living-docs/governance/index.js.map +0 -1
- package/dist/src/core/living-docs/governance/java-standards-parser.d.ts +0 -89
- package/dist/src/core/living-docs/governance/java-standards-parser.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/java-standards-parser.js +0 -375
- package/dist/src/core/living-docs/governance/java-standards-parser.js.map +0 -1
- package/dist/src/core/living-docs/governance/python-standards-parser.d.ts +0 -83
- package/dist/src/core/living-docs/governance/python-standards-parser.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/python-standards-parser.js +0 -347
- package/dist/src/core/living-docs/governance/python-standards-parser.js.map +0 -1
- package/dist/src/core/living-docs/governance/standards-generator.d.ts +0 -38
- package/dist/src/core/living-docs/governance/standards-generator.d.ts.map +0 -1
- package/dist/src/core/living-docs/governance/standards-generator.js +0 -476
- package/dist/src/core/living-docs/governance/standards-generator.js.map +0 -1
- package/dist/src/core/living-docs/operations/index.d.ts +0 -8
- package/dist/src/core/living-docs/operations/index.d.ts.map +0 -1
- package/dist/src/core/living-docs/operations/index.js +0 -7
- package/dist/src/core/living-docs/operations/index.js.map +0 -1
- package/dist/src/core/living-docs/operations/ops-generator.d.ts +0 -53
- package/dist/src/core/living-docs/operations/ops-generator.d.ts.map +0 -1
- package/dist/src/core/living-docs/operations/ops-generator.js +0 -462
- package/dist/src/core/living-docs/operations/ops-generator.js.map +0 -1
- package/dist/src/core/reflect-nudge/aggregator.d.ts +0 -33
- package/dist/src/core/reflect-nudge/aggregator.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/aggregator.js +0 -80
- package/dist/src/core/reflect-nudge/aggregator.js.map +0 -1
- package/dist/src/core/reflect-nudge/eligibility.d.ts +0 -27
- package/dist/src/core/reflect-nudge/eligibility.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/eligibility.js +0 -114
- package/dist/src/core/reflect-nudge/eligibility.js.map +0 -1
- package/dist/src/core/reflect-nudge/index.d.ts +0 -14
- package/dist/src/core/reflect-nudge/index.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/index.js +0 -14
- package/dist/src/core/reflect-nudge/index.js.map +0 -1
- package/dist/src/core/reflect-nudge/interactive-prompt.d.ts +0 -28
- package/dist/src/core/reflect-nudge/interactive-prompt.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/interactive-prompt.js +0 -52
- package/dist/src/core/reflect-nudge/interactive-prompt.js.map +0 -1
- package/dist/src/core/reflect-nudge/prompt-renderer.d.ts +0 -23
- package/dist/src/core/reflect-nudge/prompt-renderer.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/prompt-renderer.js +0 -26
- package/dist/src/core/reflect-nudge/prompt-renderer.js.map +0 -1
- package/dist/src/core/reflect-nudge/session-end-nudge.d.ts +0 -31
- package/dist/src/core/reflect-nudge/session-end-nudge.d.ts.map +0 -1
- package/dist/src/core/reflect-nudge/session-end-nudge.js +0 -44
- package/dist/src/core/reflect-nudge/session-end-nudge.js.map +0 -1
- package/dist/src/core/reflection/index.d.ts +0 -23
- package/dist/src/core/reflection/index.d.ts.map +0 -1
- package/dist/src/core/reflection/index.js +0 -25
- package/dist/src/core/reflection/index.js.map +0 -1
- package/dist/src/core/reflection/reflect-handler.d.ts +0 -128
- package/dist/src/core/reflection/reflect-handler.d.ts.map +0 -1
- package/dist/src/core/reflection/reflect-handler.js +0 -742
- package/dist/src/core/reflection/reflect-handler.js.map +0 -1
- package/dist/src/core/reflection/skill-memories.d.ts +0 -113
- package/dist/src/core/reflection/skill-memories.d.ts.map +0 -1
- package/dist/src/core/reflection/skill-memories.js +0 -306
- package/dist/src/core/reflection/skill-memories.js.map +0 -1
- package/dist/src/core/scheduler/index.d.ts +0 -12
- package/dist/src/core/scheduler/index.d.ts.map +0 -1
- package/dist/src/core/scheduler/index.js +0 -12
- package/dist/src/core/scheduler/index.js.map +0 -1
- package/dist/src/core/scheduler/job-scheduler.d.ts +0 -179
- package/dist/src/core/scheduler/job-scheduler.d.ts.map +0 -1
- package/dist/src/core/scheduler/job-scheduler.js +0 -282
- package/dist/src/core/scheduler/job-scheduler.js.map +0 -1
- package/dist/src/core/scheduler/schedule-persistence.d.ts +0 -84
- package/dist/src/core/scheduler/schedule-persistence.d.ts.map +0 -1
- package/dist/src/core/scheduler/schedule-persistence.js +0 -188
- package/dist/src/core/scheduler/schedule-persistence.js.map +0 -1
- package/dist/src/core/scheduler/scheduled-job.d.ts +0 -188
- package/dist/src/core/scheduler/scheduled-job.d.ts.map +0 -1
- package/dist/src/core/scheduler/scheduled-job.js +0 -182
- package/dist/src/core/scheduler/scheduled-job.js.map +0 -1
- package/dist/src/core/scheduler/session-sync-executor.d.ts +0 -141
- package/dist/src/core/scheduler/session-sync-executor.d.ts.map +0 -1
- package/dist/src/core/scheduler/session-sync-executor.js +0 -358
- package/dist/src/core/scheduler/session-sync-executor.js.map +0 -1
- package/dist/src/core/session/reflect-checker.d.ts +0 -19
- package/dist/src/core/session/reflect-checker.d.ts.map +0 -1
- package/dist/src/core/session/reflect-checker.js +0 -30
- package/dist/src/core/session/reflect-checker.js.map +0 -1
- package/dist/src/core/sync/event-queue-ops.d.ts +0 -39
- package/dist/src/core/sync/event-queue-ops.d.ts.map +0 -1
- package/dist/src/core/sync/event-queue-ops.js +0 -109
- package/dist/src/core/sync/event-queue-ops.js.map +0 -1
- package/dist/src/core/sync/event-queue.d.ts +0 -43
- package/dist/src/core/sync/event-queue.d.ts.map +0 -1
- package/dist/src/core/sync/event-queue.js +0 -62
- package/dist/src/core/sync/event-queue.js.map +0 -1
- package/dist/src/core/sync/persistent-circuit-breaker.d.ts +0 -22
- package/dist/src/core/sync/persistent-circuit-breaker.d.ts.map +0 -1
- package/dist/src/core/sync/persistent-circuit-breaker.js +0 -65
- package/dist/src/core/sync/persistent-circuit-breaker.js.map +0 -1
- package/dist/src/core/sync/sync-resilience.d.ts +0 -49
- package/dist/src/core/sync/sync-resilience.d.ts.map +0 -1
- package/dist/src/core/sync/sync-resilience.js +0 -133
- package/dist/src/core/sync/sync-resilience.js.map +0 -1
- package/dist/src/core/us-sync-throttle.d.ts +0 -113
- package/dist/src/core/us-sync-throttle.d.ts.map +0 -1
- package/dist/src/core/us-sync-throttle.js +0 -195
- package/dist/src/core/us-sync-throttle.js.map +0 -1
- package/dist/src/hooks/auto-create-external-issue.d.ts +0 -19
- package/dist/src/hooks/auto-create-external-issue.d.ts.map +0 -1
- package/dist/src/hooks/auto-create-external-issue.js +0 -85
- package/dist/src/hooks/auto-create-external-issue.js.map +0 -1
- package/dist/src/hooks/generate-settings.d.ts +0 -8
- package/dist/src/hooks/generate-settings.d.ts.map +0 -1
- package/dist/src/hooks/generate-settings.js +0 -69
- package/dist/src/hooks/generate-settings.js.map +0 -1
- package/dist/src/hooks/hooks-status.d.ts +0 -12
- package/dist/src/hooks/hooks-status.d.ts.map +0 -1
- package/dist/src/hooks/hooks-status.js +0 -101
- package/dist/src/hooks/hooks-status.js.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -11
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/index.js +0 -11
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/hooks/platform.d.ts +0 -120
- package/dist/src/hooks/platform.d.ts.map +0 -1
- package/dist/src/hooks/platform.js +0 -278
- package/dist/src/hooks/platform.js.map +0 -1
- package/dist/src/hooks/processor.d.ts +0 -27
- package/dist/src/hooks/processor.d.ts.map +0 -1
- package/dist/src/hooks/processor.js +0 -334
- package/dist/src/hooks/processor.js.map +0 -1
- package/dist/src/hooks/scheduler-startup.d.ts +0 -19
- package/dist/src/hooks/scheduler-startup.d.ts.map +0 -1
- package/dist/src/hooks/scheduler-startup.js +0 -92
- package/dist/src/hooks/scheduler-startup.js.map +0 -1
- package/dist/src/hooks/session-start.d.ts +0 -16
- package/dist/src/hooks/session-start.d.ts.map +0 -1
- package/dist/src/hooks/session-start.js +0 -142
- package/dist/src/hooks/session-start.js.map +0 -1
- package/dist/src/integrations/ado/ado-dependency-loader.d.ts +0 -99
- package/dist/src/integrations/ado/ado-dependency-loader.d.ts.map +0 -1
- package/dist/src/integrations/ado/ado-dependency-loader.js +0 -237
- package/dist/src/integrations/ado/ado-dependency-loader.js.map +0 -1
- package/dist/src/integrations/ado/area-path-mapper.d.ts +0 -137
- package/dist/src/integrations/ado/area-path-mapper.d.ts.map +0 -1
- package/dist/src/integrations/ado/area-path-mapper.js +0 -263
- package/dist/src/integrations/ado/area-path-mapper.js.map +0 -1
- package/dist/src/integrations/jira/filter-processor.d.ts +0 -126
- package/dist/src/integrations/jira/filter-processor.d.ts.map +0 -1
- package/dist/src/integrations/jira/filter-processor.js +0 -222
- package/dist/src/integrations/jira/filter-processor.js.map +0 -1
- package/dist/src/integrations/jira/jira-dependency-loader.d.ts +0 -101
- package/dist/src/integrations/jira/jira-dependency-loader.d.ts.map +0 -1
- package/dist/src/integrations/jira/jira-dependency-loader.js +0 -200
- package/dist/src/integrations/jira/jira-dependency-loader.js.map +0 -1
- package/dist/src/integrations/jira/jira-hierarchy-mapper.d.ts +0 -107
- package/dist/src/integrations/jira/jira-hierarchy-mapper.d.ts.map +0 -1
- package/dist/src/integrations/jira/jira-hierarchy-mapper.js +0 -129
- package/dist/src/integrations/jira/jira-hierarchy-mapper.js.map +0 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +0 -97
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +0 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.js +0 -496
- package/dist/src/integrations/jira/jira-incremental-mapper.js.map +0 -1
- package/dist/src/integrations/jira/jira-mapper.d.ts +0 -127
- package/dist/src/integrations/jira/jira-mapper.d.ts.map +0 -1
- package/dist/src/integrations/jira/jira-mapper.js +0 -508
- package/dist/src/integrations/jira/jira-mapper.js.map +0 -1
- package/dist/src/integrations/jira/jira-token-provider.d.ts +0 -93
- package/dist/src/integrations/jira/jira-token-provider.d.ts.map +0 -1
- package/dist/src/integrations/jira/jira-token-provider.js +0 -160
- package/dist/src/integrations/jira/jira-token-provider.js.map +0 -1
- package/dist/src/skills/reflect-status.d.ts +0 -23
- package/dist/src/skills/reflect-status.d.ts.map +0 -1
- package/dist/src/skills/reflect-status.js +0 -55
- package/dist/src/skills/reflect-status.js.map +0 -1
- package/dist/src/sync/ado-reconciler.d.ts +0 -97
- package/dist/src/sync/ado-reconciler.d.ts.map +0 -1
- package/dist/src/sync/ado-reconciler.js +0 -370
- package/dist/src/sync/ado-reconciler.js.map +0 -1
- package/dist/src/sync/ado-sync-wrapper.d.ts +0 -137
- package/dist/src/sync/ado-sync-wrapper.d.ts.map +0 -1
- package/dist/src/sync/ado-sync-wrapper.js +0 -148
- package/dist/src/sync/ado-sync-wrapper.js.map +0 -1
- package/dist/src/sync/base-reconciler.d.ts +0 -120
- package/dist/src/sync/base-reconciler.d.ts.map +0 -1
- package/dist/src/sync/base-reconciler.js +0 -166
- package/dist/src/sync/base-reconciler.js.map +0 -1
- package/dist/src/sync/engine.d.ts +0 -139
- package/dist/src/sync/engine.d.ts.map +0 -1
- package/dist/src/sync/engine.js +0 -129
- package/dist/src/sync/engine.js.map +0 -1
- package/dist/src/sync/external-item-sync-service.d.ts +0 -159
- package/dist/src/sync/external-item-sync-service.d.ts.map +0 -1
- package/dist/src/sync/external-item-sync-service.js +0 -446
- package/dist/src/sync/external-item-sync-service.js.map +0 -1
- package/dist/src/sync/github-sync-wrapper.d.ts +0 -195
- package/dist/src/sync/github-sync-wrapper.d.ts.map +0 -1
- package/dist/src/sync/github-sync-wrapper.js +0 -220
- package/dist/src/sync/github-sync-wrapper.js.map +0 -1
- package/dist/src/sync/hierarchy.d.ts +0 -52
- package/dist/src/sync/hierarchy.d.ts.map +0 -1
- package/dist/src/sync/hierarchy.js +0 -101
- package/dist/src/sync/hierarchy.js.map +0 -1
- package/dist/src/sync/jira-reconciler.d.ts +0 -109
- package/dist/src/sync/jira-reconciler.d.ts.map +0 -1
- package/dist/src/sync/jira-reconciler.js +0 -429
- package/dist/src/sync/jira-reconciler.js.map +0 -1
- package/dist/src/sync/jira-sync-wrapper.d.ts +0 -155
- package/dist/src/sync/jira-sync-wrapper.d.ts.map +0 -1
- package/dist/src/sync/jira-sync-wrapper.js +0 -175
- package/dist/src/sync/jira-sync-wrapper.js.map +0 -1
- package/dist/src/sync/migration.d.ts +0 -46
- package/dist/src/sync/migration.d.ts.map +0 -1
- package/dist/src/sync/migration.js +0 -97
- package/dist/src/sync/migration.js.map +0 -1
- package/dist/src/sync/projects-v2.d.ts +0 -61
- package/dist/src/sync/projects-v2.d.ts.map +0 -1
- package/dist/src/sync/projects-v2.js +0 -145
- package/dist/src/sync/projects-v2.js.map +0 -1
- package/dist/src/sync/providers/ado.d.ts +0 -54
- package/dist/src/sync/providers/ado.d.ts.map +0 -1
- package/dist/src/sync/providers/ado.js +0 -388
- package/dist/src/sync/providers/ado.js.map +0 -1
- package/dist/src/sync/providers/github.d.ts +0 -41
- package/dist/src/sync/providers/github.d.ts.map +0 -1
- package/dist/src/sync/providers/github.js +0 -237
- package/dist/src/sync/providers/github.js.map +0 -1
- package/dist/src/sync/providers/jira.d.ts +0 -44
- package/dist/src/sync/providers/jira.d.ts.map +0 -1
- package/dist/src/sync/providers/jira.js +0 -310
- package/dist/src/sync/providers/jira.js.map +0 -1
- package/dist/src/utils/auto-install.d.ts +0 -47
- package/dist/src/utils/auto-install.d.ts.map +0 -1
- package/dist/src/utils/auto-install.js +0 -220
- package/dist/src/utils/auto-install.js.map +0 -1
- package/dist/src/utils/image-generator.d.ts +0 -315
- package/dist/src/utils/image-generator.d.ts.map +0 -1
- package/dist/src/utils/image-generator.js +0 -588
- package/dist/src/utils/image-generator.js.map +0 -1
- package/plugins/COMMANDS-VS-SKILLS-ANALYSIS.md +0 -182
- package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +0 -265
- package/plugins/SKILLS-VS-AGENTS.md +0 -267
- package/plugins/VALIDATION-REPORT.md +0 -134
- package/plugins/specweave/agents/sw-architect.md +0 -22
- package/plugins/specweave/agents/sw-planner.md +0 -81
- package/plugins/specweave/agents/sw-pm.md +0 -23
- package/plugins/specweave/commands/abandon.md +0 -320
- package/plugins/specweave/commands/ado-cleanup-duplicates.md +0 -211
- package/plugins/specweave/commands/ado-clone.md +0 -385
- package/plugins/specweave/commands/ado-close.md +0 -238
- package/plugins/specweave/commands/ado-create.md +0 -178
- package/plugins/specweave/commands/ado-import-areas.md +0 -357
- package/plugins/specweave/commands/ado-import-projects.md +0 -330
- package/plugins/specweave/commands/ado-pull.md +0 -488
- package/plugins/specweave/commands/ado-push.md +0 -388
- package/plugins/specweave/commands/ado-reconcile.md +0 -119
- package/plugins/specweave/commands/ado-status.md +0 -62
- package/plugins/specweave/commands/ado-sync.md +0 -330
- package/plugins/specweave/commands/analytics.md +0 -154
- package/plugins/specweave/commands/archive.md +0 -488
- package/plugins/specweave/commands/auto-status.md +0 -123
- package/plugins/specweave/commands/cancel-auto.md +0 -94
- package/plugins/specweave/commands/diagrams-generate.md +0 -172
- package/plugins/specweave/commands/discrepancies.md +0 -142
- package/plugins/specweave/commands/discrepancy-to-increment.md +0 -188
- package/plugins/specweave/commands/docs-build.md +0 -159
- package/plugins/specweave/commands/docs-generate.md +0 -445
- package/plugins/specweave/commands/docs-health.md +0 -267
- package/plugins/specweave/commands/docs-init.md +0 -338
- package/plugins/specweave/commands/docs-organize.md +0 -183
- package/plugins/specweave/commands/docs-validate.md +0 -249
- package/plugins/specweave/commands/docs-view.md +0 -390
- package/plugins/specweave/commands/docs.md +0 -215
- package/plugins/specweave/commands/doctor.md +0 -68
- package/plugins/specweave/commands/fix-duplicates.md +0 -517
- package/plugins/specweave/commands/framework.md +0 -530
- package/plugins/specweave/commands/github-cleanup-duplicates.md +0 -229
- package/plugins/specweave/commands/github-clone.md +0 -634
- package/plugins/specweave/commands/github-close.md +0 -440
- package/plugins/specweave/commands/github-create.md +0 -330
- package/plugins/specweave/commands/github-pull.md +0 -139
- package/plugins/specweave/commands/github-push.md +0 -151
- package/plugins/specweave/commands/github-reconcile.md +0 -111
- package/plugins/specweave/commands/github-status.md +0 -532
- package/plugins/specweave/commands/github-sync.md +0 -701
- package/plugins/specweave/commands/github-update-user-story.md +0 -155
- package/plugins/specweave/commands/handoff.md +0 -54
- package/plugins/specweave/commands/import-external.md +0 -461
- package/plugins/specweave/commands/jira-cleanup-duplicates.md +0 -218
- package/plugins/specweave/commands/jira-close.md +0 -294
- package/plugins/specweave/commands/jira-create.md +0 -195
- package/plugins/specweave/commands/jira-import-boards.md +0 -330
- package/plugins/specweave/commands/jira-import-projects-full.md +0 -297
- package/plugins/specweave/commands/jira-import-projects.md +0 -96
- package/plugins/specweave/commands/jira-pull.md +0 -161
- package/plugins/specweave/commands/jira-push.md +0 -167
- package/plugins/specweave/commands/jira-reconcile.md +0 -122
- package/plugins/specweave/commands/jira-status.md +0 -212
- package/plugins/specweave/commands/jira-sync.md +0 -254
- package/plugins/specweave/commands/jobs.md +0 -52
- package/plugins/specweave/commands/living-docs.md +0 -567
- package/plugins/specweave/commands/lsp.md +0 -205
- package/plugins/specweave/commands/next.md +0 -81
- package/plugins/specweave/commands/progress.md +0 -39
- package/plugins/specweave/commands/qa.md +0 -295
- package/plugins/specweave/commands/reconcile.md +0 -440
- package/plugins/specweave/commands/reflect.md +0 -264
- package/plugins/specweave/commands/release-align.md +0 -504
- package/plugins/specweave/commands/release-init.md +0 -429
- package/plugins/specweave/commands/release-npm.md +0 -1084
- package/plugins/specweave/commands/release-platform.md +0 -438
- package/plugins/specweave/commands/release-rc.md +0 -494
- package/plugins/specweave/commands/restore.md +0 -309
- package/plugins/specweave/commands/save.md +0 -220
- package/plugins/specweave/commands/state.md +0 -209
- package/plugins/specweave/commands/sync-setup.md +0 -161
- package/plugins/specweave/commands/sync-status.md +0 -356
- package/plugins/specweave/commands/team-status.md +0 -70
- package/plugins/specweave/commands/update-instructions.md +0 -81
- package/plugins/specweave/lib/external-sync/hooks-common.sh +0 -266
- package/plugins/specweave/lib/hooks/auto-transition.js +0 -50
- package/plugins/specweave/lib/hooks/auto-transition.ts +0 -84
- package/plugins/specweave/lib/hooks/close-github-issues-abandoned.js +0 -37
- package/plugins/specweave/lib/hooks/close-github-issues-abandoned.ts +0 -59
- package/plugins/specweave/lib/hooks/git-diff-analyzer.d.js +0 -0
- package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +0 -89
- package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/git-diff-analyzer.js +0 -142
- package/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +0 -1
- package/plugins/specweave/lib/hooks/git-diff-analyzer.ts +0 -269
- package/plugins/specweave/lib/hooks/invoke-translator-skill.d.js +0 -0
- package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +0 -60
- package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/invoke-translator-skill.js +0 -156
- package/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +0 -1
- package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +0 -265
- package/plugins/specweave/lib/hooks/launch-codebase-rescan.js +0 -90
- package/plugins/specweave/lib/hooks/launch-codebase-rescan.ts +0 -135
- package/plugins/specweave/lib/hooks/prepare-reflection-context.d.js +0 -0
- package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +0 -42
- package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/prepare-reflection-context.js +0 -110
- package/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +0 -1
- package/plugins/specweave/lib/hooks/prepare-reflection-context.ts +0 -178
- package/plugins/specweave/lib/hooks/project-bridge.js +0 -82
- package/plugins/specweave/lib/hooks/reflection-config-loader.d.js +0 -0
- package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +0 -45
- package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-config-loader.js +0 -92
- package/plugins/specweave/lib/hooks/reflection-config-loader.js.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-config-loader.ts +0 -156
- package/plugins/specweave/lib/hooks/reflection-parser.d.js +0 -0
- package/plugins/specweave/lib/hooks/reflection-parser.d.ts +0 -33
- package/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-parser.js +0 -301
- package/plugins/specweave/lib/hooks/reflection-parser.js.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-parser.ts +0 -484
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.js +0 -0
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +0 -56
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.js +0 -182
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.ts +0 -306
- package/plugins/specweave/lib/hooks/reflection-storage.d.js +0 -0
- package/plugins/specweave/lib/hooks/reflection-storage.d.ts +0 -64
- package/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-storage.js +0 -231
- package/plugins/specweave/lib/hooks/reflection-storage.js.map +0 -1
- package/plugins/specweave/lib/hooks/reflection-storage.ts +0 -369
- package/plugins/specweave/lib/hooks/reopen-github-issues.js +0 -37
- package/plugins/specweave/lib/hooks/reopen-github-issues.ts +0 -59
- package/plugins/specweave/lib/hooks/run-self-reflection.d.js +0 -0
- package/plugins/specweave/lib/hooks/run-self-reflection.d.ts +0 -43
- package/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/run-self-reflection.js +0 -132
- package/plugins/specweave/lib/hooks/run-self-reflection.js.map +0 -1
- package/plugins/specweave/lib/hooks/run-self-reflection.ts +0 -258
- package/plugins/specweave/lib/hooks/session-start-reconcile-worker.js +0 -36
- package/plugins/specweave/lib/hooks/session-start-reconcile-worker.ts +0 -58
- package/plugins/specweave/lib/hooks/sync-cache.js +0 -295
- package/plugins/specweave/lib/hooks/sync-increment-closure.js +0 -66
- package/plugins/specweave/lib/hooks/sync-increment-closure.ts +0 -111
- package/plugins/specweave/lib/hooks/sync-living-docs.d.js +0 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.d.ts +0 -27
- package/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.js +0 -494
- package/plugins/specweave/lib/hooks/sync-living-docs.js.map +0 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.ts.DISABLED +0 -482
- package/plugins/specweave/lib/hooks/sync-us-tasks.js +0 -476
- package/plugins/specweave/lib/hooks/translate-file.d.js +0 -0
- package/plugins/specweave/lib/hooks/translate-file.d.ts +0 -59
- package/plugins/specweave/lib/hooks/translate-file.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/translate-file.js +0 -290
- package/plugins/specweave/lib/hooks/translate-file.js.map +0 -1
- package/plugins/specweave/lib/hooks/translate-file.ts +0 -429
- package/plugins/specweave/lib/hooks/translate-living-docs.d.js +0 -0
- package/plugins/specweave/lib/hooks/translate-living-docs.d.ts +0 -13
- package/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/translate-living-docs.js +0 -120
- package/plugins/specweave/lib/hooks/translate-living-docs.js.map +0 -1
- package/plugins/specweave/lib/hooks/translate-living-docs.ts +0 -225
- package/plugins/specweave/lib/hooks/types/reflection-types.d.js +0 -0
- package/plugins/specweave/lib/hooks/types/reflection-types.d.ts +0 -164
- package/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/types/reflection-types.js +0 -58
- package/plugins/specweave/lib/hooks/types/reflection-types.js.map +0 -1
- package/plugins/specweave/lib/hooks/types/reflection-types.ts +0 -193
- package/plugins/specweave/lib/hooks/update-ac-status.js +0 -188
- package/plugins/specweave/lib/hooks/update-ac-status.ts +0 -340
- package/plugins/specweave/lib/hooks/update-tasks-md.d.js +0 -1
- package/plugins/specweave/lib/hooks/update-tasks-md.d.ts +0 -29
- package/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +0 -1
- package/plugins/specweave/lib/hooks/update-tasks-md.js +0 -296
- package/plugins/specweave/lib/hooks/update-tasks-md.js.map +0 -1
- package/plugins/specweave/lib/hooks/update-tasks-md.ts +0 -489
- package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +0 -169
- package/plugins/specweave/lib/hooks/us-completion-orchestrator.ts +0 -318
- package/plugins/specweave/lib/integrations/ado/ado-board-resolver.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/ado-board-resolver.d.ts +0 -94
- package/plugins/specweave/lib/integrations/ado/ado-board-resolver.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-board-resolver.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-client-v2.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/ado-client-v2.d.ts +0 -134
- package/plugins/specweave/lib/integrations/ado/ado-client-v2.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-client-v2.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-client.d.js +0 -4
- package/plugins/specweave/lib/integrations/ado/ado-client.d.ts +0 -112
- package/plugins/specweave/lib/integrations/ado/ado-client.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-client.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-hierarchical-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/ado-hierarchical-sync.d.ts +0 -40
- package/plugins/specweave/lib/integrations/ado/ado-hierarchical-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-hierarchical-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-spec-commit-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/ado-spec-commit-sync.d.ts +0 -38
- package/plugins/specweave/lib/integrations/ado/ado-spec-commit-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-spec-commit-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-spec-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/ado-spec-sync.d.ts +0 -100
- package/plugins/specweave/lib/integrations/ado/ado-spec-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/ado-spec-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/ado/project-selector.d.js +0 -0
- package/plugins/specweave/lib/integrations/ado/project-selector.d.ts +0 -42
- package/plugins/specweave/lib/integrations/ado/project-selector.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/ado/project-selector.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-board-resolver.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-board-resolver.d.ts +0 -54
- package/plugins/specweave/lib/integrations/github/github-board-resolver.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-board-resolver.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-client.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-client.d.ts +0 -96
- package/plugins/specweave/lib/integrations/github/github-client.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-client.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-hierarchical-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-hierarchical-sync.d.ts +0 -29
- package/plugins/specweave/lib/integrations/github/github-hierarchical-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-hierarchical-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-issue-updater.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-issue-updater.d.ts +0 -61
- package/plugins/specweave/lib/integrations/github/github-issue-updater.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-issue-updater.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-spec-commit-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-spec-commit-sync.d.ts +0 -37
- package/plugins/specweave/lib/integrations/github/github-spec-commit-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-spec-commit-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-spec-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/github-spec-sync.d.ts +0 -108
- package/plugins/specweave/lib/integrations/github/github-spec-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/github-spec-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/index.d.js +0 -11
- package/plugins/specweave/lib/integrations/github/index.d.ts +0 -10
- package/plugins/specweave/lib/integrations/github/index.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/index.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/repo-selector.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/repo-selector.d.ts +0 -49
- package/plugins/specweave/lib/integrations/github/repo-selector.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/repo-selector.js.map +0 -1
- package/plugins/specweave/lib/integrations/github/types.d.js +0 -0
- package/plugins/specweave/lib/integrations/github/types.d.ts +0 -80
- package/plugins/specweave/lib/integrations/github/types.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/github/types.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-board-resolver.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/jira-board-resolver.d.ts +0 -50
- package/plugins/specweave/lib/integrations/jira/jira-board-resolver.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-board-resolver.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-hierarchical-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/jira-hierarchical-sync.d.ts +0 -33
- package/plugins/specweave/lib/integrations/jira/jira-hierarchical-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-hierarchical-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-spec-commit-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/jira-spec-commit-sync.d.ts +0 -43
- package/plugins/specweave/lib/integrations/jira/jira-spec-commit-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-spec-commit-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-spec-sync.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/jira-spec-sync.d.ts +0 -105
- package/plugins/specweave/lib/integrations/jira/jira-spec-sync.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/jira-spec-sync.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/project-selector.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/project-selector.d.ts +0 -42
- package/plugins/specweave/lib/integrations/jira/project-selector.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/project-selector.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/reorganization-detector.d.js +0 -0
- package/plugins/specweave/lib/integrations/jira/reorganization-detector.d.ts +0 -67
- package/plugins/specweave/lib/integrations/jira/reorganization-detector.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/reorganization-detector.js.map +0 -1
- package/plugins/specweave/lib/integrations/jira/setup-wizard.d.js +0 -4
- package/plugins/specweave/lib/integrations/jira/setup-wizard.d.ts +0 -29
- package/plugins/specweave/lib/integrations/jira/setup-wizard.d.ts.map +0 -1
- package/plugins/specweave/lib/integrations/jira/setup-wizard.js.map +0 -1
- package/plugins/specweave/scripts/analyze-standards.sh +0 -315
- package/plugins/specweave/scripts/auto-status.sh +0 -283
- package/plugins/specweave/scripts/cancel-auto.sh +0 -144
- package/plugins/specweave/scripts/cleanup-legacy-state.sh +0 -80
- package/plugins/specweave/scripts/cleanup-state.sh +0 -168
- package/plugins/specweave/scripts/force-kill.sh +0 -133
- package/plugins/specweave/scripts/heartbeat.sh +0 -134
- package/plugins/specweave/scripts/hook-health.sh +0 -441
- package/plugins/specweave/scripts/jira/import-projects.js +0 -181
- package/plugins/specweave/scripts/jira/import-projects.ts +0 -286
- package/plugins/specweave/scripts/lsp-check.sh +0 -331
- package/plugins/specweave/scripts/lsp-warmup.sh +0 -144
- package/plugins/specweave/scripts/read-analytics.sh +0 -286
- package/plugins/specweave/scripts/read-costs.sh +0 -132
- package/plugins/specweave/scripts/read-grill-context.sh +0 -149
- package/plugins/specweave/scripts/read-jobs.sh +0 -371
- package/plugins/specweave/scripts/read-progress.sh +0 -413
- package/plugins/specweave/scripts/read-status.sh +0 -146
- package/plugins/specweave/scripts/read-workflow.sh +0 -173
- package/plugins/specweave/scripts/reflect-check.sh +0 -250
- package/plugins/specweave/scripts/setup-auto.sh +0 -603
- package/plugins/specweave/scripts/tests/test-setup-auto-selection.sh +0 -74
- package/plugins/specweave/scripts/tests/test-setup-auto-usergoal.sh +0 -83
- package/plugins/specweave/scripts/track-analytics.sh +0 -118
- package/plugins/specweave/scripts/update-dashboard-cache.sh +0 -338
- package/plugins/specweave/skills/ado-mapper/SKILL.md +0 -464
- package/plugins/specweave/skills/ado-multi-project/SKILL.md +0 -550
- package/plugins/specweave/skills/ado-resource-validator/SKILL.md +0 -901
- package/plugins/specweave/skills/ado-sync/README.md +0 -414
- package/plugins/specweave/skills/ado-sync/SKILL.md +0 -449
- package/plugins/specweave/skills/analytics/SKILL.md +0 -46
- package/plugins/specweave/skills/architect/SKILL.md +0 -113
- package/plugins/specweave/skills/close-all/SKILL.md +0 -51
- package/plugins/specweave/skills/code-reviewer/SKILL.md +0 -632
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-comments.md +0 -83
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-silent-failures.md +0 -84
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-spec-compliance.md +0 -102
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-tests.md +0 -101
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-types.md +0 -88
- package/plugins/specweave/skills/debug/SKILL.md +0 -220
- package/plugins/specweave/skills/diagrams/SKILL.md +0 -748
- package/plugins/specweave/skills/e2e/SKILL.md +0 -425
- package/plugins/specweave/skills/e2e/evals/evals.json +0 -122
- package/plugins/specweave/skills/get/SKILL.md +0 -116
- package/plugins/specweave/skills/github-issue-standard/SKILL.md +0 -13
- package/plugins/specweave/skills/github-multi-project/SKILL.md +0 -258
- package/plugins/specweave/skills/github-sync/SKILL.md +0 -40
- package/plugins/specweave/skills/github-sync/evals/HOW-TO-RUN-EVALS.md +0 -50
- package/plugins/specweave/skills/github-sync/evals/evals.json +0 -136
- package/plugins/specweave/skills/grill/SKILL.md +0 -483
- package/plugins/specweave/skills/help/SKILL.md +0 -179
- package/plugins/specweave/skills/image/SKILL.md +0 -427
- package/plugins/specweave/skills/import/SKILL.md +0 -191
- package/plugins/specweave/skills/jira-mapper/SKILL.md +0 -638
- package/plugins/specweave/skills/jira-resource-validator/SKILL.md +0 -743
- package/plugins/specweave/skills/jira-sync/README.md +0 -291
- package/plugins/specweave/skills/jira-sync/SKILL.md +0 -252
- package/plugins/specweave/skills/judge-llm/SKILL.md +0 -235
- package/plugins/specweave/skills/multi-project/SKILL.md +0 -371
- package/plugins/specweave/skills/npm/SKILL.md +0 -1083
- package/plugins/specweave/skills/plan/SKILL.md +0 -308
- package/plugins/specweave/skills/pm/SKILL.md +0 -149
- package/plugins/specweave/skills/pm/phases/00-deep-interview.md +0 -352
- package/plugins/specweave/skills/pm/phases/01-research.md +0 -80
- package/plugins/specweave/skills/pm/phases/02-spec-creation.md +0 -142
- package/plugins/specweave/skills/pm/phases/03-validation.md +0 -89
- package/plugins/specweave/skills/pm/templates/spec-template.md +0 -159
- package/plugins/specweave/skills/pr/SKILL.md +0 -257
- package/plugins/specweave/skills/pr-review/SKILL.md +0 -167
- package/plugins/specweave/skills/progress-sync/SKILL.md +0 -452
- package/plugins/specweave/skills/release-expert/SKILL.md +0 -502
- package/plugins/specweave/skills/remotion/SKILL.md +0 -227
- package/plugins/specweave/skills/skill-gen/SKILL.md +0 -186
- package/plugins/specweave/skills/skill-gen/evals/evals.json +0 -79
- package/plugins/specweave/skills/skill-refine/SKILL.md +0 -97
- package/plugins/specweave/skills/sync-docs/SKILL.md +0 -72
- package/plugins/specweave/skills/tdd-cycle/SKILL.md +0 -267
- package/plugins/specweave/skills/tdd-green/SKILL.md +0 -84
- package/plugins/specweave/skills/tdd-red/SKILL.md +0 -90
- package/plugins/specweave/skills/tdd-refactor/SKILL.md +0 -59
- package/plugins/specweave/skills/team-build/SKILL.md +0 -29
- package/plugins/specweave/skills/team-lead/SKILL.md +0 -1239
- package/plugins/specweave/skills/team-lead/reference/dynamic-workflows.md +0 -144
- package/plugins/specweave/skills/team-merge/SKILL.md +0 -230
- package/plugins/specweave/skills/umbrella/SKILL.md +0 -406
- package/plugins/specweave/skills/validate/SKILL.md +0 -135
- package/plugins/specweave/skills/video/SKILL.md +0 -350
- package/src/templates/COMPLETION-REPORT.template.md +0 -128
- package/src/templates/MEMORY-template.md +0 -9
- package/src/templates/config-permissions-guide.md +0 -413
- package/src/templates/config.json.template +0 -18
- package/src/templates/docs/rfc-template.md +0 -229
- package/src/templates/increment-metadata-template.yaml +0 -138
- package/src/templates/tasks.md.template +0 -269
- /package/plugins/specweave/skills/{team-lead → team}/agents/brainstorm-advocate.md +0 -0
- /package/plugins/specweave/skills/{team-lead → team}/agents/brainstorm-critic.md +0 -0
- /package/plugins/specweave/skills/{team-lead → team}/agents/brainstorm-pragmatist.md +0 -0
- /package/plugins/specweave/skills/{team-lead → team}/agents/researcher.md +0 -0
- /package/plugins/specweave/skills/{team-lead → team}/agents/reviewer-security.md +0 -0
|
@@ -1,272 +1,711 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Instruction File Merger -
|
|
3
|
-
*
|
|
2
|
+
* Instruction File Merger (2.0) - CLAUDE.md / AGENTS.md
|
|
3
|
+
*
|
|
4
|
+
* parse → classify → render.
|
|
5
|
+
*
|
|
6
|
+
* File layout produced:
|
|
7
|
+
* [user content that was above the META line]
|
|
8
|
+
* <!-- SW:META template=".." version=".." sections=".." -->
|
|
9
|
+
* <!-- SW:SECTION:id version=".." --> … <!-- SW:END:id --> (template order)
|
|
10
|
+
* [user-owned tail: ## Commands / ## Project notes] (added once)
|
|
11
|
+
* [all other user content, in original order]
|
|
12
|
+
*
|
|
13
|
+
* Guarantees:
|
|
14
|
+
* - user content (anything outside SW markers) is never dropped
|
|
15
|
+
* - sections removed from the template are deleted, ids reported
|
|
16
|
+
* - a section's version attr changes only when its body changed
|
|
17
|
+
* - idempotent: a second run over the output is byte-identical
|
|
18
|
+
* - broken markers are repaired (body kept as user content), never abort
|
|
19
|
+
* - legacy 1.x files (no markers, or "↓ ORIGINAL ↓" stacks) are stripped of
|
|
20
|
+
* known 1.x template blocks by heading and de-duplicated
|
|
4
21
|
*/
|
|
5
22
|
import * as fs from '../../../utils/fs-native.js';
|
|
6
23
|
import * as path from 'path';
|
|
7
24
|
import { createRequire } from 'module';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
import { fileURLToPath } from 'url';
|
|
26
|
+
/** Major version of the managed-block schema. Files below it are migrated. */
|
|
27
|
+
export const TEMPLATE_SCHEMA_MAJOR = 2;
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// Marker grammar
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
const META_RE = /<!-- SW:META\b([^>]*)-->/;
|
|
32
|
+
const START_RE = /^\s*<!-- SW:SECTION:([\w-]+)(?:\s+version="([^"]*)")?\s*-->\s*$/;
|
|
33
|
+
const END_RE = /^\s*<!-- SW:END:([\w-]+)\s*-->\s*$/;
|
|
34
|
+
const LEGACY_MARKER_RE = /^\s*<!--\s*↓\s*(?:ORIGINAL|PROJECT-SPECIFIC)[^>]*-->\s*$/;
|
|
35
|
+
const TEMPLATE_START_RE = /^\s*<!-- SECTION:([\w-]+)((?:\s+[\w-]+(?:="[^"]*")?)*)\s*-->\s*$/;
|
|
36
|
+
const TEMPLATE_END_RE = /^\s*<!-- \/SECTION -->\s*$/;
|
|
37
|
+
const HR_RE = /^\s*---\s*$/;
|
|
38
|
+
const H2_RE = /^## /;
|
|
39
|
+
const H1_RE = /^# /;
|
|
40
|
+
const FENCE_RE = /^\s*(```|~~~)/;
|
|
41
|
+
/** Lines that were part of 1.x templates but carry no heading. */
|
|
42
|
+
const LEGACY_LINE_RES = [
|
|
43
|
+
/^# .+ - SpecWeave Reference\s*$/,
|
|
44
|
+
/^\*\*Framework\*\*: SpecWeave\b/,
|
|
45
|
+
/^<!-- API: Enable `apiDocs`/,
|
|
46
|
+
/^\*\*Generated by SpecWeave\*\*/,
|
|
47
|
+
/^\*\*Compatible with\*\*: Claude Code/,
|
|
48
|
+
/^\*\*Last Updated\*\*: \{TIMESTAMP\}/,
|
|
49
|
+
/^<!-- Auto-generated by SpecWeave/,
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Known 1.x template H2 headings per template type. A block is stripped when
|
|
53
|
+
* its heading matches AND (no signatures are listed OR the body contains one
|
|
54
|
+
* of them). Signatures protect user-written sections that reuse a generic
|
|
55
|
+
* heading such as "## Rules" or "## Structure".
|
|
56
|
+
*/
|
|
57
|
+
const LEGACY_HEADINGS = {
|
|
58
|
+
claude: {
|
|
59
|
+
'Hook Instructions Override Everything': [],
|
|
60
|
+
'Skills & Plugins': ['Skill chaining', 'Complexity gate', 'Skill({ skill:'],
|
|
61
|
+
'LSP (Code Intelligence)': [],
|
|
62
|
+
'Getting Started': ['Your first increment starts at'],
|
|
63
|
+
'Auto-Detection': ['auto-route', 'Opt-out phrases'],
|
|
64
|
+
'Workflow Orchestration': ['Plan Mode Default', 'Subagent Strategy', 'Verification Before Done', 'Think-Before-Act'],
|
|
65
|
+
'Rules': ['.specweave/increments/####-name/', 'Unique IDs', 'emergency mode', 'Initialization guard'],
|
|
66
|
+
'Workflow': ['| Cmd | Action |', 'Ship while sleeping'],
|
|
67
|
+
'Nested Repos': ['for d in repositories', 'Before git operations'],
|
|
68
|
+
'Context': ['Check ADRs at', '/sw:docs <topic>'],
|
|
69
|
+
'Structure': ['Increment root', 'Everything else → subfolders'],
|
|
70
|
+
'Task Format': ['Satisfies ACs', '**User Story**: US-001'],
|
|
71
|
+
'Secrets': ['grep -q'],
|
|
72
|
+
'External Sync': ['Feature→Milestone', 'progress-sync'],
|
|
73
|
+
'Testing Pipeline (MANDATORY)': [],
|
|
74
|
+
'TDD': ['defaultTestMode', 'RED→GREEN→REFACTOR'],
|
|
75
|
+
'Limits': ['Max 1500 lines/file'],
|
|
76
|
+
'Troubleshooting': ['Skills missing', 'refresh-plugins', 'Restart Claude Code'],
|
|
77
|
+
'Plugin Auto-Loading': [],
|
|
78
|
+
'Principles': ['Spec-first', 'No Laziness'],
|
|
79
|
+
'Bidirectional Linking': [],
|
|
80
|
+
'External Services': ['CLI tools first'],
|
|
81
|
+
'Auto Mode': ['/sw:auto', 'IMPLEMENT → TEST'],
|
|
82
|
+
'Docs': ['verified-skill.com', 'spec-weave.com'],
|
|
83
|
+
'Using SpecWeave with Other AI Tools': [],
|
|
84
|
+
// older 1.x headings (unambiguous)
|
|
85
|
+
'Meta-Rule: Think-Before-Act': [],
|
|
86
|
+
'Lazy Plugin Loading': [],
|
|
87
|
+
'SpecWeave Auto-Routing (CRITICAL)': [],
|
|
88
|
+
'Self-Improving Skills (Reflect)': [],
|
|
89
|
+
'Non-Claude AI Tools': [],
|
|
90
|
+
'Secrets Check': ['grep -q'],
|
|
91
|
+
'Quick Commands': ['sw:increment'],
|
|
92
|
+
'Living Docs Context': [],
|
|
93
|
+
'Claude Code Concepts (2.1.3+)': [],
|
|
94
|
+
'Auto-Execute Rule (CRITICAL)': [],
|
|
95
|
+
},
|
|
96
|
+
agents: {
|
|
97
|
+
'Essential Rules': ['NEVER pollute project root', 'ONLY 4 files in increment root'],
|
|
98
|
+
'Workflow Orchestration': [
|
|
99
|
+
'Plan Before Code',
|
|
100
|
+
'Verify Before Done',
|
|
101
|
+
'Dependencies First',
|
|
102
|
+
'Claude Code has built-in orchestration',
|
|
103
|
+
'EnterPlanMode',
|
|
104
|
+
],
|
|
105
|
+
'Core Principles (Quality)': [],
|
|
106
|
+
'Commands Reference': ['sw:increment', '| Tool | Invocation |'],
|
|
107
|
+
'Non-Claude Tools (Cursor, Copilot, etc.)': [],
|
|
108
|
+
'Sync Workflow': ['sw:progress-sync', 'Source of Truth'],
|
|
109
|
+
'Context Loading': ['Token-Efficient', 'Read only what'],
|
|
110
|
+
'Project Structure': ['Every workspace uses `repositories/`', 'Feature increments (0001-9999)', 'Living docs (extracted user stories)'],
|
|
111
|
+
'Agents (Roles)': ['{AGENTS_SECTION}', 'Adopt role perspective'],
|
|
112
|
+
'Skills (Capabilities)': ['{SKILLS_SECTION}', 'Skills auto-activate', '.cursor/skills/'],
|
|
113
|
+
'Task Format': ['Satisfies ACs', '**User Story**: US-001', 'Test Plan'],
|
|
114
|
+
'User Story Format (CRITICAL for spec.md)': [],
|
|
115
|
+
'Workflows': ['specweave context projects', 'sw:grill', 'Creating Increment'],
|
|
116
|
+
'Troubleshooting': ['non-Claude', 'sw:progress-sync', 'Missing **Project**'],
|
|
117
|
+
'Documentation': ['| Resource | Purpose |', 'verified-skill.com'],
|
|
118
|
+
// older 1.x headings (unambiguous)
|
|
119
|
+
'🚨 CRITICAL: How to Use This File (Non-Claude Code Tools)': [],
|
|
120
|
+
'📑 SECTION INDEX (Your Navigation Menu)': [],
|
|
121
|
+
'Section Index (Use Ctrl+F to Navigate)': [],
|
|
122
|
+
'🎯 CRITICAL: Skills Are Your Expert Manuals (Read First!)': [],
|
|
123
|
+
'🚀 SpecWeave Commands (Executable Workflows)': [],
|
|
124
|
+
'🔌 Plugin Architecture (IMPORTANT FOR NON-CLAUDE TOOLS)': [],
|
|
125
|
+
'🔗 External Tracker Sync (CRITICAL FOR NON-CLAUDE TOOLS)': [],
|
|
126
|
+
'📝 Documentation Updates (CRITICAL FOR NON-CLAUDE TOOLS)': [],
|
|
127
|
+
'Available Agents (Specialized Roles)': [],
|
|
128
|
+
'Available Skills (Specialized Capabilities)': [],
|
|
129
|
+
'Finding the Right Agent or Skill': [],
|
|
130
|
+
'Quick Start': ['specweave context projects', '/sw:increment', 'Create Your First Increment'],
|
|
131
|
+
'Plugin Commands': ['| Command | Plugin |', 'sw-github:sync'],
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
/** "## Skill Memories": template boilerplate is dropped, user bullets are kept. */
|
|
135
|
+
const SKILL_MEMORIES_HEADING = 'Skill Memories';
|
|
136
|
+
const SKILL_MEMORIES_BOILERPLATE = [
|
|
137
|
+
/^SpecWeave learns from corrections\./,
|
|
138
|
+
/^\*\*Disable\*\*: Set `"reflect"/,
|
|
139
|
+
];
|
|
140
|
+
// ---------------------------------------------------------------------------
|
|
141
|
+
// Template parsing
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
143
|
+
export function parseTemplate(content) {
|
|
144
|
+
const lines = content.replace(/\r\n/g, '\n').split('\n');
|
|
145
|
+
const sections = [];
|
|
146
|
+
let cur = null;
|
|
147
|
+
let lastEnd = -1;
|
|
148
|
+
const flush = () => {
|
|
149
|
+
if (!cur)
|
|
150
|
+
return;
|
|
151
|
+
sections.push({
|
|
152
|
+
id: cur.id,
|
|
153
|
+
order: sections.length,
|
|
154
|
+
required: cur.req,
|
|
155
|
+
...(cur.when ? { when: cur.when } : {}),
|
|
156
|
+
content: cur.lines.join('\n').trim(),
|
|
157
|
+
});
|
|
158
|
+
cur = null;
|
|
159
|
+
};
|
|
160
|
+
lines.forEach((l, i) => {
|
|
161
|
+
const start = l.match(TEMPLATE_START_RE);
|
|
162
|
+
if (start) {
|
|
163
|
+
flush();
|
|
164
|
+
const flags = start[2] ?? '';
|
|
165
|
+
cur = {
|
|
166
|
+
id: start[1],
|
|
167
|
+
req: /(^|\s)required(\s|$)/.test(flags),
|
|
168
|
+
when: flags.match(/\bwhen="([^"]*)"/)?.[1],
|
|
169
|
+
lines: [],
|
|
170
|
+
};
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (TEMPLATE_END_RE.test(l)) {
|
|
174
|
+
flush();
|
|
175
|
+
lastEnd = i;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (cur)
|
|
179
|
+
cur.lines.push(l);
|
|
180
|
+
});
|
|
181
|
+
flush();
|
|
182
|
+
const tail = lastEnd >= 0 && sections.length > 0 ? lines.slice(lastEnd + 1).join('\n').trim() : '';
|
|
183
|
+
return { sections, tail };
|
|
184
|
+
}
|
|
185
|
+
export function parseTemplateSections(content) {
|
|
186
|
+
return parseTemplate(content).sections;
|
|
187
|
+
}
|
|
188
|
+
function parseMetaAttrs(attrs) {
|
|
189
|
+
const out = {};
|
|
190
|
+
for (const m of attrs.matchAll(/(\w+)="([^"]*)"/g))
|
|
191
|
+
out[m[1]] = m[2];
|
|
192
|
+
return out;
|
|
193
|
+
}
|
|
194
|
+
function parseFile(raw) {
|
|
195
|
+
const bom = raw.charCodeAt(0) === 0xfeff;
|
|
196
|
+
const content = bom ? raw.slice(1) : raw;
|
|
197
|
+
const eol = content.includes('\r\n') ? '\r\n' : '\n';
|
|
198
|
+
const lines = content.replace(/\r\n/g, '\n').split('\n');
|
|
13
199
|
const result = {
|
|
200
|
+
eol,
|
|
201
|
+
bom,
|
|
14
202
|
meta: null,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
203
|
+
sections: [],
|
|
204
|
+
preMeta: [],
|
|
205
|
+
segments: [],
|
|
206
|
+
warnings: [],
|
|
19
207
|
};
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
208
|
+
const metaIndex = lines.findIndex(l => META_RE.test(l));
|
|
209
|
+
if (metaIndex >= 0) {
|
|
210
|
+
const attrs = parseMetaAttrs(lines[metaIndex].match(META_RE)[1]);
|
|
22
211
|
result.meta = {
|
|
23
|
-
template:
|
|
24
|
-
version:
|
|
25
|
-
sections:
|
|
212
|
+
template: attrs.template ?? null,
|
|
213
|
+
version: attrs.version ?? 'unknown',
|
|
214
|
+
sections: (attrs.sections ?? '').split(',').map(s => s.trim()).filter(Boolean),
|
|
26
215
|
};
|
|
27
|
-
result.isLegacy = false;
|
|
28
216
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
217
|
+
const seen = new Set();
|
|
218
|
+
let buffer = [];
|
|
219
|
+
let bufferStart = 0;
|
|
220
|
+
let lastId = null;
|
|
221
|
+
const flush = (beforeId) => {
|
|
222
|
+
const text = buffer.join('\n').trim();
|
|
223
|
+
if (text) {
|
|
224
|
+
if (metaIndex >= 0 && bufferStart < metaIndex)
|
|
225
|
+
result.preMeta.push(text);
|
|
226
|
+
else
|
|
227
|
+
result.segments.push({ content: text, afterId: lastId, beforeId });
|
|
36
228
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
229
|
+
buffer = [];
|
|
230
|
+
};
|
|
231
|
+
for (let i = 0; i < lines.length; i++) {
|
|
232
|
+
const line = lines[i];
|
|
233
|
+
if (META_RE.test(line)) {
|
|
234
|
+
if (i === metaIndex) {
|
|
235
|
+
flush(null);
|
|
236
|
+
bufferStart = i + 1;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
result.warnings.push('Removed duplicate SW:META line');
|
|
240
|
+
}
|
|
46
241
|
continue;
|
|
47
242
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
result.userSegments.push({
|
|
60
|
-
content: seg,
|
|
61
|
-
afterSection: i > 0 ? ranges[i - 1].id : null,
|
|
62
|
-
beforeSection: ranges[i].id
|
|
63
|
-
});
|
|
243
|
+
const start = line.match(START_RE);
|
|
244
|
+
if (start) {
|
|
245
|
+
const id = start[1];
|
|
246
|
+
let end = -1;
|
|
247
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
248
|
+
if (START_RE.test(lines[j]))
|
|
249
|
+
break;
|
|
250
|
+
const e = lines[j].match(END_RE);
|
|
251
|
+
if (e && e[1] === id) {
|
|
252
|
+
end = j;
|
|
253
|
+
break;
|
|
64
254
|
}
|
|
65
255
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const seg = lines.slice(cur).join('\n').trim();
|
|
70
|
-
if (seg) {
|
|
71
|
-
result.userSegments.push({
|
|
72
|
-
content: seg,
|
|
73
|
-
afterSection: ranges[ranges.length - 1].id,
|
|
74
|
-
beforeSection: null
|
|
75
|
-
});
|
|
256
|
+
if (end < 0) {
|
|
257
|
+
result.warnings.push(`Repaired unterminated marker for section "${id}" (its text was kept as user content)`);
|
|
258
|
+
continue; // drop the marker line, keep the body as user content
|
|
76
259
|
}
|
|
260
|
+
if (seen.has(id)) {
|
|
261
|
+
result.warnings.push(`Removed duplicate section "${id}"`);
|
|
262
|
+
i = end;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
seen.add(id);
|
|
266
|
+
flush(id);
|
|
267
|
+
result.sections.push({ id, version: start[2] ?? '', body: lines.slice(i + 1, end).join('\n').trim() });
|
|
268
|
+
lastId = id;
|
|
269
|
+
i = end;
|
|
270
|
+
bufferStart = i + 1;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (END_RE.test(line)) {
|
|
274
|
+
result.warnings.push(`Removed stray end marker "${line.trim()}"`);
|
|
275
|
+
continue;
|
|
77
276
|
}
|
|
277
|
+
if (buffer.length === 0)
|
|
278
|
+
bufferStart = i;
|
|
279
|
+
buffer.push(line);
|
|
78
280
|
}
|
|
281
|
+
flush(null);
|
|
79
282
|
return result;
|
|
80
283
|
}
|
|
81
|
-
|
|
82
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Split an instruction file into managed vs user-owned content, using the very
|
|
286
|
+
* same marker parser the merger uses to preserve user content (`parseFile`), so
|
|
287
|
+
* there is exactly one implementation of the SW marker grammar.
|
|
288
|
+
*
|
|
289
|
+
* A file with no markers (a legacy 1.x file `update` has not touched yet) is
|
|
290
|
+
* entirely user-owned.
|
|
291
|
+
*/
|
|
292
|
+
export function splitManagedRegions(raw) {
|
|
293
|
+
const parsed = parseFile(raw);
|
|
294
|
+
const hasMarkers = parsed.meta !== null || parsed.sections.length > 0;
|
|
295
|
+
if (!hasMarkers)
|
|
296
|
+
return { hasMarkers: false, managed: '', user: raw };
|
|
297
|
+
return {
|
|
298
|
+
hasMarkers: true,
|
|
299
|
+
managed: parsed.sections.map(s => s.body).join('\n'),
|
|
300
|
+
user: [...parsed.preMeta, ...parsed.segments.map(s => s.content)].join('\n'),
|
|
301
|
+
};
|
|
83
302
|
}
|
|
84
|
-
|
|
85
|
-
|
|
303
|
+
// ---------------------------------------------------------------------------
|
|
304
|
+
// User-content cleanup
|
|
305
|
+
// ---------------------------------------------------------------------------
|
|
306
|
+
/** Remove "↓ ORIGINAL ↓" / "↓ PROJECT-SPECIFIC ↓" markers and their leading rules. */
|
|
307
|
+
function stripLegacyMarkers(text) {
|
|
308
|
+
const lines = text.split('\n');
|
|
309
|
+
const out = [];
|
|
310
|
+
let found = false;
|
|
311
|
+
for (const line of lines) {
|
|
312
|
+
if (LEGACY_MARKER_RE.test(line)) {
|
|
313
|
+
found = true;
|
|
314
|
+
while (out.length && (HR_RE.test(out[out.length - 1]) || out[out.length - 1].trim() === ''))
|
|
315
|
+
out.pop();
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
out.push(line);
|
|
319
|
+
}
|
|
320
|
+
return { text: out.join('\n').trim(), found };
|
|
86
321
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Split markdown into heading blocks. BOTH `#` and `##` start a new block, so a
|
|
324
|
+
* user's own H1 that follows a 1.x template section is never swallowed when
|
|
325
|
+
* that section is stripped.
|
|
326
|
+
*/
|
|
327
|
+
function splitBlocks(text) {
|
|
328
|
+
const blocks = [];
|
|
329
|
+
let cur = { heading: null, level: 2, lines: [] };
|
|
330
|
+
let inFence = false;
|
|
331
|
+
for (const line of text.split('\n')) {
|
|
332
|
+
if (FENCE_RE.test(line))
|
|
333
|
+
inFence = !inFence;
|
|
334
|
+
if (!inFence && (H2_RE.test(line) || H1_RE.test(line))) {
|
|
335
|
+
const level = H2_RE.test(line) ? 2 : 1;
|
|
336
|
+
blocks.push(cur);
|
|
337
|
+
cur = {
|
|
338
|
+
heading: line.slice(level + 1).replace(/\s*\{#[^}]*\}\s*$/, '').trim(),
|
|
339
|
+
level,
|
|
340
|
+
lines: [],
|
|
341
|
+
};
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
cur.lines.push(line);
|
|
93
345
|
}
|
|
94
|
-
|
|
346
|
+
blocks.push(cur);
|
|
347
|
+
return blocks.filter(b => b.heading !== null || b.lines.some(l => l.trim()));
|
|
95
348
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
349
|
+
function joinBlocks(blocks) {
|
|
350
|
+
return blocks
|
|
351
|
+
.map(b => (b.heading === null
|
|
352
|
+
? b.lines.join('\n')
|
|
353
|
+
: ['#'.repeat(b.level) + ' ' + b.heading, ...b.lines].join('\n')).trim())
|
|
354
|
+
.filter(Boolean)
|
|
355
|
+
.join('\n\n');
|
|
356
|
+
}
|
|
357
|
+
/** Drop raw template copies (`<!-- SECTION:x --> … <!-- /SECTION -->`) and 1.x no-heading lines. */
|
|
358
|
+
function stripLegacyLines(text, projectName) {
|
|
359
|
+
const out = [];
|
|
360
|
+
let inTemplate = false;
|
|
361
|
+
let inFence = false;
|
|
362
|
+
for (const line of text.split('\n')) {
|
|
363
|
+
if (FENCE_RE.test(line))
|
|
364
|
+
inFence = !inFence;
|
|
365
|
+
if (inFence) {
|
|
366
|
+
if (!inTemplate)
|
|
367
|
+
out.push(line);
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
if (TEMPLATE_START_RE.test(line)) {
|
|
371
|
+
inTemplate = true;
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
if (TEMPLATE_END_RE.test(line)) {
|
|
375
|
+
inTemplate = false;
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
if (inTemplate)
|
|
379
|
+
continue;
|
|
380
|
+
if (LEGACY_LINE_RES.some(re => re.test(line)))
|
|
381
|
+
continue;
|
|
382
|
+
if (H1_RE.test(line)) {
|
|
383
|
+
const title = line.slice(2).trim();
|
|
384
|
+
if (title === projectName || title === '{PROJECT_NAME}')
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
out.push(line);
|
|
106
388
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
389
|
+
return out.join('\n');
|
|
390
|
+
}
|
|
391
|
+
/** Strip known 1.x template H2 blocks; keep everything else verbatim. */
|
|
392
|
+
function stripLegacyBlocks(text, type, projectName) {
|
|
393
|
+
const known = LEGACY_HEADINGS[type];
|
|
394
|
+
const blocks = splitBlocks(stripLegacyLines(text, projectName));
|
|
395
|
+
const kept = [];
|
|
396
|
+
for (const b of blocks) {
|
|
397
|
+
if (b.heading === null || b.level !== 2) {
|
|
398
|
+
kept.push(b);
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if (b.heading === SKILL_MEMORIES_HEADING) {
|
|
402
|
+
const lines = b.lines.filter(l => !SKILL_MEMORIES_BOILERPLATE.some(re => re.test(l)));
|
|
403
|
+
const hasContent = lines.some(l => l.trim() && !l.trim().startsWith('<!--'));
|
|
404
|
+
if (hasContent)
|
|
405
|
+
kept.push({ heading: b.heading, level: b.level, lines });
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
const sigs = known[b.heading];
|
|
409
|
+
if (sigs) {
|
|
410
|
+
const body = b.lines.join('\n');
|
|
411
|
+
if (sigs.length === 0 || sigs.some(s => body.includes(s)))
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
kept.push(b);
|
|
118
415
|
}
|
|
119
|
-
|
|
416
|
+
return tidyRules(joinBlocks(kept));
|
|
417
|
+
}
|
|
418
|
+
/** Collapse rules left behind by removed blocks: no leading/trailing/consecutive `---`. */
|
|
419
|
+
function tidyRules(text) {
|
|
420
|
+
const lines = text.split('\n');
|
|
421
|
+
const out = [];
|
|
422
|
+
for (const line of lines) {
|
|
423
|
+
if (HR_RE.test(line)) {
|
|
424
|
+
const prev = [...out].reverse().find(l => l.trim() !== '');
|
|
425
|
+
if (prev === undefined || HR_RE.test(prev))
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
out.push(line);
|
|
429
|
+
}
|
|
430
|
+
while (out.length && (HR_RE.test(out[out.length - 1]) || out[out.length - 1].trim() === ''))
|
|
431
|
+
out.pop();
|
|
432
|
+
return out.join('\n').trim();
|
|
433
|
+
}
|
|
434
|
+
function normalizeKey(text) {
|
|
435
|
+
return text.replace(/\s+/g, ' ').trim().toLowerCase();
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Drop H2 blocks that repeat an earlier identical block (ORIGINAL stacking
|
|
439
|
+
* artifact). Returns one entry per input (possibly empty) so callers keep
|
|
440
|
+
* their positional metadata.
|
|
441
|
+
*/
|
|
442
|
+
function dedupeBlocks(texts) {
|
|
443
|
+
const seen = new Set();
|
|
444
|
+
return texts.map(text => {
|
|
445
|
+
const kept = [];
|
|
446
|
+
for (const b of splitBlocks(text)) {
|
|
447
|
+
const key = normalizeKey(joinBlocks([b]));
|
|
448
|
+
if (!key || seen.has(key))
|
|
449
|
+
continue;
|
|
450
|
+
seen.add(key);
|
|
451
|
+
kept.push(b);
|
|
452
|
+
}
|
|
453
|
+
return joinBlocks(kept);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
// ---------------------------------------------------------------------------
|
|
457
|
+
// Rendering
|
|
458
|
+
// ---------------------------------------------------------------------------
|
|
459
|
+
function wrap(id, body, version) {
|
|
460
|
+
return `<!-- SW:SECTION:${id} version="${version}" -->\n${body}\n<!-- SW:END:${id} -->`;
|
|
461
|
+
}
|
|
462
|
+
function genMeta(type, version, ids) {
|
|
463
|
+
return `<!-- SW:META template="${type}" version="${version}" sections="${ids.join(',')}" -->`;
|
|
464
|
+
}
|
|
465
|
+
function fillName(text, name) {
|
|
466
|
+
return text.replace(/\{PROJECT_NAME\}/g, name);
|
|
467
|
+
}
|
|
468
|
+
const PLACEHOLDERS = [
|
|
469
|
+
{ key: 'BUILD_CMD', label: 'build', pick: c => c.build },
|
|
470
|
+
{ key: 'TEST_CMD', label: 'test', pick: c => c.test },
|
|
471
|
+
{ key: 'LINT_CMD', label: 'lint', pick: c => c.lint },
|
|
472
|
+
];
|
|
473
|
+
/**
|
|
474
|
+
* Visible marker for a command the stack detector could not find. An HTML
|
|
475
|
+
* comment would render as an empty table cell, so agents never saw it.
|
|
476
|
+
* The label keeps each row's marker distinct, so filling one in later does not
|
|
477
|
+
* overwrite the others.
|
|
478
|
+
*/
|
|
479
|
+
function todoComment(label) {
|
|
480
|
+
return `TODO: not detected \u2014 fill in the ${label} command`;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Fill `{{BUILD_CMD}}` / `{{TEST_CMD}}` / `{{LINT_CMD}}` (and the TODO marker a
|
|
484
|
+
* previous run may have left) only where they are still present. Guarantees no
|
|
485
|
+
* `{{…}}` placeholder survives into a written instruction file.
|
|
486
|
+
*/
|
|
487
|
+
export function fillCommandPlaceholders(text, commands) {
|
|
488
|
+
let out = text;
|
|
489
|
+
for (const p of PLACEHOLDERS) {
|
|
490
|
+
const value = commands ? p.pick(commands) : undefined;
|
|
491
|
+
const token = `{{${p.key}}}`;
|
|
492
|
+
const todo = todoComment(p.label);
|
|
493
|
+
if (!out.includes(token) && !out.includes(todo))
|
|
494
|
+
continue;
|
|
495
|
+
const replacement = value ? '`' + value + '`' : todo;
|
|
496
|
+
out = out.split('`' + token + '`').join(replacement);
|
|
497
|
+
out = out.split(token).join(value ?? todo);
|
|
498
|
+
if (value)
|
|
499
|
+
out = out.split(todo).join('`' + value + '`');
|
|
500
|
+
}
|
|
501
|
+
return out;
|
|
502
|
+
}
|
|
503
|
+
function majorOf(version) {
|
|
504
|
+
const m = version.match(/^(\d+)/);
|
|
505
|
+
return m ? Number(m[1]) : 0;
|
|
506
|
+
}
|
|
507
|
+
function normalizeTemplate(secs, opts) {
|
|
508
|
+
if (Array.isArray(secs)) {
|
|
509
|
+
return { sections: [...secs].sort((a, b) => a.order - b.order), tail: opts?.tail ?? '' };
|
|
510
|
+
}
|
|
511
|
+
return { sections: [...secs.sections].sort((a, b) => a.order - b.order), tail: secs.tail };
|
|
512
|
+
}
|
|
513
|
+
function finish(text, p) {
|
|
514
|
+
let out = text.trim() + '\n';
|
|
515
|
+
if (p?.eol === '\r\n')
|
|
516
|
+
out = out.replace(/\n/g, '\r\n');
|
|
517
|
+
if (p?.bom)
|
|
518
|
+
out = '\uFEFF' + out;
|
|
519
|
+
return out;
|
|
520
|
+
}
|
|
521
|
+
// ---------------------------------------------------------------------------
|
|
522
|
+
// Public API
|
|
523
|
+
// ---------------------------------------------------------------------------
|
|
524
|
+
export function mergeInstructionFile(existing, secs, type, ver, name, opts = {}) {
|
|
525
|
+
const tpl = normalizeTemplate(secs, opts);
|
|
526
|
+
// `when="flag"` sections are rendered only while their flag is on; when it
|
|
527
|
+
// turns off they are treated exactly like a section dropped from the template.
|
|
528
|
+
const active = tpl.sections.filter(s => !s.when || opts.flags?.[s.when] === true);
|
|
529
|
+
const ids = active.map(s => s.id);
|
|
530
|
+
if (!existing || !existing.trim()) {
|
|
531
|
+
const parts = [genMeta(type, ver, ids)];
|
|
532
|
+
for (const s of active)
|
|
533
|
+
parts.push(wrap(s.id, fillName(s.content, name), ver));
|
|
534
|
+
if (tpl.tail)
|
|
535
|
+
parts.push(fillName(tpl.tail, name));
|
|
120
536
|
return {
|
|
121
|
-
content:
|
|
122
|
-
action: '
|
|
537
|
+
content: finish(fillCommandPlaceholders(parts.join('\n\n'), opts.commands), null),
|
|
538
|
+
action: 'created',
|
|
123
539
|
updated: [],
|
|
124
|
-
added:
|
|
540
|
+
added: ids,
|
|
541
|
+
removed: [],
|
|
125
542
|
preserved: 0,
|
|
126
|
-
warnings: [
|
|
543
|
+
warnings: [],
|
|
544
|
+
migration: null,
|
|
127
545
|
};
|
|
128
546
|
}
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
547
|
+
const p = parseFile(existing);
|
|
548
|
+
const warnings = [...p.warnings];
|
|
549
|
+
const legacy = p.meta === null && p.sections.length === 0;
|
|
550
|
+
const fromVersion = p.meta?.version ?? p.sections[0]?.version ?? 'unknown';
|
|
551
|
+
const migrating = legacy || majorOf(fromVersion) < TEMPLATE_SCHEMA_MAJOR;
|
|
552
|
+
// --- classify sections -------------------------------------------------
|
|
553
|
+
const fileById = new Map(p.sections.map(s => [s.id, s]));
|
|
554
|
+
const listed = new Set(p.meta?.sections ?? p.sections.map(s => s.id));
|
|
555
|
+
const rendered = [];
|
|
556
|
+
const updated = [];
|
|
557
|
+
const added = [];
|
|
558
|
+
const skipped = [];
|
|
559
|
+
for (const s of active) {
|
|
560
|
+
const body = fillName(s.content, name);
|
|
561
|
+
const cur = fileById.get(s.id);
|
|
562
|
+
if (cur) {
|
|
563
|
+
if (cur.body === body)
|
|
564
|
+
rendered.push({ id: s.id, version: cur.version || ver, body });
|
|
565
|
+
else {
|
|
566
|
+
rendered.push({ id: s.id, version: ver, body });
|
|
567
|
+
updated.push(s.id);
|
|
568
|
+
}
|
|
137
569
|
}
|
|
138
|
-
else if (
|
|
139
|
-
|
|
140
|
-
add.push(s);
|
|
141
|
-
else
|
|
142
|
-
skip.push(s.id);
|
|
570
|
+
else if (listed.has(s.id) && !s.required) {
|
|
571
|
+
skipped.push(s.id);
|
|
143
572
|
}
|
|
144
573
|
else {
|
|
145
|
-
|
|
574
|
+
rendered.push({ id: s.id, version: ver, body });
|
|
575
|
+
added.push(s.id);
|
|
146
576
|
}
|
|
147
577
|
}
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
578
|
+
const tplIds = new Set(ids);
|
|
579
|
+
const removed = p.sections.map(s => s.id).filter(id => !tplIds.has(id));
|
|
580
|
+
const renderedIds = rendered.map(r => r.id);
|
|
581
|
+
const sectionsChanged = updated.length > 0 ||
|
|
582
|
+
added.length > 0 ||
|
|
583
|
+
removed.length > 0 ||
|
|
584
|
+
renderedIds.join(',') !== (p.meta?.sections ?? []).join(',');
|
|
585
|
+
const metaVersion = !p.meta || sectionsChanged || migrating ? ver : p.meta.version;
|
|
586
|
+
// --- classify user content ----------------------------------------------
|
|
587
|
+
let legacyMarkers = false;
|
|
588
|
+
const clean = (text) => {
|
|
589
|
+
const r = stripLegacyMarkers(text);
|
|
590
|
+
legacyMarkers = legacyMarkers || r.found;
|
|
591
|
+
return r.text;
|
|
592
|
+
};
|
|
593
|
+
let pre = p.preMeta.map(clean).filter(Boolean);
|
|
594
|
+
let segs = p.segments.map(s => ({ ...s, content: clean(s.content) })).filter(s => s.content);
|
|
595
|
+
if (migrating) {
|
|
596
|
+
pre = pre.map(t => stripLegacyBlocks(t, type, name)).filter(Boolean);
|
|
597
|
+
segs = segs.map(s => ({ ...s, content: stripLegacyBlocks(s.content, type, name) })).filter(s => s.content);
|
|
156
598
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
599
|
+
if (migrating || legacyMarkers) {
|
|
600
|
+
const deduped = dedupeBlocks([...pre, ...segs.map(s => s.content)]);
|
|
601
|
+
const preCount = pre.length;
|
|
602
|
+
pre = deduped.slice(0, preCount).filter(Boolean);
|
|
603
|
+
segs = segs.map((s, i) => ({ ...s, content: deduped[preCount + i] })).filter(s => s.content);
|
|
604
|
+
}
|
|
605
|
+
const attached = new Map();
|
|
606
|
+
const post = [];
|
|
607
|
+
const surviving = new Set(renderedIds);
|
|
608
|
+
for (const s of segs) {
|
|
609
|
+
if (!migrating && s.afterId && surviving.has(s.afterId)) {
|
|
610
|
+
const list = attached.get(s.afterId) ?? [];
|
|
611
|
+
list.push(s.content);
|
|
612
|
+
attached.set(s.afterId, list);
|
|
166
613
|
}
|
|
167
614
|
else {
|
|
168
|
-
|
|
615
|
+
post.push(s.content);
|
|
169
616
|
}
|
|
170
|
-
els.push({ c: seg.content, o });
|
|
171
617
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
618
|
+
const userText = [...pre, ...segs.map(s => s.content)].join('\n');
|
|
619
|
+
const hasCommands = /^## Commands\s*$/m.test(userText);
|
|
620
|
+
const addTail = migrating && Boolean(tpl.tail) && !hasCommands;
|
|
621
|
+
// --- render --------------------------------------------------------------
|
|
622
|
+
const parts = [];
|
|
623
|
+
if (pre.length)
|
|
624
|
+
parts.push(pre.join('\n\n'));
|
|
625
|
+
parts.push(genMeta(type, metaVersion, renderedIds));
|
|
626
|
+
for (const r of rendered) {
|
|
627
|
+
parts.push(wrap(r.id, r.body, r.version));
|
|
628
|
+
for (const a of attached.get(r.id) ?? [])
|
|
629
|
+
parts.push(a);
|
|
630
|
+
}
|
|
631
|
+
if (addTail)
|
|
632
|
+
parts.push(fillName(tpl.tail, name));
|
|
633
|
+
parts.push(...post);
|
|
634
|
+
const content = finish(fillCommandPlaceholders(parts.join('\n\n'), opts.commands), p);
|
|
635
|
+
const preserved = pre.length + segs.length;
|
|
636
|
+
if (skipped.length)
|
|
637
|
+
warnings.push(`Skipped optional sections you removed earlier: ${skipped.join(', ')}`);
|
|
638
|
+
let migration = null;
|
|
639
|
+
if (migrating && (legacy || removed.length > 0)) {
|
|
640
|
+
migration = { fromVersion: legacy ? 'legacy (no markers)' : fromVersion, removed };
|
|
641
|
+
warnings.push(`Upgraded instructions from ${migration.fromVersion} to ${ver}: ` +
|
|
642
|
+
(removed.length ? `removed 1.x sections ${removed.join(', ')}; ` : 'stripped 1.x template blocks; ') +
|
|
643
|
+
'your own notes were kept below the managed block.');
|
|
644
|
+
}
|
|
645
|
+
if (content === existing) {
|
|
646
|
+
return { content, action: 'unchanged', updated: [], added: [], removed: [], preserved, warnings, migration: null };
|
|
647
|
+
}
|
|
648
|
+
return { content, action: 'merged', updated, added, removed, preserved, warnings, migration };
|
|
181
649
|
}
|
|
182
650
|
/**
|
|
183
|
-
* Strip all SW-managed
|
|
184
|
-
*
|
|
651
|
+
* Strip all SW-managed content from an instruction file, returning only user
|
|
652
|
+
* content (null when nothing is left). Used by `specweave uninstall`.
|
|
185
653
|
*/
|
|
186
654
|
export function stripSwSections(content) {
|
|
187
655
|
if (!content || !content.trim())
|
|
188
656
|
return null;
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
if (parsed.isLegacy && parsed.swSections.size === 0) {
|
|
657
|
+
const p = parseFile(content);
|
|
658
|
+
if (p.meta === null && p.sections.length === 0)
|
|
192
659
|
return content.trim() || null;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
const userContent = parsed.userSegments.map(s => s.content).join('\n\n').trim();
|
|
198
|
-
return userContent || null;
|
|
199
|
-
}
|
|
200
|
-
export function parseTemplateSections(content) {
|
|
201
|
-
const secs = [];
|
|
202
|
-
const lines = content.split('\n');
|
|
203
|
-
let cur = null;
|
|
204
|
-
let ord = 0;
|
|
205
|
-
for (const l of lines) {
|
|
206
|
-
const d = l.match(/<!-- SECTION:([\w-]+)(?:\s+(required))? -->/);
|
|
207
|
-
if (d) {
|
|
208
|
-
if (cur) {
|
|
209
|
-
secs.push({
|
|
210
|
-
id: cur.id,
|
|
211
|
-
order: cur.ord,
|
|
212
|
-
required: cur.req,
|
|
213
|
-
content: cur.lines.join('\n').trim()
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
cur = { id: d[1], ord: ord++, req: d[2] === 'required', lines: [] };
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
if (l.match(/<!-- \/SECTION -->/)) {
|
|
220
|
-
if (cur) {
|
|
221
|
-
secs.push({
|
|
222
|
-
id: cur.id,
|
|
223
|
-
order: cur.ord,
|
|
224
|
-
required: cur.req,
|
|
225
|
-
content: cur.lines.join('\n').trim()
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
cur = null;
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
if (cur)
|
|
232
|
-
cur.lines.push(l);
|
|
233
|
-
}
|
|
234
|
-
if (cur) {
|
|
235
|
-
secs.push({
|
|
236
|
-
id: cur.id,
|
|
237
|
-
order: cur.ord,
|
|
238
|
-
required: cur.req,
|
|
239
|
-
content: cur.lines.join('\n').trim()
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
return secs;
|
|
660
|
+
const parts = [...p.preMeta, ...p.segments.map(s => s.content)]
|
|
661
|
+
.map(t => stripLegacyMarkers(t).text)
|
|
662
|
+
.filter(Boolean);
|
|
663
|
+
return parts.length ? parts.join('\n\n') : null;
|
|
243
664
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Read specweave's own package.json (not the user's project).
|
|
667
|
+
* Resolves reliably with symlinked installs (nvm, pnpm, npm link); falls back to a directory walk.
|
|
668
|
+
*/
|
|
669
|
+
export function readSpecweavePackageJson() {
|
|
247
670
|
try {
|
|
248
671
|
const require = createRequire(import.meta.url);
|
|
249
672
|
const pkgPath = require.resolve('specweave/package.json');
|
|
250
|
-
return JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
|
|
673
|
+
return JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
251
674
|
}
|
|
252
675
|
catch {
|
|
253
|
-
//
|
|
676
|
+
// fall back to a directory walk (npm link, running from a checkout)
|
|
254
677
|
}
|
|
255
678
|
try {
|
|
256
|
-
let d = path.dirname(
|
|
679
|
+
let d = path.dirname(fileURLToPath(import.meta.url));
|
|
257
680
|
for (let i = 0; i < 10; i++) {
|
|
258
681
|
const p = path.join(d, 'package.json');
|
|
259
682
|
if (fs.existsSync(p)) {
|
|
260
683
|
const j = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
261
684
|
if (j.name === 'specweave')
|
|
262
|
-
return j
|
|
685
|
+
return j;
|
|
263
686
|
}
|
|
264
|
-
|
|
687
|
+
const parent = path.dirname(d);
|
|
688
|
+
if (parent === d)
|
|
689
|
+
break;
|
|
690
|
+
d = parent;
|
|
265
691
|
}
|
|
266
692
|
}
|
|
267
693
|
catch {
|
|
268
694
|
// ignore
|
|
269
695
|
}
|
|
270
|
-
return
|
|
696
|
+
return {};
|
|
697
|
+
}
|
|
698
|
+
export function getPackageVersion() {
|
|
699
|
+
return readSpecweavePackageJson().version ?? '0.0.0';
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Minimum Node.js version from specweave's package.json `engines.node` (e.g. ">=20.12.0" → "20.12.0").
|
|
703
|
+
*/
|
|
704
|
+
export function getMinNodeVersion() {
|
|
705
|
+
const engines = readSpecweavePackageJson().engines?.node;
|
|
706
|
+
const m = typeof engines === 'string' ? engines.match(/(\d+)(?:\.(\d+))?(?:\.(\d+))?/) : null;
|
|
707
|
+
if (!m)
|
|
708
|
+
return '20.0.0';
|
|
709
|
+
return `${m[1]}.${m[2] ?? '0'}.${m[3] ?? '0'}`;
|
|
271
710
|
}
|
|
272
711
|
//# sourceMappingURL=instruction-file-merger.js.map
|