create-yss-spec 3.4.7 → 3.4.8

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 (121) hide show
  1. package/package.json +1 -1
  2. package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
  3. package/template/.agents/skills/code-review/references/yss-review-standards.md +22 -0
  4. package/template/.agents/skills/lombok/SKILL.md +1 -1
  5. package/template/.agents/skills/mapstruct/SKILL.md +3 -1
  6. package/template/.agents/skills/yss-application/references/application-layer-guide.md +7 -0
  7. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +38 -0
  8. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  9. package/template/.agents/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  10. package/template/.agents/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  11. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +5 -3
  12. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  13. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  14. package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  15. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  16. package/template/.agents/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  17. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  18. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  19. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  20. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  21. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +8 -1
  22. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  23. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  24. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  25. package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
  26. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  27. package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  28. package/template/.codex/skills/code-review/references/yss-review-standards.md +22 -0
  29. package/template/.codex/skills/lombok/SKILL.md +1 -1
  30. package/template/.codex/skills/mapstruct/SKILL.md +3 -1
  31. package/template/.codex/skills/yss-application/references/application-layer-guide.md +7 -0
  32. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +38 -0
  33. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  34. package/template/.codex/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  35. package/template/.codex/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  36. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +5 -3
  37. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  38. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  39. package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  40. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  41. package/template/.codex/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  42. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  43. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  44. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  45. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  46. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +8 -1
  47. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  48. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  49. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  50. package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
  51. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  52. package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  53. package/template/.cursor/skills/code-review/references/yss-review-standards.md +22 -0
  54. package/template/.cursor/skills/lombok/SKILL.md +1 -1
  55. package/template/.cursor/skills/mapstruct/SKILL.md +3 -1
  56. package/template/.cursor/skills/yss-application/references/application-layer-guide.md +7 -0
  57. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +38 -0
  58. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  59. package/template/.cursor/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  60. package/template/.cursor/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  61. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +5 -3
  62. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  63. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  64. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  65. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  66. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  67. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  68. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  69. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  70. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  71. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +8 -1
  72. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  73. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  74. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  75. package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
  76. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  77. package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  78. package/template/.pi/skills/code-review/references/yss-review-standards.md +22 -0
  79. package/template/.pi/skills/lombok/SKILL.md +1 -1
  80. package/template/.pi/skills/mapstruct/SKILL.md +3 -1
  81. package/template/.pi/skills/yss-application/references/application-layer-guide.md +7 -0
  82. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +38 -0
  83. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  84. package/template/.pi/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  85. package/template/.pi/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  86. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +5 -3
  87. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  88. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  89. package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  90. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  91. package/template/.pi/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  92. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  93. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  94. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  95. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  96. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +8 -1
  97. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  98. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  99. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  100. package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
  101. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  102. package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  103. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  104. package/template/docs/engineering/backend-platforms.md +14 -0
  105. package/template/docs/process/schemas/digital-human-task-package.schema.json +657 -100
  106. package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +41 -0
  107. package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
  108. package/template/scripts/lib/backend-platform-verification.mjs +2 -2
  109. package/template/scripts/lib/backend-platform.mjs +62 -0
  110. package/template/scripts/lib/backend-review.mjs +102 -0
  111. package/template/scripts/lib/first-slice-artifacts.mjs +47 -0
  112. package/template/scripts/lib/first-slice-tests.mjs +24 -0
  113. package/template/scripts/lib/lifecycle-transition.mjs +6 -0
  114. package/template/scripts/lib/maintenance-candidate.mjs +160 -0
  115. package/template/scripts/lib/slice-execution-preflight.mjs +43 -0
  116. package/template/scripts/slice-contract +7 -3
  117. package/template/scripts/verify-backend-platform-matrix +8 -2
  118. package/template/skills-lock.json +28 -16
  119. package/template/yss-public-skills.json +4 -2
  120. package/template.manifest.json +0 -1
  121. package/template.snapshot.json +5 -5
