@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
@@ -0,0 +1,57 @@
1
+ # Review Feedback Intake — Verify Before Changing
2
+
3
+ CurDX-Flow treats review feedback as technical input, not orders to blindly implement. The goal is to fix real issues while avoiding scope creep, regressions, and performative agreement.
4
+
5
+ ## Intake Pattern
6
+
7
+ For each review item:
8
+
9
+ 1. **Read** the full finding, including severity, evidence, and suggested fix.
10
+ 2. **Restate** the technical requirement in one sentence.
11
+ 3. **Verify** against the codebase/spec:
12
+ - Is the finding true at the referenced path/line?
13
+ - Does it violate an FR, AC, AD, gate, test, or user decision?
14
+ - Does the suggested fix break existing behavior or platform constraints?
15
+ 4. **Classify**:
16
+ - `BLOCKER`: correctness, security, missing requirement, failing verify, broken CI.
17
+ - `IMPORTANT`: maintainability or test gap that should be fixed before ship.
18
+ - `SUGGESTION`: non-blocking improvement or preference.
19
+ - `PUSHBACK`: technically wrong, violates YAGNI, conflicts with D-NN, or lacks evidence.
20
+ 5. **Act one item at a time**:
21
+ - Fix blockers first.
22
+ - Run the smallest relevant verification after each fix.
23
+ - Record pushback with evidence instead of silently ignoring it.
24
+
25
+ ## Required Artifact
26
+
27
+ When review produces any nontrivial feedback, append a section to `.flow/specs/<active>/.progress.md`:
28
+
29
+ ```markdown
30
+ ## Review Feedback Intake YYYY-MM-DD
31
+
32
+ | Item | Source | Classification | Decision | Evidence | Follow-up |
33
+ |---|---|---|---|---|---|
34
+ | R-01 | review-report.md#... | BLOCKER | fix | `npm test` fails AC-2.1 | Task 4.4 |
35
+ | R-02 | review-report.md#... | PUSHBACK | defer | D-07 says no CSV export | none |
36
+ ```
37
+
38
+ ## Pushback Rules
39
+
40
+ Push back when the feedback:
41
+
42
+ - Adds unused features or speculative architecture.
43
+ - Conflicts with explicit user decisions (`D-NN`).
44
+ - Breaks compatibility that the current code intentionally preserves.
45
+ - Is unsupported by evidence and cannot be reproduced.
46
+ - Optimizes style while leaving spec compliance unresolved.
47
+
48
+ Pushback must be technical: cite code, tests, specs, or decisions. Do not use emotional language.
49
+
50
+ ## Fix Loop
51
+
52
+ 1. Intake review items.
53
+ 2. Convert accepted blockers/important issues into tasks or direct fixes.
54
+ 3. Run targeted verification per item.
55
+ 4. Re-run `/curdx-flow:verify` when behavior changed.
56
+ 5. Re-run `/curdx-flow:review` until blockers are gone.
57
+
@@ -111,13 +111,20 @@ Stage 2 applies all enabled Gates (from `.flow/config.json`):
111
111
 
112
112
  - All 4 sources (FR / AD / Research / Decisions) covered?
113
113
 
114
- #### 2.5 (enterprise) Adversarial review (adversarial-review-gate)
114
+ #### 2.5 Test quality (test-quality-gate)
115
+
116
+ - Do tests used as FR/AC evidence exercise real behavior, not only mocks/spies?
117
+ - Are skipped/assertion-free tests excluded from evidence?
118
+ - Are mock-heavy tests backed by integration/e2e coverage or a documented boundary rationale?
119
+ - Are stateful mocks cleaned up between tests?
120
+
121
+ #### 2.6 (enterprise) Adversarial review (adversarial-review-gate)
115
122
 
116
123
  - Every applicable category examined (N/A documented for the rest)?
117
124
  - Findings proportional to real issues (zero is OK with a proof-of-checking report)?
118
125
  - Each finding has evidence + recommendation?
119
126
 
120
- #### 2.6 (enterprise) Edge cases (edge-case-gate)
127
+ #### 2.7 (enterprise) Edge cases (edge-case-gate)
121
128
 
122
129
  - Each applicable edge-case category addressed (N/A noted for the rest)?
123
130
  - Gap list has priorities?
