cowork-flow 0.0.37 → 0.0.39

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 (111) hide show
  1. package/README.md +27 -14
  2. package/package.json +1 -1
  3. package/src/commands/init.js +39 -28
  4. package/src/commands/sync.js +2 -2
  5. package/src/lib/asset-plan.js +127 -0
  6. package/src/lib/copy-template.js +101 -141
  7. package/src/lib/host-assets.js +231 -0
  8. package/src/lib/plan-applier.js +329 -0
  9. package/src/lib/platforms.js +15 -76
  10. package/src/lib/skill-registry.js +503 -0
  11. package/template/.claude/agents/cowork-check.md +10 -1
  12. package/template/.claude/agents/cowork-implement.md +11 -2
  13. package/template/.claude/hooks/inject-workflow-state.py +51 -254
  14. package/template/.codex/agents/cowork-check.toml +12 -3
  15. package/template/.codex/agents/cowork-implement.toml +11 -2
  16. package/template/.codex/agents/default.toml +3 -2
  17. package/template/.codex/agents/explorer.toml +3 -2
  18. package/template/.codex/agents/worker.toml +2 -1
  19. package/template/.codex/hooks/inject-workflow-state.py +46 -265
  20. package/template/.cowork-flow/.version +1 -1
  21. package/template/.cowork-flow/scripts/application/__init__.py +1 -0
  22. package/template/.cowork-flow/scripts/application/batch_execution.py +743 -0
  23. package/template/.cowork-flow/scripts/application/runtime_context_service.py +365 -0
  24. package/template/.cowork-flow/scripts/application/task_archive.py +220 -0
  25. package/template/.cowork-flow/scripts/application/task_context.py +765 -0
  26. package/template/.cowork-flow/scripts/application/task_creation.py +201 -0
  27. package/template/.cowork-flow/scripts/application/task_lifecycle.py +532 -0
  28. package/template/.cowork-flow/scripts/application/task_tree.py +179 -0
  29. package/template/.cowork-flow/scripts/commands/doctor.py +78 -57
  30. package/template/.cowork-flow/scripts/commands/party_mode_v2.py +671 -425
  31. package/template/.cowork-flow/scripts/commands/subagent.py +38 -26
  32. package/template/.cowork-flow/scripts/commands/task.py +535 -1953
  33. package/template/.cowork-flow/scripts/commands/task_archive_commands.py +195 -0
  34. package/template/.cowork-flow/scripts/commands/task_context_commands.py +240 -0
  35. package/template/.cowork-flow/scripts/commands/task_create_command.py +164 -0
  36. package/template/.cowork-flow/scripts/commands/task_navigation.py +407 -0
  37. package/template/.cowork-flow/scripts/commands/task_parser.py +364 -0
  38. package/template/.cowork-flow/scripts/commands/task_support.py +76 -0
  39. package/template/.cowork-flow/scripts/commands/task_tree_commands.py +160 -0
  40. package/template/.cowork-flow/scripts/common/core/execution_context.py +161 -85
  41. package/template/.cowork-flow/scripts/common/core/host_manifest.py +393 -0
  42. package/template/.cowork-flow/scripts/common/core/skill_registry.py +568 -0
  43. package/template/.cowork-flow/scripts/common/gates/coding_standards.py +58 -7
  44. package/template/.cowork-flow/scripts/common/gates/gates.py +323 -46
  45. package/template/.cowork-flow/scripts/common/gates/models.py +196 -0
  46. package/template/.cowork-flow/scripts/common/gates/registry.py +79 -0
  47. package/template/.cowork-flow/scripts/common/gates/tdd_evidence.py +13 -13
  48. package/template/.cowork-flow/scripts/common/gates/validate_coding_standards.py +104 -62
  49. package/template/.cowork-flow/scripts/common/gates/validate_implementation.py +39 -22
  50. package/template/.cowork-flow/scripts/common/gates/validate_rules.py +223 -40
  51. package/template/.cowork-flow/scripts/common/git/git_context.py +216 -182
  52. package/template/.cowork-flow/scripts/common/host/__init__.py +1 -0
  53. package/template/.cowork-flow/scripts/common/host/workflow_state_hook.py +303 -0
  54. package/template/.cowork-flow/scripts/common/storage/__init__.py +1 -0
  55. package/template/.cowork-flow/scripts/common/storage/operation_log.py +72 -0
  56. package/template/.cowork-flow/scripts/common/storage/state_store.py +279 -0
  57. package/template/.cowork-flow/scripts/common/storage/unit_of_work.py +214 -0
  58. package/template/.cowork-flow/scripts/common/task/active_task.py +93 -135
  59. package/template/.cowork-flow/scripts/common/task/batch_mode.py +33 -120
  60. package/template/.cowork-flow/scripts/common/task/decision_review.py +85 -0
  61. package/template/.cowork-flow/scripts/common/task/readiness.py +9 -15
  62. package/template/.cowork-flow/scripts/common/task/task_repository.py +156 -0
  63. package/template/.cowork-flow/scripts/run.py +24 -0
  64. package/template/.cowork-flow/spec/contracts/decision-anchor.md +8 -2
  65. package/template/.cowork-flow/spec/contracts/subagent-dispatch.md +2 -4
  66. package/template/.cowork-flow/spec/contracts/workflow-state-templates.md +1 -1
  67. package/template/.cowork-flow/spec/protocols/decision-review.md +28 -0
  68. package/template/.cowork-flow/spec/protocols/review.md +34 -0
  69. package/template/.cowork-flow/spec/protocols/spec-maintenance.md +16 -0
  70. package/template/.cowork-flow/spec/protocols/tdd.md +30 -0
  71. package/template/.cowork-flow/spec/references/definition-of-done.md +4 -4
  72. package/template/.cowork-flow/spec/references/orchestration-patterns.md +1 -1
  73. package/template/.cowork-flow/spec/runtime/contract-registry.json +25 -0
  74. package/template/.cowork-flow/spec/runtime/host-assets.json +214 -0
  75. package/template/.cowork-flow/spec/runtime/index.md +8 -0
  76. package/template/.cowork-flow/spec/runtime/rules.json +61 -10
  77. package/template/.cowork-flow/spec/runtime/skill-registry.json +397 -0
  78. package/template/.cowork-flow/spec/schemas/host-assets.schema.json +173 -0
  79. package/template/.cowork-flow/spec/schemas/rules.schema.json +10 -1
  80. package/template/.cowork-flow/spec/schemas/skill-registry.schema.json +202 -0
  81. package/template/.cowork-flow/workflow.md +18 -13
  82. package/template/.opencode/agents/cowork-check.md +11 -0
  83. package/template/.opencode/agents/cowork-implement.md +16 -1
  84. package/template/.zcode/.zcode-plugin/plugin.json +1 -1
  85. package/template/.zcode/hooks/inject-context.js +3 -85
  86. package/template/.zcode/hooks/inject-context.selfcheck.mjs +6 -6
  87. package/template/.zcode/scaffold/.cowork-flow/spec/contracts/decision-anchor.md +8 -2
  88. package/template/.zcode/scaffold/.cowork-flow/spec/contracts/subagent-dispatch.md +2 -4
  89. package/template/.zcode/scaffold/.cowork-flow/spec/runtime/rules.json +61 -10
  90. package/template/.zcode/scaffold/.cowork-flow/spec/schemas/rules.schema.json +10 -1
  91. package/template/.zcode/scaffold/.cowork-flow/workflow.md +18 -13
  92. package/template/.zcode/scaffold/AGENTS.md +18 -8
  93. package/template/AGENTS.md +1 -1
  94. package/template/skills/batch-mode/SKILL.md +140 -76
  95. package/template/skills/brainstorming/SKILL.md +2 -2
  96. package/template/skills/cowork-flow/SKILL.md +42 -0
  97. package/template/skills/party-mode/SHARED-BOUNDARIES.md +1 -1
  98. package/template/skills/party-mode/SKILL.md +48 -119
  99. package/template/.cowork-flow/scripts/common/gates/spec_validator.py +0 -53
  100. package/template/.cowork-flow/scripts/common/gates/validate_jsonl.py +0 -32
  101. package/template/skills/before-dev/SKILL.md +0 -41
  102. package/template/skills/check/SKILL.md +0 -53
  103. package/template/skills/check/simplification-guide.md +0 -47
  104. package/template/skills/continue/SKILL.md +0 -29
  105. package/template/skills/doubt-review/SKILL.md +0 -118
  106. package/template/skills/finish-work/SKILL.md +0 -32
  107. package/template/skills/party-mode-v2/SKILL.md +0 -75
  108. package/template/skills/start/SKILL.md +0 -78
  109. package/template/skills/tdd/SKILL.md +0 -74
  110. package/template/skills/update-spec/SKILL.md +0 -39
  111. package/template/skills/using-cowork-flow/SKILL.md +0 -80
