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,65 +1,65 @@
|
|
|
1
|
-
# PR template
|
|
1
|
+
# PR template usage guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Summarizes the resolution rules, storage locations, and configuration methods for the Markdown template that `Claude lead` uses to write the PR body during the `release-handoff` phase.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Authoritative source of the resolution logic: [`scripts/okstra_ctl/pr_template.py`](../scripts/okstra_ctl/pr_template.py).
|
|
6
6
|
|
|
7
|
-
## 1. 4
|
|
7
|
+
## 1. The 4-step lookup priority
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Higher priority matches first. Once an upper step matches, the lower steps are not consulted.
|
|
10
10
|
|
|
11
|
-
| # | source |
|
|
11
|
+
| # | source | Location | Notes |
|
|
12
12
|
|---|--------|------|------|
|
|
13
|
-
| 1 | **per-run override** | `okstra render-bundle --pr-template-path <path>`
|
|
14
|
-
| 2 | **project scope** | `<project_root>/.okstra/project.json`
|
|
15
|
-
| 3 | **global scope** | `~/.okstra/config.json`
|
|
16
|
-
| 4 | **default (skill bundle)** |
|
|
13
|
+
| 1 | **per-run override** | `okstra render-bundle --pr-template-path <path>` or the wizard's one-time input | A relative path is resolved against the caller cwd (override) or against `project_root` (using the same function as project scope). |
|
|
14
|
+
| 2 | **project scope** | the `prTemplatePath` field in `<project_root>/.okstra/project.json` | A relative path is resolved against `project_root`. |
|
|
15
|
+
| 3 | **global scope** | the `prTemplatePath` field in `~/.okstra/config.json` | **Only an absolute path or a `~/`-prefixed path** is allowed. A relative path is ambiguous and rejected. |
|
|
16
|
+
| 4 | **default (skill bundle)** | the first existing file among the candidate paths (§2 below) | The fallback path right after `npx okstra install`. |
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
If the file named in any of the 4 steps does not exist, it fails immediately with `PrTemplateError` (no silent fallback).
|
|
19
19
|
|
|
20
|
-
## 2.
|
|
20
|
+
## 2. Default candidate paths
|
|
21
21
|
|
|
22
|
-
1. `$OKSTRA_SKILLS_DIR/templates/prd/pr-body.template.md` —
|
|
23
|
-
2. `~/.claude/skills/templates/prd/pr-body.template.md` — `npx okstra install`
|
|
22
|
+
1. `$OKSTRA_SKILLS_DIR/templates/prd/pr-body.template.md` — only when the `OKSTRA_SKILLS_DIR` environment variable is set.
|
|
23
|
+
2. `~/.claude/skills/templates/prd/pr-body.template.md` — the standard location `npx okstra install` installs to.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The candidates are tried in priority order, and if all are absent it ends with an explicit error as follows.
|
|
26
26
|
|
|
27
27
|
> `no PR template available: default skill template not found. Reinstall okstra (npx okstra install) or set prTemplatePath in project.json / ~/.okstra/config.json.`
|
|
28
28
|
|
|
29
|
-
## 3.
|
|
29
|
+
## 3. The original inside the source repository
|
|
30
30
|
|
|
31
|
-
- [`templates/prd/pr-body.template.md`](../templates/prd/pr-body.template.md) — `npx okstra install`
|
|
31
|
+
- [`templates/prd/pr-body.template.md`](../templates/prd/pr-body.template.md) — the original that `npx okstra install` copies to the §2 default location. To change the copy, edit this file and install again.
|
|
32
32
|
|
|
33
|
-
## 4.
|
|
33
|
+
## 4. Configuration commands — persistence
|
|
34
34
|
|
|
35
|
-
per-run override
|
|
35
|
+
To keep it longer than a per-run override, either the wizard invokes it automatically or you record it directly with the following commands.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
# project scope: <project_root>/.okstra/project.json
|
|
38
|
+
# project scope: update prTemplatePath in <project_root>/.okstra/project.json
|
|
39
39
|
okstra config set pr-template-path "<path>" --scope project
|
|
40
40
|
|
|
41
|
-
# global scope: ~/.okstra/config.json
|
|
41
|
+
# global scope: update prTemplatePath in ~/.okstra/config.json (absolute path required)
|
|
42
42
|
okstra config set pr-template-path "<absolute-path>" --scope global
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
wizard
|
|
45
|
+
In the wizard flow, the `pr_template_pick` step lets you choose among `Once / Save to project / Save globally`. Choosing `project` or `global` persists `prTemplatePath` with the same effect as the commands above.
|
|
46
46
|
|
|
47
|
-
## 5.
|
|
47
|
+
## 5. Source tracking
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Each run's prepare step records the step actually adopted into ctx, so it can be traced from the final report and elsewhere.
|
|
50
50
|
|
|
51
|
-
| ctx key |
|
|
51
|
+
| ctx key | Value |
|
|
52
52
|
|---------|-----|
|
|
53
|
-
| `PR_TEMPLATE_PATH` |
|
|
54
|
-
| `PR_TEMPLATE_SOURCE` | `"override" \| "project" \| "global" \| "default"`
|
|
53
|
+
| `PR_TEMPLATE_PATH` | the actually resolved absolute path |
|
|
54
|
+
| `PR_TEMPLATE_SOURCE` | one of `"override" \| "project" \| "global" \| "default"` |
|
|
55
55
|
|
|
56
|
-
`PR_TEMPLATE_SOURCE`
|
|
56
|
+
If `PR_TEMPLATE_SOURCE` is `default` but the project convention requires a distinct PR body, register `prTemplatePath` with the §4 persistence command.
|
|
57
57
|
|
|
58
|
-
## 6.
|
|
58
|
+
## 6. Troubleshooting
|
|
59
59
|
|
|
60
|
-
|
|
|
60
|
+
| Symptom | Cause | Action |
|
|
61
61
|
|------|------|------|
|
|
62
|
-
| `override PR template not found: <path>` | per-run override
|
|
63
|
-
| `project.json prTemplatePath points to missing file: <path>` | `project.json`
|
|
64
|
-
| `global config prTemplatePath must be absolute or start with '~/'` | `~/.okstra/config.json`
|
|
65
|
-
| `no PR template available` | install
|
|
62
|
+
| `override PR template not found: <path>` | the path given as a per-run override does not exist | Check for a path typo or use a persisted configuration. |
|
|
63
|
+
| `project.json prTemplatePath points to missing file: <path>` | the file pointed at by `prTemplatePath` in `project.json` is absent | Restore that file or reconfigure with `okstra config set pr-template-path <path> --scope project`. |
|
|
64
|
+
| `global config prTemplatePath must be absolute or start with '~/'` | a relative path was put in `~/.okstra/config.json` | Update to an absolute path or a `~/`-prefixed path. |
|
|
65
|
+
| `no PR template available` | install is missing or even the default file is absent | Re-run `npx okstra install` or set it explicitly with the §4 command. |
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
# Okstra —
|
|
1
|
+
# Okstra — Folder structure and feature summary
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> A living map based on the current repository. For quick usage see [`README.md`](../README.md), for the internal execution contract see [`docs/architecture.md`](architecture.md), for the storage model see [`docs/architecture/storage-model.md`](architecture/storage-model.md), and for detailed CLI options see [`docs/cli.md`](cli.md).
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Table of contents
|
|
8
8
|
|
|
9
|
-
- [1.
|
|
10
|
-
- [2.
|
|
11
|
-
- [3. Build / install
|
|
12
|
-
- [4.
|
|
13
|
-
- [5.
|
|
14
|
-
- [6.
|
|
15
|
-
- [7.
|
|
16
|
-
- [8.
|
|
17
|
-
- [
|
|
9
|
+
- [1. Project identity](#1-project-identity)
|
|
10
|
+
- [2. Top-level structure](#2-top-level-structure)
|
|
11
|
+
- [3. Build / install boundary](#3-build--install-boundary)
|
|
12
|
+
- [4. Folder responsibilities](#4-folder-responsibilities)
|
|
13
|
+
- [5. Key runtime modules](#5-key-runtime-modules)
|
|
14
|
+
- [6. Post-install layout](#6-post-install-layout)
|
|
15
|
+
- [7. Core workflows](#7-core-workflows)
|
|
16
|
+
- [8. Doc maintenance checklist](#8-doc-maintenance-checklist)
|
|
17
|
+
- [Appendix A. Report / row ID glossary](#appendix-a-report--row-id-glossary)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
## 1.
|
|
21
|
+
## 1. Project identity
|
|
22
22
|
|
|
23
|
-
`okstra
|
|
23
|
+
`okstra` is a multi-agent cross-verification runtime for Claude Code, distributed as the npm package `okstra`. It is not a one-shot reviewer; it runs a lead + worker model across multiple lifecycle phases around a stable task key.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Current baseline:
|
|
26
26
|
|
|
27
27
|
- package version: see `package.json`
|
|
28
28
|
- Node CLI entrypoint: `bin/okstra`
|
|
29
29
|
- Python orchestration authority: `scripts/okstra_ctl/run.py::prepare_task_bundle`
|
|
30
30
|
- lifecycle: `requirements-discovery → error-analysis → implementation-planning → implementation → final-verification → release-handoff`
|
|
31
|
-
- installed skills: 8
|
|
31
|
+
- installed skills: 8
|
|
32
32
|
- worker agents: `claude`, `codex`, `antigravity`, `report-writer`
|
|
33
33
|
- final report SSOT: `schemas/final-report-v1.0.schema.json` + `*.data.json`
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Design principles:
|
|
36
36
|
|
|
37
|
-
1. **Single prepare authority**: slash skill, Bash CLI, Node preview
|
|
38
|
-
2. **Stable task identity**: `<project-id>/<task-group>/<task-id
|
|
39
|
-
3. **Artifact-home rule**: okstra-owned project artifact root
|
|
40
|
-
4. **Template/schema/validator lockstep**: `templates/`, `schemas/`, `validators/`, worker/report-writer
|
|
37
|
+
1. **Single prepare authority**: the slash skill, the Bash CLI, and the Node preview all converge on `prepare_task_bundle()`.
|
|
38
|
+
2. **Stable task identity**: `<project-id>/<task-group>/<task-id>` runs through phase, run, worktree, and report.
|
|
39
|
+
3. **Artifact-home rule**: the okstra-owned project artifact root is the single `<PROJECT_ROOT>/.okstra/**`.
|
|
40
|
+
4. **Template/schema/validator lockstep**: `templates/`, `schemas/`, `validators/`, and the worker/report-writer contract enforce the same report shape.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
## 2.
|
|
44
|
+
## 2. Top-level structure
|
|
45
45
|
|
|
46
46
|
```text
|
|
47
47
|
okstra/
|
|
@@ -77,7 +77,7 @@ okstra/
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
-
## 3. Build / install
|
|
80
|
+
## 3. Build / install boundary
|
|
81
81
|
|
|
82
82
|
### 3.1 npm package
|
|
83
83
|
|
|
@@ -142,7 +142,7 @@ Runtime/install asset changes follow this checklist:
|
|
|
142
142
|
|
|
143
143
|
---
|
|
144
144
|
|
|
145
|
-
## 4.
|
|
145
|
+
## 4. Folder responsibilities
|
|
146
146
|
|
|
147
147
|
### 4.1 `bin/` and `src/` — Node CLI
|
|
148
148
|
|
|
@@ -182,7 +182,9 @@ Runtime/install asset changes follow this checklist:
|
|
|
182
182
|
| `spawn-followups`, `error-log` | `src/commands/execute/*.mjs` | Follow-up task bundle creation and run error-log append helpers |
|
|
183
183
|
| `memory` | `src/commands/memory/memory.mjs` | Store/find global conversation memory under `~/.okstra/memory-book` |
|
|
184
184
|
| `pr` | `src/commands/pr/pr.mjs` | `okstra pr <template\|branches\|gen>` — PR body template store under `~/.okstra/template/pr/` (bundled fallback `src/commands/pr/default.md`), base-branch recommendation, and the `gen` JSON bundle (template + `<base>..HEAD` commits + `<base>...HEAD` diffstat) backing the okstra-pr-gen skill. Git-only; no project registration required |
|
|
185
|
-
| `recap` | `src/commands/inspect/recap.mjs` | `okstra recap <assemble\|record>` Node wrapper backing the okstra-inspect `recap` facet |
|
|
185
|
+
| `recap` | `src/commands/inspect/recap.mjs` | `okstra recap <assemble\|record\|note>` Node wrapper backing the okstra-inspect `recap` facet — `assemble` is a read-only phase-transition summary, `record` appends one line to `recap/recap-log.jsonl`, and `note` writes an agent-authored note under `notes/` and prints the `--clarification-response` argument for a follow-up run |
|
|
186
|
+
| `stage-map` | `src/commands/inspect/stage-map.mjs` | `okstra stage-map <task-key>` — exposes a task's implementation-planning Stage Map as JSON (`stages[].{stage_number,title,depends_on,step_count}` + consumer-state-based `doneStages[]`). If there is no Stage Map, `stages: []`. The read-side basis from which `okstra-schedule-gen` derives stage units and dependency closure |
|
|
187
|
+
| `design-prep` | `src/commands/inspect/design-prep.mjs` | `okstra design-prep <list\|show\|write>` thin shim into `scripts/okstra_ctl/design_prep.py` — queries (`list`/`show`) the design items that implementation-planning pre-authored with AI, and records the user-confirmed responses as an append-only sidecar under `design-prep-inputs/` (`write`, `--confirmed` required). It never modifies the report snapshot |
|
|
186
188
|
| `rollup` | `src/commands/inspect/rollup.mjs` | `okstra rollup` thin shim into `scripts/okstra_ctl/rollup.py` — read-only cross-task roll-up backing the okstra-rollup skill |
|
|
187
189
|
| `usage-report` | `src/commands/inspect/usage-report.mjs` | `okstra usage-report` thin shim into `scripts/okstra_ctl/usage_report.py` — read-only project usage snapshot backing the okstra-usage skill |
|
|
188
190
|
| `container` | `src/commands/inspect/container.mjs` | `bin okstra container` thin shim into `scripts/okstra_ctl/container.py` for the okstra-container-build skill |
|
|
@@ -206,8 +208,8 @@ Top-level scripts:
|
|
|
206
208
|
| `okstra-render-report-views.py` | Render self-contained HTML views from final-report Markdown |
|
|
207
209
|
| `okstra-error-log.py` | Normalize worker/lead error sidecars |
|
|
208
210
|
| `okstra-spawn-followups.py` | Follow-up spawning helper |
|
|
209
|
-
| `okstra-trace-cleanup.sh` | tmux okstra pane cleanup (worker-agent + trace, lead pane
|
|
210
|
-
| `okstra-subagent-reclaim.sh` |
|
|
211
|
+
| `okstra-trace-cleanup.sh` | tmux okstra pane cleanup (worker-agent + trace, excluding the lead pane); the `--reclaim-completed` mode reclaims only trace panes whose `@okstra_status` is terminated (stage=exited) and preserves in-progress panes |
|
|
212
|
+
| `okstra-subagent-reclaim.sh` | entry that walks active runs and reclaims only completed trace panes (wired to the `SubagentStop`/`TaskCompleted` hooks) |
|
|
211
213
|
|
|
212
214
|
### 4.3 `scripts/okstra_ctl/` — Python orchestration core
|
|
213
215
|
|
|
@@ -216,50 +218,68 @@ Important modules:
|
|
|
216
218
|
| Module | Role |
|
|
217
219
|
|---|---|
|
|
218
220
|
| `run.py` | `prepare_task_bundle()` single authority and CLI parser |
|
|
219
|
-
| `implementation_stage.py` | `implementation`
|
|
220
|
-
| `stage_targets.py` | Stage readiness/verification
|
|
221
|
-
| `stage_reconcile.py` |
|
|
222
|
-
| `
|
|
223
|
-
| `
|
|
221
|
+
| `implementation_stage.py` | `implementation` single-stage run orchestration — read the Stage Lifecycle Snapshot → pick an available Stage Map entry → provision an isolated stage worktree → publish the selected stage as run context (extracted from `run.py`) |
|
|
222
|
+
| `stage_targets.py` | Stage readiness/verification policy SSOT — from the Stage Lifecycle Snapshot (`consumers.jsonl` ledger + carry sidecar backfill + active registry reservation) it decides which stage is runnable, which commit it branches from, and what final-verification checks. `order_stage_closure` topologically sorts (Kahn) the dependency closure of the wizard's multi-selected stage set to produce the unattended `chain-stages` chaining order |
|
|
223
|
+
| `stage_reconcile.py` | best-effort git reconciliation shared by the stage prepare flow (delegates to `git_reconcile.auto_reconcile`; advisory — failures are only reported to stderr, the dependency gate stays authoritative) |
|
|
224
|
+
| `design_surfaces.py` | deterministic detection of an `implementation-planning` stage's design surface — matches the stage's file-path tokens/suffixes/patterns and action wording via `SurfaceRule` to derive which design input the stage needs among domain contract, DB/table schema, external interface, transaction/consistency, transformation mapping, lifecycle, rollout/observability, and manual user test, plus its evidence (`TriggerEvidence`). An unmappable structure raises `DesignSurfaceError` |
|
|
225
|
+
| `design_prep.py` | fingerprint / materialize / resolve backend for design-preparation requests (CLI: `okstra design-prep <list\|show\|write>`) — computes an assessment fingerprint from the approved planning snapshot's `ASSESSMENT_FIELDS`, idempotently writes an Okstra-owned request under `design-prep-requests/`, and resolves the highest-revision append-only user response under `design-prep-inputs/` whose fingerprint matches as the effective response. Keeps the three authorities (report snapshot / Okstra request / user input) separate and never modifies the report or existing revisions. Sidecar I/O is protected by a directory-fd anchor + flock |
|
|
226
|
+
| `incremental_scope.py` | incremental re-verification decision for an `implementation-planning` clarification re-run (deterministic pure function) — reads the dependency graph from the previous run data.json's `implementationPlanning.stageMap` and returns `mode="incremental"` only when the base-ref SHA is unchanged and the affected stages' `downstream_stage_closure` is at most half of all stages. CLI: `okstra incremental-scope` |
|
|
227
|
+
| `incremental_carry.py` | carry merge for an incremental re-run — merges the previous run's plan-item verdicts that this run does not re-verify into the current data.json with a `carriedForwardFromSeq` tag. On `schemaVersion` drift it exits non-zero with `CarryError` to force a full fallback. CLI: `okstra incremental-carry` |
|
|
224
228
|
| `run_context.py` | Per-task mutex, run context and run-input persistence; `consumers_mutex` helper for atomic `consumers.jsonl` writes |
|
|
225
|
-
| `path_hints.py` | Compact path-hint persistence + legacy context hydration — `run-context` / `active-run-context`
|
|
229
|
+
| `path_hints.py` | Compact path-hint persistence + legacy context hydration — stores `run-context` / `active-run-context` in the schemaVersion `2.0` `identity` + `pathHints` compact schema, and hydrates the legacy flat path keys (`RUN_MANIFEST_RELATIVE_PATH`, `TEAM_STATE_PATH`, etc.) in memory the moment the host-side reader reads them |
|
|
226
230
|
| `consumers.py` | Append-only `consumers.jsonl` writer + reader — records which `implementation` runs consumed which `implementation-planning` stage |
|
|
227
|
-
| `implementation_outcome.py` | Artifact-derived implementation phase outcome
|
|
228
|
-
| `paths.py` | Path/sequence computation for task/run artifacts (recap
|
|
229
|
-
| `recap.py` | okstra-inspect `recap` facet
|
|
231
|
+
| `implementation_outcome.py` | Artifact-derived reconstruction of the implementation phase outcome — reads `runs/implementation/carry/stage-<N>.json` + `consumers.jsonl` + the approved Stage Map to derive `phaseOutcome.implementation`, and when every stage has pass-grade carry evidence it corrects `workflow.nextRecommendedPhase` to `final-verification` (keeping the `contract-violated` audit information) |
|
|
232
|
+
| `paths.py` | Path/sequence computation for task/run artifacts (including recap directory/log paths) |
|
|
233
|
+
| `recap.py` | deterministic backend for the okstra-inspect `recap` facet — `assemble` builds the cross-run phase transitions from the timeline, `record` append-only writes a summary/Q&A to `<task-root>/recap/recap-log.jsonl` (other task artifacts unchanged) |
|
|
230
234
|
| `render.py` | task manifest, run manifest, timeline, task index, discovery, team-state, prompt/template render |
|
|
231
235
|
| `workflow.py` | Phase sequence, allowed outputs, forbidden actions, next phase |
|
|
232
236
|
| `workers.py`, `models.py` | Worker roster; `models.py` is the model catalog SSOT (`ModelSpec` per alias + `ROLE_DEFAULTS`) — add-a-model single reference point from which picker options, codex pricing, and role defaults all derive |
|
|
233
237
|
| `worktree.py`, `worktree_registry.py` | One worktree per task-key, branch registry, sync dirs/files/snapshots |
|
|
234
238
|
| `project_meta.py`, `resolver.py`, `path_resolve.py` | Project/task/run resolution |
|
|
235
239
|
| `clarification_items.py` | Unified §5 clarification table parser and approval blockers |
|
|
236
|
-
| `md_table.py` | Markdown pipe-table escape/split SSOT — `mdcell`
|
|
240
|
+
| `md_table.py` | Markdown pipe-table escape/split SSOT — the `mdcell` filter (`escape_pipes`) and the `\|`-aware `split_pipe_row`; shared by the renderer, HTML view, and validators |
|
|
237
241
|
| `qa_commands.py` | QA command deny-list validation for plans |
|
|
238
242
|
| `pr_template.py` | PR body template resolution for release-handoff |
|
|
239
243
|
| `report_views.py`, `render_final_report.py`, `final_report_schema.py` | Final-report data.json → Markdown → Report View Model → self-contained HTML pipeline |
|
|
240
|
-
| `final_report_paths.py`, `report_view_artifacts.py` |
|
|
244
|
+
| `final_report_paths.py`, `report_view_artifacts.py` | Path-helper SSOT for the final-report markdown/data.json pair and the generated view artifacts (HTML view, user-responses directory) |
|
|
241
245
|
| `wizard.py` | `okstra-run` prompt state machine; user-facing Korean strings live in `prompts/wizard/prompts.ko.json` |
|
|
242
|
-
| `wizard_stage_intent.py` | `okstra-run` wizard
|
|
246
|
+
| `wizard_stage_intent.py` | stage-related intent projection of the `okstra-run` wizard output — normalizes whole-task (`__whole_task__`) vs single/multi stage selection into render-args (`resolve_wizard_stage_intent`) |
|
|
243
247
|
| `index.py`, `jsonl.py`, `reconcile.py`, `listing.py`, `batch.py`, `backfill.py` | `~/.okstra` run index and history operations |
|
|
244
|
-
| `run_index_row.py` | `~/.okstra` run-index row
|
|
245
|
-
| `error_report.py`, `error_log_core.py`, `error_zip.py` | okstra-inspect errors/error-zip
|
|
246
|
-
| `log_report.py`, `time_report.py` | okstra-inspect logs/time
|
|
247
|
-
| `rollup.py` |
|
|
248
|
+
| `run_index_row.py` | single reference point for creating / slimming / hydrating a `~/.okstra` run-index row — runId SSOT, preserves projectId raw |
|
|
249
|
+
| `error_report.py`, `error_log_core.py`, `error_zip.py` | backend for the okstra-inspect errors/error-zip facets — `error_log_core` is the read-only core that globs/parses/aggregates `errors-*.jsonl`, `error_report` renders the errors facet, and `error_zip` collects cross-project run directories, allowlist-anonymizes, aggregates clusters, and produces a zip |
|
|
250
|
+
| `log_report.py`, `time_report.py` | read-side backend for the okstra-inspect logs/time facets (`okstra log-report` is the wrapper sidecar log inventory, `okstra time-report` is per-task time aggregation) |
|
|
251
|
+
| `rollup.py` | read-side backend for the okstra-rollup skill — fans the catalog out per task-group (or the whole project) and deterministically aggregates each task's run count, elapsed time (raw ms), error count, and latest report path, plus group-level totals/status, category, and phase distribution. Reuses the `time_report`/`error_log_core` functions and delegates report-body synthesis to the skill |
|
|
248
252
|
| `usage_report.py` | Read-only okstra-usage backend — scans the whole current project's recent run timelines, defaults to 30 days, and returns task-type coverage, raw/billable tokens, known USD cost, CPU-sum and wall-clock milliseconds, unavailable reason counts, and unmatched pricing models |
|
|
249
|
-
| `json_registry.py` |
|
|
250
|
-
| `stage_integrate.py` | whole-task stage
|
|
251
|
-
| `resolve_task_key.py` | bare task-id → `task-catalog.json`
|
|
253
|
+
| `json_registry.py` | shared flock + atomic JSON persistence for small okstra registries (`registry_lock`/`load_registry_json`/`save_registry_json`) — shared by `container_registry` and `worktree_registry` |
|
|
254
|
+
| `stage_integrate.py` | whole-task stage integration (merge) + worktree teardown core (`integrate_stages`) — shared by whole-task final-verification entry, `okstra integrate-stages`, and container up |
|
|
255
|
+
| `resolve_task_key.py` | shared skill helper resolving a bare task-id → `task-catalog.json` candidate entries (`okstra resolve-task-key`) |
|
|
252
256
|
| `session.py`, `tmux.py`, `seeding.py`, `locks.py`, `invocation.py`, `sequence.py`, `ids.py`, `material.py` | Supporting lifecycle helpers |
|
|
253
|
-
| `pane_reclaim.py` |
|
|
254
|
-
| `improvement_lenses.py` |
|
|
255
|
-
| `container.py` |
|
|
256
|
-
| `container_registry.py` | flock-guarded
|
|
257
|
-
| `plan_run_root.py` | `approved_plan_path` → `plan_run_root`
|
|
257
|
+
| `pane_reclaim.py` | decides which completed trace panes are reclaim targets; imports the in-progress status set from the `reconcile.NON_TERMINAL_RECENT_STATUSES` SSOT |
|
|
258
|
+
| `improvement_lenses.py` | lens enum SSOT + cap constants for the improvement-discovery phase (DEFAULT 8, ABSOLUTE 12, MIN/MAX PRIORITY 1/4, SOURCE_WORKERS) |
|
|
259
|
+
| `container.py` | the `okstra container` convergence entrypoint of the okstra-container-build public skill — `provision_container_group` + `up`/`status`/`logs`/`stop-watcher`/`down` dispatch, env-override synthesis, compose argv assembly, and per-container watcher startup |
|
|
260
|
+
| `container_registry.py` | flock-guarded auxiliary index — tracks per-container-group tmux session/pane and watcher findings |
|
|
261
|
+
| `plan_run_root.py` | shared helper deriving `approved_plan_path` → `plan_run_root` and back-tracing the task-key |
|
|
258
262
|
| `manager_cli.py` | `okstra manager` Python entrypoint — manager init/discover/new/task subcommands and JSON output |
|
|
259
263
|
| `manager_paths.py` | Manager state path SSOT under `~/.okstra/managers/<manager-id>/`; slug fallback uses `u-<sha1-prefix>` when a safe segment would be empty |
|
|
260
264
|
| `manager_store.py` | Manager-owned state mutation — project membership, task planning, assignment, directives, event append |
|
|
261
265
|
| `manager_sync.py` | One-way child project `.okstra` snapshot reader; corrupt child state becomes row-level `error` so other children continue |
|
|
262
266
|
| `manager_launch.py` | Child launch packet and manager child context renderer; records `prepared` launch metadata/events without changing project-local task state |
|
|
267
|
+
| `dispatch_core.py` | Backend-neutral worker dispatch core — worker execution/collection logic shared by any lead runtime (Claude/Codex/external) |
|
|
268
|
+
| `codex_dispatch.py` | Codex lead CLI-worker dispatcher — the `okstra codex-dispatch` backend. Reads the run manifest to run the Codex-side supported worker subset and performs token-usage substitution, view render, follow-up, and validation |
|
|
269
|
+
| `analysis_packet.py` | assembles the compact analysis-worker input packet for a task run (error-analysis phase worker input) |
|
|
270
|
+
| `context_cost.py` | read-side context-cost estimator for a prepared okstra task bundle (the `okstra context-cost` backend) |
|
|
271
|
+
| `schema_excerpt.py` | generates a task-type-scoped excerpt of the final-report schema — a schema reduction to inject into the worker/lead prompt |
|
|
272
|
+
| `work_categories.py` | requirements-discovery work-category (domain) **SSOT** (`is_valid_category`) — the work-category allowlist is defined only here |
|
|
273
|
+
| `model_discovery.py` | pre-dispatch model-identity normalization for CLI workers — roster-gated label correction + a per-role reasoning-effort policy (deterministic, no per-run improvisation) for CLIs (agy) that bake effort into the model name |
|
|
274
|
+
| `lead_runtime.py` | lead runtime metadata shared by the render and prepare paths (`LeadRuntimeInfo`) |
|
|
275
|
+
| `lead_events.py` | structured JSONL events emitted by non-Claude lead runtimes |
|
|
276
|
+
| `team_reconcile.py` | stale team-member reconciliation at run-end teardown |
|
|
277
|
+
| `worker_prompt_headers.py` | shared rendering of the worker prompt anchor header (`worker_prompt_headers`) |
|
|
278
|
+
| `wrapper_status.py` | worker wrapper status sidecar reader — the host-side reader of the sidecar written by `okstra-wrapper-status.py` (the heartbeat writer) |
|
|
279
|
+
| `task_target.py` | shared helper resolving `task-key → (task_root, project_root)` (`resolve_task_root`) |
|
|
280
|
+
| `graphify_cmd.py` | scope wrapper for the okstra-graphify skill — `resolve_scope` + `assemble` + `okstra graphify` subcommand dispatch. Forces the corpus to `.okstra` and outputs to `.okstra/graph/` |
|
|
281
|
+
|
|
282
|
+
> `i18n.py` (the final-report i18n dictionary loader + Jinja2 lookup) is an intentionally undocumented internal helper — it is a render helper that users and contributors do not need to know about in the canonical docs, so it is excluded from the module map.
|
|
263
283
|
|
|
264
284
|
### 4.4 `scripts/okstra_project/`
|
|
265
285
|
|
|
@@ -302,10 +322,10 @@ Token/cost accounting:
|
|
|
302
322
|
|
|
303
323
|
`schemas/final-report-v1.0.schema.json` is the final-report data.json contract. The report-writer worker writes `final-report-<task-type>-<seq>.data.json`; the renderer produces Markdown from that JSON.
|
|
304
324
|
|
|
305
|
-
Optional (v1.0
|
|
325
|
+
Optional (v1.0 backward-compatible) top-level keys:
|
|
306
326
|
|
|
307
|
-
- `readerSummary` —
|
|
308
|
-
- `implementationPlanning.incrementalDecision` —
|
|
327
|
+
- `readerSummary` — the summary block a human reads first. When present, all five fields (`decision`, `humanActionRequired`, `blockingItems`, `safeToSkip`, `recommendedCommand`) are required. Existing data.json without it still renders as-is (the HTML dashboard falls back to `verdictCard`).
|
|
328
|
+
- `implementationPlanning.incrementalDecision` — the incremental re-verification decision (`mode`, `reverifyStages`, `carryStages`, `reason`). When `mode == "incremental"`, the renderer emits the `### 0.1 Incremental Re-Verification Scope` audit block and `validators/validate-run.py` blocks its absence.
|
|
309
329
|
|
|
310
330
|
### 4.9 `validators/`
|
|
311
331
|
|
|
@@ -313,10 +333,10 @@ Optional (v1.0 하위호환) 최상위 키:
|
|
|
313
333
|
|---|---|
|
|
314
334
|
| `validate-run.py` | Run/final-report contract validation |
|
|
315
335
|
| `validate-brief.py`, `validate-brief.sh` | Brief frontmatter/body contract validation |
|
|
316
|
-
| `validate-report-views.py` | HTML view validation (form-control
|
|
336
|
+
| `validate-report-views.py` | HTML view validation (form-control placement / no external URLs / stale source digest / Response ID parity) |
|
|
317
337
|
| `validate-schedule.py` | Schedule section/order/code validation |
|
|
318
|
-
| `validate-implementation-plan-stages.py` | Stage Map
|
|
319
|
-
| `validate_improvement_report.py` | improvement-discovery final-report
|
|
338
|
+
| `validate-implementation-plan-stages.py` | enforces the Stage Map structure — checks the S1–S8 rules (`## 5.5 Stage Map` + `## 5.5.<i> Stage <i>` sections, ≤ 8 steps per stage, etc.) |
|
|
339
|
+
| `validate_improvement_report.py` | enforces the 11-item contract of the improvement-discovery final-report. Automatically invoked by `validate-run.py` when `task_type == "improvement-discovery"` |
|
|
320
340
|
| `validate-workflow.sh` | End-to-end fixture workflow validation |
|
|
321
341
|
| `lib/*.sh` | Shared shell validator helpers and fixtures |
|
|
322
342
|
|
|
@@ -332,7 +352,7 @@ Optional (v1.0 하위호환) 최상위 키:
|
|
|
332
352
|
| `okstra-inspect` | yes | Unified read-side — sub-commands `status` (lifecycle + workStatus), `history` (past runs / re-run / resume), `report` (find final-report), `time` (elapsed-time breakdown), `logs` (wrapper log inventory + cleanup), `cost` (task bundle context/read cost) |
|
|
333
353
|
| `okstra-rollup` | yes | Cross-task roll-up — aggregate runs/time/errors across a task-group (or whole project) and synthesize a digest from the report files |
|
|
334
354
|
| `okstra-usage` | yes | Read-only project usage snapshot — aggregate recent run coverage, tokens, known cost, CPU, and wall-clock time by task type (default: 30 days) |
|
|
335
|
-
| `okstra-schedule` | yes | Generate task-group schedule |
|
|
355
|
+
| `okstra-schedule-gen` | yes | Generate task-group schedule |
|
|
336
356
|
| `okstra-container-build` | yes | Non-linear deploy tool — deploy a verified task's code as a docker compose group and watch each container (sub-commands `up` / `status` / `logs` / `stop-watcher` / `down`) |
|
|
337
357
|
| `okstra-graphify` | yes | Knowledge graph over the project's own `.okstra/` memory — final reports, `decisions/*.md`, `glossary.md`; scope restricted to `.okstra/`, output under `.okstra/graph/` (sub-commands `build` / `query` / `path` / `explain` / `mcp` / `wiki`) |
|
|
338
358
|
| `okstra-pr-gen` | yes | Register PR body templates under `~/.okstra/template/pr/` and generate a PR description from a branch diff (drives `okstra pr template` / `branches` / `gen`). **Global skill** — needs a Git repo, not `<PROJECT_ROOT>/.okstra/project.json` |
|
|
@@ -347,20 +367,20 @@ Optional (v1.0 하위호환) 최상위 키:
|
|
|
347
367
|
| File | Role |
|
|
348
368
|
|---|---|
|
|
349
369
|
| `agents/workers/claude-worker.md` | Claude analyzer/verifier/executor spec |
|
|
350
|
-
| `agents/workers/codex-worker.params.json` | Codex analyzer/verifier/executor wrapper params (build
|
|
351
|
-
| `agents/workers/antigravity-worker.params.json` | Antigravity analyzer/verifier/executor wrapper params (build
|
|
370
|
+
| `agents/workers/codex-worker.params.json` | Codex analyzer/verifier/executor wrapper params (build renders `.md` via `_cli-wrapper-template.md`) |
|
|
371
|
+
| `agents/workers/antigravity-worker.params.json` | Antigravity analyzer/verifier/executor wrapper params (build renders `.md` via `_cli-wrapper-template.md`) |
|
|
352
372
|
| `agents/workers/report-writer-worker.md` | data.json SSOT author and audit sidecar writer |
|
|
353
373
|
|
|
354
374
|
The neutral lead lifecycle contract lives at `prompts/lead/okstra-lead-contract.md`. Host mappings live under `prompts/lead/adapters/`: `claude-code.md`, `codex.md`, and `external.md`. All are runtime resources installed under `~/.okstra/prompts/lead/`, not agent skills.
|
|
355
375
|
|
|
356
376
|
### 4.12 `tests/` and `tests-e2e/`
|
|
357
377
|
|
|
358
|
-
- `tests/`: pytest modules,
|
|
359
|
-
- `tests-e2e/`: `scenario-<id>-<name>.sh`
|
|
378
|
+
- `tests/`: pytest modules, layered into per-domain subfolders — `run/` (prepare/dispatch/run-index core), `contract/` (validator, repo/docs contract, phase rules, profile), `report/` (render, convergence, language, template), `inspect/` (recap, error, context-cost, token-usage), `worktree/` (worktree, stage isolation, reconcile, reclaim), `wizard/`, `handoff/`. The shared path SSOT is `tests/_paths.py` (`REPO_ROOT`/`TESTS_DIR`/`FIXTURES`), and the setting that puts `tests/` on the import path is the repo-root `pytest.ini` (`pythonpath = tests`). Fixtures live in `tests/fixtures/`.
|
|
379
|
+
- `tests-e2e/`: `scenario-<id>-<name>.sh` shell scenarios (record-start/reconcile, rerun, task lock, agent install, report view, etc.).
|
|
360
380
|
|
|
361
381
|
---
|
|
362
382
|
|
|
363
|
-
## 5.
|
|
383
|
+
## 5. Key runtime modules
|
|
364
384
|
|
|
365
385
|
### 5.1 Prepare flow
|
|
366
386
|
|
|
@@ -414,7 +434,7 @@ The Markdown is derived, not the authoring source. The schema is the contract.
|
|
|
414
434
|
|
|
415
435
|
---
|
|
416
436
|
|
|
417
|
-
## 6.
|
|
437
|
+
## 6. Post-install layout
|
|
418
438
|
|
|
419
439
|
```text
|
|
420
440
|
~/.okstra/
|
|
@@ -455,16 +475,18 @@ The Markdown is derived, not the authoring source. The schema is the contract.
|
|
|
455
475
|
├── sessions/
|
|
456
476
|
├── worker-results/
|
|
457
477
|
├── user-responses/
|
|
458
|
-
├──
|
|
478
|
+
├── design-prep-requests/ # implementation-planning only: Okstra-owned AI draft request (deterministic, idempotent)
|
|
479
|
+
├── design-prep-inputs/ # implementation-planning only: user/wizard confirmation responses (append-only revision)
|
|
480
|
+
├── carry/ # implementation only: stage-<N>.json evidence sidecar
|
|
459
481
|
├── logs/
|
|
460
|
-
└── (consumers.jsonl) # implementation-planning
|
|
482
|
+
└── (consumers.jsonl) # implementation-planning only: impl-run backlink accumulation file
|
|
461
483
|
```
|
|
462
484
|
|
|
463
485
|
Project-local `<PROJECT_ROOT>/.claude/settings.local.json` is provisioned as a symlink so spawned agents can load okstra worker-wrapper permissions.
|
|
464
486
|
|
|
465
487
|
---
|
|
466
488
|
|
|
467
|
-
## 7.
|
|
489
|
+
## 7. Core workflows
|
|
468
490
|
|
|
469
491
|
### 7.1 First setup
|
|
470
492
|
|
|
@@ -486,7 +508,7 @@ Project-local `<PROJECT_ROOT>/.claude/settings.local.json` is provisioned as a s
|
|
|
486
508
|
|---|---|---|
|
|
487
509
|
| `requirements-discovery` | Classify and route work | `error-analysis` or `implementation-planning` |
|
|
488
510
|
| `error-analysis` | Reproduce and explain failure | `implementation-planning` |
|
|
489
|
-
| `implementation-planning` | Compare options, produce approval-ready plan;
|
|
511
|
+
| `implementation-planning` | Compare options, produce approval-ready plan; the output is always the `## 5.5 Stage Map` + N `## 5.5.<i> Stage <i>` section structure. `implementation` can be split and run per stage | `implementation` after approval |
|
|
490
512
|
| `implementation` | Executor changes code, verifiers check independently | `final-verification` |
|
|
491
513
|
| `final-verification` | Read-only acceptance verification | `release-handoff` if accepted |
|
|
492
514
|
| `release-handoff` | User-selected commit/PR handoff | done or follow-up |
|
|
@@ -497,7 +519,7 @@ Final report artifacts live under `runs/<task-type>/reports/`. Human responses f
|
|
|
497
519
|
|
|
498
520
|
---
|
|
499
521
|
|
|
500
|
-
## 8.
|
|
522
|
+
## 8. Doc maintenance checklist
|
|
501
523
|
|
|
502
524
|
When changing code, keep these docs in sync:
|
|
503
525
|
|
|
@@ -511,7 +533,7 @@ When changing code, keep these docs in sync:
|
|
|
511
533
|
|
|
512
534
|
---
|
|
513
535
|
|
|
514
|
-
##
|
|
536
|
+
## Appendix A. Report / row ID glossary
|
|
515
537
|
|
|
516
538
|
| Prefix / token | Meaning |
|
|
517
539
|
|---|---|
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2.
|
|
7
|
-
- [3. task-type
|
|
8
|
-
- [4.
|
|
9
|
-
- [5.
|
|
5
|
+
- [1. Reading order](#1-reading-order)
|
|
6
|
+
- [2. Big picture](#2-big-picture)
|
|
7
|
+
- [3. task-type documents](#3-task-type-documents)
|
|
8
|
+
- [4. Key code locations](#4-key-code-locations)
|
|
9
|
+
- [5. Quick comparison table](#5-quick-comparison-table)
|
|
10
10
|
|
|
11
|
-
## 1.
|
|
11
|
+
## 1. Reading order
|
|
12
12
|
|
|
13
|
-
`okstra-run
|
|
13
|
+
`okstra-run` is the path that starts a task inside a Claude Code session. This folder organizes that execution flow into two layers.
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
3. task-type
|
|
15
|
+
1. First read [common-flow.md](common-flow.md). It is the wizard, render-bundle, lead phase, and artifact flow shared by every task-type.
|
|
16
|
+
2. Then read the document for the task-type you want to run.
|
|
17
|
+
3. Check the per-task-type differences across three places: "what the wizard additionally asks", "what `prepare_task_bundle()` blocks in the runtime", and "what the lead profile enforces within the phase".
|
|
18
18
|
|
|
19
|
-
## 2.
|
|
19
|
+
## 2. Big picture
|
|
20
20
|
|
|
21
21
|
```mermaid
|
|
22
22
|
flowchart TD
|
|
@@ -32,30 +32,30 @@ flowchart TD
|
|
|
32
32
|
F --> O[final-report + manifests + status]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`okstra-run
|
|
35
|
+
`okstra-run` does not call `scripts/okstra.sh`. Instead it goes through `okstra wizard` and `okstra render-bundle` and converges on the same single Python entrypoint, `prepare_task_bundle()`.
|
|
36
36
|
|
|
37
|
-
## 3. task-type
|
|
37
|
+
## 3. task-type documents
|
|
38
38
|
|
|
39
|
-
| task-type |
|
|
39
|
+
| task-type | Document | One-line purpose |
|
|
40
40
|
|---|---|---|
|
|
41
|
-
| `requirements-discovery` | [requirements-discovery.md](requirements-discovery.md) |
|
|
42
|
-
| `error-analysis` | [error-analysis.md](error-analysis.md) |
|
|
43
|
-
| `implementation-planning` | [implementation-planning.md](implementation-planning.md) |
|
|
44
|
-
| `implementation` | [implementation.md](implementation.md) |
|
|
45
|
-
| `final-verification` | [final-verification.md](final-verification.md) |
|
|
46
|
-
| `release-handoff` | [release-handoff.md](release-handoff.md) |
|
|
41
|
+
| `requirements-discovery` | [requirements-discovery.md](requirements-discovery.md) | Classify the request and choose the next safe phase. |
|
|
42
|
+
| `error-analysis` | [error-analysis.md](error-analysis.md) | Find cause candidates and validation paths from symptoms and evidence. |
|
|
43
|
+
| `implementation-planning` | [implementation-planning.md](implementation-planning.md) | Produce a plan with implementation options, verification, rollback, and an approval gate. |
|
|
44
|
+
| `implementation` | [implementation.md](implementation.md) | The executor implements the approved plan and the verifier verifies it independently. |
|
|
45
|
+
| `final-verification` | [final-verification.md](final-verification.md) | Judge whole-task or single-stage acceptance of the implementation result. |
|
|
46
|
+
| `release-handoff` | [release-handoff.md](release-handoff.md) | Perform the push/PR handoff lead-only after an accepted verdict. |
|
|
47
47
|
|
|
48
|
-
## 4.
|
|
48
|
+
## 4. Key code locations
|
|
49
49
|
|
|
50
|
-
|
|
|
50
|
+
| Concern | Source of truth |
|
|
51
51
|
|---|---|
|
|
52
|
-
| okstra-run skill
|
|
52
|
+
| okstra-run skill procedure | [`skills/okstra-run/SKILL.md`](../../skills/okstra-run/SKILL.md) |
|
|
53
53
|
| wizard state machine | [`scripts/okstra_ctl/wizard.py`](../../scripts/okstra_ctl/wizard.py) |
|
|
54
54
|
| wizard prompt text | [`prompts/wizard/prompts.ko.json`](../../prompts/wizard/prompts.ko.json) |
|
|
55
55
|
| render-bundle Node shim | [`src/commands/execute/render-bundle.mjs`](../../src/commands/execute/render-bundle.mjs) |
|
|
56
|
-
|
|
|
57
|
-
| implementation stage
|
|
58
|
-
| Stage Lifecycle Snapshot + stage target/base/verification
|
|
56
|
+
| single entrypoint for bundle creation | [`scripts/okstra_ctl/run.py`](../../scripts/okstra_ctl/run.py) |
|
|
57
|
+
| implementation stage selection/provisioning | [`scripts/okstra_ctl/implementation_stage.py`](../../scripts/okstra_ctl/implementation_stage.py) |
|
|
58
|
+
| Stage Lifecycle Snapshot + stage target/base/verification policy | [`scripts/okstra_ctl/stage_targets.py`](../../scripts/okstra_ctl/stage_targets.py) |
|
|
59
59
|
| phase boundary | [`scripts/okstra_ctl/workflow.py`](../../scripts/okstra_ctl/workflow.py) |
|
|
60
60
|
| task worktree | [`scripts/okstra_ctl/worktree.py`](../../scripts/okstra_ctl/worktree.py) |
|
|
61
61
|
| stage-group handoff | [`scripts/okstra_ctl/handoff.py`](../../scripts/okstra_ctl/handoff.py) |
|
|
@@ -64,13 +64,13 @@ flowchart TD
|
|
|
64
64
|
| phase profiles | [`prompts/profiles/`](../../prompts/profiles/) |
|
|
65
65
|
| final report shape / HTML view | [`templates/reports/final-report.template.md`](../../templates/reports/final-report.template.md), [`scripts/okstra_ctl/report_views.py`](../../scripts/okstra_ctl/report_views.py) |
|
|
66
66
|
|
|
67
|
-
## 5.
|
|
67
|
+
## 5. Quick comparison table
|
|
68
68
|
|
|
69
|
-
| task-type | wizard
|
|
69
|
+
| task-type | wizard special question | runtime prepare gate | lead/worker mode | next phase default |
|
|
70
70
|
|---|---|---|---|---|
|
|
71
|
-
| `requirements-discovery` |
|
|
72
|
-
| `error-analysis` |
|
|
73
|
-
| `implementation-planning` |
|
|
71
|
+
| `requirements-discovery` | common questions only | profile/brief/base-ref exist | multi-worker analysis, convergence 1 round default | `pending-routing-decision` |
|
|
72
|
+
| `error-analysis` | common questions only | profile/brief/base-ref exist | multi-worker analysis, convergence 2 rounds default | `implementation-planning` |
|
|
73
|
+
| `implementation-planning` | common questions only | profile/brief/base-ref exist | multi-worker analysis + Phase 6 plan-body verification | `implementation` |
|
|
74
74
|
| `implementation` | approved plan, stage multi-pick, executor | approved marker, Stage Lifecycle Snapshot, stage-key reservation, QA command deny-list | one run = one stage; executor writes in isolated stage worktree, verifiers read-only | `final-verification` |
|
|
75
|
-
| `final-verification` | approved plan, stage pick(whole-task or single-stage) | `VERIFICATION_TARGET`
|
|
76
|
-
| `release-handoff` | handoff scope(stage-group or whole-task), PR template override/scope | Stage Lifecycle Snapshot eligibility, generated `release-handoff-input.md`, empty worker roster | single-lead; whole-task PR or stage-group collector branch/PR | `done-or-follow-up` |
|
|
75
|
+
| `final-verification` | approved plan, stage pick (whole-task or single-stage) | `VERIFICATION_TARGET` resolved; whole-task auto integration/teardown or single-stage worktree reuse | whole-task may integrate stages first; analyser verification itself is read-only | `pending-release-handoff` |
|
|
76
|
+
| `release-handoff` | handoff scope (stage-group or whole-task), PR template override/scope | Stage Lifecycle Snapshot eligibility, generated `release-handoff-input.md`, empty worker roster | single-lead; whole-task PR or stage-group collector branch/PR | `done-or-follow-up` |
|