okstra 0.117.0 → 0.118.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 +115 -104
- package/docs/architecture/storage-model.md +300 -0
- package/docs/architecture.md +802 -0
- package/docs/cli.md +658 -0
- package/docs/container.md +124 -0
- package/docs/contributor-change-matrix.md +5 -4
- package/docs/follow-ups/2026-07-10-final-report-option-3.md +51 -0
- package/docs/performance-improvement-plan-v2.md +374 -0
- package/docs/project-structure-overview.md +21 -10
- package/package.json +10 -5
- package/runtime/BUILD.json +2 -2
- package/runtime/python/okstra_ctl/recap.py +80 -3
- package/runtime/skills/okstra-inspect/SKILL.md +37 -2
- package/runtime/skills/okstra-pr-gen/SKILL.md +9 -8
- package/src/commands/inspect/recap.mjs +6 -1
- package/README.kr.md +0 -231
- package/docs/kr/architecture/storage-model.md +0 -297
- package/docs/kr/architecture.md +0 -815
- package/docs/kr/cli.md +0 -657
- package/docs/kr/container.md +0 -122
- package/docs/kr/follow-ups/2026-07-10-final-report-option-3.md +0 -51
- package/docs/kr/performance-improvement-plan-v2.md +0 -374
- package/docs/kr/performance-improvement-plan.md +0 -147
package/README.md
CHANGED
|
@@ -1,126 +1,133 @@
|
|
|
1
1
|
# okstra
|
|
2
2
|
|
|
3
3
|
> npm: [`okstra`](https://www.npmjs.com/package/okstra) · install: `npx -y okstra@latest install`
|
|
4
|
-
>
|
|
5
|
-
> 한국어 매뉴얼: [`README.kr.md`](README.kr.md)
|
|
6
4
|
|
|
7
5
|
## Index
|
|
8
6
|
|
|
9
|
-
- [1. Purpose](#
|
|
10
|
-
- [2. Structure](#
|
|
11
|
-
- [2.1 Repo layout](#
|
|
12
|
-
- [2.2 User-machine layout after install](#
|
|
13
|
-
- [2.3 Single-authority map](#
|
|
14
|
-
- [3. Manual](#
|
|
15
|
-
- [3.1 First-time setup (once per machine)](#
|
|
16
|
-
- [3.2 Register a project (once per project)](#
|
|
17
|
-
- [3.3 Day-to-day commands](#
|
|
18
|
-
- [3.4 CLI mode (optional)](#
|
|
19
|
-
- [3.5
|
|
20
|
-
- [4. Further reading](#
|
|
21
|
-
|
|
7
|
+
- [1. Purpose](#purpose)
|
|
8
|
+
- [2. Structure](#structure)
|
|
9
|
+
- [2.1 Repo layout](#repo-layout)
|
|
10
|
+
- [2.2 User-machine layout after install](#user-machine-layout-after-install)
|
|
11
|
+
- [2.3 Single-authority map](#single-authority-map)
|
|
12
|
+
- [3. Manual](#manual)
|
|
13
|
+
- [3.1 First-time setup (once per machine)](#first-time-setup)
|
|
14
|
+
- [3.2 Register a project (once per project)](#register-a-project)
|
|
15
|
+
- [3.3 Day-to-day commands](#day-to-day-commands)
|
|
16
|
+
- [3.4 CLI mode (optional)](#cli-mode)
|
|
17
|
+
- [3.5 Operations commands](#ops-commands)
|
|
18
|
+
- [4. Further reading](#further-reading)
|
|
19
|
+
|
|
20
|
+
<a id="purpose"></a>
|
|
22
21
|
## 1. Purpose
|
|
23
22
|
|
|
24
|
-
`okstra` is a **structured task
|
|
23
|
+
`okstra` is a **structured task runner that cross-verifies work inside Claude Code using a lead + worker model**. A Claude lead drives phase progression and dispatches independent analysis workers—**Claude and Codex by default**, with Antigravity added only when explicitly requested—plus a dedicated report writer for final synthesis.
|
|
25
24
|
|
|
26
25
|
The design rests on three principles:
|
|
27
26
|
|
|
28
|
-
- **Single entry point (`prepare_task_bundle`)**: every caller
|
|
29
|
-
- **Persistent task identity**: a stable `<project-id>/<task-group>/<task-id>` key carries context across phases, sessions, and model upgrades.
|
|
30
|
-
- **
|
|
27
|
+
- **Single entry point (`prepare_task_bundle`)**: every caller—skill, Bash CLI, or in-session invocation—produces the same task directory layout, manifest, and validation paths.
|
|
28
|
+
- **Persistent task identity**: a stable `<project-id>/<task-group>/<task-id>` task key carries context across phases, sessions, and model upgrades.
|
|
29
|
+
- **Enforced lead/worker contract**: output schemas and validation procedures are bound to `templates/` + `validators/`, and the worker roster is fixed per phase.
|
|
31
30
|
|
|
32
|
-
okstra is **not** a one-shot code
|
|
31
|
+
okstra is **not** a one-shot code review tool. It is for work that **spans multiple phases, needs input from multiple agents, and feeds each phase's output into the next phase**.
|
|
33
32
|
|
|
33
|
+
<a id="structure"></a>
|
|
34
34
|
## 2. Structure
|
|
35
35
|
|
|
36
|
+
<a id="repo-layout"></a>
|
|
36
37
|
### 2.1 Repo layout
|
|
37
38
|
|
|
38
39
|
```
|
|
39
40
|
okstra/ npm package = repo root
|
|
40
41
|
├── package.json name: "okstra"
|
|
41
|
-
├── bin/okstra Node CLI
|
|
42
|
+
├── bin/okstra Node CLI entry point
|
|
42
43
|
├── src/ Node CLI command modules (install, wizard, config, render, token usage, ...)
|
|
43
|
-
├── tools/build.mjs runtime/
|
|
44
|
+
├── tools/build.mjs runtime/ synchronization script (invoked by prepack)
|
|
44
45
|
├── runtime/ gitignored install payload copied to ~/.okstra
|
|
45
|
-
├── scripts/
|
|
46
|
-
├── skills/ public skill
|
|
47
|
-
├── agents/ worker agent
|
|
46
|
+
├── scripts/ Python + Bash runtime sources
|
|
47
|
+
├── skills/ public skill Markdown sources (8 user-facing skills)
|
|
48
|
+
├── agents/ worker agent Markdown sources
|
|
48
49
|
├── prompts/, schemas/, templates/, validators/
|
|
50
|
+
├── docs/ English manuals (architecture, CLI, storage, container, performance)
|
|
49
51
|
├── tests/, tests-e2e/
|
|
50
52
|
├── .claude-plugin/plugin.json secondary skills-CLI channel manifest
|
|
51
53
|
├── .github/workflows/ release-please.yml, release.yml
|
|
52
|
-
└── RELEASING.md, CHANGELOG.md, README.md
|
|
54
|
+
└── RELEASING.md, CHANGELOG.md, README.md
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
`runtime/`
|
|
57
|
+
During `prepack`, `tools/build.mjs` rebuilds `runtime/` from `scripts/`, `skills/`, `agents/`, `prompts/`, `schemas/`, `templates/`, and `validators/`. This is the install payload copied to `~/.okstra`; the npm package also ships the Node CLI (`bin/`, `src/`), documentation, and the README.
|
|
56
58
|
|
|
59
|
+
<a id="user-machine-layout-after-install"></a>
|
|
57
60
|
### 2.2 User-machine layout after install
|
|
58
61
|
|
|
59
62
|
```
|
|
60
|
-
~/.okstra/ runtime home,
|
|
63
|
+
~/.okstra/ runtime home, created by `okstra install`
|
|
61
64
|
├── version package version stamp
|
|
62
65
|
├── lib/python/ okstra_project/, okstra_ctl/, okstra_token_usage/, lib/
|
|
63
66
|
├── bin/ okstra.sh, codex-exec, antigravity-exec, ...
|
|
64
|
-
├── templates/ report assets
|
|
65
|
-
├──
|
|
66
|
-
├── installed-
|
|
67
|
-
├── installed-
|
|
68
|
-
├──
|
|
69
|
-
├──
|
|
70
|
-
├──
|
|
67
|
+
├── templates/ report assets and settings templates
|
|
68
|
+
├── prompts/ lead operating contracts (prompts/lead/*) + coding-preflight resource pack
|
|
69
|
+
├── installed-runtimes.json installed runtime adapter manifest
|
|
70
|
+
├── installed-skills.json installed skill manifest (used by uninstall)
|
|
71
|
+
├── installed-agents.json installed worker agent manifest (used by uninstall)
|
|
72
|
+
├── recent.jsonl, active.jsonl run indexes
|
|
73
|
+
├── memory-book/ global conversation memory (`okstra memory`)
|
|
74
|
+
├── projects/ per-project metadata mirrors
|
|
71
75
|
├── worktrees/ one isolated git worktree per task-key
|
|
72
|
-
│ (shared by all phases; not
|
|
76
|
+
│ (shared by all phases; not removed automatically after a run)
|
|
73
77
|
├── archive/ completed runs
|
|
74
78
|
└── .locks/ central/task mutex files
|
|
75
79
|
|
|
76
|
-
~/.claude/skills/ discovered
|
|
77
|
-
~/.agents/skills/ discovered by Agent-compatible hosts (created by install)
|
|
78
|
-
└── okstra-*/SKILL.md user-facing skills only (setup/brief/run/memory/inspect/schedule/container/manager)
|
|
80
|
+
~/.claude/skills/ automatically discovered by Claude Code (when `~/.claude` exists)
|
|
81
|
+
~/.agents/skills/ discovered by Agent-compatible hosts (created by `install`)
|
|
82
|
+
└── okstra-*/SKILL.md 8 user-facing skills only (setup/brief/run/memory/inspect/schedule/container/manager)
|
|
79
83
|
|
|
80
|
-
~/.claude/agents/ discovered
|
|
81
|
-
└── {claude,codex,antigravity,report-writer}-worker.md subagent definitions
|
|
84
|
+
~/.claude/agents/ automatically discovered by Claude Code (when `~/.claude` exists)
|
|
85
|
+
└── {claude,codex,antigravity,report-writer}-worker.md worker subagent definitions
|
|
82
86
|
(required for Claude Code multi-agent dispatch)
|
|
83
87
|
|
|
84
88
|
<project-root>/.okstra/
|
|
85
|
-
├── project.json {projectId, projectRoot, ...} (written by
|
|
89
|
+
├── project.json {projectId, projectRoot, ...} (written by `/okstra-setup`)
|
|
86
90
|
├── discovery/{task-catalog,latest-task}.json
|
|
87
91
|
├── glossary.md okstra-owned project terminology
|
|
88
92
|
├── decisions/<NNNN>-<slug>.md okstra-owned decision records
|
|
89
93
|
└── tasks/<task-group>/<task-id>/ task bundle (runs, manifest, reports)
|
|
90
94
|
```
|
|
91
95
|
|
|
96
|
+
<a id="single-authority-map"></a>
|
|
92
97
|
### 2.3 Single-authority map
|
|
93
98
|
|
|
94
99
|
| Resource | Location | Owner |
|
|
95
100
|
|---|---|---|
|
|
96
|
-
| Runtime code (
|
|
97
|
-
| agents/prompts/schemas/templates/validators | npm package
|
|
98
|
-
| Skill
|
|
99
|
-
| Worker agent
|
|
101
|
+
| Runtime code (Python + Bash) | `~/.okstra/{lib/python, bin}` | `okstra install` |
|
|
102
|
+
| agents/prompts/schemas/templates/validators | npm package `runtime/` | the `okstra` package itself (resolved by `okstra paths`) |
|
|
103
|
+
| Skill Markdown | `~/.claude/skills` or `~/.agents/skills` | `okstra install` (tracked per target in `installed-skills.json`) |
|
|
104
|
+
| Worker agent Markdown | `~/.claude/agents/<worker>.md` | `okstra install` when `~/.claude` exists (tracked in `installed-agents.json`) |
|
|
100
105
|
| Project metadata | `<project>/.okstra/` | `/okstra-setup` + the project itself |
|
|
101
|
-
| Run
|
|
106
|
+
| Run indexes | `~/.okstra/{recent,active}.jsonl` | `prepare_task_bundle` |
|
|
102
107
|
|
|
108
|
+
<a id="manual"></a>
|
|
103
109
|
## 3. Manual
|
|
104
110
|
|
|
111
|
+
<a id="first-time-setup"></a>
|
|
105
112
|
### 3.1 First-time setup (once per machine)
|
|
106
113
|
|
|
107
114
|
```bash
|
|
108
115
|
npx -y okstra@latest install
|
|
109
116
|
```
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
This creates `~/.okstra/{lib/python, bin, templates, prompts, version}` and the installed asset manifests under `~/.okstra/`. Skill installation is based on host homes: if `~/.claude` exists, public skills are installed in `~/.claude/skills/` and worker agents in `~/.claude/agents/`; `~/.agents/skills/` is always created and receives public skills for Agent-compatible hosts. Only user entry-point skills appear in skill listings. Lead/support operating contracts are installed as runtime resources under `~/.okstra/prompts/`, outside skill discovery. Re-running the command is idempotent: per-file hashes are compared and only changed files are updated.
|
|
112
119
|
|
|
113
|
-
Verify:
|
|
120
|
+
Verify the installation:
|
|
114
121
|
|
|
115
122
|
```bash
|
|
116
123
|
npx -y okstra@latest doctor
|
|
117
124
|
```
|
|
118
125
|
|
|
119
|
-
A `result: OK` line means
|
|
126
|
+
A `result: OK` line means the installation is ready. Each FAIL row prints its remediation inline—usually, rerun the install command.
|
|
120
127
|
|
|
121
128
|
#### Optional: install the `okstra` command globally
|
|
122
129
|
|
|
123
|
-
Every example in this README uses `npx -y okstra@latest <cmd
|
|
130
|
+
Every example in this README uses `npx -y okstra@latest <cmd>`, so a global install is unnecessary. To invoke okstra with a bare `okstra` command and avoid npx package fetching and version checks on every call, install it globally:
|
|
124
131
|
|
|
125
132
|
```bash
|
|
126
133
|
npm i -g okstra
|
|
@@ -128,49 +135,52 @@ okstra --version # confirm the CLI is on PATH
|
|
|
128
135
|
okstra install # same as 'npx -y okstra@latest install'
|
|
129
136
|
```
|
|
130
137
|
|
|
131
|
-
The global install only registers the Node CLI on
|
|
138
|
+
The global install only registers the Node CLI on PATH. The runtime (`~/.okstra/`) and host skill directories (`~/.claude/skills/` or `~/.agents/skills/`) are still created by `okstra install`; they are not included in `npm i -g`. To upgrade later, run `npm i -g okstra@latest && okstra install`. To remove the global binary, run `npm uninstall -g okstra` (this leaves `~/.okstra/` intact; remove that with `okstra uninstall`).
|
|
132
139
|
|
|
133
|
-
**Skill
|
|
140
|
+
**Skill behavior with a global install.** Every okstra skill detects a PATH-resolved `okstra` command and prefers it over `npx -y okstra@latest`. A global install therefore removes the npx fetch/version-check cost from every skill invocation (Step 0 of `okstra-run`, `okstra-inspect`, `okstra-schedule`, and Step 0 of `okstra-setup` Step 2). Because each skill uses the installed version directly, **you control when upgrades happen**; `@latest` is no longer forced on every call. Run `npm i -g okstra@latest && okstra install` whenever you want a new release. If `okstra` is not on PATH, the skills automatically fall back to npx, so environments without a global install continue to work unchanged.
|
|
134
141
|
|
|
142
|
+
<a id="register-a-project"></a>
|
|
135
143
|
### 3.2 Register a project (once per project)
|
|
136
144
|
|
|
137
145
|
From the CLI:
|
|
138
146
|
|
|
139
147
|
```bash
|
|
140
|
-
cd <
|
|
148
|
+
cd <target-project>
|
|
141
149
|
npx -y okstra@latest setup --project-id <id> # e.g. INV-1234, my-app, okstra
|
|
142
150
|
```
|
|
143
151
|
|
|
144
|
-
Or
|
|
152
|
+
Or invoke the equivalent slash command inside a Claude Code session:
|
|
145
153
|
|
|
146
154
|
```
|
|
147
155
|
/okstra-setup
|
|
148
156
|
```
|
|
149
157
|
|
|
150
|
-
Both write `<project>/.okstra/project.json`.
|
|
158
|
+
Both commands write `<project>/.okstra/project.json`. With `--project-id`, the CLI is non-interactive and can be used in CI; the slash command prompts through `AskUserQuestion`. Every other user-facing skill refuses to run until this file exists.
|
|
151
159
|
|
|
160
|
+
<a id="day-to-day-commands"></a>
|
|
152
161
|
### 3.3 Day-to-day commands
|
|
153
162
|
|
|
154
|
-
|
|
163
|
+
Use these slash commands inside a Claude Code session:
|
|
155
164
|
|
|
156
|
-
| Command |
|
|
165
|
+
| Command | Purpose |
|
|
157
166
|
|---|---|
|
|
158
|
-
| `/okstra-brief-gen` |
|
|
159
|
-
| `/okstra-run` | Start a new task
|
|
160
|
-
| `/okstra-memory` | Store
|
|
161
|
-
| `/okstra-inspect` | Unified read
|
|
162
|
-
| `/okstra-rollup` |
|
|
163
|
-
| `/okstra-schedule` | Generate a work schedule for an entire task
|
|
164
|
-
| `/okstra-container-build` | Deploy a verified task's code as a local
|
|
165
|
-
| `/okstra-graphify` | Build and query a knowledge graph over the project's own `.okstra/` memory
|
|
167
|
+
| `/okstra-brief-gen` | Convert a ticket, requirements document, link, or conversation into an `okstra-run` task brief |
|
|
168
|
+
| `/okstra-run` | Start a new task or continue an existing task's next phase |
|
|
169
|
+
| `/okstra-memory` | Store, search, and archive global conversation memory in `~/.okstra/memory-book` |
|
|
170
|
+
| `/okstra-inspect` | Unified read side. Subcommands: `status` (phase/state and workStatus updates), `history` (past tasks, reruns, resumes), `report` (find/read final reports), `time` (elapsed-time breakdown), `logs` (wrapper log sidecar inventory and cleanup suggestions), `cost` (task bundle context/read cost), `errors` (aggregate run error logs into a report), `error-zip` (collect cross-project error logs into an anonymized zip and summarize clusters), and `recap` (run-to-run before/after summary plus free-form Q&A over a task's `.okstra` artifacts) |
|
|
171
|
+
| `/okstra-rollup` | Aggregate every task run in a task group or project, including per-task run counts, duration, errors, group totals, and a cross-task report digest |
|
|
172
|
+
| `/okstra-schedule` | Generate a work schedule for an entire task group |
|
|
173
|
+
| `/okstra-container-build` | Deploy a verified task's code as a local Docker Compose group and monitor per-container logs (subcommands: `up` / `status` / `logs` / `stop-watcher` / `down`) |
|
|
174
|
+
| `/okstra-graphify` | Build and query a knowledge graph over the project's own `.okstra/` memory—final reports, `decisions/*.md`, and `glossary.md`—with scope restricted to `.okstra/` and output under `.okstra/graph/` (subcommands: `build` / `query` / `path` / `explain` / `mcp` / `wiki`) |
|
|
166
175
|
| `/okstra-manager` | Coordinate cross-project okstra tasks through manager-owned plans, assignments, one-way project sync snapshots, status, and child launch context packets |
|
|
167
|
-
| `/okstra-setup` |
|
|
176
|
+
| `/okstra-setup` | Bootstrap a project as described in §3.2 |
|
|
168
177
|
|
|
169
|
-
The lead operating contract and
|
|
178
|
+
The lead operating contract and support contracts—context loader, team contract, convergence, report writer, and the coding-preflight pack—are no longer installed as agent skills. They are installed as okstra runtime resources under `~/.okstra/prompts/` (`prompts/lead/*.md`, `prompts/coding-preflight/*`), and the generated launch prompt gives the lead their absolute paths. Reinstallation prunes legacy copies from agent skill homes, so they are not exposed as slash commands.
|
|
170
179
|
|
|
180
|
+
<a id="cli-mode"></a>
|
|
171
181
|
### 3.4 CLI mode (optional)
|
|
172
182
|
|
|
173
|
-
To
|
|
183
|
+
To start a task outside a Claude Code session:
|
|
174
184
|
|
|
175
185
|
```bash
|
|
176
186
|
~/.okstra/bin/okstra.sh \
|
|
@@ -182,49 +192,50 @@ To kick off a task from outside a Claude Code session:
|
|
|
182
192
|
--task-brief ./brief.md
|
|
183
193
|
```
|
|
184
194
|
|
|
185
|
-
|
|
195
|
+
This starts a new `claude` process in the lead role. For the complete argument list, see `okstra.sh --help` or [`docs/cli.md`](docs/cli.md).
|
|
186
196
|
|
|
187
197
|
Notable flags added in 0.7.0 / 0.8.0:
|
|
188
198
|
|
|
189
|
-
- `--executor claude|codex|antigravity` —
|
|
190
|
-
- `--work-category bugfix|feature|refactor|ops|improvement` —
|
|
191
|
-
- `--approve` —
|
|
199
|
+
- `--executor claude|codex|antigravity` — selects the provider that may mutate files for `--task-type implementation`. The other two providers are dispatched as strict read-only verifiers in the same run ([`docs/cli.md`](docs/cli.md#--executor)).
|
|
200
|
+
- `--work-category bugfix|feature|refactor|ops|improvement` — directly classifies work when the lifecycle skips the `requirements-discovery` phase.
|
|
201
|
+
- `--approve` — with `--approved-plan`, toggles the plan's YAML frontmatter `approved` field from `false` to `true`, replacing the removed `--ack-approved` alias and the former `[ ] Approved` checkbox marker.
|
|
192
202
|
|
|
193
|
-
|
|
203
|
+
Major workflow changes added to `main` after 0.8.0:
|
|
194
204
|
|
|
195
|
-
- **
|
|
196
|
-
- **`release-handoff` lifecycle phase** — runs after `final-verification` returns `verdict=accepted`.
|
|
197
|
-
- **Configurable PR body template** (release-handoff) —
|
|
198
|
-
- **Profile-roster
|
|
199
|
-
- **Experimental Codex lead adapter** — `okstra codex-run <render-bundle args...>` prepares a `leadRuntime=codex` task bundle without launching Claude Code. `okstra codex-dispatch --project-root <dir> --run-manifest <path>`
|
|
200
|
-
- **Multi-stage `implementation-planning` / `implementation`** — `implementation-planning` always produces a Stage Map
|
|
201
|
-
- **Phase 6 plan-body verification (implementation-planning only)** — after the
|
|
202
|
-
- **Brief as translation layer + reporter batch confirmation
|
|
203
|
-
- **Artifact-home rule (`.okstra/`)** — okstra
|
|
204
|
-
- **Self-contained HTML final-report view** —
|
|
205
|
-
- **`improvement-discovery` task
|
|
205
|
+
- **Automatic isolated worktrees for every task type** — During preparation, `okstra-ctl` runs `git worktree add ~/.okstra/worktrees/<project-id>/<task-group-segment>/<task-id-segment>` once per task key to create an isolated working tree and a `<work-category-namespace>/<task-id-segment>` branch (for example, `feature/dev-9436` or `fix/dev-7311`). The user chooses the base ref with `--base-ref`, using the same choices as the release-handoff PR base picker: `main`, `dev`, `staging`, `preprod`, `prod`, or a custom value. It is required in the first phase; the okstra-run skill collects it through `AskUserQuestion`, while non-interactive callers must pass `--base-ref` explicitly. Later **non-`implementation`** phases for the same task key (`requirements-discovery` → `error-analysis` → `implementation-planning` → `final-verification` → `release-handoff`) reuse the same path and branch. `implementation` runs are **stage-isolated**: each run executes one stage in its own `.../<task>/stage-<N>/` worktree on a `<work-category-namespace>/<task>-s<N>` branch, so independent stages with `depends-on (none)` can run concurrently without sharing a tree. The registry reserves both task keys and **stage keys** with flock. Provisioning is skipped when the caller is already in another worktree or project_root is not a Git repository; stage isolation degrades to a flat path in those cases. Manual cleanup: `git worktree remove <path>` → `git branch -D <branch>` plus release/removal of the registry entry. Details: [`docs/architecture.md`](docs/architecture.md), in the *Task type* section, and [`docs/cli.md#--executor`](docs/cli.md#--executor).
|
|
206
|
+
- **`release-handoff` lifecycle phase** — runs immediately after `final-verification` returns `verdict=accepted`. A Claude worker drafts candidate commit messages and a PR body, then the lead uses `AskUserQuestion` to ask, in order, for (1) an action (`commit only` / `commit + PR` / `skip`), (2) a PR base branch (`staging` / `preprod` / `prod` / `main` / `dev` / custom input), and (3) message handling (`use as-is` / `edit then proceed` / `cancel`). Only the Git/GitHub CLI commands selected through those menus are run. Force pushes, direct pushes to the base branch, hook bypasses (`--no-verify`), and release publication (`gh release`, `npm publish`, and similar commands) are prohibited. This phase does not edit source code. Profile: [`prompts/profiles/release-handoff.md`](prompts/profiles/release-handoff.md).
|
|
207
|
+
- **Configurable PR body template** (release-handoff) — PR bodies are populated from a Markdown template selected in this order: one-time override (`--pr-template-path` or the okstra-run Step 6 prompt) → `prTemplatePath` in `<project_root>/.okstra/project.json` → `prTemplatePath` in `~/.okstra/config.json` → the skill default at `~/.claude/skills/templates/prd/pr-body.template.md`. Register a template with `okstra config set pr-template-path <path> [--scope project|global]`; project scope accepts a path relative to the project root, while global scope requires an absolute path or a path beginning with `~/`. `okstra config get pr-template-path --scope all` prints every scoped value and the effective winner. The default template contains `## Summary`, `## Changes`, `## Test plan`, and `## Linked issues`, plus HTML comment guidance that the lead removes immediately before PR creation.
|
|
208
|
+
- **Profile worker-roster validation** — `--workers <csv>` and the okstra-run Step 6 worker prompt accept only the worker IDs declared in the selected profile's `Required workers:` block. Requesting a worker absent from the profile—for example, `codex` or `antigravity` for `release-handoff`—fails with a clear error, and the interactive prompt shows only workers accepted by that profile.
|
|
209
|
+
- **Experimental Codex lead adapter** — `okstra codex-run <render-bundle args...>` prepares a `leadRuntime=codex` task bundle without launching Claude Code. `okstra codex-dispatch --project-root <dir> --run-manifest <path>` then executes the supported Codex-side roster subset: Codex and Antigravity CLI workers by default, with a Codex report writer available through `--enable-codex-report-writer --report-writer-codex-model <model>`. A successful Codex report-writer dispatch performs token/cost substitution, HTML view rendering, follow-up stub generation, and run validation in order. It shares the Claude lead path's manifest and schema and does not clone the project into a Codex-specific fork.
|
|
210
|
+
- **Multi-stage `implementation-planning` / `implementation`** — `implementation-planning` always produces a Stage Map and N stage sections. Each stage has no more than six steps, and stages with `depends-on (none)` can be implemented concurrently in separate `implementation` runs. Each `implementation` invocation runs a single stage, selected with `--stage <auto|N>`, and creates an evidence sidecar at `carry/stage-<N>.json` for automatic carry-in to the next stage. The `implementation-planning` run directory accumulates `consumers.jsonl` reverse links that record which run consumed each stage.
|
|
211
|
+
- **Phase 6 plan-body verification (implementation-planning only)** — Immediately after the report-writer worker drafts the final report and before the user approval gate, the lead performs one post-verification round. It extracts `P-Opt-*`, `P-Step-*`, `P-Dep-*`, `P-Val-*`, and `P-Rb-*` plan items from the synthesized `## 5.5` implementation plan deliverables and asks every analyzer worker for an `AGREE`, `DISAGREE(a-e)`, or `SUPPLEMENT` verdict. The aggregate result is `passed`, `passed-with-dissent`, `blocked-by-disagreement`, or `aborted-non-result`. The frontmatter `approved` field is always published as `false`; a blocking result keeps it false and becomes a row in `## 1. Clarification Items`. For fast iteration, opt out with `--no-plan-verification`. Contract details: the "Plan-body verification mode" section of [`prompts/lead/convergence.md`](prompts/lead/convergence.md) and [`docs/cli.md#--no-plan-verification`](docs/cli.md#--no-plan-verification).
|
|
212
|
+
- **Brief as translation layer + Step 6.5 reporter batch confirmation** — `okstra-brief-gen` converts external input—an issue ticket, requirements document, or user message—verbatim and marks okstra-added content as labeled augmentation. Step 6.5 asks the user to confirm in one batch whether that conversion changed meaning and records the result in `Reporter Confirmations`. Every analysis profile requires this section before phase analysis begins; `validators/validate-brief.py` enforces the requirement.
|
|
213
|
+
- **Artifact-home rule (`.okstra/`)** — `<project>/.okstra/` is the only project artifact root owned by okstra. Anything outside this root is not okstra memory and may be read only when explicitly cited in Source Material or Reporter Confirmations. Writing outside the root requires the same explicit requested path. Internal equivalents are `glossary.md` for terminology and `decisions/<NNNN>-<slug>.md` for decision records, evaluated during `implementation-planning`.
|
|
214
|
+
- **Self-contained HTML final-report view** — After Phase 7 writes `final-report-<task-type>-<seq>.md`, `okstra render-views` automatically creates a sibling self-contained HTML view in the same `reports/` directory, with inline CSS/JavaScript and no external URLs. Its `Export user response` button serializes `## 1. Clarification Items` responses to `runs/<task-type>/user-responses/user-response-<task-type>-<seq>.md` for the next phase. View generation never changes the source Markdown.
|
|
215
|
+
- **`improvement-discovery` task type (sidetrack entry point)** — Within a codebase scope and priority-lens allowlist, multi-worker consensus produces N improvement candidates, with a default of eight and a hard cap of 12. This is a sidetrack entry point outside `PHASE_SEQUENCE`; the user selects candidates and starts each under a new task ID with `requirements-discovery`, `implementation-planning`, or `error-analysis`. Lens enum SSOT: [`scripts/okstra_ctl/improvement_lenses.py`](scripts/okstra_ctl/improvement_lenses.py). Output section: `## 4.9 Improvement Candidates` (10-column table). Validator: [`validators/validate_improvement_report.py`](validators/validate_improvement_report.py).
|
|
206
216
|
|
|
207
|
-
|
|
217
|
+
<a id="ops-commands"></a>
|
|
218
|
+
### 3.5 Operations commands
|
|
208
219
|
|
|
209
|
-
| Command |
|
|
220
|
+
| Command | Purpose |
|
|
210
221
|
|---|---|
|
|
211
222
|
| `npx -y okstra@latest paths` | Print runtime paths (`--field <name>` or `--shell`) |
|
|
212
|
-
| `npx -y okstra@latest doctor [--runtime claude-code\|codex\|all] [--phase <phase>]` | Diagnose runtime
|
|
213
|
-
| `npx -y okstra@latest ensure-installed` |
|
|
214
|
-
| `npx -y okstra@latest setup --project-id <id>` | Register the current project
|
|
215
|
-
| `npx -y okstra@latest check-project` | Verify the current project
|
|
216
|
-
| `npx -y okstra@latest config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Read
|
|
217
|
-
| `npx -y okstra@latest memory <add\|list\|search\|show\|archive>` | Store and
|
|
218
|
-
| `npx -y okstra@latest context-cost <task-key\|task-root> [--project-root <path>]` | Estimate lead
|
|
219
|
-
| `npx -y okstra@latest render-views <final-report.md>` | Regenerate the self-contained HTML
|
|
220
|
-
| `npx -y okstra@latest token-usage ...` | Collect
|
|
221
|
-
| `npx -y okstra@latest uninstall` | Remove runtime
|
|
222
|
-
| `npx -y okstra@latest uninstall --purge -y` | Remove
|
|
223
|
-
|
|
223
|
+
| `npx -y okstra@latest doctor [--runtime claude-code\|codex\|all] [--phase <phase>]` | Diagnose runtime, skills, and Python imports. `codex` excludes Claude skill checks; `--phase` adds readiness checks for implementation, final-verification, release-handoff, and improvement-discovery |
|
|
224
|
+
| `npx -y okstra@latest ensure-installed` | Run an idempotent check and automatically reinstall stale assets (skills call this internally) |
|
|
225
|
+
| `npx -y okstra@latest setup --project-id <id>` | Register the current project in `.okstra/project.json` |
|
|
226
|
+
| `npx -y okstra@latest check-project` | Verify that the current project was registered with `setup` |
|
|
227
|
+
| `npx -y okstra@latest config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Read or write okstra settings. The current key is `pr-template-path`, which updates `prTemplatePath` in project.json or `~/.okstra/config.json` |
|
|
228
|
+
| `npx -y okstra@latest memory <add\|list\|search\|show\|archive>` | Store, search, and archive global conversation memory in `~/.okstra/memory-book` |
|
|
229
|
+
| `npx -y okstra@latest context-cost <task-key\|task-root> [--project-root <path>]` | Estimate lead, worker, and report-writer context/read costs for a task bundle |
|
|
230
|
+
| `npx -y okstra@latest render-views <final-report.md>` | Regenerate the self-contained sibling HTML view for one final-report Markdown file (Phase 7 step 1.5; idempotent) |
|
|
231
|
+
| `npx -y okstra@latest token-usage ...` | Collect and substitute run token usage through the installed Python token-usage CLI wrapper |
|
|
232
|
+
| `npx -y okstra@latest uninstall` | Remove the runtime and skills while preserving user data such as `recent.jsonl` and `projects/` |
|
|
233
|
+
| `npx -y okstra@latest uninstall --purge -y` | Remove all assets, including user data |
|
|
234
|
+
|
|
235
|
+
<a id="further-reading"></a>
|
|
224
236
|
## 4. Further reading
|
|
225
237
|
|
|
226
|
-
- [`
|
|
227
|
-
- [`docs/
|
|
228
|
-
- [`
|
|
229
|
-
- [`
|
|
230
|
-
- [`CHANGELOG.md`](CHANGELOG.md) — release-by-release change log.
|
|
238
|
+
- [`docs/architecture.md`](docs/architecture.md) — detailed manual covering prompt and team contracts, storage, task-type phase rules, lifecycle, and workflow.
|
|
239
|
+
- [`docs/cli.md`](docs/cli.md) — complete reference for `okstra.sh` arguments, options, and interactive input flow.
|
|
240
|
+
- [`RELEASING.md`](RELEASING.md) — version cutting and publication through release-please or the manual fallback.
|
|
241
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — per-release change history.
|