@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.
- package/dist/adapters/codex/src/cleanCodexAdapter.js +4 -1
- package/dist/adapters/codex/src/cleanCodexAdapter.js.map +1 -1
- package/dist/adapters/codex/src/constants.d.ts +1 -0
- package/dist/adapters/codex/src/constants.js +2 -0
- package/dist/adapters/codex/src/constants.js.map +1 -0
- package/dist/adapters/codex/src/generateCommands.js +14 -9
- package/dist/adapters/codex/src/generateCommands.js.map +1 -1
- package/dist/adapters/codex/src/generateSkills.js +13 -0
- package/dist/adapters/codex/src/generateSkills.js.map +1 -1
- package/dist/adapters/codex/src/generatedFiles.js +1 -1
- package/dist/adapters/codex/src/manifest.js +11 -2
- package/dist/adapters/codex/src/manifest.js.map +1 -1
- package/dist/adapters/codex/src/templates.d.ts +0 -1
- package/dist/adapters/codex/src/templates.js +0 -1
- package/dist/adapters/codex/src/templates.js.map +1 -1
- package/dist/adapters/src/registry.d.ts +20 -0
- package/dist/adapters/src/registry.js +81 -0
- package/dist/adapters/src/registry.js.map +1 -0
- package/dist/cli/src/commands/brief.d.ts +46 -0
- package/dist/cli/src/commands/brief.js +294 -0
- package/dist/cli/src/commands/brief.js.map +1 -0
- package/dist/cli/src/commands/check.d.ts +42 -0
- package/dist/cli/src/commands/check.js +326 -0
- package/dist/cli/src/commands/check.js.map +1 -0
- package/dist/cli/src/commands/clean.js +46 -1
- package/dist/cli/src/commands/clean.js.map +1 -1
- package/dist/cli/src/commands/context.d.ts +1 -0
- package/dist/cli/src/commands/context.js +471 -0
- package/dist/cli/src/commands/context.js.map +1 -0
- package/dist/cli/src/commands/doctor.js +122 -12
- package/dist/cli/src/commands/doctor.js.map +1 -1
- package/dist/cli/src/commands/draft.d.ts +1 -0
- package/dist/cli/src/commands/draft.js +175 -0
- package/dist/cli/src/commands/draft.js.map +1 -0
- package/dist/cli/src/commands/gitAutomation.d.ts +1 -0
- package/dist/cli/src/commands/gitAutomation.js +378 -0
- package/dist/cli/src/commands/gitAutomation.js.map +1 -0
- package/dist/cli/src/commands/handoff.d.ts +22 -0
- package/dist/cli/src/commands/handoff.js +122 -0
- package/dist/cli/src/commands/handoff.js.map +1 -0
- package/dist/cli/src/commands/init.js +52 -1
- package/dist/cli/src/commands/init.js.map +1 -1
- package/dist/cli/src/commands/inspect.d.ts +23 -0
- package/dist/cli/src/commands/inspect.js +157 -0
- package/dist/cli/src/commands/inspect.js.map +1 -0
- package/dist/cli/src/commands/register.d.ts +1 -0
- package/dist/cli/src/commands/register.js +251 -0
- package/dist/cli/src/commands/register.js.map +1 -0
- package/dist/cli/src/commands/resume.d.ts +59 -0
- package/dist/cli/src/commands/resume.js +280 -0
- package/dist/cli/src/commands/resume.js.map +1 -0
- package/dist/cli/src/commands/shared.js +6 -2
- package/dist/cli/src/commands/shared.js.map +1 -1
- package/dist/cli/src/commands/summaries.d.ts +1 -0
- package/dist/cli/src/commands/summaries.js +77 -0
- package/dist/cli/src/commands/summaries.js.map +1 -0
- package/dist/cli/src/commands/summarize.d.ts +1 -0
- package/dist/cli/src/commands/summarize.js +316 -0
- package/dist/cli/src/commands/summarize.js.map +1 -0
- package/dist/cli/src/commands/sync.js +135 -12
- package/dist/cli/src/commands/sync.js.map +1 -1
- package/dist/cli/src/commands/validate.js +25 -1
- package/dist/cli/src/commands/validate.js.map +1 -1
- package/dist/cli/src/dev/verifyAgentE2E.d.ts +2 -0
- package/dist/cli/src/dev/verifyAgentE2E.js +391 -0
- package/dist/cli/src/dev/verifyAgentE2E.js.map +1 -0
- package/dist/cli/src/dev/verifyCleanCommand.js +213 -2
- package/dist/cli/src/dev/verifyCleanCommand.js.map +1 -1
- package/dist/cli/src/dev/verifyRuntimeSurface.js +4940 -54
- package/dist/cli/src/dev/verifyRuntimeSurface.js.map +1 -1
- package/dist/cli/src/dev/verifyWorkflowE2E.js +477 -45
- package/dist/cli/src/dev/verifyWorkflowE2E.js.map +1 -1
- package/dist/cli/src/index.js +184 -6
- package/dist/cli/src/index.js.map +1 -1
- package/dist/cli/src/report.d.ts +26 -0
- package/dist/cli/src/report.js +17 -0
- package/dist/cli/src/report.js.map +1 -0
- package/dist/core/src/artifacts/readiness.d.ts +7 -0
- package/dist/core/src/artifacts/readiness.js +240 -0
- package/dist/core/src/artifacts/readiness.js.map +1 -0
- package/dist/core/src/artifacts/registry.d.ts +9 -2
- package/dist/core/src/artifacts/registry.js +687 -60
- package/dist/core/src/artifacts/registry.js.map +1 -1
- package/dist/core/src/commands/registry.js +1425 -146
- package/dist/core/src/commands/registry.js.map +1 -1
- package/dist/core/src/contracts/index.d.ts +1 -1
- package/dist/core/src/fs/index.d.ts +24 -0
- package/dist/core/src/fs/index.js +48 -1
- package/dist/core/src/fs/index.js.map +1 -1
- package/dist/core/src/git/autonomousSimulator.d.ts +46 -0
- package/dist/core/src/git/autonomousSimulator.js +163 -0
- package/dist/core/src/git/autonomousSimulator.js.map +1 -0
- package/dist/core/src/git/branchIdentity.d.ts +19 -0
- package/dist/core/src/git/branchIdentity.js +75 -0
- package/dist/core/src/git/branchIdentity.js.map +1 -0
- package/dist/core/src/git/draftPrPilot.d.ts +47 -0
- package/dist/core/src/git/draftPrPilot.js +196 -0
- package/dist/core/src/git/draftPrPilot.js.map +1 -0
- package/dist/core/src/git/localEvidenceReader.d.ts +21 -0
- package/dist/core/src/git/localEvidenceReader.js +142 -0
- package/dist/core/src/git/localEvidenceReader.js.map +1 -0
- package/dist/core/src/git/localGitAutomation.d.ts +68 -0
- package/dist/core/src/git/localGitAutomation.js +470 -0
- package/dist/core/src/git/localGitAutomation.js.map +1 -0
- package/dist/core/src/git/mergeReadinessCheckpoint.d.ts +31 -0
- package/dist/core/src/git/mergeReadinessCheckpoint.js +110 -0
- package/dist/core/src/git/mergeReadinessCheckpoint.js.map +1 -0
- package/dist/core/src/git/prReadySummary.d.ts +16 -0
- package/dist/core/src/git/prReadySummary.js +144 -0
- package/dist/core/src/git/prReadySummary.js.map +1 -0
- package/dist/core/src/git/remoteReadonlyPlanner.d.ts +60 -0
- package/dist/core/src/git/remoteReadonlyPlanner.js +223 -0
- package/dist/core/src/git/remoteReadonlyPlanner.js.map +1 -0
- package/dist/core/src/onboarding/agentsGuide.d.ts +32 -0
- package/dist/core/src/onboarding/agentsGuide.js +164 -0
- package/dist/core/src/onboarding/agentsGuide.js.map +1 -0
- package/dist/core/src/validators/validateOpenWorkflow.js +1331 -15
- package/dist/core/src/validators/validateOpenWorkflow.js.map +1 -1
- package/dist/core/src/validators/validateRepositoryContracts.js +2321 -306
- package/dist/core/src/validators/validateRepositoryContracts.js.map +1 -1
- package/dist/core/src/workflow/cleanOpenWorkflow.d.ts +2 -0
- package/dist/core/src/workflow/cleanOpenWorkflow.js +97 -8
- package/dist/core/src/workflow/cleanOpenWorkflow.js.map +1 -1
- package/dist/core/src/workflow/doctorOpenWorkflow.d.ts +7 -0
- package/dist/core/src/workflow/doctorOpenWorkflow.js +26 -0
- package/dist/core/src/workflow/doctorOpenWorkflow.js.map +1 -0
- package/dist/core/src/workflow/initOpenWorkflow.d.ts +7 -0
- package/dist/core/src/workflow/initOpenWorkflow.js +96 -8
- package/dist/core/src/workflow/initOpenWorkflow.js.map +1 -1
- package/dist/core/src/workflow/planningQueueResume.d.ts +105 -0
- package/dist/core/src/workflow/planningQueueResume.js +596 -0
- package/dist/core/src/workflow/planningQueueResume.js.map +1 -0
- package/dist/core/src/workflow/readWorkflowConfig.d.ts +6 -0
- package/dist/core/src/workflow/readWorkflowConfig.js +28 -0
- package/dist/core/src/workflow/readWorkflowConfig.js.map +1 -0
- package/dist/core/src/workflow/summaryHealth.d.ts +60 -0
- package/dist/core/src/workflow/summaryHealth.js +713 -0
- package/dist/core/src/workflow/summaryHealth.js.map +1 -0
- package/dist/core/src/workflow/syncOpenWorkflow.d.ts +22 -0
- package/dist/core/src/workflow/syncOpenWorkflow.js +235 -0
- package/dist/core/src/workflow/syncOpenWorkflow.js.map +1 -0
- package/package.json +2 -1
- package/references/artifact-authoring-templates.md +14 -12
- package/references/artifact-instruction-envelope.md +133 -0
- package/references/coder-continuous-growth-loop.md +68 -0
- package/references/gh-operation-governance.md +114 -0
- package/references/git-automation-governance.md +324 -0
- package/references/git-version-control-governance.md +227 -0
- package/references/internal-coder-protocol.md +202 -0
- package/references/issue-governance.md +115 -0
- package/references/planning-artifact-contracts.md +595 -0
- package/references/planning-skill-runtime-exposure.md +159 -0
- package/references/proto-redesign-artifact-contracts.md +217 -0
- package/references/proto2html-artifact-contracts.md +113 -0
- package/references/skill-system-lifecycle.md +198 -0
- package/references/validation-trust-domains.md +286 -0
- package/references/workflow-blueprint-runtime-alignment.md +287 -0
- package/schemas/atom-tasks.schema.json +101 -0
- package/schemas/candidate-changes.schema.json +323 -0
- package/schemas/current-state.schema.json +113 -0
- package/schemas/html-prototype.schema.json +288 -0
- package/schemas/openworkflow-contract.schema.json +9 -1
- package/schemas/proto-prompt-pack.schema.json +1333 -0
- package/schemas/prototype-evidence.schema.json +684 -142
- package/schemas/selected-change.schema.json +104 -0
- package/schemas/validation-target.schema.json +187 -1
- package/schemas/validation.schema.json +187 -1
- package/schemas/vision-session.schema.json +151 -0
- package/skills/analyze-changes/SKILL.md +92 -0
- package/skills/analyze-changes/agents/openai.yaml +4 -0
- package/skills/analyze-changes/references/analysis-protocol.md +116 -0
- package/skills/build-proto-prompt/SKILL.md +125 -0
- package/skills/build-proto-prompt/references/output-boundary.md +54 -0
- package/skills/build-proto-prompt/references/prompt-pack-compiler-protocol.md +80 -0
- package/skills/build-prototype/SKILL.md +162 -38
- package/skills/build-prototype/agents/openai.yaml +2 -2
- package/skills/build-prototype/references/philosophy-engine.md +61 -0
- package/skills/build-prototype/references/strategic-prompt-pack-protocol.md +365 -0
- package/skills/build-prototype/references/vision2prompt/01_input_contract.md +84 -0
- package/skills/build-prototype/references/vision2prompt/02_vision_decomposition.md +108 -0
- package/skills/build-prototype/references/vision2prompt/03_strategy_hypothesis_generation.md +89 -0
- package/skills/build-prototype/references/vision2prompt/04_product_system_extraction.md +78 -0
- package/skills/build-prototype/references/vision2prompt/05_prototype_prompt_schema.md +189 -0
- package/skills/build-prototype/references/vision2prompt/06_output_templates.md +125 -0
- package/skills/build-prototype/references/vision2prompt/07_quality_rubric.md +171 -0
- package/skills/build-validation/SKILL.md +136 -54
- package/skills/build-validation/references/prototype-validation-target-rubric.md +35 -0
- package/skills/build-validation/references/return-to-vision-gate.md +32 -0
- package/skills/build-vision/SKILL.md +192 -0
- package/skills/build-vision/references/proto-readiness-rubric.md +48 -0
- package/skills/build-vision/references/vision-interview-protocol.md +48 -0
- package/skills/coder/SKILL.md +204 -0
- package/skills/decompose-to-changes/SKILL.md +176 -0
- package/skills/decompose-to-changes/agents/openai.yaml +4 -0
- package/skills/decompose-to-changes/references/decomposition-protocol.md +278 -0
- package/skills/prompt2proto/SKILL.md +157 -0
- package/skills/prompt2proto/agents/openai.yaml +4 -0
- package/skills/prompt2proto/references/00_role_philosophy_engine.md +96 -0
- package/skills/prompt2proto/references/01_input_contract.md +53 -0
- package/skills/prompt2proto/references/02_prompt_pack_readiness.md +50 -0
- package/skills/prompt2proto/references/03_visual_translation_workflow.md +64 -0
- package/skills/prompt2proto/references/04_output_contract.md +67 -0
- package/skills/prompt2proto/references/05_quality_rubric.md +46 -0
- package/skills/proto2html/SKILL.md +136 -0
- package/skills/proto2html/agents/openai.yaml +4 -0
- package/skills/proto2html/references/proto2html-protocol.md +115 -0
- package/skills/run-team/SKILL.md +4 -0
- package/skills/select-change/SKILL.md +200 -0
- package/skills/select-change/agents/openai.yaml +4 -0
- package/skills/select-change/references/selection-protocol.md +281 -0
- package/skills/tune-prototype/SKILL.md +121 -0
- package/skills/tune-prototype/agents/openai.yaml +4 -0
- package/skills/tune-prototype/references/refined-prompt-pack-protocol.md +161 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Selection Protocol
|
|
2
|
+
|
|
3
|
+
Use this reference when selecting one candidate from `CANDIDATE_CHANGES.yaml`
|
|
4
|
+
and preparing implementation artifacts.
|
|
5
|
+
|
|
6
|
+
## Selection Inputs
|
|
7
|
+
|
|
8
|
+
Required:
|
|
9
|
+
|
|
10
|
+
- `CANDIDATE_CHANGES.yaml`
|
|
11
|
+
|
|
12
|
+
Optional:
|
|
13
|
+
|
|
14
|
+
- `CANDIDATE_CHANGES.md` as a readable view
|
|
15
|
+
- `CHANGE_ANALYSIS.yaml` as read-only cross-queue recommendation evidence
|
|
16
|
+
- upstream source artifacts named by the queue
|
|
17
|
+
- user constraints such as "choose C004" or "avoid runtime changes"
|
|
18
|
+
- top-level queue `operations` for audit history
|
|
19
|
+
- current branch and dirty-tree state from `git status --short --branch`
|
|
20
|
+
|
|
21
|
+
If the user names a candidate id, verify that its dependencies are satisfied
|
|
22
|
+
before selecting it. If the id is blocked, not ready, or `risk: high`, report
|
|
23
|
+
why and stop unless the user explicitly approves the relevant risk or decision
|
|
24
|
+
option.
|
|
25
|
+
|
|
26
|
+
If the user provides multiple queues, first decide whether the request is a
|
|
27
|
+
read-only comparison or an actual selection. Read-only comparison belongs to
|
|
28
|
+
`analyze-changes`. Selection may consume a prior `CHANGE_ANALYSIS.yaml`, but it
|
|
29
|
+
must still write artifacts inside one target queue.
|
|
30
|
+
|
|
31
|
+
If there is only one active queue, do not require `analyze-changes`.
|
|
32
|
+
`select-change` owns ranking within that queue: it should inspect candidate
|
|
33
|
+
status, dependencies, risk, unlock value, selection policy, owned paths, and
|
|
34
|
+
validation realism before selecting one candidate.
|
|
35
|
+
|
|
36
|
+
## Feat And Commit Cadence
|
|
37
|
+
|
|
38
|
+
The source `CANDIDATE_CHANGES.yaml` is the feature-level queue. Selection does
|
|
39
|
+
not normally create a new top-level `changes/<id>/` folder. Instead, place
|
|
40
|
+
candidate-specific planning artifacts inside the existing feat folder:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
changes/<plan_id>/
|
|
44
|
+
CANDIDATE_CHANGES.yaml
|
|
45
|
+
<candidate-id>-<slug>/
|
|
46
|
+
SELECTED_CHANGE.yaml
|
|
47
|
+
ATOM_TASKS.yaml
|
|
48
|
+
IMPLEMENTATION_BRIEF.md
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Each selected candidate should be small enough to complete as one coherent git
|
|
52
|
+
commit. When the candidate completes, update the queue with completion evidence
|
|
53
|
+
and include the commit id when available.
|
|
54
|
+
|
|
55
|
+
## Branch And Dirty-Tree Guards
|
|
56
|
+
|
|
57
|
+
Before selecting, compare current git state with the queue boundary:
|
|
58
|
+
|
|
59
|
+
- current branch from `git status --short --branch`
|
|
60
|
+
- dirty paths from `git status --short --branch`
|
|
61
|
+
- `queue_policy.branch_boundary` when present
|
|
62
|
+
|
|
63
|
+
If the current branch differs from `queue_policy.branch_boundary`, stop before
|
|
64
|
+
selection unless the user explicitly approves a planning-only exception or
|
|
65
|
+
asks to continue on the current branch. Report the recorded branch, current
|
|
66
|
+
branch, and exact resume condition. Do not run checkout or branch commands.
|
|
67
|
+
|
|
68
|
+
If the tree is dirty, decide whether the paths are part of the current
|
|
69
|
+
selection operation. A clean selection can create selection artifacts and update
|
|
70
|
+
the queue. A dirty tree containing previous selected-change implementation,
|
|
71
|
+
unrelated source edits, or generated surfaces should stop selection until that
|
|
72
|
+
work is committed, stashed, or otherwise resolved by the user. Do not perform
|
|
73
|
+
those git operations from this skill.
|
|
74
|
+
|
|
75
|
+
Selection artifacts should state the expected commit boundary: the selected
|
|
76
|
+
candidate should complete as one coherent commit unless it is split or
|
|
77
|
+
superseded before implementation continues.
|
|
78
|
+
|
|
79
|
+
## Cross-Queue Arbitration
|
|
80
|
+
|
|
81
|
+
The normal path is one active `CANDIDATE_CHANGES.yaml` queue. Cross-queue
|
|
82
|
+
arbitration is an explicit exception for moments when multiple active queues
|
|
83
|
+
compete for the next selected change.
|
|
84
|
+
|
|
85
|
+
Trigger cross-queue arbitration when:
|
|
86
|
+
|
|
87
|
+
- the user supplies multiple queue paths
|
|
88
|
+
- the user asks which active queue should go next
|
|
89
|
+
- a `CHANGE_ANALYSIS.yaml` recommends a target plan and candidate
|
|
90
|
+
- a legacy queue is being reactivated and must be compared against current work
|
|
91
|
+
|
|
92
|
+
Do not silently scan all `changes/*/CANDIDATE_CHANGES.yaml` files during a
|
|
93
|
+
single-queue selection. Broad discovery belongs to `analyze-changes` unless the
|
|
94
|
+
user explicitly asks select-change to consume that global context.
|
|
95
|
+
|
|
96
|
+
When consuming `CHANGE_ANALYSIS.yaml`:
|
|
97
|
+
|
|
98
|
+
1. Treat it as advisory evidence, not as permission to select.
|
|
99
|
+
2. Verify `recommendation.target_plan_id` and
|
|
100
|
+
`recommendation.target_candidate_id` against the target queue.
|
|
101
|
+
3. Re-check status, dependencies, branch boundary, dirty tree, and high-risk
|
|
102
|
+
gates from current files.
|
|
103
|
+
4. If the recommendation is stale, stop and name the queue maintenance or fresh
|
|
104
|
+
analysis needed.
|
|
105
|
+
5. If the recommendation is still valid, create the selected-change folder
|
|
106
|
+
inside `changes/<target_plan_id>/`.
|
|
107
|
+
|
|
108
|
+
Record cross-queue rejected alternatives in `SELECTED_CHANGE.yaml` with this
|
|
109
|
+
shape:
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
rejected_alternatives:
|
|
113
|
+
- plan_id: M68-post-proto-workflow-planning
|
|
114
|
+
candidate_id: H003
|
|
115
|
+
reason: High risk and missing a local high-risk decision report.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Use `id` only for alternatives from the same source queue when the surrounding
|
|
119
|
+
artifact already names the source plan. Use `plan_id` plus `candidate_id` for
|
|
120
|
+
cross-queue alternatives.
|
|
121
|
+
|
|
122
|
+
Create a meta-selection or analysis artifact only when the user's requested
|
|
123
|
+
output is the decision record itself. Do not use meta-selection artifacts as a
|
|
124
|
+
shortcut around selecting one implementable candidate in its owning queue.
|
|
125
|
+
|
|
126
|
+
## Targeted Candidate Review
|
|
127
|
+
|
|
128
|
+
For point-to-point review, inspect only the requested candidate plus the
|
|
129
|
+
dependencies, unlocks, operation history, and directly owned paths needed to
|
|
130
|
+
judge readiness.
|
|
131
|
+
|
|
132
|
+
Return:
|
|
133
|
+
|
|
134
|
+
- `candidate_id`
|
|
135
|
+
- `status`
|
|
136
|
+
- `readiness`: ready, not_ready, blocked, already_done, or superseded
|
|
137
|
+
- `dependency_status`
|
|
138
|
+
- `scope_risks`
|
|
139
|
+
- `validation_gaps`
|
|
140
|
+
- `high_risk_report`: required, missing, present, or not_applicable
|
|
141
|
+
- `recommended_operation`: query, select, update, split, defer, block,
|
|
142
|
+
supersede, or none
|
|
143
|
+
|
|
144
|
+
This mode is read-first. It should not mutate the queue unless the user asks for
|
|
145
|
+
the recommended operation to be applied.
|
|
146
|
+
|
|
147
|
+
## Decision Order
|
|
148
|
+
|
|
149
|
+
1. Stop on branch mismatch unless an explicit planning-only exception exists.
|
|
150
|
+
2. Stop on unrelated dirty-tree work that would blur the commit boundary.
|
|
151
|
+
3. Exclude `done`, `blocked`, `deferred`, and `superseded` candidates.
|
|
152
|
+
4. Prefer `ready` candidates over plain `candidate` entries.
|
|
153
|
+
5. When cross-queue arbitration is active, honor a current
|
|
154
|
+
`CHANGE_ANALYSIS.yaml` recommendation only after verifying it against the
|
|
155
|
+
target queue.
|
|
156
|
+
6. In the normal single-queue path, honor `next_recommended_candidate_id` when
|
|
157
|
+
it is ready and coherent.
|
|
158
|
+
7. Prefer candidates that unlock other candidates.
|
|
159
|
+
8. Prefer focused owned paths over cross-module changes.
|
|
160
|
+
9. Prefer clear validation over unclear or manual-only acceptance.
|
|
161
|
+
10. Prefer lower-risk dogfood or source behavior before runtime exposure.
|
|
162
|
+
11. Prefer the user's latest explicit sequencing when it does not violate risk
|
|
163
|
+
or dependency gates.
|
|
164
|
+
12. Stop on `risk: high` unless explicit user approval names a concrete decision
|
|
165
|
+
option.
|
|
166
|
+
|
|
167
|
+
When two candidates are close, pick the one that produces better evidence for
|
|
168
|
+
the next planning decision.
|
|
169
|
+
|
|
170
|
+
## High-Risk Selection Gate
|
|
171
|
+
|
|
172
|
+
High-risk candidates require a decision report before selection. The report is
|
|
173
|
+
usually `changes/<plan_id>/HIGH_RISK_DECISION_REPORT.md` and is defined in
|
|
174
|
+
`references/planning-artifact-contracts.md`.
|
|
175
|
+
|
|
176
|
+
When the best next candidate is `risk: high`:
|
|
177
|
+
|
|
178
|
+
1. Check whether the queue links an existing high-risk decision report.
|
|
179
|
+
2. If a report exists, summarize its concrete risks, options, recommended path,
|
|
180
|
+
guardrails, go criteria, and stop criteria.
|
|
181
|
+
3. If no report exists, stop and recommend a `decompose-to-changes` maintenance
|
|
182
|
+
operation to create one.
|
|
183
|
+
4. Do not create selection artifacts unless the user explicitly approves a
|
|
184
|
+
concrete option such as design-only, research-only, narrow spike, or full
|
|
185
|
+
implementation.
|
|
186
|
+
|
|
187
|
+
Explicit approval must be more specific than "continue". It should identify the
|
|
188
|
+
approved option or replacement candidate. If approval is ambiguous, ask for the
|
|
189
|
+
decision option and do not select.
|
|
190
|
+
|
|
191
|
+
When a high-risk candidate is approved and selected:
|
|
192
|
+
|
|
193
|
+
- Include the approved option in `selection_reason`.
|
|
194
|
+
- Add the report path to rejected alternatives or evidence.
|
|
195
|
+
- Copy report guardrails into `IMPLEMENTATION_BRIEF.md` stop conditions.
|
|
196
|
+
- Keep atom tasks scoped to the approved option, not the full high-risk surface.
|
|
197
|
+
|
|
198
|
+
## SELECTED_CHANGE.yaml
|
|
199
|
+
|
|
200
|
+
Include:
|
|
201
|
+
|
|
202
|
+
- source plan id and source candidate id
|
|
203
|
+
- concise selection reasons
|
|
204
|
+
- rejected alternatives when the choice is not obvious; use `plan_id` and
|
|
205
|
+
`candidate_id` for cross-queue alternatives
|
|
206
|
+
- includes and excludes copied from the selected candidate
|
|
207
|
+
- owned paths copied from the selected candidate
|
|
208
|
+
- forbidden paths inferred from the candidate exclusions and repo rules
|
|
209
|
+
- acceptance and validation copied from the selected candidate
|
|
210
|
+
|
|
211
|
+
Do not copy the entire candidate queue into this artifact.
|
|
212
|
+
|
|
213
|
+
## ATOM_TASKS.yaml
|
|
214
|
+
|
|
215
|
+
Break the selected change into tasks in this order:
|
|
216
|
+
|
|
217
|
+
1. `read`: inspect existing context only when needed
|
|
218
|
+
2. `edit` or `document`: make the core source/artifact change
|
|
219
|
+
3. `verify`: run validation
|
|
220
|
+
4. `document`: update queue status or handoff evidence when applicable
|
|
221
|
+
|
|
222
|
+
Each task should have:
|
|
223
|
+
|
|
224
|
+
- stable `task_id`
|
|
225
|
+
- clear `title`
|
|
226
|
+
- initial `status`
|
|
227
|
+
- `type`
|
|
228
|
+
- focused `owned_paths`
|
|
229
|
+
- concrete `done_when`
|
|
230
|
+
|
|
231
|
+
## IMPLEMENTATION_BRIEF.md
|
|
232
|
+
|
|
233
|
+
Keep the brief short and operational. Include:
|
|
234
|
+
|
|
235
|
+
- `Goal`
|
|
236
|
+
- `Read First`
|
|
237
|
+
- `Do`
|
|
238
|
+
- `Do Not`
|
|
239
|
+
- `Owned Paths`
|
|
240
|
+
- `Validation`
|
|
241
|
+
- `Stop Conditions`
|
|
242
|
+
|
|
243
|
+
The brief is for the next implementation agent. It should not explain the
|
|
244
|
+
entire planning conversation.
|
|
245
|
+
|
|
246
|
+
## Queue Update
|
|
247
|
+
|
|
248
|
+
After selecting:
|
|
249
|
+
|
|
250
|
+
- set candidate `status` to `selected`
|
|
251
|
+
- add `selection.selected_change_id`
|
|
252
|
+
- add `selection.reason`
|
|
253
|
+
- add `selection.selected_at` when the date is known
|
|
254
|
+
- append a top-level `operations` entry with `operation_type: select`
|
|
255
|
+
- update `next_recommended_candidate_id` only if the queue has another obvious
|
|
256
|
+
ready candidate
|
|
257
|
+
|
|
258
|
+
After implementation completes, the implementation agent should set status to
|
|
259
|
+
`done` and add completion evidence.
|
|
260
|
+
|
|
261
|
+
## Operation Log Expectations
|
|
262
|
+
|
|
263
|
+
When select-change mutates a queue, append an operation item:
|
|
264
|
+
|
|
265
|
+
```yaml
|
|
266
|
+
operations:
|
|
267
|
+
- operation_id: OP004
|
|
268
|
+
operation_type: select
|
|
269
|
+
target_candidate_ids:
|
|
270
|
+
- P002
|
|
271
|
+
actor: agent
|
|
272
|
+
reason: Candidate is ready and unlocks P005.
|
|
273
|
+
changed_at: 2026-05-21
|
|
274
|
+
before_status: ready
|
|
275
|
+
after_status: selected
|
|
276
|
+
evidence:
|
|
277
|
+
- changes/<selected-change-id>/SELECTED_CHANGE.yaml
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Do not create selection artifacts without updating the operation log when the
|
|
281
|
+
queue already uses `operations`.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tune-prototype
|
|
3
|
+
description: Refine accepted prototype screens or prompt packs into screen-bound refined prototype prompt packs. Use when the user wants /ow:tune to preserve a baseline prototype product system while applying feedback, form-factor changes, screen-specific edits, or regeneration instructions before production planning.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tune Prototype
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Convert accepted baseline prototype evidence and tuning feedback into a refined
|
|
11
|
+
prompt pack without product drift. This skill is the source behavior for
|
|
12
|
+
`/ow:tune`; it does not create first-pass strategic prototype directions and it
|
|
13
|
+
does not implement production code.
|
|
14
|
+
|
|
15
|
+
Tune work answers: how should an already accepted prototype screen group change
|
|
16
|
+
while preserving the product system that made it worth accepting?
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
|
|
20
|
+
Required:
|
|
21
|
+
|
|
22
|
+
- baseline prototype screens, screenshots, screen descriptions, generated image
|
|
23
|
+
outputs, or an accepted `PROTO_PROMPT_PACK.yaml`
|
|
24
|
+
- direct user tune/refinement request
|
|
25
|
+
|
|
26
|
+
Optional:
|
|
27
|
+
|
|
28
|
+
- baseline prompt pack or prior `REFINED_PROTO_PROMPT_PACK.yaml`
|
|
29
|
+
- product vision or selected strategic direction
|
|
30
|
+
- screen map, accepted direction, locked screens, target form factor, target
|
|
31
|
+
screen count, target tool, regeneration scope, output language, or constraints
|
|
32
|
+
- `references/proto-redesign-artifact-contracts.md`
|
|
33
|
+
- `skills/tune-prototype/references/refined-prompt-pack-protocol.md`
|
|
34
|
+
|
|
35
|
+
Do not load unrelated specs, changes, runtime state, generated adapters, or
|
|
36
|
+
production implementation history unless the tuning question explicitly depends
|
|
37
|
+
on them.
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
|
|
41
|
+
Write artifacts under the active prototype or change path chosen by the
|
|
42
|
+
workflow. The core artifact is a refined proto prompt pack matching
|
|
43
|
+
`schemas/proto-prompt-pack.schema.json`.
|
|
44
|
+
|
|
45
|
+
Expected files:
|
|
46
|
+
|
|
47
|
+
```txt
|
|
48
|
+
REFINED_PROTO_PROMPT_PACK.yaml
|
|
49
|
+
REFINED_PROTO_PROMPT_PACK.md
|
|
50
|
+
REVIEW_PLAN.md
|
|
51
|
+
EVIDENCE.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Workflow
|
|
55
|
+
|
|
56
|
+
1. Normalize baseline inputs: screen captures, screen descriptions, accepted
|
|
57
|
+
prompt pack, previous generated prompts, target tool, target form factor,
|
|
58
|
+
locked screens, and regeneration scope.
|
|
59
|
+
2. Audit the full baseline screen group before writing prompts. Do not tune
|
|
60
|
+
from one representative screen unless the user explicitly limits scope.
|
|
61
|
+
3. Extract the product system: thesis, primary loop, interaction model, feature
|
|
62
|
+
system, design language, copy rules, trust boundaries, anti-goals, stable
|
|
63
|
+
constants, and adaptable variables.
|
|
64
|
+
4. Interpret the tune request as explicit additions, removals, transformations,
|
|
65
|
+
locked elements, and flexible areas. Surface conflicts or assumptions
|
|
66
|
+
briefly.
|
|
67
|
+
5. Create `MUST_INHERIT`, `MUST_ADD`, `MUST_REMOVE`, and `FLEXIBLE_CHANGE`
|
|
68
|
+
rules, then apply them globally and per target screen.
|
|
69
|
+
6. Build a screen mapping and prompt manifest with stable target screen IDs,
|
|
70
|
+
source screen IDs, generation order, dependencies, negative constraints, and
|
|
71
|
+
acceptance criteria.
|
|
72
|
+
7. Write a global design system prompt and standalone screen-specific prompts.
|
|
73
|
+
8. Review the pack against product continuity, screen binding, deletion
|
|
74
|
+
coverage, trust/privacy preservation, and downstream generation readiness.
|
|
75
|
+
9. Run `npm run validate` when the repository validator exists.
|
|
76
|
+
|
|
77
|
+
## Refinement Rules
|
|
78
|
+
|
|
79
|
+
- Treat a prototype screen group as a product system, not a collection of
|
|
80
|
+
unrelated images.
|
|
81
|
+
- Preserve product thesis, primary loop, core feature logic, emotional promise,
|
|
82
|
+
component vocabulary, copy tone, AI/system behavior, trust boundaries, and
|
|
83
|
+
user controls unless the user explicitly changes them.
|
|
84
|
+
- Bind every refined prompt to a target screen ID, source screen ID(s),
|
|
85
|
+
generation scope, target form factor, and acceptance criteria.
|
|
86
|
+
- Put requested removals in `MUST_REMOVE`, global negative constraints,
|
|
87
|
+
per-screen negative constraints, and acceptance checks.
|
|
88
|
+
- Platform transformation should preserve intent over geometry. For example,
|
|
89
|
+
desktop outputs need native navigation, information density, and layout
|
|
90
|
+
patterns rather than widened mobile screens.
|
|
91
|
+
- Multi-round tuning must import prior accepted `MUST_INHERIT` rules and keep
|
|
92
|
+
screen IDs stable unless screens are split, merged, deleted, or explicitly
|
|
93
|
+
renamed.
|
|
94
|
+
- Do not introduce unrelated features, a new product model, or a new brand
|
|
95
|
+
direction unless the tune request explicitly asks for that.
|
|
96
|
+
|
|
97
|
+
## Forbidden Defaults
|
|
98
|
+
|
|
99
|
+
- Do not create first-pass strategic prototype directions; use
|
|
100
|
+
`build-prototype` for `/ow:proto`.
|
|
101
|
+
- Do not create `SPEC.yaml`, `CHANGE.yaml`, `.codex/runtime/`, or Agent Team
|
|
102
|
+
artifacts from this skill.
|
|
103
|
+
- Do not add `/ow:proto2html` or any HTML conversion behavior.
|
|
104
|
+
- Do not expose runtime command surfaces or generated adapter surfaces.
|
|
105
|
+
- Do not silently drop accepted baseline controls, privacy affordances, memory
|
|
106
|
+
controls, or non-goals during visual refinement.
|
|
107
|
+
- Do not output anonymous refined prompts that cannot be traced back to source
|
|
108
|
+
and target screens.
|
|
109
|
+
|
|
110
|
+
## Handoff
|
|
111
|
+
|
|
112
|
+
After user review, hand off to `/ow:decision`, another `/ow:tune` round,
|
|
113
|
+
design/spec planning, or another candidate change.
|
|
114
|
+
|
|
115
|
+
Expected outcomes:
|
|
116
|
+
|
|
117
|
+
- `continue`: refined prompt pack is strong enough for production planning
|
|
118
|
+
- `tune`: another refinement pass is needed
|
|
119
|
+
- `regenerate_selected`: selected screens need another image generation pass
|
|
120
|
+
- `pivot`: adjust the strategic prototype direction or vision
|
|
121
|
+
- `stop`: archive or clean the prototype path
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Refined Prompt Pack Protocol
|
|
2
|
+
|
|
3
|
+
Use this reference when `/ow:tune` should convert accepted baseline screens and
|
|
4
|
+
user feedback into a screen-bound refined prompt pack.
|
|
5
|
+
|
|
6
|
+
## Input Normalization
|
|
7
|
+
|
|
8
|
+
Collect or infer:
|
|
9
|
+
|
|
10
|
+
- baseline screen sources: screenshots, screen descriptions, source screen IDs,
|
|
11
|
+
accepted generated outputs, or prior prompt pack
|
|
12
|
+
- baseline prompt text when available
|
|
13
|
+
- tune request
|
|
14
|
+
- product vision or strategic direction when available
|
|
15
|
+
- target form factor, target tool, target screen count, locked screens,
|
|
16
|
+
regeneration scope, language, and constraints
|
|
17
|
+
|
|
18
|
+
Require at least one baseline input and one tune request. If the user provides a
|
|
19
|
+
screen group, audit the group before writing prompts.
|
|
20
|
+
|
|
21
|
+
## Baseline Screen Audit
|
|
22
|
+
|
|
23
|
+
For each source screen, record:
|
|
24
|
+
|
|
25
|
+
- source screen ID and inferred screen name
|
|
26
|
+
- journey stage, user goal, and system state
|
|
27
|
+
- represented feature and primary action
|
|
28
|
+
- core components and screen-specific copy tone
|
|
29
|
+
- AI/system behavior
|
|
30
|
+
- trust, privacy, safety, memory, and user-control affordances
|
|
31
|
+
- visual cues and product-specific motifs
|
|
32
|
+
- elements that must be preserved
|
|
33
|
+
- platform artifacts to transform or remove
|
|
34
|
+
- assumptions or missing evidence
|
|
35
|
+
|
|
36
|
+
## Product System Extraction
|
|
37
|
+
|
|
38
|
+
Extract the continuity rules that should survive the next generation pass:
|
|
39
|
+
|
|
40
|
+
- product thesis and target user
|
|
41
|
+
- primary behavior loop
|
|
42
|
+
- brand promise and emotional job
|
|
43
|
+
- interaction model and information architecture
|
|
44
|
+
- feature system and component vocabulary
|
|
45
|
+
- visual language and copywriting system
|
|
46
|
+
- trust, boundary, privacy, and safety system
|
|
47
|
+
- anti-goals
|
|
48
|
+
- stable constants and adaptable variables
|
|
49
|
+
|
|
50
|
+
## Tune Interpretation
|
|
51
|
+
|
|
52
|
+
Translate the user's request into explicit deltas:
|
|
53
|
+
|
|
54
|
+
- additions: new screens, components, states, copy, actions, system behavior,
|
|
55
|
+
platform patterns, or trust controls
|
|
56
|
+
- removals: unwanted features, visual artifacts, incorrect brand elements,
|
|
57
|
+
forbidden UI patterns, obsolete copy, or unsafe AI representations
|
|
58
|
+
- transformations: form-factor adaptation, journey reshaping, layout changes,
|
|
59
|
+
component transformations, or state changes
|
|
60
|
+
- locked elements: screens or product-system traits that must not move
|
|
61
|
+
- flexible areas: safe exploration space that remains inside the product
|
|
62
|
+
thesis, brand promise, non-goals, and screen purpose
|
|
63
|
+
|
|
64
|
+
If additions and removals conflict with baseline continuity, state the
|
|
65
|
+
assumption before producing prompts.
|
|
66
|
+
|
|
67
|
+
## Delta Rules
|
|
68
|
+
|
|
69
|
+
Write global and screen-level rules in four buckets:
|
|
70
|
+
|
|
71
|
+
- `MUST_INHERIT`: product thesis, primary loop, core features, emotional
|
|
72
|
+
promise, visual motifs, component vocabulary, copy tone, system behavior,
|
|
73
|
+
trust boundaries, screen purpose, and locked content
|
|
74
|
+
- `MUST_ADD`: requested screens, components, states, copy, actions, system
|
|
75
|
+
behavior, target-platform patterns, and controls
|
|
76
|
+
- `MUST_REMOVE`: requested removals, platform artifacts, obsolete copy,
|
|
77
|
+
incorrect AI representations, and forbidden UI patterns
|
|
78
|
+
- `FLEXIBLE_CHANGE`: layout composition, card arrangement, copy phrasing within
|
|
79
|
+
tone rules, icon details, hierarchy, spacing, and target-native density
|
|
80
|
+
|
|
81
|
+
Requested removals must appear in global negative constraints, per-screen
|
|
82
|
+
negative constraints, and acceptance checks.
|
|
83
|
+
|
|
84
|
+
## Prompt Pack Structure
|
|
85
|
+
|
|
86
|
+
`REFINED_PROTO_PROMPT_PACK.yaml` should follow
|
|
87
|
+
`schemas/proto-prompt-pack.schema.json` and include:
|
|
88
|
+
|
|
89
|
+
- `prompt_pack_type: refined_proto_prompt_pack`
|
|
90
|
+
- `source`
|
|
91
|
+
- `baseline_audit`
|
|
92
|
+
- `product_system`
|
|
93
|
+
- `delta_rules`
|
|
94
|
+
- `screen_manifest`
|
|
95
|
+
- `global_design_prompt`
|
|
96
|
+
- `screen_prompts`
|
|
97
|
+
- `negative_constraints`
|
|
98
|
+
- `review_plan`
|
|
99
|
+
|
|
100
|
+
`REFINED_PROTO_PROMPT_PACK.md` should be the human-readable view.
|
|
101
|
+
|
|
102
|
+
Each screen prompt needs:
|
|
103
|
+
|
|
104
|
+
- `prompt_id`
|
|
105
|
+
- `target_screen_id`
|
|
106
|
+
- `screen_name`
|
|
107
|
+
- source screen IDs
|
|
108
|
+
- target form factor and canvas
|
|
109
|
+
- strategic purpose and user goal
|
|
110
|
+
- system state
|
|
111
|
+
- must inherit, add, remove, and flexible change rules
|
|
112
|
+
- layout structure and required components
|
|
113
|
+
- required copy or copy rules
|
|
114
|
+
- interaction states and AI/system behavior
|
|
115
|
+
- trust, privacy, safety, and user-control requirements
|
|
116
|
+
- visual style rules
|
|
117
|
+
- negative constraints
|
|
118
|
+
- desired user feeling
|
|
119
|
+
- acceptance criteria
|
|
120
|
+
|
|
121
|
+
## Screen Manifest
|
|
122
|
+
|
|
123
|
+
Use stable IDs:
|
|
124
|
+
|
|
125
|
+
- source screens: `SRC_M01`, `SRC_W01`, `SRC_T01`, or `SRC_01`
|
|
126
|
+
- target screens: `WEB_S01`, `MOB_S01`, `TAB_S01`, or `REFINE_S01`
|
|
127
|
+
- prompt IDs: `PROMPT_WEB_S01`, `PROMPT_MOB_S01`, or similar
|
|
128
|
+
|
|
129
|
+
For each target screen, include:
|
|
130
|
+
|
|
131
|
+
- target screen ID and name
|
|
132
|
+
- prompt ID
|
|
133
|
+
- source screen IDs
|
|
134
|
+
- target form factor and canvas
|
|
135
|
+
- journey stage
|
|
136
|
+
- generation scope: `CREATE_NEW`, `TRANSFORM`, `REFINE`, `REGENERATE`,
|
|
137
|
+
`LOCKED`, `MERGE`, `SPLIT`, or `DELETE`
|
|
138
|
+
- generation order and dependencies
|
|
139
|
+
- locked elements
|
|
140
|
+
- per-screen delta rules
|
|
141
|
+
- prompt and negative prompt
|
|
142
|
+
- acceptance criteria
|
|
143
|
+
|
|
144
|
+
Preserve screen IDs across rounds unless the screen is deleted, split, merged,
|
|
145
|
+
or explicitly renamed.
|
|
146
|
+
|
|
147
|
+
## Quality Gate
|
|
148
|
+
|
|
149
|
+
Revise before finishing if:
|
|
150
|
+
|
|
151
|
+
- only one source screen was considered from a supplied group
|
|
152
|
+
- visual style changed but product loop, feature system, or trust controls were
|
|
153
|
+
lost
|
|
154
|
+
- requested removals are absent from negative constraints or examples
|
|
155
|
+
- prompts are not bound to target screens and source screens
|
|
156
|
+
- desktop outputs read like widened mobile layouts
|
|
157
|
+
- new screens feel like unrelated product ideas
|
|
158
|
+
- the downstream generator would need extra context to produce the screens
|
|
159
|
+
|
|
160
|
+
The final pack should let a reviewer trace every generated screen back to the
|
|
161
|
+
baseline product system and the user's requested deltas.
|