@tiic-tech/openworkflow 0.1.0
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/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/adapters/codex/src/doctorCodexAdapter.d.ts +6 -0
- package/dist/adapters/codex/src/doctorCodexAdapter.js +124 -0
- package/dist/adapters/codex/src/doctorCodexAdapter.js.map +1 -0
- package/dist/adapters/codex/src/generateAgents.d.ts +2 -0
- package/dist/adapters/codex/src/generateAgents.js +40 -0
- package/dist/adapters/codex/src/generateAgents.js.map +1 -0
- package/dist/adapters/codex/src/generateCodexAdapter.d.ts +9 -0
- package/dist/adapters/codex/src/generateCodexAdapter.js +59 -0
- package/dist/adapters/codex/src/generateCodexAdapter.js.map +1 -0
- package/dist/adapters/codex/src/generateCommands.d.ts +6 -0
- package/dist/adapters/codex/src/generateCommands.js +205 -0
- package/dist/adapters/codex/src/generateCommands.js.map +1 -0
- package/dist/adapters/codex/src/generateSkills.d.ts +7 -0
- package/dist/adapters/codex/src/generateSkills.js +60 -0
- package/dist/adapters/codex/src/generateSkills.js.map +1 -0
- package/dist/adapters/codex/src/generatedFiles.d.ts +4 -0
- package/dist/adapters/codex/src/generatedFiles.js +67 -0
- package/dist/adapters/codex/src/generatedFiles.js.map +1 -0
- package/dist/adapters/codex/src/manifest.d.ts +4 -0
- package/dist/adapters/codex/src/manifest.js +40 -0
- package/dist/adapters/codex/src/manifest.js.map +1 -0
- package/dist/adapters/codex/src/templates.d.ts +7 -0
- package/dist/adapters/codex/src/templates.js +6 -0
- package/dist/adapters/codex/src/templates.js.map +1 -0
- package/dist/cli/src/args.d.ts +8 -0
- package/dist/cli/src/args.js +34 -0
- package/dist/cli/src/args.js.map +1 -0
- package/dist/cli/src/commands/doctor.d.ts +1 -0
- package/dist/cli/src/commands/doctor.js +26 -0
- package/dist/cli/src/commands/doctor.js.map +1 -0
- package/dist/cli/src/commands/init.d.ts +1 -0
- package/dist/cli/src/commands/init.js +52 -0
- package/dist/cli/src/commands/init.js.map +1 -0
- package/dist/cli/src/commands/shared.d.ts +4 -0
- package/dist/cli/src/commands/shared.js +19 -0
- package/dist/cli/src/commands/shared.js.map +1 -0
- package/dist/cli/src/commands/sync.d.ts +1 -0
- package/dist/cli/src/commands/sync.js +27 -0
- package/dist/cli/src/commands/sync.js.map +1 -0
- package/dist/cli/src/commands/validate.d.ts +1 -0
- package/dist/cli/src/commands/validate.js +17 -0
- package/dist/cli/src/commands/validate.js.map +1 -0
- package/dist/cli/src/dev/validateRepositoryContractsCli.d.ts +2 -0
- package/dist/cli/src/dev/validateRepositoryContractsCli.js +37 -0
- package/dist/cli/src/dev/validateRepositoryContractsCli.js.map +1 -0
- package/dist/cli/src/dev/verifyRuntimeSurface.d.ts +2 -0
- package/dist/cli/src/dev/verifyRuntimeSurface.js +344 -0
- package/dist/cli/src/dev/verifyRuntimeSurface.js.map +1 -0
- package/dist/cli/src/dev/verifyWorkflowE2E.d.ts +2 -0
- package/dist/cli/src/dev/verifyWorkflowE2E.js +366 -0
- package/dist/cli/src/dev/verifyWorkflowE2E.js.map +1 -0
- package/dist/cli/src/index.d.ts +2 -0
- package/dist/cli/src/index.js +51 -0
- package/dist/cli/src/index.js.map +1 -0
- package/dist/core/src/artifacts/registry.d.ts +53 -0
- package/dist/core/src/artifacts/registry.js +483 -0
- package/dist/core/src/artifacts/registry.js.map +1 -0
- package/dist/core/src/commands/registry.d.ts +36 -0
- package/dist/core/src/commands/registry.js +539 -0
- package/dist/core/src/commands/registry.js.map +1 -0
- package/dist/core/src/contracts/index.d.ts +23 -0
- package/dist/core/src/contracts/index.js +16 -0
- package/dist/core/src/contracts/index.js.map +1 -0
- package/dist/core/src/contracts/yaml.d.ts +2 -0
- package/dist/core/src/contracts/yaml.js +12 -0
- package/dist/core/src/contracts/yaml.js.map +1 -0
- package/dist/core/src/contracts.d.ts +23 -0
- package/dist/core/src/contracts.js +15 -0
- package/dist/core/src/contracts.js.map +1 -0
- package/dist/core/src/fs/index.d.ts +4 -0
- package/dist/core/src/fs/index.js +28 -0
- package/dist/core/src/fs/index.js.map +1 -0
- package/dist/core/src/fs.d.ts +4 -0
- package/dist/core/src/fs.js +28 -0
- package/dist/core/src/fs.js.map +1 -0
- package/dist/core/src/initOpenWorkflow.d.ts +7 -0
- package/dist/core/src/initOpenWorkflow.js +220 -0
- package/dist/core/src/initOpenWorkflow.js.map +1 -0
- package/dist/core/src/validateOpenWorkflow.d.ts +5 -0
- package/dist/core/src/validateOpenWorkflow.js +145 -0
- package/dist/core/src/validateOpenWorkflow.js.map +1 -0
- package/dist/core/src/validators/validateOpenWorkflow.d.ts +5 -0
- package/dist/core/src/validators/validateOpenWorkflow.js +551 -0
- package/dist/core/src/validators/validateOpenWorkflow.js.map +1 -0
- package/dist/core/src/validators/validateRepositoryContracts.d.ts +2 -0
- package/dist/core/src/validators/validateRepositoryContracts.js +827 -0
- package/dist/core/src/validators/validateRepositoryContracts.js.map +1 -0
- package/dist/core/src/workflow/initOpenWorkflow.d.ts +7 -0
- package/dist/core/src/workflow/initOpenWorkflow.js +182 -0
- package/dist/core/src/workflow/initOpenWorkflow.js.map +1 -0
- package/dist/core/src/yaml.d.ts +2 -0
- package/dist/core/src/yaml.js +12 -0
- package/dist/core/src/yaml.js.map +1 -0
- package/package.json +55 -0
- package/references/artifact-authoring-templates.md +78 -0
- package/references/audit-first-discovery-loop.md +85 -0
- package/references/contract-graph.md +129 -0
- package/references/discovery-artifact-contracts.md +155 -0
- package/references/engineering-skill-reference-research.md +204 -0
- package/references/npm-cli-architecture.md +63 -0
- package/references/runtime-command-surface.md +169 -0
- package/schemas/artifact-contracts.schema.json +130 -0
- package/schemas/change.schema.json +71 -0
- package/schemas/contract-graph.schema.json +80 -0
- package/schemas/decision-record.schema.json +92 -0
- package/schemas/disclosure-levels.schema.json +66 -0
- package/schemas/openworkflow-contract.schema.json +88 -0
- package/schemas/product-design.schema.json +356 -0
- package/schemas/prototype-evidence.schema.json +325 -0
- package/schemas/prototype.schema.json +149 -0
- package/schemas/validation-target.schema.json +127 -0
- package/schemas/validation.schema.json +123 -0
- package/schemas/vision-session.schema.json +78 -0
- package/schemas/work-items.schema.json +87 -0
- package/schemas/workflow-index.schema.json +70 -0
- package/skills/build-prototype/SKILL.md +87 -0
- package/skills/build-prototype/agents/openai.yaml +4 -0
- package/skills/build-prototype/references/prototype-protocol.md +56 -0
- package/skills/build-prototype/scripts/init_prototype.py +260 -0
- package/skills/build-team/SKILL.md +292 -0
- package/skills/build-team/agents/openai.yaml +4 -0
- package/skills/build-team/references/runtime-schema.md +275 -0
- package/skills/build-team/references/team-protocol.md +244 -0
- package/skills/build-team/scripts/init_team_runtime.py +431 -0
- package/skills/build-validation/SKILL.md +81 -0
- package/skills/build-validation/agents/openai.yaml +4 -0
- package/skills/build-validation/references/validation-protocol.md +51 -0
- package/skills/build-validation/scripts/init_validation.py +194 -0
- package/skills/build-workflow/SKILL.md +65 -0
- package/skills/build-workflow/agents/openai.yaml +4 -0
- package/skills/build-workflow/references/workflow-layout.md +57 -0
- package/skills/build-workflow/scripts/init_workflow.py +423 -0
- package/skills/run-team/SKILL.md +93 -0
- package/skills/run-team/agents/openai.yaml +4 -0
- package/skills/run-team/references/delegation-and-agent-lifecycle.md +78 -0
- package/skills/run-team/references/run-loop.md +73 -0
- package/skills/run-team/references/runtime-audit.md +56 -0
- package/skills/run-team/references/scope-selection.md +64 -0
- package/skills/run-team/scripts/audit_team_runtime.py +173 -0
- package/skills/run-team/scripts/init_next_scope.py +304 -0
- package/templates/README.md +5 -0
- package/templates/codex/README.md +4 -0
- package/templates/openworkflow/README.md +4 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Discovery Artifact Contracts
|
|
2
|
+
|
|
3
|
+
M10 defines the artifact layer consumed by the audit-first discovery loop. The
|
|
4
|
+
artifact layer must answer one question:
|
|
5
|
+
|
|
6
|
+
> What is the smallest durable state an agent needs to continue accurately?
|
|
7
|
+
|
|
8
|
+
## Format Responsibilities
|
|
9
|
+
|
|
10
|
+
- YAML is the source of truth. Agents load YAML first because it is structured,
|
|
11
|
+
diffable, compact, and validateable.
|
|
12
|
+
- Markdown is a short human audit note. It explains why a state changed, but it
|
|
13
|
+
must not be the only source of a decision.
|
|
14
|
+
- HTML is an optional generated review surface. It is useful for humans when
|
|
15
|
+
comparing evidence, screenshots, and diagrams, but it must be generated from
|
|
16
|
+
YAML or evidence manifests and should not be loaded by default by agents.
|
|
17
|
+
- Raw evidence is referenced by path or URL from YAML. Screenshots, logs,
|
|
18
|
+
recordings, prototype URLs, and browser notes stay outside the source-of-truth
|
|
19
|
+
contract.
|
|
20
|
+
|
|
21
|
+
## Progressive Disclosure
|
|
22
|
+
|
|
23
|
+
Agents should load context in this order:
|
|
24
|
+
|
|
25
|
+
1. Level 0: workflow and audit indexes.
|
|
26
|
+
2. Level 1: command context packet and artifact contract registry.
|
|
27
|
+
3. Level 2: the current stage YAML artifact named by the index.
|
|
28
|
+
4. Level 3: short Markdown note when the YAML does not explain intent enough.
|
|
29
|
+
5. Level 4: generated HTML and raw evidence only for human review or evidence
|
|
30
|
+
inspection.
|
|
31
|
+
|
|
32
|
+
The first two levels must be enough to know what not to load.
|
|
33
|
+
|
|
34
|
+
## Discovery Artifact Types
|
|
35
|
+
|
|
36
|
+
### vision_session
|
|
37
|
+
|
|
38
|
+
Produced by `/ow:vision`.
|
|
39
|
+
|
|
40
|
+
Source of truth path:
|
|
41
|
+
`.openworkflow/vision/sessions/<id>/VISION_SESSION.yaml`
|
|
42
|
+
|
|
43
|
+
Purpose:
|
|
44
|
+
Capture one focused vision clarification session without turning it into a
|
|
45
|
+
feature ranking or prototype task list.
|
|
46
|
+
|
|
47
|
+
Required facts:
|
|
48
|
+
|
|
49
|
+
- current question
|
|
50
|
+
- stable answers
|
|
51
|
+
- unresolved questions
|
|
52
|
+
- vision delta
|
|
53
|
+
- handoff readiness
|
|
54
|
+
|
|
55
|
+
### validation_target
|
|
56
|
+
|
|
57
|
+
Produced by `/ow:validation`.
|
|
58
|
+
|
|
59
|
+
Source of truth path:
|
|
60
|
+
`.openworkflow/validation/<id>/VALIDATION.yaml`
|
|
61
|
+
|
|
62
|
+
Purpose:
|
|
63
|
+
Name the highest-leverage thing to validate first and explain why it is
|
|
64
|
+
existential, supporting, later, or out of scope.
|
|
65
|
+
|
|
66
|
+
Required facts:
|
|
67
|
+
|
|
68
|
+
- core question
|
|
69
|
+
- feature classification
|
|
70
|
+
- critical assumptions
|
|
71
|
+
- prototype scope
|
|
72
|
+
- acceptance criteria
|
|
73
|
+
- decision options
|
|
74
|
+
|
|
75
|
+
### prototype_evidence
|
|
76
|
+
|
|
77
|
+
Produced by `/ow:proto`.
|
|
78
|
+
|
|
79
|
+
Source of truth path:
|
|
80
|
+
`.openworkflow/prototypes/<id>/EVIDENCE.yaml`
|
|
81
|
+
|
|
82
|
+
Purpose:
|
|
83
|
+
Record the prototype mode, reference analysis, static concept direction,
|
|
84
|
+
runnable implementation, verification evidence, self-critique, and what remains
|
|
85
|
+
unknown.
|
|
86
|
+
|
|
87
|
+
Required facts:
|
|
88
|
+
|
|
89
|
+
- validation target
|
|
90
|
+
- core question
|
|
91
|
+
- prototype mode
|
|
92
|
+
- reference analysis
|
|
93
|
+
- visual direction
|
|
94
|
+
- visual concept policy
|
|
95
|
+
- static concept evidence
|
|
96
|
+
- prototype artifact
|
|
97
|
+
- run command or URL
|
|
98
|
+
- implementation evidence
|
|
99
|
+
- observations
|
|
100
|
+
- evidence references
|
|
101
|
+
- verification
|
|
102
|
+
- self-critique
|
|
103
|
+
- known limits
|
|
104
|
+
- result status
|
|
105
|
+
|
|
106
|
+
Validation notes:
|
|
107
|
+
|
|
108
|
+
- Local evidence references must point to files inside the workflow root.
|
|
109
|
+
- Visual, interaction, and 3D/material prototypes must either record generated
|
|
110
|
+
concept evidence or explicitly record that the user skipped image generation
|
|
111
|
+
with a reason.
|
|
112
|
+
- Self-critique dimensions must be populated before handoff.
|
|
113
|
+
|
|
114
|
+
### decision_record
|
|
115
|
+
|
|
116
|
+
Produced internally by `/ow:decision` through `/ow:proto` or `/ow:tune`.
|
|
117
|
+
|
|
118
|
+
Source of truth path:
|
|
119
|
+
`.openworkflow/decisions/<id>/DECISION.yaml`
|
|
120
|
+
|
|
121
|
+
Purpose:
|
|
122
|
+
Record the user-reviewed or tune-reviewed outcome of the prototype loop and the
|
|
123
|
+
authorized next user-facing command. This is an audit artifact; users should not
|
|
124
|
+
need to invoke `/ow:decision` manually during normal proto/tune loops.
|
|
125
|
+
|
|
126
|
+
Required facts:
|
|
127
|
+
|
|
128
|
+
- reviewed evidence
|
|
129
|
+
- outcome
|
|
130
|
+
- rationale
|
|
131
|
+
- accepted scope
|
|
132
|
+
- rejected scope
|
|
133
|
+
- revision scope
|
|
134
|
+
- next command
|
|
135
|
+
- follow-up questions
|
|
136
|
+
|
|
137
|
+
Outcome values:
|
|
138
|
+
|
|
139
|
+
- `continue`: evidence is accepted and may hand off to design.
|
|
140
|
+
- `revise`: user requested another tune pass.
|
|
141
|
+
- `pivot`: user wants to change direction.
|
|
142
|
+
- `stop`: user wants to stop the loop.
|
|
143
|
+
- `needs_more_evidence`: evidence is inconclusive.
|
|
144
|
+
|
|
145
|
+
## First-Consumer Rules
|
|
146
|
+
|
|
147
|
+
As an agent, I want every artifact to be readable in under one screen before I
|
|
148
|
+
open any evidence. To make that possible:
|
|
149
|
+
|
|
150
|
+
- Use stable identifiers and paths.
|
|
151
|
+
- Put the current decision state near the top.
|
|
152
|
+
- Keep narrative in Markdown notes, not YAML fields.
|
|
153
|
+
- Reference evidence instead of embedding it.
|
|
154
|
+
- Record what is forbidden or deferred so later agents do not reopen scope.
|
|
155
|
+
- Include a handoff field that names the next command.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Engineering Skill Reference Research
|
|
2
|
+
|
|
3
|
+
M08 studies `mattpocock/skills` as a reference for improving OpenWorkflow skill
|
|
4
|
+
and command design before M09 deepens the discovery loop.
|
|
5
|
+
|
|
6
|
+
Reference clone:
|
|
7
|
+
|
|
8
|
+
- Source: `https://github.com/mattpocock/skills/tree/main/skills/engineering`
|
|
9
|
+
- Local path: `/tmp/mattpocock-skills`
|
|
10
|
+
- Inspected commit: `e74f0061bb67222181640effa98c675bdb2fdaa7`
|
|
11
|
+
|
|
12
|
+
## Reference Skill Inventory
|
|
13
|
+
|
|
14
|
+
The engineering set is intentionally small and composable:
|
|
15
|
+
|
|
16
|
+
- `grill-with-docs`: one-question-at-a-time interrogation that updates domain
|
|
17
|
+
glossary and ADRs when decisions crystallize.
|
|
18
|
+
- `prototype`: throwaway prototypes that answer one question, split into logic
|
|
19
|
+
and UI branches.
|
|
20
|
+
- `tdd`: red-green-refactor through vertical slices, with strong warnings
|
|
21
|
+
against bulk horizontal test writing.
|
|
22
|
+
- `diagnose`: disciplined bug loop: feedback loop, reproduce, hypothesize,
|
|
23
|
+
instrument, fix, regression-test, cleanup.
|
|
24
|
+
- `triage`: issue state machine with explicit categories, states, and
|
|
25
|
+
maintainer checkpoints.
|
|
26
|
+
- `to-prd`: synthesize current context into a PRD without re-interviewing.
|
|
27
|
+
- `to-issues`: break a PRD or plan into vertical-slice issues.
|
|
28
|
+
- `zoom-out`: ask for a higher-level system view when local context is not
|
|
29
|
+
enough.
|
|
30
|
+
- `improve-codebase-architecture`: look for deepening opportunities using
|
|
31
|
+
shared architectural vocabulary.
|
|
32
|
+
- `setup-matt-pocock-skills`: repo setup for issue tracker and domain docs.
|
|
33
|
+
|
|
34
|
+
## Distinctive Patterns
|
|
35
|
+
|
|
36
|
+
### 1. Small Skills, Strong Boundaries
|
|
37
|
+
|
|
38
|
+
Each skill has a narrow job and refuses adjacent work. `prototype` does not
|
|
39
|
+
become production implementation. `diagnose` does not hypothesize before it has
|
|
40
|
+
a feedback loop. `tdd` does not write all tests before implementation.
|
|
41
|
+
|
|
42
|
+
OpenWorkflow should adopt this boundary style for command protocols. Each
|
|
43
|
+
`/ow:*` command should state:
|
|
44
|
+
|
|
45
|
+
- what question it answers
|
|
46
|
+
- what it may read
|
|
47
|
+
- what it may write
|
|
48
|
+
- what it must not create
|
|
49
|
+
- which command may follow
|
|
50
|
+
|
|
51
|
+
### 2. Feedback Loops Are First-Class
|
|
52
|
+
|
|
53
|
+
The reference skills are strongest when they define the feedback loop before
|
|
54
|
+
work starts:
|
|
55
|
+
|
|
56
|
+
- `diagnose` requires a deterministic pass/fail loop before cause analysis.
|
|
57
|
+
- `tdd` requires one failing behavior test before implementation.
|
|
58
|
+
- `prototype` requires one explicit question and one command to run.
|
|
59
|
+
|
|
60
|
+
OpenWorkflow should encode this directly in M09. `/ow:prototype` should not be
|
|
61
|
+
"build a demo"; it should be "build the smallest runnable artifact that answers
|
|
62
|
+
the current validation question."
|
|
63
|
+
|
|
64
|
+
### 3. Progressive Disclosure
|
|
65
|
+
|
|
66
|
+
Several skills use small entrypoint files with focused supporting references:
|
|
67
|
+
|
|
68
|
+
- `prototype/SKILL.md` routes to `LOGIC.md` or `UI.md`.
|
|
69
|
+
- `tdd/SKILL.md` links to test, mocking, interface-design, and refactoring
|
|
70
|
+
references.
|
|
71
|
+
- `grill-with-docs/SKILL.md` links to context and ADR formats.
|
|
72
|
+
|
|
73
|
+
OpenWorkflow should keep generated command files short, but allow each command
|
|
74
|
+
to point at focused protocol references. This avoids giant command files while
|
|
75
|
+
still giving agents precise rules when needed.
|
|
76
|
+
|
|
77
|
+
### 4. Anti-Patterns Are Explicit
|
|
78
|
+
|
|
79
|
+
The reference skills repeatedly say what not to do:
|
|
80
|
+
|
|
81
|
+
- Do not leave prototypes rotting in the repo.
|
|
82
|
+
- Do not write horizontal test suites.
|
|
83
|
+
- Do not proceed with diagnosis without a repro loop.
|
|
84
|
+
- Do not create ADRs unless the decision is hard to reverse, surprising, and
|
|
85
|
+
trade-off driven.
|
|
86
|
+
|
|
87
|
+
OpenWorkflow should add explicit anti-pattern sections to command protocols.
|
|
88
|
+
This is especially important for preventing artifact drift and token bloat.
|
|
89
|
+
|
|
90
|
+
### 5. Human Checkpoints Are Concrete
|
|
91
|
+
|
|
92
|
+
The skills do not ask vague approval questions. They ask for specific
|
|
93
|
+
checkpoint decisions:
|
|
94
|
+
|
|
95
|
+
- Which interface should be tested?
|
|
96
|
+
- Which vertical slices are too coarse or too fine?
|
|
97
|
+
- Which architecture candidate should be explored?
|
|
98
|
+
- Is this issue ready for an AFK agent?
|
|
99
|
+
|
|
100
|
+
OpenWorkflow should use the same style: each `/ow:*` command should know when
|
|
101
|
+
to ask the user and what kind of answer is needed.
|
|
102
|
+
|
|
103
|
+
## Adopt
|
|
104
|
+
|
|
105
|
+
OpenWorkflow should adopt these patterns directly:
|
|
106
|
+
|
|
107
|
+
- one-question-at-a-time clarification for `/ow:vision`
|
|
108
|
+
- explicit "question being answered" for `/ow:validation` and `/ow:prototype`
|
|
109
|
+
- prototype branches by question type: logic/state vs UI/experience
|
|
110
|
+
- one command to run a prototype
|
|
111
|
+
- anti-pattern sections in generated command protocols
|
|
112
|
+
- vertical-slice thinking for later `/ow:change`
|
|
113
|
+
- diagnosis-style feedback-loop discipline for future bug workflows
|
|
114
|
+
- sparing ADR logic: record only decisions that are hard to reverse,
|
|
115
|
+
surprising, and trade-off driven
|
|
116
|
+
|
|
117
|
+
## Adapt
|
|
118
|
+
|
|
119
|
+
These patterns are useful but must be adapted:
|
|
120
|
+
|
|
121
|
+
- `CONTEXT.md` should map to `.openworkflow/context/CONTEXT.md` and
|
|
122
|
+
`.openworkflow/context/CONTEXT_MAP.yaml`, not become a separate root-level
|
|
123
|
+
source of truth.
|
|
124
|
+
- ADRs can inform future decisions, but OpenWorkflow's primary durable records
|
|
125
|
+
are `.openworkflow/decisions/` contracts.
|
|
126
|
+
- `to-prd` and `to-issues` map conceptually to `/ow:spec` and `/ow:change`,
|
|
127
|
+
but M09 should not implement those yet.
|
|
128
|
+
- `prototype` should keep its throwaway mindset, but OpenWorkflow should still
|
|
129
|
+
write durable prototype evidence under `.openworkflow/prototypes/`.
|
|
130
|
+
- Issue tracker states are useful for later team execution, but OpenWorkflow
|
|
131
|
+
should first express state in local contracts before integrating GitHub,
|
|
132
|
+
Linear, or other trackers.
|
|
133
|
+
|
|
134
|
+
## Reject For Now
|
|
135
|
+
|
|
136
|
+
OpenWorkflow should not adopt these as M09 defaults:
|
|
137
|
+
|
|
138
|
+
- GitHub issue tracker as the central planning artifact.
|
|
139
|
+
- Root-level `CONTEXT.md` and `docs/adr/` as mandatory structure.
|
|
140
|
+
- Skill-specific setup command as a prerequisite for core workflow use.
|
|
141
|
+
- Broad production implementation protocols before the discovery loop is
|
|
142
|
+
stable.
|
|
143
|
+
- Copying reference skill content verbatim into generated OpenWorkflow command
|
|
144
|
+
files.
|
|
145
|
+
|
|
146
|
+
## M09 Implications
|
|
147
|
+
|
|
148
|
+
M09 should deepen the discovery loop:
|
|
149
|
+
|
|
150
|
+
```txt
|
|
151
|
+
/ow:vision -> /ow:validation -> /ow:prototype -> /ow:decision
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### /ow:vision
|
|
155
|
+
|
|
156
|
+
Adopt `grill-with-docs` style:
|
|
157
|
+
|
|
158
|
+
- ask one question at a time
|
|
159
|
+
- recommend an answer for each question
|
|
160
|
+
- inspect repo context when the answer can be discovered
|
|
161
|
+
- sharpen fuzzy language into canonical terms
|
|
162
|
+
- update `.openworkflow/vision/` and `.openworkflow/context/` only when the
|
|
163
|
+
concept is stable
|
|
164
|
+
- avoid creating validation, prototype, spec, change, or runtime artifacts
|
|
165
|
+
|
|
166
|
+
### /ow:validation
|
|
167
|
+
|
|
168
|
+
Borrow the "answer one question" discipline:
|
|
169
|
+
|
|
170
|
+
- identify the core validation question
|
|
171
|
+
- classify features as existential, supporting, later, or out of scope
|
|
172
|
+
- define what evidence would prove or disprove the current product direction
|
|
173
|
+
- produce a prototype brief, not a production plan
|
|
174
|
+
|
|
175
|
+
### /ow:prototype
|
|
176
|
+
|
|
177
|
+
Adapt `prototype` directly:
|
|
178
|
+
|
|
179
|
+
- choose a branch based on the validation question:
|
|
180
|
+
- logic/state prototype
|
|
181
|
+
- UI/experience prototype
|
|
182
|
+
- make the prototype obviously throwaway
|
|
183
|
+
- provide one command or URL to run it
|
|
184
|
+
- surface the relevant state or variants
|
|
185
|
+
- write durable evidence and result artifacts under `.openworkflow/prototypes/`
|
|
186
|
+
- forbid spec, change, team, persistence, and production hardening
|
|
187
|
+
|
|
188
|
+
### /ow:decision
|
|
189
|
+
|
|
190
|
+
Combine prototype cleanup and ADR selectivity:
|
|
191
|
+
|
|
192
|
+
- record what the prototype answered
|
|
193
|
+
- choose `continue`, `pivot`, `stop`, or `needs_more_evidence`
|
|
194
|
+
- keep only the decision-rich evidence
|
|
195
|
+
- only authorize `/ow:spec` when the prototype evidence supports continuation
|
|
196
|
+
- archive or mark throwaway prototype artifacts instead of letting them rot
|
|
197
|
+
|
|
198
|
+
## Key Design Rule
|
|
199
|
+
|
|
200
|
+
OpenWorkflow should learn from the reference repo's engineering discipline, but
|
|
201
|
+
keep its own core contract:
|
|
202
|
+
|
|
203
|
+
> Commands may be small and composable, but durable truth lives in
|
|
204
|
+
> `.openworkflow/`, not in chat memory, issue comments, or tool-specific files.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# npm-first CLI Architecture
|
|
2
|
+
|
|
3
|
+
OpenWorkflow should be distributed as an npm package with an `openworkflow`
|
|
4
|
+
binary.
|
|
5
|
+
|
|
6
|
+
Primary initialization flow:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx openworkflow init <folder> --tools codex
|
|
10
|
+
openworkflow validate --root <folder>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Source Of Truth
|
|
14
|
+
|
|
15
|
+
Initialized projects use `.openworkflow/` as the platform-independent source of
|
|
16
|
+
truth:
|
|
17
|
+
|
|
18
|
+
```txt
|
|
19
|
+
.openworkflow/
|
|
20
|
+
workflow/
|
|
21
|
+
context/
|
|
22
|
+
vision/
|
|
23
|
+
validation/
|
|
24
|
+
prototypes/
|
|
25
|
+
decisions/
|
|
26
|
+
specs/
|
|
27
|
+
changes/
|
|
28
|
+
runtime/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Tool-specific folders are adapters. For Codex:
|
|
32
|
+
|
|
33
|
+
```txt
|
|
34
|
+
.codex/
|
|
35
|
+
agents/
|
|
36
|
+
skills/
|
|
37
|
+
commands/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The adapter can be regenerated from `.openworkflow/`; it must not become the
|
|
41
|
+
canonical workflow state.
|
|
42
|
+
|
|
43
|
+
## Package Layout
|
|
44
|
+
|
|
45
|
+
```txt
|
|
46
|
+
packages/
|
|
47
|
+
cli/
|
|
48
|
+
src/
|
|
49
|
+
core/
|
|
50
|
+
src/
|
|
51
|
+
adapters/
|
|
52
|
+
codex/
|
|
53
|
+
src/
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`core` owns contract generation and validation. `cli` owns argument parsing and
|
|
57
|
+
command routing. `adapters/*` generate tool-specific surfaces.
|
|
58
|
+
|
|
59
|
+
## M04 Scope
|
|
60
|
+
|
|
61
|
+
M04 provides a minimal working CLI foundation. It does not publish to npm or
|
|
62
|
+
replace every existing Python prototype helper.
|
|
63
|
+
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Runtime Command Surface
|
|
2
|
+
|
|
3
|
+
This reference records runtime command-surface decisions from dogfooding a real
|
|
4
|
+
`/ow:vision -> /ow:validation -> /ow:proto -> /ow:decision` run.
|
|
5
|
+
|
|
6
|
+
## OpenSpec Findings
|
|
7
|
+
|
|
8
|
+
OpenSpec separates what a command means from where a tool expects that command
|
|
9
|
+
to live:
|
|
10
|
+
|
|
11
|
+
- Command content is tool-agnostic.
|
|
12
|
+
- Tool adapters decide file path and frontmatter.
|
|
13
|
+
- OpenSpec's older Codex adapter used global prompt files, but Codex's official
|
|
14
|
+
custom workflow mechanism is repo-local Skills.
|
|
15
|
+
- OpenWorkflow's Codex adapter should generate Skills under `.agents/skills/`.
|
|
16
|
+
- Artifact instructions use XML-style tags such as `<task>`, `<rules>`, and
|
|
17
|
+
`<template>`.
|
|
18
|
+
- HTML comments tell the agent which sections are constraints and must not be
|
|
19
|
+
copied into output artifacts.
|
|
20
|
+
|
|
21
|
+
OpenWorkflow should adopt the adapter separation and XML/comment convention,
|
|
22
|
+
but keep its own validation-first discovery loop.
|
|
23
|
+
|
|
24
|
+
## Minimal Init
|
|
25
|
+
|
|
26
|
+
`openworkflow init` should create the runtime substrate plus inert artifact
|
|
27
|
+
templates advertised by `ARTIFACT_CONTRACTS.yaml`:
|
|
28
|
+
|
|
29
|
+
```txt
|
|
30
|
+
.openworkflow/
|
|
31
|
+
config.yaml
|
|
32
|
+
workflow/
|
|
33
|
+
WORKFLOW_INDEX.yaml
|
|
34
|
+
audit/
|
|
35
|
+
COMMAND_AUDIT_INDEX.yaml
|
|
36
|
+
CONTEXT_PACKETS.yaml
|
|
37
|
+
ARTIFACT_CONTRACTS.yaml
|
|
38
|
+
DISCLOSURE_LEVELS.yaml
|
|
39
|
+
vision/_templates/VISION_SESSION.yaml
|
|
40
|
+
validation/_templates/VALIDATION.yaml
|
|
41
|
+
prototypes/_templates/EVIDENCE.yaml
|
|
42
|
+
decisions/_templates/DECISION.yaml
|
|
43
|
+
design/_templates/PRODUCT_DESIGN.yaml
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Stage indexes and active artifacts are lazy-created by commands:
|
|
47
|
+
|
|
48
|
+
- `/ow:vision` creates `.openworkflow/vision/`.
|
|
49
|
+
- `/ow:validation` creates `.openworkflow/validation/`.
|
|
50
|
+
- `/ow:proto` creates `.openworkflow/prototypes/`.
|
|
51
|
+
- `/ow:tune` updates `.openworkflow/prototypes/` and writes internal decision audit records.
|
|
52
|
+
- `/ow:design` creates `.openworkflow/design/`.
|
|
53
|
+
- `/ow:spec` creates `.openworkflow/specs/`.
|
|
54
|
+
|
|
55
|
+
This keeps a new target repo from pretending every workflow stage already
|
|
56
|
+
exists while still making advertised authoring templates available to agents.
|
|
57
|
+
|
|
58
|
+
## Codex Skill Registration
|
|
59
|
+
|
|
60
|
+
For Codex, OpenWorkflow commands should be generated as repo-local Skills:
|
|
61
|
+
|
|
62
|
+
```txt
|
|
63
|
+
.agents/skills/ow-vision/SKILL.md
|
|
64
|
+
.agents/skills/ow-validation/SKILL.md
|
|
65
|
+
.agents/skills/ow-proto/SKILL.md
|
|
66
|
+
.agents/skills/ow-tune/SKILL.md
|
|
67
|
+
.agents/skills/ow-design/SKILL.md
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Each `SKILL.md` uses frontmatter:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
---
|
|
74
|
+
name: ow-vision
|
|
75
|
+
description: Create or refine the product vision contract through focused collaboration.
|
|
76
|
+
---
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Each skill may include `agents/openai.yaml` for Codex App display metadata:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
interface:
|
|
83
|
+
display_name: "/ow:vision"
|
|
84
|
+
short_description: "Create or refine the product vision contract through focused collaboration."
|
|
85
|
+
default_prompt: "Use /ow:vision for this OpenWorkflow repository."
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The durable OpenWorkflow semantic command remains `/ow:vision`; the explicit
|
|
89
|
+
Codex invocation is `$ow-vision`. Codex may also expose enabled Skills in the
|
|
90
|
+
slash command list, but OpenWorkflow treats Skill registration as the adapter
|
|
91
|
+
contract.
|
|
92
|
+
|
|
93
|
+
OpenWorkflow should not generate `.codex/commands/ow/*.md`,
|
|
94
|
+
`.codex/skills/*`, or `$CODEX_HOME/prompts/ow-*.md` as the default Codex
|
|
95
|
+
surface. Generated legacy files in those locations may be safely removed when
|
|
96
|
+
they carry the OpenWorkflow generated marker.
|
|
97
|
+
|
|
98
|
+
## Interactive Command Behavior
|
|
99
|
+
|
|
100
|
+
Interactive commands should be quiet:
|
|
101
|
+
|
|
102
|
+
- Ask one clear question.
|
|
103
|
+
- Do not narrate routine file reads, writes, or validation.
|
|
104
|
+
- Do not run full validation after every user answer.
|
|
105
|
+
- Save checkpoints when a stage completes, when the user asks to save, or when
|
|
106
|
+
the command needs a durable handoff.
|
|
107
|
+
|
|
108
|
+
Agent-only protocol should live in XML-style blocks and comments, for example:
|
|
109
|
+
|
|
110
|
+
```xml
|
|
111
|
+
<agent_protocol>
|
|
112
|
+
<!-- Internal instructions. Do not expose routine protocol steps to the user. -->
|
|
113
|
+
<inner_thinking>
|
|
114
|
+
Private reasoning, critique, and scope checks. Do not expose chain-of-thought.
|
|
115
|
+
</inner_thinking>
|
|
116
|
+
</agent_protocol>
|
|
117
|
+
|
|
118
|
+
<user_behavior>
|
|
119
|
+
Ask one question at a time. Keep the visible response short.
|
|
120
|
+
</user_behavior>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## /ow:tune And Internal Decision Audit
|
|
124
|
+
|
|
125
|
+
`/ow:tune` is the user-facing prototype iteration command. `/ow:tune` and
|
|
126
|
+
`/ow:tune:proto` default to the current prototype. If no current prototype
|
|
127
|
+
exists but a current validation target exists, tune may orchestrate first
|
|
128
|
+
prototype creation through `/ow:proto` behavior.
|
|
129
|
+
|
|
130
|
+
`/ow:decision` remains an internal audit command. Proto and tune flows write
|
|
131
|
+
decision records automatically after evidence changes or user review outcomes.
|
|
132
|
+
Normal user-facing handoffs should point to `/ow:tune`, `/ow:design`, or
|
|
133
|
+
`/ow:validation`, not ask users to manually invoke `/ow:decision`.
|
|
134
|
+
|
|
135
|
+
## /ow:design
|
|
136
|
+
|
|
137
|
+
`/ow:design` bridges accepted prototype evidence to product development. It is
|
|
138
|
+
not production implementation and not a one-shot giant PRD.
|
|
139
|
+
|
|
140
|
+
Required artifact:
|
|
141
|
+
|
|
142
|
+
```txt
|
|
143
|
+
.openworkflow/design/<id>/PRODUCT_DESIGN.yaml
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The required product design should capture:
|
|
147
|
+
|
|
148
|
+
- accepted prototype evidence
|
|
149
|
+
- target users and user personas
|
|
150
|
+
- user journey map
|
|
151
|
+
- user stories
|
|
152
|
+
- feature matrix
|
|
153
|
+
- KANO classification and priority
|
|
154
|
+
- product behavior model
|
|
155
|
+
- UX states and edge cases
|
|
156
|
+
- accepted, rejected, and deferred scope
|
|
157
|
+
- open questions
|
|
158
|
+
- readiness for `/ow:spec`
|
|
159
|
+
|
|
160
|
+
Conditional packets may be created only when needed:
|
|
161
|
+
|
|
162
|
+
- `TECH_SPEC.yaml`
|
|
163
|
+
- `FRONTEND_SPEC.yaml`
|
|
164
|
+
- `BACKEND_SPEC.yaml`
|
|
165
|
+
- `API_CONTRACT.yaml`
|
|
166
|
+
- `DB_SCHEMA_MODEL.yaml`
|
|
167
|
+
|
|
168
|
+
These packets must remain opt-in so `/ow:design` does not recreate the artifact
|
|
169
|
+
bloat that OpenWorkflow is trying to avoid.
|