@tiic-tech/openworkflow 0.1.1 → 0.1.2

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 (213) hide show
  1. package/dist/adapters/codex/src/cleanCodexAdapter.js +4 -1
  2. package/dist/adapters/codex/src/cleanCodexAdapter.js.map +1 -1
  3. package/dist/adapters/codex/src/constants.d.ts +1 -0
  4. package/dist/adapters/codex/src/constants.js +2 -0
  5. package/dist/adapters/codex/src/constants.js.map +1 -0
  6. package/dist/adapters/codex/src/generateCommands.js +14 -9
  7. package/dist/adapters/codex/src/generateCommands.js.map +1 -1
  8. package/dist/adapters/codex/src/generateSkills.js +13 -0
  9. package/dist/adapters/codex/src/generateSkills.js.map +1 -1
  10. package/dist/adapters/codex/src/generatedFiles.js +1 -1
  11. package/dist/adapters/codex/src/manifest.js +11 -2
  12. package/dist/adapters/codex/src/manifest.js.map +1 -1
  13. package/dist/adapters/codex/src/templates.d.ts +0 -1
  14. package/dist/adapters/codex/src/templates.js +0 -1
  15. package/dist/adapters/codex/src/templates.js.map +1 -1
  16. package/dist/adapters/src/registry.d.ts +20 -0
  17. package/dist/adapters/src/registry.js +81 -0
  18. package/dist/adapters/src/registry.js.map +1 -0
  19. package/dist/cli/src/commands/brief.d.ts +46 -0
  20. package/dist/cli/src/commands/brief.js +294 -0
  21. package/dist/cli/src/commands/brief.js.map +1 -0
  22. package/dist/cli/src/commands/check.d.ts +42 -0
  23. package/dist/cli/src/commands/check.js +326 -0
  24. package/dist/cli/src/commands/check.js.map +1 -0
  25. package/dist/cli/src/commands/clean.js +46 -1
  26. package/dist/cli/src/commands/clean.js.map +1 -1
  27. package/dist/cli/src/commands/context.d.ts +1 -0
  28. package/dist/cli/src/commands/context.js +471 -0
  29. package/dist/cli/src/commands/context.js.map +1 -0
  30. package/dist/cli/src/commands/doctor.js +122 -12
  31. package/dist/cli/src/commands/doctor.js.map +1 -1
  32. package/dist/cli/src/commands/draft.d.ts +1 -0
  33. package/dist/cli/src/commands/draft.js +175 -0
  34. package/dist/cli/src/commands/draft.js.map +1 -0
  35. package/dist/cli/src/commands/gitAutomation.d.ts +1 -0
  36. package/dist/cli/src/commands/gitAutomation.js +378 -0
  37. package/dist/cli/src/commands/gitAutomation.js.map +1 -0
  38. package/dist/cli/src/commands/handoff.d.ts +22 -0
  39. package/dist/cli/src/commands/handoff.js +122 -0
  40. package/dist/cli/src/commands/handoff.js.map +1 -0
  41. package/dist/cli/src/commands/init.js +52 -1
  42. package/dist/cli/src/commands/init.js.map +1 -1
  43. package/dist/cli/src/commands/inspect.d.ts +23 -0
  44. package/dist/cli/src/commands/inspect.js +157 -0
  45. package/dist/cli/src/commands/inspect.js.map +1 -0
  46. package/dist/cli/src/commands/register.d.ts +1 -0
  47. package/dist/cli/src/commands/register.js +251 -0
  48. package/dist/cli/src/commands/register.js.map +1 -0
  49. package/dist/cli/src/commands/resume.d.ts +59 -0
  50. package/dist/cli/src/commands/resume.js +280 -0
  51. package/dist/cli/src/commands/resume.js.map +1 -0
  52. package/dist/cli/src/commands/shared.js +6 -2
  53. package/dist/cli/src/commands/shared.js.map +1 -1
  54. package/dist/cli/src/commands/summaries.d.ts +1 -0
  55. package/dist/cli/src/commands/summaries.js +77 -0
  56. package/dist/cli/src/commands/summaries.js.map +1 -0
  57. package/dist/cli/src/commands/summarize.d.ts +1 -0
  58. package/dist/cli/src/commands/summarize.js +316 -0
  59. package/dist/cli/src/commands/summarize.js.map +1 -0
  60. package/dist/cli/src/commands/sync.js +135 -12
  61. package/dist/cli/src/commands/sync.js.map +1 -1
  62. package/dist/cli/src/commands/validate.js +25 -1
  63. package/dist/cli/src/commands/validate.js.map +1 -1
  64. package/dist/cli/src/dev/verifyAgentE2E.d.ts +2 -0
  65. package/dist/cli/src/dev/verifyAgentE2E.js +391 -0
  66. package/dist/cli/src/dev/verifyAgentE2E.js.map +1 -0
  67. package/dist/cli/src/dev/verifyCleanCommand.js +213 -2
  68. package/dist/cli/src/dev/verifyCleanCommand.js.map +1 -1
  69. package/dist/cli/src/dev/verifyRuntimeSurface.js +4940 -54
  70. package/dist/cli/src/dev/verifyRuntimeSurface.js.map +1 -1
  71. package/dist/cli/src/dev/verifyWorkflowE2E.js +477 -45
  72. package/dist/cli/src/dev/verifyWorkflowE2E.js.map +1 -1
  73. package/dist/cli/src/index.js +184 -6
  74. package/dist/cli/src/index.js.map +1 -1
  75. package/dist/cli/src/report.d.ts +26 -0
  76. package/dist/cli/src/report.js +17 -0
  77. package/dist/cli/src/report.js.map +1 -0
  78. package/dist/core/src/artifacts/readiness.d.ts +7 -0
  79. package/dist/core/src/artifacts/readiness.js +240 -0
  80. package/dist/core/src/artifacts/readiness.js.map +1 -0
  81. package/dist/core/src/artifacts/registry.d.ts +9 -2
  82. package/dist/core/src/artifacts/registry.js +687 -60
  83. package/dist/core/src/artifacts/registry.js.map +1 -1
  84. package/dist/core/src/commands/registry.js +1425 -146
  85. package/dist/core/src/commands/registry.js.map +1 -1
  86. package/dist/core/src/contracts/index.d.ts +1 -1
  87. package/dist/core/src/fs/index.d.ts +24 -0
  88. package/dist/core/src/fs/index.js +48 -1
  89. package/dist/core/src/fs/index.js.map +1 -1
  90. package/dist/core/src/git/autonomousSimulator.d.ts +46 -0
  91. package/dist/core/src/git/autonomousSimulator.js +163 -0
  92. package/dist/core/src/git/autonomousSimulator.js.map +1 -0
  93. package/dist/core/src/git/branchIdentity.d.ts +19 -0
  94. package/dist/core/src/git/branchIdentity.js +75 -0
  95. package/dist/core/src/git/branchIdentity.js.map +1 -0
  96. package/dist/core/src/git/draftPrPilot.d.ts +47 -0
  97. package/dist/core/src/git/draftPrPilot.js +196 -0
  98. package/dist/core/src/git/draftPrPilot.js.map +1 -0
  99. package/dist/core/src/git/localEvidenceReader.d.ts +21 -0
  100. package/dist/core/src/git/localEvidenceReader.js +142 -0
  101. package/dist/core/src/git/localEvidenceReader.js.map +1 -0
  102. package/dist/core/src/git/localGitAutomation.d.ts +68 -0
  103. package/dist/core/src/git/localGitAutomation.js +470 -0
  104. package/dist/core/src/git/localGitAutomation.js.map +1 -0
  105. package/dist/core/src/git/mergeReadinessCheckpoint.d.ts +31 -0
  106. package/dist/core/src/git/mergeReadinessCheckpoint.js +110 -0
  107. package/dist/core/src/git/mergeReadinessCheckpoint.js.map +1 -0
  108. package/dist/core/src/git/prReadySummary.d.ts +16 -0
  109. package/dist/core/src/git/prReadySummary.js +144 -0
  110. package/dist/core/src/git/prReadySummary.js.map +1 -0
  111. package/dist/core/src/git/remoteReadonlyPlanner.d.ts +60 -0
  112. package/dist/core/src/git/remoteReadonlyPlanner.js +223 -0
  113. package/dist/core/src/git/remoteReadonlyPlanner.js.map +1 -0
  114. package/dist/core/src/onboarding/agentsGuide.d.ts +32 -0
  115. package/dist/core/src/onboarding/agentsGuide.js +164 -0
  116. package/dist/core/src/onboarding/agentsGuide.js.map +1 -0
  117. package/dist/core/src/validators/validateOpenWorkflow.js +1331 -15
  118. package/dist/core/src/validators/validateOpenWorkflow.js.map +1 -1
  119. package/dist/core/src/validators/validateRepositoryContracts.js +2321 -306
  120. package/dist/core/src/validators/validateRepositoryContracts.js.map +1 -1
  121. package/dist/core/src/workflow/cleanOpenWorkflow.d.ts +2 -0
  122. package/dist/core/src/workflow/cleanOpenWorkflow.js +97 -8
  123. package/dist/core/src/workflow/cleanOpenWorkflow.js.map +1 -1
  124. package/dist/core/src/workflow/doctorOpenWorkflow.d.ts +7 -0
  125. package/dist/core/src/workflow/doctorOpenWorkflow.js +26 -0
  126. package/dist/core/src/workflow/doctorOpenWorkflow.js.map +1 -0
  127. package/dist/core/src/workflow/initOpenWorkflow.d.ts +7 -0
  128. package/dist/core/src/workflow/initOpenWorkflow.js +96 -8
  129. package/dist/core/src/workflow/initOpenWorkflow.js.map +1 -1
  130. package/dist/core/src/workflow/planningQueueResume.d.ts +105 -0
  131. package/dist/core/src/workflow/planningQueueResume.js +596 -0
  132. package/dist/core/src/workflow/planningQueueResume.js.map +1 -0
  133. package/dist/core/src/workflow/readWorkflowConfig.d.ts +6 -0
  134. package/dist/core/src/workflow/readWorkflowConfig.js +28 -0
  135. package/dist/core/src/workflow/readWorkflowConfig.js.map +1 -0
  136. package/dist/core/src/workflow/summaryHealth.d.ts +60 -0
  137. package/dist/core/src/workflow/summaryHealth.js +713 -0
  138. package/dist/core/src/workflow/summaryHealth.js.map +1 -0
  139. package/dist/core/src/workflow/syncOpenWorkflow.d.ts +22 -0
  140. package/dist/core/src/workflow/syncOpenWorkflow.js +235 -0
  141. package/dist/core/src/workflow/syncOpenWorkflow.js.map +1 -0
  142. package/package.json +2 -1
  143. package/references/artifact-authoring-templates.md +14 -12
  144. package/references/artifact-instruction-envelope.md +133 -0
  145. package/references/coder-continuous-growth-loop.md +68 -0
  146. package/references/gh-operation-governance.md +114 -0
  147. package/references/git-automation-governance.md +324 -0
  148. package/references/git-version-control-governance.md +227 -0
  149. package/references/internal-coder-protocol.md +202 -0
  150. package/references/issue-governance.md +115 -0
  151. package/references/planning-artifact-contracts.md +595 -0
  152. package/references/planning-skill-runtime-exposure.md +159 -0
  153. package/references/proto-redesign-artifact-contracts.md +217 -0
  154. package/references/proto2html-artifact-contracts.md +113 -0
  155. package/references/skill-system-lifecycle.md +198 -0
  156. package/references/validation-trust-domains.md +286 -0
  157. package/references/workflow-blueprint-runtime-alignment.md +287 -0
  158. package/schemas/atom-tasks.schema.json +101 -0
  159. package/schemas/candidate-changes.schema.json +323 -0
  160. package/schemas/current-state.schema.json +113 -0
  161. package/schemas/html-prototype.schema.json +288 -0
  162. package/schemas/openworkflow-contract.schema.json +9 -1
  163. package/schemas/proto-prompt-pack.schema.json +1333 -0
  164. package/schemas/prototype-evidence.schema.json +684 -142
  165. package/schemas/selected-change.schema.json +104 -0
  166. package/schemas/validation-target.schema.json +187 -1
  167. package/schemas/validation.schema.json +187 -1
  168. package/schemas/vision-session.schema.json +151 -0
  169. package/skills/analyze-changes/SKILL.md +92 -0
  170. package/skills/analyze-changes/agents/openai.yaml +4 -0
  171. package/skills/analyze-changes/references/analysis-protocol.md +116 -0
  172. package/skills/build-proto-prompt/SKILL.md +125 -0
  173. package/skills/build-proto-prompt/references/output-boundary.md +54 -0
  174. package/skills/build-proto-prompt/references/prompt-pack-compiler-protocol.md +80 -0
  175. package/skills/build-prototype/SKILL.md +162 -38
  176. package/skills/build-prototype/agents/openai.yaml +2 -2
  177. package/skills/build-prototype/references/philosophy-engine.md +61 -0
  178. package/skills/build-prototype/references/strategic-prompt-pack-protocol.md +365 -0
  179. package/skills/build-prototype/references/vision2prompt/01_input_contract.md +84 -0
  180. package/skills/build-prototype/references/vision2prompt/02_vision_decomposition.md +108 -0
  181. package/skills/build-prototype/references/vision2prompt/03_strategy_hypothesis_generation.md +89 -0
  182. package/skills/build-prototype/references/vision2prompt/04_product_system_extraction.md +78 -0
  183. package/skills/build-prototype/references/vision2prompt/05_prototype_prompt_schema.md +189 -0
  184. package/skills/build-prototype/references/vision2prompt/06_output_templates.md +125 -0
  185. package/skills/build-prototype/references/vision2prompt/07_quality_rubric.md +171 -0
  186. package/skills/build-validation/SKILL.md +136 -54
  187. package/skills/build-validation/references/prototype-validation-target-rubric.md +35 -0
  188. package/skills/build-validation/references/return-to-vision-gate.md +32 -0
  189. package/skills/build-vision/SKILL.md +192 -0
  190. package/skills/build-vision/references/proto-readiness-rubric.md +48 -0
  191. package/skills/build-vision/references/vision-interview-protocol.md +48 -0
  192. package/skills/coder/SKILL.md +204 -0
  193. package/skills/decompose-to-changes/SKILL.md +176 -0
  194. package/skills/decompose-to-changes/agents/openai.yaml +4 -0
  195. package/skills/decompose-to-changes/references/decomposition-protocol.md +278 -0
  196. package/skills/prompt2proto/SKILL.md +157 -0
  197. package/skills/prompt2proto/agents/openai.yaml +4 -0
  198. package/skills/prompt2proto/references/00_role_philosophy_engine.md +96 -0
  199. package/skills/prompt2proto/references/01_input_contract.md +53 -0
  200. package/skills/prompt2proto/references/02_prompt_pack_readiness.md +50 -0
  201. package/skills/prompt2proto/references/03_visual_translation_workflow.md +64 -0
  202. package/skills/prompt2proto/references/04_output_contract.md +67 -0
  203. package/skills/prompt2proto/references/05_quality_rubric.md +46 -0
  204. package/skills/proto2html/SKILL.md +136 -0
  205. package/skills/proto2html/agents/openai.yaml +4 -0
  206. package/skills/proto2html/references/proto2html-protocol.md +115 -0
  207. package/skills/run-team/SKILL.md +4 -0
  208. package/skills/select-change/SKILL.md +200 -0
  209. package/skills/select-change/agents/openai.yaml +4 -0
  210. package/skills/select-change/references/selection-protocol.md +281 -0
  211. package/skills/tune-prototype/SKILL.md +121 -0
  212. package/skills/tune-prototype/agents/openai.yaml +4 -0
  213. package/skills/tune-prototype/references/refined-prompt-pack-protocol.md +161 -0
