@curdx/flow 2.1.0 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.claude-plugin/marketplace.json +25 -2
  2. package/.claude-plugin/plugin.json +27 -1
  3. package/CHANGELOG.md +32 -0
  4. package/README.md +18 -8
  5. package/README.zh.md +8 -3
  6. package/agent-preamble/preamble.md +35 -2
  7. package/agents/flow-adversary.md +1 -1
  8. package/agents/flow-architect.md +2 -1
  9. package/agents/flow-brownfield-analyst.md +153 -0
  10. package/agents/flow-debugger.md +6 -11
  11. package/agents/flow-edge-hunter.md +1 -1
  12. package/agents/flow-executor.md +30 -8
  13. package/agents/flow-planner.md +38 -5
  14. package/agents/flow-product-designer.md +2 -1
  15. package/agents/flow-qa-engineer.md +25 -20
  16. package/agents/flow-researcher.md +2 -1
  17. package/agents/flow-reviewer.md +23 -5
  18. package/agents/flow-security-auditor.md +5 -3
  19. package/agents/flow-triage-analyst.md +5 -24
  20. package/agents/flow-ui-researcher.md +6 -5
  21. package/agents/flow-ux-designer.md +12 -39
  22. package/agents/flow-verifier.md +38 -6
  23. package/bin/curdx-flow +5 -0
  24. package/cli/README.md +13 -10
  25. package/cli/doctor-workflow.js +1074 -2
  26. package/cli/doctor.js +8 -0
  27. package/cli/help.js +2 -0
  28. package/cli/install-companions.js +4 -1
  29. package/cli/install-required-plugins.js +18 -5
  30. package/cli/install-self-update.js +2 -91
  31. package/cli/install.js +12 -1
  32. package/cli/lib/claude.js +42 -11
  33. package/cli/lib/doctor-report.js +303 -9
  34. package/cli/lib/frontmatter.js +44 -0
  35. package/cli/lib/json-schema.js +57 -0
  36. package/cli/lib/runtime.js +20 -2
  37. package/cli/lib/semver.js +95 -0
  38. package/cli/utils.js +7 -1
  39. package/gates/adversarial-review-gate.md +1 -1
  40. package/gates/security-gate.md +2 -2
  41. package/gates/test-quality-gate.md +59 -0
  42. package/hooks/hooks.json +16 -2
  43. package/hooks/scripts/common.sh +4 -0
  44. package/hooks/scripts/quick-mode-guard.sh +6 -7
  45. package/hooks/scripts/session-start.sh +17 -2
  46. package/hooks/scripts/stop-watcher.sh +69 -18
  47. package/hooks/scripts/subagent-artifact-guard.sh +159 -0
  48. package/hooks/scripts/subagent-statusline.sh +105 -0
  49. package/knowledge/atomic-commits.md +1 -1
  50. package/knowledge/claude-code-runtime-contracts.md +203 -0
  51. package/knowledge/epic-decomposition.md +1 -1
  52. package/knowledge/execution-strategies.md +28 -6
  53. package/knowledge/planning-reviews.md +4 -4
  54. package/knowledge/poc-first-workflow.md +8 -8
  55. package/knowledge/review-feedback-intake.md +57 -0
  56. package/knowledge/two-stage-review.md +19 -6
  57. package/knowledge/wave-execution.md +33 -18
  58. package/output-styles/curdx-evidence-first.md +34 -0
  59. package/package.json +9 -2
  60. package/schemas/agent-frontmatter.schema.json +59 -0
  61. package/schemas/config.schema.json +37 -3
  62. package/schemas/gate-frontmatter.schema.json +30 -0
  63. package/schemas/hooks.schema.json +115 -0
  64. package/schemas/output-style-frontmatter.schema.json +22 -0
  65. package/schemas/plugin-manifest.schema.json +436 -0
  66. package/schemas/plugin-settings.schema.json +29 -0
  67. package/schemas/skill-frontmatter.schema.json +177 -0
  68. package/schemas/spec-state.schema.json +35 -5
  69. package/settings.json +6 -0
  70. package/skills/brownfield-index/SKILL.md +33 -36
  71. package/skills/browser-qa/SKILL.md +16 -7
  72. package/skills/cancel/SKILL.md +82 -0
  73. package/skills/debug/SKILL.md +7 -2
  74. package/skills/epic/SKILL.md +7 -4
  75. package/skills/fast/SKILL.md +3 -1
  76. package/skills/help/SKILL.md +18 -7
  77. package/skills/implement/SKILL.md +44 -12
  78. package/skills/implement/references/wave-execution.md +9 -9
  79. package/skills/init/SKILL.md +3 -1
  80. package/skills/review/SKILL.md +6 -2
  81. package/skills/security-audit/SKILL.md +19 -4
  82. package/skills/spec/SKILL.md +6 -4
  83. package/skills/start/SKILL.md +20 -19
  84. package/skills/status/SKILL.md +85 -0
  85. package/skills/ui-sketch/SKILL.md +13 -4
  86. package/skills/verify/SKILL.md +15 -2
  87. package/templates/CONTEXT.md.tmpl +1 -1
  88. package/templates/PROJECT.md.tmpl +1 -1
  89. package/templates/config.json.tmpl +9 -6
  90. package/templates/progress.md.tmpl +21 -2
  91. package/templates/tasks.md.tmpl +26 -3
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  name: init
3
3
  description: Initialize the CurdX-Flow project structure (create the .flow/ directory and core files)
