okstra 0.123.0 → 0.125.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 +1 -0
- package/docs/architecture/storage-model.md +3 -1
- package/docs/architecture.md +16 -2
- package/docs/cli.md +3 -1
- package/docs/for-ai/README.md +41 -35
- 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 +87 -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 +106 -106
- 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 +6 -6
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +91 -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 +33 -33
- package/docs/task-process/implementation.md +38 -38
- 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 +1 -1
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/convergence.md +10 -20
- package/runtime/prompts/lead/okstra-lead-contract.md +15 -17
- package/runtime/prompts/lead/plan-body-verification.md +18 -18
- package/runtime/prompts/lead/report-writer.md +46 -44
- 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 +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +28 -2
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +1 -1
- package/runtime/prompts/profiles/implementation-planning.md +13 -13
- package/runtime/prompts/profiles/implementation.md +2 -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 +17 -18
- package/runtime/python/okstra_ctl/models.py +4 -2
- package/runtime/python/okstra_ctl/run.py +8 -2
- package/runtime/python/okstra_ctl/stage_fix_carry.py +112 -0
- package/runtime/schemas/final-report-v1.0.schema.json +6 -6
- 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 +39 -747
- package/runtime/skills/okstra-inspect/facets/cost.md +84 -0
- package/runtime/skills/okstra-inspect/facets/error-zip.md +41 -0
- package/runtime/skills/okstra-inspect/facets/errors.md +69 -0
- package/runtime/skills/okstra-inspect/facets/history.md +90 -0
- package/runtime/skills/okstra-inspect/facets/logs.md +89 -0
- package/runtime/skills/okstra-inspect/facets/recap.md +96 -0
- package/runtime/skills/okstra-inspect/facets/report.md +61 -0
- package/runtime/skills/okstra-inspect/facets/status.md +145 -0
- package/runtime/skills/okstra-inspect/facets/time.md +56 -0
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-pr-gen/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-gen/SKILL.md +36 -30
- 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 +15 -3
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/project-docs/task-index.template.md +1 -1
- 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-verification-input.template.md +6 -6
- 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-schedule.py +1 -1
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
# okstra-inspect AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Skill source: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
|
|
6
|
+
- Facet bodies: `skills/okstra-inspect/facets/<sub-command>.md` — the skill is a thin core (preflight + dispatch + shared rules); each sub-command's full procedure is a lazily loaded facet file, guarded by `tests/contract/test_okstra_inspect_facets.py`
|
|
6
7
|
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
7
8
|
- context-cost CLI: `src/commands/inspect/context-cost.mjs`
|
|
8
9
|
- time-report CLI: `src/commands/inspect/time-report.mjs`
|
|
9
10
|
- log-report CLI: `src/commands/inspect/log-report.mjs`
|
|
10
11
|
- error-report CLI: `src/commands/inspect/error-report.mjs`
|
|
11
|
-
- container
|
|
12
|
+
- container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Purpose
|
|
14
15
|
|
|
15
|
-
`okstra-inspect
|
|
16
|
+
`okstra-inspect` is the single entry point for okstra read-side work. Most of it is read-only, with two exceptions.
|
|
16
17
|
|
|
17
|
-
- `status.4`:
|
|
18
|
-
- `errors`, `error-zip`, `recap record`:
|
|
18
|
+
- `status.4`: writes the user-requested `workStatus` into `task-manifest.json`.
|
|
19
|
+
- `errors`, `error-zip`, `recap record`: produce report/zip/log artifacts from the information read.
|
|
19
20
|
|
|
20
|
-
## sub-command
|
|
21
|
+
## sub-command list
|
|
21
22
|
|
|
22
|
-
| Sub-command |
|
|
23
|
+
| Sub-command | Role | Writes? |
|
|
23
24
|
|---|---|---|
|
|
24
|
-
| `status` | task/phase/workflow
|
|
25
|
-
| `history` |
|
|
26
|
-
| `report` | final-report
|
|
27
|
-
| `time` | task type/worker
|
|
28
|
-
| `logs` | wrapper `.log`
|
|
29
|
-
| `cost` | task bundle context/read cost
|
|
30
|
-
| `errors` | task error logs
|
|
31
|
-
| `error-zip` | cross-project error logs
|
|
32
|
-
| `recap` | task
|
|
25
|
+
| `status` | check task/phase/workflow status, change workStatus | manifest edit in `status.4` |
|
|
26
|
+
| `history` | list past runs, assemble rerun/resume command | read by default |
|
|
27
|
+
| `report` | resolve final-report path and optionally read | read |
|
|
28
|
+
| `time` | aggregate elapsed time per task type/worker | read |
|
|
29
|
+
| `logs` | inventory wrapper `.log` sidecars and suggest cleanup commands | read |
|
|
30
|
+
| `cost` | estimate task bundle context/read cost | read |
|
|
31
|
+
| `errors` | aggregate task error logs into a timestamped markdown report | generates report |
|
|
32
|
+
| `error-zip` | build an anonymized zip of cross-project error logs | generates zip |
|
|
33
|
+
| `recap` | summarize a task's before/after runs and record Q&A | appends `recap-log.jsonl` |
|
|
33
34
|
|
|
34
35
|
## Preflight
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
Run once before any sub-command.
|
|
37
38
|
|
|
38
39
|
```bash
|
|
39
40
|
okstra preflight --runtime claude-code --json
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
The project check only sees the cwd of the Bash call. For a project that is not the cwd (a sibling repo, a monorepo subdir, or a project named in the request), `ok:false` is a false negative, not a missing setup — do not stop immediately; retry with `okstra preflight --runtime claude-code --cwd <that-dir> --json` (`--cwd` is the sanctioned way to target a project without a leading `cd`). Only when that also returns `ok:false` do you guide the user to `/okstra-setup` and stop. Then use `projectRoot` as a literal value, and pass it to the sub-command CLIs that accept it (`recap`, `context-cost`, etc.) via `--cwd`/`--project-root <projectRoot>`.
|
|
43
44
|
|
|
44
45
|
## intent routing
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
Classify the user request into one or more facets. If ambiguous, show the entire sub-command table and let the user pick by number/name. Do not hide a facet because of AskUserQuestion's option limit.
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
If several facets appear in one message, execute them sequentially. Step 0 runs only once.
|
|
49
50
|
|
|
50
|
-
## task-key
|
|
51
|
+
## task-key resolution — shared rule
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Many facets accept the following target forms.
|
|
53
54
|
|
|
54
55
|
1. full task-key: `<project-id>:<task-group>:<task-id>`
|
|
55
56
|
2. bare task-id
|
|
56
57
|
3. task root path
|
|
57
58
|
|
|
58
|
-
bare task-id
|
|
59
|
+
A bare task-id uses the shared resolver.
|
|
59
60
|
|
|
60
61
|
```bash
|
|
61
62
|
okstra resolve-task-key <task-id> --project-root <projectRoot> --json
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
`matches[]
|
|
65
|
+
Handling `matches[]`:
|
|
65
66
|
|
|
66
|
-
- 0
|
|
67
|
-
- 1
|
|
68
|
-
- N
|
|
67
|
+
- 0: say it cannot be found; do not guess.
|
|
68
|
+
- 1: use that `taskKey`.
|
|
69
|
+
- N: show the candidate `taskKey`s and `updatedAt`, and take a disambiguation.
|
|
69
70
|
|
|
70
71
|
## status
|
|
71
72
|
|
|
72
73
|
### Project overview
|
|
73
74
|
|
|
74
|
-
`.okstra/discovery/task-catalog.json
|
|
75
|
+
Read `.okstra/discovery/task-catalog.json`. Do not re-open individual manifests for the overview. The catalog is the projected source.
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
Sort: `updatedAt` desc, then `taskKey`.
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
Keep the table narrow.
|
|
79
80
|
|
|
80
81
|
- Task Key
|
|
81
82
|
- Category
|
|
@@ -83,13 +84,13 @@ okstra resolve-task-key <task-id> --project-root <projectRoot> --json
|
|
|
83
84
|
- workStatus
|
|
84
85
|
- Next
|
|
85
86
|
|
|
86
|
-
`awaitingApproval`
|
|
87
|
+
If `awaitingApproval` or `routingStatus == "pending"`, add a marker to the Next cell and explain it.
|
|
87
88
|
|
|
88
89
|
### Specific task
|
|
89
90
|
|
|
90
|
-
task
|
|
91
|
+
For a single task's detail, check the catalog first, then if needed read `.okstra/tasks/<group>/<id>/task-manifest.json`, `history/timeline.json`, and the latest run manifest.
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
Information to show:
|
|
93
94
|
|
|
94
95
|
- work category
|
|
95
96
|
- current phase/state
|
|
@@ -105,70 +106,70 @@ task 하나의 detail은 catalog를 먼저 보고, 필요하면 `.okstra/tasks/<
|
|
|
105
106
|
|
|
106
107
|
### workStatus update
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
Write only when the user explicitly requests a status change.
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
Allowed values:
|
|
111
112
|
|
|
112
113
|
- `todo`
|
|
113
114
|
- `in-progress`
|
|
114
115
|
- `blocked`
|
|
115
116
|
- `done`
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
Procedure: update via a single `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --json` call — do not edit the manifest by hand. On `stage:"ambiguous"`, re-ask with `matches[]`; on `stage:"not-found"`, answer that it cannot be found.
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
When `workStatus` is absent in a read display, infer it from the lifecycle state, but do not back-fill on read alone.
|
|
120
121
|
|
|
121
122
|
## history
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
First branch: distinguish re-run from resume.
|
|
124
125
|
|
|
125
|
-
- Re-run:
|
|
126
|
-
- Resume:
|
|
126
|
+
- Re-run: create a new run from previous run parameters. A new run-seq is created.
|
|
127
|
+
- Resume: continue an interrupted existing run. No new run-seq is created.
|
|
127
128
|
|
|
128
|
-
catalog
|
|
129
|
+
If the catalog is absent, fall back to the `.okstra/tasks/*/*/task-manifest.json` glob. The disk manifest is the source of truth.
|
|
129
130
|
|
|
130
|
-
Re-run
|
|
131
|
+
Re-run extracts `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, relatedTasks, model overrides, and so on from the source run-manifest to assemble the command. `implementation`'s `--base-ref` is not in the run-manifest but in the worktree registry, so ask for it as the situation requires.
|
|
131
132
|
|
|
132
|
-
Resume
|
|
133
|
+
Resume checks `latestResumeCommandPath` or the timeline entry's `resumeCommandPath`, and if the file exists, guides/runs `bash <resume-command-path>`. If the path is empty or the file is missing, declare "no resume" and guide to history.3 (re-run).
|
|
133
134
|
|
|
134
135
|
## report
|
|
135
136
|
|
|
136
|
-
report path
|
|
137
|
+
report path resolution priority:
|
|
137
138
|
|
|
138
|
-
1. `.okstra/discovery/task-catalog.json
|
|
139
|
-
2. direct `task-manifest.json
|
|
140
|
-
3. `history/timeline.json
|
|
141
|
-
4.
|
|
139
|
+
1. `latestReportPath` in `.okstra/discovery/task-catalog.json`
|
|
140
|
+
2. `latestReportPath` in the direct `task-manifest.json`
|
|
141
|
+
3. a specific run's `reportPath` in `history/timeline.json`
|
|
142
|
+
4. specific task-type fallback: `runs/<task-type>/reports/final-report-*.md`, including stage-isolated paths
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
Match read depth to the request (a final report is 300+ lines / 50K+ tokens). For summary/conclusion/pass questions ("summary", "just the key points", "conclusion", "did it pass?"), do not read the whole thing — read only the verdict in the `runs/<task-type-segment>/status/final-<task-type-segment>-<NNN>.status` (stage-isolated: `runs/<task-type-segment>/stage-<N>/status/`) sidecar plus the report's leading summary block. Ingest the whole file only for "the whole thing / read it all / full body". If a completion signal exists but the file does not, report it as a missing report; if it is not yet complete, show the current status and workStatus.
|
|
144
145
|
|
|
145
146
|
## time
|
|
146
147
|
|
|
147
|
-
|
|
148
|
+
The CLI does the time computation. The AI does not recompute duration by hand.
|
|
148
149
|
|
|
149
150
|
```bash
|
|
150
151
|
okstra time-report <task-key> --project-root <projectRoot> --json
|
|
151
152
|
```
|
|
152
153
|
|
|
153
|
-
|
|
154
|
+
Convert every `*Ms` to `HH:MM:SS` for display. `CPU sum` is the overlapping cost of lead and workers time combined, not wall-clock. Show wall-clock from `perRunWallClock` only when the user explicitly asks. For `by stage`/`per stage`/`which stage took longest`, the task-type view (the By task type table) is the default answer — do not treat it as 'not measurable'. Render the intra-run `phaseTimelines` only on an explicit request like 'Phase 1–7' / 'which phase', and when it is empty, mention it only as a footnote rather than a headline.
|
|
154
155
|
|
|
155
|
-
`unavailable[]
|
|
156
|
+
`unavailable[]` is not summed into totals; show it as a separate note.
|
|
156
157
|
|
|
157
158
|
## cost
|
|
158
159
|
|
|
159
|
-
context/read cost
|
|
160
|
+
For context/read cost, the CLI output is the source of truth.
|
|
160
161
|
|
|
161
162
|
```bash
|
|
162
163
|
okstra context-cost <task-key> --project-root <projectRoot>
|
|
163
164
|
```
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
Interpretation points:
|
|
166
167
|
|
|
167
|
-
- token estimate
|
|
168
|
-
- `leadPhase1.mode == "active-run-context"
|
|
169
|
-
- `analysisWorker.mode == "analysis-packet-primary"
|
|
170
|
-
- `skillAssets
|
|
171
|
-
- legacy timestamp artifacts
|
|
168
|
+
- the token estimate is a heuristic, not a billing figure.
|
|
169
|
+
- if `leadPhase1.mode == "active-run-context"`, the compact lead intake is primary.
|
|
170
|
+
- if `analysisWorker.mode == "analysis-packet-primary"`, the worker reads the analysis-packet first and opens the full source only when needed.
|
|
171
|
+
- if `skillAssets` is large, it is a prompt-diet target.
|
|
172
|
+
- if there are many legacy timestamp artifacts, propose current-view/cold-artifact separation rather than a destructive delete.
|
|
172
173
|
|
|
173
174
|
## logs
|
|
174
175
|
|
|
@@ -178,33 +179,33 @@ wrapper sidecar log inventory:
|
|
|
178
179
|
okstra log-report --project-root <projectRoot> --json
|
|
179
180
|
```
|
|
180
181
|
|
|
181
|
-
`.okstra/tasks/**/runs/*/prompts/*.log
|
|
182
|
+
Scans `.okstra/tasks/**/runs/*/prompts/*.log`. Does not delete. The cleanup command merely presents a dry-run and `-delete` pair as fenced bash.
|
|
182
183
|
|
|
183
|
-
active run
|
|
184
|
+
Deleting an active run's log loses the live trace, so recommend checking `status` first.
|
|
184
185
|
|
|
185
186
|
## errors
|
|
186
187
|
|
|
187
|
-
task error logs
|
|
188
|
+
Aggregate task error logs into a markdown report.
|
|
188
189
|
|
|
189
190
|
```bash
|
|
190
191
|
okstra error-report <task-key> --project-root <projectRoot>
|
|
191
192
|
```
|
|
192
193
|
|
|
193
|
-
|
|
194
|
+
Read `reportPath`, totals, byPhase, byAgent, parseSkipped from the stdout JSON and summarize. If `reportPath` is absent and errorCount is 0, say there are no recorded error logs. Do not hide `parseSkipped > 0`.
|
|
194
195
|
|
|
195
196
|
## error-zip
|
|
196
197
|
|
|
197
|
-
|
|
198
|
+
Bundle the machine's cross-project okstra errors into an anonymized zip.
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
For the output path, recommend `lastOutputPath` from `~/.okstra/error-zip.json` first, and if absent, propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
|
|
200
201
|
|
|
201
|
-
|
|
202
|
+
Run:
|
|
202
203
|
|
|
203
204
|
```bash
|
|
204
205
|
okstra error-zip --out <path>
|
|
205
206
|
```
|
|
206
207
|
|
|
207
|
-
|
|
208
|
+
Summary fields:
|
|
208
209
|
|
|
209
210
|
- `outPath`
|
|
210
211
|
- `errorCount`
|
|
@@ -213,11 +214,11 @@ okstra error-zip --out <path>
|
|
|
213
214
|
- `clusterCount`
|
|
214
215
|
- `projectCount`
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
At the end, guide the user to build a brief with the error-feedback variant of `/okstra-brief-gen`, then run `error-analysis` in the okstra repo.
|
|
217
218
|
|
|
218
219
|
## recap
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
The default is artifact mode. It builds the before/after summary and answers questions using only `.okstra/` artifacts.
|
|
221
222
|
|
|
222
223
|
assemble:
|
|
223
224
|
|
|
@@ -231,22 +232,22 @@ record:
|
|
|
231
232
|
okstra recap record <task-key> --project-root <projectRoot> --kind <summary|qa> --mode <artifact|code> --question "<question>" --answer "<summary>" --citation "<path:line>"
|
|
232
233
|
```
|
|
233
234
|
|
|
234
|
-
code mode
|
|
235
|
+
Enter code mode only when the user explicitly requests it, such as "including the diff" or "the code changes too". Entering recap alone does not read the code diff.
|
|
235
236
|
|
|
236
|
-
##
|
|
237
|
+
## Output rules
|
|
237
238
|
|
|
238
|
-
-
|
|
239
|
-
- project-relative
|
|
240
|
-
- disk field
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
239
|
+
- Answer concisely in Korean.
|
|
240
|
+
- Prefer project-relative paths.
|
|
241
|
+
- Show disk field values as-is without normalizing.
|
|
242
|
+
- Clearly indicate an awaiting-approval state.
|
|
243
|
+
- If there is no recent report, show `--`.
|
|
244
|
+
- Display dates in `YYYY-MM-DD HH:MM`.
|
|
244
245
|
|
|
245
|
-
##
|
|
246
|
+
## Forbidden patterns
|
|
246
247
|
|
|
247
|
-
- catalog
|
|
248
|
-
- `workStatus
|
|
249
|
-
- time duration
|
|
250
|
-
- cleanup command
|
|
251
|
-
-
|
|
252
|
-
-
|
|
248
|
+
- Failing immediately because the catalog is absent. There is a manifest fallback.
|
|
249
|
+
- Confusing `workStatus` with `currentStatus`.
|
|
250
|
+
- Hand-computing time duration without the CLI.
|
|
251
|
+
- Running a cleanup command directly.
|
|
252
|
+
- Arbitrarily reinterpreting raw files instead of CLI output in `errors`/`cost`/`time`.
|
|
253
|
+
- Automatically reading code changes in recap artifact mode.
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# okstra-manager
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this to bundle okstra tasks across multiple projects into a single manager-owned context. The authoritative contract is [`skills/okstra-manager/SKILL.md`](../../../skills/okstra-manager/SKILL.md); the CLI implementation is [`src/commands/manager.mjs`](../../../src/commands/manager.mjs) and [`scripts/okstra_ctl/manager_cli.py`](../../../scripts/okstra_ctl/manager_cli.py).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## When to Use
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- child project `.okstra`
|
|
11
|
-
-
|
|
7
|
+
- The user says something like "multiple projects", "cross-project", "okstra manager", or "group projects together".
|
|
8
|
+
- Register projects under a manager, or discover candidate projects.
|
|
9
|
+
- Plan child project tasks under a shared task-group/task-id and assign roles/directives.
|
|
10
|
+
- Sync child project `.okstra` state into the manager snapshot, or view status.
|
|
11
|
+
- Prepare a launch packet and a manager child context for running a specific child task.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Execution Rules
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
2. JSON stdout
|
|
17
|
-
3. `--workspace-root`
|
|
18
|
-
4. `new project`
|
|
19
|
-
5. public child task identity
|
|
20
|
-
6.
|
|
15
|
+
1. Every command starts with the literal `okstra`. Do not wrap it in shell variables, `$(...)`, `&&`, `eval`, or a leading env assignment.
|
|
16
|
+
2. JSON stdout is the source of truth. Do not reconstruct manager state or child launch args from docs/memory.
|
|
17
|
+
3. `--workspace-root` is owned by the Node wrapper. The CLI rejects it if the user passes it.
|
|
18
|
+
4. `new project`'s `--project-root` must be an already-existing directory. It performs setup-equivalent registration only when there is no `.okstra/project.json` inside it.
|
|
19
|
+
5. The public child task identity is `project-id:task-group:task-id`. The `new task --task` example shows the full key form first.
|
|
20
|
+
6. When the actual child task id differs under the same manager task id, pass `--child-task-id <id>` to both `task assign` and `task run`.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Command Surface
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
okstra manager init --manager-id <manager-id> --json
|
|
@@ -34,35 +34,35 @@ okstra manager task status --manager-id <manager-id> --task-group <task-group> -
|
|
|
34
34
|
okstra manager task run --manager-id <manager-id> --project-id <project-id> --task-group <task-group> --task-id <task-id> [--child-task-id <child-task-id>] --json
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Storage Model
|
|
38
38
|
|
|
39
|
-
Manager state
|
|
39
|
+
Manager state is stored under `~/.okstra/managers/<manager-id>/`, split into two layers: the manager root and the task directory.
|
|
40
40
|
|
|
41
|
-
manager
|
|
41
|
+
Directly under the manager root:
|
|
42
42
|
|
|
43
43
|
- `manager.json`: manager id / schema / createdAt
|
|
44
|
-
- `projects.json`:
|
|
44
|
+
- `projects.json`: registered projectId, projectRoot, role, tags
|
|
45
45
|
|
|
46
|
-
task
|
|
46
|
+
Under the task directory `task-groups/<safe-group>/<safe-task>/`:
|
|
47
47
|
|
|
48
48
|
- `manifest.json`: manager task objective, common brief, progress mode
|
|
49
49
|
- `children.json`: child task plan, assignment, launch metadata
|
|
50
50
|
- `directives.jsonl`: shared/project directive rows
|
|
51
|
-
- `snapshots.json`: `task sync`
|
|
52
|
-
- `events.jsonl`: `task-created
|
|
53
|
-
- `child-context/<safe-project>-<safe-task>.md`: `task run`
|
|
51
|
+
- `snapshots.json`: the read-side snapshot `task sync` read from the project-local `.okstra`
|
|
52
|
+
- `events.jsonl`: manager events such as `task-created` and `child-launch-prepared`
|
|
53
|
+
- `child-context/<safe-project>-<safe-task>.md`: the child lead context `task run` produced
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
A segment whose slug is empty (e.g. a non-ASCII task-group/task-id) uses a `u-<sha1-prefix>` path segment, but the manifest and the child `taskKey` preserve the original input value.
|
|
56
56
|
|
|
57
57
|
## Child launch
|
|
58
58
|
|
|
59
|
-
`task run`
|
|
59
|
+
`task run` does not run the child work directly; it prepares a launch packet. The key fields of the returned packet:
|
|
60
60
|
|
|
61
|
-
- `taskKey`: child
|
|
62
|
-
- `backend`:
|
|
63
|
-
- `workerDispatchBackend`:
|
|
64
|
-
- `projectRoot`: child project root
|
|
65
|
-
- `contextPath`: manager child context markdown
|
|
66
|
-
- `runArgs`:
|
|
61
|
+
- `taskKey`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
|
|
62
|
+
- `backend`: `tmux-child-lead` if `$TMUX` is present, otherwise `subagent-child-lead`
|
|
63
|
+
- `workerDispatchBackend`: always `subagent` in v1
|
|
64
|
+
- `projectRoot`: the child project root
|
|
65
|
+
- `contextPath`: the manager child context markdown
|
|
66
|
+
- `runArgs`: the `okstra run ... --directive "Read manager child context: ..."` args for the host launcher to use
|
|
67
67
|
|
|
68
|
-
packet
|
|
68
|
+
When packet creation succeeds, that child launch's status in `children.json` is updated to `prepared`, and a `child-launch-prepared` is appended to `events.jsonl`. On failure it does not modify the project-local task state.
|