@@ -87,6 +87,12 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
87
87
  },
88
88
  evidencePolicy: "Reference human notes when intent needs explanation; do not embed long brainstorming transcript.",
89
89
  handoffKey: "handoff.next_command",
90
+ summaryPolicy: {
91
+ strategy: "current_slice",
92
+ path: "vision_delta",
93
+ loadBeforeFull: true,
94
+ refreshWhen: "Update the current slice when stable_answers or unresolved_questions change.",
95
+ },
90
96
  template: {
91
97
  schema_version: "0.1.0",
92
98
  contract_id: "vision:<id>",
@@ -99,14 +105,78 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
99
105
  unresolved_questions: [],
100
106
  vision_delta: {
101
107
  one_sentence: "",
108
+ problem: "",
102
109
  goals: [],
103
110
  non_goals: [],
104
111
  users: [],
105
112
  quality_bar: [],
113
+ ai_native_role: "",
114
+ success_signals: [],
115
+ failure_signals: [],
116
+ },
117
+ strategic_core: {
118
+ target_user: "",
119
+ context: "",
120
+ current_alternative: "",
121
+ pain: "",
122
+ desired_behavior_change: "",
123
+ core_mechanism: "",
124
+ core_differentiator: "",
125
+ strongest_success_signal: "",
126
+ failure_signals: [],
127
+ },
128
+ product_system_seed: {
129
+ product_thesis: "",
130
+ primary_loop: [],
131
+ interaction_model: "",
132
+ feature_system: [],
133
+ emotional_value: "",
134
+ functional_value: "",
135
+ trust_boundary: "",
136
+ privacy_boundary: "",
137
+ anti_goals: [],
138
+ future_opportunities: [],
139
+ },
140
+ proto_readiness: {
141
+ status: "missing",
142
+ missing_for_proto: [],
143
+ prototype_direction_seeds: [],
144
+ prompt_constraints: [],
145
+ validation_target: "",
146
+ downstream_notes: [],
147
+ },
148
+ coverage: {
149
+ target_user: {
150
+ status: "missing",
151
+ evidence: [],
152
+ follow_up_question: "",
153
+ },
154
+ differentiator: {
155
+ status: "missing",
156
+ evidence: [],
157
+ follow_up_question: "",
158
+ },
159
+ success_signal: {
160
+ status: "missing",
161
+ evidence: [],
162
+ follow_up_question: "",
163
+ },
164
+ trust_boundary: {
165
+ status: "missing",
166
+ evidence: [],
167
+ follow_up_question: "",
168
+ },
169
+ proto_readiness: {
170
+ status: "missing",
171
+ evidence: [],
172
+ follow_up_question: "",
173
+ },
106
174
  },
107
175
  handoff: {
108
176
  ready: false,
109
177
  next_command: null,
178
+ blockers: [],
179
+ readiness_notes: [],
110
180
  },
111
181
  updated_at: null,
112
182
  },
