okstra 0.123.0 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -0
  2. package/docs/architecture/storage-model.md +1 -1
  3. package/docs/architecture.md +11 -1
  4. package/docs/cli.md +2 -0
  5. package/docs/for-ai/README.md +41 -35
  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 +106 -106
  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 +91 -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 +33 -33
  26. package/docs/task-process/implementation.md +38 -38
  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/prompts/coding-preflight/frameworks/node-server.md +1 -1
  36. package/runtime/prompts/launch.template.md +1 -1
  37. package/runtime/prompts/lead/convergence.md +10 -20
  38. package/runtime/prompts/lead/okstra-lead-contract.md +14 -16
  39. package/runtime/prompts/lead/plan-body-verification.md +18 -18
  40. package/runtime/prompts/lead/report-writer.md +43 -44
  41. package/runtime/prompts/lead/team-contract.md +11 -122
  42. package/runtime/prompts/profiles/_common-contract.md +15 -22
  43. package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
  44. package/runtime/prompts/profiles/_implementation-executor.md +1 -1
  45. package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
  46. package/runtime/prompts/profiles/error-analysis.md +2 -2
  47. package/runtime/prompts/profiles/final-verification.md +1 -1
  48. package/runtime/prompts/profiles/implementation-planning.md +13 -13
  49. package/runtime/prompts/profiles/implementation.md +1 -1
  50. package/runtime/prompts/profiles/improvement-discovery.md +1 -1
  51. package/runtime/prompts/profiles/release-handoff.md +3 -3
  52. package/runtime/prompts/profiles/requirements-discovery.md +18 -18
  53. package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
  54. package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
  55. package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
  56. package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
  57. package/runtime/skills/okstra-container-build/SKILL.md +24 -14
  58. package/runtime/skills/okstra-graphify/SKILL.md +12 -4
  59. package/runtime/skills/okstra-inspect/SKILL.md +104 -98
  60. package/runtime/skills/okstra-manager/SKILL.md +1 -1
  61. package/runtime/skills/okstra-memory/SKILL.md +3 -3
  62. package/runtime/skills/okstra-rollup/SKILL.md +12 -6
  63. package/runtime/skills/okstra-run/SKILL.md +49 -88
  64. package/runtime/skills/okstra-schedule-gen/SKILL.md +36 -30
  65. package/runtime/skills/okstra-setup/SKILL.md +1 -1
  66. package/runtime/skills/okstra-setup/references/project-config.md +17 -16
  67. package/runtime/skills/okstra-usage/SKILL.md +5 -2
  68. package/runtime/skills/okstra-user-response/SKILL.md +15 -3
  69. package/runtime/templates/prd/brief.template.md +92 -92
  70. package/runtime/templates/reports/error-analysis-input.template.md +1 -1
  71. package/runtime/templates/reports/fan-out-unit.template.md +6 -6
  72. package/runtime/templates/reports/final-verification-input.template.md +6 -6
  73. package/runtime/templates/reports/implementation-input.template.md +1 -1
  74. package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
  75. package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
  76. package/runtime/templates/reports/quick-input.template.md +1 -1
  77. package/runtime/templates/reports/release-handoff-input.template.md +1 -1
  78. package/runtime/templates/reports/schedule.template.md +22 -22
  79. package/runtime/templates/reports/task-brief.template.md +3 -3
  80. package/runtime/templates/reports/user-response.template.md +20 -20
  81. package/runtime/templates/worker-prompt-preamble.md +111 -13
  82. package/runtime/validators/validate-schedule.py +1 -1
@@ -1,89 +1,89 @@
1
1
  # okstra-container-build AI Manual
2
2
 
3
- ## 원천
3
+ ## Source
4
4
 
5
- - 스킬 원문: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
5
+ - Skill source: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
6
6
  - container CLI wrapper: [`src/commands/inspect/container.mjs`](../../../src/commands/inspect/container.mjs)
7
7
  - container runtime: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
8
8
  - container registry: [`scripts/okstra_ctl/container_registry.py`](../../../scripts/okstra_ctl/container_registry.py)
