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.
Files changed (108) hide show
  1. package/README.md +5 -2
  2. package/docs/architecture/storage-model.md +15 -1
  3. package/docs/architecture.md +45 -7
  4. package/docs/cli.md +47 -5
  5. package/docs/for-ai/README.md +42 -36
  6. package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
  7. package/docs/for-ai/skills/okstra-container-build.md +61 -61
  8. package/docs/for-ai/skills/okstra-graphify.md +64 -0
  9. package/docs/for-ai/skills/okstra-inspect.md +86 -86
  10. package/docs/for-ai/skills/okstra-manager.md +32 -32
  11. package/docs/for-ai/skills/okstra-memory.md +49 -50
  12. package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
  13. package/docs/for-ai/skills/okstra-rollup.md +58 -58
  14. package/docs/for-ai/skills/okstra-run.md +95 -95
  15. package/docs/for-ai/skills/okstra-schedule-gen.md +320 -0
  16. package/docs/for-ai/skills/okstra-setup.md +63 -64
  17. package/docs/for-ai/skills/okstra-user-response.md +48 -0
  18. package/docs/performance-improvement-plan-v2.md +4 -4
  19. package/docs/pr-template-usage.md +34 -34
  20. package/docs/project-structure-overview.md +92 -70
  21. package/docs/task-process/README.md +33 -33
  22. package/docs/task-process/common-flow.md +26 -26
  23. package/docs/task-process/error-analysis.md +20 -21
  24. package/docs/task-process/final-verification.md +41 -41
  25. package/docs/task-process/implementation-planning.md +52 -28
  26. package/docs/task-process/implementation.md +51 -32
  27. package/docs/task-process/release-handoff.md +46 -46
  28. package/docs/task-process/requirements-discovery.md +22 -23
  29. package/package.json +1 -1
  30. package/runtime/BUILD.json +2 -2
  31. package/runtime/agents/workers/antigravity-worker.md +4 -4
  32. package/runtime/agents/workers/claude-worker.md +2 -2
  33. package/runtime/agents/workers/codex-worker.md +4 -4
  34. package/runtime/agents/workers/report-writer-worker.md +4 -4
  35. package/runtime/bin/lib/okstra/usage.sh +3 -3
  36. package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
  37. package/runtime/prompts/launch.template.md +6 -3
  38. package/runtime/prompts/lead/convergence.md +11 -21
  39. package/runtime/prompts/lead/okstra-lead-contract.md +16 -18
  40. package/runtime/prompts/lead/plan-body-verification.md +47 -18
  41. package/runtime/prompts/lead/report-writer.md +50 -45
  42. package/runtime/prompts/lead/team-contract.md +11 -122
  43. package/runtime/prompts/profiles/_common-contract.md +15 -22
  44. package/runtime/prompts/profiles/_implementation-deliverable.md +4 -2
  45. package/runtime/prompts/profiles/_implementation-executor.md +6 -1
  46. package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
  47. package/runtime/prompts/profiles/error-analysis.md +2 -2
  48. package/runtime/prompts/profiles/final-verification.md +3 -1
  49. package/runtime/prompts/profiles/implementation-planning.md +24 -14
  50. package/runtime/prompts/profiles/implementation.md +1 -1
  51. package/runtime/prompts/profiles/improvement-discovery.md +1 -1
  52. package/runtime/prompts/profiles/release-handoff.md +3 -3
  53. package/runtime/prompts/profiles/requirements-discovery.md +18 -18
  54. package/runtime/prompts/wizard/prompts.ko.json +44 -0
  55. package/runtime/python/okstra_ctl/codex_dispatch.py +23 -1
  56. package/runtime/python/okstra_ctl/design_prep.py +1462 -0
  57. package/runtime/python/okstra_ctl/design_surfaces.py +243 -0
  58. package/runtime/python/okstra_ctl/final_report_schema.py +33 -1
  59. package/runtime/python/okstra_ctl/implementation_stage.py +35 -0
  60. package/runtime/python/okstra_ctl/incremental_carry.py +294 -21
  61. package/runtime/python/okstra_ctl/incremental_scope.py +51 -5
  62. package/runtime/python/okstra_ctl/material.py +1 -1
  63. package/runtime/python/okstra_ctl/model_discovery.py +98 -0
  64. package/runtime/python/okstra_ctl/models.py +8 -3
  65. package/runtime/python/okstra_ctl/render.py +5 -0
  66. package/runtime/python/okstra_ctl/run.py +53 -5
  67. package/runtime/python/okstra_ctl/user_response.py +67 -2
  68. package/runtime/python/okstra_ctl/wizard.py +283 -3
  69. package/runtime/python/okstra_token_usage/report.py +11 -0
  70. package/runtime/schemas/final-report-v1.0.schema.json +336 -0
  71. package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
  72. package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
  73. package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
  74. package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
  75. package/runtime/skills/okstra-container-build/SKILL.md +24 -14
  76. package/runtime/skills/okstra-graphify/SKILL.md +12 -4
  77. package/runtime/skills/okstra-inspect/SKILL.md +105 -99
  78. package/runtime/skills/okstra-manager/SKILL.md +1 -1
  79. package/runtime/skills/okstra-memory/SKILL.md +3 -3
  80. package/runtime/skills/okstra-rollup/SKILL.md +12 -6
  81. package/runtime/skills/okstra-run/SKILL.md +49 -88
  82. package/runtime/skills/{okstra-schedule → okstra-schedule-gen}/SKILL.md +38 -32
  83. package/runtime/skills/okstra-setup/SKILL.md +1 -1
  84. package/runtime/skills/okstra-setup/references/project-config.md +17 -16
  85. package/runtime/skills/okstra-usage/SKILL.md +5 -2
  86. package/runtime/skills/okstra-user-response/SKILL.md +23 -9
  87. package/runtime/templates/prd/brief.template.md +92 -92
  88. package/runtime/templates/reports/error-analysis-input.template.md +1 -1
  89. package/runtime/templates/reports/fan-out-unit.template.md +6 -6
  90. package/runtime/templates/reports/final-report.template.md +67 -0
  91. package/runtime/templates/reports/final-verification-input.template.md +6 -6
  92. package/runtime/templates/reports/i18n/en.json +31 -0
  93. package/runtime/templates/reports/i18n/ko.json +31 -0
  94. package/runtime/templates/reports/implementation-input.template.md +1 -1
  95. package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
  96. package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
  97. package/runtime/templates/reports/quick-input.template.md +1 -1
  98. package/runtime/templates/reports/release-handoff-input.template.md +1 -1
  99. package/runtime/templates/reports/schedule.template.md +22 -22
  100. package/runtime/templates/reports/task-brief.template.md +3 -3
  101. package/runtime/templates/reports/user-response.template.md +20 -20
  102. package/runtime/templates/worker-prompt-preamble.md +111 -13
  103. package/runtime/validators/validate-run.py +426 -5
  104. package/runtime/validators/validate-schedule.py +5 -5
  105. package/src/cli-registry.mjs +7 -0
  106. package/src/commands/inspect/design-prep.mjs +23 -0
  107. package/src/lib/skill-catalog.mjs +2 -1
  108. package/docs/for-ai/skills/okstra-schedule.md +0 -320