4
+ when_to_use: Use when the current repository is not yet a CurdX-Flow project and needs the initial .flow scaffold.
4
5
  argument-hint: "[--force]"
6
+ disable-model-invocation: true
5
7
  allowed-tools: [Read, Write, Bash, AskUserQuestion]
6
8
  ---
7
9
 
@@ -105,7 +107,7 @@ Next steps (in order):
105
107
  3. npx @curdx/flow doctor — verify health
106
108
  4. /curdx-flow:start <name> "<goal>" — begin your first feature spec
107
109
 
108
- Start development (after Phase 1 ships):
110
+ Start development:
109
111
  5. /curdx-flow:start <name> "<goal>" — kick off the first spec
110
112
  ```
111
113
 
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: review
3
- description: Two-stage code review — Stage 1 spec compliance, Stage 2 code quality. Optional flags add adversarial review, edge-case hunting, or developer-experience audit.
3
+ description: "Run two-stage review: spec compliance first, code quality second. Optional flags add adversarial, edge-case, and DevEx passes."
4
+ when_to_use: Use when implementation exists and the user wants review findings, spec-compliance checks, adversarial review, edge-case hunting, or a DevEx audit.
4
5
  argument-hint: "[--stage=<1|2|both>] [--adversarial] [--edge-case] [--devex]"
5
- allowed-tools: [Read, Bash, Task, Grep, Glob]
6
+ disable-model-invocation: true
7
+ allowed-tools: [Read, Bash, Agent, Grep, Glob]
6
8
  ---
7
9
 
8
10
  # Two-Stage Code Review
@@ -11,6 +13,8 @@ Distinct from `/curdx-flow:verify`:
11
13
  - **verify** checks that the spec's stated goals actually work (goal-backward).
12
14
  - **review** checks that the code is good (spec compliance + craftsmanship).
13
15
 
16
+ When this command is used to review follow-up work after prior review comments, apply `@${CLAUDE_PLUGIN_ROOT}/knowledge/review-feedback-intake.md` first: classify each feedback item before changing code, verify it against the current code/spec, and record accepted fixes or technical pushback in `.progress.md`.
17
+
14
18
  ## Flags
15
19
 
16
20
  | Flag | Default | Purpose |
@@ -1,7 +1,22 @@
1
1
  ---
2
2
  name: security-audit
3
- description: Invoke when the user wants a security review OWASP Top 10, STRIDE threat modeling, credential handling, injection, secrets, sensitive data handling. Triggers on "security", "auth", "authentication", "credential", "password", "secret", "API key", "token", "OWASP", "STRIDE", "CVE", "vulnerability", "injection", "XSS", "CSRF", "SSRF", "SQL injection", "hardcoded secret", "sensitive data", "leak", "will my API key leak", "is this safe".
4
- allowed-tools: [Read, Grep, Glob, Bash, WebSearch]
3
+ description: Use when the user needs security review of code, specs, credentials, sensitive data, or dependency risk.
4
+ when_to_use: Triggers on "security", "auth", "authentication", "credential", "password", "secret", "API key", "token", "OWASP", "STRIDE", "CVE", "vulnerability", "injection", "XSS", "CSRF", "SSRF", "SQL injection", "hardcoded secret", "sensitive data", "leak", "will my API key leak", "is this safe".
5
+ argument-hint: "[scope] [--depth=<owasp|stride|full>]"
6
+ context: fork
7
+ agent: flow-security-auditor
8
+ paths:
9
+ - "**/*.{js,jsx,ts,tsx,py,rb,go,java,kt,php,cs,rs,swift,sql,sh}"
10
+ - "**/*.{json,yml,yaml,toml,tf,hcl,conf,ini}"
11
+ - "**/.env*"
12
+ - "**/Dockerfile*"
13
+ - ".github/workflows/**"
14
+ - ".gitlab-ci.yml"
15
+ - "docker-compose*.yml"
16
+ - "k8s/**"
17
+ - "helm/**"
18
+ - "infra/**"
19
+ - "terraform/**"
5
20
  ---
6
21
 
7
22
  # Security Audit
@@ -22,9 +37,9 @@ Confirm:
22
37
  - **Depth** (OWASP-only / OWASP + STRIDE / + dependency CVE scan)
23
38
  - **Risk tolerance** (block on any SR / only block on SR with POC / advisory only)
24
39
 
25
- ### Step 2: Dispatch `flow-security-auditor`
40
+ ### Step 2: Run via `flow-security-auditor`
26
41
 
27
- Delegate to the `flow-security-auditor` agent. It will:
42
+ This skill executes in a forked context through `flow-security-auditor`. It will:
28
43
  1. Scan for hardcoded secrets, weak crypto, unsanitized inputs
29
44
  2. Apply OWASP Top 10 (A01 Broken Access Control → A10 SSRF)
30
45
  3. Apply STRIDE threat modeling (Spoofing, Tampering, Repudiation, Information disclosure, DoS, Elevation)
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: spec
3
- description: Generate or refresh a feature specification. By default runs research requirements design tasks in sequence. Flags let you target a single phase, stop early, regenerate, or tack on a multi-dimensional planning review.
3
+ description: Generate or refresh the active spec across research, requirements, design, and tasks. Flags target phases, regeneration, and planning review.
4
+ when_to_use: Use when the user wants to generate, resume, regenerate, or review a feature spec across research, requirements, design, and task planning.
4
5
  argument-hint: "[--phase=<X[,Y,...]>] [--until=<X>] [--review[=<dim[,dim]>]] [--regenerate] [--resume]"
5
- allowed-tools: [Read, Write, Bash, Task, AskUserQuestion]
6
+ disable-model-invocation: true
7
+ allowed-tools: [Read, Write, Bash, Agent, AskUserQuestion]
6
8
  ---
7
9
 
8
10
  # Generate or Refresh the Active Spec
@@ -70,7 +72,7 @@ Read and update `.state.json.phase` after each phase succeeds.
70
72
 
71
73
  ## Phase execution
72
74
 
73
- For each phase in the resolved list, dispatch a sub-agent via the `Task` tool:
75
+ For each phase in the resolved list, dispatch a subagent via the `Agent` tool:
74
76
 
75
77
  ### research → `flow-researcher`
76
78
  Inputs: spec goal + one-line description from `.state.json`.
@@ -176,7 +178,7 @@ If `--review` (or `--review=<dims>`) is present:
176
178
 
177
179
  1. **Precondition**: `design.md` must exist. If missing, error: "Design missing. Run `/curdx-flow:spec --phase=design` first."
178
180
  2. Parse the dims: `all` expands to `ceo,eng,design,dx`.
179
- 3. Dispatch review agents in parallel via `Task` (one per dim):
181
+ 3. Dispatch review agents in parallel via `Agent` (one per dim):
180
182
 
181
183
  | Dim | Agent | Focus |
182
184
  |-----|-------|-------|
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: start
3
3
  description: Smart entry point — create a new spec, resume an existing one, or switch between specs. Replaces v1's /start + /switch.
4
+ when_to_use: Use when the user wants to create a spec, switch active work, resume a prior spec, list specs, or set the workflow mode for a feature.
4
5
  argument-hint: "[<spec-name>] [\"<one-line goal>\"] [--resume] [--list] [--mode=<fast|standard|enterprise>]"
5
- allowed-tools: [Read, Write, Bash, AskUserQuestion, Task]
6
+ disable-model-invocation: true
7
+ allowed-tools: [Read, Write, Bash, AskUserQuestion, Agent]
6
8
  ---
7
9
 
8
10
  # Start or Resume a Feature Spec
@@ -81,16 +83,17 @@ Switch `.flow/.active-spec` to `SPEC_NAME`. Confirm with the user if they intend
81
83
  ### Branch D: `SPEC_NAME` provided, spec does NOT exist
82
84
  Create a new spec:
83
85
 
84
- ```bash
85
- mkdir -p ".flow/specs/$SPEC_NAME"
86
- # NOTE: field names MUST match schemas/spec-state.schema.json:
87
- # - spec_name (not "spec")
88
- # - created (date, not "created_at")
89
- # - updated (date-time, not "updated_at")
90
- # - phase must be one of the enum values; the initial phase is "research"
91
- # (there is no "created" phase — that was schema drift pre-beta.9)
92
- # - version is required
93
- cat > ".flow/specs/$SPEC_NAME/.state.json" <<JSON
86
+ Use the `Write` tool for `.flow/specs/$SPEC_NAME/.state.json` and `.flow/.active-spec` so Claude Code checkpoints can rewind the new spec. The state file must match `schemas/spec-state.schema.json`:
87
+
88
+ - `spec_name`, not `spec`
89
+ - `created` as date, not `created_at`
90
+ - `updated` as date-time, not `updated_at`
91
+ - `phase` starts as `research`; there is no `created` phase
92
+ - `version` is required
93
+
94
+ Initial state JSON shape:
95
+
96
+ ```json
94
97
  {
95
98
  "version": "1.0",
96
99
  "spec_name": "$SPEC_NAME",
@@ -100,31 +103,29 @@ cat > ".flow/specs/$SPEC_NAME/.state.json" <<JSON
100
103
  "phase_status": {},
101
104
  "strategy": "auto",
102
105
  "execute_state": {},
103
- "created": "$(date -u +%Y-%m-%d)",
104
- "updated": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
106
+ "created": "YYYY-MM-DD",
107
+ "updated": "YYYY-MM-DDTHH:MM:SSZ"
105
108
  }
106
- JSON
107
- echo "$SPEC_NAME" > .flow/.active-spec
108
109
  ```
