@curdx/flow 2.2.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 (78) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +19 -2
  3. package/README.md +15 -8
  4. package/README.zh.md +5 -3
  5. package/agent-preamble/preamble.md +33 -0
  6. package/agents/flow-adversary.md +1 -1
  7. package/agents/flow-architect.md +2 -1
  8. package/agents/flow-brownfield-analyst.md +153 -0
  9. package/agents/flow-debugger.md +6 -11
  10. package/agents/flow-edge-hunter.md +1 -1
  11. package/agents/flow-executor.md +30 -8
  12. package/agents/flow-planner.md +38 -5
  13. package/agents/flow-product-designer.md +2 -1
  14. package/agents/flow-qa-engineer.md +9 -5
  15. package/agents/flow-researcher.md +2 -1
  16. package/agents/flow-reviewer.md +23 -5
  17. package/agents/flow-security-auditor.md +5 -3
  18. package/agents/flow-triage-analyst.md +5 -24
  19. package/agents/flow-ui-researcher.md +4 -3
  20. package/agents/flow-ux-designer.md +12 -39
  21. package/agents/flow-verifier.md +35 -3
  22. package/cli/README.md +3 -1
  23. package/cli/doctor-workflow.js +1074 -2
  24. package/cli/doctor.js +8 -0
  25. package/cli/help.js +2 -0
  26. package/cli/lib/doctor-report.js +256 -1
  27. package/cli/lib/frontmatter.js +44 -0
  28. package/cli/lib/json-schema.js +57 -0
  29. package/cli/lib/runtime.js +20 -2
  30. package/cli/utils.js +6 -1
  31. package/gates/adversarial-review-gate.md +1 -1
  32. package/gates/security-gate.md +2 -2
  33. package/gates/test-quality-gate.md +59 -0
  34. package/hooks/hooks.json +16 -2
  35. package/hooks/scripts/common.sh +4 -0
  36. package/hooks/scripts/session-start.sh +17 -2
  37. package/hooks/scripts/stop-watcher.sh +69 -18
  38. package/hooks/scripts/subagent-artifact-guard.sh +159 -0
  39. package/hooks/scripts/subagent-statusline.sh +105 -0
  40. package/knowledge/atomic-commits.md +1 -1
  41. package/knowledge/claude-code-runtime-contracts.md +203 -0
  42. package/knowledge/epic-decomposition.md +1 -1
  43. package/knowledge/execution-strategies.md +23 -1
  44. package/knowledge/planning-reviews.md +2 -2
  45. package/knowledge/poc-first-workflow.md +8 -8
  46. package/knowledge/review-feedback-intake.md +57 -0
  47. package/knowledge/two-stage-review.md +19 -6
  48. package/knowledge/wave-execution.md +16 -1
  49. package/output-styles/curdx-evidence-first.md +34 -0
  50. package/package.json +7 -1
  51. package/schemas/agent-frontmatter.schema.json +0 -7
  52. package/schemas/config.schema.json +14 -0
  53. package/schemas/hooks.schema.json +34 -2
  54. package/schemas/output-style-frontmatter.schema.json +22 -0
  55. package/schemas/plugin-manifest.schema.json +387 -17
  56. package/schemas/plugin-settings.schema.json +29 -0
  57. package/schemas/skill-frontmatter.schema.json +109 -4
  58. package/schemas/spec-state.schema.json +29 -4
  59. package/settings.json +6 -0
  60. package/skills/brownfield-index/SKILL.md +31 -35
  61. package/skills/browser-qa/SKILL.md +11 -3
  62. package/skills/cancel/SKILL.md +82 -0
  63. package/skills/debug/SKILL.md +6 -2
  64. package/skills/epic/SKILL.md +5 -3
  65. package/skills/fast/SKILL.md +1 -0
  66. package/skills/help/SKILL.md +17 -7
  67. package/skills/implement/SKILL.md +38 -7
  68. package/skills/init/SKILL.md +2 -1
  69. package/skills/review/SKILL.md +4 -1
  70. package/skills/security-audit/SKILL.md +17 -3
  71. package/skills/spec/SKILL.md +2 -1
  72. package/skills/start/SKILL.md +18 -18
  73. package/skills/status/SKILL.md +85 -0
  74. package/skills/ui-sketch/SKILL.md +11 -3
  75. package/skills/verify/SKILL.md +13 -1
  76. package/templates/config.json.tmpl +4 -1
  77. package/templates/progress.md.tmpl +19 -0
  78. package/templates/tasks.md.tmpl +26 -3
@@ -106,6 +106,8 @@ Or (default):
106
106
  - Main agent executes 1 task → ends naturally (Stop event)
107
107
  - `stop-watcher.sh` hook fires
108
108
  - Checks whether `.state.json` still has unfinished tasks
109
+ - Cross-checks `tasks.md`; completion requires zero unchecked tasks as well as completed state
110
+ - Allows stop when Claude Code reports `stop_hook_active=true` to avoid recursive stop-hook loops
109
111
  - If yes, it outputs `{"decision": "block", "reason": "continue task N"}`