@@ -125,12 +195,21 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
125
195
  disclosureLevel: 2,
126
196
  requiredKeys: [
127
197
  "artifact_type",
198
+ "trigger",
128
199
  "core_question",
200
+ "central_uncertainty",
201
+ "hypothesis",
202
+ "target_behavior",
129
203
  "feature_classification",
130
204
  "critical_assumptions",
131
205
  "prototype_scope",
206
+ "prototype_experiment",
207
+ "observable_signals",
132
208
  "acceptance",
209
+ "decision_rules",
133
210
  "decision_options",
211
+ "vision_gaps",
212
+ "agent_readiness_gate",
134
213
  ],
135
214
  readPolicy: {
136
215
  loadByDefault: true,
@@ -146,8 +225,14 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
146
225
  idKey: "validation_id",
147
226
  pathKey: "path",
148
227
  },
149
- evidencePolicy: "Rank features and assumptions in YAML; keep rationale compact and defer examples to NOTE.md.",
228
+ evidencePolicy: "Compile one prototype validation target in YAML; keep rationale compact and defer examples to NOTE.md.",
150
229
  handoffKey: "prototype_scope",
230
+ summaryPolicy: {
231
+ strategy: "current_slice",
232
+ path: "core_question + central_uncertainty + target_behavior + prototype_experiment + observable_signals + decision_rules + agent_readiness_gate",
233
+ loadBeforeFull: true,
234
+ refreshWhen: "Update the current slice when the experiment target, evidence signals, decision rules, or readiness gate changes.",
235
+ },
151
236
  template: {
152
237
  schema_version: "0.1.0",
153
238
  contract_id: "validation:<id>",
@@ -155,7 +240,15 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
155
240
  artifact_type: "validation_target",
156
241
  title: "<short validation target title>",
157
242
  status: "draft",
243
+ trigger: {
244
+ mode: "user_explicit",
245
+ requested_command: "/ow:validation",
246
+ reason: "user_invoked_validation",
247
+ },
158
248
  core_question: "",
249
+ central_uncertainty: "",
250
+ hypothesis: "",
251
+ target_behavior: "",
159
252
  feature_classification: {
160
253
  existential: [],
161
254
  supporting: [],
@@ -167,8 +260,32 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
167
260
  include: [],
168
261
  exclude: [],
169
262
  },
263
+ prototype_experiment: {
264
+ scenario: "",
265
+ must_show: [],
266
+ must_not_show: [],
267
+ },
268
+ observable_signals: {
269
+ pass: [],
270
+ fail: [],
271
+ ambiguous: [],
272
+ },
170
273
  acceptance: [],
274
+ decision_rules: {
275
+ continue: [],
276
+ revise: [],
277
+ pivot: [],
278
+ stop: [],
279
+ needs_more_evidence: [],
280
+ },
171
281
  decision_options: ["continue", "revise", "pivot", "stop", "needs_more_evidence"],
282
+ vision_gaps: [],
283
+ agent_readiness_gate: {
284
+ status: "thin_validation",
285
+ blockers: [],
286
+ warnings: [],
287
+ write_authority: "/ow:validation",
288
+ },
172
289
  updated_at: null,
173
290
  },