109
110
 
110
111
  If `GOAL` is empty, `AskUserQuestion` to gather it before writing `.state.json`.
111
112
 
112
113
  Then seed a minimal `.progress.md`:
113
114
 
114
- ```bash
115
- cat > ".flow/specs/$SPEC_NAME/.progress.md" <<MD
115
+ Use the `Write` tool for `.flow/specs/$SPEC_NAME/.progress.md`:
116
+
117
+ ```markdown
116
118
  # Progress Log — $SPEC_NAME
117
119
 
118
120
  **Goal**: $GOAL
119
121
  **Mode**: $FLAG_MODE
120
- **Created**: $(date -u +%Y-%m-%d)
122
+ **Created**: YYYY-MM-DD
121
123
 
122
124
  ## Decisions
123
125
  (populated during /curdx-flow:spec)
124
126
 
125
127
  ## Learnings
126
128
  (populated during /curdx-flow:implement)
127
- MD
128
129
  ```
129
130
 
130
131
  ### Branch E: no args, no flags
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: status
3
+ description: Show CurdX-Flow project/spec status, active spec, phase, task progress, artifacts, and recovery hints.
4
+ when_to_use: Use when the user asks what is active, which phase a spec is in, what artifacts exist, or how to recover from interrupted execution.
5
+ argument-hint: "[--all]"
6
+ disable-model-invocation: true
7
+ allowed-tools: [Read, Bash, Glob]
8
+ ---
9
+
10
+ # CurdX-Flow Status
11
+
12
+ Show a compact, read-only status summary for the current project.
13
+
14
+ ## Preconditions
15
+
16
+ ```bash
17
+ [ ! -d ".flow" ] && { echo "✗ Not a CurdX-Flow project. Run /curdx-flow:init first."; exit 1; }
18
+ ```
19
+
20
+ ## Gather
21
+
22
+ 1. Read `.flow/.active-spec` if present.
23
+ 2. List `.flow/specs/*/` directories.
24
+ 3. For each spec, check artifacts:
25
+ - `research.md`
26
+ - `requirements.md`
27
+ - `design.md`
28
+ - `tasks.md`
29
+ - `verification-report.md`
30
+ - `review-report.md`
31
+ 4. If `.state.json` exists, read:
32
+ - `phase`
33
+ - `strategy`
34
+ - `phase_status`
35
+ - `execute_state.task_index`
36
+ - `execute_state.total_tasks`
37
+ - `execute_state.failed_attempts`
38
+ - `execute_state.global_iteration`
39
+ 5. If `tasks.md` exists, count:
40
+ - completed tasks: lines matching `- [x] **`
41
+ - open tasks: lines matching `- [ ] **`
42
+
43
+ ## Output Format
44
+
45
+ ```markdown
46
+ # CurDX-Flow Status
47
+
48
+ Project: <cwd>
49
+ Active spec: <name | none>
50
+
51
+ ## Specs
52
+
53
+ ### <spec-name> [ACTIVE]
54
+ Phase: <phase | unknown>
55
+ Strategy: <strategy | auto>
56
+ Tasks: <done>/<total from tasks.md> checked, state cursor <task_index>/<total_tasks>
57
+ Failures: <failed_attempts>, rounds: <global_iteration>
58
+ Artifacts: [x] research [x] requirements [x] design [x] tasks [ ] verify [ ] review
59
+ Health: OK | NEEDS_ATTENTION
60
+ Recovery: <one concrete next command>
61
+ ```
62
+
63
+ ## Health Rules
64
+
65
+ - `OK`: state and tasks agree, no failed attempts, no missing current-phase artifact.
66
+ - `NEEDS_ATTENTION`: any of these:
67
+ - `.state.json` says execute complete but `tasks.md` has open tasks.
68
+ - failed attempts > 0.
69
+ - active spec points to a missing directory.
70
+ - current phase's expected artifact is missing or too small.
71
+
72
+ ## Recovery Hints
73
+
74
+ - No `.flow/`: `/curdx-flow:init`
75
+ - No active spec: `/curdx-flow:start <name> "<goal>"`
76
+ - In spec phase with missing artifact: `/curdx-flow:spec --resume`
77
+ - Execute in progress: `/curdx-flow:implement --task=next`
78
+ - Stop-hook appears stuck: `/curdx-flow:cancel` then `/curdx-flow:implement --strategy=subagent`
79
+ - Verify missing after execute complete: `/curdx-flow:verify`
80
+ - Review missing after verify pass: `/curdx-flow:review`
81
+
82
+ ## Strictness
83
+
84
+ - Read-only. Do not modify files.
85
+ - Do not claim a spec is complete from `.state.json` alone; compare `tasks.md` checkboxes.
@@ -1,7 +1,16 @@
1
1
  ---
2
2
  name: ui-sketch
3
- description: Invoke when the user wants UI design drafts — components, layouts, variants, mockups, CSS/theme/styling decisions. Triggers on "design UI", "UI design", "component layout", "variants", "wireframe", "mockup", "prototype", "sketch", "draft layout", "visual design", "styling", "CSS", "theming", "dark mode", "responsive design", "color scheme", "build me a UI", "show several variants", "try different colors".
4
- allowed-tools: [Read, Write, Bash, WebSearch]
3
+ description: Use when the user needs UI design drafts, layout variants, mockups, prototypes, or styling direction.
4
+ when_to_use: Triggers on "design UI", "UI design", "component layout", "variants", "wireframe", "mockup", "prototype", "sketch", "draft layout", "visual design", "styling", "CSS", "theming", "dark mode", "responsive design", "color scheme", "build me a UI", "show several variants", "try different colors".
5
+ argument-hint: "\"<screen or component brief>\""
6
+ context: fork
7
+ agent: flow-ux-designer
8
+ paths:
9
+ - "**/*.{html,css,scss,sass,less,js,jsx,ts,tsx,vue,svelte,astro}"
10
+ - "app/**"
11
+ - "pages/**"
12
+ - "components/**"
13
+ - "public/**"
5
14
  ---