110
112
  - Claude Code treats `decision=block` as "issue another response round", and the main agent automatically continues with the next task
111
113
  - Repeats until `TASK_FAILED` or `ALL_TASKS_COMPLETE`
@@ -119,6 +121,8 @@ main agent → task N → Stop → stop-watcher.sh
119
121
  no tasks? → allow stop
120
122
  ```
121
123
 
124
+ Safety invariant: `ALL_TASKS_COMPLETE` is advisory, not authoritative. If `tasks.md` still has unchecked tasks, the hook blocks and tells the agent to continue those tasks instead of advancing to verify.
125
+
122
126
  ### When to use
123
127
  - ✓ Long task chains (20+)
124
128
  - ✓ Unattended execution (overnight automation)
@@ -219,6 +223,11 @@ return "linear"
219
223
  - `"auto"` — use the decision tree above (default)
220
224
  - Other concrete strategies
221
225
 
226
+ Execution failure recovery is explicit:
227
+ - `recovery_mode: "manual"` — default; never skip a failed task, retry from the first unchecked task after root-cause analysis.
228
+ - `recovery_mode: "fix-task"` — insert a targeted `[FIX <task_id>]` task before retrying the original failure.
229
+ - `max_fix_tasks_per_original` — hard ceiling for generated fix tasks per original task.
230
+
222
231
  ---
223
232
 
224
233
  ## Failure Handling (common to all strategies)
@@ -233,6 +242,19 @@ Step D: if ≥3 retries fail with no new hypothesis, stop and challenge the arch
233
242
  Step E: report TASK_FAILED
234
243
  ```
235
244
 
245
+ If fix-task recovery is enabled, the coordinator turns a `TASK_FAILED` into a ledgered repair task before doing more work:
246
+
247
+ ```markdown
248
+ - [ ] **<task_id>.<n>** [FIX <task_id>] Fix: <root cause>
249
+ - **Do**: <repair steps>
250
+ - **Files**: <same files as the original task or narrower>
251
+ - **Done when**: Original failure no longer reproduces
252
+ - **Verify**: <original verify command or tighter reproduction>
253
+ - **Commit**: `fix(<scope>): address <failure>`
254
+ ```
255
+
256
+ The fix task must be written to `tasks.md` and tracked in `.state.json` `execute_state.fix_task_map` before it is executed. Executors do not invent and execute recovery work in the same turn.
257
+
236
258
  ### Extra protections for Stop-Hook strategy
237
259
  - 3 consecutive TASK_FAILED → stop-watcher.sh halts the loop
238
260
  - 10 consecutive Stop triggers with no progress → halt (anti-deadlock)
@@ -272,7 +294,7 @@ If you really must switch, do it manually:
272
294
  - Next `/curdx-flow:start <name>` (or `/curdx-flow:start --resume`) resumes from `task_index`
273
295
 
274
296
  ### Snapshots
275
- `/curdx-flow:save <label>` saves a checkpoint (Phase 5+ rollout).
297
+ Claude Code checkpoints plus `.flow/specs/<name>/.progress.md` are the current recovery surface. Use `/curdx-flow:status` to inspect recoverability.
276
298
 
277
299
  ---
278
300
 
@@ -201,8 +201,8 @@ But for production-grade features, running through is strongly recommended.
201
201
 
202
202
  ## Difference from /curdx-flow:review
203
203
 
204
- - **/curdx-flow:review** (Phase 3): review **after code is finished** — Stage 1 compliance + Stage 2 quality
205
- - **/curdx-flow:plan-*** (Phase 5): review **before code starts** — targets design.md
204
+ - **/curdx-flow:review**: review **after code is finished** — Stage 1 compliance + Stage 2 quality
205
+ - **/curdx-flow:spec --review**: review **before code starts** — targets design.md
206
206
 
207
207
  The two don't overlap. Plan Review prevents "doing the wrong thing", Code Review ensures "the thing was done right".
208
208
 
@@ -1,6 +1,6 @@
1
1
  # POC-First Workflow — 5 Phases
2
2
 
3
- > Step-by-step methodology for the execution phase: get it running → clean up → add tests → pass quality gates → ship PR.
3
+ > Step-by-step methodology for the execution phase: get it running → clean up → add tests → pass quality gates → hand off review-ready evidence.
4
4
  >
5
5
  > Agents reference this file via `@${CLAUDE_PLUGIN_ROOT}/knowledge/poc-first-workflow.md`.
6
6
 
@@ -15,7 +15,7 @@ Phase 1: Make It Work → end-to-end running; hard-coding allowed
15
15
  Phase 2: Refactoring → clean up structure, behavior unchanged
16
16
  Phase 3: Testing (TDD) → red-green-yellow loop to backfill tests
17
17
  Phase 4: Quality Gates → tsc + lint + test all green