@@ -4,133 +4,690 @@
4
4
  "title": "YSS Digital Human Task Package",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schema_version", "task_id", "work_unit_id", "actor_id", "role_id", "runtime_id", "execution_state", "workflow_status", "skill_source", "contract", "inputs", "objective", "allowed_write_paths", "forbidden_actions", "expected_outputs", "expected_evidence_files", "verification_commands", "verification_results", "downstream_consumers", "convergence"],
7
+ "required": [
8
+ "schema_version",
9
+ "task_id",
10
+ "work_unit_id",
11
+ "actor_id",
12
+ "role_id",
13
+ "runtime_id",
14
+ "execution_state",
15
+ "workflow_status",
16
+ "skill_source",
17
+ "contract",
18
+ "inputs",
19
+ "objective",
20
+ "allowed_write_paths",
21
+ "forbidden_actions",
22
+ "expected_outputs",
23
+ "expected_evidence_files",
24
+ "verification_commands",
25
+ "verification_results",
26
+ "downstream_consumers",
27
+ "convergence"
28
+ ],
8
29
  "properties": {
9
- "plan_review_ref": { "type": "string", "minLength": 1 },
10
- "plan_approval_ref": { "type": "string", "minLength": 1 },
11
- "plan_user_decision_ref": { "type": "string", "minLength": 1 },
12
- "plan_continuation_ref": { "type": "string", "minLength": 1 },
13
- "schema_version": { "const": 1 },
30
+ "plan_review_ref": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "plan_approval_ref": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "plan_user_decision_ref": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "plan_continuation_ref": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "schema_version": {
47
+ "const": 1
48
+ },
14
49
  "frontend_delivery": {
15
- "type": "object", "additionalProperties": false, "required": ["acceptance_ref"],
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": [
53
+ "acceptance_ref"
54
+ ],
16
55
  "properties": {
17
- "acceptance_ref": { "type": "string", "minLength": 1 },
18
- "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
19
- }
20
- },
21
- "slice_id": { "type": "string", "minLength": 1 },
22
- "task_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" },
23
- "work_unit_id": { "type": "string", "minLength": 1, "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$" },
24
- "actor_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$" },
25
- "role_id": { "type": "string", "pattern": "^role\\.[a-z0-9][a-z0-9-]*$" },
26
- "runtime_id": { "type": "string", "pattern": "^runtime\\.[a-z0-9][a-z0-9-]*$" },
27
- "execution_state": { "enum": ["Explorer", "Drafter", "Worker", "Reviewer", "Verifier"] },
28
- "workflow_status": { "enum": ["not-started", "active", "paused", "resolved", "failed"] },
29
- "stage_id": { "type": "string", "pattern": "^stage\\.[a-z0-9][a-z0-9-]*$" },
30
- "feature_id": { "type": "string", "minLength": 1 },
56
+ "acceptance_ref": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "digest": {
61
+ "type": "string",
62
+ "pattern": "^sha256:[0-9a-f]{64}$"
63
+ }
64
+ }
65
+ },
66
+ "slice_id": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ },
70
+ "task_id": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$"
74
+ },
75
+ "work_unit_id": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$"
79
+ },
80
+ "actor_id": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$"
84
+ },
85
+ "role_id": {
86
+ "type": "string",
87
+ "pattern": "^role\\.[a-z0-9][a-z0-9-]*$"
88
+ },
89
+ "runtime_id": {
90
+ "type": "string",
91
+ "pattern": "^runtime\\.[a-z0-9][a-z0-9-]*$"
92
+ },
93
+ "execution_state": {
94
+ "enum": [
95
+ "Explorer",
96
+ "Drafter",
97
+ "Worker",
98
+ "Reviewer",
99
+ "Verifier"
100
+ ]
101
+ },
102
+ "workflow_status": {
103
+ "enum": [
104
+ "not-started",
105
+ "active",
106
+ "paused",
107
+ "resolved",
108
+ "failed"
109
+ ]
110
+ },
111
+ "stage_id": {
112
+ "type": "string",
113
+ "pattern": "^stage\\.[a-z0-9][a-z0-9-]*$"
114
+ },
115
+ "feature_id": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
31
119
  "skill_source": {
32
- "type": "object", "additionalProperties": false,
33
- "required": ["registry_ref", "defaults_ref", "core_skills", "forbidden_skills"],
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": [
123
+ "registry_ref",
124
+ "defaults_ref",
125
+ "core_skills",
126
+ "forbidden_skills"
127
+ ],
34
128
  "properties": {
35
- "registry_ref": { "const": "docs/agents/digital-human-roles.yaml" },
36
- "defaults_ref": { "type": "string", "minLength": 1 },
37
- "core_skills": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
38
- "forbidden_skills": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
129
+ "registry_ref": {
130
+ "const": "docs/agents/digital-human-roles.yaml"
131
+ },
132
+ "defaults_ref": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "core_skills": {
137
+ "type": "array",
138
+ "minItems": 1,
139
+ "uniqueItems": true,
140
+ "items": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ }
144
+ },
145
+ "forbidden_skills": {
146
+ "type": "array",
147
+ "minItems": 1,
148
+ "uniqueItems": true,
149
+ "items": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ }
153
+ }
39
154
  }
