@curdx/flow 2.2.3 → 2.2.5

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.
Files changed (126) hide show
  1. package/.claude-plugin/marketplace.json +3 -2
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/CHANGELOG.md +4 -566
  4. package/README.md +47 -113
  5. package/agents/flow-adversary.md +1 -0
  6. package/agents/flow-architect.md +9 -36
  7. package/agents/flow-brownfield-analyst.md +7 -18
  8. package/agents/flow-debugger.md +1 -0
  9. package/agents/flow-edge-hunter.md +1 -0
  10. package/agents/flow-executor.md +1 -0
  11. package/agents/flow-planner.md +11 -37
  12. package/agents/flow-product-designer.md +9 -41
  13. package/agents/flow-qa-engineer.md +1 -0
  14. package/agents/flow-researcher.md +9 -45
  15. package/agents/flow-reviewer.md +1 -0
  16. package/agents/flow-security-auditor.md +1 -0
  17. package/agents/flow-triage-analyst.md +1 -0
  18. package/agents/flow-ui-researcher.md +1 -0
  19. package/agents/flow-ux-designer.md +1 -0
  20. package/agents/flow-verifier.md +1 -0
  21. package/cli/doctor-workflow.js +5 -914
  22. package/cli/install-companions.js +8 -8
  23. package/cli/lib/doctor-claude-settings.js +736 -0
  24. package/cli/lib/doctor-runtime-environment.js +196 -0
  25. package/cli/lib/semver.js +14 -0
  26. package/cli/uninstall-actions.js +323 -0
  27. package/cli/uninstall.js +9 -253
  28. package/gates/coverage-audit-gate.md +1 -3
  29. package/gates/tdd-gate.md +0 -6
  30. package/gates/verification-gate.md +1 -5
  31. package/knowledge/artifact-output-discipline.md +24 -0
  32. package/knowledge/artifact-summary-contracts.md +50 -0
  33. package/knowledge/execution-strategies.md +6 -4
  34. package/knowledge/poc-first-workflow.md +2 -6
  35. package/knowledge/spec-driven-development.md +0 -4
  36. package/knowledge/systematic-debugging.md +0 -6
  37. package/knowledge/two-stage-review.md +8 -6
  38. package/knowledge/wave-execution.md +2 -1
  39. package/package.json +2 -2
  40. package/schemas/agent-frontmatter.schema.json +4 -0
  41. package/skills/brownfield-index/SKILL.md +14 -20
  42. package/skills/brownfield-index/references/applicability.md +12 -0
  43. package/skills/brownfield-index/references/handoff.md +8 -0
  44. package/skills/brownfield-index/references/index-contract.md +10 -0
  45. package/skills/browser-qa/SKILL.md +15 -35
  46. package/skills/browser-qa/references/handoff.md +6 -0
  47. package/skills/browser-qa/references/prerequisites.md +10 -0
  48. package/skills/browser-qa/references/qa-contract.md +20 -0
  49. package/skills/cancel/SKILL.md +20 -61
  50. package/skills/cancel/references/destructive-mode.md +17 -0
  51. package/skills/cancel/references/reporting.md +18 -0
  52. package/skills/cancel/references/state-recovery.md +30 -0
  53. package/skills/cancel/references/target-resolution.md +7 -0
  54. package/skills/debug/SKILL.md +23 -87
  55. package/skills/debug/references/context-gathering.md +11 -0
  56. package/skills/debug/references/failure-guard.md +25 -0
  57. package/skills/debug/references/intake.md +12 -0
  58. package/skills/debug/references/phase-workflow.md +34 -0
  59. package/skills/debug/references/reporting.md +20 -0
  60. package/skills/epic/SKILL.md +18 -50
  61. package/skills/epic/references/epic-artifacts.md +20 -0
  62. package/skills/epic/references/epic-intake.md +9 -0
  63. package/skills/epic/references/slice-handoff.md +16 -0
  64. package/skills/fast/SKILL.md +34 -102
  65. package/skills/fast/references/applicability.md +25 -0
  66. package/skills/fast/references/clarification.md +20 -0
  67. package/skills/fast/references/execution-contract.md +56 -0
  68. package/skills/help/SKILL.md +26 -132
  69. package/skills/help/references/dispatch.md +20 -0
  70. package/skills/help/references/overview.md +39 -0
  71. package/skills/help/references/troubleshoot.md +47 -0
  72. package/skills/help/references/workflow.md +37 -0
  73. package/skills/implement/SKILL.md +61 -237
  74. package/skills/implement/references/error-recovery.md +36 -0
  75. package/skills/implement/references/linear-execution.md +32 -0
  76. package/skills/implement/references/preflight.md +43 -0
  77. package/skills/implement/references/progress-contract.md +32 -0
  78. package/skills/implement/references/state-init.md +33 -0
  79. package/skills/implement/references/stop-hook-execution.md +36 -0
  80. package/skills/implement/references/strategy-router.md +38 -0
  81. package/skills/implement/references/subagent-execution.md +43 -0
  82. package/skills/init/SKILL.md +26 -95
  83. package/skills/init/references/gitignore-and-health.md +26 -0
  84. package/skills/init/references/next-steps.md +22 -0
  85. package/skills/init/references/preflight.md +15 -0
  86. package/skills/init/references/scaffold-contract.md +27 -0
  87. package/skills/review/SKILL.md +45 -153
  88. package/skills/review/references/optional-passes.md +48 -0
  89. package/skills/review/references/preflight.md +38 -0
  90. package/skills/review/references/report-contract.md +49 -0
  91. package/skills/review/references/reporting.md +20 -0
  92. package/skills/review/references/stage-execution.md +32 -0
  93. package/skills/security-audit/SKILL.md +16 -34
  94. package/skills/security-audit/references/audit-contract.md +21 -0
  95. package/skills/security-audit/references/gate-handoff.md +8 -0
  96. package/skills/security-audit/references/scope-and-depth.md +9 -0
  97. package/skills/spec/SKILL.md +55 -182
  98. package/skills/spec/references/artifact-landing.md +31 -0
  99. package/skills/spec/references/phase-execution.md +50 -0
  100. package/skills/spec/references/planning-review.md +31 -0
  101. package/skills/spec/references/preflight-and-routing.md +46 -0
  102. package/skills/spec/references/reporting.md +21 -0
  103. package/skills/start/SKILL.md +40 -123
  104. package/skills/start/references/branch-routing.md +51 -0
  105. package/skills/start/references/mode-semantics.md +12 -0
  106. package/skills/start/references/preflight.md +13 -0
  107. package/skills/start/references/reporting.md +20 -0
  108. package/skills/start/references/state-seeding.md +44 -0
  109. package/skills/start/references/workflow-handoff.md +26 -0
  110. package/skills/status/SKILL.md +17 -61
  111. package/skills/status/references/gather-contract.md +27 -0
  112. package/skills/status/references/health-rules.md +27 -0
  113. package/skills/status/references/output-contract.md +24 -0
  114. package/skills/status/references/preflight.md +10 -0
  115. package/skills/status/references/recovery-hints.md +18 -0
  116. package/skills/ui-sketch/SKILL.md +15 -34
  117. package/skills/ui-sketch/references/brief-intake.md +10 -0
  118. package/skills/ui-sketch/references/iteration-handoff.md +5 -0
  119. package/skills/ui-sketch/references/variant-contract.md +15 -0
  120. package/skills/verify/SKILL.md +31 -86
  121. package/skills/verify/references/evidence-workflow.md +39 -0
  122. package/skills/verify/references/output-contract.md +23 -0
  123. package/skills/verify/references/preflight.md +11 -0
  124. package/skills/verify/references/report-handoff.md +35 -0
  125. package/skills/verify/references/strict-mode.md +12 -0
  126. package/README.zh.md +0 -160