@@ -168,9 +175,15 @@ When the review turns up issues, the typical flow:
168
175
 
169
176
  4. /curdx-flow:review re-review
170
177
 
171
- 5. Until APPROVED → /curdx-flow:ship
178
+ 5. Until APPROVED → hand off with review-report.md + atomic commits
172
179
  ```
173
180
 
181
+ Before implementing review feedback, apply `@${CLAUDE_PLUGIN_ROOT}/knowledge/review-feedback-intake.md`:
182
+ - Verify each finding against code/spec reality.
183
+ - Classify as `BLOCKER`, `IMPORTANT`, `SUGGESTION`, or `PUSHBACK`.
184
+ - Fix accepted items one at a time with targeted verification.
185
+ - Record technical pushback in `.progress.md` instead of silently ignoring feedback.
186
+
174
187
  ---
175
188
 
176
189
  ## Failure Modes of Two Stages
@@ -219,15 +232,15 @@ Some reviewers list 50 minor improvements — the user can't process.
219
232
  ↓ ↓
220
233
  ↓ review-report.md
221
234
 
222
- (optional) /curdx-flow:verify --strict → adversarial review + edge cases
235
+ (optional) /curdx-flow:review --adversarial --edge-case
223
236
 
224
237
  adversarial-review.md
225
238
  edge-cases.md
226
239
 
227
- /curdx-flow:ship → PR (Phase 6+)
240
+ Ready for human PR/release handoff with verification + review evidence
228
241
  ```
229
242
 
230
- Verify is "did we implement the right thing", Review is "is the implementation good", Audit is "what else could be better".
243
+ Verify is "did we implement the right thing", Review is "is the implementation good", Audit is "what else could be better". CurdX-Flow currently stops at evidence-backed handoff; do not reference non-existent ship/land commands.
231
244
 
232
245
  ---
233
246
 
@@ -1,6 +1,6 @@
1
1
  # Wave Execution — DAG Parallel Execution Strategy
2
2
 
3
- > One of Phase 2's 4 execution strategies. Identify parallel-safe task groups via `[P]` markers, dispatch multiple Task tool calls **in a single message**, run in parallel within a wave and serially across waves.
3
+ > One of Phase 2's 4 execution strategies. Identify parallel-safe task groups via `[P]` markers, dispatch multiple Agent tool calls **in a single message**, run in parallel within a wave and serially across waves.
4
4
  >
5
5
  > Agents reference this via `@${CLAUDE_PLUGIN_ROOT}/knowledge/wave-execution.md`.
6
6
 
@@ -12,6 +12,12 @@
12
12
 
13
13
  A wave is **a consecutive run of `[P]`-marked tasks**. Within a wave, run in parallel; across waves, run serially.
14
14
 
15
+ Hard limits:
16
+ - Max 5 tasks per wave (`max_parallel` ceiling). More than 5 tasks must be split by a `[VERIFY]` checkpoint or a serial boundary.
17
+ - Every task in a wave owns a disjoint `Files` set.
18
+ - Shared config/barrel/registry files are serial by default: `package.json`, lockfiles, `tsconfig.*`, `index.ts`, router registries, migration manifests, generated schema registries.
19
+ - Read-after-write is a conflict even when file paths differ: if task B imports, tests, or configures output from task A, B must run in a later wave.
20
+
15
21
  ```
16
22
  tasks.md:
17
23
  1.1 [P] create auth directory
@@ -23,10 +29,10 @@ tasks.md:
23
29
  1.7 [P] add README to user
24
30
 
25
31
  Analysis:
26
- Wave 1: { 1.1, 1.2, 1.3 } — parallel (3 Tasks)
32
+ Wave 1: { 1.1, 1.2, 1.3 } — parallel (3 Agent calls)
27
33
  Wave 2: { 1.4 } — serial (VERIFY breaks)
28
34
  Wave 3: { 1.5 } — serial (no [P])
29
- Wave 4: { 1.6, 1.7 } — parallel (2 Tasks)
35
+ Wave 4: { 1.6, 1.7 } — parallel (2 Agent calls)
30
36
  ```
31
37
 
32
38
  ---
@@ -82,9 +88,13 @@ def analyze_waves(tasks):
82
88
  def has_file_conflict(task, wave):
83
89
  """Do task's Files intersect any wave task's Files?"""