@@ -0,0 +1,397 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "entries": [
4
+ {
5
+ "id": "batch-mode",
6
+ "displayName": "Batch Mode",
7
+ "aliases": [],
8
+ "kind": "mode",
9
+ "visibility": "public",
10
+ "status": "active",
11
+ "statuses": [
12
+ "planning",
13
+ "in_progress"
14
+ ],
15
+ "intents": [
16
+ "batch_execute_plan"
17
+ ],
18
+ "enforcement": "advisory",
19
+ "runtimeGate": null,
20
+ "runtimeCommand": null,
21
+ "evidenceArtifact": null,
22
+ "source": "skills/batch-mode/SKILL.md",
23
+ "managedPaths": [
24
+ ".agents/skills/batch-mode/",
25
+ ".claude/skills/batch-mode/"
26
+ ]
27
+ },
28
+ {
29
+ "id": "brainstorming",
30
+ "displayName": "Brainstorming",
31
+ "aliases": [],
32
+ "kind": "phase",
33
+ "visibility": "public",
34
+ "status": "active",
35
+ "statuses": [
36
+ "no_task",
37
+ "planning"
38
+ ],
39
+ "intents": [
40
+ "clarify_requirement"
41
+ ],
42
+ "enforcement": "advisory",
43
+ "runtimeGate": null,
44
+ "runtimeCommand": null,
45
+ "evidenceArtifact": "decision-anchor.md",
46
+ "source": "skills/brainstorming/SKILL.md",
47
+ "managedPaths": [
48
+ ".agents/skills/brainstorming/",
49
+ ".claude/skills/brainstorming/"
50
+ ]
51
+ },
52
+ {
53
+ "id": "break-loop",
54
+ "displayName": "Break Loop",
55
+ "aliases": [],
56
+ "kind": "phase",
57
+ "visibility": "public",
58
+ "status": "active",
59
+ "statuses": [
60
+ "no_task",
61
+ "planning",
62
+ "in_progress",
63
+ "review",
64
+ "completed",
65
+ "delegated_subtask"
66
+ ],
67
+ "intents": [
68
+ "analyze_repeated_failure"
69
+ ],
70
+ "enforcement": "advisory",
71
+ "runtimeGate": null,
72
+ "runtimeCommand": null,
73
+ "evidenceArtifact": null,
74
+ "source": "skills/break-loop/SKILL.md",
75
+ "managedPaths": [
76
+ ".agents/skills/break-loop/",
77
+ ".claude/skills/break-loop/"
78
+ ]
79
+ },
80
+ {
81
+ "id": "review-protocol",
82
+ "displayName": "Review Protocol",
83
+ "aliases": [],
84
+ "kind": "protocol",
85
+ "visibility": "internal",
86
+ "status": "active",
87
+ "statuses": [
88
+ "review"
89
+ ],
90
+ "intents": [
91
+ "check_implementation"
92
+ ],
93
+ "enforcement": "mandatory",
94
+ "runtimeGate": "review-gates",
95
+ "runtimeCommand": null,
96
+ "evidenceArtifact": "check.jsonl",
97
+ "source": ".cowork-flow/spec/protocols/review.md",
98
+ "managedPaths": []
99
+ },
100
+ {
101
+ "id": "cowork-flow",
102
+ "displayName": "Cowork Flow",
103
+ "aliases": [
104
+ "workflow-entry"
105
+ ],
106
+ "kind": "phase",
107
+ "visibility": "public",
108
+ "status": "active",
109
+ "statuses": [
110
+ "no_task",
111
+ "planning",
112
+ "in_progress",
113
+ "review",
114
+ "completed",
115
+ "delegated_subtask"
116
+ ],
117
+ "intents": [
118
+ "route_workflow"
119
+ ],
120
+ "enforcement": "mandatory",
121
+ "runtimeGate": "workflow-readiness",
122
+ "runtimeCommand": null,
123
+ "evidenceArtifact": null,
124
+ "source": "skills/cowork-flow/SKILL.md",
125
+ "managedPaths": [
126
+ ".agents/skills/cowork-flow/",
127
+ ".claude/skills/cowork-flow/"
128
+ ]
129
+ },
130
+ {
131
+ "id": "decision-review",
132
+ "displayName": "Decision Review",
133
+ "aliases": [],
134
+ "kind": "protocol",
135
+ "visibility": "internal",
136
+ "status": "active",
137
+ "statuses": [
138
+ "planning",
139
+ "in_progress",
140
+ "review"
141
+ ],
142
+ "intents": [
143
+ "review_decision"
144
+ ],
145
+ "enforcement": "mandatory",
146
+ "runtimeGate": "workflow-readiness",
147
+ "runtimeCommand": null,
148
+ "evidenceArtifact": "decision-review.jsonl",
149
+ "source": ".cowork-flow/spec/protocols/decision-review.md",
150
+ "managedPaths": []
151
+ },
152
+ {
153
+ "id": "game-design",
154
+ "displayName": "Game Design",
155
+ "aliases": [],
156
+ "kind": "domain",
157
+ "visibility": "internal",
158
+ "status": "active",
159
+ "statuses": [
160
+ "planning",
161
+ "in_progress",
162
+ "review"
163
+ ],
164
+ "intents": [
165
+ "guide_game_design"
166
+ ],
167
+ "enforcement": "advisory",
168
+ "runtimeGate": null,
169
+ "runtimeCommand": null,
170
+ "evidenceArtifact": null,
171
+ "source": "skills/game-design/SKILL.md",
172
+ "managedPaths": [
173
+ ".agents/skills/game-design/",
174
+ ".claude/skills/game-design/"
175
+ ],
176
+ "readWhen": {
177
+ "devTypes": [],
178
+ "pathPatterns": [
179
+ "**/*.godot",
180
+ "**/*.tscn",
181
+ "**/game/**",
182
+ "**/games/**"
183
+ ]
184
+ }
185
+ },
186
+ {
187
+ "id": "meta",
188
+ "displayName": "Meta",
189
+ "aliases": [],
190
+ "kind": "domain",
191
+ "visibility": "internal",
192
+ "status": "active",
193
+ "statuses": [
194
+ "planning",
195
+ "in_progress",
196
+ "review"
197
+ ],
198
+ "intents": [
199
+ "apply_meta_constraints"
200
+ ],
201
+ "enforcement": "advisory",
202
+ "runtimeGate": null,
203
+ "runtimeCommand": null,
204
+ "evidenceArtifact": null,
205
+ "source": "skills/meta/SKILL.md",
206
+ "managedPaths": [
207
+ ".agents/skills/meta/",
208
+ ".claude/skills/meta/"
209
+ ],
210
+ "readWhen": {
211
+ "devTypes": [
212
+ "spec"
213
+ ],
214
+ "pathPatterns": [
215
+ ".cowork-flow/**",
216
+ "template/.cowork-flow/**",
217
+ "template/skills/**"
218
+ ]
219
+ }
220
+ },
221
+ {
222
+ "id": "party-mode",
223
+ "displayName": "Party Mode",
224
+ "aliases": [],
225
+ "kind": "mode",
226
+ "visibility": "public",
227
+ "status": "active",
228
+ "statuses": [
229
+ "no_task",
230
+ "planning",
231
+ "in_progress",
232
+ "review",
233
+ "completed",
234
+ "delegated_subtask"
235
+ ],
236
+ "intents": [
237
+ "discuss_options"
238
+ ],
239
+ "enforcement": "advisory",
240
+ "runtimeGate": null,
241
+ "runtimeCommand": "party-v2 init",
242
+ "evidenceArtifact": null,
243
+ "source": "skills/party-mode/SKILL.md",
244
+ "managedPaths": [
245
+ ".agents/skills/party-mode/",
246
+ ".claude/skills/party-mode/"
247
+ ]
248
+ },
249
+ {
250
+ "id": "python-design",
251
+ "displayName": "Python Design",
252
+ "aliases": [],
253
+ "kind": "domain",
254
+ "visibility": "internal",
255
+ "status": "active",
256
+ "statuses": [
257
+ "planning",
258
+ "in_progress",
259
+ "review"
260
+ ],
261
+ "intents": [
262
+ "guide_python_design"
263
+ ],
264
+ "enforcement": "advisory",
265
+ "runtimeGate": null,
266
+ "runtimeCommand": null,
267
+ "evidenceArtifact": null,
268
+ "source": "skills/python-design/SKILL.md",
269
+ "managedPaths": [
270
+ ".agents/skills/python-design/",
271
+ ".claude/skills/python-design/"
272
+ ],
273
+ "readWhen": {
274
+ "devTypes": [
275
+ "backend",
276
+ "test"
277
+ ],
278
+ "pathPatterns": [
279
+ "**/*.py"
280
+ ]
281
+ }
282
+ },
283
+ {
284
+ "id": "review-gates",
285
+ "displayName": "Review Gates Runtime",
286
+ "aliases": [],
287
+ "kind": "runtime",
288
+ "visibility": "internal",
289
+ "status": "active",
290
+ "statuses": [],
291
+ "intents": [],
292
+ "enforcement": "runtime",
293
+ "runtimeGate": null,
294
+ "runtimeCommand": "task review",
295
+ "evidenceArtifact": "check.jsonl",
296
+ "source": ".cowork-flow/scripts/common/gates/gates.py",
297
+ "managedPaths": []
298
+ },
299
+ {
300
+ "id": "tdd-protocol",
301
+ "displayName": "TDD Protocol",
302
+ "aliases": [],
303
+ "kind": "protocol",
304
+ "visibility": "internal",
305
+ "status": "active",
306
+ "statuses": [
307
+ "in_progress"
308
+ ],
309
+ "intents": [
310
+ "apply_tdd"
311
+ ],
312
+ "enforcement": "mandatory",
313
+ "runtimeGate": "tdd-evidence",
314
+ "runtimeCommand": null,
315
+ "evidenceArtifact": "tdd.jsonl",
316
+ "source": ".cowork-flow/spec/protocols/tdd.md",
317
+ "managedPaths": []
318
+ },
319
+ {
320
+ "id": "tdd-evidence",
321
+ "displayName": "TDD Evidence Runtime",
322
+ "aliases": [],
323
+ "kind": "runtime",
324
+ "visibility": "internal",
325
+ "status": "active",
326
+ "statuses": [],
327
+ "intents": [],
328
+ "enforcement": "runtime",
329
+ "runtimeGate": null,
330
+ "runtimeCommand": "task review",
331
+ "evidenceArtifact": "tdd.jsonl",
332
+ "source": ".cowork-flow/scripts/common/gates/tdd_evidence.py",
333
+ "managedPaths": []
334
+ },
335
+ {
336
+ "id": "spec-maintenance",
337
+ "displayName": "Spec Maintenance",
338
+ "aliases": [],
339
+ "kind": "protocol",
340
+ "visibility": "internal",
341
+ "status": "active",
342
+ "statuses": [
343
+ "in_progress",
344
+ "review"
345
+ ],
346
+ "intents": [
347
+ "maintain_spec"
348
+ ],
349
+ "enforcement": "advisory",
350
+ "runtimeGate": null,
351
+ "runtimeCommand": null,
352
+ "evidenceArtifact": ".cowork-flow/spec/",
353
+ "source": ".cowork-flow/spec/protocols/spec-maintenance.md",
354
+ "managedPaths": []
355
+ },
356
+ {
357
+ "id": "workflow-readiness",
358
+ "displayName": "Workflow Readiness Runtime",
359
+ "aliases": [],
360
+ "kind": "runtime",
361
+ "visibility": "internal",
362
+ "status": "active",
363
+ "statuses": [],
364
+ "intents": [],
365
+ "enforcement": "runtime",
366
+ "runtimeGate": null,
367
+ "runtimeCommand": "task next",
368
+ "evidenceArtifact": null,
369
+ "source": ".cowork-flow/scripts/common/task/readiness.py",
370
+ "managedPaths": []
371
+ },
372
+ {
373
+ "id": "writing-plans",
374
+ "displayName": "Writing Plans",
375
+ "aliases": [],
376
+ "kind": "phase",
377
+ "visibility": "public",
378
+ "status": "active",
379
+ "statuses": [
380
+ "no_task",
381
+ "planning"
382
+ ],
383
+ "intents": [
384
+ "write_plan"
385
+ ],
386
+ "enforcement": "advisory",
387
+ "runtimeGate": null,
388
+ "runtimeCommand": null,
389
+ "evidenceArtifact": ".cowork-flow/plans/",
390
+ "source": "skills/writing-plans/SKILL.md",
391
+ "managedPaths": [
392
+ ".agents/skills/writing-plans/",
393
+ ".claude/skills/writing-plans/"
394
+ ]
395
+ }
396
+ ]
397
+ }
@@ -0,0 +1,173 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cowork-flow.local/schemas/host-assets.schema.json",
4
+ "title": "cowork-flow Host Asset Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "capabilityValues",
10
+ "platforms",
11
+ "excludedPrefixes",
12
+ "syncPolicy"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "const": 1
17
+ },
18
+ "capabilityValues": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "uniqueItems": true,
22
+ "items": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ }
26
+ },
27
+ "platforms": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": {
31
+ "$ref": "#/$defs/platform"
32
+ }
33
+ },
34
+ "excludedPrefixes": {
35
+ "$ref": "#/$defs/stringList"
36
+ },
37
+ "syncPolicy": {
38
+ "$ref": "#/$defs/syncPolicy"
39
+ }
40
+ },
41
+ "$defs": {
42
+ "stringList": {
43
+ "type": "array",
44
+ "uniqueItems": true,
45
+ "items": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ }
49
+ },
50
+ "capabilities": {
51
+ "type": "object",
52
+ "minProperties": 1,
53
+ "additionalProperties": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ "commandTarget": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "config",
62
+ "format",
63
+ "target"
64
+ ],
65
+ "properties": {
66
+ "config": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ },
70
+ "format": {
71
+ "enum": [
72
+ "json",
73
+ "toml",
74
+ "yaml"
75
+ ]
76
+ },
77
+ "target": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ }
81
+ }
82
+ },
83
+ "platform": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "id",
88
+ "displayName",
89
+ "aliases",
90
+ "detectAny",
91
+ "assetPrefixes",
92
+ "assetFiles",
93
+ "skillTarget",
94
+ "adapterPath",
95
+ "capabilities",
96
+ "commandTargets"
97
+ ],
98
+ "properties": {
99
+ "id": {
100
+ "type": "string",
101
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
102
+ },
103
+ "displayName": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ },
107
+ "aliases": {
108
+ "$ref": "#/$defs/stringList"
109
+ },
110
+ "detectAny": {
111
+ "$ref": "#/$defs/stringList"
112
+ },
113
+ "assetPrefixes": {
114
+ "$ref": "#/$defs/stringList"
115
+ },
116
+ "assetFiles": {
117
+ "$ref": "#/$defs/stringList"
118
+ },
119
+ "skillTarget": {
120
+ "type": [
121
+ "string",
122
+ "null"
123
+ ]
124
+ },
125
+ "adapterPath": {
126
+ "type": "string",
127
+ "minLength": 1
128
+ },
129
+ "capabilities": {
130
+ "$ref": "#/$defs/capabilities"
131
+ },
132
+ "commandTargets": {
133
+ "type": "array",
134
+ "items": {
135
+ "$ref": "#/$defs/commandTarget"
136
+ }
137
+ }
138
+ }
139
+ },
140
+ "syncPolicy": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": [
144
+ "protectedFiles",
145
+ "protectedPrefixes",
146
+ "safeFiles",
147
+ "safePrefixes",
148
+ "managedBlockFiles",
149
+ "obsoleteFiles"
150
+ ],
151
+ "properties": {
152
+ "protectedFiles": {
153
+ "$ref": "#/$defs/stringList"
154
+ },
155
+ "protectedPrefixes": {
156
+ "$ref": "#/$defs/stringList"
157
+ },
158
+ "safeFiles": {
159
+ "$ref": "#/$defs/stringList"
160
+ },
161
+ "safePrefixes": {
162
+ "$ref": "#/$defs/stringList"
163
+ },
164
+ "managedBlockFiles": {
165
+ "$ref": "#/$defs/stringList"
166
+ },
167
+ "obsoleteFiles": {
168
+ "$ref": "#/$defs/stringList"
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
@@ -15,7 +15,7 @@
15
15
  "description": "Array of rules",
16
16
  "items": {
17
17
  "type": "object",
18
- "required": ["id", "type", "severity", "scope", "condition", "message", "fix_hint", "source_file", "enforcement"],
18
+ "required": ["id", "type", "severity", "scope", "condition", "message", "fix_hint", "source_file", "enforcement", "validator", "parameters"],
19
19
  "anyOf": [
20
20
  {"required": ["source_anchor"]},
21
21
  {"required": ["source_excerpt"]}
@@ -69,6 +69,15 @@
69
69
  "type": "string",
70
70
  "enum": ["validate_rules", "validate_implementation"],
71
71
  "description": "Runtime surface responsible for enforcing this rule. Must have a corresponding validator module."
72
+ },
73
+ "validator": {
74
+ "type": "string",
75
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
76
+ "description": "Registered validator capability key. Multiple rules may reuse the same capability."
77
+ },
78
+ "parameters": {
79
+ "type": "object",
80
+ "description": "Validator-specific configuration validated by the registered capability."
72
81
  }
73
82
  },
74
83
  "additionalProperties": false