174
291
  },
@@ -182,25 +299,31 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
182
299
  indexPath: ".openworkflow/prototypes/PROTOTYPE_INDEX.yaml",
183
300
  indexCollectionKey: "prototypes",
184
301
  notePath: ".openworkflow/prototypes/<id>/NOTE.md",
185
- reviewPath: ".openworkflow/prototypes/<id>/review.html",
302
+ reviewPath: null,
186
303
  disclosureLevel: 2,
187
304
  requiredKeys: [
188
305
  "artifact_type",
189
306
  "validation_target",
190
307
  "core_question",
191
308
  "prototype_mode",
192
- "reference_analysis",
193
- "visual_direction",
194
- "visual_concept_policy",
195
- "concept_evidence",
196
- "prototype_artifact",
197
- "run",
198
- "implementation_evidence",
199
- "observations",
200
- "evidence",
201
- "verification",
202
- "self_critique",
203
- "known_limits",
309
+ "prompt_pack_type",
310
+ "validation_input",
311
+ "source",
312
+ "internal_pipeline",
313
+ "preflight_quality_gate",
314
+ "direction_count_policy",
315
+ "normalized_input",
316
+ "strategic_core",
317
+ "product_experience_model",
318
+ "prototype_system_contract",
319
+ "prototype_reality_gate",
320
+ "directions",
321
+ "build_recommendation",
322
+ "prompt_text_manifest",
323
+ "post_validate",
324
+ "image_generation",
325
+ "negative_constraints",
326
+ "review_plan",
204
327
  "result",
205
328
  "handoff",
206
329
  ],