@@ -15,45 +15,25 @@ paths:
15
15
 
16
16
  # Browser QA
17
17
 
18
- You are invoked when the user wants real-browser QA of a UI flow.
18
+ This skill orchestrates real-browser validation, not a generic UI review. Keep
19
+ the entrypoint focused on prerequisites, QA artifact requirements, and the
20
+ handoff after findings. Detailed rules live in:
19
21
 
20
- ## Preconditions
21
-
22
- 1. `chrome-devtools` MCP is available (`mcp__chrome_devtools__*`). If missing, fall back to a manual checklist.
23
- 2. A URL (dev server or deployed) is available. Prompt for it if not provided.
24
-
25
- ## Workflow
26
-
27
- ### Step 1: Clarify scope
22
+ - `references/prerequisites.md`
23
+ - `references/qa-contract.md`
24
+ - `references/handoff.md`
28
25
 
29
- Confirm with the user:
30
- - **URL under test** (local `http://localhost:3000` or remote)
31
- - **Flow to test** (e.g., "sign up → dashboard → logout")
32
- - **What success looks like** (accessibility / performance / zero console errors / visual match)
33
-
34
- ### Step 2: Run via `flow-qa-engineer`
35
-
36
- This skill executes in a forked context through `flow-qa-engineer`. The agent will:
37
- 1. Open the target URL via `mcp__chrome_devtools__new_page`
38
- 2. Drive the flow with `mcp__chrome_devtools__click` / `fill` / `navigate_page`
39
- 3. Capture `list_console_messages`, `list_network_requests`, `take_screenshot`, optionally `lighthouse_audit`
40
- 4. Compare against expected behavior
41
-
42
- ### Step 3: Report findings
26
+ ## Preconditions
43
27
 