18
- Phase 5: PR Lifecycle open PR, address review, merge
18
+ Phase 5: Evidence Handoff verify, review, prepare PR/release evidence
19
19
  ```
20
20
 
21
21
  ---
@@ -153,10 +153,10 @@ Each item produces **0 errors, 0 warnings** (warnings are not tolerated since th
153
153
 
154
154
  ---
155
155
 
156
- ## Phase 5: PR Lifecycle
156
+ ## Phase 5: Evidence Handoff
157
157
 
158
158
  ### Goal
159
- Code merged to main, feature shipped.
159
+ Feature is verified, reviewed, and ready for a human PR/release decision.
160
160
 
161
161
  ### Steps
162
162
 
@@ -165,7 +165,7 @@ Code merged to main, feature shipped.
165
165
  - Commit message follows conventional format
166
166
  - Squash if there are too many WIP commits
167
167
 
168
- 2. **Create PR**
168
+ 2. **Prepare PR/release evidence**
169
169
  - Clear title (< 70 chars)
170
170
  - Summary 3-5 lines covering why & what
171
171
  - Include a test plan (checklist)
@@ -180,9 +180,9 @@ Code merged to main, feature shipped.
180
180
  - Wait for CI green after every push
181
181
  - Fix red immediately — don't pile up
182
182
 
183
- 5. **Merge**
183
+ 5. **Hand off**
184
184
  - Squash vs merge vs rebase: per project convention
185
- - Deploy: if a `/curdx-flow:land` command exists, use it
185
+ - Use the host project's normal PR, merge, and release process
186
186
 
187
187
  ### Pitfalls
188
188
  - **PR too large** → reviewer gives up. Split anything > 500 changed lines.
@@ -198,7 +198,7 @@ Code merged to main, feature shipped.
198
198
  - Skip Refactoring / Testing / Quality Gates
199
199
 
200
200
  ### Fast mode (one-off task)
201
- - Only Phase 1 + Phase 5 (PR means ship)
201
+ - Only Phase 1 + Phase 5 (handoff evidence stays lightweight)
202
202
  - Suitable for: fixing a typo, adding a log, changing a constant
203
203
 
204
204
  ### Standard mode (default)
@@ -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
 
@@ -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
@@ -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,6 +102,7 @@ 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
 
@@ -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
 
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "2.2.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": {
@@ -20,9 +20,11 @@
20
20
  "hooks/",
21
21
  "knowledge/",
22
22
  "agent-preamble/",
23
+ "output-styles/",
23
24
  "templates/",
24
25
  "schemas/",
25
26
  "skills/",
27
+ "settings.json",
26
28
  "README.md",
27
29
  "CHANGELOG.md",
28
30
  "LICENSE"
@@ -48,5 +50,9 @@
48
50
  "dependencies": {
49
51
  "@clack/prompts": "^0.8.2",
50
52
  "picocolors": "^1.1.1"
53
+ },
54
+ "devDependencies": {
55
+ "ajv": "^8.18.0",
56
+ "yaml": "^2.8.3"
51
57
  }
52
58
  }
@@ -54,13 +54,6 @@
54
54
  "isolation": {
55
55
  "type": "string",
56
56
  "enum": ["worktree"]
57
- },
58
- "color": {
59
- "type": "string",
60
- "enum": ["red", "blue", "green", "yellow", "purple", "orange", "pink", "cyan"]
61
- },
62
- "initialPrompt": {
63
- "type": "string"
64
57
  }
65
58
  }
66
59
  }
@@ -40,6 +40,19 @@
40
40
  "type": "string",
41
41
  "enum": ["continue-on-single", "stop-on-any"],
42
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."
43
56
  }
44
57
  }
45
58
  },
@@ -109,6 +122,7 @@
109
122
  "karpathy-gate",
110
123
  "verification-gate",
111
124
  "tdd-gate",
125
+ "test-quality-gate",
112
126
  "coverage-audit-gate",
113
127
  "adversarial-review-gate",
114
128
  "edge-case-gate",
@@ -63,7 +63,7 @@
63
63
  "hookHandler": {
64
64
  "type": "object",
65
65
  "required": ["type"],
66
- "additionalProperties": true,
66
+ "additionalProperties": false,
67
67
  "properties": {
68
68
  "type": {
69
69
  "type": "string",
@@ -72,12 +72,44 @@
72
72
  "if": { "type": "string" },
73
73
  "timeout": { "type": "integer", "minimum": 1 },
74
74
  "statusMessage": { "type": "string" },
75
+ "async": { "type": "boolean" },
76
+ "asyncRewake": { "type": "boolean" },
75
77
  "once": { "type": "boolean" },
76
78
  "command": { "type": "string" },
79
+ "shell": {
80
+ "type": "string",
81
+ "enum": ["bash", "powershell"]
82
+ },
77
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" },
78
92
  "prompt": { "type": "string" },
79
93
  "model": { "type": "string" }
80
- }
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
+ ]
81
113
  }
82
114
  }
83
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
+ }