40
155
  },
41
156
  "contract": {
42
- "type": "object", "additionalProperties": false,
43
- "required": ["kind", "contract_id", "contract_version", "status", "contract_ref"],
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "kind",
161
+ "contract_id",
162
+ "contract_version",
163
+ "status",
164
+ "contract_ref"
165
+ ],
44
166
  "properties": {
45
- "kind": { "enum": ["lifecycle-work-unit", "slice-implementation", "template-maintenance"] },
46
- "contract_id": { "type": "string", "minLength": 1 },
47
- "contract_version": { "oneOf": [{ "type": "integer", "minimum": 1 }, { "type": "string", "minLength": 1, "pattern": "\\S" }] },
48
- "status": { "enum": ["issued", "stale", "blocked"] },
49
- "contract_ref": { "type": "string", "minLength": 1 },
50
- "lifecycle_ref": { "type": "string", "minLength": 1 },
51
- "slice_contract_ref": { "type": "string", "minLength": 1 },
52
- "maintenance_ref": { "type": "string", "minLength": 1 },
53
- "candidate_kind": { "type": "string", "minLength": 1 },
54
- "candidate_requirement": { "type": "string", "minLength": 1 },
55
- "candidate_digest": { "type": "string", "pattern": "^(?:sha256:)?[a-f0-9]{64}$" },
56
- "review_axis": { "enum": ["standards", "spec", "lead"] },
57
- "review_round": { "type": "integer", "minimum": 1, "maximum": 2 },
58
- "applicable_rule_refs": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
59
- "artifact_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
60
- "gate_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }
61
- }
62
- },
63
- "user_decisions": { "type": "array", "items": { "type": "object", "required": ["boundary", "subject_ref", "scope"], "oneOf": [{"required": ["user_decision_ref"]}, {"required": ["continuation_ref"]}], "properties": { "boundary": { "type": "string" }, "subject_ref": { "type": "string" }, "scope": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "user_decision_ref": { "type": "string", "minLength": 1 }, "continuation_ref": { "type": "string", "minLength": 1 } }, "additionalProperties": false } },
64
- "inputs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
65
- "allowed_read_paths": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
66
- "objective": { "type": "string", "minLength": 1 },
67
- "allowed_write_paths": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
68
- "forbidden_actions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
69
- "expected_outputs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
70
- "expected_evidence_files": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
71
- "verification_commands": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
167
+ "kind": {
168
+ "enum": [
169
+ "lifecycle-work-unit",
170
+ "slice-implementation",
171
+ "template-maintenance"
172
+ ]
173
+ },
174
+ "contract_id": {
175
+ "type": "string",
176
+ "minLength": 1
177
+ },
178
+ "contract_version": {
179
+ "oneOf": [
180
+ {
181
+ "type": "integer",
182
+ "minimum": 1
183
+ },
184
+ {
185
+ "type": "string",
186
+ "minLength": 1,
187
+ "pattern": "\\S"
188
+ }
189
+ ]
190
+ },
191
+ "status": {
192
+ "enum": [
193
+ "issued",
194
+ "stale",
195
+ "blocked"
196
+ ]
197
+ },
198
+ "contract_ref": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "lifecycle_ref": {
203
+ "type": "string",
204
+ "minLength": 1
205
+ },
206
+ "slice_contract_ref": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ },
210
+ "maintenance_ref": {
211
+ "type": "string",
212
+ "minLength": 1
213
+ },
214
+ "candidate_kind": {
215
+ "type": "string",
216
+ "minLength": 1
217
+ },
218
+ "candidate_requirement": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "candidate_digest": {
223
+ "type": "string",
224
+ "pattern": "^(?:sha256:)?[a-f0-9]{64}$"
225
+ },
226
+ "review_axis": {
227
+ "enum": [
228
+ "standards",
229
+ "spec",
230
+ "lead"
231
+ ]
232
+ },
233
+ "review_round": {
234
+ "type": "integer",
235
+ "minimum": 1,
236
+ "maximum": 2
237
+ },
238
+ "applicable_rule_refs": {
239
+ "type": "array",
240
+ "minItems": 1,
241
+ "uniqueItems": true,
242
+ "items": {
243
+ "type": "string",
244
+ "minLength": 1
245
+ }
246
+ },
247
+ "artifact_refs": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "string",
251
+ "minLength": 1
252
+ }
253
+ },
254
+ "gate_refs": {
255
+ "type": "array",
256
+ "items": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "user_decisions": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "object",
267
+ "required": [
268
+ "boundary",
269
+ "subject_ref",
270
+ "scope"
271
+ ],
272
+ "oneOf": [
273
+ {
274
+ "required": [
275
+ "user_decision_ref"
276
+ ]
277
+ },
278
+ {
279
+ "required": [
280
+ "continuation_ref"
281
+ ]
282
+ }
283
+ ],
284
+ "properties": {
285
+ "boundary": {
286
+ "type": "string"
287
+ },
288
+ "subject_ref": {
289
+ "type": "string"
290
+ },
291
+ "scope": {
292
+ "type": "array",
293
+ "minItems": 1,
294
+ "items": {
295
+ "type": "string"
296
+ }
297
+ },
298
+ "user_decision_ref": {
299
+ "type": "string",
300
+ "minLength": 1
301
+ },
302
+ "continuation_ref": {
303
+ "type": "string",
304
+ "minLength": 1
305
+ }
306
+ },
307
+ "additionalProperties": false
308
+ }
309
+ },
310
+ "inputs": {
311
+ "type": "array",
312
+ "minItems": 1,
313
+ "items": {
314
+ "type": "string",
315
+ "minLength": 1
316
+ }
317
+ },
318
+ "allowed_read_paths": {
319
+ "type": "array",
320
+ "minItems": 1,
321
+ "uniqueItems": true,
322
+ "items": {
323
+ "type": "string",
324
+ "minLength": 1
325
+ }
326
+ },
327
+ "objective": {
328
+ "type": "string",
329
+ "minLength": 1
330
+ },
331
+ "allowed_write_paths": {
332
+ "type": "array",
333
+ "minItems": 1,
334
+ "uniqueItems": true,
335
+ "items": {
336
+ "type": "string",
337
+ "minLength": 1
338
+ }
339
+ },
340
+ "forbidden_actions": {
341
+ "type": "array",
342
+ "minItems": 1,
343
+ "uniqueItems": true,
344
+ "items": {
345
+ "type": "string",
346
+ "minLength": 1
347
+ }
348
+ },
349
+ "expected_outputs": {
350
+ "type": "array",
351
+ "minItems": 1,
352
+ "items": {
353
+ "type": "string",
354
+ "minLength": 1
355
+ }
356
+ },
357
+ "expected_evidence_files": {
358
+ "type": "array",
359
+ "minItems": 1,
360
+ "uniqueItems": true,
361
+ "items": {
362
+ "type": "string",
363
+ "minLength": 1
364
+ }
365
+ },
366
+ "verification_commands": {
367
+ "type": "array",
368
+ "minItems": 1,
369
+ "items": {
370
+ "type": "string",
371
+ "minLength": 1
372
+ }
373
+ },
72
374
  "verification_results": {
73
- "type": "array", "items": {
74
- "type": "object", "additionalProperties": false,
75
- "required": ["command", "exit_code", "executed_at", "evidence_ref"],
375
+ "type": "array",
376
+ "items": {
377
+ "type": "object",
378
+ "additionalProperties": false,
379
+ "required": [
380
+ "command",
381
+ "exit_code",
382
+ "executed_at",
383
+ "evidence_ref"
384
+ ],
76
385
  "properties": {
77
- "command": { "type": "string", "minLength": 1 },
78
- "exit_code": { "type": "integer", "minimum": 0 },
79
- "duration_ms": { "type": "integer", "minimum": 0 },
80
- "executed_at": { "type": "string", "minLength": 1 },
81
- "evidence_ref": { "type": "string", "minLength": 1 },
82
- "stdout_ref": { "type": "string", "minLength": 1 },
83
- "stderr_ref": { "type": "string", "minLength": 1 }
386
+ "command": {
387
+ "type": "string",
388
+ "minLength": 1
389
+ },
390
+ "exit_code": {
391
+ "type": "integer",
392
+ "minimum": 0
393
+ },
394
+ "duration_ms": {
395
+ "type": "integer",
396
+ "minimum": 0
397
+ },
398
+ "executed_at": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ },
402
+ "evidence_ref": {
403
+ "type": "string",
404
+ "minLength": 1
405
+ },
406
+ "stdout_ref": {
407
+ "type": "string",
408
+ "minLength": 1
409
+ },
410
+ "stderr_ref": {
411
+ "type": "string",
412
+ "minLength": 1
413
+ }
84
414
  }
85
415
  }
86
416
  },