9
9
  - stage integration gate: [`scripts/okstra_ctl/stage_targets.py`](../../../scripts/okstra_ctl/stage_targets.py)
10
10
 
11
- ## 목적
11
+ ## Purpose
12
12
 
13
- `okstra-container-build`는 implementation task worktree의 `docker-compose.yml`을 이용해 사용자 테스트용 container group을 관리한다. okstra는 compose group에 task/run trace label을 붙이고, tmux watcher pane으로 로그/상태를 관찰한다.
13
+ `okstra-container-build` manages a user-test container group using the `docker-compose.yml` in an implementation task worktree. okstra labels the compose group with the task/run trace and observes logs/status through a tmux watcher pane.
14
14
 
15
15
  ## sub-command
16
16
 
17
- | Sub-command | 역할 | side effect |
17
+ | Sub-command | Role | side effect |
18
18
  |---|---|---|
19
- | `up` | implementation stages를 task worktree에 통합하고 `docker compose up -d`, healthcheck poll, watcher pane attach | container 생성/시작, watcher pane 생성 |
20
- | `status` | label query 기반 running container와 watcher metadata 확인 | 읽기 |
21
- | `logs` | watcher findings dir와 watcher entries 안내 | 읽기 |
22
- | `stop-watcher` | watcher/tail tmux panes만 회수 | container 유지, pane 제거 |
23
- | `down` | label query로 container group 제거, orphan watcher panes 회수 | container 종료/제거 |
19
+ | `up` | Integrate the implementation stages into the task worktree, then `docker compose up -d`, poll healthchecks, attach the watcher pane | create/start containers, create watcher pane |
20
+ | `status` | Check running containers (by label query) plus watcher metadata | read |
21
+ | `logs` | Point at the watcher findings dir and watcher entries | read |
22
+ | `stop-watcher` | Reap the watcher/tail tmux panes only | keep containers, remove panes |
23
+ | `down` | Remove the container group by label query, reap orphan watcher panes | stop/remove containers |
24
24
 
25
25
  ## Preflight
26
26
 
27
- 단일 호출:
27
+ Single call:
28
28
 
29
29
  ```bash
30
30
  okstra preflight --runtime claude-code --json
31
31
  ```
32
32
 
33
- project setup이 없으면 `/okstra-setup` 안내 후 멈춘다. Docker daemon이 필요하다. Docker connection error가 나오면 Docker Desktop/daemon을 시작하라고 안내하고, 직접 Docker를 시작하지 않는다.
33
+ If the project is not set up, point to `/okstra-setup` and stop. A Docker daemon is required. On a Docker connection error, tell the user to start Docker Desktop/daemon; do not start Docker yourself.
34
34
 
35
- ## task-key 해석
35
+ ## task-key resolution
36
36
 
37
- 대부분 sub-command는 full task-key가 필요하다.
37
+ Most sub-commands need a full task-key.
38
38
 
39
- 1. full task-key가 있으면 그대로 사용.
40
- 2. bare task-id는 resolver 사용:
39
+ 1. If a full task-key is given, use it as-is.
40
+ 2. For a bare task-id, use the resolver:
41
41
 
42
42
  ```bash
43
43
  okstra resolve-task-key <task-id> --project-root <projectRoot> --json
44
44
  ```
45
45
 
46
- 3. multiple match면 후보를 보여주고 선택 받는다.
47
- 4. `down --all`만 task-key 없이 실행할 수 있다.
46
+ 3. On multiple matches, show the candidates and let the user pick.
47
+ 4. Only `down --all` can run without a task-key.
48
48
 
49
49
  ## intent routing
50
50
 
51
- 명확한 동사:
51
+ Clear verbs:
52
52
 
53
- - "띄워", "올려", "up": `up`
54
- - "상태", "status": `status`
55
- - "로그", "logs": `logs`
56
- - "watcher 멈춰", "stop-watcher": `stop-watcher`
57
- - "내려", "down", "종료": `down`
53
+ - "bring up/deploy", "up": `up`
54
+ - "status": `status`
55
+ - "logs": `logs`
56
+ - "stop watcher", "stop-watcher": `stop-watcher`
57
+ - "tear down", "down": `down`
58
58
 