84
90
  task_files = set(task.files)
91
+ if touches_shared_serial_surface(task_files):
92
+ return True
85
93
  for other in wave:
86
94
  if task_files & set(other.files):
87
95
  return True
96
+ if has_read_after_write_dependency(task, other):
97
+ return True
88
98
  return False
89
99
  ```
90
100
 
@@ -92,14 +102,15 @@ Rules:
92
102
  - Two `[P]` tasks editing the same file → conflict, must split into different waves
93
103
  - Two `[P]` tasks creating different files → OK
94
104
  - One reads what another writes → **conflict** (reads aren't guaranteed to see latest)
105
+ - More than 5 `[P]` tasks in one consecutive run → split the wave before dispatch
95
106
 
96
107
  ---
97
108
 
98
- ## How Parallel Task Dispatch Actually Works
109
+ ## How Parallel Agent Dispatch Actually Works
99
110
 
100
- ### Key: multiple Task tool calls in a single message
111
+ ### Key: multiple Agent tool calls in a single message
101
112
 
102
- Claude Code's Task tool runs in parallel **when multiple calls appear in the same message**.
113
+ Claude Code's Agent tool runs in parallel **when multiple calls appear in the same message**.
103
114
  Across **separate messages** → runs sequentially.
104
115
 
105
116
  ### Correct form (Wave strategy)
@@ -107,9 +118,9 @@ Across **separate messages** → runs sequentially.
107
118
  ```
108
119
  # In a single main-agent response:
109
120
 
110
- Task(description="Task 1.1", prompt="...execute 1.1...")
111
- Task(description="Task 1.2", prompt="...execute 1.2...")
112
- Task(description="Task 1.3", prompt="...execute 1.3...")
121
+ Agent(description="Task 1.1", prompt="...execute 1.1...")
122
+ Agent(description="Task 1.2", prompt="...execute 1.2...")
123
+ Agent(description="Task 1.3", prompt="...execute 1.3...")
113
124
 
114
125
  # Wait for all to return before continuing to the next wave
115
126
  ```
@@ -118,13 +129,13 @@ Task(description="Task 1.3", prompt="...execute 1.3...")
118
129
 
119
130
  ```
120
131
  # One response:
121
- Task(description="Task 1.1", ...)
132
+ Agent(description="Task 1.1", ...)
122
133
  # wait for return
123
134
  # Next response:
124
- Task(description="Task 1.2", ...)
135
+ Agent(description="Task 1.2", ...)
125
136
  # wait for return
126
137
  # Next response:
127
- Task(description="Task 1.3", ...)
138
+ Agent(description="Task 1.3", ...)
128
139
  ```
129
140
 
130
141
  This is not parallel — it's serial subagent. The Wave strategy loses its meaning.
@@ -142,9 +153,9 @@ for wave_index, wave in enumerate(waves):
142
153
  echo " • $task.id $task.title"
143
154
 
144
155
  # === Step 2: dispatch (key: within a single message) ===
145
- # This is the main agent's response body. Call N Task tools at once.
156
+ # This is the main agent's response body. Call N Agent tools at once.
146
157
  results = await asyncio.gather([
147
- Task(
158
+ Agent(
148
159
  description=f"execute {task.id}",
149
160
  prompt=f"""
150
161
  You are the flow-executor agent.
@@ -193,7 +204,7 @@ for wave_index, wave in enumerate(waves):
193
204
  return
194
205
 
195
206
  # === Step 6: inter-wave synchronization point ===
196
- # All Tasks complete = wave ends
207
+ # All Agent calls complete = wave ends
197
208
  # Before next wave starts, confirm git state is consistent
198
209
 
199
210
  # All waves done
@@ -320,7 +331,7 @@ Progress: Wave 2/5 (60%)
320
331
 
321
332
  ### Ctrl+C interruption
322
333
 
323
- - Running Task calls in the current wave keep going (Claude Code's Task is an independent process)
334
+ - Running Agent calls in the current wave keep going (Claude Code's Agent tool starts independent work)
324
335
  - Next `/curdx-flow:start --resume` shows some tasks already committed
325
336
  - Resume from the failing task
326
337
 
@@ -335,13 +346,17 @@ Progress: Wave 2/5 (60%)
335
346
  "execution": {
336
347
  "strategy": "wave",
337
348
  "max_parallel": 5,
338
- "wave_fail_policy": "continue-on-single | stop-on-any"
349
+ "wave_fail_policy": "continue-on-single | stop-on-any",
350
+ "recovery_mode": "manual | fix-task",
351
+ "max_fix_tasks_per_original": 2
339
352
  }
340
353
  }
341
354
  ```