87
417
  "review_context": {
88
- "type": "object", "additionalProperties": false, "required": ["implementation_actor_id"],
89
- "properties": { "implementation_actor_id": { "type": "string", "minLength": 1 }, "implementation_task_id": { "type": "string", "minLength": 1 } }
418
+ "type": "object",
419
+ "additionalProperties": false,
420
+ "required": [
421
+ "implementation_actor_id"
422
+ ],
423
+ "properties": {
424
+ "implementation_actor_id": {
425
+ "type": "string",
426
+ "minLength": 1
427
+ },
428
+ "implementation_task_id": {
429
+ "type": "string",
430
+ "minLength": 1
431
+ }
432
+ }
433
+ },
434
+ "downstream_consumers": {
435
+ "type": "array",
436
+ "minItems": 1,
437
+ "items": {
438
+ "type": "string",
439
+ "minLength": 1
440
+ }
90
441
  },
91
- "downstream_consumers": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
92
442
  "convergence": {
93
- "type": "object", "additionalProperties": false, "required": ["parent_work_unit", "convergence_ref"],
443
+ "type": "object",
444
+ "additionalProperties": false,
445
+ "required": [
446
+ "parent_work_unit",
447
+ "convergence_ref"
448
+ ],
94
449
  "properties": {
95
- "parent_work_unit": { "type": "string", "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$" },
96
- "convergence_ref": { "type": "string", "minLength": 1 },
97
- "conflict_escalation": { "type": "string", "minLength": 1 }
450
+ "parent_work_unit": {
451
+ "type": "string",
452
+ "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$"
453
+ },
454
+ "convergence_ref": {
455
+ "type": "string",
456
+ "minLength": 1
457
+ },
458
+ "conflict_escalation": {
459
+ "type": "string",
460
+ "minLength": 1
461
+ }
98
462
  }
99
463
  },