6
15
 
7
16
  # UI Sketch
@@ -23,9 +32,9 @@ Confirm with the user:
23
32
  - **Must-haves** (brand colors / existing design system / responsive breakpoints)
24
33
  - **Variant count** (default: 3 variants with distinct design directions)
25
34
 
26
- ### Step 2: Dispatch `flow-ux-designer`
35
+ ### Step 2: Run via `flow-ux-designer`
27
36
 
28
- Delegate to the `flow-ux-designer` agent with the brief. It will:
37
+ This skill executes in a forked context through `flow-ux-designer`. It will:
29
38
  1. Invoke the `frontend-design` skill with the brief
30
39
  2. Generate N variant HTML/JSX files under `.flow/specs/<active>/sketches/`
31
40
  3. For each variant, produce a rationale: typography, color, layout decisions
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  name: verify
3
- description: Goal-backward verification trace from every FR / AC / AD in the active spec to the code and tests, detect stubs and fake completions. The differentiator command. Optionally adds multi-source coverage audit with --strict.
3
+ description: Prove the active spec is truly implemented by tracing every FR, AC, and AD to code and tests. Optional --strict adds multi-source coverage audit.
4
+ when_to_use: Use when implementation is done and the user wants proof that FRs, ACs, and ADs are actually satisfied rather than merely claimed complete.
4
5
  argument-hint: "[--strict]"