342
355
 
343
356
  - `max_parallel`: maximum parallel tasks per wave (default 5, to avoid API rate limits)
344
357
  - `wave_fail_policy`: default behavior on single task failure
358
+ - `recovery_mode`: whether a failed wave task blocks for manual retry or creates a targeted `[FIX <task_id>]` task before retry
359
+ - `max_fix_tasks_per_original`: maximum fix tasks generated for one original task
345
360
 
346
361
  ---
347
362
 
@@ -372,7 +387,7 @@ If the planner missed a dependency, `[P]` may be wrong. Solutions:
372
387
 
373
388
  ### 2. A wave too large
374
389
 
375
- 10+ parallel Tasks may trigger API rate limits or context pressure. Solutions:
390
+ 10+ parallel Agent calls may trigger API rate limits or context pressure. Solutions:
376
391
  - `max_parallel: 5` splits a big wave into several
377
392
  - flow-planner avoids making waves too large when generating
378
393
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: CurdX Evidence-First
3
+ description: Concise, engineering-focused replies with explicit validation status, assumptions, and next actions.
4
+ keep-coding-instructions: true
5
+ ---
6
+
7
+ # CurdX Evidence-First
8
+
9
+ You are still Claude Code. Keep the default coding workflow, safety rules,
10
+ tool usage behavior, and verification discipline.
11
+
12
+ ## Response priorities
13
+
14
+ 1. Lead with the concrete outcome or current state.
15
+ 2. State validation status explicitly:
16
+ - `Validated` when you actually ran checks and they passed
17
+ - `Unvalidated` when you did not run checks yet
18
+ - `Blocked` when validation could not be completed
19
+ 3. Separate observed facts from assumptions or proposals.
20
+ 4. Keep answers concise and operational; avoid filler and cheerleading.
21
+ 5. When work is incomplete, state the next highest-value action plainly.
22
+
23
+ ## Completion discipline
24
+
25
+ - Never imply something is done without evidence.
26
+ - If tests, builds, browser checks, or docs validation were not run, say so directly.
27
+ - If you are making a best-effort inference, label it as an inference.
28
+ - When relevant, point to the exact file paths or commands that support the claim.
29
+
30
+ ## Formatting
31
+
32
+ - Use short section headers only when they improve scanability.
33
+ - Prefer short bullet lists over long prose.
34
+ - Match the user's language.
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "2.1.0",
3
+ "version": "2.2.3",
4
4
  "description": "CLI installer for CurdX-Flow — AI engineering workflow meta-framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "curdx-flow": "bin/curdx-flow.js"
8
8
  },
9
9
  "scripts": {
10
+ "validate:contracts": "node scripts/validate-plugin-contracts.mjs",
10
11
  "test": "node --test test/*.test.js",
11
- "prepublishOnly": "node --test test/*.test.js && node bin/curdx-flow.js --version"
12
+ "prepublishOnly": "npm run validate:contracts && node --test test/*.test.js && node bin/curdx-flow.js --version"
12
13
  },
13
14
  "files": [
14
15
  "bin/",
@@ -19,9 +20,11 @@
19
20
  "hooks/",
20
21
  "knowledge/",
21
22
  "agent-preamble/",
23
+ "output-styles/",
22
24
  "templates/",
23
25
  "schemas/",
24
26
  "skills/",
27
+ "settings.json",
25
28
  "README.md",
26
29
  "CHANGELOG.md",
27
30
  "LICENSE"
@@ -47,5 +50,9 @@
47
50
  "dependencies": {
48
51
  "@clack/prompts": "^0.8.2",
49
52
  "picocolors": "^1.1.1"
53
+ },
54
+ "devDependencies": {
55
+ "ajv": "^8.18.0",
56
+ "yaml": "^2.8.3"
50
57
  }
51
58
  }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://curdx-flow.dev/schemas/agent-frontmatter.schema.json",
