okstra 0.123.0 → 0.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/docs/architecture/storage-model.md +1 -1
- package/docs/architecture.md +11 -1
- package/docs/cli.md +2 -0
- package/docs/for-ai/README.md +41 -35
- package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
- package/docs/for-ai/skills/okstra-container-build.md +61 -61
- package/docs/for-ai/skills/okstra-graphify.md +64 -0
- package/docs/for-ai/skills/okstra-inspect.md +86 -86
- package/docs/for-ai/skills/okstra-manager.md +32 -32
- package/docs/for-ai/skills/okstra-memory.md +49 -50
- package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
- package/docs/for-ai/skills/okstra-rollup.md +58 -58
- package/docs/for-ai/skills/okstra-run.md +95 -95
- package/docs/for-ai/skills/okstra-schedule-gen.md +106 -106
- package/docs/for-ai/skills/okstra-setup.md +63 -64
- package/docs/for-ai/skills/okstra-user-response.md +48 -0
- package/docs/performance-improvement-plan-v2.md +4 -4
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +91 -70
- package/docs/task-process/README.md +33 -33
- package/docs/task-process/common-flow.md +26 -26
- package/docs/task-process/error-analysis.md +20 -21
- package/docs/task-process/final-verification.md +41 -41
- package/docs/task-process/implementation-planning.md +33 -33
- package/docs/task-process/implementation.md +38 -38
- package/docs/task-process/release-handoff.md +46 -46
- package/docs/task-process/requirements-discovery.md +22 -23
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/antigravity-worker.md +4 -4
- package/runtime/agents/workers/claude-worker.md +2 -2
- package/runtime/agents/workers/codex-worker.md +4 -4
- package/runtime/agents/workers/report-writer-worker.md +4 -4
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/convergence.md +10 -20
- package/runtime/prompts/lead/okstra-lead-contract.md +14 -16
- package/runtime/prompts/lead/plan-body-verification.md +18 -18
- package/runtime/prompts/lead/report-writer.md +43 -44
- package/runtime/prompts/lead/team-contract.md +11 -122
- package/runtime/prompts/profiles/_common-contract.md +15 -22
- package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +1 -1
- package/runtime/prompts/profiles/implementation-planning.md +13 -13
- package/runtime/prompts/profiles/implementation.md +1 -1
- package/runtime/prompts/profiles/improvement-discovery.md +1 -1
- package/runtime/prompts/profiles/release-handoff.md +3 -3
- package/runtime/prompts/profiles/requirements-discovery.md +18 -18
- package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
- package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
- package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
- package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
- package/runtime/skills/okstra-container-build/SKILL.md +24 -14
- package/runtime/skills/okstra-graphify/SKILL.md +12 -4
- package/runtime/skills/okstra-inspect/SKILL.md +104 -98
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-rollup/SKILL.md +12 -6
- package/runtime/skills/okstra-run/SKILL.md +49 -88
- package/runtime/skills/okstra-schedule-gen/SKILL.md +36 -30
- package/runtime/skills/okstra-setup/SKILL.md +1 -1
- package/runtime/skills/okstra-setup/references/project-config.md +17 -16
- package/runtime/skills/okstra-usage/SKILL.md +5 -2
- package/runtime/skills/okstra-user-response/SKILL.md +15 -3
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/reports/error-analysis-input.template.md +1 -1
- package/runtime/templates/reports/fan-out-unit.template.md +6 -6
- package/runtime/templates/reports/final-verification-input.template.md +6 -6
- package/runtime/templates/reports/implementation-input.template.md +1 -1
- package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
- package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
- package/runtime/templates/reports/quick-input.template.md +1 -1
- package/runtime/templates/reports/release-handoff-input.template.md +1 -1
- package/runtime/templates/reports/schedule.template.md +22 -22
- package/runtime/templates/reports/task-brief.template.md +3 -3
- package/runtime/templates/reports/user-response.template.md +20 -20
- package/runtime/templates/worker-prompt-preamble.md +111 -13
- package/runtime/validators/validate-schedule.py +1 -1
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
# okstra-container-build AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
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
|
|
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 |
|
|
17
|
+
| Sub-command | Role | side effect |
|
|
18
18
|
|---|---|---|
|
|
19
|
-
| `up` | implementation stages
|
|
20
|
-
| `status` | label query
|
|
21
|
-
| `logs` | watcher findings dir
|
|
22
|
-
| `stop-watcher` | watcher/tail tmux panes
|
|
23
|
-
| `down` |
|
|
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
|
|
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
|
-
|
|
37
|
+
Most sub-commands need a full task-key.
|
|
38
38
|
|
|
39
|
-
1. full task-key
|
|
40
|
-
2. bare task-id
|
|
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
|
|
47
|
-
4. `down --all
|
|
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
|
-
- "
|
|
54
|
-
- "
|
|
55
|
-
- "
|
|
56
|
-
- "watcher
|
|
57
|
-
- "
|
|
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
|
-
|
|
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
|
|
72
|
-
- worktree root
|
|
73
|
-
- approved plan
|
|
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
|
-
-
|
|
78
|
-
- compose file
|
|
79
|
-
- `final-verification(whole-task): stage N not done`:
|
|
80
|
-
- healthcheck
|
|
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
|
-
|
|
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
|
|
96
|
-
- `watchers`:
|
|
95
|
+
- `containers`: running containers found by run-trace label
|
|
96
|
+
- `watchers`: watcher metadata from the registry
|
|
97
97
|
|
|
98
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
147
|
-
- raw `docker`
|
|
148
|
-
- resolved task-key
|
|
149
|
-
- CLI failure
|
|
150
|
-
- container/service state
|
|
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`
|
|
156
|
-
- partial
|
|
157
|
-
-
|
|
158
|
-
- `down --all
|
|
159
|
-
-
|
|
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`.
|