100
464
  "result": {
101
- "type": "object", "additionalProperties": false,
465
+ "type": "object",
466
+ "additionalProperties": false,
102
467
  "properties": {
103
- "result_schema": { "const": "workflow-execution-result-v1" },
104
- "work_unit": { "type": "string", "minLength": 1 },
105
- "workflow_reference": { "type": "string", "minLength": 1 },
106
- "result": { "enum": ["completed", "blocked", "needs-human", "failed"] },
468
+ "result_schema": {
469
+ "const": "workflow-execution-result-v1"
470
+ },
471
+ "work_unit": {
472
+ "type": "string",
473
+ "minLength": 1
474
+ },
475
+ "workflow_reference": {
476
+ "type": "string",
477
+ "minLength": 1
478
+ },
479
+ "result": {
480
+ "enum": [
481
+ "completed",
482
+ "blocked",
483
+ "needs-human",
484
+ "failed"
485
+ ]
486
+ },
107
487
  "context_reconciliation": {
108
- "type": "object", "additionalProperties": false,
109
- "required": ["status", "ref"],
488
+ "type": "object",
489
+ "additionalProperties": false,
490
+ "required": [
491
+ "status",
492
+ "ref"
493
+ ],
110
494
  "properties": {
111
- "status": { "enum": ["reconciled", "not-applicable", "blocked"] },
112
- "ref": { "type": "string", "minLength": 1 },
113
- "reason": { "type": "string", "minLength": 1 }
114
- }
115
- },
116
- "skill": { "type": "string", "minLength": 1 },
117
- "changed_files": { "type": "array", "items": { "type": "string", "minLength": 1 } },
118
- "changed_artifacts": { "type": "array", "items": { "type": "string", "minLength": 1 } },
119
- "evidence_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
120
- "deferred_seams": { "type": "array", "items": { "type": "string", "minLength": 1 } },
121
- "drift": { "type": "array", "items": { "type": "string", "minLength": 1 } },
122
- "violation": { "type": "array", "items": { "type": "string", "minLength": 1 } },
123
- "new_impacts": { "type": "array", "items": { "type": "string", "minLength": 1 } },
124
- "stale_candidates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
125
- "next_route": { "type": ["string", "null"], "minLength": 1 },
126
- "blocking_signals": { "type": "array", "items": { "type": "string", "minLength": 1 } }
495
+ "status": {
496
+ "enum": [
497
+ "reconciled",
498
+ "not-applicable",
499
+ "blocked"
500
+ ]
501
+ },
502
+ "ref": {
503
+ "type": "string",
504
+ "minLength": 1
505
+ },
506
+ "reason": {
507
+ "type": "string",
508
+ "minLength": 1
509
+ }
510
+ }
511
+ },
512
+ "skill": {
513
+ "type": "string",
514
+ "minLength": 1
515
+ },
516
+ "changed_files": {
517
+ "type": "array",
518
+ "items": {
519
+ "type": "string",
520
+ "minLength": 1
521
+ }
522
+ },
523
+ "changed_artifacts": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "string",
527
+ "minLength": 1
528
+ }
529
+ },
530
+ "evidence_refs": {
531
+ "type": "array",
532
+ "items": {
533
+ "type": "string",
534
+ "minLength": 1
535
+ }
536
+ },
537
+ "deferred_seams": {
538
+ "type": "array",
539
+ "items": {
540
+ "type": "string",
541
+ "minLength": 1
542
+ }
543
+ },
544
+ "drift": {
545
+ "type": "array",
546
+ "items": {
547
+ "type": "string",
548
+ "minLength": 1
549
+ }
550
+ },
551
+ "violation": {
552
+ "type": "array",
553
+ "items": {
554
+ "type": "string",
555
+ "minLength": 1
556
+ }
557
+ },
558
+ "new_impacts": {
559
+ "type": "array",
560
+ "items": {
561
+ "type": "string",
562
+ "minLength": 1
563
+ }
564
+ },
565
+ "stale_candidates": {
566
+ "type": "array",
567
+ "items": {
568
+ "type": "string",
569
+ "minLength": 1
570
+ }
571
+ },
572
+ "next_route": {
573
+ "type": [
574
+ "string",
575
+ "null"
576
+ ],
577
+ "minLength": 1
578
+ },
579
+ "blocking_signals": {
580
+ "type": "array",
581
+ "items": {
582
+ "type": "string",
583
+ "minLength": 1
584
+ }
585
+ }
127
586
  }