@@ -218,8 +341,14 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
218
341
  idKey: "prototype_id",
219
342
  pathKey: "path",
220
343
  },
221
- evidencePolicy: "Reference visual concepts, reference analyses, runnable artifacts, screenshots, logs, critique, and URLs by path; keep concept evidence distinct from implementation evidence and do not paste bulky evidence into YAML.",
344
+ evidencePolicy: "Reference strategic prompt packs, refined prompt packs, generated images, review notes, and decision evidence by path; keep image binaries out of YAML and do not turn prompt packs into production tasks.",
222
345
  handoffKey: "handoff.next_command",
346
+ summaryPolicy: {
347
+ strategy: "summary_file",
348
+ path: ".openworkflow/prototypes/<id>/SUMMARY.yaml",
349
+ loadBeforeFull: true,
350
+ refreshWhen: "Refresh after prompt pack, review evidence, result, or handoff changes.",
351
+ },
223
352
  template: {
224
353
  schema_version: "0.1.0",
225
354
  contract_id: "prototype:<id>",
@@ -227,59 +356,293 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
227
356
  artifact_type: "prototype_evidence",
228
357
  title: "<short prototype evidence title>",
229
358
  status: "draft",
230
- validation_target: "validation:<id>",
359
+ validation_target: null,
231
360
  core_question: "",
232
- prototype_mode: "visual|interaction|technical_feasibility|3d_material|workflow|data_logic",
233
- reference_analysis: [],
234
- visual_direction: {
235
- source: null,
236
- summary: "",
237
- tokens: {
238
- background: "",
239
- surface: "",
240
- foreground: "",
241
- muted: "",
242
- border: "",
243
- accent: "",
244
- display_font: "",
245
- body_font: "",
246
- radius: "",
247
- spacing: "",
248
- motion: "",
249
- density: "",
361
+ prototype_mode: "image_prompt_pack",
362
+ prompt_pack_type: "strategic_proto_prompt_pack",
363
+ validation_input: {
364
+ mode: "validation_present|agent_auto_generated",
365
+ refs: [],
366
+ notes: [],
367
+ },
368
+ source: {
369
+ refs: [],
370
+ target_tool: "image_generation",
371
+ output_language: "",
372
+ },
373
+ internal_pipeline: {
374
+ orchestrator_command: "/ow:proto",
375
+ user_visible_command: "/ow:proto",
376
+ current_stage: "proto-preflight",
377
+ stages: [
378
+ {
379
+ stage_id: "proto-preflight",
380
+ command: "/ow:proto",
381
+ visibility: "user",
382
+ status: "pending",
383
+ outputs: [],
384
+ },
385
+ {
386
+ stage_id: "vision2prompt",
387
+ command: "/ow:vision2prompt",
388
+ visibility: "internal",
389
+ status: "pending",
390
+ outputs: [],
391
+ },
392
+ {
393
+ stage_id: "prompt2proto",
394
+ command: "/ow:prompt2proto",
395
+ visibility: "internal",
396
+ status: "pending",
397
+ outputs: [],
398
+ },
399
+ ],
400
+ },
401
+ preflight_quality_gate: {
402
+ vision_status: "missing|thin|ready",
403
+ validation_status: "missing|thin|ready",
404
+ can_proceed: false,
405
+ blockers: [],
406
+ next_command_when_blocked: "/ow:vision",
407
+ required_followup_questions: [],
408
+ },
409
+ direction_count_policy: {
410
+ requested_count: null,
411
+ resolved_count: 3,
412
+ source: "user_input|agent_default_after_user_delegation",
413
+ ask_user_question_required: true,
414
+ ask_user_question: "How many strategically different prototype directions should /ow:proto generate?",
415
+ },
416
+ normalized_input: {
417
+ product_domain: "",
418
+ primary_user: "",
419
+ usage_context: "",
420
+ current_alternative: "",
421
+ core_pain: "",
422
+ desired_behavior_change: "",
423
+ strongest_success_signal: "",
424
+ core_differentiator: "",
425
+ emotional_value: "",
426
+ functional_value: "",
427
+ trust_requirements: [],
428
+ privacy_requirements: [],
429
+ non_goals: [],
430
+ future_opportunities: [],
431
+ validation_target: "",
432
+ },
433
+ strategic_core: {
434
+ target_user: "",
435
+ behavior_change: "",
436
+ mechanism: "",
437
+ differentiator: "",
438
+ boundary_conditions: [],
439
+ central_uncertainty: "",
440
+ },
441
+ product_experience_model: {
442
+ product_archetype: "",
443
+ primary_canvas: "",
444
+ information_architecture: [],
445
+ domain_object_model: [],
446
+ primary_task_loop: [],
447
+ interaction_state_model: [],
448
+ data_realism_requirements: [],
449
+ visual_language: [],
450
+ anti_generic_constraints: [],
451
+ category_quality_bar: [],
452
+ },
453
+ prototype_system_contract: {
454
+ stable_app_shell: [],
455
+ navigation_taxonomy: [],
456
+ data_vocabulary: [],
457
+ domain_object_anatomy: [],
458
+ object_detail_anatomy: [],
459
+ action_bar_contract: [],
460
+ audit_trust_pattern: [],
461
+ copy_tone: "",
462
+ allowed_screen_deltas: [],
463
+ },
464
+ prototype_reality_gate: {
465
+ status: "pending",
466
+ trigger: "before_image_generation",
467
+ required_when_prompt_text_ready: true,
468
+ dimensions: [
469
+ "product_category_fit",
470
+ "primary_canvas_fit",
471
+ "domain_object_realism",
472
+ "task_loop_completeness",
473
+ "interaction_state_coverage",
474
+ "data_realism",
475
+ "anti_generic_constraints",
476
+ ],
477
+ failures: [],
478
+ outcome_notes: [],
479
+ repair_route: "/ow:vision2prompt",
480
+ },
481
+ directions: [
482
+ {
483
+ direction_id: "",
484
+ name: "",
485
+ strategic_hypothesis: "",
486
+ validates: "",
487
+ main_risk: "",
488
+ distinctness_rationale: "",
489
+ prototype_prompt: "",
490
+ screen_prompts: [],
491
+ pm_judgment: "",
250
492
  },
493
+ ],
494
+ build_recommendation: {
495
+ first_direction_id: "",
496
+ why_first: "",
497
+ success_signals: [],
498
+ failure_signals: [],
499
+ next_test_if_it_works: "",
251
500
  },
252
- visual_concept_policy: {
253
- image_generation: "generated|skipped_by_user|not_applicable",
254
- skip_reason: null,
501
+ tune_input: {
502
+ baseline_source_type: "images|prompt_pack|screen_descriptions|mixed",
503
+ baseline_refs: [],
504
+ tune_request: "",
505
+ target_form_factor: "",
506
+ regeneration_scope: "all_screens|selected_screens|one_screen|new_screens_only|design_system_pass",
507
+ target_screen_count: null,
508
+ locked_screens: [],
509
+ locked_elements: [],
510
+ constraints: [],
255
511
  },
256
- concept_evidence: [],
257
- prototype_artifact: {
258
- path: "",
259
- type: "",
512
+ baseline_resolution: {
513
+ latest_approved_baseline_group_id: "",
514
+ latest_approved_baseline_ref: "",
515
+ baseline_lineage: [],
516
+ resolution_rule: "Use the latest approved prototype group or refined prompt pack unless the user explicitly selects an older baseline.",
517
+ stale_source_guard: "Do not silently revert to an earlier source screen group during repeated tune passes.",
260
518
  },
261
- run: {
262
- command: "",
263
- url: null,
519
+ carry_forward: {
520
+ locked_screens: [],
521
+ locked_elements: [],
522
+ preserved_improvements: [],
523
+ explicit_unlocks: [],
524
+ cumulative_drift_guard: "Carry forward accepted improvements and locked elements unless the tune request explicitly unlocks or removes them.",
525
+ },
526
+ baseline_audit: [
527
+ {
528
+ source_screen_id: "",
529
+ screen_name: "",
530
+ journey_stage: "",
531
+ user_goal: "",
532
+ system_state: "",
533
+ components: [],
534
+ copy_tone: "",
535
+ represented_feature: "",
536
+ ai_or_system_behavior: "",
537
+ trust_controls: [],
538
+ visual_cues: [],
539
+ must_preserve: [],
540
+ transform_or_remove: [],
541
+ assumptions: [],
542
+ },
543
+ ],
544
+ product_system: {
545
+ product_thesis: "",
546
+ target_user: "",
547
+ primary_loop: "",
548
+ brand_promise: "",
549
+ interaction_model: "",
550
+ information_architecture: [],
551
+ design_language: [],
552
+ component_vocabulary: [],
553
+ copywriting_style: "",
554
+ feature_system: [],
555
+ trust_and_boundary_system: [],
556
+ anti_goals: [],
557
+ stable_constants: [],
558
+ adaptable_variables: [],
264
559
  },
265
- implementation_evidence: [],
560
+ delta_rules: {
561
+ must_inherit: [],
562
+ must_add: [],
563
+ must_remove: [],
564
+ flexible_change: [],
565
+ },
566
+ screen_delta_matrix: [
567
+ {
568
+ target_screen_id: "",
569
+ source_screen_ids: [],
570
+ preserve: [],
571
+ add: [],
572
+ remove: [],
573
+ transform: [],
574
+ flexible: [],
575
+ acceptance_criteria: [],
576
+ },
577
+ ],
578
+ screen_manifest: [
579
+ {
580
+ target_screen_id: "",
581
+ source_screen_ids: [],
582
+ screen_name: "",
583
+ target_form_factor: "",
584
+ generation_scope: "",
585
+ dependencies: [],
586
+ },
587
+ ],
588
+ global_design_prompt: "",
589
+ screen_prompts: [
590
+ {
591
+ prompt_id: "",
592
+ target_screen_id: "",
593
+ source_screen_ids: [],
594
+ screen_name: "",
595
+ image_role: "",
596
+ prompt: "",
597
+ negative_prompt: "",
598
+ acceptance_criteria: [],
599
+ },
600
+ ],
601
+ generation_order: [],
602
+ acceptance_checklist: [],
603
+ prompt_text_manifest: {
604
+ status: "draft",
605
+ directions_ready: false,
606
+ direction_count: 0,
607
+ prompt_text_refs: [],
608
+ },
609
+ post_validate: {
610
+ status: "pending",
611
+ trigger: "after_prompt_assets_ready",
612
+ required_when_direction_count_gte: 2,
613
+ skip_when_resolved_count: 1,
614
+ threshold_policy: {
615
+ method: "strategic_fingerprint_similarity",
616
+ max_pairwise_similarity: 0.65,
617
+ comparison: "pairwise",
618
+ },
619
+ fingerprint_dimensions: [
620
+ "product_form",
621
+ "trigger",
622
+ "interaction_model",
623
+ "emotional_driver",
624
+ "retention_mechanism",
625
+ "metric",
626
+ "main_risk",
627
+ "trust_model",
628
+ "privacy_model",
629
+ ],
630
+ comparisons: [],
631
+ failures: [],
632
+ outcome_notes: [],
633
+ repair_route: "/ow:vision2prompt",
634
+ },
635
+ image_generation: {
636
+ status: "not_started",
637
+ batch_strategy: "Generate each selected direction as a coherent multi-image screen group after prompt_text_manifest.status is ready_for_image_generation.",
638
+ generated_images: [],
639
+ collection_notes: [],
640
+ },
641
+ negative_constraints: [],
642
+ review_plan: {},
266
643
  observations: [],
267
644
  evidence: [],
268
- verification: {
269
- browser_checks: [],
270
- screenshots: [],
271
- logs: [],
272
- },
273
- self_critique: {
274
- philosophy: "",
275
- hierarchy: "",
276
- execution: "",
277
- specificity: "",
278
- restraint: "",
279
- accessibility: "",
280
- responsive_behavior: "",
281
- repairs: [],
282
- },
645
+ generated_images: [],
283
646
  known_limits: [],
284
647
  result: "not_reviewed",
285
648
  handoff: {
@@ -327,6 +690,12 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
327
690
  },
328
691
  evidencePolicy: "Reference reviewed evidence and user feedback; summarize rationale without copying full review transcripts.",
329
692
  handoffKey: "next_command",
693
+ summaryPolicy: {
694
+ strategy: "current_slice",
695
+ path: "outcome + rationale + next_command + follow_up_questions",
696
+ loadBeforeFull: true,
697
+ refreshWhen: "Update whenever the decision outcome or next command changes.",
698
+ },
330
699
  template: {
331
700
  schema_version: "0.1.0",
332
701
  contract_id: "decision:<id>",
@@ -388,6 +757,12 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
388
757
  },
389
758
  evidencePolicy: "Reference accepted prototype evidence and decision records by path; keep product design decisions in PRODUCT_DESIGN.yaml.",
390
759
  handoffKey: "spec_readiness.next_command",
760
+ summaryPolicy: {
761
+ strategy: "summary_file",
762
+ path: ".openworkflow/design/<id>/SUMMARY.yaml",
763
+ loadBeforeFull: true,
764
+ refreshWhen: "Refresh after product design scope, open questions, or spec readiness changes.",
765
+ },
391
766
  conditionalPackets: [
392
767
  {
393
768
  artifactType: "tech_spec",
@@ -467,6 +842,258 @@ export const DISCOVERY_ARTIFACT_CONTRACTS = [
467
842
  updated_at: null,
468
843
  },
469
844
  },
845
+ {
846
+ artifactType: "production_spec",
847
+ contractType: "spec",
848
+ command: "/ow:spec",
849
+ title: "Production spec",
850
+ sourceOfTruthPath: ".openworkflow/specs/<id>/SPEC.yaml",
851
+ templatePath: ".openworkflow/specs/_templates/SPEC.yaml",
852
+ indexPath: ".openworkflow/specs/SPEC_INDEX.yaml",
853
+ indexCollectionKey: "specs",
854
+ notePath: ".openworkflow/specs/<id>/NOTE.md",
855
+ reviewPath: null,
856
+ disclosureLevel: 2,
857
+ requiredKeys: [
858
+ "artifact_type",
859
+ "source_design",
860
+ "goal",
861
+ "scope",
862
+ "requirements",
863
+ "interfaces",
864
+ "acceptance",
865
+ "verification",
866
+ "risks",
867
+ "change_readiness",
868
+ ],
869
+ readPolicy: {
870
+ loadByDefault: true,
871
+ agentReadOrder: 70,
872
+ maxYamlLines: 220,
873
+ maxNoteLines: 60,
874
+ rawEvidence: "only_when_referenced",
875
+ },
876
+ activePointer: {
877
+ indexPath: ".openworkflow/specs/SPEC_INDEX.yaml",
878
+ pointerKey: "current_spec",
879
+ collectionKey: "specs",
880
+ idKey: "spec_id",
881
+ pathKey: "path",
882
+ },
883
+ evidencePolicy: "Reference product design and conditional design packets by path; keep implementation requirements concrete and bounded.",
884
+ handoffKey: "change_readiness.next_command",
885
+ summaryPolicy: {
886
+ strategy: "summary_file",
887
+ path: ".openworkflow/specs/<id>/SUMMARY.yaml",
888
+ loadBeforeFull: true,
889
+ refreshWhen: "Refresh after scope, interfaces, acceptance, verification, risks, or change readiness changes.",
890
+ },
891
+ template: {
892
+ schema_version: "0.1.0",
893
+ contract_id: "spec:<id>",
894
+ contract_type: "spec",
895
+ artifact_type: "production_spec",
896
+ title: "<short production spec title>",
897
+ status: "draft",
898
+ source_design: "",
899
+ goal: "",
900
+ scope: {
901
+ in: [],
902
+ out: [],
903
+ },
904
+ requirements: {
905
+ user_facing: [],
906
+ functional: [],
907
+ non_functional: [],
908
+ },
909
+ interfaces: {
910
+ ui: [],
911
+ api: [],
912
+ data: [],
913
+ integrations: [],
914
+ },
915
+ acceptance: [],
916
+ verification: {
917
+ commands: [],
918
+ manual_checks: [],
919
+ },
920
+ risks: [],
921
+ change_readiness: {
922
+ ready: false,
923
+ blockers: [],
924
+ next_command: null,
925
+ },
926
+ updated_at: null,
927
+ },
928
+ },
929
+ {
930
+ artifactType: "production_change",
931
+ contractType: "change",
932
+ command: "/ow:change",
933
+ title: "Production change",
934
+ sourceOfTruthPath: ".openworkflow/changes/<id>/CHANGE.yaml",
935
+ templatePath: ".openworkflow/changes/_templates/CHANGE.yaml",
936
+ indexPath: ".openworkflow/changes/CHANGE_INDEX.yaml",
937
+ indexCollectionKey: "changes",
938
+ notePath: ".openworkflow/changes/<id>/NOTE.md",
939
+ reviewPath: null,
940
+ disclosureLevel: 2,
941
+ requiredKeys: [
942
+ "artifact_type",
943
+ "source_spec",
944
+ "problem",
945
+ "goals",
946
+ "non_goals",
947
+ "affected_paths",
948
+ "acceptance",
949
+ "validation",
950
+ "work_items",
951
+ "risks",
952
+ "runtime_readiness",
953
+ ],
954
+ readPolicy: {
955
+ loadByDefault: true,
956
+ agentReadOrder: 80,
957
+ maxYamlLines: 220,
958
+ maxNoteLines: 60,
959
+ rawEvidence: "only_when_referenced",
960
+ },
961
+ activePointer: {
962
+ indexPath: ".openworkflow/changes/CHANGE_INDEX.yaml",
963
+ pointerKey: "current_change",
964
+ collectionKey: "changes",
965
+ idKey: "change_id",
966
+ pathKey: "path",
967
+ },
968
+ evidencePolicy: "Reference the source spec and repo inspection notes; keep implementation planning traceable and scoped.",
969
+ handoffKey: "runtime_readiness.next_command",
970
+ summaryPolicy: {
971
+ strategy: "summary_file",
972
+ path: ".openworkflow/changes/<id>/SUMMARY.yaml",
973
+ loadBeforeFull: true,
974
+ refreshWhen: "Refresh after affected paths, work items, validation, risks, or runtime readiness changes.",
975
+ },
976
+ conditionalPackets: [
977
+ {
978
+ artifactType: "work_items",
979
+ path: ".openworkflow/changes/<id>/WORK_ITEMS.yaml",
980
+ requiredByDefault: true,
981
+ when: "Use for ordered implementation tasks with owned paths, dependencies, acceptance, and verification.",
982
+ },
983
+ ],
984
+ template: {
985
+ schema_version: "0.1.0",
986
+ contract_id: "change:<id>",
987
+ contract_type: "change",
988
+ artifact_type: "production_change",
989
+ title: "<short production change title>",
990
+ status: "draft",
991
+ source_spec: "",
992
+ problem: "",
993
+ goals: [],
994
+ non_goals: [],
995
+ affected_paths: [],
996
+ acceptance: [],
997
+ validation: [],
998
+ work_items: {
999
+ path: ".openworkflow/changes/<id>/WORK_ITEMS.yaml",
1000
+ summary: [],
1001
+ },
1002
+ risks: [],
1003
+ runtime_readiness: {
1004
+ ready: false,
1005
+ blockers: [],
1006
+ next_command: null,
1007
+ },
1008
+ updated_at: null,
1009
+ },
1010
+ },
1011
+ {
1012
+ artifactType: "team_runtime",
1013
+ contractType: "runtime",
1014
+ command: "/ow:team",
1015
+ title: "Team runtime",
1016
+ sourceOfTruthPath: ".openworkflow/runtime/<id>/STATE.yaml",
1017
+ templatePath: ".openworkflow/runtime/_templates/STATE.yaml",
1018
+ indexPath: ".openworkflow/runtime/RUNTIME_INDEX.yaml",
1019
+ indexCollectionKey: "runs",
1020
+ notePath: ".openworkflow/runtime/<id>/NOTE.md",
1021
+ reviewPath: null,
1022
+ disclosureLevel: 2,
1023
+ requiredKeys: [
1024
+ "artifact_type",
1025
+ "source_change",
1026
+ "active_work_item",
1027
+ "execution_mode",
1028
+ "work_queue",
1029
+ "agents",
1030
+ "verification",
1031
+ "issues",
1032
+ "checkpoints",
1033
+ "handoff",
1034
+ ],
1035
+ readPolicy: {
1036
+ loadByDefault: true,
1037
+ agentReadOrder: 90,
1038
+ maxYamlLines: 220,
1039
+ maxNoteLines: 80,
1040
+ rawEvidence: "only_when_referenced",
1041
+ },
1042
+ activePointer: {
1043
+ indexPath: ".openworkflow/runtime/RUNTIME_INDEX.yaml",
1044
+ pointerKey: "current_run",
1045
+ collectionKey: "runs",
1046
+ idKey: "run_id",
1047
+ pathKey: "path",
1048
+ },
1049
+ evidencePolicy: "Reference change, work items, verification logs, issues, and checkpoints by path; keep current execution state compact.",
1050
+ handoffKey: "handoff.next_action",
1051
+ summaryPolicy: {
1052
+ strategy: "summary_file",
1053
+ path: ".openworkflow/runtime/<id>/SUMMARY.yaml",
1054
+ loadBeforeFull: true,
1055
+ refreshWhen: "Refresh after active work item, verification, issues, checkpoints, or handoff changes.",
1056
+ },
1057
+ conditionalPackets: [
1058
+ {
1059
+ artifactType: "runtime_issues",
1060
+ path: ".openworkflow/runtime/<id>/ISSUES.yaml",
1061
+ requiredByDefault: false,
1062
+ when: "Use when implementation or verification finds blockers, regressions, or follow-up issues.",
1063
+ },
1064
+ {
1065
+ artifactType: "runtime_checkpoints",
1066
+ path: ".openworkflow/runtime/<id>/CHECKPOINTS.yaml",
1067
+ requiredByDefault: false,
1068
+ when: "Use when recording commits, verification gates, QA checkpoints, or release readiness.",
1069
+ },
1070
+ ],
1071
+ template: {
1072
+ schema_version: "0.1.0",
1073
+ contract_id: "runtime:<id>",
1074
+ contract_type: "runtime",
1075
+ artifact_type: "team_runtime",
1076
+ title: "<short runtime title>",
1077
+ status: "active",
1078
+ source_change: "",
1079
+ active_work_item: null,
1080
+ execution_mode: "single_agent|agent_team|reconcile|qa_fix",
1081
+ work_queue: [],
1082
+ agents: [],
1083
+ verification: {
1084
+ commands: [],
1085
+ results: [],
1086
+ },
1087
+ issues: [],
1088
+ checkpoints: [],
1089
+ handoff: {
1090
+ status: "in_progress",
1091
+ next_action: null,
1092
+ blockers: [],
1093
+ },
1094
+ updated_at: null,
1095
+ },
1096
+ },
470
1097
  ];
471
1098
  export function getDiscoveryArtifactContracts() {
472
1099
  return DISCOVERY_ARTIFACT_CONTRACTS;