59
- 애매하면 full facet list를 보여주고 직접 입력 option을 둔다. 여러 facet이 한 메시지에 있으면 Step 0은 한 번만 실행하고 sub-command를 순차 실행한다.
59
+ If ambiguous, show the full facet list and offer an Enter directly option. When multiple facets are in one message, run Step 0 once and execute the sub-commands sequentially.
60
60
 
61
61
  ## up
62
62
 
63
- 실행:
63
+ Run:
64
64
 
65
65
  ```bash
66
66
  okstra container up --project-root <projectRoot> --task-key <task-key>
67
67
  ```
68
68
 
69
- 전제:
69
+ Preconditions:
70
70
 
71
- - task는 implementation worktree가 registry에 있어야 한다.
72
- - worktree root에 `docker-compose.yml`이 있어야 한다.
73
- - approved plan의 모든 stage가 `done`이어야 한다. partial stage 상태를 완성 task처럼 deploy하지 않는다.
71
+ - The task must have an implementation worktree registered in the registry.
72
+ - The worktree root must contain a `docker-compose.yml`.
73
+ - Every stage of the approved plan must be `done`. Do not deploy a partial-stage state as if it were a complete task.
74
74
 
75
- 실패 메시지 처리:
75
+ Handling failure messages:
76
76
 
77
- - registry에 task worktree가 없다는 메시지: implementation phase를 먼저 실행하라고 말한다.
78
- - compose file 없음: CLI 메시지를 그대로 보여준다.
79
- - `final-verification(whole-task): stage N not done`: 해당 stage를 implementation으로 끝내야 한다고 말한다.
80
- - healthcheck 실패: failing service와 CLI가 제공한 `docker compose ... logs` line을 그대로 전달한다.
77
+ - Message that the task worktree is not in the registry: tell the user to run the implementation phase first.
78
+ - No compose file: show the CLI message verbatim.
79
+ - `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
80
+ - healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
81
81
 
82
- 성공하면 stdout JSON을 파싱해 services, watcher pane, published ports를 요약한다. 이후 관리는 `okstra container status <task-key>`와 `down <task-key>`로 한다고 안내한다. 띄운 뒤 *무엇을 확인할지*는 implementation 리포트의 §5.7.9 Manual User Test (Draft)를 가리킨다 — 그 단계와 기대 결과가 이 빌드의 수동 테스트 스크립트다.
82
+ On success, parse the stdout JSON and summarize services, watcher pane, and published ports. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
83
83
 
84
84
  ## status
85
85
 
86
- 실행:
86
+ Run:
87
87
 
88
88
  ```bash
89
89
  okstra container status --project-root <projectRoot> --task-key <task-key>
@@ -92,14 +92,14 @@ okstra container status --project-root <projectRoot> --task-key <task-key>
92
92
  stdout JSON:
93
93
 
94
94
  - `projectName`: compose project name
95
- - `containers`: run-trace label로 찾은 running containers
96
- - `watchers`: registry의 watcher metadata
95
+ - `containers`: running containers found by run-trace label
96
+ - `watchers`: watcher metadata from the registry
97
97
 
98
- alive 여부는 `containers` label query가 authoritative다. watcher registry는 lag할 수 있다. `containers`가 비어 있으면 group이 실행 중이 아니라고 말하고 `up`을 제안한다.
98
+ The `containers` label query is authoritative for whether it is alive. The watcher registry can lag. If `containers` is empty, say the group is not running and offer `up`.
99
99
 
100
100
  ## logs
101
101
 
102
- 실행:
102
+ Run:
103
103
 
104
104
  ```bash
105
105
  okstra container logs --project-root <projectRoot> --task-key <task-key>
@@ -111,49 +111,49 @@ service scope:
111
111
  okstra container logs --project-root <projectRoot> --task-key <task-key> --service <service>
112
112
  ```
113
113
 