44
- Produce `.flow/specs/<active>/qa-report.md` with:
45
- - **Bugs** (reproducible, severity P1/P2/P3)
46
- - **Performance** (LCP / INP / CLS from Lighthouse)
47
- - **Accessibility** (axe violations with WCAG references)
48
- - **Console errors** (full stack traces)
49
- - **Screenshots** (attached)
28
+ Use `references/prerequisites.md` to confirm browser MCP availability and the
29
+ URL or flow under test. Real browser execution in this skill depends on
30
+ `mcp__chrome_devtools__*`.
50
31
 
51
- ### Step 4: Hand off
32
+ ## QA Contract
52
33
 
53
- If bugs found: suggest `/curdx-flow:debug "<bug title>"` for systematic root-cause analysis.
54
- If accessibility violations: suggest fixes inline with WCAG refs.
34
+ `flow-qa-engineer` should execute the browser workflow in
35
+ `references/qa-contract.md`.
55
36
 
56
- ## References
37
+ ## Handoff
57
38
 
58
- - `flow-qa-engineer` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-qa-engineer.md`
59
- - chrome-devtools MCP docs: https://github.com/ChromeDevTools/chrome-devtools-mcp
39
+ Post-QA routing and bug follow-up live in `references/handoff.md`.
@@ -0,0 +1,6 @@
1
+ # Browser QA Handoff — Where Findings Go Next
2
+
3
+ - if reproducible bugs are found -> `/curdx-flow:debug "<bug title>"`
4
+ - if accessibility issues are found -> report concrete WCAG-linked fixes
5
+ - if the flow is clean -> hand off `qa-report.md` as additional evidence, not a
6
+ replacement for `verify` or `review`
@@ -0,0 +1,10 @@
1
+ # Browser QA Prerequisites — Browser and URL Required
2
+
3
+ Before dispatching:
4
+
5
+ - confirm `mcp__chrome_devtools__*` is available
6
+ - confirm a URL under test exists
7
+ - confirm the flow and success criteria
8
+
9
+ If browser MCP is missing, fall back to a manual checklist rather than
10
+ pretending a real-browser run happened.
@@ -0,0 +1,20 @@
1
+ # Browser QA Contract — What the QA Agent Must Do
2
+
3
+ `flow-qa-engineer` should:
4
+
5
+ 1. open the target URL
6
+ 2. drive the flow in a real browser
7
+ 3. collect console, network, screenshot, and optional Lighthouse evidence
8
+ 4. compare observed behavior to expected behavior
9
+
10
+ ## Required Artifacts
11
+
12
+ - `.flow/specs/<active>/qa-report.md`
13
+ - `.flow/specs/<active>/qa-screenshots/`
14
+
15
+ The report should include:
16
+
17
+ - bugs by severity
18
+ - performance metrics
19
+ - accessibility findings
20
+ - console errors
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cancel
3
- description: Stop the active CurDX-Flow execution loop safely. Optional --delete-spec --yes removes the spec directory.
3
+ description: Cancel the active execution loop or delete a spec with explicit confirmation.
4
4
  when_to_use: Use when the user wants to stop the current execution loop, abort a stuck run, or delete the active spec intentionally.
5
5
  argument-hint: "[spec-name] [--delete-spec --yes]"
6
6
  disable-model-invocation: true
@@ -9,74 +9,33 @@ allowed-tools: [Read, Bash]
9
9
 
10
10
  # CurdX-Flow Cancel
11
11
 
12
- Safely stop an active execution loop. Default behavior is non-destructive: preserve spec files, tasks, progress, and artifacts.
12
+ `cancel` is a recovery control, not an execution path. Keep this entrypoint
13
+ focused on target selection, destructive-mode gating, and the final recovery
14
+ message. Detailed cancel rules live in:
13
15
 
14
- ## Target Resolution
15
-
16
- 1. If `$ARGUMENTS` includes a spec name, use `.flow/specs/<name>`.
17
- 2. Otherwise read `.flow/.active-spec`.
18
- 3. If no target exists, print `No active spec to cancel` and stop.
19
-
20
- ## Default: Cancel Execution Loop Only
21
-
22
- Default mode removes stop-hook/subagent execution state while preserving all human-readable artifacts:
23
-
24
- 1. Read `.flow/specs/<target>/.state.json`.
25
- 2. Use `Edit` or `Write` to set `phase` to `tasks`.
26
- 3. Set `phase_status.execute` to `cancelled`.
27
- 4. Remove `execute_state` and `strategy`.
28
- 5. If the state file is missing, print `No execution state for <target>. Nothing to cancel.` and stop.
29
-
30
- Do not rewrite `.state.json` with a Bash heredoc or ad-hoc Python writer; use checkpoint-tracked `Edit`/`Write` operations.
31
-
32
- Append to `.progress.md`:
16
+ - `references/target-resolution.md`
17
+ - `references/state-recovery.md`
18
+ - `references/destructive-mode.md`
19
+ - `references/reporting.md`
33
20
 
34
- ```markdown
35
- ## Execution Cancelled YYYY-MM-DD
36
- - Cancelled by: /curdx-flow:cancel
37
- - Preserved: research.md, requirements.md, design.md, tasks.md, progress, reports
38
- - Resume: /curdx-flow:implement --strategy=subagent or /curdx-flow:spec --phase=tasks --regenerate
39
- ```
21
+ ## Target Resolution
40
22
 
41
- ## Destructive Mode
23
+ Use `references/target-resolution.md` to resolve the target spec.
42
24
 
43
- Only delete the spec directory when both flags are present:
25
+ ## Default Behavior
44
26
 
45
- ```bash
46
- /curdx-flow:cancel <spec-name> --delete-spec --yes
47
- ```
27
+ Default mode is non-destructive. Use `references/state-recovery.md` to:
48
28
 
49
- If `--delete-spec` is present without `--yes`, do not delete. Print the exact command required.
29
+ - roll execution state back safely
30
+ - preserve spec artifacts and reports
31
+ - append a recovery note to `.progress.md`
32
+ - recommend the best resume command
50
33
 
51
- Destructive mode:
34
+ ## Destructive Behavior
52
35
 
53
- 1. Print target path and files that will be removed.
54
- 2. Delete `.flow/specs/<target>`.
55
- 3. If it was active, remove `.flow/.active-spec`.
56
- 4. Do not delete `.flow/PROJECT.md`, `.flow/CONTEXT.md`, `.flow/STATE.md`, or other specs.
36
+ Delete a spec only when both `--delete-spec` and `--yes` are present. The
37
+ deletion rules live in `references/destructive-mode.md`.
57
38
 
58
39
  ## Output
59
40
 
60
- Default mode:
61
-
62
- ```markdown
63
- ✓ Cancelled execution loop: <spec-name>
64
- State: execute → cancelled, phase → tasks
65
- Preserved: spec artifacts and progress
66
- Resume: /curdx-flow:implement --strategy=subagent
67
- ```
68
-
69
- Destructive mode:
70
-
71
- ```markdown
72
- ✓ Deleted spec: <spec-name>
73
- Removed: .flow/specs/<spec-name>
74
- Active spec cleared: yes|no
75
- ```
76
-
77
- ## Safety Rules
78
-
79
- - Never delete a spec unless `--delete-spec --yes` is present.
80
- - Never delete project-level `.flow` files.
81
- - If state JSON is corrupt, rename it to `.state.json.corrupt.<timestamp>` instead of deleting it.
82
- - Prefer `/curdx-flow:status` after cancel to confirm recovery state.
41
+ Use `references/reporting.md` for the default and destructive-mode summaries.
@@ -0,0 +1,17 @@
1
+ # Cancel Destructive Mode — Explicit and Narrow
2
+
3
+ Delete the spec directory only when both flags are present:
4
+
5
+ ```text
6
+ /curdx-flow:cancel <spec-name> --delete-spec --yes
7
+ ```
8
+
9
+ ## Destructive Flow
10
+
11
+ 1. print the target path and removal scope
12
+ 2. delete `.flow/specs/<target>`
13
+ 3. if it was active, clear `.flow/.active-spec`
14
+ 4. leave all project-level `.flow` files untouched
15
+
16
+ If `--delete-spec` appears without `--yes`, stop and print the exact command
17
+ required.
@@ -0,0 +1,18 @@
1
+ # Cancel Reporting — Recovery vs Deletion Summary
2
+
3
+ Default mode:
4
+
5
+ ```text
6
+ ✓ Cancelled execution loop: <spec-name>
7
+ State: execute → cancelled, phase → tasks
8
+ Preserved: spec artifacts and progress
9
+ Resume: /curdx-flow:implement --strategy=subagent
10
+ ```
11
+
12
+ Destructive mode:
13
+
14
+ ```text
15
+ ✓ Deleted spec: <spec-name>
16
+ Removed: .flow/specs/<spec-name>
17
+ Active spec cleared: yes|no
18
+ ```
@@ -0,0 +1,30 @@
1
+ # Cancel State Recovery — Safe Rollback Without Deletion
2
+
3
+ Default mode preserves all human-readable artifacts.
4
+
5
+ ## Recovery Steps
6
+
7
+ 1. Read `.flow/specs/<target>/.state.json`
8
+ 2. Set `phase` to `tasks`
9
+ 3. Set `phase_status.execute` to `cancelled`
10
+ 4. Remove `execute_state` and `strategy`
11
+ 5. If the state file is missing, print `No execution state for <target>. Nothing to cancel.`
12
+
13
+ Use checkpoint-tracked `Edit` or `Write`, not ad-hoc Bash or Python writers.
14
+
15
+ ## Progress Entry
16
+
17
+ Append to `.progress.md`:
18
+
19
+ ```markdown
20
+ ## Execution Cancelled YYYY-MM-DD
21
+ - Cancelled by: /curdx-flow:cancel
22
+ - Preserved: research.md, requirements.md, design.md, tasks.md, progress, reports
23
+ - Resume: /curdx-flow:implement --strategy=subagent or /curdx-flow:spec --phase=tasks --regenerate
24
+ ```
25
+
26
+ ## Safety
27
+
28
+ - never delete project-level `.flow` files
29
+ - if `.state.json` is corrupt, rename it to `.state.json.corrupt.<timestamp>`
30
+ - prefer `/curdx-flow:status` after cancel to confirm recovery state
@@ -0,0 +1,7 @@
1
+ # Cancel Target Resolution — Positional Spec Name or Active Spec
2
+
3
+ 1. If `$ARGUMENTS` includes a positional spec name, target `.flow/specs/<name>`
4
+ 2. Otherwise read `.flow/.active-spec`
5
+ 3. If no target exists, print `No active spec to cancel` and stop
6
+
7
+ `cancel` uses a positional spec argument, not `--spec=<name>`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: debug
3
- description: Debug bugs, test failures, and flaky behavior with a 4-phase root-cause workflow. Routes to flow-debugger.
3
+ description: Debug a bug or failing test with the root-cause workflow.
4
4
  when_to_use: Use when the user reports a bug, failing test, regression, stack trace, flaky behavior, or wants root-cause analysis instead of trial-and-error edits.
5
5
  argument-hint: "\"<bug description>\""
6
6
  disable-model-invocation: true
@@ -10,100 +10,36 @@ agent: flow-debugger
10
10
 
11
11
  # Systematic Debug
12
12
 
13
- Debug the bug described below using the 4-phase methodology in
14
- `@${CLAUDE_PLUGIN_ROOT}/knowledge/systematic-debugging.md`. This is NOT
15
- "retry until green" each phase has a stop condition.
13
+ Use the 4-phase root-cause methodology in
14
+ `@${CLAUDE_PLUGIN_ROOT}/knowledge/systematic-debugging.md`. Keep this entrypoint
15
+ focused on bug intake, required context, and the hard-stop contract. Detailed
16
+ debugging rules live in:
16
17
 
17
- **Bug description**: `$ARGUMENTS`
18
+ - `references/intake.md`
19
+ - `references/context-gathering.md`
20
+ - `references/phase-workflow.md`
21
+ - `references/failure-guard.md`
22
+ - `references/reporting.md`
18
23
 
19
- If `$ARGUMENTS` is empty, print `Usage: /curdx-flow:debug "<bug description>"` and stop.
24
+ ## Intake
20
25
 
21
- ## Context to gather before diagnosing
26
+ Use `references/intake.md` to validate `$ARGUMENTS` and anchor the debugging
27
+ target before entering diagnosis.
22
28
 
23
- - Recent commits: `git log --oneline -20`
24
- - Uncommitted changes: `git status --short`, `git diff --stat`
25
- - Active spec (if any): read `.flow/.active-spec`; if set, read
26
- `.flow/specs/<active>/.progress.md` for related history.
29
+ ## Pre-Diagnosis Context
27
30
 
28
- ## Phase 1 Root-cause investigation
31
+ Gather the baseline context from `references/context-gathering.md` before
32
+ entering Phase 1.
29
33
 
30
- - Read the error carefully (stack trace + message + location).
31
- - Build a minimal reproduction.
32
- - Append `## Reality Check (BEFORE)` to `.flow/specs/<active>/.progress.md` with the exact reproduction command, observed failure output, and timestamp before changing code.
33
- - Check recent changes that could have introduced the bug.
34
- - Trace the data flow from cause to symptom.
35
- - **Exit condition**: state the root cause in **one sentence**.
36
- "maybe it's..." is not allowed.
34
+ ## Four Phases
37
35
 
