okstra 0.123.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 +1 -0
- package/docs/architecture/storage-model.md +1 -1
- package/docs/architecture.md +11 -1
- package/docs/cli.md +2 -0
- 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 +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 +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 +4 -4
- 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/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 +14 -16
- package/runtime/prompts/lead/plan-body-verification.md +18 -18
- package/runtime/prompts/lead/report-writer.md +43 -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 +2 -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 +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/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 +104 -98
- 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-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/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,81 @@
|
|
|
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
6
|
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
7
7
|
- context-cost CLI: `src/commands/inspect/context-cost.mjs`
|
|
8
8
|
- time-report CLI: `src/commands/inspect/time-report.mjs`
|
|
9
9
|
- log-report CLI: `src/commands/inspect/log-report.mjs`
|
|
10
10
|
- error-report CLI: `src/commands/inspect/error-report.mjs`
|
|
11
|
-
- container
|
|
11
|
+
- container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Purpose
|
|
14
14
|
|
|
15
|
-
`okstra-inspect
|
|
15
|
+
`okstra-inspect` is the single entry point for okstra read-side work. Most of it is read-only, with two exceptions.
|
|
16
16
|
|
|
17
|
-
- `status.4`:
|
|
18
|
-
- `errors`, `error-zip`, `recap record`:
|
|
17
|
+
- `status.4`: writes the user-requested `workStatus` into `task-manifest.json`.
|
|
18
|
+
- `errors`, `error-zip`, `recap record`: produce report/zip/log artifacts from the information read.
|
|
19
19
|
|
|
20
|
-
## sub-command
|
|
20
|
+
## sub-command list
|
|
21
21
|
|
|
22
|
-
| Sub-command |
|
|
22
|
+
| Sub-command | Role | Writes? |
|
|
23
23
|
|---|---|---|
|
|
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
|
|
24
|
+
| `status` | check task/phase/workflow status, change workStatus | manifest edit in `status.4` |
|
|
25
|
+
| `history` | list past runs, assemble rerun/resume command | read by default |
|
|
26
|
+
| `report` | resolve final-report path and optionally read | read |
|
|
27
|
+
| `time` | aggregate elapsed time per task type/worker | read |
|
|
28
|
+
| `logs` | inventory wrapper `.log` sidecars and suggest cleanup commands | read |
|
|
29
|
+
| `cost` | estimate task bundle context/read cost | read |
|
|
30
|
+
| `errors` | aggregate task error logs into a timestamped markdown report | generates report |
|
|
31
|
+
| `error-zip` | build an anonymized zip of cross-project error logs | generates zip |
|
|
32
|
+
| `recap` | summarize a task's before/after runs and record Q&A | appends `recap-log.jsonl` |
|
|
33
33
|
|
|
34
34
|
## Preflight
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Run once before any sub-command.
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
okstra preflight --runtime claude-code --json
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
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
43
|
|
|
44
44
|
## intent routing
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
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
47
|
|
|
48
|
-
|
|
48
|
+
If several facets appear in one message, execute them sequentially. Step 0 runs only once.
|
|
49
49
|
|
|
50
|
-
## task-key
|
|
50
|
+
## task-key resolution — shared rule
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Many facets accept the following target forms.
|
|
53
53
|
|
|
54
54
|
1. full task-key: `<project-id>:<task-group>:<task-id>`
|
|
55
55
|
2. bare task-id
|
|
56
56
|
3. task root path
|
|
57
57
|
|
|
58
|
-
bare task-id
|
|
58
|
+
A bare task-id uses the shared resolver.
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
61
|
okstra resolve-task-key <task-id> --project-root <projectRoot> --json
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
`matches[]
|
|
64
|
+
Handling `matches[]`:
|
|
65
65
|
|
|
66
|
-
- 0
|
|
67
|
-
- 1
|
|
68
|
-
- N
|
|
66
|
+
- 0: say it cannot be found; do not guess.
|
|
67
|
+
- 1: use that `taskKey`.
|
|
68
|
+
- N: show the candidate `taskKey`s and `updatedAt`, and take a disambiguation.
|
|
69
69
|
|
|
70
70
|
## status
|
|
71
71
|
|
|
72
72
|
### Project overview
|
|
73
73
|
|
|
74
|
-
`.okstra/discovery/task-catalog.json
|
|
74
|
+
Read `.okstra/discovery/task-catalog.json`. Do not re-open individual manifests for the overview. The catalog is the projected source.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Sort: `updatedAt` desc, then `taskKey`.
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Keep the table narrow.
|
|
79
79
|
|
|
80
80
|
- Task Key
|
|
81
81
|
- Category
|
|
@@ -83,13 +83,13 @@ okstra resolve-task-key <task-id> --project-root <projectRoot> --json
|
|
|
83
83
|
- workStatus
|
|
84
84
|
- Next
|
|
85
85
|
|
|
86
|
-
`awaitingApproval`
|
|
86
|
+
If `awaitingApproval` or `routingStatus == "pending"`, add a marker to the Next cell and explain it.
|
|
87
87
|
|
|
88
88
|
### Specific task
|
|
89
89
|
|
|
90
|
-
task
|
|
90
|
+
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
91
|
|
|
92
|
-
|
|
92
|
+
Information to show:
|
|
93
93
|
|
|
94
94
|
- work category
|
|
95
95
|
- current phase/state
|
|
@@ -105,70 +105,70 @@ task 하나의 detail은 catalog를 먼저 보고, 필요하면 `.okstra/tasks/<
|
|
|
105
105
|
|
|
106
106
|
### workStatus update
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Write only when the user explicitly requests a status change.
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
Allowed values:
|
|
111
111
|
|
|
112
112
|
- `todo`
|
|
113
113
|
- `in-progress`
|
|
114
114
|
- `blocked`
|
|
115
115
|
- `done`
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
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
118
|
|
|
119
|
-
|
|
119
|
+
When `workStatus` is absent in a read display, infer it from the lifecycle state, but do not back-fill on read alone.
|
|
120
120
|
|
|
121
121
|
## history
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
First branch: distinguish re-run from resume.
|
|
124
124
|
|
|
125
|
-
- Re-run:
|
|
126
|
-
- Resume:
|
|
125
|
+
- Re-run: create a new run from previous run parameters. A new run-seq is created.
|
|
126
|
+
- Resume: continue an interrupted existing run. No new run-seq is created.
|
|
127
127
|
|
|
128
|
-
catalog
|
|
128
|
+
If the catalog is absent, fall back to the `.okstra/tasks/*/*/task-manifest.json` glob. The disk manifest is the source of truth.
|
|
129
129
|
|
|
130
|
-
Re-run
|
|
130
|
+
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
131
|
|
|
132
|
-
Resume
|
|
132
|
+
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
133
|
|
|
134
134
|
## report
|
|
135
135
|
|
|
136
|
-
report path
|
|
136
|
+
report path resolution priority:
|
|
137
137
|
|
|
138
|
-
1. `.okstra/discovery/task-catalog.json
|
|
139
|
-
2. direct `task-manifest.json
|
|
140
|
-
3. `history/timeline.json
|
|
141
|
-
4.
|
|
138
|
+
1. `latestReportPath` in `.okstra/discovery/task-catalog.json`
|
|
139
|
+
2. `latestReportPath` in the direct `task-manifest.json`
|
|
140
|
+
3. a specific run's `reportPath` in `history/timeline.json`
|
|
141
|
+
4. specific task-type fallback: `runs/<task-type>/reports/final-report-*.md`, including stage-isolated paths
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
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
144
|
|
|
145
145
|
## time
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
The CLI does the time computation. The AI does not recompute duration by hand.
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
150
|
okstra time-report <task-key> --project-root <projectRoot> --json
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
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
154
|
|
|
155
|
-
`unavailable[]
|
|
155
|
+
`unavailable[]` is not summed into totals; show it as a separate note.
|
|
156
156
|
|
|
157
157
|
## cost
|
|
158
158
|
|
|
159
|
-
context/read cost
|
|
159
|
+
For context/read cost, the CLI output is the source of truth.
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
162
|
okstra context-cost <task-key> --project-root <projectRoot>
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Interpretation points:
|
|
166
166
|
|
|
167
|
-
- token estimate
|
|
168
|
-
- `leadPhase1.mode == "active-run-context"
|
|
169
|
-
- `analysisWorker.mode == "analysis-packet-primary"
|
|
170
|
-
- `skillAssets
|
|
171
|
-
- legacy timestamp artifacts
|
|
167
|
+
- the token estimate is a heuristic, not a billing figure.
|
|
168
|
+
- if `leadPhase1.mode == "active-run-context"`, the compact lead intake is primary.
|
|
169
|
+
- if `analysisWorker.mode == "analysis-packet-primary"`, the worker reads the analysis-packet first and opens the full source only when needed.
|
|
170
|
+
- if `skillAssets` is large, it is a prompt-diet target.
|
|
171
|
+
- if there are many legacy timestamp artifacts, propose current-view/cold-artifact separation rather than a destructive delete.
|
|
172
172
|
|
|
173
173
|
## logs
|
|
174
174
|
|
|
@@ -178,33 +178,33 @@ wrapper sidecar log inventory:
|
|
|
178
178
|
okstra log-report --project-root <projectRoot> --json
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
`.okstra/tasks/**/runs/*/prompts/*.log
|
|
181
|
+
Scans `.okstra/tasks/**/runs/*/prompts/*.log`. Does not delete. The cleanup command merely presents a dry-run and `-delete` pair as fenced bash.
|
|
182
182
|
|
|
183
|
-
active run
|
|
183
|
+
Deleting an active run's log loses the live trace, so recommend checking `status` first.
|
|
184
184
|
|
|
185
185
|
## errors
|
|
186
186
|
|
|
187
|
-
task error logs
|
|
187
|
+
Aggregate task error logs into a markdown report.
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
190
|
okstra error-report <task-key> --project-root <projectRoot>
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
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
194
|
|
|
195
195
|
## error-zip
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
Bundle the machine's cross-project okstra errors into an anonymized zip.
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
For the output path, recommend `lastOutputPath` from `~/.okstra/error-zip.json` first, and if absent, propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
Run:
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
204
|
okstra error-zip --out <path>
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
Summary fields:
|
|
208
208
|
|
|
209
209
|
- `outPath`
|
|
210
210
|
- `errorCount`
|
|
@@ -213,11 +213,11 @@ okstra error-zip --out <path>
|
|
|
213
213
|
- `clusterCount`
|
|
214
214
|
- `projectCount`
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
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
217
|
|
|
218
218
|
## recap
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
The default is artifact mode. It builds the before/after summary and answers questions using only `.okstra/` artifacts.
|
|
221
221
|
|
|
222
222
|
assemble:
|
|
223
223
|
|
|
@@ -231,22 +231,22 @@ record:
|
|
|
231
231
|
okstra recap record <task-key> --project-root <projectRoot> --kind <summary|qa> --mode <artifact|code> --question "<question>" --answer "<summary>" --citation "<path:line>"
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
code mode
|
|
234
|
+
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
235
|
|
|
236
|
-
##
|
|
236
|
+
## Output rules
|
|
237
237
|
|
|
238
|
-
-
|
|
239
|
-
- project-relative
|
|
240
|
-
- disk field
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
238
|
+
- Answer concisely in Korean.
|
|
239
|
+
- Prefer project-relative paths.
|
|
240
|
+
- Show disk field values as-is without normalizing.
|
|
241
|
+
- Clearly indicate an awaiting-approval state.
|
|
242
|
+
- If there is no recent report, show `--`.
|
|
243
|
+
- Display dates in `YYYY-MM-DD HH:MM`.
|
|
244
244
|
|
|
245
|
-
##
|
|
245
|
+
## Forbidden patterns
|
|
246
246
|
|
|
247
|
-
- catalog
|
|
248
|
-
- `workStatus
|
|
249
|
-
- time duration
|
|
250
|
-
- cleanup command
|
|
251
|
-
-
|
|
252
|
-
-
|
|
247
|
+
- Failing immediately because the catalog is absent. There is a manifest fallback.
|
|
248
|
+
- Confusing `workStatus` with `currentStatus`.
|
|
249
|
+
- Hand-computing time duration without the CLI.
|
|
250
|
+
- Running a cleanup command directly.
|
|
251
|
+
- Arbitrarily reinterpreting raw files instead of CLI output in `errors`/`cost`/`time`.
|
|
252
|
+
- 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.
|
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
# okstra-memory AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Skill source: [`skills/okstra-memory/SKILL.md`](../../../skills/okstra-memory/SKILL.md)
|
|
6
6
|
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
7
7
|
- memory CLI: [`src/commands/memory/memory.mjs`](../../../src/commands/memory/memory.mjs)
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Purpose
|
|
10
10
|
|
|
11
|
-
`okstra-memory
|
|
11
|
+
`okstra-memory` manages the Memory Book in the user's home.
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
~/.okstra/memory-book/
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
It is not a project-local `.okstra/` artifact. It can be used even without `<PROJECT_ROOT>/.okstra/project.json`.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## When to use
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Use it when:
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
23
|
+
- The user explicitly asks to save, e.g. "remember this", "save the conversation", "organize and store this in okstra", "remember this", "save this decision".
|
|
24
|
+
- The user wants to search, list, read, or archive stored memory.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Do not use it when:
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
- project task artifact
|
|
28
|
+
- The user is only brainstorming with no save request. In that case, ask a confirmation question first.
|
|
29
|
+
- The content should be kept as a project task artifact. In that case, use the brief/report/decision path of the relevant okstra task.
|
|
30
30
|
|
|
31
31
|
## safety rule
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Do not save without an explicit save request. Do not store credentials, API keys, tokens, private personal data, or secrets. If the conversation includes sensitive material, exclude it from the summary and note the omission.
|
|
34
34
|
|
|
35
|
-
CLI
|
|
35
|
+
The CLI can also detect high-confidence secret shapes and refuse `memory add`. If refused, redact the content and retry.
|
|
36
36
|
|
|
37
37
|
## CLI availability
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Check the help first.
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
okstra memory --help
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
`okstra
|
|
45
|
+
If `okstra` is not on PATH, do not run `npx okstra@latest install` directly; tell the user to install it once and then retry.
|
|
46
46
|
|
|
47
|
-
## project-group
|
|
47
|
+
## project-group selection
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Every memory entry belongs to a project-group. Pick the group before storing or searching.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Enumerate existing groups:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
okstra memory groups --json
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Recommendations:
|
|
58
58
|
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
59
|
+
- the most-used existing group
|
|
60
|
+
- the second existing group
|
|
61
|
+
- Enter directly
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
For a personal note, recommend `private` first. If there is no group or no selection, use the CLI default `global`.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Pass the chosen group to `add`, `search`, and `list` as `--project-group <group>`. Omit the flag only when the user explicitly wants a cross-group search.
|
|
66
66
|
|
|
67
|
-
##
|
|
67
|
+
## Store procedure
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Do not store the full conversation transcript. Extract only durable memory worth keeping long-term and turn it into a concise Markdown summary.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Include:
|
|
72
72
|
|
|
73
|
-
-
|
|
73
|
+
- the reason for storing
|
|
74
74
|
- source: `conversation`
|
|
75
|
-
-
|
|
76
|
-
-
|
|
75
|
+
- `--project` when the related project id is clear
|
|
76
|
+
- tags for search
|
|
77
77
|
- memory type
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
The `okstra memory --help` output is authoritative for the type values. Categories per the source:
|
|
80
80
|
|
|
81
81
|
- `decision`
|
|
82
82
|
- `preference`
|
|
@@ -86,19 +86,19 @@ type 값은 `okstra memory --help` 출력이 권위다. 원문 기준 category:
|
|
|
86
86
|
- `follow-up`
|
|
87
87
|
- `context`
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Store command shape:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
okstra memory add --content "<summary markdown>" --title "<short title>" --type <type> --project-group <group> --tag <tag> --project <id> --source conversation --yes
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Repeat `--tag` and `--project` as needed. Omit `--project` when no related project is clear.
|
|
96
96
|
|
|
97
|
-
`--yes
|
|
97
|
+
Use `--yes` only when the user explicitly asked to save.
|
|
98
98
|
|
|
99
|
-
##
|
|
99
|
+
## search / read / archive
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
The default scope is the chosen project-group.
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
104
|
okstra memory search "<query>" --project-group "<group>"
|
|
@@ -108,20 +108,19 @@ okstra memory show "<memory-id>"
|
|
|
108
108
|
okstra memory archive "<memory-id>"
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
Prefer `--json` when you need to parse IDs. Show the user only a short summary plus the entry id/path.
|
|
112
112
|
|
|
113
|
-
##
|
|
113
|
+
## Output rules
|
|
114
114
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
- archive
|
|
118
|
-
- project `.okstra
|
|
115
|
+
- On store, summarize title, type, project-group, tags, and the generated id.
|
|
116
|
+
- On search, show the match count and the most relevant entry first.
|
|
117
|
+
- Run archive only when the user's intent is clear.
|
|
118
|
+
- Do not write into a project `.okstra/`.
|
|
119
119
|
|
|
120
|
-
##
|
|
121
|
-
|
|
122
|
-
- 명시 요청 없이 자동 저장.
|
|
123
|
-
- secret/token/key를 저장.
|
|
124
|
-
- full transcript를 그대로 저장.
|
|
125
|
-
- project-local task memory처럼 `.okstra/`에 쓰기.
|
|
126
|
-
- cross-group search를 사용자가 요청하지 않았는데 기본으로 수행하기.
|
|
120
|
+
## Forbidden patterns
|
|
127
121
|
|
|
122
|
+
- Auto-saving without an explicit request.
|
|
123
|
+
- Storing a secret/token/key.
|
|
124
|
+
- Storing the full transcript verbatim.
|
|
125
|
+
- Writing into `.okstra/` as if it were project-local task memory.
|
|
126
|
+
- Performing a cross-group search by default when the user did not ask for it.
|