okstra 0.122.0 → 0.124.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/README.md +5 -2
- package/docs/architecture/storage-model.md +15 -1
- package/docs/architecture.md +45 -7
- package/docs/cli.md +47 -5
- package/docs/for-ai/README.md +42 -36
- package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
- package/docs/for-ai/skills/okstra-container-build.md +61 -61
- package/docs/for-ai/skills/okstra-graphify.md +64 -0
- package/docs/for-ai/skills/okstra-inspect.md +86 -86
- package/docs/for-ai/skills/okstra-manager.md +32 -32
- package/docs/for-ai/skills/okstra-memory.md +49 -50
- package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
- package/docs/for-ai/skills/okstra-rollup.md +58 -58
- package/docs/for-ai/skills/okstra-run.md +95 -95
- package/docs/for-ai/skills/okstra-schedule-gen.md +320 -0
- package/docs/for-ai/skills/okstra-setup.md +63 -64
- package/docs/for-ai/skills/okstra-user-response.md +48 -0
- package/docs/performance-improvement-plan-v2.md +4 -4
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +92 -70
- package/docs/task-process/README.md +33 -33
- package/docs/task-process/common-flow.md +26 -26
- package/docs/task-process/error-analysis.md +20 -21
- package/docs/task-process/final-verification.md +41 -41
- package/docs/task-process/implementation-planning.md +52 -28
- package/docs/task-process/implementation.md +51 -32
- package/docs/task-process/release-handoff.md +46 -46
- package/docs/task-process/requirements-discovery.md +22 -23
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/antigravity-worker.md +4 -4
- package/runtime/agents/workers/claude-worker.md +2 -2
- package/runtime/agents/workers/codex-worker.md +4 -4
- package/runtime/agents/workers/report-writer-worker.md +4 -4
- package/runtime/bin/lib/okstra/usage.sh +3 -3
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +6 -3
- package/runtime/prompts/lead/convergence.md +11 -21
- package/runtime/prompts/lead/okstra-lead-contract.md +16 -18
- package/runtime/prompts/lead/plan-body-verification.md +47 -18
- package/runtime/prompts/lead/report-writer.md +50 -45
- package/runtime/prompts/lead/team-contract.md +11 -122
- package/runtime/prompts/profiles/_common-contract.md +15 -22
- package/runtime/prompts/profiles/_implementation-deliverable.md +4 -2
- package/runtime/prompts/profiles/_implementation-executor.md +6 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +3 -1
- package/runtime/prompts/profiles/implementation-planning.md +24 -14
- package/runtime/prompts/profiles/implementation.md +1 -1
- package/runtime/prompts/profiles/improvement-discovery.md +1 -1
- package/runtime/prompts/profiles/release-handoff.md +3 -3
- package/runtime/prompts/profiles/requirements-discovery.md +18 -18
- package/runtime/prompts/wizard/prompts.ko.json +44 -0
- package/runtime/python/okstra_ctl/codex_dispatch.py +23 -1
- package/runtime/python/okstra_ctl/design_prep.py +1462 -0
- package/runtime/python/okstra_ctl/design_surfaces.py +243 -0
- package/runtime/python/okstra_ctl/final_report_schema.py +33 -1
- package/runtime/python/okstra_ctl/implementation_stage.py +35 -0
- package/runtime/python/okstra_ctl/incremental_carry.py +294 -21
- package/runtime/python/okstra_ctl/incremental_scope.py +51 -5
- package/runtime/python/okstra_ctl/material.py +1 -1
- package/runtime/python/okstra_ctl/model_discovery.py +98 -0
- package/runtime/python/okstra_ctl/models.py +8 -3
- package/runtime/python/okstra_ctl/render.py +5 -0
- package/runtime/python/okstra_ctl/run.py +53 -5
- package/runtime/python/okstra_ctl/user_response.py +67 -2
- package/runtime/python/okstra_ctl/wizard.py +283 -3
- package/runtime/python/okstra_token_usage/report.py +11 -0
- package/runtime/schemas/final-report-v1.0.schema.json +336 -0
- package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
- package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
- package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
- package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
- package/runtime/skills/okstra-container-build/SKILL.md +24 -14
- package/runtime/skills/okstra-graphify/SKILL.md +12 -4
- package/runtime/skills/okstra-inspect/SKILL.md +105 -99
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-rollup/SKILL.md +12 -6
- package/runtime/skills/okstra-run/SKILL.md +49 -88
- package/runtime/skills/{okstra-schedule → okstra-schedule-gen}/SKILL.md +38 -32
- package/runtime/skills/okstra-setup/SKILL.md +1 -1
- package/runtime/skills/okstra-setup/references/project-config.md +17 -16
- package/runtime/skills/okstra-usage/SKILL.md +5 -2
- package/runtime/skills/okstra-user-response/SKILL.md +23 -9
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/reports/error-analysis-input.template.md +1 -1
- package/runtime/templates/reports/fan-out-unit.template.md +6 -6
- package/runtime/templates/reports/final-report.template.md +67 -0
- package/runtime/templates/reports/final-verification-input.template.md +6 -6
- package/runtime/templates/reports/i18n/en.json +31 -0
- package/runtime/templates/reports/i18n/ko.json +31 -0
- package/runtime/templates/reports/implementation-input.template.md +1 -1
- package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
- package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
- package/runtime/templates/reports/quick-input.template.md +1 -1
- package/runtime/templates/reports/release-handoff-input.template.md +1 -1
- package/runtime/templates/reports/schedule.template.md +22 -22
- package/runtime/templates/reports/task-brief.template.md +3 -3
- package/runtime/templates/reports/user-response.template.md +20 -20
- package/runtime/templates/worker-prompt-preamble.md +111 -13
- package/runtime/validators/validate-run.py +426 -5
- package/runtime/validators/validate-schedule.py +5 -5
- package/src/cli-registry.mjs +7 -0
- package/src/commands/inspect/design-prep.mjs +23 -0
- package/src/lib/skill-catalog.mjs +2 -1
- package/docs/for-ai/skills/okstra-schedule.md +0 -320
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
# okstra-brief-gen AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- brief
|
|
5
|
+
- Skill source: [`skills/okstra-brief-gen/SKILL.md`](../../../skills/okstra-brief-gen/SKILL.md)
|
|
6
|
+
- brief template: [`templates/reports/brief.template.md`](../../../templates/reports/brief.template.md)
|
|
7
7
|
- brief validator: [`validators/validate-brief.py`](../../../validators/validate-brief.py)
|
|
8
8
|
- lens enum SSOT: [`scripts/okstra_ctl/improvement_lenses.py`](../../../scripts/okstra_ctl/improvement_lenses.py)
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Purpose
|
|
11
11
|
|
|
12
|
-
`okstra-brief-gen
|
|
12
|
+
`okstra-brief-gen` produces a task brief to feed into the okstra pipeline. A brief is a pre-discovery artifact. It is not a document that turns requirements into an implementation plan; it is a handoff document that separates the reporter's verbatim material from the AI-verified evidence/interpretation using labels, so the next phase can start without questions.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Output location:
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
17
|
<PROJECT_ROOT>/.okstra/briefs/<task-group>/<brief-id>.md
|
|
18
18
|
<PROJECT_ROOT>/.okstra/briefs/<task-group>/sub/.../<brief-id>.md
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Three variants
|
|
22
22
|
|
|
23
|
-
| Variant |
|
|
23
|
+
| Variant | Input | Recommended next phase |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
| Reporter input |
|
|
25
|
+
| Reporter input | files, tickets, URLs, conversation/free text | `requirements-discovery` or `error-analysis` |
|
|
26
26
|
| Codebase scan | scan scope, priority lenses, candidate cap, context | `improvement-discovery` |
|
|
27
|
-
| Error feedback |
|
|
27
|
+
| Error feedback | a single error cluster from the zip produced by `okstra error-zip` | `error-analysis` |
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Core invariants
|
|
30
30
|
|
|
31
|
-
1. Source Material
|
|
32
|
-
2. AI
|
|
33
|
-
3. augmentation
|
|
34
|
-
4. `intent-inference
|
|
35
|
-
5. `terminology-mapping` augmentation
|
|
36
|
-
6. reporter
|
|
37
|
-
7.
|
|
38
|
-
8.
|
|
39
|
-
9. `Open Questions
|
|
31
|
+
1. Source Material is a verbatim-preservation area. Do not paraphrase, summarize, or reorder.
|
|
32
|
+
2. The AI's interpretation, file links, terminology mapping, and format conversion all go under `Augmentation` or a `> augmented:` blockquote.
|
|
33
|
+
3. An augmentation carries one of four labels: `evidence-link`, `format-conversion`, `terminology-mapping`, `intent-inference`.
|
|
34
|
+
4. `intent-inference` is paired with `intent-check:` in `Open Questions`. This relationship is checked by `validators/validate-brief.py`.
|
|
35
|
+
5. A `terminology-mapping` augmentation is paired with `terminology:` in `Open Questions` (validator-checked). Exception: the Step 4.5 result markers `applied glossary:` / `skipped glossary:` need no paired row.
|
|
36
|
+
6. Questions only the reporter can answer are collected in Step 6.5 and recorded verbatim under `## Reporter Confirmations`.
|
|
37
|
+
7. Ticket split/link/order relations go in the structured table of `## Related Task Graph`. Do not infer work order from parent-id alone.
|
|
38
|
+
8. Every okstra-owned write stays inside `<PROJECT_ROOT>/.okstra/`. External files are read only when the reporter explicitly cited them as source.
|
|
39
|
+
9. Every row in `Open Questions` starts with one of five prefixes: `general:`, `terminology:`, `intent-check:`, `conversion-block:`, `adr-candidate:` (validator-enforced). `adr-candidate:` is only a signal — the decision file is written by `implementation-planning` into `<PROJECT_ROOT>/.okstra/decisions/`.
|
|
40
40
|
|
|
41
41
|
## Preflight
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Run as a single call.
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
okstra preflight --runtime claude-code --json
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
runtime
|
|
49
|
+
If runtime or project setup is missing, guide the user to `/okstra-setup` and stop. This skill does not use an `npx` fallback.
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Input collection
|
|
52
52
|
|
|
53
53
|
### Reporter input
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
More than one source type is allowed, but each source is stored as a separate block under `Source Material`.
|
|
56
56
|
|
|
57
|
-
- File:
|
|
58
|
-
- Issue tracker ticket: Linear/Jira/GitHub/Notion
|
|
59
|
-
- Link URL: fetch
|
|
60
|
-
- User input:
|
|
57
|
+
- File: read the entire file and insert it as-is.
|
|
58
|
+
- Issue tracker ticket: detect Linear/Jira/GitHub/Notion and use MCP or the `gh` CLI. If no access tool is available, ask the user to paste the body or skip.
|
|
59
|
+
- Link URL: fetch it. On failure / login wall / body truncation, ask the user to paste.
|
|
60
|
+
- User input: if conversation context is sufficient, use conversation synthesis; if thin, take a single free-text input.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
If a ticket has children/sub-tasks, ask once at the parent how to handle the tree.
|
|
63
63
|
|
|
64
|
-
- Full tree:
|
|
65
|
-
- Parent only: child
|
|
66
|
-
- Selected:
|
|
64
|
+
- Full tree: generate a brief per descendant.
|
|
65
|
+
- Parent only: put child keys/URLs in Related Artifacts and leave a `parent-of` edge in `Related Task Graph`.
|
|
66
|
+
- Selected: recurse only into the chosen direct-child branch.
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
Full tree
|
|
68
|
+
During recursion, manage the visited set as `<tracker>:<ticket-id>`, and on re-run reseed from the existing brief frontmatter's `ticket-id` + `source-type`.
|
|
69
|
+
When Full tree or Selected produces multiple briefs, copy the same `Related Task Graph` into every generated brief. That way, even if only one child brief is passed to a downstream phase, the split topology, predecessor/successor relations, and de-duplication signals are preserved.
|
|
70
70
|
|
|
71
71
|
`Related Task Graph` table schema:
|
|
72
72
|
|
|
@@ -77,39 +77,39 @@ Full tree 또는 Selected로 여러 brief를 만들면 모든 생성 brief에
|
|
|
77
77
|
| To | task key, brief id, tracker id, or URL |
|
|
78
78
|
| Direction | `directed` or `undirected` |
|
|
79
79
|
| Source | tracker linked issue, task-list checkbox, reporter statement, manual split, prior okstra task |
|
|
80
|
-
| Impact | downstream phase
|
|
80
|
+
| Impact | meaning the downstream phase must preserve |
|
|
81
81
|
|
|
82
|
-
`depends-on`, `blocks`, parent/child, follow-up, split
|
|
82
|
+
`depends-on`, `blocks`, parent/child, follow-up, and split relations are `directed`. `duplicates` and `related-to` are `undirected`. Do not create a relation with no source.
|
|
83
83
|
|
|
84
84
|
### Codebase scan
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Collected values:
|
|
87
87
|
|
|
88
|
-
- `scan_scope`:
|
|
89
|
-
- `priority_lenses`: `LENSES` enum
|
|
90
|
-
- `out_of_scope`:
|
|
91
|
-
- `candidate_cap`: 1
|
|
88
|
+
- `scan_scope`: a list of real paths inside the project.
|
|
89
|
+
- `priority_lenses`: 1–4 of the `LENSES` enum.
|
|
90
|
+
- `out_of_scope`: optional.
|
|
91
|
+
- `candidate_cap`: 1–12, default 8.
|
|
92
92
|
- context, desired outcome, constraints.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Verify path existence, the lens enum subset, and the candidate-cap range before writing. Final validation is done by `validate-brief.py`, which checks `scope: codebase`, `Scan Scope`, and `Priority Lenses`.
|
|
95
95
|
|
|
96
96
|
### Error feedback
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
The input is the zip produced by `okstra error-zip --out <path>`.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Processing:
|
|
101
101
|
|
|
102
|
-
1. zip
|
|
103
|
-
2.
|
|
104
|
-
3.
|
|
105
|
-
4.
|
|
106
|
-
5.
|
|
102
|
+
1. Confirm the zip contains `report.md` and `errors/anonymized.jsonl`.
|
|
103
|
+
2. Pick exactly one cluster from the frequent-cluster table.
|
|
104
|
+
3. Move only the chosen cluster's anonymized records into Source Material.
|
|
105
|
+
4. Do not mix different errorTypes into one brief.
|
|
106
|
+
5. Set the next-step guidance to `error-analysis`.
|
|
107
107
|
|
|
108
|
-
## task-group
|
|
108
|
+
## task-group and filename
|
|
109
109
|
|
|
110
|
-
task-group
|
|
110
|
+
For task-group, show existing-group recommendations first. Call `okstra task-list`, extract the distinct `taskGroup` values from `tasks[]` in most-recent order, and offer the 2 most recent + enter-directly. In tracker recursion, task-group must be obtained before building any child path.
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
File path rule:
|
|
113
113
|
|
|
114
114
|
```text
|
|
115
115
|
depth 0: .okstra/briefs/<task-group>/<ticket-id>-<file-title>.md
|
|
@@ -117,56 +117,56 @@ depth 1: .okstra/briefs/<task-group>/sub/<ticket-id>-<file-title>.md
|
|
|
117
117
|
depth N: .okstra/briefs/<task-group>/<sub/ repeated N>/<ticket-id>-<file-title>.md
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
frontmatter
|
|
120
|
+
The frontmatter's `depth` must equal the number of `sub/` segments in the path. The validator checks this.
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
On collision, the default is Skip. You may offer Append suffix or Overwrite. Do not silently perform a bulk overwrite in tracker multi-generation.
|
|
123
123
|
|
|
124
124
|
## Domain alignment
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
First look at okstra's internal memory.
|
|
127
127
|
|
|
128
128
|
- `<PROJECT_ROOT>/.okstra/glossary.md`
|
|
129
129
|
- `<PROJECT_ROOT>/.okstra/decisions/`
|
|
130
|
-
-
|
|
130
|
+
- the related task's `history/fix-cycles.jsonl`
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
Read external domain docs only when the reporter explicitly cited them as source material. Record conflicting/ambiguous terms under `Augmentation > Domain alignment` with `terminology-mapping`, and put a `terminology:` row in `Open Questions`.
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
When a file path or symbol is mentioned, find the actual in-repo reference with `Read`/`Grep` and record it as `evidence-link`. If it cannot be mapped, do not guess — leave a `conversion-block:` row.
|
|
135
135
|
|
|
136
136
|
## Sharpening pass
|
|
137
137
|
|
|
138
|
-
full interview
|
|
138
|
+
Do not run a full interview. Ask only about gaps that source and codebase cannot fill.
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Default budget:
|
|
141
141
|
|
|
142
|
-
-
|
|
143
|
-
- terminology/fuzzy disambiguation
|
|
144
|
-
-
|
|
145
|
-
- codebase-scan
|
|
142
|
+
- at most 1 question per section the source skill designates as fill-in.
|
|
143
|
+
- at most 2 questions for terminology/fuzzy disambiguation.
|
|
144
|
+
- at most 6 questions overall.
|
|
145
|
+
- codebase-scan up to 8 questions.
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
Prefer codebase-first checks over questions. Put remaining gaps in `_(none)_` or `Open Questions`.
|
|
148
148
|
|
|
149
|
-
## template
|
|
149
|
+
## template writing rules
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
The template `templates/reports/brief.template.md` is the SSOT. Follow the section order, frontmatter keys, top blockquote shape, and HTML comment guidance.
|
|
152
152
|
|
|
153
|
-
Reporter input
|
|
153
|
+
Reporter input and Error feedback:
|
|
154
154
|
|
|
155
|
-
- `## Source Material
|
|
156
|
-
- `## Problem / Symptom
|
|
157
|
-
- `## Scan Scope`, `## Priority Lenses
|
|
155
|
+
- keep `## Source Material`.
|
|
156
|
+
- keep `## Problem / Symptom`.
|
|
157
|
+
- omit `## Scan Scope`, `## Priority Lenses`.
|
|
158
158
|
|
|
159
159
|
Codebase scan:
|
|
160
160
|
|
|
161
|
-
-
|
|
162
|
-
- `## Source Material`, `## Problem / Symptom
|
|
163
|
-
- `## Scan Scope`, `## Priority Lenses
|
|
161
|
+
- `scope: codebase` in frontmatter.
|
|
162
|
+
- omit `## Source Material`, `## Problem / Symptom`.
|
|
163
|
+
- keep `## Scan Scope`, `## Priority Lenses`.
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Do not fabricate empty sections. When there is no value, use `_(none)_`.
|
|
166
166
|
|
|
167
167
|
## frontmatter key
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
Every brief carries the following keys. The key set is checked by `validate-brief.py`.
|
|
170
170
|
|
|
171
171
|
- `type`
|
|
172
172
|
- `brief-id`
|
|
@@ -179,42 +179,42 @@ Codebase scan:
|
|
|
179
179
|
- `generator`
|
|
180
180
|
- `reporter-confirmations`
|
|
181
181
|
|
|
182
|
-
`brief-id
|
|
182
|
+
`brief-id` must equal the filename stem. At depth 0 the `parent-id` is `self`; a descendant's `parent-id` is its direct parent's `brief-id`.
|
|
183
183
|
|
|
184
184
|
## Recommended next phase
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Write it into the `Recommended next phase:` of the brief body's top blockquote.
|
|
187
187
|
|
|
188
188
|
- observable error, repro, stack trace, error-zip record: `error-analysis`
|
|
189
|
-
- ambiguity
|
|
189
|
+
- a requirement with ambiguity or large Open Questions: `requirements-discovery`
|
|
190
190
|
- `scope: codebase`: `improvement-discovery`
|
|
191
|
-
-
|
|
191
|
+
- if ambiguous: `requirements-discovery`
|
|
192
192
|
|
|
193
|
-
`okstra-run
|
|
193
|
+
Do not auto-start `okstra-run`.
|
|
194
194
|
|
|
195
195
|
## Reporter Confirmations
|
|
196
196
|
|
|
197
|
-
`Open Questions
|
|
197
|
+
Collect the rows in `Open Questions` that only the reporter can answer.
|
|
198
198
|
|
|
199
199
|
- `intent-check:`
|
|
200
200
|
- `conversion-block:`
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
If a `[CONFIRMED <date> → RC-N]` marker already exists, exclude it from pending. Ask the user whether to answer now; if they answer, record it verbatim under `## Reporter Confirmations`. Do not delete the row — attach a marker.
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
At most 12 questions per run. If pending exceeds 12, ask only the top 12 in `conversion-block:` → `intent-check:` order, leave the rest as `partial`, then tell the user which rows remain.
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
Status values:
|
|
207
207
|
|
|
208
|
-
- `complete`: pending reporter-only
|
|
209
|
-
- `partial`:
|
|
210
|
-
- `skipped`:
|
|
211
|
-
- `pending`: handoff
|
|
208
|
+
- `complete`: all pending reporter-only rows are answered. The validator checks that every `intent-check:`/`conversion-block:` row has a `[CONFIRMED …]` marker.
|
|
209
|
+
- `partial`: only some are answered. The validator checks that at least one row has a `[CONFIRMED …]` marker (if nothing was received, `skipped`).
|
|
210
|
+
- `skipped`: the user chose to defer to a downstream phase.
|
|
211
|
+
- `pending`: treated as a pre-handoff state; do not proceed.
|
|
212
212
|
|
|
213
|
-
##
|
|
213
|
+
## Validation
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
After writing, run the validator before emitting the handoff message.
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
Installed copy:
|
|
218
218
|
|
|
219
219
|
```bash
|
|
220
220
|
~/.okstra/lib/validators/validate-brief.sh "<PROJECT_ROOT>/.okstra/briefs" --briefs-root "<PROJECT_ROOT>/.okstra/briefs"
|
|
@@ -226,19 +226,19 @@ repo checkout:
|
|
|
226
226
|
validators/validate-brief.sh "<PROJECT_ROOT>/.okstra/briefs" --briefs-root "<PROJECT_ROOT>/.okstra/briefs"
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
On failure, fix the cited brief and re-run. Fall back to a manual checklist only when the validator is absent.
|
|
230
|
+
When a `Related Task Graph` is present, the validator also checks the table header, relation enum, direction enum, and directed/undirected mismatch.
|
|
231
231
|
|
|
232
|
-
##
|
|
232
|
+
## Completion message
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Single brief:
|
|
235
235
|
|
|
236
236
|
```text
|
|
237
237
|
brief saved: <abs-path>
|
|
238
238
|
next: /okstra-run (recommended task-type: <phase>)
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
Multi-brief:
|
|
242
242
|
|
|
243
243
|
```text
|
|
244
244
|
briefs saved (N):
|
|
@@ -247,12 +247,12 @@ briefs saved (N):
|
|
|
247
247
|
next: /okstra-run
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
##
|
|
250
|
+
## Forbidden patterns
|
|
251
251
|
|
|
252
|
-
- Source Material
|
|
253
|
-
- tracker/URL
|
|
254
|
-
- unlabelled augmentation
|
|
255
|
-
- `intent-inference
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
252
|
+
- Summarizing or tidying Source Material before inserting it.
|
|
253
|
+
- Guessing tracker/URL content without tool verification.
|
|
254
|
+
- Writing unlabelled augmentation.
|
|
255
|
+
- Leaving `intent-inference` without `intent-check:`.
|
|
256
|
+
- Writing a decision file into external docs/ADR. okstra decisions belong only in `<PROJECT_ROOT>/.okstra/decisions/`.
|
|
257
|
+
- Silently overwriting an entire child tree.
|
|
258
|
+
- Auto-starting `okstra-run` right after brief generation.
|
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
# okstra-container-build AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Skill source: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
|
|
6
6
|
- container CLI wrapper: [`src/commands/inspect/container.mjs`](../../../src/commands/inspect/container.mjs)
|
|
7
7
|
- container runtime: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
|
|
8
8
|
- container registry: [`scripts/okstra_ctl/container_registry.py`](../../../scripts/okstra_ctl/container_registry.py)
|
|
9
9
|
- stage integration gate: [`scripts/okstra_ctl/stage_targets.py`](../../../scripts/okstra_ctl/stage_targets.py)
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Purpose
|
|
12
12
|
|
|
13
|
-
`okstra-container-build
|
|
13
|
+
`okstra-container-build` manages a user-test container group using the `docker-compose.yml` in an implementation task worktree. okstra labels the compose group with the task/run trace and observes logs/status through a tmux watcher pane.
|
|
14
14
|
|
|
15
15
|
## sub-command
|
|
16
16
|
|
|
17
|
-
| Sub-command |
|
|
17
|
+
| Sub-command | Role | side effect |
|
|
18
18
|
|---|---|---|
|
|
19
|
-
| `up` | implementation stages
|
|
20
|
-
| `status` | label query
|
|
21
|
-
| `logs` | watcher findings dir
|
|
22
|
-
| `stop-watcher` | watcher/tail tmux panes
|
|
23
|
-
| `down` |
|
|
19
|
+
| `up` | Integrate the implementation stages into the task worktree, then `docker compose up -d`, poll healthchecks, attach the watcher pane | create/start containers, create watcher pane |
|
|
20
|
+
| `status` | Check running containers (by label query) plus watcher metadata | read |
|
|
21
|
+
| `logs` | Point at the watcher findings dir and watcher entries | read |
|
|
22
|
+
| `stop-watcher` | Reap the watcher/tail tmux panes only | keep containers, remove panes |
|
|
23
|
+
| `down` | Remove the container group by label query, reap orphan watcher panes | stop/remove containers |
|
|
24
24
|
|
|
25
25
|
## Preflight
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Single call:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
okstra preflight --runtime claude-code --json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
project
|
|
33
|
+
If the project is not set up, point to `/okstra-setup` and stop. A Docker daemon is required. On a Docker connection error, tell the user to start Docker Desktop/daemon; do not start Docker yourself.
|
|
34
34
|
|
|
35
|
-
## task-key
|
|
35
|
+
## task-key resolution
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Most sub-commands need a full task-key.
|
|
38
38
|
|
|
39
|
-
1. full task-key
|
|
40
|
-
2. bare task-id
|
|
39
|
+
1. If a full task-key is given, use it as-is.
|
|
40
|
+
2. For a bare task-id, use the resolver:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
okstra resolve-task-key <task-id> --project-root <projectRoot> --json
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
3. multiple
|
|
47
|
-
4. `down --all
|
|
46
|
+
3. On multiple matches, show the candidates and let the user pick.
|
|
47
|
+
4. Only `down --all` can run without a task-key.
|
|
48
48
|
|
|
49
49
|
## intent routing
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Clear verbs:
|
|
52
52
|
|
|
53
|
-
- "
|
|
54
|
-
- "
|
|
55
|
-
- "
|
|
56
|
-
- "watcher
|
|
57
|
-
- "
|
|
53
|
+
- "bring up/deploy", "up": `up`
|
|
54
|
+
- "status": `status`
|
|
55
|
+
- "logs": `logs`
|
|
56
|
+
- "stop watcher", "stop-watcher": `stop-watcher`
|
|
57
|
+
- "tear down", "down": `down`
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
If ambiguous, show the full facet list and offer an Enter directly option. When multiple facets are in one message, run Step 0 once and execute the sub-commands sequentially.
|
|
60
60
|
|
|
61
61
|
## up
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Run:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
okstra container up --project-root <projectRoot> --task-key <task-key>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Preconditions:
|
|
70
70
|
|
|
71
|
-
- task
|
|
72
|
-
- worktree root
|
|
73
|
-
- approved plan
|
|
71
|
+
- The task must have an implementation worktree registered in the registry.
|
|
72
|
+
- The worktree root must contain a `docker-compose.yml`.
|
|
73
|
+
- Every stage of the approved plan must be `done`. Do not deploy a partial-stage state as if it were a complete task.
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Handling failure messages:
|
|
76
76
|
|
|
77
|
-
-
|
|
78
|
-
- compose file
|
|
79
|
-
- `final-verification(whole-task): stage N not done`:
|
|
80
|
-
- healthcheck
|
|
77
|
+
- Message that the task worktree is not in the registry: tell the user to run the implementation phase first.
|
|
78
|
+
- No compose file: show the CLI message verbatim.
|
|
79
|
+
- `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
|
|
80
|
+
- healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
On success, parse the stdout JSON and summarize services, watcher pane, and published ports. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
|
|
83
83
|
|
|
84
84
|
## status
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Run:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
okstra container status --project-root <projectRoot> --task-key <task-key>
|
|
@@ -92,14 +92,14 @@ okstra container status --project-root <projectRoot> --task-key <task-key>
|
|
|
92
92
|
stdout JSON:
|
|
93
93
|
|
|
94
94
|
- `projectName`: compose project name
|
|
95
|
-
- `containers`: run-trace label
|
|
96
|
-
- `watchers`:
|
|
95
|
+
- `containers`: running containers found by run-trace label
|
|
96
|
+
- `watchers`: watcher metadata from the registry
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
The `containers` label query is authoritative for whether it is alive. The watcher registry can lag. If `containers` is empty, say the group is not running and offer `up`.
|
|
99
99
|
|
|
100
100
|
## logs
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
Run:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
105
|
okstra container logs --project-root <projectRoot> --task-key <task-key>
|
|
@@ -111,49 +111,49 @@ service scope:
|
|
|
111
111
|
okstra container logs --project-root <projectRoot> --task-key <task-key> --service <service>
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
stdout JSON
|
|
114
|
+
Show the stdout JSON's `watchersDir` and `watchers`. The live stream is in the tmux watcher pane, not a file. If raw compose logs are needed, get `projectName` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
|
|
115
115
|
|
|
116
116
|
## stop-watcher
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Run:
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
121
|
okstra container stop-watcher --project-root <projectRoot> --task-key <task-key>
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
watcher/tail panes
|
|
124
|
+
Remove only the watcher/tail panes and keep the containers. Summarize the stdout JSON's `reapedPanes` and `note`. If the user actually intends to bring the containers down, route to `down`.
|
|
125
125
|
|
|
126
126
|
## down
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Single task:
|
|
129
129
|
|
|
130
130
|
```bash
|
|
131
131
|
okstra container down --project-root <projectRoot> --task-key <task-key>
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
Whole project:
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
137
|
okstra container down --project-root <projectRoot> --all
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
A single-task down is fine to run after resolving the task-key. `--all` takes down every okstra container group in the project, so confirm with the user before running it.
|
|
141
141
|
|
|
142
|
-
stdout JSON
|
|
142
|
+
Report the stdout JSON's `downed` and `orphanPanesReaped`. Show each `projectName` and the reaped panes.
|
|
143
143
|
|
|
144
|
-
##
|
|
144
|
+
## Output rules
|
|
145
145
|
|
|
146
|
-
- stdout JSON
|
|
147
|
-
- raw `docker`
|
|
148
|
-
- resolved task-key
|
|
149
|
-
- CLI failure
|
|
150
|
-
- container/service state
|
|
146
|
+
- The stdout JSON is the source of truth.
|
|
147
|
+
- Do not second-guess it with raw `docker` commands. The only exception is when the CLI failed and the user asked for a manual fallback.
|
|
148
|
+
- Show the resolved task-key in the heading or on the first line.
|
|
149
|
+
- Show CLI failure messages verbatim, including the remediation line.
|
|
150
|
+
- Show container/service state as the JSON values, without normalizing.
|
|
151
151
|
|
|
152
|
-
##
|
|
152
|
+
## Forbidden patterns
|
|
153
153
|
|
|
154
|
-
- Docker daemon
|
|
155
|
-
- `up`
|
|
156
|
-
- partial
|
|
157
|
-
-
|
|
158
|
-
- `down --all
|
|
159
|
-
-
|
|
154
|
+
- Trying to start the Docker daemon yourself.
|
|
155
|
+
- Guessing the cause of an `up` failure and editing the compose file.
|
|
156
|
+
- Dressing up a partial-stage task as deployable.
|
|
157
|
+
- Judging a container as alive from the watcher registry alone.
|
|
158
|
+
- Running `down --all` without user confirmation.
|
|
159
|
+
- Overriding the CLI result arbitrarily with a raw docker query.
|