4
+ "title": "CurdX-Flow Agent Frontmatter",
5
+ "description": "Supported YAML frontmatter fields for agents/*.md plugin subagent definitions.",
6
+ "type": "object",
7
+ "required": ["name", "description"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "tools": {
19
+ "oneOf": [
20
+ { "type": "string" },
21
+ { "type": "array", "items": { "type": "string" } }
22
+ ]
23
+ },
24
+ "disallowedTools": {
25
+ "oneOf": [
26
+ { "type": "string" },
27
+ { "type": "array", "items": { "type": "string" } }
28
+ ]
29
+ },
30
+ "model": {
31
+ "type": "string"
32
+ },
33
+ "effort": {
34
+ "type": "string",
35
+ "enum": ["low", "medium", "high", "xhigh", "max"]
36
+ },
37
+ "maxTurns": {
38
+ "type": "integer",
39
+ "minimum": 1
40
+ },
41
+ "skills": {
42
+ "oneOf": [
43
+ { "type": "string" },
44
+ { "type": "array", "items": { "type": "string" } }
45
+ ]
46
+ },
47
+ "memory": {
48
+ "type": "string",
49
+ "enum": ["user", "project", "local"]
50
+ },
51
+ "background": {
52
+ "type": "boolean"
53
+ },
54
+ "isolation": {
55
+ "type": "string",
56
+ "enum": ["worktree"]
57
+ }
58
+ }
59
+ }
@@ -35,6 +35,24 @@
35
35
  "minimum": 1,
36
36
  "default": 8,
37
37
  "description": "Task count above which subagent strategy is preferred"
38
+ },
39
+ "wave_fail_policy": {
40
+ "type": "string",
41
+ "enum": ["continue-on-single", "stop-on-any"],
42
+ "default": "continue-on-single"
43
+ },
44
+ "recovery_mode": {
45
+ "type": "string",
46
+ "enum": ["manual", "fix-task"],
47
+ "default": "manual",
48
+ "description": "How /curdx-flow:implement handles TASK_FAILED during execution. manual blocks for retry; fix-task inserts targeted [FIX <task>] tasks before retrying."
49
+ },
50
+ "max_fix_tasks_per_original": {
51
+ "type": "integer",
52
+ "minimum": 1,
53
+ "maximum": 5,
54
+ "default": 2,
55
+ "description": "Maximum generated [FIX <task>] tasks allowed for a single original task when recovery_mode is fix-task."
38
56
  }
39
57
  }
40
58
  },
@@ -44,16 +62,16 @@
44
62
  "properties": {
45
63
  "always_on": {
46
64
  "type": "array",
47
- "items": { "type": "string" },
65
+ "items": { "$ref": "#/definitions/gateName" },
48
66
  "default": ["karpathy-gate", "verification-gate"]
49
67
  },
50
68
  "standard_mode": {
51
69
  "type": "array",
52
- "items": { "type": "string" }
70
+ "items": { "$ref": "#/definitions/gateName" }
53
71
  },
54
72
  "enterprise_mode": {
55
73
  "type": "array",
56
- "items": { "type": "string" }
74
+ "items": { "$ref": "#/definitions/gateName" }
57
75
  }
58
76
  }
59
77
  },
@@ -96,5 +114,21 @@
96
114
  "type": "string",
97
115
  "format": "date"
98
116
  }
117
+ },
118
+ "definitions": {
119
+ "gateName": {
120
+ "type": "string",
121
+ "enum": [
122
+ "karpathy-gate",
123
+ "verification-gate",
124
+ "tdd-gate",
125
+ "test-quality-gate",
126
+ "coverage-audit-gate",
127
+ "adversarial-review-gate",
128
+ "edge-case-gate",
129
+ "security-gate",
130
+ "devex-gate"
131
+ ]
132
+ }
99
133
  }
