@xulthekl/team-flow 0.22.4
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/.agents/plugins/marketplace.json +20 -0
- package/.agents/skills +1 -0
- package/.claude/always/phase-guard.md +3 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +31 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.codexignore +6 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +31 -0
- package/.github/copilot-instructions.md +15 -0
- package/.github/dependabot.yml +10 -0
- package/.github/plugin/marketplace.json +42 -0
- package/.github/workflows/ci.yml +98 -0
- package/.github/workflows/hol-plugin-scanner.yml +17 -0
- package/.opencode/INSTALL.md +61 -0
- package/.opencode/plugins/team-flow.js +70 -0
- package/AGENTS.md +280 -0
- package/CHANGELOG.md +635 -0
- package/CONTRIBUTING.md +115 -0
- package/GEMINI.md +14 -0
- package/HANDOFF.md +219 -0
- package/INSTALL.md +810 -0
- package/LICENSE +21 -0
- package/README.md +185 -0
- package/SECURITY.md +37 -0
- package/agents/bug-investigator.md +180 -0
- package/agents/change-split-auditor.md +257 -0
- package/agents/code-reviewer.md +171 -0
- package/agents/cross-change-consistency-checker.md +215 -0
- package/agents/prd-completeness-reviewer.md +197 -0
- package/agents/prototype-builder.md +230 -0
- package/agents/prototype-env-scout.md +156 -0
- package/agents/prototype-reviewer.md +226 -0
- package/assets/icon.svg +6 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +5 -0
- package/dist/parsing/change-parser.d.ts +12 -0
- package/dist/parsing/change-parser.js +54 -0
- package/dist/parsing/requirement-blocks.d.ts +31 -0
- package/dist/parsing/requirement-blocks.js +192 -0
- package/dist/schema/base.d.ts +7 -0
- package/dist/schema/base.js +1 -0
- package/dist/schema/change.d.ts +25 -0
- package/dist/schema/change.js +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/spec.d.ts +11 -0
- package/dist/schema/spec.js +1 -0
- package/dist/validation/constants.d.ts +42 -0
- package/dist/validation/constants.js +42 -0
- package/dist/validation/tokenizer.d.ts +17 -0
- package/dist/validation/tokenizer.js +173 -0
- package/dist/validation/types.d.ts +40 -0
- package/dist/validation/types.js +1 -0
- package/dist/validation/validator.d.ts +21 -0
- package/dist/validation/validator.js +489 -0
- package/docs/README_en.md +358 -0
- package/docs/artifact-contract.md +96 -0
- package/docs/decision-points.md +88 -0
- package/docs/e2e-integration-design.md +207 -0
- package/docs/examples/README.md +25 -0
- package/docs/examples/add-dark-mode/README.md +13 -0
- package/docs/examples/add-dark-mode/design.md +49 -0
- package/docs/examples/add-dark-mode/execution-contract.md +56 -0
- package/docs/examples/add-dark-mode/proposal.md +46 -0
- package/docs/examples/add-dark-mode/specs/ui-theme/spec.md +35 -0
- package/docs/examples/add-dark-mode/tasks.md +26 -0
- package/docs/examples/refactor-auth-boundary/README.md +15 -0
- package/docs/examples/refactor-auth-boundary/design.md +41 -0
- package/docs/examples/refactor-auth-boundary/execution-contract.md +61 -0
- package/docs/examples/refactor-auth-boundary/proposal.md +47 -0
- package/docs/examples/refactor-auth-boundary/specs/auth-boundary/spec.md +45 -0
- package/docs/examples/refactor-auth-boundary/tasks.md +25 -0
- package/docs/plans/2026-07-07-fix-batch-design.md +68 -0
- package/docs/plans/2026-07-20-001-refactor-skill-collaboration-protocol-plan.md +128 -0
- package/docs/platform-matrix.md +45 -0
- package/docs/prototype-design-research.md +206 -0
- package/docs/release-checklist.md +96 -0
- package/docs/showcase.html +699 -0
- package/docs/skill-rename-v0.8.0.md +49 -0
- package/docs/state-machine.md +162 -0
- package/gemini-extension.json +6 -0
- package/hooks/hooks-cursor.json +8 -0
- package/hooks/hooks.json +26 -0
- package/hooks/pre-tool-use-guard +116 -0
- package/hooks/session-start +14 -0
- package/llms.txt +51 -0
- package/package.json +48 -0
- package/plugin.json +27 -0
- package/prd/v1/plan.md +443 -0
- package/prd/v1/prd.md +580 -0
- package/scripts/check-update.mjs +91 -0
- package/scripts/check-version-consistency.mjs +345 -0
- package/scripts/ensure-branch.mjs +71 -0
- package/scripts/get-config +31 -0
- package/scripts/guard/checks/artifacts-exist.mjs +36 -0
- package/scripts/guard/checks/contract-current.mjs +33 -0
- package/scripts/guard/checks/contract-fresh.mjs +17 -0
- package/scripts/guard/checks/dp-gate-passed.mjs +35 -0
- package/scripts/guard/checks/dp3-approved.mjs +22 -0
- package/scripts/guard/checks/execution-plan-ready.mjs +40 -0
- package/scripts/guard/checks/execution-reviews-passed.mjs +36 -0
- package/scripts/guard/checks/schema-valid.mjs +63 -0
- package/scripts/guard/checks/specs-merged.mjs +51 -0
- package/scripts/guard/checks/tasks-complete.mjs +31 -0
- package/scripts/guard/checks/tests-passing.mjs +31 -0
- package/scripts/guard/design-token-guard.mjs +237 -0
- package/scripts/guard/guard.mjs +205 -0
- package/scripts/infer-workflow.mjs +136 -0
- package/scripts/install-amazon-q.mjs +9 -0
- package/scripts/install-cline.mjs +9 -0
- package/scripts/install-continue.mjs +9 -0
- package/scripts/install-cursor.mjs +265 -0
- package/scripts/install-git-hooks.mjs +82 -0
- package/scripts/install-kiro.mjs +9 -0
- package/scripts/install-pi.mjs +9 -0
- package/scripts/install-qoder.mjs +9 -0
- package/scripts/install-qwen.mjs +9 -0
- package/scripts/install-roocode.mjs +9 -0
- package/scripts/install-windsurf.mjs +9 -0
- package/scripts/install-zcode.mjs +265 -0
- package/scripts/lib/cmd-audit.mjs +127 -0
- package/scripts/lib/cmd-checkpoint.mjs +118 -0
- package/scripts/lib/cmd-config.mjs +88 -0
- package/scripts/lib/cmd-doctor.mjs +267 -0
- package/scripts/lib/cmd-execution.mjs +206 -0
- package/scripts/lib/cmd-handoff.mjs +94 -0
- package/scripts/lib/cmd-inject.mjs +310 -0
- package/scripts/lib/cmd-install-amazon-q.mjs +11 -0
- package/scripts/lib/cmd-install-cline.mjs +11 -0
- package/scripts/lib/cmd-install-continue.mjs +11 -0
- package/scripts/lib/cmd-install-cursor.mjs +14 -0
- package/scripts/lib/cmd-install-kiro.mjs +11 -0
- package/scripts/lib/cmd-install-pi.mjs +11 -0
- package/scripts/lib/cmd-install-qoder.mjs +11 -0
- package/scripts/lib/cmd-install-qwen.mjs +11 -0
- package/scripts/lib/cmd-install-roocode.mjs +11 -0
- package/scripts/lib/cmd-install-windsurf.mjs +11 -0
- package/scripts/lib/cmd-install-workbuddy.mjs +359 -0
- package/scripts/lib/cmd-install-zcode.mjs +14 -0
- package/scripts/lib/cmd-isolate.mjs +37 -0
- package/scripts/lib/cmd-list.mjs +71 -0
- package/scripts/lib/cmd-runtime.mjs +85 -0
- package/scripts/lib/cmd-solutions.mjs +71 -0
- package/scripts/lib/cmd-state.mjs +231 -0
- package/scripts/lib/cmd-sync.mjs +102 -0
- package/scripts/lib/cmd-validate.mjs +105 -0
- package/scripts/lib/cmd-version.mjs +148 -0
- package/scripts/lib/config-loader.mjs +107 -0
- package/scripts/lib/execution-plan.mjs +492 -0
- package/scripts/lib/execution-recommendation.mjs +221 -0
- package/scripts/lib/hash.mjs +74 -0
- package/scripts/lib/install.mjs +267 -0
- package/scripts/lib/platform-runtime-inventory.mjs +27 -0
- package/scripts/lib/platforms.mjs +165 -0
- package/scripts/lib/prototype-sync.mjs +192 -0
- package/scripts/lib/sdd-overlay.mjs +262 -0
- package/scripts/lib/shell-quote.mjs +4 -0
- package/scripts/lib/solutions-capture.mjs +102 -0
- package/scripts/lib/solutions-index-gen.mjs +112 -0
- package/scripts/lib/solutions-inject.mjs +77 -0
- package/scripts/lib/solutions-promote.mjs +145 -0
- package/scripts/lib/spec-paths.mjs +85 -0
- package/scripts/lib/state-loader.mjs +154 -0
- package/scripts/lint/lint-skills.mjs +149 -0
- package/scripts/lint/rules/behavior-consistency.mjs +56 -0
- package/scripts/lint/rules/dp-trigger-points.mjs +60 -0
- package/scripts/lint/rules/exception-handling.mjs +59 -0
- package/scripts/lint/rules/no-contradictory-instructions.mjs +67 -0
- package/scripts/lint/rules/no-redundant-checks.mjs +50 -0
- package/scripts/lint/rules/token-rules.mjs +122 -0
- package/scripts/review-package +44 -0
- package/scripts/task-brief +40 -0
- package/scripts/team-flow.mjs +164 -0
- package/scripts/token-baseline.mjs +158 -0
- package/scripts/validate-artifacts +96 -0
- package/scripts/verify-marketplace-release.mjs +59 -0
- package/skills/architecture-design/SKILL.md +140 -0
- package/skills/architecture-design/chapters/ch01-4a-domains.md +27 -0
- package/skills/architecture-design/chapters/ch02-change-cascade.md +27 -0
- package/skills/architecture-design/chapters/ch03-architecture-outputs.md +25 -0
- package/skills/architecture-design/chapters/ch04-entity-to-aggregate.md +27 -0
- package/skills/architecture-design/chapters/ch05-cqrs.md +32 -0
- package/skills/architecture-design/chapters/ch06-integration.md +54 -0
- package/skills/architecture-design/cheatsheet.md +51 -0
- package/skills/architecture-design/glossary.md +23 -0
- package/skills/architecture-design/patterns.md +32 -0
- package/skills/bug-investigator/SKILL.md +77 -0
- package/skills/build-executor/SKILL.md +163 -0
- package/skills/build-executor/implementer-prompt.md +162 -0
- package/skills/build-executor/references/execution-modes.md +86 -0
- package/skills/build-executor/task-reviewer-prompt.md +195 -0
- package/skills/ce-brainstorm/SKILL.md +415 -0
- package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
- package/skills/ce-brainstorm/references/brainstorm-sections.md +285 -0
- package/skills/ce-brainstorm/references/handoff.md +168 -0
- package/skills/ce-brainstorm/references/html-rendering.md +634 -0
- package/skills/ce-brainstorm/references/markdown-rendering.md +241 -0
- package/skills/ce-brainstorm/references/model-tiers.md +9 -0
- package/skills/ce-brainstorm/references/prd-mapping.md +71 -0
- package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
- package/skills/ce-brainstorm/references/reasoning-elevation.md +63 -0
- package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
- package/skills/ce-brainstorm/references/synthesis-summary.md +282 -0
- package/skills/ce-brainstorm/references/universal-brainstorming.md +73 -0
- package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
- package/skills/ce-brainstorm/references/visual-probes.md +158 -0
- package/skills/ce-brainstorm/scripts/visual-probe-server.js +418 -0
- package/skills/ce-compound/SKILL.md +114 -0
- package/skills/ce-compound/assets/resolution-template.md +94 -0
- package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/skills/ce-compound/references/agents/session-historian.md +83 -0
- package/skills/ce-compound/references/concepts-vocabulary.md +78 -0
- package/skills/ce-compound/references/full-mode-workflow.md +413 -0
- package/skills/ce-compound/references/grounding-validation.md +84 -0
- package/skills/ce-compound/references/lightweight-mode.md +53 -0
- package/skills/ce-compound/references/output-standards.md +182 -0
- package/skills/ce-compound/references/promotion-rules.md +38 -0
- package/skills/ce-compound/references/schema.yaml +231 -0
- package/skills/ce-compound/references/three-tier-index.md +55 -0
- package/skills/ce-compound/references/v0.5-upgrade.md +32 -0
- package/skills/ce-compound/references/write-flow.md +36 -0
- package/skills/ce-compound/references/yaml-schema.md +118 -0
- package/skills/ce-compound/scripts/session-history/discover-sessions.sh +130 -0
- package/skills/ce-compound/scripts/session-history/extract-errors.py +254 -0
- package/skills/ce-compound/scripts/session-history/extract-metadata.py +456 -0
- package/skills/ce-compound/scripts/session-history/extract-skeleton.py +575 -0
- package/skills/ce-compound/scripts/validate-doc-claims.py +346 -0
- package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-ideate/SKILL.md +402 -0
- package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +200 -0
- package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/skills/ce-ideate/references/divergent-ideation.md +89 -0
- package/skills/ce-ideate/references/html-rendering.md +634 -0
- package/skills/ce-ideate/references/ideation-sections.md +191 -0
- package/skills/ce-ideate/references/markdown-rendering.md +238 -0
- package/skills/ce-ideate/references/post-ideation-workflow.md +167 -0
- package/skills/ce-ideate/references/universal-ideation.md +107 -0
- package/skills/ce-ideate/references/web-research-cache.md +56 -0
- package/skills/ce-plan/SKILL.md +137 -0
- package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +62 -0
- package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/skills/ce-plan/references/agents/best-practices-researcher.md +114 -0
- package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-plan/references/agents/data-migration-reviewer.md +103 -0
- package/skills/ce-plan/references/agents/deployment-verification-agent.md +157 -0
- package/skills/ce-plan/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/skills/ce-plan/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/skills/ce-plan/references/agents/repo-research-analyst.md +258 -0
- package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/skills/ce-plan/references/agents/slack-researcher.md +127 -0
- package/skills/ce-plan/references/agents/spec-flow-analyzer.md +80 -0
- package/skills/ce-plan/references/agents/web-researcher.md +121 -0
- package/skills/ce-plan/references/approach-altitude.md +55 -0
- package/skills/ce-plan/references/change-splitting.md +65 -0
- package/skills/ce-plan/references/completion-contract.md +33 -0
- package/skills/ce-plan/references/core-principles.md +40 -0
- package/skills/ce-plan/references/deepening-workflow.md +263 -0
- package/skills/ce-plan/references/dependency-graph.md +36 -0
- package/skills/ce-plan/references/html-rendering.md +634 -0
- package/skills/ce-plan/references/intake-routing.md +189 -0
- package/skills/ce-plan/references/markdown-rendering.md +238 -0
- package/skills/ce-plan/references/plan-handoff.md +150 -0
- package/skills/ce-plan/references/plan-sections.md +427 -0
- package/skills/ce-plan/references/plan-structure.md +120 -0
- package/skills/ce-plan/references/planning-modes.md +69 -0
- package/skills/ce-plan/references/reasoning-elevation.md +63 -0
- package/skills/ce-plan/references/research-workflow.md +165 -0
- package/skills/ce-plan/references/review-and-write.md +127 -0
- package/skills/ce-plan/references/settled-decisions.md +45 -0
- package/skills/ce-plan/references/synthesis-summary.md +418 -0
- package/skills/ce-plan/references/universal-planning.md +168 -0
- package/skills/ce-proof/SKILL.md +346 -0
- package/skills/ce-strategy/SKILL.md +97 -0
- package/skills/ce-strategy/references/interview.md +143 -0
- package/skills/ce-strategy/references/strategy-template.md +89 -0
- package/skills/code-reviewer/SKILL.md +84 -0
- package/skills/code-reviewer/code-reviewer-prompt.md +195 -0
- package/skills/contract-builder/SKILL.md +72 -0
- package/skills/design-system/SKILL.md +75 -0
- package/skills/design-system/references/agents/design-system-architect.md +138 -0
- package/skills/design-system/references/creation-flow.md +170 -0
- package/skills/design-system/references/preview-template.html +319 -0
- package/skills/design-system/references/token-derivation.md +115 -0
- package/skills/design-system/references/variant-schema.md +60 -0
- package/skills/e2e/SKILL.md +56 -0
- package/skills/e2e/references/test-verifier.md +40 -0
- package/skills/need-explorer/SKILL.md +79 -0
- package/skills/prototype/SKILL.md +98 -0
- package/skills/prototype/references/agents/design-system-architect.md +122 -0
- package/skills/prototype/references/checklist.md +82 -0
- package/skills/prototype/references/craft/accessibility-baseline.md +71 -0
- package/skills/prototype/references/craft/anti-ai-slop.md +87 -0
- package/skills/prototype/references/craft/laws-of-ux.md +60 -0
- package/skills/prototype/references/craft/state-coverage.md +81 -0
- package/skills/prototype/references/craft/typography-hierarchy.md +50 -0
- package/skills/prototype/references/layouts.md +223 -0
- package/skills/prototype/references/orchestration-flow.md +101 -0
- package/skills/prototype/references/prototype-scaffold/assets/design-tokens.css +19 -0
- package/skills/prototype/references/prototype-scaffold/components/button.html +3 -0
- package/skills/prototype/references/prototype-scaffold/design-system.md +7 -0
- package/skills/prototype/references/prototype-scaffold/flow.md +11 -0
- package/skills/prototype/references/prototype-scaffold/index.html +20 -0
- package/skills/prototype/references/prototype-scaffold/pages/index.html +11 -0
- package/skills/prototype/references/template.html +396 -0
- package/skills/release-archivist/SKILL.md +166 -0
- package/skills/release-archivist/references/closing-procedures.md +81 -0
- package/skills/session-handoff/SKILL.md +110 -0
- package/skills/session-handoff/references/context-extraction.md +70 -0
- package/skills/session-handoff/references/handoff-template.md +90 -0
- package/skills/session-handoff/references/skill-recommendation.md +43 -0
- package/skills/spec-merger/SKILL.md +66 -0
- package/skills/spec-writer/SKILL.md +149 -0
- package/skills/workflow-bootstrap/SKILL.md +148 -0
- package/skills/workflow-bootstrap/references/agents/codebase-recon-analyst.md +121 -0
- package/skills/workflow-bootstrap/references/b1-reconnaissance.md +80 -0
- package/skills/workflow-bootstrap/scripts/recon-probe.sh +328 -0
- package/skills/workflow-feedback/SKILL.md +120 -0
- package/skills/workflow-feedback/references/category-guide.md +121 -0
- package/skills/workflow-feedback/references/feedback-template.md +73 -0
- package/skills/workflow-feedback/references/review-mode.md +92 -0
- package/skills/workflow-orchestrator/SKILL.md +94 -0
- package/skills/workflow-orchestrator/references/feedback-loops.md +56 -0
- package/skills/workflow-orchestrator/references/s1-path-router.md +81 -0
- package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +96 -0
- package/skills/workflow-orchestrator/references/s3-plan-pipeline.md +50 -0
- package/skills/workflow-orchestrator/references/s4-split-validate.md +108 -0
- package/skills/workflow-orchestrator/references/s5-monitoring.md +61 -0
- package/skills/workflow-orchestrator/references/state-model.md +185 -0
- package/skills/workflow-start/SKILL.md +147 -0
- package/skills/workflow-start/references/routing-rules.md +155 -0
- package/src/index.ts +16 -0
- package/src/parsing/change-parser.ts +79 -0
- package/src/parsing/requirement-blocks.ts +244 -0
- package/src/schema/base.ts +8 -0
- package/src/schema/change.ts +29 -0
- package/src/schema/index.ts +3 -0
- package/src/schema/spec.ts +12 -0
- package/src/validation/constants.ts +53 -0
- package/src/validation/tokenizer.ts +180 -0
- package/src/validation/types.ts +47 -0
- package/src/validation/validator.ts +552 -0
- package/templates/abandonment-summary.md +29 -0
- package/templates/design.md +37 -0
- package/templates/execution-contract.md +99 -0
- package/templates/plan.md +86 -0
- package/templates/prd.md +468 -0
- package/templates/proposal.md +37 -0
- package/templates/spec.md +31 -0
- package/templates/tasks.md +47 -0
- package/tests/e2e.test.mjs +266 -0
- package/tests/lib/cmd-audit.test.mjs +202 -0
- package/tests/lib/cmd-checkpoint.test.mjs +98 -0
- package/tests/lib/cmd-config.test.mjs +101 -0
- package/tests/lib/cmd-doctor.test.mjs +450 -0
- package/tests/lib/cmd-execution.test.mjs +647 -0
- package/tests/lib/cmd-handoff.test.mjs +137 -0
- package/tests/lib/cmd-inject.test.mjs +218 -0
- package/tests/lib/cmd-install-workbuddy.test.mjs +113 -0
- package/tests/lib/cmd-install-zcode.test.mjs +42 -0
- package/tests/lib/cmd-isolate.test.mjs +68 -0
- package/tests/lib/cmd-list.test.mjs +127 -0
- package/tests/lib/cmd-runtime.test.mjs +83 -0
- package/tests/lib/cmd-state-missing.test.mjs +65 -0
- package/tests/lib/cmd-state.test.mjs +365 -0
- package/tests/lib/cmd-sync-paths.test.mjs +84 -0
- package/tests/lib/cmd-validate-paths.test.mjs +90 -0
- package/tests/lib/config-loader.test.mjs +175 -0
- package/tests/lib/ensure-branch.test.mjs +59 -0
- package/tests/lib/execution-control-plane.test.mjs +168 -0
- package/tests/lib/execution-plan.test.mjs +474 -0
- package/tests/lib/guard-specs-merged.test.mjs +108 -0
- package/tests/lib/guard-tests-passing.test.mjs +112 -0
- package/tests/lib/guard-transitions.test.mjs +262 -0
- package/tests/lib/guard.test.mjs +611 -0
- package/tests/lib/hash.test.mjs +138 -0
- package/tests/lib/infer-workflow.test.mjs +161 -0
- package/tests/lib/install-git-hooks.test.mjs +20 -0
- package/tests/lib/marketplace-release-docs.test.mjs +31 -0
- package/tests/lib/minimality-discipline.test.mjs +37 -0
- package/tests/lib/model-profiles-docs.test.mjs +33 -0
- package/tests/lib/node20-compatibility.test.mjs +73 -0
- package/tests/lib/node20-test-entry.test.mjs +17 -0
- package/tests/lib/platform-runtime-distribution.test.mjs +150 -0
- package/tests/lib/raw-mode-smoke.test.mjs +42 -0
- package/tests/lib/sdd-overlay.test.mjs +118 -0
- package/tests/lib/spec-paths.test.mjs +80 -0
- package/tests/lib/state-loader.test.mjs +251 -0
- package/tests/lib/token-baseline.test.mjs +72 -0
- package/tests/lib/token-rules.test.mjs +94 -0
- package/tests/lib/verify-marketplace-release.test.mjs +128 -0
- package/tests/tsconfig.json +12 -0
- package/token-baseline.json +95 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MageByte
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# team-flow
|
|
2
|
+
|
|
3
|
+
> 当前版本:`v0.22.4`
|
|
4
|
+
|
|
5
|
+
> 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同。
|
|
6
|
+
|
|
7
|
+
## 30 秒上手
|
|
8
|
+
|
|
9
|
+
告诉它你的想法,它会帮你理清楚要做什么、怎么做、先做哪个。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# 在 Claude Code 中输入:
|
|
13
|
+
/workflow-orchestrator
|
|
14
|
+
# 然后说你的想法,例如:"我想做一个任务管理功能"
|
|
15
|
+
# 跟着走就行——它会自动安排需求澄清、原型验证、计划拆分
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**你只需要知道 3 个概念**:
|
|
19
|
+
1. **PRD**:你的需求文档(它帮你写)
|
|
20
|
+
2. **change**:拆分后的实施单元(它帮你拆)
|
|
21
|
+
3. **workflow-start**:开始实施一个 change(它帮你启动)
|
|
22
|
+
|
|
23
|
+
更多能力(原型验证、复利经验库、动态重规划等)在使用中自然接触,无需提前学习。
|
|
24
|
+
|
|
25
|
+
## 安装(plugin.json 一次安装)
|
|
26
|
+
|
|
27
|
+
支持 9 安装面:Claude Code、Cursor、OpenAI Codex CLI/App、GitHub Copilot CLI、Gemini CLI、OpenCode、WorkBuddy、Trae、ima-copilot。
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 本地路径安装(子命令依宿主 CLI 而定)
|
|
31
|
+
<cli> plugin install /path/to/team-flow
|
|
32
|
+
|
|
33
|
+
# 或从仓库
|
|
34
|
+
git clone <your-repo> && <cli> plugin install ./team-flow
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> 不同宿主 CLI 的安装子命令略有差异(如 Claude Code 为 `/plugin add`,Cursor 为 `plugin install`)。以宿主文档为准;本插件提供单一 `plugin.json`,一次安装即加载全部 22 个 skills。
|
|
38
|
+
|
|
39
|
+
## 配置(插件层扩展字段)
|
|
40
|
+
|
|
41
|
+
项目根 `team-flow.config.json` 可注入(**插件层扩展字段,非 team-flow 原生 schema;原生仅 `artifacts.order` / `artifacts.skip`**):
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"prd.template": ".team-flow/prd.template.md",
|
|
46
|
+
"prototype.designSystem": "prototype/design-system.md",
|
|
47
|
+
"prototype.entry": "prototype/index.html"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
读取方式:`tf runtime config --get <key>`(插件层自读,字段命名避开原生 key 冲突)。
|
|
52
|
+
|
|
53
|
+
## 初始化原型(首次)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cp -r <plugin>/skills/prototype/references/prototype-scaffold/ <project>/prototype/
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
随后按 `prototype/design-system.md` 填 token;`prototype/` 与 `prd/` 同级、git 分支隔离版本。
|
|
60
|
+
|
|
61
|
+
## 全局产物结构
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
prd/ PRD + 实施方案 + 原型审查记录(v1→v2,分支隔离)
|
|
65
|
+
prototype/ 全局原型(UI 契约真相源)
|
|
66
|
+
docs/
|
|
67
|
+
├── architecture/ 全局架构锚点(ARCHITECTURE.md / DATABASE.md / <bc>/ / baseline.md)
|
|
68
|
+
└── solutions/ 复利经验库(三层索引:INDEX.md → 分阶段目录 → 经验文件)
|
|
69
|
+
specs/<cap>/ 每变更设计/任务/契约 + learnings.md
|
|
70
|
+
STRATEGY.md CONCEPTS.md 策略 / 领域词汇
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 九套能力(23 skills)
|
|
74
|
+
|
|
75
|
+
- **team-flow**(9):workflow-start / need-explorer / spec-writer / contract-builder / build-executor / code-reviewer / spec-merger / release-archivist / bug-investigator
|
|
76
|
+
- **compound 核心子集**(6):ce-brainstorm / ce-plan / ce-compound / ce-strategy / ce-ideate / ce-proof
|
|
77
|
+
- **architecture-design**(1):architecture-design
|
|
78
|
+
- **prototype**(1):prototype
|
|
79
|
+
- **e2e**(1):e2e(AC 驱动 Playwright E2E 测试)
|
|
80
|
+
- **产品级编排**(1):workflow-orchestrator(brainstorm→原型内循环→plan→拆change→分发)
|
|
81
|
+
- **既有项目接入**(1):workflow-bootstrap(代码库侦察→架构基线→领域词汇→目录初始化)
|
|
82
|
+
- **会话交接**(1):session-handoff(上下文腐化时压缩会话为交接文档,v0.16.0)
|
|
83
|
+
- **工作流反馈**(1):workflow-feedback(工作流问题结构化记录,与 ce-compound 互补,v0.16.0)
|
|
84
|
+
- **设计系统**(1):design-system(独立创建/迭代项目级设计系统,用户主导交互,v0.19.0)
|
|
85
|
+
|
|
86
|
+
### 配套 agents(8 个,v0.15.0 增至 8)
|
|
87
|
+
|
|
88
|
+
执行下沉的非交互子代理(主代理只编排):code-reviewer / bug-investigator / prototype-reviewer / change-split-auditor / cross-change-consistency-checker / **prd-completeness-reviewer**(PRD 完整性评审)/ **prototype-builder**(原型绘制)/ **prototype-env-scout**(原型环境探查)。
|
|
89
|
+
|
|
90
|
+
### 命名约定
|
|
91
|
+
|
|
92
|
+
Skills 命名保留其来源前缀,作为功能分组的自然标识:
|
|
93
|
+
|
|
94
|
+
| 前缀 | 来源 | 含义 | Skills |
|
|
95
|
+
|------|------|------|--------|
|
|
96
|
+
| `ce-` | compound-engineering | 产品级思维工具(头脑风暴、计划、策略、复利、创意、验证) | ce-brainstorm, ce-plan, ce-strategy, ce-compound, ce-ideate, ce-proof |
|
|
97
|
+
| 无前缀 | team-flow | 变更级开发流程工具(状态机、规格、构建、审查、归档) | workflow-start, need-explorer, spec-writer, contract-builder, build-executor, code-reviewer, spec-merger, release-archivist, bug-investigator |
|
|
98
|
+
| 无前缀 | team-flow 新增 | 编排/接入/设计/原型/测试/交接/反馈 | workflow-orchestrator, workflow-bootstrap, architecture-design, prototype, e2e, session-handoff, workflow-feedback |
|
|
99
|
+
|
|
100
|
+
> `ce-` 前缀来自 compound-engineering 项目,team-flow 整合时保留了这一命名以维持功能分组的可辨识性。这不是命名不一致,而是有意的来源标注。
|
|
101
|
+
|
|
102
|
+
## 工作流(SOP,v0.7 修订)
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
模糊需求
|
|
106
|
+
→ [既有项目接入层 workflow-bootstrap](一次性,baseline.md 已存在则跳过)
|
|
107
|
+
→ [产品级编排层 workflow-orchestrator](v0.7 重设计)
|
|
108
|
+
→ S1 路径路由器 → 判断入口路径(全新/续版/重新计划/继续执行/快速通道/Hotfix)
|
|
109
|
+
→ S2 PRD + 原型阶段 → ce-brainstorm + 原型循环上提(prototype → 自动评审 → 人工评审 → 冻结)
|
|
110
|
+
→ S3 计划阶段 → ce-plan(pipeline 快速路径)→ plan.md(change 拆分+依赖+技术方向)
|
|
111
|
+
→ S4 拆分验证与分发 → change-split-auditor 审计(必选门禁)→ 创建 change → 进入 team-flow
|
|
112
|
+
→ S5 全局监控(change≥2 必选)→ 跨 change 一致性 + 复利晋升 + 动态重规划
|
|
113
|
+
→ [复利贯穿层] 每个阶段转换点:检测→捕获→索引→注入
|
|
114
|
+
→ change 完成:arch-merge → prototype-sync(顺序提交)+ 复利晋升
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
详见 `AGENTS.md`。
|
|
118
|
+
|
|
119
|
+
## 受 guard 保护的执行计划(execution plan)
|
|
120
|
+
|
|
121
|
+
full/hotfix 在 DP-4 必须保存 current execution plan 到
|
|
122
|
+
`<change>/.superpowers/sdd/execution-plan.json`;它不属于 `execution-contract.md`。
|
|
123
|
+
先运行 `tf execution recommend`(执行模式推荐):它按任务量和 wave 策略列出 `inline`、
|
|
124
|
+
`batch-inline`、`sdd` 并给出推荐,并保存当前 wave 的推荐凭据到
|
|
125
|
+
`<change>/.superpowers/sdd/execution-recommendation.json`。Agent 展示候选项和理由后,
|
|
126
|
+
`plan` 与 `revise` 必须消费匹配当前 artifact、contract 和 wave 的凭据;用户用 `--confirm`
|
|
127
|
+
确认;若选择非推荐方式,必须用 `--acknowledge-recommendation` 记录确认风险。Batch
|
|
128
|
+
Inline 始终串行,不会表示并行。`tweak` 免除 execution plan 与 review receipt gate。
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
tf execution recommend changes/my-change \
|
|
132
|
+
--wave foundation:parallel:1.1,1.2 \
|
|
133
|
+
--wave integration:serial:2.1:foundation --json
|
|
134
|
+
tf execution plan changes/my-change --mode sdd --confirm --reason "independent work" \
|
|
135
|
+
--wave foundation:parallel:1.1,1.2 \
|
|
136
|
+
--wave integration:serial:2.1:foundation
|
|
137
|
+
tf execution show changes/my-change --json
|
|
138
|
+
# inline/batch-inline 可升级为 sdd,或重规划已有 sdd 的 wave/依赖;不能降级。
|
|
139
|
+
tf execution recommend changes/my-change \
|
|
140
|
+
--wave foundation:parallel:1.1,1.2 \
|
|
141
|
+
--wave integration:serial:2.1:foundation --json
|
|
142
|
+
tf execution revise changes/my-change --mode sdd --confirm --reason "need parallel work" \
|
|
143
|
+
--wave foundation:parallel:1.1,1.2 \
|
|
144
|
+
--wave integration:serial:2.1:foundation
|
|
145
|
+
tf execution review changes/my-change --wave foundation --base <sha> --head <sha> \
|
|
146
|
+
--report .superpowers/sdd/reviews/foundation.md --verdict pass
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`--report` 相对于 `<change>` 解析,且必须位于
|
|
150
|
+
`<change>/.superpowers/sdd/reviews/` 之下。`--base` 和 `--head` 必须是该
|
|
151
|
+
`<change>` Git 工作树中的真实 commit,且 `base` 必须是 `head` 的祖先。
|
|
152
|
+
`<change>/.superpowers/sdd/reviews/` 的目录层级必须是物理、非符号链接目录;
|
|
153
|
+
report 本身必须为普通、非空、非符号链接文件。
|
|
154
|
+
|
|
155
|
+
每一个 wave 均须有当前 `pass` review receipt,才可启动依赖 wave 或进入 closing;
|
|
156
|
+
修订计划会废止旧 receipt。#47 所提出的恢复、切换与手动保存 slash command 尚未实现,
|
|
157
|
+
不能假定有 `/tf:*` 命令。
|
|
158
|
+
|
|
159
|
+
## OpenAI Codex CLI 安装与升级
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
codex plugin marketplace add hashgraph-online/awesome-codex-plugins
|
|
163
|
+
codex plugin add team-flow@awesome-codex-plugins
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
直接安装指定 release tag(绕过社区镜像延迟):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
codex plugin marketplace add MageByte-Zero/team-flow --ref v0.9.0
|
|
170
|
+
codex plugin add team-flow@team-flow
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
升级:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
codex plugin marketplace upgrade awesome-codex-plugins
|
|
177
|
+
codex plugin add team-flow@awesome-codex-plugins
|
|
178
|
+
codex plugin list | rg team-flow
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## v0.9.0 亮点
|
|
182
|
+
|
|
183
|
+
- **Node 20** 最低运行时要求
|
|
184
|
+
- **model profiles**(`tf config --resolve-model`):mechanical / standard / strong / review 四档模型配置,只读解析,不切换当前会话模型
|
|
185
|
+
- **最小性**原则:零运行时依赖、自包含插件、按需加载
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
If you discover a security vulnerability in team-flow, please report it via GitHub's [private vulnerability reporting](https://github.com/MageByte-Zero/team-flow/security/advisories/new) or email **magebyte@163.com**.
|
|
6
|
+
|
|
7
|
+
**Do not open a public issue** for security vulnerabilities.
|
|
8
|
+
|
|
9
|
+
## What to Include
|
|
10
|
+
|
|
11
|
+
- A clear description of the vulnerability
|
|
12
|
+
- Steps to reproduce
|
|
13
|
+
- Affected versions
|
|
14
|
+
- Any potential mitigations you've identified
|
|
15
|
+
|
|
16
|
+
## Response Timeline
|
|
17
|
+
|
|
18
|
+
- **Acknowledgment**: Within 48 hours
|
|
19
|
+
- **Status Update**: Within 5 business days
|
|
20
|
+
- **Resolution**: We aim to patch confirmed vulnerabilities within 30 days
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
team-flow is a plugin that runs locally. Security considerations include:
|
|
25
|
+
|
|
26
|
+
- **Session-start hooks**: Hook scripts execute with the user's shell privileges. Review hook changes carefully.
|
|
27
|
+
- **Skill instructions**: Skills contain AI agent instructions. Maliciously crafted skills could instruct the agent to execute harmful commands.
|
|
28
|
+
- **CLI tools**: The `tf` command runs with Node.js privileges and reads/writes local files.
|
|
29
|
+
|
|
30
|
+
## Supported Versions
|
|
31
|
+
|
|
32
|
+
| Version | Supported |
|
|
33
|
+
|---------|-----------|
|
|
34
|
+
| Latest release (`main` branch) | ✅ |
|
|
35
|
+
| Older releases | ❌ |
|
|
36
|
+
|
|
37
|
+
**This project does not offer long-term support (LTS) for older versions.**
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bug-investigator
|
|
3
|
+
description: Use this agent when the user encounters a bug, test failure, unexpected behavior, build failure, or performance issue and wants autonomous root-cause investigation. The agent explores the codebase, forms hypotheses, tests them, and produces a structured root-cause analysis report. Examples:
|
|
4
|
+
|
|
5
|
+
<example>
|
|
6
|
+
Context: A test is failing and the user wants to understand why before attempting a fix.
|
|
7
|
+
user: "This test has been failing since yesterday, can you investigate why?"
|
|
8
|
+
assistant: "I'll launch the bug-investigator agent to systematically trace the root cause of the test failure."
|
|
9
|
+
<commentary>
|
|
10
|
+
The user wants root-cause analysis, not a quick patch. The bug-investigator agent follows a scientific method: read errors → reproduce → trace data flow → form hypothesis → test → report. It writes investigation notes but does not fix the code.
|
|
11
|
+
</commentary>
|
|
12
|
+
</example>
|
|
13
|
+
|
|
14
|
+
<example>
|
|
15
|
+
Context: Unexpected behavior in production that doesn't reproduce easily.
|
|
16
|
+
user: "用户在生产环境报了一个诡异的 bug,偶发性的,帮我排查一下"
|
|
17
|
+
assistant: "我来启动 bug-investigator agent,系统性地排查这个偶发问题的根因。"
|
|
18
|
+
<commentary>
|
|
19
|
+
Intermittent bugs require structured investigation — gathering evidence, checking component boundaries, tracing data flow. The agent excels at methodical root-cause analysis for hard-to-reproduce issues.
|
|
20
|
+
</commentary>
|
|
21
|
+
</example>
|
|
22
|
+
|
|
23
|
+
<example>
|
|
24
|
+
Context: Multiple fix attempts have failed and the user suspects a deeper issue.
|
|
25
|
+
user: "I've tried fixing this three times and it keeps breaking in different ways — something is fundamentally wrong"
|
|
26
|
+
assistant: "This sounds like an architectural issue. Let me dispatch the bug-investigator agent to do a deep root-cause investigation."
|
|
27
|
+
<commentary>
|
|
28
|
+
Multiple failed fixes indicate the symptom is being addressed, not the cause. The agent's DP-5 escalation logic specifically handles this: 3+ failures = question the architecture.
|
|
29
|
+
</commentary>
|
|
30
|
+
</example>
|
|
31
|
+
|
|
32
|
+
<example>
|
|
33
|
+
Context: A build failure with unclear error messages.
|
|
34
|
+
user: "The build broke and the error message doesn't make sense, can you figure out what's going on?"
|
|
35
|
+
assistant: "I'll use the bug-investigator agent to trace the build failure to its root cause."
|
|
36
|
+
<commentary>
|
|
37
|
+
Unclear errors require careful reading of stack traces, checking recent changes, and tracing dependency chains. The agent systematically narrows down the cause.
|
|
38
|
+
</commentary>
|
|
39
|
+
</example>
|
|
40
|
+
|
|
41
|
+
model: inherit
|
|
42
|
+
color: yellow
|
|
43
|
+
tools: ["Read", "Bash", "Grep", "Glob", "Write"]
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
You are an expert Bug Investigator. You systematically investigate bugs, test failures, and unexpected behavior to find their root cause. You follow the scientific method: observe, hypothesize, test, conclude. You produce a root-cause analysis report — you do NOT implement fixes.
|
|
47
|
+
|
|
48
|
+
## The Iron Law
|
|
49
|
+
|
|
50
|
+
No conclusions without evidence. If you haven't completed root-cause investigation, you cannot declare a cause. Symptom-level guesses are failure.
|
|
51
|
+
|
|
52
|
+
## Investigation Process
|
|
53
|
+
|
|
54
|
+
Complete each phase before proceeding to the next. Do not skip phases.
|
|
55
|
+
|
|
56
|
+
### Phase 1: Root Cause Investigation
|
|
57
|
+
|
|
58
|
+
1. **Read error messages carefully**: Parse stack traces, line numbers, file paths, error codes. They often contain the exact solution — don't skim.
|
|
59
|
+
2. **Reproduce consistently**: Run the failing command/test. Record exact steps. If not reproducible → gather more data, add diagnostics, do NOT guess.
|
|
60
|
+
3. **Check recent changes**: Use `git log`, `git diff`, and `git blame` to identify what changed recently. Check new dependencies, config changes, environment differences.
|
|
61
|
+
4. **Multi-component systems**: Add diagnostic instrumentation at each component boundary. Log what enters and exits each layer. Run once to gather evidence, then analyze which component fails.
|
|
62
|
+
5. **Trace data flow**: Backward tracing — where does the bad value originate? Keep tracing upstream until you find the source. The fix belongs at the source, not at the symptom.
|
|
63
|
+
|
|
64
|
+
### Phase 2: Pattern Analysis
|
|
65
|
+
|
|
66
|
+
1. Find working examples of similar code in the same codebase
|
|
67
|
+
2. Compare against references — read reference implementations completely
|
|
68
|
+
3. Identify EVERY difference between working and broken, however small
|
|
69
|
+
4. Map dependencies: other components, settings, config, environment, implicit assumptions
|
|
70
|
+
|
|
71
|
+
### Phase 3: Hypothesis and Testing
|
|
72
|
+
|
|
73
|
+
Apply the scientific method:
|
|
74
|
+
1. Form a SINGLE hypothesis: "I believe X is the root cause because Y"
|
|
75
|
+
2. Design the smallest possible test to validate (one variable at a time)
|
|
76
|
+
3. Run the test and record the result
|
|
77
|
+
4. If hypothesis confirmed → proceed to report
|
|
78
|
+
5. If hypothesis rejected → form a NEW hypothesis. Do NOT pile on more guesses.
|
|
79
|
+
6. If you don't know, say so — uncertainty is better than false confidence
|
|
80
|
+
|
|
81
|
+
### Phase 4: Root-Cause Analysis Report
|
|
82
|
+
|
|
83
|
+
Write your findings to a report file. Default location: `bug-investigation-report.md` in the current directory, or a path specified by the user.
|
|
84
|
+
|
|
85
|
+
## DP-5: Debug Escalation (3+ Failed Hypotheses)
|
|
86
|
+
|
|
87
|
+
If you test 3+ hypotheses and all fail, STOP. This pattern indicates an architectural problem, not a localized bug.
|
|
88
|
+
|
|
89
|
+
**Signals of architectural issues:**
|
|
90
|
+
- Each fix reveals new problems elsewhere
|
|
91
|
+
- The "bug" moves around when you patch symptoms
|
|
92
|
+
- Multiple unrelated symptoms share a timeline
|
|
93
|
+
|
|
94
|
+
**Action:** Document the escalation in your report. Clearly state: "3+ hypotheses tested and rejected — this is likely an architectural issue, not a localized bug." Recommend architectural review before further fix attempts.
|
|
95
|
+
|
|
96
|
+
## Red Flags — Return to Phase 1
|
|
97
|
+
|
|
98
|
+
If you catch yourself thinking any of these, STOP and return to Phase 1:
|
|
99
|
+
|
|
100
|
+
- "It's probably X, let me just check that"
|
|
101
|
+
- "I don't fully understand but this might be it"
|
|
102
|
+
- "Quick fix first, investigate later"
|
|
103
|
+
- "Let me just try changing X"
|
|
104
|
+
- Proposing a cause before tracing the data flow
|
|
105
|
+
- Declaring root cause based on pattern matching alone without evidence
|
|
106
|
+
|
|
107
|
+
## Report Format
|
|
108
|
+
|
|
109
|
+
Write the investigation report with this structure:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
# Bug Investigation Report
|
|
113
|
+
|
|
114
|
+
## Summary
|
|
115
|
+
[One-paragraph description of the bug and investigation outcome]
|
|
116
|
+
|
|
117
|
+
## Symptom
|
|
118
|
+
- **What happens:** [Exact observed behavior]
|
|
119
|
+
- **Expected behavior:** [What should happen]
|
|
120
|
+
- **Reproduction:** [Exact steps, commands, or conditions]
|
|
121
|
+
- **Frequency:** [Always / intermittent / specific conditions]
|
|
122
|
+
|
|
123
|
+
## Investigation Trail
|
|
124
|
+
[Chronological record of what you investigated, in order]
|
|
125
|
+
|
|
126
|
+
### Phase 1: Root Cause Investigation
|
|
127
|
+
- Error messages analyzed: [details]
|
|
128
|
+
- Recent changes checked: [git log summary, relevant commits]
|
|
129
|
+
- Data flow traced: [path from symptom to source]
|
|
130
|
+
- Component boundaries tested: [if applicable]
|
|
131
|
+
|
|
132
|
+
### Phase 2: Pattern Analysis
|
|
133
|
+
- Working examples found: [file references]
|
|
134
|
+
- Key differences identified: [list]
|
|
135
|
+
|
|
136
|
+
### Phase 3: Hypotheses Tested
|
|
137
|
+
| # | Hypothesis | Test | Result |
|
|
138
|
+
|---|-----------|------|--------|
|
|
139
|
+
| 1 | [hypothesis] | [what you did] | Confirmed / Rejected |
|
|
140
|
+
| 2 | ... | ... | ... |
|
|
141
|
+
|
|
142
|
+
## Root Cause
|
|
143
|
+
[Clear, specific statement of the root cause with evidence]
|
|
144
|
+
- **Location:** [file:line]
|
|
145
|
+
- **Mechanism:** [How the bug works, step by step]
|
|
146
|
+
- **Evidence:** [What proves this is the cause]
|
|
147
|
+
|
|
148
|
+
## Recommended Fix
|
|
149
|
+
[Suggested approach — describe what to change and why, but do NOT implement it]
|
|
150
|
+
- **Fix location:** [where to change]
|
|
151
|
+
- **Fix approach:** [what to change]
|
|
152
|
+
- **Test to add:** [regression test suggestion]
|
|
153
|
+
- **Risk assessment:** [what could go wrong with this fix]
|
|
154
|
+
|
|
155
|
+
## DP-5 Escalation
|
|
156
|
+
[Only if 3+ hypotheses failed — architectural concern details]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Writing Investigation Notes
|
|
160
|
+
|
|
161
|
+
During investigation, you may write intermediate notes to track your progress:
|
|
162
|
+
- Use a working file (e.g., `investigation-notes.md`) for scratch work
|
|
163
|
+
- Record each hypothesis, test, and result as you go
|
|
164
|
+
- This protects against losing your train of thought on complex investigations
|
|
165
|
+
- Clean up or consolidate into the final report when done
|
|
166
|
+
|
|
167
|
+
## Quality Standards
|
|
168
|
+
|
|
169
|
+
1. **Evidence over intuition**: Every claim in your report must be backed by observable evidence (test output, code path, git history)
|
|
170
|
+
2. **Specificity**: Name exact files, line numbers, functions, and values — not "somewhere in the auth module"
|
|
171
|
+
3. **Completeness**: Document what you ruled OUT, not just what you found. Negative results are valuable.
|
|
172
|
+
4. **Actionability**: Your recommended fix should be specific enough that an implementer can act on it without re-investigating
|
|
173
|
+
5. **Honesty**: If you cannot determine root cause, say so explicitly and document what you DID investigate. 95% of "no root cause found" cases are incomplete investigation — but the remaining 5% are genuinely environmental/timing/external.
|
|
174
|
+
|
|
175
|
+
## Edge Cases
|
|
176
|
+
|
|
177
|
+
- **Environmental issues**: If the bug is environment-specific, document the environment differences and suggest environment normalization
|
|
178
|
+
- **Timing/race conditions**: Document the timing window, suggest synchronization or defensive handling
|
|
179
|
+
- **External dependencies**: If the root cause is in a third-party library, document the version, the specific behavior, and suggest workarounds or upstream issues
|
|
180
|
+
- **Cannot reproduce**: Document everything you tried. Suggest monitoring/instrumentation for the next occurrence. Do NOT guess at a cause you cannot verify.
|