587
+ },
588
+ "review_input": {
589
+ "type": "object",
590
+ "required": [
591
+ "slice_contract_ref"
592
+ ],
593
+ "properties": {
594
+ "slice_contract_ref": {
595
+ "type": "string",
596
+ "minLength": 1
597
+ }
598
+ }
599
+ },
600
+ "review_result_ref": {
601
+ "type": "string",
602
+ "minLength": 1
128
603
  }
129
604
  },
130
605
  "allOf": [
131
- { "if": { "properties": { "contract": { "properties": { "kind": { "const": "lifecycle-work-unit" } } } } }, "then": { "required": ["stage_id"], "properties": { "contract": { "required": ["lifecycle_ref"] } } } },
132
- { "if": { "properties": { "contract": { "properties": { "kind": { "const": "slice-implementation" } } } } }, "then": { "required": ["stage_id"], "properties": { "contract": { "required": ["slice_contract_ref"] } } } },
133
- { "if": { "properties": { "contract": { "properties": { "kind": { "const": "template-maintenance" } } } } }, "then": { "properties": { "contract": { "required": ["maintenance_ref"] } } } },
134
- { "if": { "properties": { "execution_state": { "const": "Reviewer" } } }, "then": { "required": ["review_context"] } }
606
+ {
607
+ "if": {
608
+ "properties": {
609
+ "contract": {
610
+ "properties": {
611
+ "kind": {
612
+ "const": "lifecycle-work-unit"
613
+ }
614
+ }
615
+ }
616
+ }
617
+ },
618
+ "then": {
619
+ "required": [
620
+ "stage_id"
621
+ ],
622
+ "properties": {
623
+ "contract": {
624
+ "required": [
625
+ "lifecycle_ref"
626
+ ]
627
+ }
628
+ }
629
+ }
630
+ },
631
+ {
632
+ "if": {
633
+ "properties": {
634
+ "contract": {
635
+ "properties": {
636
+ "kind": {
637
+ "const": "slice-implementation"
638
+ }
639
+ }
640
+ }
641
+ }
642
+ },
643
+ "then": {
644
+ "required": [
645
+ "stage_id"
646
+ ],
647
+ "properties": {
648
+ "contract": {
649
+ "required": [
650
+ "slice_contract_ref"
651
+ ]
652
+ }
653
+ }
654
+ }
655
+ },
656
+ {
657
+ "if": {
658
+ "properties": {
659
+ "contract": {
660
+ "properties": {
661
+ "kind": {
662
+ "const": "template-maintenance"
663
+ }
664
+ }
665
+ }
666
+ }
667
+ },
668
+ "then": {
669
+ "properties": {
670
+ "contract": {
671
+ "required": [
672
+ "maintenance_ref"
673
+ ]
674
+ }
675
+ }
676
+ }
677
+ },
678
+ {
679
+ "if": {
680
+ "properties": {
681
+ "execution_state": {
682
+ "const": "Reviewer"
683
+ }
684
+ }
685
+ },
686
+ "then": {
687
+ "required": [
688
+ "review_context"
689
+ ]
690
+ }
691
+ }
135
692
  ]
136
693
  }