38
- ## Phase 2 Pattern analysis
36
+ Use `references/phase-workflow.md` as the 4-phase contract.
39
37
 
40
- - Find a working counter-example in the codebase (same path, different
41
- input or neighboring module that behaves correctly).
42
- - Pinpoint the difference from the failing case.
43
- - Classify: **isolated case** (one location) vs. **systemic pattern**
44
- (multiple siblings). If systemic, Phase 4 must sweep for siblings.
38
+ ## Three-Failure Guard
45
39
 
46
- ## Phase 3 Hypothesis and test
40
+ Use `references/failure-guard.md` for the stop contract and required failure
41
+ report.
47
42
 
48
- - State ONE hypothesis.
49
- - Write the smallest test that distinguishes confirm vs. disprove.
50
- - Run the test in-memory (do not commit yet).
51
- - If disproved, return to Phase 1 with the new signal.
43
+ ## Output to User
52
44
 
53
- ## Phase 4 Implement the fix
54
-
55
- 1. Write a failing test; confirm it fails. Commit `test(<scope>): red - ...`.
56
- 2. Fix the root cause (not the symptom). Confirm the failing test now
57
- passes. Commit `fix(<scope>): green - ...`.
58
- 3. Run the full regression suite; no regressions allowed.
59
- 4. Re-run the original reproduction command and append `## Reality Check (AFTER)` to `.progress.md`; write `Verified: Issue resolved` only when BEFORE failed and AFTER passes or no longer shows the original failure.
60
- 5. If Phase 2 classified as systemic, sweep for sibling occurrences and
61
- fix them in the same stage. Optional third commit
62
- `fix(<scope>): sweep - N similar cases`.
63
-
64
- ## Three-failure guard (hard stop)
65
-
66
- If Phase 4 has tried 3 genuinely different approaches and all failed,
67
- **stop**. Do not try a 4th. Output the structured failure report:
68
-
69
- ```
70
- ⚠ Systematic debug halted after 3 attempts
71
-
72
- Attempts:
73
- 1. <approach 1>: <why it failed>
74
- 2. <approach 2>: <why it failed>
75
- 3. <approach 3>: <why it failed>
76
-
77
- Root-issue hypothesis: architecture | dependency | data | unknown
78
- Recommended next step: <user action — review architecture, ship a
79
- STATE.md D-NN deferral with @ts-expect-error,
80
- or request pairing>
81
- ```
82
-
83
- ## Forbidden
84
-
85
- - Prayer-driven programming (retry without a new hypothesis each round)
86
- - "Maybe it's ..." as a Phase 1 conclusion
87
- - A fix commit without a corresponding failing-test commit
88
- - A fix claim without BEFORE/AFTER reality verification in `.progress.md`
89
- - Masking the root cause with null checks / try-catch
90
- - Fixing multiple unrelated things in one commit (one task = one commit)
91
-
92
- ## Output to user (on success, ≤ 15 lines)
93
-
94
- ```
95
- ✓ Debug complete
96
-
97
- Root cause: <Phase 1 — one sentence>
98
- Pattern: <Phase 2 — isolated or systemic>
99
-
100
- Fix commits:
101
- - <sha>: test(<scope>): red - failing test
102
- - <sha>: fix(<scope>): green - root-cause fix
103
- - <sha>: fix(<scope>): sweep - N sibling cases (if systemic)
104
-
105
- Verification: failing test now PASS ✓; full suite green ✓
106
-
107
- Learnings (candidate for .progress.md):
108
- - <lesson>
109
- ```
45
+ Use `references/reporting.md` for the compact completion summary.
@@ -0,0 +1,11 @@
1
+ # Debug Context Gathering — Baseline Before Diagnosis
2
+
3
+ Gather these before diagnosing:
4
+
5
+ - recent commits: `git log --oneline -20`
6
+ - uncommitted changes: `git status --short`, `git diff --stat`
7
+ - active spec, if any:
8
+ - read `.flow/.active-spec`
9
+ - if set, read `.flow/specs/<active>/.progress.md`
10
+
11
+ The point is to debug against observed repo state, not assumptions.
@@ -0,0 +1,25 @@
1
+ # Debug Failure Guard — Stop After Three Real Attempts
2
+
3
+ If Phase 4 has tried three genuinely different approaches and all failed, stop.
4
+ Do not try a fourth.
5
+
6
+ ## Required Failure Report
7
+
8
+ ```text
9
+ ⚠ Systematic debug halted after 3 attempts
10
+
11
+ Attempts:
12
+ 1. <approach 1>: <why it failed>
13
+ 2. <approach 2>: <why it failed>
14
+ 3. <approach 3>: <why it failed>
15
+
16
+ Root-issue hypothesis: architecture | dependency | data | unknown
17
+ Recommended next step: <user action>
18
+ ```
19
+
20
+ ## Forbidden
21
+
22
+ - prayer-driven retries
23
+ - "maybe it's..." as a Phase 1 conclusion
24
+ - green fix commits without a corresponding red test commit
25
+ - fix claims without BEFORE/AFTER reality evidence
@@ -0,0 +1,12 @@
1
+ # Debug Intake — Require a Concrete Bug Target
2
+
3
+ The debug target is `$ARGUMENTS`.
4
+
5
+ If `$ARGUMENTS` is empty, print:
6
+
7
+ ```text
8
+ Usage: /curdx-flow:debug "<bug description>"
9
+ ```
10
+
11
+ Do not begin diagnosis until the failing behavior, test, or regression target is
12
+ concrete enough to reproduce.
@@ -0,0 +1,34 @@
1
+ # Debug Phases — Root Cause, Pattern, Hypothesis, Fix
2
+
3
+ ## Phase 1 — Root-Cause Investigation
4
+
5
+ - read the error carefully
6
+ - build a minimal reproduction
7
+ - append `Reality Check (BEFORE)` to `.progress.md` when a spec is active
8
+ - trace recent changes and data flow
9
+ - exit only when the root cause fits in one sentence
10
+
11
+ ## Phase 2 — Pattern Analysis
12
+
13
+ - find a working counter-example nearby
14
+ - identify the difference from the failing case
15
+ - classify the issue as `isolated` or `systemic`
16
+
17
+ If systemic, Phase 4 must sweep sibling cases.
18
+
19
+ ## Phase 3 — Hypothesis and Test
20
+
21
+ - state one hypothesis
22
+ - write the smallest distinguishing test
23
+ - run it before committing
24
+ - if disproved, return to Phase 1 with the new signal
25
+
26
+ ## Phase 4 — Implement the Fix
27
+
28
+ 1. write a failing test and confirm it fails
29
+ 2. fix the root cause and confirm the test now passes
30
+ 3. run the full regression suite
31
+ 4. re-run the original reproduction command and append `Reality Check (AFTER)`
32
+ 5. if systemic, sweep sibling occurrences in the same stage
33
+
34
+ Do not mask the issue with defensive noise that leaves the root cause intact.
@@ -0,0 +1,20 @@
1
+ # Debug Reporting — Compact Root-Cause Closeout
2
+
3
+ End with:
4
+
5
+ ```text
6
+ ✓ Debug complete
7
+
8
+ Root cause: <Phase 1 — one sentence>
9
+ Pattern: <Phase 2 — isolated or systemic>
10
+
11
+ Fix commits:
12
+ - <sha>: test(<scope>): red - failing test
13
+ - <sha>: fix(<scope>): green - root-cause fix
14
+ - <sha>: fix(<scope>): sweep - N sibling cases (if systemic)
15
+
16
+ Verification: failing test now PASS ✓; full suite green ✓
17
+ ```
18
+
19
+ Keep the closeout evidence-first. The root cause and verification outcome
20
+ matter more than narrative.
@@ -9,63 +9,31 @@ agent: flow-triage-analyst
9
9
 
