@lvlup-sw/exarchos 2.4.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +7 -2
- package/AGENTS.md +2 -2
- package/README.md +91 -57
- package/agents/.gitkeep +0 -0
- package/agents/fixer.md +62 -0
- package/agents/implementer.md +68 -0
- package/agents/reviewer.md +50 -0
- package/commands/dogfood.md +31 -0
- package/commands/ideate.md +1 -1
- package/commands/oneshot.md +178 -0
- package/commands/plan.md +1 -1
- package/commands/prune.md +90 -0
- package/commands/review.md +58 -0
- package/dist/exarchos.js +582 -142
- package/hooks/hooks.json +8 -0
- package/package.json +18 -6
- package/scripts/sync-versions.sh +31 -22
- package/skills/{brainstorming → claude/brainstorming}/SKILL.md +16 -0
- package/skills/{brainstorming → claude/brainstorming}/references/design-template.md +9 -0
- package/skills/{cleanup → claude/cleanup}/SKILL.md +6 -0
- package/skills/{debug → claude/debug}/SKILL.md +41 -0
- package/skills/{debug → claude/debug}/references/hotfix-track.md +12 -49
- package/skills/{debug → claude/debug}/references/investigation-checklist.md +3 -3
- package/skills/{debug → claude/debug}/references/thorough-track.md +12 -42
- package/skills/{delegation → claude/delegation}/SKILL.md +128 -40
- package/skills/{delegation → claude/delegation}/references/agent-teams-saga.md +4 -1
- package/skills/claude/delegation/references/fix-mode.md +118 -0
- package/skills/{delegation → claude/delegation}/references/implementer-prompt.md +29 -1
- package/skills/{delegation → claude/delegation}/references/parallel-strategy.md +1 -1
- package/skills/{delegation → claude/delegation}/references/state-management.md +33 -0
- package/skills/{delegation → claude/delegation}/references/troubleshooting.md +2 -2
- package/skills/{delegation → claude/delegation}/references/workflow-steps.md +6 -10
- package/skills/{delegation → claude/delegation}/references/worktree-enforcement.md +13 -7
- package/skills/claude/dogfood/SKILL.md +235 -0
- package/skills/claude/dogfood/references/report-template.md +109 -0
- package/skills/claude/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/{git-worktrees → claude/git-worktrees}/SKILL.md +6 -9
- package/skills/{implementation-planning → claude/implementation-planning}/SKILL.md +32 -27
- package/skills/claude/implementation-planning/references/task-template.md +63 -0
- package/skills/{implementation-planning → claude/implementation-planning}/references/testing-strategy-guide.md +22 -1
- package/skills/{implementation-planning → claude/implementation-planning}/references/worked-example.md +2 -2
- package/skills/claude/oneshot-workflow/SKILL.md +468 -0
- package/skills/claude/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/claude/prune-workflows/SKILL.md +290 -0
- package/skills/claude/prune-workflows/references/safeguards.md +74 -0
- package/skills/{quality-review → claude/quality-review}/SKILL.md +105 -10
- package/skills/{quality-review → claude/quality-review}/references/auto-transition.md +1 -1
- package/skills/claude/quality-review/references/axiom-integration.md +135 -0
- package/skills/{refactor → claude/refactor}/SKILL.md +32 -39
- package/skills/{refactor → claude/refactor}/references/doc-update-checklist.md +2 -3
- package/skills/{refactor → claude/refactor}/references/explore-checklist.md +4 -6
- package/skills/{refactor → claude/refactor}/references/overhaul-track.md +20 -50
- package/skills/{refactor → claude/refactor/references}/phases/polish-implement.md +2 -2
- package/skills/{refactor → claude/refactor/references}/phases/polish-validate.md +1 -1
- package/skills/{refactor → claude/refactor}/references/polish-track.md +18 -46
- package/skills/{shepherd → claude/shepherd}/SKILL.md +42 -10
- package/skills/{shepherd → claude/shepherd}/references/fix-strategies.md +1 -2
- package/skills/claude/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/{spec-review → claude/spec-review}/SKILL.md +48 -10
- package/skills/{spec-review → claude/spec-review}/references/worked-example.md +1 -1
- package/skills/{synthesis → claude/synthesis}/SKILL.md +72 -10
- package/skills/{synthesis → claude/synthesis}/references/github-native-stacking.md +3 -4
- package/skills/{synthesis → claude/synthesis}/references/synthesis-steps.md +11 -13
- package/skills/{workflow-state → claude/workflow-state}/SKILL.md +50 -6
- package/skills/{workflow-state → claude/workflow-state}/references/mcp-tool-reference.md +5 -5
- package/skills/{workflow-state → claude/workflow-state}/references/phase-transitions.md +28 -3
- package/skills/codex/brainstorming/SKILL.md +182 -0
- package/skills/codex/brainstorming/references/design-template.md +107 -0
- package/skills/codex/brainstorming/references/worked-example.md +58 -0
- package/skills/codex/cleanup/SKILL.md +169 -0
- package/skills/codex/cleanup/references/merge-verification.md +40 -0
- package/skills/codex/debug/SKILL.md +247 -0
- package/skills/codex/debug/references/hotfix-track.md +105 -0
- package/skills/codex/debug/references/investigation-checklist.md +217 -0
- package/skills/codex/debug/references/rca-template.md +150 -0
- package/skills/codex/debug/references/state-schema.md +294 -0
- package/skills/codex/debug/references/thorough-track.md +171 -0
- package/skills/codex/debug/references/triage-questions.md +155 -0
- package/skills/codex/debug/references/troubleshooting.md +47 -0
- package/skills/codex/delegation/SKILL.md +353 -0
- package/skills/codex/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/codex/delegation/references/agent-teams-saga.md +254 -0
- package/skills/codex/delegation/references/fix-mode.md +118 -0
- package/skills/codex/delegation/references/fixer-prompt.md +174 -0
- package/skills/codex/delegation/references/implementer-prompt.md +401 -0
- package/skills/codex/delegation/references/parallel-strategy.md +124 -0
- package/skills/codex/delegation/references/pbt-patterns.md +172 -0
- package/skills/codex/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/codex/delegation/references/rationalization-refutation.md +15 -0
- package/skills/codex/delegation/references/state-management.md +84 -0
- package/skills/codex/delegation/references/testing-patterns.md +146 -0
- package/skills/codex/delegation/references/troubleshooting.md +109 -0
- package/skills/codex/delegation/references/worked-example.md +104 -0
- package/skills/codex/delegation/references/workflow-steps.md +131 -0
- package/skills/codex/delegation/references/worktree-enforcement.md +71 -0
- package/skills/codex/dogfood/SKILL.md +235 -0
- package/skills/codex/dogfood/references/report-template.md +109 -0
- package/skills/codex/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/codex/git-worktrees/SKILL.md +193 -0
- package/skills/codex/git-worktrees/references/commands-reference.md +78 -0
- package/skills/codex/implementation-planning/SKILL.md +289 -0
- package/skills/codex/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/codex/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/codex/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/codex/implementation-planning/references/task-template.md +63 -0
- package/skills/codex/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/codex/implementation-planning/references/worked-example.md +76 -0
- package/skills/codex/oneshot-workflow/SKILL.md +468 -0
- package/skills/codex/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/codex/prune-workflows/SKILL.md +290 -0
- package/skills/codex/prune-workflows/references/safeguards.md +74 -0
- package/skills/codex/quality-review/SKILL.md +371 -0
- package/skills/codex/quality-review/references/auto-transition.md +47 -0
- package/skills/codex/quality-review/references/axiom-integration.md +135 -0
- package/skills/codex/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/codex/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/codex/quality-review/references/gate-execution.md +60 -0
- package/skills/codex/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/codex/quality-review/references/review-report-template.md +65 -0
- package/skills/codex/quality-review/references/security-checklist.md +79 -0
- package/skills/codex/quality-review/references/typescript-standards.md +24 -0
- package/skills/codex/refactor/SKILL.md +196 -0
- package/skills/codex/refactor/references/brief-template.md +81 -0
- package/skills/codex/refactor/references/doc-update-checklist.md +113 -0
- package/skills/codex/refactor/references/explore-checklist.md +79 -0
- package/skills/codex/refactor/references/overhaul-track.md +194 -0
- package/skills/codex/refactor/references/phases/auto-chain.md +267 -0
- package/skills/codex/refactor/references/phases/brief.md +176 -0
- package/skills/codex/refactor/references/phases/explore.md +132 -0
- package/skills/codex/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/codex/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/codex/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/codex/refactor/references/phases/polish-implement.md +347 -0
- package/skills/codex/refactor/references/phases/polish-validate.md +218 -0
- package/skills/codex/refactor/references/phases/update-docs.md +234 -0
- package/skills/codex/refactor/references/polish-track.md +152 -0
- package/skills/codex/shepherd/SKILL.md +251 -0
- package/skills/codex/shepherd/references/assess-checklist.md +170 -0
- package/skills/codex/shepherd/references/escalation-criteria.md +53 -0
- package/skills/codex/shepherd/references/fix-strategies.md +289 -0
- package/skills/codex/shepherd/references/gate-event-emission.md +47 -0
- package/skills/codex/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/codex/spec-review/SKILL.md +294 -0
- package/skills/codex/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/codex/spec-review/references/review-checklist.md +79 -0
- package/skills/codex/spec-review/references/worked-example.md +72 -0
- package/skills/codex/synthesis/SKILL.md +217 -0
- package/skills/codex/synthesis/references/github-native-stacking.md +135 -0
- package/skills/codex/synthesis/references/merge-ordering.md +50 -0
- package/skills/codex/synthesis/references/pr-descriptions.md +87 -0
- package/skills/codex/synthesis/references/synthesis-steps.md +145 -0
- package/skills/codex/synthesis/references/troubleshooting.md +115 -0
- package/skills/codex/workflow-state/SKILL.md +254 -0
- package/skills/codex/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/codex/workflow-state/references/phase-transitions.md +206 -0
- package/skills/copilot/brainstorming/SKILL.md +182 -0
- package/skills/copilot/brainstorming/references/design-template.md +107 -0
- package/skills/copilot/brainstorming/references/worked-example.md +58 -0
- package/skills/copilot/cleanup/SKILL.md +169 -0
- package/skills/copilot/cleanup/references/merge-verification.md +40 -0
- package/skills/copilot/debug/SKILL.md +247 -0
- package/skills/copilot/debug/references/hotfix-track.md +105 -0
- package/skills/copilot/debug/references/investigation-checklist.md +217 -0
- package/skills/copilot/debug/references/rca-template.md +150 -0
- package/skills/copilot/debug/references/state-schema.md +294 -0
- package/skills/copilot/debug/references/thorough-track.md +171 -0
- package/skills/copilot/debug/references/triage-questions.md +155 -0
- package/skills/copilot/debug/references/troubleshooting.md +47 -0
- package/skills/copilot/delegation/SKILL.md +345 -0
- package/skills/copilot/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/copilot/delegation/references/agent-teams-saga.md +254 -0
- package/skills/copilot/delegation/references/fix-mode.md +118 -0
- package/skills/copilot/delegation/references/fixer-prompt.md +174 -0
- package/skills/copilot/delegation/references/implementer-prompt.md +401 -0
- package/skills/copilot/delegation/references/parallel-strategy.md +124 -0
- package/skills/copilot/delegation/references/pbt-patterns.md +172 -0
- package/skills/copilot/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/copilot/delegation/references/rationalization-refutation.md +15 -0
- package/skills/copilot/delegation/references/state-management.md +84 -0
- package/skills/copilot/delegation/references/testing-patterns.md +146 -0
- package/skills/copilot/delegation/references/troubleshooting.md +109 -0
- package/skills/copilot/delegation/references/worked-example.md +104 -0
- package/skills/copilot/delegation/references/workflow-steps.md +131 -0
- package/skills/copilot/delegation/references/worktree-enforcement.md +71 -0
- package/skills/copilot/dogfood/SKILL.md +235 -0
- package/skills/copilot/dogfood/references/report-template.md +109 -0
- package/skills/copilot/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/copilot/git-worktrees/SKILL.md +193 -0
- package/skills/copilot/git-worktrees/references/commands-reference.md +78 -0
- package/skills/copilot/implementation-planning/SKILL.md +289 -0
- package/skills/copilot/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/copilot/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/copilot/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/copilot/implementation-planning/references/task-template.md +63 -0
- package/skills/copilot/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/copilot/implementation-planning/references/worked-example.md +76 -0
- package/skills/copilot/oneshot-workflow/SKILL.md +468 -0
- package/skills/copilot/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/copilot/prune-workflows/SKILL.md +290 -0
- package/skills/copilot/prune-workflows/references/safeguards.md +74 -0
- package/skills/copilot/quality-review/SKILL.md +371 -0
- package/skills/copilot/quality-review/references/auto-transition.md +47 -0
- package/skills/copilot/quality-review/references/axiom-integration.md +135 -0
- package/skills/copilot/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/copilot/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/copilot/quality-review/references/gate-execution.md +60 -0
- package/skills/copilot/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/copilot/quality-review/references/review-report-template.md +65 -0
- package/skills/copilot/quality-review/references/security-checklist.md +79 -0
- package/skills/copilot/quality-review/references/typescript-standards.md +24 -0
- package/skills/copilot/refactor/SKILL.md +196 -0
- package/skills/copilot/refactor/references/brief-template.md +81 -0
- package/skills/copilot/refactor/references/doc-update-checklist.md +113 -0
- package/skills/copilot/refactor/references/explore-checklist.md +79 -0
- package/skills/copilot/refactor/references/overhaul-track.md +194 -0
- package/skills/copilot/refactor/references/phases/auto-chain.md +267 -0
- package/skills/copilot/refactor/references/phases/brief.md +176 -0
- package/skills/copilot/refactor/references/phases/explore.md +132 -0
- package/skills/copilot/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/copilot/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/copilot/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/copilot/refactor/references/phases/polish-implement.md +347 -0
- package/skills/copilot/refactor/references/phases/polish-validate.md +218 -0
- package/skills/copilot/refactor/references/phases/update-docs.md +234 -0
- package/skills/copilot/refactor/references/polish-track.md +152 -0
- package/skills/copilot/shepherd/SKILL.md +251 -0
- package/skills/copilot/shepherd/references/assess-checklist.md +170 -0
- package/skills/copilot/shepherd/references/escalation-criteria.md +53 -0
- package/skills/copilot/shepherd/references/fix-strategies.md +289 -0
- package/skills/copilot/shepherd/references/gate-event-emission.md +47 -0
- package/skills/copilot/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/copilot/spec-review/SKILL.md +294 -0
- package/skills/copilot/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/copilot/spec-review/references/review-checklist.md +79 -0
- package/skills/copilot/spec-review/references/worked-example.md +72 -0
- package/skills/copilot/synthesis/SKILL.md +217 -0
- package/skills/copilot/synthesis/references/github-native-stacking.md +135 -0
- package/skills/copilot/synthesis/references/merge-ordering.md +50 -0
- package/skills/copilot/synthesis/references/pr-descriptions.md +87 -0
- package/skills/copilot/synthesis/references/synthesis-steps.md +145 -0
- package/skills/copilot/synthesis/references/troubleshooting.md +115 -0
- package/skills/copilot/workflow-state/SKILL.md +254 -0
- package/skills/copilot/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/copilot/workflow-state/references/phase-transitions.md +206 -0
- package/skills/cursor/brainstorming/SKILL.md +182 -0
- package/skills/cursor/brainstorming/references/design-template.md +107 -0
- package/skills/cursor/brainstorming/references/worked-example.md +58 -0
- package/skills/cursor/cleanup/SKILL.md +169 -0
- package/skills/cursor/cleanup/references/merge-verification.md +40 -0
- package/skills/cursor/debug/SKILL.md +247 -0
- package/skills/cursor/debug/references/hotfix-track.md +105 -0
- package/skills/cursor/debug/references/investigation-checklist.md +217 -0
- package/skills/cursor/debug/references/rca-template.md +150 -0
- package/skills/cursor/debug/references/state-schema.md +294 -0
- package/skills/cursor/debug/references/thorough-track.md +171 -0
- package/skills/cursor/debug/references/triage-questions.md +155 -0
- package/skills/cursor/debug/references/troubleshooting.md +47 -0
- package/skills/cursor/delegation/SKILL.md +351 -0
- package/skills/cursor/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/cursor/delegation/references/agent-teams-saga.md +254 -0
- package/skills/cursor/delegation/references/fix-mode.md +118 -0
- package/skills/cursor/delegation/references/fixer-prompt.md +174 -0
- package/skills/cursor/delegation/references/implementer-prompt.md +401 -0
- package/skills/cursor/delegation/references/parallel-strategy.md +124 -0
- package/skills/cursor/delegation/references/pbt-patterns.md +172 -0
- package/skills/cursor/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/cursor/delegation/references/rationalization-refutation.md +15 -0
- package/skills/cursor/delegation/references/state-management.md +84 -0
- package/skills/cursor/delegation/references/testing-patterns.md +146 -0
- package/skills/cursor/delegation/references/troubleshooting.md +109 -0
- package/skills/cursor/delegation/references/worked-example.md +104 -0
- package/skills/cursor/delegation/references/workflow-steps.md +131 -0
- package/skills/cursor/delegation/references/worktree-enforcement.md +71 -0
- package/skills/cursor/dogfood/SKILL.md +235 -0
- package/skills/cursor/dogfood/references/report-template.md +109 -0
- package/skills/cursor/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/cursor/git-worktrees/SKILL.md +193 -0
- package/skills/cursor/git-worktrees/references/commands-reference.md +78 -0
- package/skills/cursor/implementation-planning/SKILL.md +289 -0
- package/skills/cursor/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/cursor/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/cursor/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/cursor/implementation-planning/references/task-template.md +63 -0
- package/skills/cursor/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/cursor/implementation-planning/references/worked-example.md +76 -0
- package/skills/cursor/oneshot-workflow/SKILL.md +468 -0
- package/skills/cursor/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/cursor/prune-workflows/SKILL.md +290 -0
- package/skills/cursor/prune-workflows/references/safeguards.md +74 -0
- package/skills/cursor/quality-review/SKILL.md +371 -0
- package/skills/cursor/quality-review/references/auto-transition.md +47 -0
- package/skills/cursor/quality-review/references/axiom-integration.md +135 -0
- package/skills/cursor/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/cursor/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/cursor/quality-review/references/gate-execution.md +60 -0
- package/skills/cursor/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/cursor/quality-review/references/review-report-template.md +65 -0
- package/skills/cursor/quality-review/references/security-checklist.md +79 -0
- package/skills/cursor/quality-review/references/typescript-standards.md +24 -0
- package/skills/cursor/refactor/SKILL.md +196 -0
- package/skills/cursor/refactor/references/brief-template.md +81 -0
- package/skills/cursor/refactor/references/doc-update-checklist.md +113 -0
- package/skills/cursor/refactor/references/explore-checklist.md +79 -0
- package/skills/cursor/refactor/references/overhaul-track.md +194 -0
- package/skills/cursor/refactor/references/phases/auto-chain.md +267 -0
- package/skills/cursor/refactor/references/phases/brief.md +176 -0
- package/skills/cursor/refactor/references/phases/explore.md +132 -0
- package/skills/cursor/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/cursor/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/cursor/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/cursor/refactor/references/phases/polish-implement.md +347 -0
- package/skills/cursor/refactor/references/phases/polish-validate.md +218 -0
- package/skills/cursor/refactor/references/phases/update-docs.md +234 -0
- package/skills/cursor/refactor/references/polish-track.md +152 -0
- package/skills/cursor/shepherd/SKILL.md +251 -0
- package/skills/cursor/shepherd/references/assess-checklist.md +170 -0
- package/skills/cursor/shepherd/references/escalation-criteria.md +53 -0
- package/skills/cursor/shepherd/references/fix-strategies.md +289 -0
- package/skills/cursor/shepherd/references/gate-event-emission.md +47 -0
- package/skills/cursor/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/cursor/spec-review/SKILL.md +294 -0
- package/skills/cursor/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/cursor/spec-review/references/review-checklist.md +79 -0
- package/skills/cursor/spec-review/references/worked-example.md +72 -0
- package/skills/cursor/synthesis/SKILL.md +217 -0
- package/skills/cursor/synthesis/references/github-native-stacking.md +135 -0
- package/skills/cursor/synthesis/references/merge-ordering.md +50 -0
- package/skills/cursor/synthesis/references/pr-descriptions.md +87 -0
- package/skills/cursor/synthesis/references/synthesis-steps.md +145 -0
- package/skills/cursor/synthesis/references/troubleshooting.md +115 -0
- package/skills/cursor/workflow-state/SKILL.md +254 -0
- package/skills/cursor/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/cursor/workflow-state/references/phase-transitions.md +206 -0
- package/skills/generic/brainstorming/SKILL.md +182 -0
- package/skills/generic/brainstorming/references/design-template.md +107 -0
- package/skills/generic/brainstorming/references/worked-example.md +58 -0
- package/skills/generic/cleanup/SKILL.md +169 -0
- package/skills/generic/cleanup/references/merge-verification.md +40 -0
- package/skills/generic/debug/SKILL.md +247 -0
- package/skills/generic/debug/references/hotfix-track.md +105 -0
- package/skills/generic/debug/references/investigation-checklist.md +217 -0
- package/skills/generic/debug/references/rca-template.md +150 -0
- package/skills/generic/debug/references/state-schema.md +294 -0
- package/skills/generic/debug/references/thorough-track.md +171 -0
- package/skills/generic/debug/references/triage-questions.md +155 -0
- package/skills/generic/debug/references/troubleshooting.md +47 -0
- package/skills/generic/delegation/SKILL.md +345 -0
- package/skills/generic/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/generic/delegation/references/agent-teams-saga.md +254 -0
- package/skills/generic/delegation/references/fix-mode.md +118 -0
- package/skills/generic/delegation/references/fixer-prompt.md +174 -0
- package/skills/generic/delegation/references/implementer-prompt.md +401 -0
- package/skills/generic/delegation/references/parallel-strategy.md +124 -0
- package/skills/generic/delegation/references/pbt-patterns.md +172 -0
- package/skills/generic/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/generic/delegation/references/rationalization-refutation.md +15 -0
- package/skills/generic/delegation/references/state-management.md +84 -0
- package/skills/generic/delegation/references/testing-patterns.md +146 -0
- package/skills/generic/delegation/references/troubleshooting.md +109 -0
- package/skills/generic/delegation/references/worked-example.md +104 -0
- package/skills/generic/delegation/references/workflow-steps.md +131 -0
- package/skills/generic/delegation/references/worktree-enforcement.md +71 -0
- package/skills/generic/dogfood/SKILL.md +235 -0
- package/skills/generic/dogfood/references/report-template.md +109 -0
- package/skills/generic/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/generic/git-worktrees/SKILL.md +193 -0
- package/skills/generic/git-worktrees/references/commands-reference.md +78 -0
- package/skills/generic/implementation-planning/SKILL.md +289 -0
- package/skills/generic/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/generic/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/generic/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/generic/implementation-planning/references/task-template.md +63 -0
- package/skills/generic/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/generic/implementation-planning/references/worked-example.md +76 -0
- package/skills/generic/oneshot-workflow/SKILL.md +468 -0
- package/skills/generic/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/generic/prune-workflows/SKILL.md +290 -0
- package/skills/generic/prune-workflows/references/safeguards.md +74 -0
- package/skills/generic/quality-review/SKILL.md +371 -0
- package/skills/generic/quality-review/references/auto-transition.md +47 -0
- package/skills/generic/quality-review/references/axiom-integration.md +135 -0
- package/skills/generic/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/generic/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/generic/quality-review/references/gate-execution.md +60 -0
- package/skills/generic/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/generic/quality-review/references/review-report-template.md +65 -0
- package/skills/generic/quality-review/references/security-checklist.md +79 -0
- package/skills/generic/quality-review/references/typescript-standards.md +24 -0
- package/skills/generic/refactor/SKILL.md +196 -0
- package/skills/generic/refactor/references/brief-template.md +81 -0
- package/skills/generic/refactor/references/doc-update-checklist.md +113 -0
- package/skills/generic/refactor/references/explore-checklist.md +79 -0
- package/skills/generic/refactor/references/overhaul-track.md +194 -0
- package/skills/generic/refactor/references/phases/auto-chain.md +267 -0
- package/skills/generic/refactor/references/phases/brief.md +176 -0
- package/skills/generic/refactor/references/phases/explore.md +132 -0
- package/skills/generic/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/generic/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/generic/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/generic/refactor/references/phases/polish-implement.md +347 -0
- package/skills/generic/refactor/references/phases/polish-validate.md +218 -0
- package/skills/generic/refactor/references/phases/update-docs.md +234 -0
- package/skills/generic/refactor/references/polish-track.md +152 -0
- package/skills/generic/shepherd/SKILL.md +251 -0
- package/skills/generic/shepherd/references/assess-checklist.md +170 -0
- package/skills/generic/shepherd/references/escalation-criteria.md +53 -0
- package/skills/generic/shepherd/references/fix-strategies.md +289 -0
- package/skills/generic/shepherd/references/gate-event-emission.md +47 -0
- package/skills/generic/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/generic/spec-review/SKILL.md +294 -0
- package/skills/generic/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/generic/spec-review/references/review-checklist.md +79 -0
- package/skills/generic/spec-review/references/worked-example.md +72 -0
- package/skills/generic/synthesis/SKILL.md +217 -0
- package/skills/generic/synthesis/references/github-native-stacking.md +135 -0
- package/skills/generic/synthesis/references/merge-ordering.md +50 -0
- package/skills/generic/synthesis/references/pr-descriptions.md +87 -0
- package/skills/generic/synthesis/references/synthesis-steps.md +145 -0
- package/skills/generic/synthesis/references/troubleshooting.md +115 -0
- package/skills/generic/workflow-state/SKILL.md +254 -0
- package/skills/generic/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/generic/workflow-state/references/phase-transitions.md +206 -0
- package/skills/opencode/brainstorming/SKILL.md +182 -0
- package/skills/opencode/brainstorming/references/design-template.md +107 -0
- package/skills/opencode/brainstorming/references/worked-example.md +58 -0
- package/skills/opencode/cleanup/SKILL.md +169 -0
- package/skills/opencode/cleanup/references/merge-verification.md +40 -0
- package/skills/opencode/debug/SKILL.md +247 -0
- package/skills/opencode/debug/references/hotfix-track.md +105 -0
- package/skills/opencode/debug/references/investigation-checklist.md +217 -0
- package/skills/opencode/debug/references/rca-template.md +150 -0
- package/skills/opencode/debug/references/state-schema.md +294 -0
- package/skills/opencode/debug/references/thorough-track.md +171 -0
- package/skills/opencode/debug/references/triage-questions.md +155 -0
- package/skills/opencode/debug/references/troubleshooting.md +47 -0
- package/skills/opencode/delegation/SKILL.md +353 -0
- package/skills/opencode/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/opencode/delegation/references/agent-teams-saga.md +254 -0
- package/skills/opencode/delegation/references/fix-mode.md +118 -0
- package/skills/opencode/delegation/references/fixer-prompt.md +174 -0
- package/skills/opencode/delegation/references/implementer-prompt.md +401 -0
- package/skills/opencode/delegation/references/parallel-strategy.md +124 -0
- package/skills/opencode/delegation/references/pbt-patterns.md +172 -0
- package/skills/opencode/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/opencode/delegation/references/rationalization-refutation.md +15 -0
- package/skills/opencode/delegation/references/state-management.md +84 -0
- package/skills/opencode/delegation/references/testing-patterns.md +146 -0
- package/skills/opencode/delegation/references/troubleshooting.md +109 -0
- package/skills/opencode/delegation/references/worked-example.md +104 -0
- package/skills/opencode/delegation/references/workflow-steps.md +131 -0
- package/skills/opencode/delegation/references/worktree-enforcement.md +71 -0
- package/skills/opencode/dogfood/SKILL.md +235 -0
- package/skills/opencode/dogfood/references/report-template.md +109 -0
- package/skills/opencode/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/opencode/git-worktrees/SKILL.md +193 -0
- package/skills/opencode/git-worktrees/references/commands-reference.md +78 -0
- package/skills/opencode/implementation-planning/SKILL.md +289 -0
- package/skills/opencode/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/opencode/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/opencode/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/opencode/implementation-planning/references/task-template.md +63 -0
- package/skills/opencode/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/opencode/implementation-planning/references/worked-example.md +76 -0
- package/skills/opencode/oneshot-workflow/SKILL.md +468 -0
- package/skills/opencode/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/opencode/prune-workflows/SKILL.md +290 -0
- package/skills/opencode/prune-workflows/references/safeguards.md +74 -0
- package/skills/opencode/quality-review/SKILL.md +371 -0
- package/skills/opencode/quality-review/references/auto-transition.md +47 -0
- package/skills/opencode/quality-review/references/axiom-integration.md +135 -0
- package/skills/opencode/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/opencode/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/opencode/quality-review/references/gate-execution.md +60 -0
- package/skills/opencode/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/opencode/quality-review/references/review-report-template.md +65 -0
- package/skills/opencode/quality-review/references/security-checklist.md +79 -0
- package/skills/opencode/quality-review/references/typescript-standards.md +24 -0
- package/skills/opencode/refactor/SKILL.md +196 -0
- package/skills/opencode/refactor/references/brief-template.md +81 -0
- package/skills/opencode/refactor/references/doc-update-checklist.md +113 -0
- package/skills/opencode/refactor/references/explore-checklist.md +79 -0
- package/skills/opencode/refactor/references/overhaul-track.md +194 -0
- package/skills/opencode/refactor/references/phases/auto-chain.md +267 -0
- package/skills/opencode/refactor/references/phases/brief.md +176 -0
- package/skills/opencode/refactor/references/phases/explore.md +132 -0
- package/skills/opencode/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/opencode/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/opencode/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/opencode/refactor/references/phases/polish-implement.md +347 -0
- package/skills/opencode/refactor/references/phases/polish-validate.md +218 -0
- package/skills/opencode/refactor/references/phases/update-docs.md +234 -0
- package/skills/opencode/refactor/references/polish-track.md +152 -0
- package/skills/opencode/shepherd/SKILL.md +251 -0
- package/skills/opencode/shepherd/references/assess-checklist.md +170 -0
- package/skills/opencode/shepherd/references/escalation-criteria.md +53 -0
- package/skills/opencode/shepherd/references/fix-strategies.md +289 -0
- package/skills/opencode/shepherd/references/gate-event-emission.md +47 -0
- package/skills/opencode/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/opencode/spec-review/SKILL.md +294 -0
- package/skills/opencode/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/opencode/spec-review/references/review-checklist.md +79 -0
- package/skills/opencode/spec-review/references/worked-example.md +72 -0
- package/skills/opencode/synthesis/SKILL.md +217 -0
- package/skills/opencode/synthesis/references/github-native-stacking.md +135 -0
- package/skills/opencode/synthesis/references/merge-ordering.md +50 -0
- package/skills/opencode/synthesis/references/pr-descriptions.md +87 -0
- package/skills/opencode/synthesis/references/synthesis-steps.md +145 -0
- package/skills/opencode/synthesis/references/troubleshooting.md +115 -0
- package/skills/opencode/workflow-state/SKILL.md +254 -0
- package/skills/opencode/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/opencode/workflow-state/references/phase-transitions.md +206 -0
- package/.claude-plugin/marketplace.json +0 -34
- package/dist/node_modules/electron/index.js +0 -1
- package/dist/node_modules/electron/package.json +0 -1
- package/dist/node_modules/playwright-core/index.js +0 -1
- package/dist/node_modules/playwright-core/package.json +0 -1
- package/scripts/assess-refactor-scope.sh +0 -239
- package/scripts/check-coderabbit.sh +0 -288
- package/scripts/check-context-economy.sh +0 -405
- package/scripts/check-coverage-thresholds.sh +0 -194
- package/scripts/check-operational-resilience.sh +0 -306
- package/scripts/check-polish-scope.sh +0 -245
- package/scripts/check-post-merge.sh +0 -185
- package/scripts/check-pr-comments.sh +0 -127
- package/scripts/check-task-decomposition.sh +0 -451
- package/scripts/check-tdd-compliance.sh +0 -265
- package/scripts/check-workflow-determinism.sh +0 -312
- package/scripts/debug-review-gate.sh +0 -201
- package/scripts/extract-fix-tasks.sh +0 -179
- package/scripts/extract-task.sh +0 -67
- package/scripts/generate-traceability.sh +0 -209
- package/scripts/investigation-timer.sh +0 -171
- package/scripts/needs-schema-sync.sh +0 -174
- package/scripts/new-project.sh +0 -103
- package/scripts/post-delegation-check.sh +0 -317
- package/scripts/pre-synthesis-check.sh +0 -475
- package/scripts/reconcile-state.sh +0 -346
- package/scripts/review-diff.sh +0 -63
- package/scripts/review-verdict.sh +0 -169
- package/scripts/security-scan.sh +0 -248
- package/scripts/select-debug-track.sh +0 -186
- package/scripts/setup-worktree.sh +0 -323
- package/scripts/spec-coverage-check.sh +0 -230
- package/scripts/static-analysis-gate.sh +0 -261
- package/scripts/validate-companion.sh +0 -161
- package/scripts/validate-pr-body.sh +0 -158
- package/scripts/validate-pr-stack.sh +0 -146
- package/scripts/verify-delegation-saga.sh +0 -240
- package/scripts/verify-doc-links.sh +0 -211
- package/scripts/verify-ideate-artifacts.sh +0 -296
- package/scripts/verify-plan-coverage.sh +0 -408
- package/scripts/verify-provenance-chain.sh +0 -310
- package/scripts/verify-review-triage.sh +0 -219
- package/scripts/verify-worktree-baseline.sh +0 -159
- package/scripts/verify-worktree.sh +0 -84
- package/skills/delegation/references/fix-mode.md +0 -78
- package/skills/implementation-planning/references/task-template.md +0 -43
- package/skills/shared/prompts/context-reading.md +0 -66
- package/skills/shared/prompts/report-format.md +0 -54
- package/skills/shared/prompts/tdd-requirements.md +0 -39
- package/skills/shared/references/coding-standards.md +0 -46
- package/skills/shared/references/mcp-tool-guidance.md +0 -26
- package/skills/shared/references/skill-path-resolution.md +0 -10
- package/skills/shared/references/tdd.md +0 -41
- package/skills/shared/references/telemetry-awareness.md +0 -9
- /package/skills/{brainstorming → claude/brainstorming}/references/worked-example.md +0 -0
- /package/skills/{cleanup → claude/cleanup}/references/merge-verification.md +0 -0
- /package/skills/{debug → claude/debug}/references/rca-template.md +0 -0
- /package/skills/{debug → claude/debug}/references/state-schema.md +0 -0
- /package/skills/{debug → claude/debug}/references/triage-questions.md +0 -0
- /package/skills/{debug → claude/debug}/references/troubleshooting.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/adaptive-orchestration.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/fixer-prompt.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/pbt-patterns.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/pr-fixes-mode.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/rationalization-refutation.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/testing-patterns.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/worked-example.md +0 -0
- /package/skills/{git-worktrees → claude/git-worktrees}/references/commands-reference.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/plan-document-template.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/rationalization-refutation.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/spec-tracing-guide.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/code-quality-checklist.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/convergence-and-verdict.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/gate-execution.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/rationalization-refutation.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/review-report-template.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/security-checklist.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/typescript-standards.md +0 -0
- /package/skills/{refactor → claude/refactor}/references/brief-template.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/auto-chain.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/brief.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/explore.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-delegate.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-plan.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-review.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/update-docs.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/assess-checklist.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/escalation-criteria.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/gate-event-emission.md +0 -0
- /package/skills/{spec-review → claude/spec-review}/references/rationalization-refutation.md +0 -0
- /package/skills/{spec-review → claude/spec-review}/references/review-checklist.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/merge-ordering.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/pr-descriptions.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/troubleshooting.md +0 -0
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify Ideate Artifacts
|
|
3
|
-
# Checks brainstorming/ideation completion by validating design document existence,
|
|
4
|
-
# required sections, option evaluation, and state file consistency.
|
|
5
|
-
#
|
|
6
|
-
# Usage: verify-ideate-artifacts.sh --state-file <path> [--docs-dir <path>] [--design-file <path>]
|
|
7
|
-
#
|
|
8
|
-
# Exit codes:
|
|
9
|
-
# 0 = all checks pass (ideation complete)
|
|
10
|
-
# 1 = one or more checks failed (missing sections or artifacts)
|
|
11
|
-
# 2 = usage error (missing required args)
|
|
12
|
-
|
|
13
|
-
set -euo pipefail
|
|
14
|
-
|
|
15
|
-
# ============================================================
|
|
16
|
-
# ARGUMENT PARSING
|
|
17
|
-
# ============================================================
|
|
18
|
-
|
|
19
|
-
STATE_FILE=""
|
|
20
|
-
DOCS_DIR=""
|
|
21
|
-
DESIGN_FILE=""
|
|
22
|
-
|
|
23
|
-
usage() {
|
|
24
|
-
cat << 'USAGE'
|
|
25
|
-
Usage: verify-ideate-artifacts.sh --state-file <path> [--docs-dir <path>] [--design-file <path>]
|
|
26
|
-
|
|
27
|
-
Required:
|
|
28
|
-
--state-file <path> Path to the workflow state JSON file
|
|
29
|
-
|
|
30
|
-
Optional:
|
|
31
|
-
--docs-dir <path> Directory to search for design documents (e.g., docs/designs)
|
|
32
|
-
--design-file <path> Direct path to the design document (overrides --docs-dir)
|
|
33
|
-
--help Show this help message
|
|
34
|
-
|
|
35
|
-
Exit codes:
|
|
36
|
-
0 All completion criteria met
|
|
37
|
-
1 Missing artifacts or sections
|
|
38
|
-
2 Usage error (missing required args)
|
|
39
|
-
USAGE
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
while [[ $# -gt 0 ]]; do
|
|
43
|
-
case "$1" in
|
|
44
|
-
--state-file)
|
|
45
|
-
if [[ -z "${2:-}" ]]; then
|
|
46
|
-
echo "Error: --state-file requires a path argument" >&2
|
|
47
|
-
exit 2
|
|
48
|
-
fi
|
|
49
|
-
STATE_FILE="$2"
|
|
50
|
-
shift 2
|
|
51
|
-
;;
|
|
52
|
-
--docs-dir)
|
|
53
|
-
if [[ -z "${2:-}" ]]; then
|
|
54
|
-
echo "Error: --docs-dir requires a path argument" >&2
|
|
55
|
-
exit 2
|
|
56
|
-
fi
|
|
57
|
-
DOCS_DIR="$2"
|
|
58
|
-
shift 2
|
|
59
|
-
;;
|
|
60
|
-
--design-file)
|
|
61
|
-
if [[ -z "${2:-}" ]]; then
|
|
62
|
-
echo "Error: --design-file requires a path argument" >&2
|
|
63
|
-
exit 2
|
|
64
|
-
fi
|
|
65
|
-
DESIGN_FILE="$2"
|
|
66
|
-
shift 2
|
|
67
|
-
;;
|
|
68
|
-
--help)
|
|
69
|
-
usage
|
|
70
|
-
exit 0
|
|
71
|
-
;;
|
|
72
|
-
*)
|
|
73
|
-
echo "Error: Unknown argument '$1'" >&2
|
|
74
|
-
usage >&2
|
|
75
|
-
exit 2
|
|
76
|
-
;;
|
|
77
|
-
esac
|
|
78
|
-
done
|
|
79
|
-
|
|
80
|
-
if [[ -z "$STATE_FILE" ]]; then
|
|
81
|
-
echo "Error: --state-file is required" >&2
|
|
82
|
-
usage >&2
|
|
83
|
-
exit 2
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# ============================================================
|
|
87
|
-
# DEPENDENCY CHECK
|
|
88
|
-
# ============================================================
|
|
89
|
-
|
|
90
|
-
if ! command -v jq &>/dev/null; then
|
|
91
|
-
echo "Error: jq is required but not installed" >&2
|
|
92
|
-
exit 2
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
# ============================================================
|
|
96
|
-
# CHECK FUNCTIONS
|
|
97
|
-
# ============================================================
|
|
98
|
-
|
|
99
|
-
CHECK_PASS=0
|
|
100
|
-
CHECK_FAIL=0
|
|
101
|
-
RESULTS=()
|
|
102
|
-
|
|
103
|
-
check_pass() {
|
|
104
|
-
local name="$1"
|
|
105
|
-
RESULTS+=("- **PASS**: $name")
|
|
106
|
-
CHECK_PASS=$((CHECK_PASS + 1))
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
check_fail() {
|
|
110
|
-
local name="$1"
|
|
111
|
-
local detail="${2:-}"
|
|
112
|
-
if [[ -n "$detail" ]]; then
|
|
113
|
-
RESULTS+=("- **FAIL**: $name — $detail")
|
|
114
|
-
else
|
|
115
|
-
RESULTS+=("- **FAIL**: $name")
|
|
116
|
-
fi
|
|
117
|
-
CHECK_FAIL=$((CHECK_FAIL + 1))
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
# ============================================================
|
|
121
|
-
# RESOLVE DESIGN FILE
|
|
122
|
-
# ============================================================
|
|
123
|
-
|
|
124
|
-
resolve_design_file() {
|
|
125
|
-
# If --design-file was given, use it directly
|
|
126
|
-
if [[ -n "$DESIGN_FILE" ]]; then
|
|
127
|
-
if [[ -f "$DESIGN_FILE" ]]; then
|
|
128
|
-
return 0
|
|
129
|
-
else
|
|
130
|
-
check_fail "Design document exists" "File not found: $DESIGN_FILE"
|
|
131
|
-
return 1
|
|
132
|
-
fi
|
|
133
|
-
fi
|
|
134
|
-
|
|
135
|
-
# Try to get design path from state file
|
|
136
|
-
if [[ -f "$STATE_FILE" ]] && jq empty "$STATE_FILE" 2>/dev/null; then
|
|
137
|
-
local state_design_path
|
|
138
|
-
state_design_path="$(jq -r '.artifacts.design // empty' "$STATE_FILE")"
|
|
139
|
-
if [[ -n "$state_design_path" && -f "$state_design_path" ]]; then
|
|
140
|
-
DESIGN_FILE="$state_design_path"
|
|
141
|
-
return 0
|
|
142
|
-
fi
|
|
143
|
-
if [[ -n "$state_design_path" ]] && [[ ! -f "$state_design_path" ]]; then
|
|
144
|
-
check_fail "Design document exists" "State references $state_design_path but file not found"
|
|
145
|
-
return 1
|
|
146
|
-
fi
|
|
147
|
-
fi
|
|
148
|
-
|
|
149
|
-
# Search in docs dir for YYYY-MM-DD-*.md pattern
|
|
150
|
-
if [[ -n "$DOCS_DIR" && -d "$DOCS_DIR" ]]; then
|
|
151
|
-
local found_files
|
|
152
|
-
found_files="$(find "$DOCS_DIR" -maxdepth 1 -name '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*.md' -type f 2>/dev/null | sort -r | head -1)"
|
|
153
|
-
if [[ -n "$found_files" ]]; then
|
|
154
|
-
DESIGN_FILE="$found_files"
|
|
155
|
-
return 0
|
|
156
|
-
fi
|
|
157
|
-
fi
|
|
158
|
-
|
|
159
|
-
check_fail "Design document exists" "No design document found in ${DOCS_DIR:-<no docs-dir>}"
|
|
160
|
-
return 1
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
# ============================================================
|
|
164
|
-
# CHECK 1: Design document exists
|
|
165
|
-
# ============================================================
|
|
166
|
-
|
|
167
|
-
check_design_exists() {
|
|
168
|
-
if resolve_design_file; then
|
|
169
|
-
check_pass "Design document exists ($DESIGN_FILE)"
|
|
170
|
-
return 0
|
|
171
|
-
fi
|
|
172
|
-
return 1
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
# ============================================================
|
|
176
|
-
# CHECK 2: Required sections present
|
|
177
|
-
# ============================================================
|
|
178
|
-
|
|
179
|
-
REQUIRED_SECTIONS=(
|
|
180
|
-
"Problem Statement"
|
|
181
|
-
"Chosen Approach"
|
|
182
|
-
"Technical Design"
|
|
183
|
-
"Integration Points"
|
|
184
|
-
"Testing Strategy"
|
|
185
|
-
"Open Questions"
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
check_required_sections() {
|
|
189
|
-
local missing=()
|
|
190
|
-
local content
|
|
191
|
-
content="$(cat "$DESIGN_FILE")"
|
|
192
|
-
|
|
193
|
-
for section in "${REQUIRED_SECTIONS[@]}"; do
|
|
194
|
-
if ! echo "$content" | grep -qi "##.*$section"; then
|
|
195
|
-
missing+=("$section")
|
|
196
|
-
fi
|
|
197
|
-
done
|
|
198
|
-
|
|
199
|
-
if [[ -z "${missing+x}" ]] || [[ ${#missing[@]} -eq 0 ]]; then
|
|
200
|
-
check_pass "Required sections present (${#REQUIRED_SECTIONS[@]}/${#REQUIRED_SECTIONS[@]})"
|
|
201
|
-
return 0
|
|
202
|
-
else
|
|
203
|
-
local missing_list
|
|
204
|
-
missing_list="$(IFS=', '; echo "${missing[*]}")"
|
|
205
|
-
check_fail "Required sections present" "Missing: $missing_list"
|
|
206
|
-
return 1
|
|
207
|
-
fi
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
# ============================================================
|
|
211
|
-
# CHECK 3: Multiple options evaluated (2-3)
|
|
212
|
-
# ============================================================
|
|
213
|
-
|
|
214
|
-
check_multiple_options() {
|
|
215
|
-
local content
|
|
216
|
-
content="$(cat "$DESIGN_FILE")"
|
|
217
|
-
|
|
218
|
-
# Count "Option N" or "Option [N]" patterns in headings
|
|
219
|
-
local option_count
|
|
220
|
-
option_count="$(echo "$content" | grep -ciE '#+\s*(option\s+[0-9]|option\s+\[?[0-9])' || true)"
|
|
221
|
-
|
|
222
|
-
if [[ "$option_count" -ge 2 ]]; then
|
|
223
|
-
check_pass "Multiple options evaluated ($option_count options found)"
|
|
224
|
-
return 0
|
|
225
|
-
else
|
|
226
|
-
check_fail "Multiple options evaluated" "Found $option_count option(s), expected at least 2"
|
|
227
|
-
return 1
|
|
228
|
-
fi
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
# ============================================================
|
|
232
|
-
# CHECK 4: State file has design path recorded
|
|
233
|
-
# ============================================================
|
|
234
|
-
|
|
235
|
-
check_state_design_path() {
|
|
236
|
-
if [[ ! -f "$STATE_FILE" ]]; then
|
|
237
|
-
check_fail "State file has design path" "State file not found: $STATE_FILE"
|
|
238
|
-
return 1
|
|
239
|
-
fi
|
|
240
|
-
|
|
241
|
-
if ! jq empty "$STATE_FILE" 2>/dev/null; then
|
|
242
|
-
check_fail "State file has design path" "Invalid JSON: $STATE_FILE"
|
|
243
|
-
return 1
|
|
244
|
-
fi
|
|
245
|
-
|
|
246
|
-
local design_path
|
|
247
|
-
design_path="$(jq -r '.artifacts.design // empty' "$STATE_FILE")"
|
|
248
|
-
|
|
249
|
-
if [[ -n "$design_path" ]]; then
|
|
250
|
-
check_pass "State file has design path ($design_path)"
|
|
251
|
-
return 0
|
|
252
|
-
else
|
|
253
|
-
check_fail "State file has design path" "artifacts.design is empty or missing"
|
|
254
|
-
return 1
|
|
255
|
-
fi
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
# ============================================================
|
|
259
|
-
# EXECUTE CHECKS
|
|
260
|
-
# ============================================================
|
|
261
|
-
|
|
262
|
-
if check_design_exists; then
|
|
263
|
-
check_required_sections || true
|
|
264
|
-
check_multiple_options || true
|
|
265
|
-
fi
|
|
266
|
-
|
|
267
|
-
check_state_design_path || true
|
|
268
|
-
|
|
269
|
-
# ============================================================
|
|
270
|
-
# STRUCTURED OUTPUT
|
|
271
|
-
# ============================================================
|
|
272
|
-
|
|
273
|
-
echo "## Ideation Artifact Verification Report"
|
|
274
|
-
echo ""
|
|
275
|
-
echo "**State file:** \`$STATE_FILE\`"
|
|
276
|
-
if [[ -n "$DESIGN_FILE" ]]; then
|
|
277
|
-
echo "**Design file:** \`$DESIGN_FILE\`"
|
|
278
|
-
fi
|
|
279
|
-
echo ""
|
|
280
|
-
|
|
281
|
-
for result in "${RESULTS[@]}"; do
|
|
282
|
-
echo "$result"
|
|
283
|
-
done
|
|
284
|
-
|
|
285
|
-
echo ""
|
|
286
|
-
TOTAL=$((CHECK_PASS + CHECK_FAIL))
|
|
287
|
-
echo "---"
|
|
288
|
-
echo ""
|
|
289
|
-
|
|
290
|
-
if [[ $CHECK_FAIL -eq 0 ]]; then
|
|
291
|
-
echo "**Result: PASS** ($CHECK_PASS/$TOTAL checks passed)"
|
|
292
|
-
exit 0
|
|
293
|
-
else
|
|
294
|
-
echo "**Result: FAIL** ($CHECK_FAIL/$TOTAL checks failed)"
|
|
295
|
-
exit 1
|
|
296
|
-
fi
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify Plan Coverage
|
|
3
|
-
# Cross-reference design document sections to plan tasks. Replaces "Plan Verification" prose.
|
|
4
|
-
#
|
|
5
|
-
# Usage: verify-plan-coverage.sh --design-file <path> --plan-file <path>
|
|
6
|
-
#
|
|
7
|
-
# Exit codes:
|
|
8
|
-
# 0 = complete coverage (every design subsection maps to >= 1 task)
|
|
9
|
-
# 1 = gaps found (unmapped sections) or no '### Task' headers found in plan
|
|
10
|
-
# 2 = usage error (missing required args, empty design, missing files)
|
|
11
|
-
|
|
12
|
-
set -euo pipefail
|
|
13
|
-
|
|
14
|
-
# ============================================================
|
|
15
|
-
# ARGUMENT PARSING
|
|
16
|
-
# ============================================================
|
|
17
|
-
|
|
18
|
-
DESIGN_FILE=""
|
|
19
|
-
PLAN_FILE=""
|
|
20
|
-
|
|
21
|
-
usage() {
|
|
22
|
-
cat << 'USAGE'
|
|
23
|
-
Usage: verify-plan-coverage.sh --design-file <path> --plan-file <path>
|
|
24
|
-
|
|
25
|
-
Required:
|
|
26
|
-
--design-file <path> Path to the design document markdown file
|
|
27
|
-
--plan-file <path> Path to the implementation plan markdown file
|
|
28
|
-
|
|
29
|
-
Optional:
|
|
30
|
-
--help Show this help message
|
|
31
|
-
|
|
32
|
-
Exit codes:
|
|
33
|
-
0 Complete coverage (all design subsections mapped to tasks)
|
|
34
|
-
1 Gaps found (unmapped design sections)
|
|
35
|
-
2 Usage error (missing required args, empty design, missing files)
|
|
36
|
-
USAGE
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
while [[ $# -gt 0 ]]; do
|
|
40
|
-
case "$1" in
|
|
41
|
-
--design-file)
|
|
42
|
-
if [[ -z "${2:-}" ]]; then
|
|
43
|
-
echo "Error: --design-file requires a path argument" >&2
|
|
44
|
-
exit 2
|
|
45
|
-
fi
|
|
46
|
-
DESIGN_FILE="$2"
|
|
47
|
-
shift 2
|
|
48
|
-
;;
|
|
49
|
-
--plan-file)
|
|
50
|
-
if [[ -z "${2:-}" ]]; then
|
|
51
|
-
echo "Error: --plan-file requires a path argument" >&2
|
|
52
|
-
exit 2
|
|
53
|
-
fi
|
|
54
|
-
PLAN_FILE="$2"
|
|
55
|
-
shift 2
|
|
56
|
-
;;
|
|
57
|
-
--help)
|
|
58
|
-
usage
|
|
59
|
-
exit 0
|
|
60
|
-
;;
|
|
61
|
-
*)
|
|
62
|
-
echo "Error: Unknown argument '$1'" >&2
|
|
63
|
-
usage >&2
|
|
64
|
-
exit 2
|
|
65
|
-
;;
|
|
66
|
-
esac
|
|
67
|
-
done
|
|
68
|
-
|
|
69
|
-
if [[ -z "$DESIGN_FILE" || -z "$PLAN_FILE" ]]; then
|
|
70
|
-
echo "Error: --design-file and --plan-file are required" >&2
|
|
71
|
-
usage >&2
|
|
72
|
-
exit 2
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
if [[ ! -f "$DESIGN_FILE" ]]; then
|
|
76
|
-
echo "Error: Design file not found: $DESIGN_FILE" >&2
|
|
77
|
-
exit 2
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
if [[ ! -f "$PLAN_FILE" ]]; then
|
|
81
|
-
echo "Error: Plan file not found: $PLAN_FILE" >&2
|
|
82
|
-
exit 2
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# ============================================================
|
|
86
|
-
# EXTRACT DESIGN SECTIONS
|
|
87
|
-
# ============================================================
|
|
88
|
-
|
|
89
|
-
# Extract design subsections under ## Technical Design or ## Design Requirements.
|
|
90
|
-
# Strategy:
|
|
91
|
-
# 1. Collect all ### headers and their child #### headers within the design section
|
|
92
|
-
# 2. For each ### that has #### children, use the #### headers (more granular)
|
|
93
|
-
# 3. For each ### that has NO #### children, use the ### header itself (fallback)
|
|
94
|
-
|
|
95
|
-
# Phase 1: Parse the hierarchical structure
|
|
96
|
-
H3_HEADERS=() # All ### headers found
|
|
97
|
-
H4_BY_H3=() # Pipe-delimited #### headers for each ### (empty string if none)
|
|
98
|
-
IN_TECH_DESIGN=false
|
|
99
|
-
CURRENT_H3_INDEX=-1
|
|
100
|
-
|
|
101
|
-
while IFS= read -r line; do
|
|
102
|
-
# Detect start of Technical Design or Design Requirements section
|
|
103
|
-
if [[ "$line" =~ ^##[[:space:]]+Technical[[:space:]]+Design ]] || \
|
|
104
|
-
[[ "$line" =~ ^##[[:space:]]+Design[[:space:]]+Requirements ]]; then
|
|
105
|
-
IN_TECH_DESIGN=true
|
|
106
|
-
continue
|
|
107
|
-
fi
|
|
108
|
-
|
|
109
|
-
# Skip lines outside Technical Design
|
|
110
|
-
if [[ "$IN_TECH_DESIGN" != true ]]; then
|
|
111
|
-
continue
|
|
112
|
-
fi
|
|
113
|
-
|
|
114
|
-
# Detect next ## section (end of design section) — must NOT be ### or ####
|
|
115
|
-
if [[ "$line" =~ ^##[[:space:]] && ! "$line" =~ ^### ]]; then
|
|
116
|
-
IN_TECH_DESIGN=false
|
|
117
|
-
continue
|
|
118
|
-
fi
|
|
119
|
-
|
|
120
|
-
# Collect #### headers under current ### (check BEFORE ### to avoid BASH_REMATCH clobber)
|
|
121
|
-
if [[ "$line" =~ ^####[[:space:]]+(.+) && $CURRENT_H3_INDEX -ge 0 ]]; then
|
|
122
|
-
subsection_name="${BASH_REMATCH[1]}"
|
|
123
|
-
subsection_name="$(echo "$subsection_name" | sed 's/[[:space:]]*$//')"
|
|
124
|
-
if [[ -n "${H4_BY_H3[$CURRENT_H3_INDEX]}" ]]; then
|
|
125
|
-
H4_BY_H3[$CURRENT_H3_INDEX]="${H4_BY_H3[$CURRENT_H3_INDEX]}|${subsection_name}"
|
|
126
|
-
else
|
|
127
|
-
H4_BY_H3[$CURRENT_H3_INDEX]="$subsection_name"
|
|
128
|
-
fi
|
|
129
|
-
continue
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
# Collect ### headers (only if NOT ####, since #### was handled above)
|
|
133
|
-
if [[ "$line" =~ ^###[[:space:]]+(.+) ]]; then
|
|
134
|
-
section_name="${BASH_REMATCH[1]}"
|
|
135
|
-
section_name="$(echo "$section_name" | sed 's/[[:space:]]*$//')"
|
|
136
|
-
H3_HEADERS+=("$section_name")
|
|
137
|
-
H4_BY_H3+=("")
|
|
138
|
-
CURRENT_H3_INDEX=$(( ${#H3_HEADERS[@]} - 1 ))
|
|
139
|
-
continue
|
|
140
|
-
fi
|
|
141
|
-
done < "$DESIGN_FILE"
|
|
142
|
-
|
|
143
|
-
# Phase 2: Build DESIGN_SECTIONS from the hierarchy
|
|
144
|
-
# Prefer #### subsections when they exist; fall back to ### headers
|
|
145
|
-
DESIGN_SECTIONS=()
|
|
146
|
-
|
|
147
|
-
for i in "${!H3_HEADERS[@]}"; do
|
|
148
|
-
if [[ -n "${H4_BY_H3[$i]}" ]]; then
|
|
149
|
-
# Split pipe-delimited #### headers
|
|
150
|
-
IFS='|' read -ra subs <<< "${H4_BY_H3[$i]}"
|
|
151
|
-
for sub in "${subs[@]}"; do
|
|
152
|
-
DESIGN_SECTIONS+=("$sub")
|
|
153
|
-
done
|
|
154
|
-
else
|
|
155
|
-
# No #### children — use the ### header
|
|
156
|
-
DESIGN_SECTIONS+=("${H3_HEADERS[$i]}")
|
|
157
|
-
fi
|
|
158
|
-
done
|
|
159
|
-
|
|
160
|
-
# Validate we found sections
|
|
161
|
-
if [[ -z "${DESIGN_SECTIONS+x}" ]] || [[ ${#DESIGN_SECTIONS[@]} -eq 0 ]]; then
|
|
162
|
-
echo "Error: No design subsections found in design document" >&2
|
|
163
|
-
echo "Expected ### headers under '## Technical Design' or '## Design Requirements'" >&2
|
|
164
|
-
exit 2
|
|
165
|
-
fi
|
|
166
|
-
|
|
167
|
-
# ============================================================
|
|
168
|
-
# EXTRACT PLAN TASKS
|
|
169
|
-
# ============================================================
|
|
170
|
-
|
|
171
|
-
# Extract ### Task headers from plan
|
|
172
|
-
PLAN_TASKS=()
|
|
173
|
-
while IFS= read -r line; do
|
|
174
|
-
if [[ "$line" =~ ^###[[:space:]]+Task[[:space:]]+[0-9]+ ]]; then
|
|
175
|
-
# Extract the full task title (everything after "### Task NNN: ")
|
|
176
|
-
task_title="${line#*: }"
|
|
177
|
-
if [[ -n "$task_title" && "$task_title" != "$line" ]]; then
|
|
178
|
-
PLAN_TASKS+=("$task_title")
|
|
179
|
-
else
|
|
180
|
-
PLAN_TASKS+=("$line")
|
|
181
|
-
fi
|
|
182
|
-
fi
|
|
183
|
-
done < "$PLAN_FILE"
|
|
184
|
-
|
|
185
|
-
# Validate we found tasks
|
|
186
|
-
if [[ -z "${PLAN_TASKS+x}" ]] || [[ ${#PLAN_TASKS[@]} -eq 0 ]]; then
|
|
187
|
-
echo "ERROR: No '### Task' headers found in plan file: $PLAN_FILE" >&2
|
|
188
|
-
exit 1
|
|
189
|
-
fi
|
|
190
|
-
|
|
191
|
-
# Also read the full plan content for free-text matching
|
|
192
|
-
PLAN_CONTENT="$(cat "$PLAN_FILE")"
|
|
193
|
-
|
|
194
|
-
# ============================================================
|
|
195
|
-
# KEYWORD EXTRACTION HELPER
|
|
196
|
-
# ============================================================
|
|
197
|
-
|
|
198
|
-
# Common words to skip during keyword matching
|
|
199
|
-
STOP_WORDS="a an and are as at be by for from has have in is it of on or the this to was were will with"
|
|
200
|
-
|
|
201
|
-
# Extract significant keywords from a string (lowercase, skip stop words, skip short words)
|
|
202
|
-
# Returns space-separated keywords
|
|
203
|
-
extract_keywords() {
|
|
204
|
-
local text="$1"
|
|
205
|
-
local words=()
|
|
206
|
-
# Convert to lowercase, split on non-alpha
|
|
207
|
-
for word in $(echo "$text" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alpha:]' ' '); do
|
|
208
|
-
# Skip short words (< 3 chars) and stop words
|
|
209
|
-
if [[ ${#word} -lt 3 ]]; then
|
|
210
|
-
continue
|
|
211
|
-
fi
|
|
212
|
-
local is_stop=false
|
|
213
|
-
for sw in $STOP_WORDS; do
|
|
214
|
-
if [[ "$word" == "$sw" ]]; then
|
|
215
|
-
is_stop=true
|
|
216
|
-
break
|
|
217
|
-
fi
|
|
218
|
-
done
|
|
219
|
-
if [[ "$is_stop" == false ]]; then
|
|
220
|
-
words+=("$word")
|
|
221
|
-
fi
|
|
222
|
-
done
|
|
223
|
-
echo "${words[*]}"
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
# Check if text matches by keywords: at least 2 significant keywords from section
|
|
227
|
-
# appear in the target text (case-insensitive)
|
|
228
|
-
keyword_match() {
|
|
229
|
-
local section_keywords="$1"
|
|
230
|
-
local target_text="$2"
|
|
231
|
-
local target_lower
|
|
232
|
-
target_lower="$(echo "$target_text" | tr '[:upper:]' '[:lower:]')"
|
|
233
|
-
|
|
234
|
-
local match_count=0
|
|
235
|
-
for kw in $section_keywords; do
|
|
236
|
-
if echo "$target_lower" | grep -qiw "$kw"; then
|
|
237
|
-
match_count=$((match_count + 1))
|
|
238
|
-
fi
|
|
239
|
-
done
|
|
240
|
-
|
|
241
|
-
# Require at least 2 keyword matches (or all keywords if only 1 keyword)
|
|
242
|
-
local kw_count
|
|
243
|
-
kw_count=$(echo "$section_keywords" | wc -w | tr -d ' ')
|
|
244
|
-
if [[ $kw_count -le 1 ]]; then
|
|
245
|
-
[[ $match_count -ge 1 ]]
|
|
246
|
-
else
|
|
247
|
-
[[ $match_count -ge 2 ]]
|
|
248
|
-
fi
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
# ============================================================
|
|
252
|
-
# EXTRACT DEFERRED SECTIONS FROM TRACEABILITY TABLE
|
|
253
|
-
# ============================================================
|
|
254
|
-
|
|
255
|
-
# Parse deferred section names from the plan's traceability table.
|
|
256
|
-
# Rows containing "Deferred" (case-insensitive) in any column are treated as
|
|
257
|
-
# explicitly deferred — the first column's text (with leading number prefixes
|
|
258
|
-
# like "1.4 " stripped) is the design section name.
|
|
259
|
-
DEFERRED_SECTIONS=()
|
|
260
|
-
while IFS= read -r line; do
|
|
261
|
-
# Match table rows containing "Deferred" (case-insensitive) with pipe delimiters
|
|
262
|
-
if echo "$line" | grep -qi "deferred" && [[ "$line" == *"|"* ]]; then
|
|
263
|
-
# Skip table header/separator rows
|
|
264
|
-
if echo "$line" | grep -qE '^\|[[:space:]]*[-]+'; then
|
|
265
|
-
continue
|
|
266
|
-
fi
|
|
267
|
-
if echo "$line" | grep -qiE '^\|[[:space:]]*(Design Section|Section)'; then
|
|
268
|
-
continue
|
|
269
|
-
fi
|
|
270
|
-
# Extract first column (design section name), strip leading number prefix like "1.4 "
|
|
271
|
-
section_name="$(echo "$line" | sed 's/^[[:space:]]*|[[:space:]]*//' | sed 's/[[:space:]]*|.*//' | sed 's/^[0-9.]*[[:space:]]*//' | sed 's/[[:space:]]*$//')"
|
|
272
|
-
if [[ -n "$section_name" ]]; then
|
|
273
|
-
DEFERRED_SECTIONS+=("$section_name")
|
|
274
|
-
fi
|
|
275
|
-
fi
|
|
276
|
-
done < "$PLAN_FILE"
|
|
277
|
-
|
|
278
|
-
# ============================================================
|
|
279
|
-
# CROSS-REFERENCE: Design sections to plan tasks
|
|
280
|
-
# ============================================================
|
|
281
|
-
|
|
282
|
-
CHECK_PASS=0
|
|
283
|
-
CHECK_FAIL=0
|
|
284
|
-
CHECK_DEFERRED=0
|
|
285
|
-
GAPS=()
|
|
286
|
-
MATRIX_ROWS=()
|
|
287
|
-
|
|
288
|
-
for section in "${DESIGN_SECTIONS[@]}"; do
|
|
289
|
-
# Extract keywords from the section name for keyword-based matching
|
|
290
|
-
SECTION_KEYWORDS="$(extract_keywords "$section")"
|
|
291
|
-
|
|
292
|
-
# Check if section is explicitly deferred in the traceability table FIRST.
|
|
293
|
-
# Deferred sections take priority — they represent intentional exclusions
|
|
294
|
-
# documented with rationale, not gaps.
|
|
295
|
-
is_deferred=false
|
|
296
|
-
for deferred in "${DEFERRED_SECTIONS[@]+${DEFERRED_SECTIONS[@]}}"; do
|
|
297
|
-
# Try exact case-insensitive substring match (both directions)
|
|
298
|
-
if echo "$deferred" | grep -qiF "$section"; then
|
|
299
|
-
is_deferred=true
|
|
300
|
-
break
|
|
301
|
-
fi
|
|
302
|
-
if echo "$section" | grep -qiF "$deferred"; then
|
|
303
|
-
is_deferred=true
|
|
304
|
-
break
|
|
305
|
-
fi
|
|
306
|
-
# Try keyword match
|
|
307
|
-
deferred_keywords="$(extract_keywords "$deferred")"
|
|
308
|
-
if keyword_match "$deferred_keywords" "$section" || keyword_match "$SECTION_KEYWORDS" "$deferred"; then
|
|
309
|
-
is_deferred=true
|
|
310
|
-
break
|
|
311
|
-
fi
|
|
312
|
-
done
|
|
313
|
-
|
|
314
|
-
if [[ "$is_deferred" == true ]]; then
|
|
315
|
-
MATRIX_ROWS+=("| $section | (Deferred in traceability) | Deferred |")
|
|
316
|
-
CHECK_DEFERRED=$((CHECK_DEFERRED + 1))
|
|
317
|
-
continue
|
|
318
|
-
fi
|
|
319
|
-
|
|
320
|
-
# Check if any task title or plan content references this design section
|
|
321
|
-
MATCHED_TASKS=()
|
|
322
|
-
|
|
323
|
-
for task in "${PLAN_TASKS[@]+${PLAN_TASKS[@]}}"; do
|
|
324
|
-
# First try exact case-insensitive substring match
|
|
325
|
-
if echo "$task" | grep -qiF "$section"; then
|
|
326
|
-
MATCHED_TASKS+=("$task")
|
|
327
|
-
continue
|
|
328
|
-
fi
|
|
329
|
-
# Fall back to keyword-based matching
|
|
330
|
-
if keyword_match "$SECTION_KEYWORDS" "$task"; then
|
|
331
|
-
MATCHED_TASKS+=("$task")
|
|
332
|
-
fi
|
|
333
|
-
done
|
|
334
|
-
|
|
335
|
-
# If no task title matches, check the full plan content
|
|
336
|
-
if [[ -z "${MATCHED_TASKS+x}" ]] || [[ ${#MATCHED_TASKS[@]} -eq 0 ]]; then
|
|
337
|
-
# Try exact match first
|
|
338
|
-
if echo "$PLAN_CONTENT" | grep -qiF "$section"; then
|
|
339
|
-
MATCHED_TASKS+=("(referenced in plan body)")
|
|
340
|
-
# Then try keyword match against plan content
|
|
341
|
-
elif keyword_match "$SECTION_KEYWORDS" "$PLAN_CONTENT"; then
|
|
342
|
-
MATCHED_TASKS+=("(keyword match in plan body)")
|
|
343
|
-
fi
|
|
344
|
-
fi
|
|
345
|
-
|
|
346
|
-
if [[ -n "${MATCHED_TASKS+x}" ]] && [[ ${#MATCHED_TASKS[@]} -gt 0 ]]; then
|
|
347
|
-
task_list="$(printf '%s, ' "${MATCHED_TASKS[@]}")"
|
|
348
|
-
task_list="${task_list%, }"
|
|
349
|
-
MATRIX_ROWS+=("| $section | $task_list | Covered |")
|
|
350
|
-
CHECK_PASS=$((CHECK_PASS + 1))
|
|
351
|
-
else
|
|
352
|
-
MATRIX_ROWS+=("| $section | — | **GAP** |")
|
|
353
|
-
GAPS+=("$section")
|
|
354
|
-
CHECK_FAIL=$((CHECK_FAIL + 1))
|
|
355
|
-
fi
|
|
356
|
-
done
|
|
357
|
-
|
|
358
|
-
# ============================================================
|
|
359
|
-
# STRUCTURED OUTPUT
|
|
360
|
-
# ============================================================
|
|
361
|
-
|
|
362
|
-
echo "## Plan Coverage Report"
|
|
363
|
-
echo ""
|
|
364
|
-
echo "**Design file:** \`$DESIGN_FILE\`"
|
|
365
|
-
echo "**Plan file:** \`$PLAN_FILE\`"
|
|
366
|
-
echo ""
|
|
367
|
-
|
|
368
|
-
echo "### Coverage Matrix"
|
|
369
|
-
echo ""
|
|
370
|
-
echo "| Design Section | Task(s) | Status |"
|
|
371
|
-
echo "|----------------|---------|--------|"
|
|
372
|
-
for row in "${MATRIX_ROWS[@]}"; do
|
|
373
|
-
echo "$row"
|
|
374
|
-
done
|
|
375
|
-
echo ""
|
|
376
|
-
|
|
377
|
-
TOTAL=$((CHECK_PASS + CHECK_FAIL + CHECK_DEFERRED))
|
|
378
|
-
echo "### Summary"
|
|
379
|
-
echo ""
|
|
380
|
-
echo "- Design sections: $TOTAL"
|
|
381
|
-
echo "- Covered: $CHECK_PASS"
|
|
382
|
-
echo "- Deferred: $CHECK_DEFERRED"
|
|
383
|
-
echo "- Gaps: $CHECK_FAIL"
|
|
384
|
-
echo ""
|
|
385
|
-
|
|
386
|
-
if [[ -n "${GAPS+x}" ]] && [[ ${#GAPS[@]} -gt 0 ]]; then
|
|
387
|
-
echo "### Unmapped Sections"
|
|
388
|
-
echo ""
|
|
389
|
-
for gap in "${GAPS[@]}"; do
|
|
390
|
-
echo "- **$gap** — No task maps to this design section"
|
|
391
|
-
done
|
|
392
|
-
echo ""
|
|
393
|
-
fi
|
|
394
|
-
|
|
395
|
-
echo "---"
|
|
396
|
-
echo ""
|
|
397
|
-
|
|
398
|
-
if [[ $CHECK_FAIL -eq 0 ]]; then
|
|
399
|
-
if [[ $CHECK_DEFERRED -gt 0 ]]; then
|
|
400
|
-
echo "**Result: PASS** (${CHECK_PASS}/${TOTAL} sections covered, ${CHECK_DEFERRED} deferred)"
|
|
401
|
-
else
|
|
402
|
-
echo "**Result: PASS** (${CHECK_PASS}/${TOTAL} sections covered)"
|
|
403
|
-
fi
|
|
404
|
-
exit 0
|
|
405
|
-
else
|
|
406
|
-
echo "**Result: FAIL** (${CHECK_FAIL}/${TOTAL} sections have gaps)"
|
|
407
|
-
exit 1
|
|
408
|
-
fi
|