6
+ disable-model-invocation: true
5
7
  context: fork
6
8
  agent: flow-verifier
7
9
  ---
@@ -35,7 +37,7 @@ For EACH assertion in the spec, walk goal-backward:
35
37
  2. For **code-only**: grep the codebase for matching symbols, find the
36
38
  implementing file + line, find a test that exercises it, run the test
37
39
  (`npm test` or the declared `Verify` command), capture pass/fail.
38
- 3. For **UI-facing**: browser verification via `mcp__chrome-devtools__*`
40
+ 3. For **UI-facing**: browser verification via `mcp__chrome_devtools__*`
39
41
  is required. `jsdom` / `happy-dom` unit tests are insufficient. If the
40
42
  browser MCP isn't available, mark the AC **unverified — browser MCP
41
43
  missing** and include a CRITICAL section in the report; do NOT
@@ -48,8 +50,17 @@ Also scan for **stub / fake-completion** patterns on FR-covered paths:
48
50
  - tests with only `it.skip(...)` or no assertions
49
51
  - code returning mocked fixtures instead of calling real collaborators
50
52
 
53
+ Apply `@${CLAUDE_PLUGIN_ROOT}/gates/test-quality-gate.md` to every test used as evidence. Mock-heavy tests are acceptable only when they mock boundaries while asserting real behavior, or when separate integration/e2e coverage exists. Mock-only tests, skipped tests, assertion-free tests, and tests without cleanup for stateful mocks cannot be the sole evidence for an FR/AC.
54
+
51
55
  Run the per-task `Verify` commands from `tasks.md` and record pass/fail.