10
10
  # Epic Decomposition
11
11
 
12
- You are invoked when the user wants to break a large feature into multiple vertical-slice specs.
12
+ This is a specialty orchestration skill for multi-spec planning. Keep the
13
+ entrypoint focused on when to use epic decomposition and what artifacts it must
14
+ leave behind. Detailed rules live in:
13
15
 
14
- ## Preconditions
15
-
16
- 1. A `.flow/` project must exist (run `/curdx-flow:init` first if missing).
17
- 2. The user has stated a feature scope that is too large for a single spec.
18
-
19
- ## Workflow
20
-
21
- ### Step 1: Clarify the epic scope
22
-
23
- Ask the user (or infer from context) for:
24
- - **Epic name** (short identifier, kebab-case)
25
- - **One-sentence goal** of the whole epic
26
- - **Hard boundary**: what is explicitly out of scope for this epic
27
-
28
- ### Step 2: Run via `flow-triage-analyst`
16
+ - `references/epic-intake.md`
17
+ - `references/epic-artifacts.md`
18
+ - `references/slice-handoff.md`
29
19
 
30
- This skill executes in a forked context through `flow-triage-analyst`. The agent returns:
31
- - A vertical-slice decomposition (not horizontal by layer)
32
- - Dependency graph between slices
33
- - Shared interfaces that must be frozen before parallel work begins
34
- - Suggested slice ordering (MVP → iteration → polish)
35
-
36
- ### Step 3: Write epic manifest
37
-
38
- Create `.flow/_epics/<epic-name>/epic.md` with:
39
-
40
- ```markdown
41
- # Epic: <name>
42
-
43
- ## Goal
44
- <one sentence>
45
-
46
- ## Slices (vertical)
47
- | ID | Slice | Depends on | Shared interface |
48
- |----|-------|-----------|------------------|
49
- | S1 | ... | — | — |
50
- | S2 | ... | S1 | `types/auth.ts` |
51
- | S3 | ... | S1 | — |
20
+ ## Preconditions
52
21
 
53
- ## Frozen Interfaces
54
- (contracts that must not change once slices start)
22
+ - a `.flow/` project exists
23
+ - the feature scope is too large for a single spec
55
24
 
56
- ## Out of Scope
57
- - ...
58
- ```
25
+ ## Intake
59
26
 