100
134
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://curdx-flow.dev/schemas/gate-frontmatter.schema.json",
4
+ "title": "CurdX-Flow Gate Frontmatter",
5
+ "description": "Supported YAML frontmatter fields for gates/*.md quality gate definitions.",
6
+ "type": "object",
7
+ "required": ["gate", "category", "severity", "depends_on"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "gate": {
11
+ "type": "string",
12
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
13
+ },
14
+ "category": {
15
+ "type": "string",
16
+ "enum": ["always-on", "standard-mode", "enterprise-mode"]
17
+ },
18
+ "severity": {
19
+ "type": "string",
20
+ "enum": ["blocking", "warning"]
21
+ },
22
+ "depends_on": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string",
26
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://curdx-flow.dev/schemas/hooks.schema.json",
4
+ "title": "CurdX-Flow Hook Configuration",
5
+ "description": "Supported event names and handler shape for hooks/hooks.json.",
6
+ "type": "object",
7
+ "required": ["hooks"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "hooks": {
11
+ "type": "object",
12
+ "propertyNames": {
13
+ "enum": [
14
+ "SessionStart",
15
+ "InstructionsLoaded",
16
+ "UserPromptSubmit",
17
+ "UserPromptExpansion",
18
+ "PreToolUse",
19
+ "PermissionRequest",
20
+ "PostToolUse",
21
+ "PostToolUseFailure",
22
+ "PostToolBatch",
23
+ "PermissionDenied",
24
+ "Notification",
25
+ "SubagentStart",
26
+ "SubagentStop",
27
+ "TaskCreated",
28
+ "TaskCompleted",
29
+ "Stop",
30
+ "StopFailure",
31
+ "TeammateIdle",
32
+ "ConfigChange",
33
+ "CwdChanged",
34
+ "FileChanged",
35
+ "WorktreeCreate",
36
+ "WorktreeRemove",
37
+ "PreCompact",
38
+ "PostCompact",
39
+ "Elicitation",
40
+ "ElicitationResult",
41
+ "SessionEnd"
42
+ ]
43
+ },
44
+ "additionalProperties": {
45
+ "type": "array",
46
+ "items": { "$ref": "#/definitions/matcherGroup" }
47
+ }
48
+ }
49
+ },
50
+ "definitions": {
51
+ "matcherGroup": {
52
+ "type": "object",
53
+ "required": ["hooks"],
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "matcher": { "type": "string" },
57
+ "hooks": {
58
+ "type": "array",
59
+ "items": { "$ref": "#/definitions/hookHandler" }
60
+ }
61
+ }
62
+ },
63
+ "hookHandler": {
64
+ "type": "object",
65
+ "required": ["type"],
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "type": {
69
+ "type": "string",
70
+ "enum": ["command", "http", "mcp_tool", "prompt", "agent"]
71
+ },
72
+ "if": { "type": "string" },
73
+ "timeout": { "type": "integer", "minimum": 1 },
74
+ "statusMessage": { "type": "string" },
75
+ "async": { "type": "boolean" },
76
+ "asyncRewake": { "type": "boolean" },
77
+ "once": { "type": "boolean" },
78
+ "command": { "type": "string" },
79
+ "shell": {
80
+ "type": "string",
81
+ "enum": ["bash", "powershell"]
82
+ },
83
+ "url": { "type": "string" },
84
+ "headers": { "type": "object" },
85
+ "allowedEnvVars": {
86
+ "type": "array",
87
+ "items": { "type": "string" }
88
+ },
89
+ "server": { "type": "string" },
90
+ "tool": { "type": "string" },
91
+ "input": { "type": "object" },
92
+ "prompt": { "type": "string" },
93
+ "model": { "type": "string" }
94
+ },
95
+ "allOf": [
96
+ {
97
+ "if": { "properties": { "type": { "const": "command" } } },
98
+ "then": { "required": ["command"] }
99
+ },
100
+ {
101
+ "if": { "properties": { "type": { "const": "http" } } },
102
+ "then": { "required": ["url"] }
103
+ },
104
+ {
105
+ "if": { "properties": { "type": { "const": "mcp_tool" } } },
106
+ "then": { "required": ["server", "tool"] }
107
+ },
108
+ {
109
+ "if": { "properties": { "type": { "enum": ["prompt", "agent"] } } },
110
+ "then": { "required": ["prompt"] }
111
+ }
112
+ ]
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://curdx-flow.dev/schemas/output-style-frontmatter.schema.json",
4
+ "title": "CurdX-Flow Output Style Frontmatter",
5
+ "description": "Supported YAML frontmatter fields for output-styles/*.md.",
6
+ "type": "object",
7
+ "required": ["name", "description", "keep-coding-instructions"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "minLength": 1
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "keep-coding-instructions": {
19
+ "type": "boolean"
20
+ }
21
+ }
22
+ }