52
56
 
57
+ For fix/debug specs, also verify reality evidence:
58
+
59
+ - `.progress.md` must contain `Reality Check (BEFORE)` with a reproduction command and observed failure.
60
+ - `.progress.md` must contain `Reality Check (AFTER)` with the same command rerun and an explicit comparison.
61
+ - `Verified: Issue resolved` is valid only if AFTER proves the original observed failure disappeared.
62
+ - If the spec has fix/debug language but no `VF` task or BEFORE/AFTER evidence, mark the verdict `PARTIAL` even if all tests pass.
63
+
53
64
  ## --strict mode
54
65
 
55
66
  When `$ARGUMENTS` contains `--strict`, also apply the multi-source coverage
@@ -83,6 +94,8 @@ Per `@${CLAUDE_PLUGIN_ROOT}/gates/verification-gate.md`:
83
94
 
84
95
  - Any `STUB` or `MISSING` finding on a non-deferred FR blocks completion.
85
96
  - Any failing Verify command blocks completion.
97
+ - Missing fix/debug BEFORE/AFTER reality verification blocks a full PASS.
98
+ - Any FR/AC supported only by mock-only/skipped/assertion-free tests blocks a full PASS.
86
99
  - Waive only with an explicit D-NN decision logged in `.flow/STATE.md`.
87
100
 
88
101
  ## Output to user (≤ 5 lines after Write succeeds)
@@ -50,4 +50,4 @@
50
50
 
51
51
  ---
52
52
 