@@ -0,0 +1,64 @@
1
+ # okstra-graphify AI Manual
2
+
3
+ ## Sources
4
+
5
+ - Skill source: [`skills/okstra-graphify/SKILL.md`](../../../skills/okstra-graphify/SKILL.md)
6
+ - Graph core (CLI): [`scripts/okstra_ctl/graphify_cmd.py`](../../../scripts/okstra_ctl/graphify_cmd.py)
7
+ - Node wrapper: [`src/commands/graphify.mjs`](../../../src/commands/graphify.mjs)
8
+
9
+ ## Purpose
10
+
11
+ `okstra-graphify` builds and queries a **knowledge graph** over the project's own okstra memory (the final reports, `decisions/*.md`, `glossary.md`, and briefs under `<projectRoot>/.okstra`). The corpus is **fixed** to `.okstra` and the outputs land at `<projectRoot>/.okstra/graph/` — the CLI enforces both, so this skill takes no user path argument and never touches files outside `.okstra/`.
12
+
13
+ - Docs-only. There is no code AST extraction here (that is the standalone `/graphify`).
14
+ - Distinguish it from the arbitrary-code / non-okstra folder graph (`/graphify`), single-task inspection (`okstra-inspect`), and rollup (`okstra-rollup`).
15
+
16
+ ## Sub-commands
17
+
18
+ | Sub-command | What it does |
19
+ |---|---|
20
+ | `build` | Extract entities/relationships from `.okstra` docs (parallel subagent dispatch), then assemble the graph + report + HTML |
21
+ | `query` | BFS/DFS traversal over the graph to answer a broad question |
22
+ | `path` | Shortest path between two named concepts |
23
+ | `explain` | Plain-language explanation of one node and its connections |
24
+ | `wiki` | Agent-crawlable wiki (`index.md` + one article per community) |
25
+ | `mcp` | A stdio MCP server exposing the graph to other agents (opt-in — additionally needs `pip install mcp`) |
26
+
27
+ ## Preflight
28
+
29
+ A single Bash call starting with the literal token `okstra` (not wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=`/`||`/`&&`/`npx`):
30
+
31
+ ```bash
32
+ okstra preflight --runtime claude-code --json
33
+ ```
34
+
35
+ `ok:true` → carry `projectRoot` as a literal string. Every `okstra graphify` call passes `--project-root <projectRoot>` (**REQUIRED**, no cwd injection — a bare `okstra graphify build` is a usage error). `ok:false` → first check once whether the user pointed at a specific project directory; if it is still `ok:false`, point to `/okstra-setup` and stop. On `unknown command: preflight`, the `okstra` on PATH is older than the skill — point to `npm i -g okstra@latest` and stop.
36
+
37
+ ## build (the core division of labor)
38
+
39
+ Two parts: **semantic extraction** (subagents read `.okstra` docs and write chunk JSON) → **assemble** (the CLI does clustering and output generation).
40
+
41
+ 1. Detect the corpus: `find <projectRoot>/.okstra -type f -name '*.md' -not -path '*/graph/*'`. If zero, stop.
42
+ 2. Semantic extraction: **you MUST use the Agent tool** (reading files one-by-one is forbidden — far slower). Split into chunks of 20-25 files and **dispatch in parallel, once per chunk in a single response**, with `subagent_type="general-purpose"` fixed (`Explore` is read-only, cannot write chunk files, and silently drops results). Each subagent writes `<projectRoot>/.okstra/graph/.chunks/chunk-NN.json`. It MUST fill in EXTRACTED/INFERRED/AMBIGUOUS + `confidence_score`.
43
+ 3. Assemble: `okstra graphify build --project-root <projectRoot>` — merges `graph/.chunks/*.json` and writes `graph.json`, `GRAPH_REPORT.md`, `graph.html`. On a `no extraction chunks` error, the subagents did not write their files — re-dispatch.
44
+
45
+ After a successful build, paste **only** the God Nodes / Surprising Connections / Suggested Questions sections of `GRAPH_REPORT.md` (not the whole file), then offer to trace the single most interesting question via `query`.
46
+
47
+ ## query / path / explain / wiki / mcp
48
+
49
+ ```bash
50
+ okstra graphify query "<question>" --project-root <projectRoot>
51
+ okstra graphify path "<ConceptA>" "<ConceptB>" --project-root <projectRoot>
52
+ okstra graphify explain "<NodeName>" --project-root <projectRoot>
53
+ okstra graphify wiki --project-root <projectRoot>
54
+ okstra graphify mcp --project-root <projectRoot>
55
+ ```
56
+
57
+ `query`/`path`/`explain`/`wiki`/`mcp` **require a built graph** — if the CLI says none exists, run `build` first. `mcp` additionally needs `pip install mcp` and is long-running (the user stops it with Ctrl+C). After doc changes, re-run `build` to re-extract.
58
+
59
+ ## Output Rules
60
+
61
+ - Be concise, in Korean, unless the user requests otherwise.
62
+ - Outputs go under `<projectRoot>/.okstra/graph/`, in project-relative paths where possible.
63
+ - **Never invent an edge** — if unsure, it is AMBIGUOUS. Never hide cohesion/confidence scores.
64
+ - Say plainly when a fact is not in the graph. Quote `source_file`/`source_location`.
@@ -1,81 +1,81 @@
1
1
  # okstra-inspect AI Manual
2
2
 
3
- ## 원천
3
+ ## Source
4
4
 
5
- - 스킬 원문: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
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는 별도 스킬: [`okstra-container-build.md`](okstra-container-build.md)
11
+ - container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
12
12
 
13
- ## 목적
13
+ ## Purpose
14
14
 
15
- `okstra-inspect`는 okstra read-side 작업의 단일 진입점이다. 대부분은 읽기 전용이지만 두 예외가 있다.
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`: 사용자가 요청한 `workStatus`를 `task-manifest.json`에 기록한다.
18
- - `errors`, `error-zip`, `recap record`: 읽은 정보를 바탕으로 report/zip/log 산출물을 만든다.
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 상태 확인, workStatus 변경 | `status.4`에서 manifest 수정 |
25
- | `history` | 과거 run 목록, rerun/resume command 조립 | 기본 읽기 |
26
- | `report` | final-report 경로 해석 및 선택적 읽기 | 읽기 |
27
- | `time` | task type/worker별 소요 시간 집계 | 읽기 |
28
- | `logs` | wrapper `.log` sidecar inventory와 cleanup command 제안 | 읽기 |
29
- | `cost` | task bundle context/read cost 추정 | 읽기 |
30
- | `errors` | task error logs를 timestamped markdown report로 집계 | report 생성 |
31
- | `error-zip` | cross-project error logs 익명화 zip 생성 | zip 생성 |
32
- | `recap` | task run 전후 요약과 Q&A 기록 | `recap-log.jsonl` append |
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
- 모든 sub-command 전에 한 번만 실행한다.
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
- 프로젝트 확인은 Bash 호출의 cwd만 본다. cwd가 아닌 프로젝트(형제 repo·monorepo 하위·요청에 명시된 프로젝트)에서 `ok:false`는 setup 부재가 아니라 false negative다 — 바로 멈추지 말고 `okstra preflight --runtime claude-code --cwd <that-dir> --json`으로 재시도한다(`--cwd`는 leading `cd` 없이 프로젝트를 지정하는 sanctioned 방식). 그것도 `ok:false`일 때만 `/okstra-setup` 안내 후 멈춘다. 이후 `projectRoot`를 literal 값으로 사용하고, 이를 받는 sub-command CLI(`recap`, `context-cost` 등)에는 `--cwd`/`--project-root <projectRoot>`로 전달한다.
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
- 사용자 요청을 하나 이상의 facet으로 분류한다. 애매하면 sub-command 표 전체를 보여주고 번호/이름으로 선택하게 한다. AskUserQuestion option 제한 때문에 facet을 숨기지 않는다.
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
- 여러 facet이 한 메시지에 있으면 순차 실행한다. Step 0은 한 번만 실행한다.
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
- 많은 facet은 다음 target 형식을 받는다.
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는 shared resolver를 사용한다.
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개: 해당 `taskKey` 사용.
68
- - N개: 후보 `taskKey`와 `updatedAt`를 보여주고 disambiguation을 받는다.
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`을 읽는다. overview에서는 개별 manifest를 다시 열지 않는다. catalog가 projected source다.
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
- 정렬: `updatedAt` desc, `taskKey`.
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` 또는 `routingStatus == "pending"`이면 Next cell에 marker를 붙이고 설명한다.
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 하나의 detail은 catalog를 먼저 보고, 필요하면 `.okstra/tasks/<group>/<id>/task-manifest.json`, `history/timeline.json`, latest run manifest를 읽는다.
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
- 절차: `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --json` 단일 호출로 갱신한다 — manifest 를 손으로 편집하지 않는다. `stage:"ambiguous"` 면 `matches[]` 로 되묻고, `stage:"not-found"` 면 못 찾았다고 답한다.
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
- 읽기 표시에서 `workStatus`가 없으면 lifecycle state로 추론하되, 읽기만으로 back-fill하지 않는다.
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
- 첫 분기: re-run과 resume을 구분한다.
123
+ First branch: distinguish re-run from resume.
124
124
 
125
- - Re-run: 이전 run parameters로 새 run을 만든다. 새 run-seq가 생긴다.
126
- - Resume: 중단된 기존 run을 이어간다. 새 run-seq를 만들지 않는다.
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가 없으면 `.okstra/tasks/*/*/task-manifest.json` glob으로 fallback한다. disk manifest가 source of truth다.
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은 source run-manifest에서 `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, relatedTasks, model overrides 등을 뽑아 command를 조립한다. `implementation`의 `--base-ref`는 run-manifest에 없고 worktree registry에 있으므로 상황에 따라 묻는다.
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은 `latestResumeCommandPath` 또는 timeline entry의 `resumeCommandPath`를 확인하고 파일이 있으면 `bash <resume-command-path>`를 안내/실행한다. 경로가 비었거나 파일이 없으면 "resume 없음"으로 선언하고 history.3(re-run)을 안내한다.
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`의 `latestReportPath`
139
- 2. direct `task-manifest.json`의 `latestReportPath`
140
- 3. `history/timeline.json`의 특정 run `reportPath`
141
- 4. 특정 task-type fallback: `runs/<task-type>/reports/final-report-*.md`, stage-isolated path 포함
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
- 읽기 깊이를 요청에 맞춘다(final report는 300+줄/50K+ 토큰). 요약/결론/통과 여부 질문("요약", "핵심만", "결론", "통과했어?")은 전체를 읽지 말고 `runs/<task-type-segment>/status/final-<task-type-segment>-<NNN>.status`(stage-isolated: `runs/<task-type-segment>/stage-<N>/status/`) sidecar의 판정 + report 선두 요약 블록만 읽는다. "전체/다 읽어/본문"일 때만 전체 ingest한다. 완료 signal은 있는데 file이 없으면 missing report로 말하고, 아직 완료되지 않았으면 current status와 workStatus를 보여준다.
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
- 시간 계산은 CLI가 한다. AI가 duration을 직접 recompute하지 않는다.
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
- 모든 `*Ms`는 `HH:MM:SS`로 변환해 보여준다. `CPU sum`은 lead와 workers 시간을 합친 overlapping cost이며 wall-clock이 아니다. wall-clock은 사용자가 명시적으로 물을 때만 `perRunWallClock`에서 보여준다. `단계별`/`stage별`/`어느 단계가 오래`는 task-type 뷰(By task type 표)가 기본 답이다 — '측정 불가'로 처리하지 않는다. intra-run `phaseTimelines`는 'Phase 1~7'·'어느 phase가' 같은 명시적 요청일 때만 렌더하고, 비어 있으면 헤드라인이 아니라 각주로만 언급한다.
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[]`은 totals에 합치지 않고 별도 note로 표시한다.
155
+ `unavailable[]` is not summed into totals; show it as a separate note.
156
156
 
157
157
  ## cost
158
158
 
159
- context/read cost는 CLI output이 source of truth다.
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는 heuristic이지 billing 수치가 아니다.
168
- - `leadPhase1.mode == "active-run-context"`면 compact lead intake가 primary다.
169
- - `analysisWorker.mode == "analysis-packet-primary"`면 worker는 analysis-packet을 먼저 읽고 필요할 때 full source를 연다.
170
- - `skillAssets`가 크면 prompt diet 대상이다.
171
- - legacy timestamp artifacts가 많으면 destructive delete가 아니라 current-view/cold-artifact 분리를 제안한다.
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`를 스캔한다. 삭제하지 않는다. cleanup command는 dry-run과 `-delete` pair를 fenced bash로 제시할 뿐이다.
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의 log를 지우면 live trace를 잃으므로 먼저 `status` 확인을 권한다.
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를 markdown report로 집계한다.
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
- stdout JSON에서 `reportPath`, totals, byPhase, byAgent, parseSkipped를 읽어 요약한다. `reportPath`가 없고 errorCount가 0이면 기록된 error log가 없다고 말한다. `parseSkipped > 0`은 숨기지 않는다.
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
- 머신 내 cross-project okstra errors를 익명화 zip으로 묶는다.
197
+ Bundle the machine's cross-project okstra errors into an anonymized zip.
198
198
 
199
- 출력 경로는 `~/.okstra/error-zip.json`의 `lastOutputPath`를 우선 추천하고, 없으면 `~/okstra-error-feedback-<YYYY-MM-DD>.zip`을 제안한다.
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
- 마지막에 `/okstra-brief-gen`의 error-feedback variant로 brief를 만든 뒤 okstra repo에서 `error-analysis`를 실행하라고 안내한다.
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
- 기본은 artifact mode다. `.okstra/` 산출물만 근거로 전후 요약과 질문 답변을 만든다.
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는 사용자가 "diff까지", "코드 변경까지"처럼 명시적으로 요청할 때만 진입한다. recap 진입만으로 code diff를 읽지 않는다.
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 path를 우선 표시한다.
240
- - disk field 값은 normalize하지 않고 그대로 보여준다.
241
- - approval 대기 상태는 명확히 표시한다.
242
- - 최신 report가 없으면 `--`로 표시한다.
243
- - 날짜는 `YYYY-MM-DD HH:MM`로 표시한다.
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가 없다고 바로 실패하기. manifest fallback이 있다.
248
- - `workStatus`와 `currentStatus`를 혼동하기.
249
- - time duration을 CLI 없이 손계산하기.
250
- - cleanup command를 직접 실행하기.
251
- - `errors`/`cost`/`time`에서 CLI output 대신 raw files를 임의로 재해석하기.
252
- - recap artifact mode에서 코드 변경까지 자동으로 읽기.
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
- 여러 프로젝트에 걸친 okstra task 를 하나의 manager-owned context 로 묶을 때 사용한다. 원문 계약은 [`skills/okstra-manager/SKILL.md`](../../../skills/okstra-manager/SKILL.md), CLI 구현은 [`src/commands/manager.mjs`](../../../src/commands/manager.mjs) 와 [`scripts/okstra_ctl/manager_cli.py`](../../../scripts/okstra_ctl/manager_cli.py) 이다.
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
- - 사용자가 "여러 프로젝트", "cross-project", "okstra manager", "프로젝트 묶어서" 같은 의도를 말한다.
8
- - manager 아래에 프로젝트를 등록하거나 후보 프로젝트를 찾는다.
9
- - 공통 task-group/task-id 아래 child project task 를 계획하고 역할/지시를 배정한다.
10
- - child project `.okstra` 상태를 manager snapshot 으로 동기화하거나 status 를 본다.
11
- - 특정 child task 실행을 위한 launch packet 과 manager child context 를 준비한다.
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. 모든 명령은 literal `okstra` 로 시작한다. 셸 변수, `$(...)`, `&&`, `eval`, 선행 env assignment 로 감싸지 않는다.
16
- 2. JSON stdout 이 source of truth 다. manager 상태나 child launch args 를 문서/메모리에서 재구성하지 않는다.
17
- 3. `--workspace-root` 는 Node wrapper 가 소유한다. 사용자가 넘기면 CLI 가 거부한다.
18
- 4. `new project` 의 `--project-root` 는 이미 존재하는 디렉터리여야 한다. 그 안의 `.okstra/project.json` 이 없을 때만 setup-equivalent registration 을 수행한다.
19
- 5. public child task identity 는 `project-id:task-group:task-id` 이다. `new task --task` 예시는 full key form 을 우선 보여준다.
20
- 6. 같은 manager task id 아래 실제 child task id 가 다르면 `task assign` 과 `task run` 에 `--child-task-id <id>` 를 같이 넘긴다.
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 는 `~/.okstra/managers/<manager-id>/` 아래에 저장되며, manager 루트와 task 디렉터리 두 계층으로 나뉜다.
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`: 등록된 projectId, projectRoot, role, tags
44
+ - `projects.json`: registered projectId, projectRoot, role, tags
45
45
 
46
- task 디렉터리 `task-groups/<safe-group>/<safe-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` 가 project-local `.okstra` 에서 읽어온 read-side snapshot
52
- - `events.jsonl`: `task-created`, `child-launch-prepared` 같은 manager event
53
- - `child-context/<safe-project>-<safe-task>.md`: `task run` 이 만든 child lead context
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
- 비 ASCII task-group/task-id 처럼 slug 가 비는 segment 는 `u-<sha1-prefix>` path segment 를 사용하지만, manifest 와 child `taskKey` 는 원래 입력값을 보존한다.
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` 은 child 작업을 직접 실행하지 않고 launch packet 을 준비한다. 반환 packet 의 핵심 필드는:
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 의 `project-id:task-group:task-id` (child 식별 공개 키 — `child-launch-prepared` event 에도 기록)
62
- - `backend`: `$TMUX` 가 있으면 `tmux-child-lead`, 없으면 `subagent-child-lead`
63
- - `workerDispatchBackend`: v1 에서는 항상 `subagent`
64
- - `projectRoot`: child project root
65
- - `contextPath`: manager child context markdown
66
- - `runArgs`: host launcher 가 사용할 `okstra run ... --directive "Read manager child context: ..."` 인자
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 생성이 성공하면 `children.json` 의 해당 child launch 상태가 `prepared` 로 갱신되고, `events.jsonl` 에 `child-launch-prepared` 가 append 된다. 실패해도 project-local task state 는 수정하지 않는다.
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.