60
- ### Step 4: Scaffold sub-spec skeletons
27
+ Use `references/epic-intake.md` to confirm the epic boundary before dispatching
28
+ `flow-triage-analyst`.
61
29
 
62
- For each slice, create `.flow/specs/<epic-name>-<slice-id>/` with a minimal `.state.json` linking back to the epic manifest.
30
+ ## Artifact Contract
63
31
 
64
- ### Step 5: Report to user
32
+ Use `references/epic-artifacts.md` for the required outputs:
65
33
 
66
- Summarize: "Epic `<name>` decomposed into N vertical slices. Start any slice with `/curdx-flow:start <epic-name>-<slice-id>`. Suggested order: S1 → S2 → S3."
34
+ - `.flow/_epics/<epic-name>/epic.md`
35
+ - one `.flow/specs/<epic-name>-<slice-id>/` skeleton per slice
67
36
 
68
- ## References
37
+ ## Handoff
69
38
 
70
- - Vertical-slice methodology: `@${CLAUDE_PLUGIN_ROOT}/knowledge/epic-decomposition.md`
71
- - Spec skeleton: `@${CLAUDE_PLUGIN_ROOT}/templates/`
39
+ User-facing next-step routing lives in `references/slice-handoff.md`.
@@ -0,0 +1,20 @@
1
+ # Epic Artifacts — What Must Be Written
2
+
3
+ `flow-triage-analyst` must return:
4
+
5
+ - a vertical-slice decomposition
6
+ - a dependency graph between slices
7
+ - shared interfaces that should freeze before parallel work
8
+ - suggested ordering: MVP -> iteration -> polish
9
+
10
+ ## Required Files
11
+
12
+ - `.flow/_epics/<epic-name>/epic.md`
13
+ - `.flow/specs/<epic-name>-<slice-id>/` skeletons with minimal `.state.json`
14
+
15
+ `epic.md` should include:
16
+
17
+ - goal
18
+ - slice table
19
+ - frozen interfaces
20
+ - out-of-scope list
@@ -0,0 +1,9 @@
1
+ # Epic Intake — Confirm the Scope Boundary
2
+
3
+ Before decomposing, confirm:
4
+
5
+ - epic name (short kebab-case identifier)
6
+ - one-sentence goal
7
+ - hard out-of-scope boundary
8
+
9
+ This skill is for vertical-slice decomposition, not horizontal layer splitting.
@@ -0,0 +1,16 @@
1
+ # Epic Handoff — What the User Does Next
2
+
3
+ Report:
4
+
5
+ - epic name
6
+ - slice count
7
+ - suggested slice order
8
+
9
+ Then route the user to a concrete slice:
10
+
11
+ ```text
12
+ /curdx-flow:start <epic-name>-<slice-id>
13
+ ```
14
+
15
+ Do not tell the user to use `/curdx-flow:start --resume <slice-id>`; slice
16
+ selection is by explicit spec name.