53
- _Generated by `/flow-init` on {{CREATED_DATE}}. Update to match your actual preferences._
53
+ _Generated by `/curdx-flow:init` on {{CREATED_DATE}}. Update to match your actual preferences._
@@ -56,4 +56,4 @@ TODO:
56
56
 
57
57
  ---
58
58
 
59
- _Generated by `/flow-init` on {{CREATED_DATE}}. Maintainer: {{USER_NAME}}_
59
+ _Generated by `/curdx-flow:init` on {{CREATED_DATE}}. Maintainer: {{USER_NAME}}_
@@ -2,13 +2,17 @@
2
2
  "$schema": "https://raw.githubusercontent.com/wdx/curdx-flow/main/schemas/config.schema.json",
3
3
  "version": "1.0",
4
4
  "mode": "standard",
5
- "_mode_options": "sketch | fast | standard | enterprise | autonomous",
5
+ "_mode_options": "fast | standard | enterprise",
6
6
 
7
7
  "execution": {
8
8
  "strategy": "auto",
9
9
  "_strategy_options": "auto | subagent | stop-hook | wave | linear",
10
10
  "max_parallel": 5,
11
- "subagent_threshold": 8
11
+ "subagent_threshold": 8,
12
+ "wave_fail_policy": "continue-on-single",
13
+ "recovery_mode": "manual",
14
+ "_recovery_mode_options": "manual | fix-task",
15
+ "max_fix_tasks_per_original": 2
12
16
  },
13
17
 
14
18
  "gates": {
@@ -18,14 +22,13 @@
18
22
  ],
19
23
  "standard_mode": [
20
24
  "tdd-gate",
21
- "coverage-audit-gate",
22
- "simplicity-gate"
25
+ "coverage-audit-gate"
23
26
  ],
24
27
  "enterprise_mode": [
25
28
  "adversarial-review-gate",
26
29
  "edge-case-gate",
27
- "hard-gate",
28
- "security-gate"
30
+ "security-gate",
31
+ "devex-gate"
29
32
  ]
30
33
  },
31
34
 
@@ -16,6 +16,25 @@
16
16
  - Current task: N/A (tasks phase not yet entered)
17
17
  - Blockers: none
18
18
 
19
+ ## Reality Check (BEFORE)
20
+
21
+ <!-- For fix/debug specs only: capture the original failure before changing code. -->
22
+
23
+ **Goal type**: N/A
24
+ **Reproduction command**: N/A
25
+ **Failure observed**: N/A
26
+ **Output**: N/A
27
+ **Timestamp**: N/A
28
+
29
+ ## Reality Check (AFTER)
30
+
31
+ <!-- For fix/debug specs only: rerun the same command after the fix and compare. -->
32
+
33
+ **Command**: N/A
34
+ **Result**: N/A
35
+ **Comparison**: N/A
36
+ **Verified**: N/A
37
+
19
38
  ## Completed Tasks
20
39
 
21
40
  <!-- List of completed tasks -->
@@ -45,7 +64,7 @@ _(none)_
45
64
 
46
65
  <!-- What to do next. Must be filled in before ending the session. -->
47
66
 
48
- - [ ] Enter the research phase: run `/flow-research`
67
+ - [ ] Enter the research phase: run `/curdx-flow:spec --phase=research`
49
68
 
50
69
  ## Questions for User
51
70
 
@@ -55,4 +74,4 @@ _(none)_
55
74
 
56
75
  ---
57
76
 
58
- _Spec initialized on {{CREATED_DATE}}._
77
+ _Spec initialized by `/curdx-flow:start` on {{CREATED_DATE}}._
@@ -9,7 +9,7 @@ depends_on: design.md
9
9
 
10
10
  # Task Breakdown: {{SPEC_NAME}}
11
11
 
12
- > POC-First is an **orientation, not a mandate**. Use the phases below as an organizing idea and **delete phases that don't apply to this feature**. A bug-fix may be one task. A prototype may skip Phase 2 (refactor) and Phase 5 (PR lifecycle). A library may skip the PR lifecycle entirely. Forcing all five phases for a small feature is the padding pattern this template is designed to prevent.
12
+ > POC-First is an **orientation, not a mandate**. Use the phases below as an organizing idea and **delete phases that don't apply to this feature**. A bug-fix may be one task. A prototype may skip Phase 2 (refactor) and Phase 5 (evidence handoff). A library may skip the handoff phase entirely. Forcing all five phases for a small feature is the padding pattern this template is designed to prevent.
13
13
  >