114
- stdout JSON의 `watchersDir`, `watchers`를 보여준다. live stream은 file이 아니라 tmux watcher pane에 있다. raw compose logs가 필요하면 `status`에서 `projectName`을 확인한 뒤 사용자가 `docker compose -p <projectName> logs -f <service>`를 실행할 수 있다고 안내한다.
114
+ Show the stdout JSON's `watchersDir` and `watchers`. The live stream is in the tmux watcher pane, not a file. If raw compose logs are needed, get `projectName` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
115
115
 
116
116
  ## stop-watcher
117
117
 
118
- 실행:
118
+ Run:
119
119
 
120
120
  ```bash
121
121
  okstra container stop-watcher --project-root <projectRoot> --task-key <task-key>
122
122
  ```
123
123
 
124
- watcher/tail panes만 제거하고 containers는 유지한다. stdout JSON의 `reapedPanes`, `note`를 요약한다. 사용자가 containers까지 내리려는 의도면 `down`으로 라우팅한다.
124
+ Remove only the watcher/tail panes and keep the containers. Summarize the stdout JSON's `reapedPanes` and `note`. If the user actually intends to bring the containers down, route to `down`.
125
125
 
126
126
  ## down
127
127
 
128
- 단일 task:
128
+ Single task:
129
129
 
130
130
  ```bash
131
131
  okstra container down --project-root <projectRoot> --task-key <task-key>
132
132
  ```
133
133
 
134
- 프로젝트 전체:
134
+ Whole project:
135
135
 
136
136
  ```bash
137
137
  okstra container down --project-root <projectRoot> --all
138
138
  ```
139
139
 
140
- 단일 task down은 task-key 해석 후 실행해도 된다. `--all`은 프로젝트의 모든 okstra container group을 내리므로 실행 전 사용자 확인을 받는다.
140
+ A single-task down is fine to run after resolving the task-key. `--all` takes down every okstra container group in the project, so confirm with the user before running it.
141
141
 
142
- stdout JSON의 `downed`, `orphanPanesReaped`를 보고한다. 각 `projectName`과 회수된 panes를 표시한다.
142
+ Report the stdout JSON's `downed` and `orphanPanesReaped`. Show each `projectName` and the reaped panes.
143
143
 
144
- ## 출력 규칙
144
+ ## Output rules
145
145
 
146
- - stdout JSON이 source of truth다.
147
- - raw `docker` 명령으로 second-guess하지 않는다. CLI가 실패했고 사용자가 manual fallback을 요청한 경우만 예외다.
148
- - resolved task-key를 heading이나 첫 줄에 표시한다.
149
- - CLI failure message는 remediation line을 포함해 그대로 보여준다.
150
- - container/service state는 JSON 값을 normalize하지 않고 보여준다.
146
+ - The stdout JSON is the source of truth.
147
+ - Do not second-guess it with raw `docker` commands. The only exception is when the CLI failed and the user asked for a manual fallback.
148
+ - Show the resolved task-key in the heading or on the first line.
149
+ - Show CLI failure messages verbatim, including the remediation line.
150
+ - Show container/service state as the JSON values, without normalizing.
151
151
 
152
- ## 금지 패턴
152
+ ## Forbidden patterns
153
153
 
154
- - Docker daemon을 직접 시작하려고 하기.
155
- - `up` 실패 원인을 추측해서 compose를 수정하기.
156
- - partial stage task를 deploy 가능한 것으로 포장하기.
157
- - watcher registry만 보고 container alive라고 판단하기.
158
- - `down --all`을 사용자 확인 없이 실행하기.
159
- - raw docker query로 CLI 결과를 임의로 덮어쓰기.
154
+ - Trying to start the Docker daemon yourself.
155
+ - Guessing the cause of an `up` failure and editing the compose file.
156
+ - Dressing up a partial-stage task as deployable.
157
+ - Judging a container as alive from the watcher registry alone.
158
+ - Running `down --all` without user confirmation.
159
+ - Overriding the CLI result arbitrarily with a raw docker query.
@@ -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`.