14
14
  > Each task includes whatever of `Do`, `Files`, `Done-when`, `Verify`, `Commit` is needed for the executor to finish it in a single sub-agent dispatch. Verify must be an automated command (no "manual test").
15
15
 
@@ -21,6 +21,13 @@ depends_on: design.md
21
21
  - `[P]` parallel-safe (dispatch in parallel within the same wave)
22
22
  - `[VERIFY]` quality checkpoint (flow-verifier agent)
23
23
  - `[SEQUENTIAL]` must be serial (breaks the parallel group)
24
+ - `VF` reality verification task for fix/debug specs (BEFORE failure → AFTER pass)
25
+
26
+ ---
27
+
28
+ ## Split Rule
29
+
30
+ If a task proves too broad or unsafe during execution, the executor must stop with `TASK_FAILED` and propose up to 3 smaller replacement tasks. The coordinator updates this file; executors do not invent and execute new tasks in the same turn.
24
31
 
25
32
  ---
26
33
 
@@ -49,23 +56,39 @@ depends_on: design.md
49
56
  ## Phase 3: Testing (TDD red / green / yellow)
50
57
 
51
58
  > Rule: tests first. Red → Green → Yellow. **Collapse red+green into one task when the test and implementation are trivially paired**; split only when the test genuinely precedes a nontrivial implementation.
59
+ > Test quality: primary FR/AC evidence must exercise real behavior. Mock-only, skipped, or assertion-free tests do not count unless backed by integration/e2e coverage or an explicit D-NN waiver.
52
60
 
53
61
  - [ ] **3.X** [RED→GREEN→YELLOW] ...
54
62
 
55
63
  - [ ] **3.X+1** [VERIFY] Coverage check
56
64
  - **Verify**: coverage on the changed surface ≥ project standard
57
65
 
66
+ - [ ] **3.X+2** [VERIFY] Test quality check
67
+ - **Do**: apply `test-quality-gate` to tests used as FR/AC evidence
68
+ - **Done when**: no FR/AC depends solely on mock-only/skipped/assertion-free tests
69
+ - **Verify**: `<test command>` plus grep scan for skipped tests / mock-only evidence
70
+
58
71
  ## Phase 4: Quality Gates
59
72
 
60
73
  > Include only the checks this project actually runs. `npx eslint` is dead weight if the project uses biome. `tsc --strict` is dead weight for a JS project.
61
74
 
75
+ - [ ] **4.VF** [VERIFY] VF: Verify original issue resolved (fix/debug specs only)
76
+ - **Do**: 1. Read `Reality Check (BEFORE)` in `.progress.md`; 2. Re-run the same reproduction command; 3. Append `Reality Check (AFTER)` with output and comparison
77
+ - **Files**: `.flow/specs/{{SPEC_NAME}}/.progress.md`
78
+ - **Done when**: AFTER proves the original observed failure is gone
79
+ - **Verify**: `grep -q "Verified: Issue resolved" .flow/specs/{{SPEC_NAME}}/.progress.md`
80
+ - **Commit**: `chore({{SPEC_NAME}}): verify original issue resolved`
81
+
62
82
  - [ ] **4.X** [VERIFY] Final health check
63
83
  - **Do**: flow-verifier performs goal-driven reverse verification
64
84
  - **Done when**: every FR/AC has an automated check
65
85
 
66
- ## Phase 5: PR Lifecycle (delete for local-only work, scripts, internal tools without a PR flow)
86
+ ## Phase 5: Evidence Handoff (delete for local-only work, scripts, internal tools without a PR flow)
67
87
 
68
- - [ ] **5.X** Ship / Land
88
+ - [ ] **5.X** Prepare verification/review handoff
89
+ - **Do**: collect atomic commits, verification report, review report, and residual risk notes
90
+ - **Done when**: a human can open or release with clear evidence and no hidden blockers
91
+ - **Verify**: `test -f .flow/specs/{{SPEC_NAME}}/verification-report.md && test -f .flow/specs/{{SPEC_NAME}}/review-report.md`
69
92
 
70
93
  ---
71
94