okstra 0.185.0 → 0.186.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/dist/commands/chat/chat.mjs +62 -15
- package/dist/commands/chat/chat.mjs.map +1 -1
- package/docs/architecture.md +1 -1
- package/docs/cli.md +2 -2
- package/docs/for-ai/skills/okstra-chat.md +7 -1
- package/docs/project-structure-overview.md +1 -1
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/prompts/lead/okstra-lead-contract.md +1 -1
- package/runtime/prompts/lead/plan-body-verification.md +8 -7
- package/runtime/prompts/profiles/implementation-planning.md +3 -3
- package/runtime/python/okstra_ctl/cmux.py +63 -35
- package/runtime/python/okstra_ctl/incremental_carry.py +149 -5
- package/runtime/python/okstra_ctl/incremental_scope.py +25 -3
- package/runtime/python/okstra_ctl/plan_items.py +40 -4
- package/runtime/python/okstra_ctl/report_html/common.py +86 -11
- package/runtime/python/okstra_ctl/report_html/filters.py +27 -10
- package/runtime/python/okstra_ctl/report_html/render.py +1 -0
- package/runtime/python/okstra_ctl/report_html/report_index.py +5 -1
- package/runtime/python/okstra_ctl/report_html/view_models/implementation_planning.py +1 -1
- package/runtime/skills/okstra-chat/SKILL.md +25 -13
- package/runtime/templates/reports/html/assets/base.css +48 -3
- package/runtime/templates/reports/html/base.template.html +7 -4
- package/runtime/templates/reports/html/i18n/en.json +86 -8
- package/runtime/templates/reports/html/i18n/ko.json +86 -8
- package/runtime/templates/reports/html/macros/forms.html +74 -55
- package/runtime/templates/reports/html/macros/layout.html +2 -2
- package/runtime/templates/reports/html/macros/visualizations.html +1 -1
- package/runtime/templates/reports/html/tasks/change-impact-analysis.template.html +2 -2
- package/runtime/templates/reports/html/tasks/error-analysis.template.html +3 -3
- package/runtime/templates/reports/html/tasks/feature-analysis.template.html +4 -4
- package/runtime/templates/reports/html/tasks/final-verification.template.html +3 -3
- package/runtime/templates/reports/html/tasks/implementation-option-selection.template.html +9 -9
- package/runtime/templates/reports/html/tasks/implementation-planning.template.html +20 -18
- package/runtime/templates/reports/html/tasks/implementation.template.html +3 -3
- package/runtime/templates/reports/html/tasks/improvement-discovery.template.html +3 -3
- package/runtime/templates/reports/html/tasks/project-analysis.template.html +10 -10
- package/runtime/templates/reports/html/tasks/release-handoff.template.html +2 -2
- package/runtime/templates/reports/html/tasks/requirements-discovery.template.html +4 -4
- package/runtime/validators/validate-run.py +19 -19
package/README.md
CHANGED
|
@@ -188,6 +188,7 @@ Use these slash commands inside a Claude Code session:
|
|
|
188
188
|
| `/okstra-brief-gen` | Convert a ticket, requirements document, link, or conversation into an `okstra-run` task brief |
|
|
189
189
|
| `/okstra-run` | Start a new task or continue an existing task's next phase |
|
|
190
190
|
| `/okstra-memory` | Store, search, and archive global conversation memory in `~/.okstra/memory-book` |
|
|
191
|
+
| `/okstra-chat` | Create or join a global room and send or read addressed messages across host sessions |
|
|
191
192
|
| `/okstra-inspect` | Unified read side. Subcommands: `status` (phase/state and workStatus updates), `history` (past tasks, reruns, resumes), `report` (find/read final reports), `time` (elapsed-time breakdown), `logs` (wrapper log sidecar inventory and cleanup suggestions), `cost` (task bundle context/read cost), `errors` (aggregate run error logs into a report), `error-zip` (collect cross-project error logs into an anonymized zip and summarize clusters), `run-audit` (check every run's artifacts against progress invariants, catching runs that ended wrong without ever logging a failure), and `recap` (run-to-run before/after summary plus free-form Q&A over a task's `.okstra` artifacts) |
|
|
192
193
|
| `/okstra-rollup` | Aggregate every task run in a task group or project, including per-task run counts, duration, errors, group totals, and a cross-task report digest |
|
|
193
194
|
| `/okstra-usage` | Show the current project's recent run coverage, raw and billable-equivalent tokens, known USD cost, CPU time, and wall-clock time grouped by task type (default: last 30 days) |
|
|
@@ -11,7 +11,7 @@ Usage:
|
|
|
11
11
|
okstra chat create --room <name>
|
|
12
12
|
okstra chat join --room <name> --name <display>
|
|
13
13
|
okstra chat members --room <name>
|
|
14
|
-
okstra chat send --room <name> --as <display> --to <all|name> --body <text>
|
|
14
|
+
okstra chat send --room <name> --as <display> (--to <all|name> | --reply-to <id>) (--body <text> | --body-file <path>)
|
|
15
15
|
okstra chat unread --room <name> --as <display>
|
|
16
16
|
okstra chat inbox --room <name> --as <display>
|
|
17
17
|
okstra chat log --room <name> --as <display> [--to <all|name>]
|
|
@@ -80,8 +80,10 @@ function cleanDisplayName(raw) {
|
|
|
80
80
|
return value;
|
|
81
81
|
}
|
|
82
82
|
function formatLine(message) {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
// 초 이하는 버리고 반올림하지 않는다.
|
|
84
|
+
const time = `${message.at.slice(0, 10)} ${message.at.slice(11, 16)}`;
|
|
85
|
+
const mark = message.replyTo === undefined ? "" : ` ↑${message.replyTo}`;
|
|
86
|
+
return `${message.id} @${message.from} ${time}${mark} ${message.body}`;
|
|
85
87
|
}
|
|
86
88
|
function emptyIndex() {
|
|
87
89
|
return { rooms: [] };
|
|
@@ -256,28 +258,72 @@ function resolveRecipient(state, raw) {
|
|
|
256
258
|
throw new ChatError("recipient is not a member");
|
|
257
259
|
return name;
|
|
258
260
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
|
|
261
|
+
function requireXor(flags, left, right) {
|
|
262
|
+
if ((flags[left] === undefined) === (flags[right] === undefined)) {
|
|
263
|
+
throw new ChatError(`send requires exactly one of --${left} or --${right}`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function parseMessageId(raw, flag) {
|
|
267
|
+
const trimmed = raw.trim();
|
|
268
|
+
const id = Number.parseInt(trimmed, 10);
|
|
269
|
+
if (!Number.isInteger(id) || id < 1 || String(id) !== trimmed) {
|
|
270
|
+
throw new ChatError(`${flag} must be a positive message id`);
|
|
271
|
+
}
|
|
272
|
+
return id;
|
|
273
|
+
}
|
|
274
|
+
async function resolveBody(flags) {
|
|
275
|
+
requireXor(flags, "body", "body-file");
|
|
276
|
+
let body = flags.body;
|
|
277
|
+
if (body === undefined) {
|
|
278
|
+
try {
|
|
279
|
+
body = await fs.readFile(flags["body-file"] ?? "", "utf8");
|
|
280
|
+
}
|
|
281
|
+
catch (err) {
|
|
282
|
+
if (err.code === "ENOENT") {
|
|
283
|
+
throw new ChatError("body file not found");
|
|
284
|
+
}
|
|
285
|
+
throw err;
|
|
286
|
+
}
|
|
287
|
+
if (body.endsWith("\r\n"))
|
|
288
|
+
body = body.slice(0, -2);
|
|
289
|
+
else if (body.endsWith("\n"))
|
|
290
|
+
body = body.slice(0, -1);
|
|
291
|
+
}
|
|
268
292
|
if (body.trim() === "" || /[\n\r]/.test(body)) {
|
|
269
293
|
throw new ChatError("body must be a single non-empty line");
|
|
270
294
|
}
|
|
295
|
+
return body;
|
|
296
|
+
}
|
|
297
|
+
async function resolveSendAddress(state, room, flags) {
|
|
298
|
+
requireXor(flags, "to", "reply-to");
|
|
299
|
+
if (flags.to !== undefined)
|
|
300
|
+
return { to: resolveRecipient(state, flags.to) };
|
|
301
|
+
const replyTo = parseMessageId(flags["reply-to"] ?? "", "--reply-to");
|
|
302
|
+
const parent = (await loadMessages(room)).find((row) => row.id === replyTo);
|
|
303
|
+
if (parent === undefined)
|
|
304
|
+
throw new ChatError("message id not found");
|
|
305
|
+
// 부모는 준 아이디 그대로다. 스레드 루트로 올리지 않는다.
|
|
306
|
+
return {
|
|
307
|
+
to: parent.to === BROADCAST ? BROADCAST : parent.from,
|
|
308
|
+
reply: { replyTo },
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
async function opSend(args) {
|
|
312
|
+
const flags = parseFlags(args, new Set(["--room", "--as", "--to", "--reply-to", "--body", "--body-file"]));
|
|
313
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
314
|
+
const from = cleanDisplayName(requireFlag(flags, "as"));
|
|
315
|
+
const body = await resolveBody(flags);
|
|
271
316
|
const id = await withLock(roomDir(room), async () => {
|
|
272
317
|
const state = await loadRoom(room);
|
|
273
318
|
requireMember(state, from);
|
|
274
|
-
const
|
|
319
|
+
const addressed = await resolveSendAddress(state, room, flags);
|
|
275
320
|
const message = {
|
|
276
321
|
id: state.nextId,
|
|
277
322
|
at: new Date().toISOString(),
|
|
278
323
|
from,
|
|
279
|
-
to,
|
|
324
|
+
to: addressed.to,
|
|
280
325
|
body,
|
|
326
|
+
...addressed.reply,
|
|
281
327
|
};
|
|
282
328
|
await appendMessage(room, message);
|
|
283
329
|
await writeJson(statePath(room), { ...state, nextId: state.nextId + 1 });
|
|
@@ -293,7 +339,8 @@ async function opUnread(args) {
|
|
|
293
339
|
const state = await loadRoom(room);
|
|
294
340
|
requireMember(state, name);
|
|
295
341
|
const after = state.cursors[name] ?? 0;
|
|
296
|
-
|
|
342
|
+
// 채팅 알림은 읽음 커서 이후 수신함에서 자신이 보낸 글을 뺀다.
|
|
343
|
+
const rows = inboxOf(await loadMessages(room), name, after).filter((message) => message.from !== name);
|
|
297
344
|
printLines(rows.map(formatLine), "no unread");
|
|
298
345
|
return 0;
|
|
299
346
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../src/commands/chat/chat.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG;;;;;;;;;;;;;;CAcb,CAAC;AAqBF,MAAM,SAAU,SAAQ,KAAK;IAC3B,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;CACF;AAED,SAAS,QAAQ;IACf,OAAO,IAAI,CAAC,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AK,OAAO;gBACV,OAAO,MAAM,OAAO,EAAE,CAAC;YACzB,KAAK,QAAQ;gBACX,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9B,KAAK,MAAM;gBACT,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YAC5B,KAAK,SAAS;gBACZ,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;YAC/B,KAAK,MAAM;gBACT,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YAC5B,KAAK,QAAQ;gBACX,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9B,KAAK,OAAO;gBACV,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,KAAK,KAAK;gBACR,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3B,KAAK,KAAK;gBACR,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3B;gBACE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAO,KAAK,EAAE,CAAC,CAAC;gBACnE,OAAO,CAAC,CAAC;QACb,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,OAAO,IAAI,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
package/docs/architecture.md
CHANGED
|
@@ -755,7 +755,7 @@ okstra incremental-scope --prev-data <prev data.json> --cur-base-sha <sha> --pre
|
|
|
755
755
|
okstra incremental-carry --prev-data <prev data.json> --cur-narrative <cur narrative.md> --state <cur plan state.json> --prev-seq <prev-seq> --carry-stages <csv> --reverify-stages <csv> --out-state <cur plan state.json>
|
|
756
756
|
```
|
|
757
757
|
|
|
758
|
-
When `mode == "incremental"`, worker dispatch is narrowed to `reverify_stages` (see *Cross-verification mode* in `prompts/profiles/implementation-planning.md`), and workers do not reopen or rejudge `carry_stages`. The report writer preserves carried stage rows in its narrative. After plan-item seeding, `okstra incremental-carry` verifies those rows and copies their previous `P-Step-*` and `P-Prep-*` verdicts into the convergence-owned state with a `carriedForwardFromSeq` tag. It exits nonzero on a changed or omitted carried stage, missing item, or conflicting scope and falls back to full. If a reverified stage concludes that a plan item must be **deleted**, that indicates nonlocal impact and likewise triggers a full rerun. `verdictCard` / `finalVerdict` are never carried and are recomputed on every run.
|
|
758
|
+
When `mode == "incremental"`, worker dispatch is narrowed to `reverify_stages` (see *Cross-verification mode* in `prompts/profiles/implementation-planning.md`), and workers do not reopen or rejudge `carry_stages`. The report writer preserves carried stage rows in its narrative. After plan-item seeding, `okstra incremental-carry` verifies those rows and copies their previous `P-Step-*` and `P-Prep-*` verdicts, plus unchanged `P-Val-*` / `P-Req-*` / `P-Rb-*` rows, into the convergence-owned state with a `carriedForwardFromSeq` tag. It exits nonzero on a changed or omitted carried stage, missing item, or conflicting scope and falls back to full. If a reverified stage concludes that a plan item must be **deleted**, that indicates nonlocal impact and likewise triggers a full rerun. `verdictCard` / `finalVerdict` are never carried and are recomputed on every run.
|
|
759
759
|
|
|
760
760
|
The report writer records the decision unchanged in its narrative at `implementationPlanning.incrementalDecision`. Report assembly carries the field into `data.json`, and the renderer exposes it as a `### 0.1 Incremental Re-Verification Scope` audit block. The source procedure is the §"Incremental re-verification" section of `prompts/launch.template.md`.
|
|
761
761
|
|
package/docs/cli.md
CHANGED
|
@@ -825,7 +825,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
825
825
|
| `okstra error-log append-observed --out <errors.jsonl> --task-key <key> --phase <phase> --agent <assigned-worker-id> --agent-role worker --model <model> --error-type tool-failure --command-file <markdown-file> --command-kind <kind> --message-file <markdown-file> [--cause <cause> --evidence-file <kind=file>]…` | Worker-facing typed error recording surface. Python validates and serializes the JSONL record; a worker supplies scalar identity fields plus Markdown files for free-form command, message, and probe content, never a JSON sidecar or JSON argument. `sandbox-denied` requires both `targetProbe` and `controlProbe` evidence files. |
|
|
826
826
|
| `okstra config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Manage persistent settings such as `pr-template-path` with atomic JSON writes |
|
|
827
827
|
| `okstra memory <add\|list\|search\|show\|archive>` | Manage global conversation memory in `~/.okstra/memory-book`, a user-home store separate from project `.okstra/` and the CLI basis of the `save this in okstra` natural-language skill |
|
|
828
|
-
| `okstra chat <rooms\|create\|join\|members\|send\|unread\|inbox\|log\|ack>` | Global rooms under `~/.okstra/chat`. Join takes an explicit `--name`. Send
|
|
828
|
+
| `okstra chat <rooms\|create\|join\|members\|send\|unread\|inbox\|log\|ack>` | Global rooms under `~/.okstra/chat`. Join takes an explicit `--name`. Send takes exactly one of `--to` (`all` or a member; may equal `--as`) or `--reply-to` (an id in that room), and exactly one of `--body` or `--body-file`. A reply inherits `to` from the parent (`all` stays `all`, otherwise the parent's `from`). Unread is the inbox after the read cursor minus messages the participant sent; it does not move the cursor. `inbox` and `log` keep those arrivals, including after ack. Rows are `id @from YYYY-MM-DD HH:MM body`; a reply inserts `↑parentId` after the time. CLI basis of the `okstra-chat` skill. |
|
|
829
829
|
| `okstra model-io active-context-input --project-root <dir> --run-manifest <path>` | Resolve the prior implementation-planning active context only through the current project and run authority, then emit fixed fields such as the executor base ref. Caller-supplied active-context paths are not accepted. |
|
|
830
830
|
| `okstra report-translate <source\|write\|check-data> --run-manifest <path> …` | Resolve the report data and translation sidecar from the run manifest. `source` emits a source digest with the fixed translation queue; `write` requires that digest and rejects a stale report; `check-data` verifies the derived sidecar. Models never choose the data or sidecar path. |
|
|
831
831
|
| `okstra convergence prepare-groups --run-manifest <path> --input <grouping.md>` | Parse fixed grouping Markdown, validate distinct per-worker evidence and group semantics against the run authority, then publish the schema-valid groups artifact at the run-owned path. |
|
|
@@ -844,7 +844,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
844
844
|
| `okstra task-show <task-key> [--project-root <path>]` | Summarize workflow, phase, status, and artifacts from the Task Read-Side Snapshot |
|
|
845
845
|
| `okstra stage-map <task-key> [--cwd <dir>\|--project <dir>]` | Dump the task's implementation-planning Stage Map as JSON: `{ ok, taskKey, taskRoot, state, sourcePlanPath, stages:[{stage_number,title,depends_on,step_count}], doneStages:[int] }`. `state` is `ready` for one resolved source and `missing` when no Stage Map exists; corrupt or conflicting sources return structured non-zero errors instead of silently selecting another report. `doneStages` is read from the implementation-planning stage consumer state (with carry recovery). This is the read-side source `/okstra-schedule-gen [task-group]` uses to derive selectable unfinished stages and their completed dependency closure |
|
|
846
846
|
| `okstra incremental-scope <args…>` | Decide re-verify vs carry-forward scope for an `implementation-planning` clarification re-run. Thin shim into `scripts/okstra_ctl/incremental_scope.py` (deterministic pure function): it reads the dependency graph from the prior 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` covers at most half of all stages; `--full-reason` (selected option / Stage Map / approach) still forces `mode:"full"`. An answered `C-NNN` that traces to no stage returns `mode:"unresolved"` rather than full — pass `--impacted` with the stage numbers or `--full-reason`. `--preview --prev-data <path> --answered-clarifications <csv>` runs the link half alone — no base SHA, no side effects — and prints `{wouldForceFull, unlinkedIds, reason}`; unlinked ids set `wouldForceFull: false` and fill `unlinkedIds` |
|
|
847
|
-
| `okstra incremental-carry <args…>` | Merge carried-forward plan-item verdicts into an incremental re-run. Contract v3 takes `--prev-data`, `--cur-narrative`, and the convergence-owned `--state`; it verifies carried stage rows and writes only `--out-state`, tagging copied verdicts with `carriedForwardFromSeq`. The historical v2 `--cur-data --out` form remains readable. Ownership, scope, item, or schema drift raises `CarryError` and forces a full fallback. |
|
|
847
|
+
| `okstra incremental-carry <args…>` | Merge carried-forward plan-item verdicts into an incremental re-run. Contract v3 takes `--prev-data`, `--cur-narrative`, and the convergence-owned `--state`; it verifies carried stage rows and writes only `--out-state`, tagging copied verdicts with `carriedForwardFromSeq`. Unchanged `P-Val-*` / `P-Req-*` / `P-Rb-*` rows whose extract hash still matches are carried the same way, and the sibling `plan-items-*.json` `dispatchQueue` is rewritten to match. The historical v2 `--cur-data --out` form remains readable. Ownership, scope, item, or schema drift raises `CarryError` and forces a full fallback. |
|
|
848
848
|
| `okstra code-review target --task-key <k> --stage <N> [--project-root <dir>] [--cwd <dir>] [--json]` / `okstra code-review target --branch <name> [--base <ref>] [--date <YYYY-MM-DD>] [--project-root <dir>] [--cwd <dir>] [--json]` | Resolve what a code review reads and where its result file goes. Output is always JSON, so `--json` only makes that explicit. `--project-root` and `--cwd` are shared pre-dispatch arguments and apply to both modes; `--cwd` is only consulted when `--project-root` is absent. Both modes return `{ ok, projectRoot, mode, worktreePath, branch, baseCommit, headCommit, reviewPath, round }`; stage mode additionally returns `taskKey`, `taskRoot`, and `stage`. Stage mode takes the diff base from the `base_ref` recorded on that stage's worktree-registry row when it was provisioned — not from a rule re-applied at review time — and names the result `.okstra/tasks/<task-group>/<task-id>/code-reviews/stage-<NN>.md`, where a re-review of the same stage becomes `-r2`, `-r3`, … (the `round` field). Only a legacy row provisioned before `base_ref` was recorded falls back to re-deriving the base through `stage_targets`, and a failure there is reported as `stage_base_unresolved`. `worktreePath` comes back empty whenever the stage worktree is not usable as a live checkout — the registry row is no longer `active` (whole-task final-verification released it), the row never carried a path, or the recorded directory is gone — and the review then reads the `branch` ref instead. Branch mode uses `--base` when given, otherwise the merge-base with the default branch (`refs/remotes/origin/HEAD`, else `main`/`master`), and names the result `.project-docs/code-reviews/<branch>/<YYYY-MM-DD>-<NN>.md`, where `<NN>` (the `round` field) is the next sequence number for that date — the highest already on disk plus one. Read-only: it resolves paths and creates no directory and no file, so the review directory does not exist until the caller writes the report. Backend for the okstra-code-review skill |
|
|
849
849
|
| `okstra set-work-status <token> <todo\|in-progress\|blocked\|done> [--note <text>] [--task-group <g>] [--project-root <dir>]` | Update user-managed `workStatus` in task-manifest.json, along with `workStatusUpdatedAt` and, when `--note` is supplied, `workStatusNote`. `<token>` is a full task key or bare task ID. It uses the manifest renderer's serialization rules and returns `stage:"ambiguous"` plus `matches[]` when ambiguous |
|
|
850
850
|
| `okstra worktree-lookup <task-key>` | Return the `worktree_registry.lookup` result: reserved path, branch, base ref, and current status |
|
|
@@ -16,7 +16,7 @@ okstra chat rooms
|
|
|
16
16
|
okstra chat create --room <name>
|
|
17
17
|
okstra chat join --room <name> --name <display>
|
|
18
18
|
okstra chat members --room <name>
|
|
19
|
-
okstra chat send --room <name> --as <display> --to <all|name> --body <text>
|
|
19
|
+
okstra chat send --room <name> --as <display> (--to <all|name> | --reply-to <id>) (--body <text> | --body-file <path>)
|
|
20
20
|
okstra chat unread --room <name> --as <display>
|
|
21
21
|
okstra chat inbox --room <name> --as <display>
|
|
22
22
|
okstra chat log --room <name> --as <display>
|
|
@@ -25,4 +25,10 @@ okstra chat ack --room <name> --as <display> --through <id>
|
|
|
25
25
|
|
|
26
26
|
Display names are typed. The CLI does not generate them.
|
|
27
27
|
|
|
28
|
+
Unread is the inbox after the read cursor minus messages whose `from` equals `--as`. It does not move the cursor. `inbox` and `log` keep those messages. Rows are `id @from YYYY-MM-DD HH:MM body`. A reply inserts `↑parentId` after the time. Recipient is not on the line.
|
|
29
|
+
|
|
30
|
+
`send --to` may equal `--as`. `--to` and `--reply-to` are exactly one. `--body` and `--body-file` are exactly one. A reply inherits `to` from the parent. `members` is the full roster.
|
|
31
|
+
|
|
32
|
+
The skill picker is `all` plus `members` minus the current display name. Skill send and reply use `--body`, not `--body-file`. After showing unread rows, the skill runs `ack --through` with the last unread id unless the output is `no unread`. The Step 3 menu is send, unread, inbox, log, reply, done. Reply takes a free-input id and body; there is no recipient picker and no `okstra chat reply` subcommand.
|
|
33
|
+
|
|
28
34
|
Read the fixed text rows. Do not parse JSON.
|
|
@@ -250,7 +250,7 @@ Important modules:
|
|
|
250
250
|
| `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` |
|
|
251
251
|
| `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 |
|
|
252
252
|
| `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; an unlinked `C-NNN` is `mode="unresolved"` (needs `--impacted`), not full. CLI: `okstra incremental-scope` |
|
|
253
|
-
| `incremental_carry.py` | carry merge for an incremental re-run — verifies unchanged carried stage rows and merges their previous
|
|
253
|
+
| `incremental_carry.py` | carry merge for an incremental re-run — verifies unchanged carried stage rows and merges their previous `P-Step-*` / `P-Prep-*` verdicts, plus unchanged `P-Val-*` / `P-Req-*` / `P-Rb-*` rows whose extract hash still matches, into the convergence-owned v3 plan state with a `carriedForwardFromSeq` tag. Rewrites `dispatchQueue` and the sibling `plan-items-*.json` so the next prompt does not re-score a carried checklist row. The historical v2 data.json form remains readable. Ownership, scope, or schema drift exits non-zero with `CarryError`. CLI: `okstra incremental-carry` |
|
|
254
254
|
| `build_tools.py` | allowlist SSOT for deciding whether a plan's command cell invokes the project build toolchain (`npm`/`pytest`/`cargo`/`gradle`/… behind transparent leaders like `sudo`/`env`). The planning worktree has no dependencies installed, so `validators/validate-run.py` uses this to warn (advisory) when a toolchain stage declares no install precondition. Intentionally an allowlist, not a denylist, so unknown tokens go undetected rather than firing on `grep`/`sed` in every plan |
|
|
255
255
|
| `stage_citations.py` | shared grammar SSOT for reading the Stage Map stage numbers a prose cell cites (`Stages 1, 2, and 3`, ranges, etc.). One definition serves two readers that must not drift — the coverage check in `validators/validate-run.py` proving every stage traces to a requirement, and `incremental_scope.py`'s back-trace resolving which stages an answered clarification touches |
|
|
256
256
|
| `self_mock_signals.py` | self-mock signal SSOT — language-keyed regexes (`SIGNALS`), the `EXT_TO_LANG` extension map, and the waiver-matching mechanics both gates share — `selfmock_path_key` (the one path-normalization), `waiver_entry_key` (the `(file, line, <discriminator>)` triple, with the hand-typed line coerced to `int`) and `partition_waived_entries` (the split into still-failing vs waived). Gate A passes the discriminator `signal`, gate B `mutant`; one definition means the two cannot disagree about whether a waiver matches a finding. The signals are each ported from a `prompts/coding-preflight/languages/<lang>.md` "Self-mock signals to refuse" bullet with the source `doc_keyword` retained so a drift guard fails when doc and module diverge. Patterns stay deliberately narrow (only the "stub the subject's own method, then assert the stub" shape and reaching into the subject's privates; subject identity is never inferred beyond the literal `sut` token). The static detector `validators/detect_self_mock.py`, the drift guard and `mutation_probe.py` MUST import from here; four documented shapes needing subject identity no regex has are left to the mutation gate (`mutation_probe.py`) |
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -396,7 +396,7 @@ For a new `implementation-planning` run, the fixed order is initial verification
|
|
|
396
396
|
2. Dispatch a single plan-body reverify round to every analyser worker in the roster (`claude`, `codex`, and `antigravity` when opted in). `Report writer worker` is NOT a participant in this round.
|
|
397
397
|
3. Record each verifier Markdown result through `okstra plan-items apply-verdicts --state <plan-body-verification.json> --result <worker-id>=<result.md> --round <N>`. Python validates every submitted `P-*` identifier against the current convergence state and overwrites only that round's verdicts. Then resolve the gate result to one of `passed` / `passed-with-dissent` / `blocked-by-disagreement` / `aborted-non-result`.
|
|
398
398
|
4. After `okstra plan-verify` succeeds, run `okstra plan-items complete-round --state <plan-body-verification.json> --run-manifest <current-run-manifest.json> --round <N>`. Python reads the current worker assignments, atomically appends the convergence-owned history, and updates its nested final projection. This state is the only plan-verification input report assembly reads.
|
|
399
|
-
5. Record every
|
|
399
|
+
5. Record every *in-scope execution* `majority-disagree` decision through `okstra approval-decision`; record its plan and clarification links only on activities. Do not promote `observed` / `deferred` / `record` items, and do not append `clarificationItems[]` directly.
|
|
400
400
|
6. Run report assembly after the final plan-body state, approval ledger, design snapshot, activity ledger, and team state are complete. Assembly writes `implementationPlanning.planBodyVerification` and derived clarification rows while publishing `data.json` once.
|
|
401
401
|
7. Publish the report record `frontmatter.approved` field as `false`. There is no in-body `- [ ] Approved` marker line — approval lives only in the record (see [plan-body-verification](./plan-body-verification.md) §"Round protocol" step 9). The user may set it to `true` (via `--approve` or the in-session wizard) only when the gate is `passed` or `passed-with-dissent`. **Enforced:** `validators/validate-run.py` `validate_phase_boundary` fails a report shipping `approved: true` under `blocked-by-disagreement` / `aborted-non-result`, and run-prep (`scripts/okstra_ctl/run.py` `_validate_approved_plan`) fail-closes the same case. Manually flipping a blocked gate to passing is a contract violation.
|
|
402
402
|
|
|
@@ -210,11 +210,11 @@ approval only when it has standing over the stage that is about to start:
|
|
|
210
210
|
- **`deferred`** — the item's stages are all still `blocked`. It does not block;
|
|
211
211
|
the stage it judges has not been reached.
|
|
212
212
|
|
|
213
|
-
An item with no `stageScope` is `in-scope`
|
|
214
|
-
`P-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
An item with no `stageScope` is `in-scope` when it is plan-wide (`P-Opt-*`,
|
|
214
|
+
`P-Var-*`, `P-Dep-*`, `P-Dir-1`) or when no stage is `done` yet. Once a stage is
|
|
215
|
+
`done`, an unscoped `P-Val-*` / `P-Req-*` / `P-Rb-*` is `deferred`: omitting
|
|
216
|
+
`stageRefs` must not re-score the whole checklist on every re-plan. Scoping a
|
|
217
|
+
plan-wide item out would stop an unrequested-work verdict from blocking a start.
|
|
218
218
|
|
|
219
219
|
**Nothing is dropped.** An out-of-scope blocker becomes `has-dissent`, so the
|
|
220
220
|
gate reads `passed-with-dissent` rather than `passed` and the reader can see that
|
|
@@ -346,7 +346,7 @@ CLI-wrapper calls follow the planned execution surface after
|
|
|
346
346
|
consume only `modelExecutionValue`. A missing or invalid invocation contract blocks the
|
|
347
347
|
round before any host or provider process starts.
|
|
348
348
|
|
|
349
|
-
1. Lead runs `okstra plan-items prepare --narrative <report-writer-narrative.md> --run-manifest <run-manifest>`, places the fixed output of `okstra plan-items prompt --run-manifest <run-manifest>` verbatim in every verifier prompt, then runs `okstra plan-items validate-prepared --narrative <report-writer-narrative.md> --run-manifest <run-manifest>`. After a self-fix rewrite, pass `--state <plan-body-verification.json>` on prepare and validate-prepared so the dispatch queue is the changed items plus their stage closure, not the full extract. Python resolves the one convergence-owned state path from that run identity. Dispatch only after that exact-match validation succeeds. The prompt is the dispatch queue: `observed` / `deferred` stages are omitted; plan-wide items (`P-Dir-1`, `P-Var-*`, `P-Dep-*`,
|
|
349
|
+
1. Lead runs `okstra plan-items prepare --narrative <report-writer-narrative.md> --run-manifest <run-manifest>`, places the fixed output of `okstra plan-items prompt --run-manifest <run-manifest>` verbatim in every verifier prompt, then runs `okstra plan-items validate-prepared --narrative <report-writer-narrative.md> --run-manifest <run-manifest>`. After a self-fix rewrite, pass `--state <plan-body-verification.json>` on prepare and validate-prepared so the dispatch queue is the changed items plus their stage closure, not the full extract. Python resolves the one convergence-owned state path from that run identity. Dispatch only after that exact-match validation succeeds. The prompt is the dispatch queue: `observed` / `deferred` stages are omitted; plan-wide items (`P-Dir-1`, `P-Var-*`, `P-Dep-*`, `P-Opt-*`) stay. Unscoped `P-Val-*` / `P-Req-*` / `P-Rb-*` stay on the first round, then only when their own `contentHash` changed — a neighbour rewrite must not resweep them. **Enforced:** `okstra_ctl.plan_items.dispatch_item_ids` / `reverify_item_ids`. After `okstra incremental-carry`, the carry copies unchanged checklist verdicts, rewrites `dispatchQueue`, and updates the sibling `plan-items-*.json` so the next `okstra plan-items prompt` does not re-score a carried row.
|
|
350
350
|
|
|
351
351
|
**Then seed the landing table (BLOCKING):** `okstra plan-items seed --narrative <report-writer-narrative.md> --state <plan-body-verification.json> --run-manifest <run-manifest.json>`. `apply-verdicts` in step 8 refuses a verdict whose item has no `planBodyVerification.planItems[]` row. The report writer never owns that state, so the deterministic seed is the only creator of its rows. The seed is idempotent by id and never touches existing verdicts, so it is safe to re-run between rounds and after a self-fix re-extraction. It does refresh `contentHash` from the current extract. Skipping it makes step 8 fail with `plan-body state has no row for [...]`.
|
|
352
352
|
|
|
@@ -422,7 +422,8 @@ round before any host or provider process starts.
|
|
|
422
422
|
- `not-attempted` — the loop never ran because no item qualified.
|
|
423
423
|
The `no-progress` and `max-rounds-reached` exits are what make the loop terminate; `selfFixMaxRounds` alone is the backstop.
|
|
424
424
|
- a `majority-disagree` item with a majority of its deciding `DISAGREE` votes at `needs-user-input` is NOT a self-fix target — after correctness-critical precedence, it goes straight to the next step as `user-decision` rather than generic `noncritical-dissent`. **Enforced:** `validators/validate-run.py` `_expected_approval_classification`.
|
|
425
|
-
8. For every `majority-disagree` item **that remains after the self-fix loop** (items not resolved by self-fix, or with a `needs-user-input` majority from the start), lead adds a row to `## 1. Clarification Items` with:
|
|
425
|
+
8. For every **in-scope execution** `majority-disagree` item **that remains after the self-fix loop** (items not resolved by self-fix, or with a `needs-user-input` majority from the start), lead adds a row to `## 1. Clarification Items` with:
|
|
426
|
+
- do **not** promote an `observed` / `deferred` / `record` item. Those belong in `setAside`. A `Blocks=approval` C row for a frozen or unreached stage is how the clarification list grew while the next stage was already executable. **Enforced:** `validators/validate-run.py` `_validate_plan_body_clarification_matching` uses `_plan_item_gate_class` (after stage scope), not the raw vote class.
|
|
426
427
|
- new `C-<N>` ID (numbering continues from any existing rows)
|
|
427
428
|
- `Statement` summarising the disagreement and the worker breakage `<kind>`
|
|
428
429
|
- `Kind` chosen per the standard policy (usually `decision` for option-level conflicts, `data-point` for path/symbol mismatches)
|
|
@@ -104,7 +104,7 @@ roles:
|
|
|
104
104
|
- §5.5.9 plan-body verification runs with an **adversarial posture** (`prompts/lead/plan-body-verification.md` §"Adversarial plan-body posture"): verifiers open and confirm every cited path / command and put the burden of proof on the plan. The gate threshold is majority-based for kinds `b`/`c`/`e`, but a single `DISAGREE` blocks on its own for the concrete, safety-critical kind `a` (path/symbol mismatch) — and `f` on `P-Req-*` items. `P-Var-*` items are excepted from the kind-`a` exception: a variation-point defect takes a majority. Rollback ordering (`d`) is advisory and never blocks the gate — a rollback is executed by a human, not by okstra's workers or verifiers. A majority also needs ≥2 participating votes, so a lone dissent whose peer returned a non-result does not block on a majority-gated kind (see that contract's §"Adversarial plan-body posture").
|
|
105
105
|
- **Incremental re-verification scope (clarification re-runs):** when the lead's `okstra incremental-scope` decision is `mode == "incremental"` (procedure in `prompts/launch.template.md` §"Clarification Response Carried In"), workers re-analyze ONLY the stages listed in `reverify_stages` (the downstream closure of the impacted stages). Workers MUST NOT re-open, re-score, or re-judge any stage in `carry_stages` — those stages' prior plan-item verdicts are carried forward verbatim, and a worker never overwrites a carried verdict with its own judgement. When the decision is `mode == "full"` (the default), every stage is re-analyzed as usual.
|
|
106
106
|
- **Single incremental-scope decision:** the lead calls `okstra incremental-scope` once the inputs are complete, passing the answered `C-NNN` ids through `--answered-clarifications`, changed design-preparation IDs through `--prep-items`, and any lead-resolved stage numbers through `--impacted`; the CLI unions all three before applying the existing dependency closure and cutoff. The clarification ids are resolved to stages by the CLI from the prior report's own `planItems[].clarificationId` and `blocked C-NNN` coverage links — the lead does not map answers to stage numbers. An answer that changes the selected planning payload, Stage Map, or execution approach is not a local impact: pass `--full-reason`, which is the only structural path that still forces `mode == "full"`. A clarification id that traces to no stage returns `mode == "unresolved"` — ask the user for stage numbers and call again with `--impacted`; do not treat it as full and do not silently drop the id. Unknown PREP IDs or invalid `stageRefs` still return an explicit full decision instead of being guessed. When the wizard pin is `auto` and the CLI returns `mode == "incremental"`, keep it — do not upgrade to full. When the user pinned a scope at the wizard (`REVERIFY_SCOPE_MODE` / `REVERIFY_SCOPE_STAGES` in `prompts/launch.template.md` §"Clarification Response Carried In" step 0), that pin is an input to this same call — `full` supplies the `--full-reason`, and pinned stage numbers join `--impacted` — never a bypass of the CLI's closure and cutoff.
|
|
107
|
-
- **Stage-aware carry:** for an incremental decision, the report writer copies each `carry_stages` stage row unchanged into its narrative. After plan-item seeding, pass the decision's `carry_stages` and `reverify_stages` CSVs unchanged to `okstra incremental-carry --cur-narrative ... --state ... --out-state ...`. The helper rejects a changed or missing carried stage and copies
|
|
107
|
+
- **Stage-aware carry:** for an incremental decision, the report writer copies each `carry_stages` stage row unchanged into its narrative. After plan-item seeding, pass the decision's `carry_stages` and `reverify_stages` CSVs unchanged to `okstra incremental-carry --cur-narrative ... --state ... --out-state ...`. The helper rejects a changed or missing carried stage and copies prior `P-Step-*` / `P-Prep-*` verdicts for `carry_stages`, plus unchanged `P-Val-*` / `P-Req-*` / `P-Rb-*` rows whose extract `contentHash` still matches. It rewrites `dispatchQueue` and the sibling `plan-items-*.json` so the next prompt does not re-score a carried checklist row. Overlap, omissions, and canonical conflicts return `CarryError`. On that error, discard the partial state and run full re-verification.
|
|
108
108
|
{{INCLUDE:_coverage-critic.md}}
|
|
109
109
|
- Non-goals:
|
|
110
110
|
- code-level micro-optimization unless it changes the implementation approach
|
|
@@ -256,12 +256,12 @@ roles:
|
|
|
256
256
|
4. **Ambiguity check** — any requirement that could be read two ways must be made explicit or moved to the `## 1. Clarification Items` table as a `Blocks=approval` row.
|
|
257
257
|
5. **Scope check** — if the plan now spans multiple independent subsystems, split it into separate planning runs rather than shipping an oversized plan. Then walk the plan in the expansion direction: for every stage, name the Requirement Coverage row that demanded it, and for every requirement row, read its `Source` cell as a skeptic — does the cited brief heading actually exist, and does a `derived:` rationale state a real technical consequence rather than a preference? Move anything that fails to a `Blocks=approval` clarification row.
|
|
258
258
|
6. **Review-rule preflight check** — when a project review rule pack applies (cited by the brief, or listed by `okstra model-io project-context --project-root <PROJECT_ROOT> --task-ref <task-ref>`), map each relevant rule to the chosen realization. Reject the draft if it knowingly creates a violation that the later PR reviewer would flag, unless the plan records a specific rationale and follow-up. In particular, scan for repeated helper stacks across planned files, tests that assert delegation to the same calculator/helper they exercise, public names that hide side effects, domain rules placed in repositories/adapters, and APIs made dead by this change.
|
|
259
|
-
7. **Plan-body verification reconciliation (BLOCKING for implementation-planning).** For every §5.5.9 `planItems[]` entry whose
|
|
259
|
+
7. **Plan-body verification reconciliation (BLOCKING for implementation-planning).** For every §5.5.9 `planItems[]` entry whose *gate class after stage scope* is `majority-disagree` (in-scope execution only), set that item's `clarificationId` to a `C-<N>` row that MUST exist in `## 1. Clarification Items` with `Kind` chosen per the standard policy and `Blocks=approval`. Do **not** promote `observed` / `deferred` / `record` items — those belong in `setAside`. Raw vote `majority-disagree` is not enough; promoting it is how a frozen or unreached stage kept opening new `C-NNN` rows. **Enforced:** `validators/validate-run.py` `_validate_plan_body_clarification_matching` uses `_plan_item_gate_class` and fails when an in-scope execution majority-disagree item has no `clarificationId`, or its `clarificationId` is dangling / points at a non-`approval` row. For `partial-consensus` and `dissent-isolated` plan-items, the dissenting opinion lives in §5.5.9 `Dissent log` and is NOT promoted to §5.
|
|
260
260
|
8. **Stage Map self-check** — for every stage, count the effective rows of its `Stepwise Execution Order` table by hand; reject the draft if any stage exceeds 8. Confirm each stage declares a non-empty `Slice value:` and `Acceptance:` line, the three `Test case (success|boundary|failure):` lines (or carries a `TDD exemption:` line), and that its first step `action` starts with `RED:` with a later `GREEN:` — this is what validator S10 enforces, including S10d on the test-case lines. Read each stage's three test-case lines as a reviewer: reject any that restates the happy path in all three slots, leaves `boundary` blank, or writes `N/A` where a real edge input exists. Walk the `depends-on` graph and confirm it is a DAG (no cycle, no self-reference). For each `depends-on` link, confirm it encodes a real data/contract dependency — do NOT add links to serialise unrelated work, and do NOT split a stage merely to create more parallel stages. **Parallel-safety:** for every pair of `depends-on (none)` stages, confirm their `Stage Exit Contract` predicted file sets are disjoint; if they share a file, merge them or add a `depends-on` link (validator S9 rejects overlap). **Project-boundary:** confirm no stage mixes edits from two projects (different repo/`PROJECT_ROOT` or different top-level deployable module); if any stage does, split it per project. For multi-project plans, confirm each stage's `title` carries its `[<project>]` tag and the `Cross-project parallelism:` line under the table records the parallel-vs-sequenced determination (with the forcing dependency) for every project pair; for cross-repo work, confirm it is split into separate per-repo runs (required — one run structurally cannot touch another repo) rather than crammed into one task's stages.
|
|
261
261
|
9. **Cross-project dependency check** — confirm you have not missed a dependency on another repo / another top-level deployable module / a published package. If `dependencyMigrationRisk` has a `kind: cross-project` row, confirm a matching `direction: upstream-precondition` `XP-NNN` row exists in `crossProjectDependencies`, and re-read as a reviewer whether its `requiredWork` is the concrete work the other side must actually build rather than an abstract phrase ("other side's work done") — validator S only checks existence, so concreteness is the self-review's responsibility. Confirm cross-repo work is split into a separate run + XP row instead of being crammed into one task's stages, and that the cross-project substance is not duplicated in `§3 Recommended Next Steps` but lives only in `§5.4 Cross-Project Dependencies`.
|
|
262
262
|
10. **Decision-draft materialization check** — when `decisionDrafts` is non-empty, confirm as a reviewer which stage's stepwise order contains the matching materialization step (creating `.okstra/decisions/<NNNN>-<slug>.md`) and that the number of drafts corresponds 1:1 with the materialization steps. The validator only checks the *existence* of the step, so the `<NNNN>-<slug>` correctness and count correspondence are the self-review's responsibility.
|
|
263
263
|
11. **Variation-point & seam check** — read `variationPointAnalysis` as a skeptic. Is `hasMultipleImplementations` honest against the brief and the sibling code you inspected during pre-planning, or was `false` chosen because it is the cheaper field to fill? For every point with `extract: true`, confirm the `extractionDecision` names a real interface (a `port` for a hexagonal project, not a shared helper) and a `coveredBy` stage that exists in the Stage Map — an interface no stage builds is a decision nobody executes. Then read the chosen realization's `testSeams`: each `injectedAs` must name a construction or wiring point a test can actually substitute at, not a symbol the test would have to re-implement — a seam nothing can be injected into leaves the executor writing self-mocks. An empty `testSeams` array is only acceptable when you can defend it in one sentence; the validator accepts it either way, so this is the check that catches an unfilled field posing as a decision.
|
|
264
264
|
12. **Approval blast-radius check (BLOCKING).** Every approval clarification must be reachable from `planItems[].clarificationRefs[]` or a requirement-coverage blocker. Report assembly derives plan-item links from activity `clarificationRefs[]` plus `planItemIds[]`; `okstra incremental-scope` reads the resulting reverse links.
|
|
265
|
-
- **The link must resolve to a stage, not merely exist.** `incremental-scope` reads the stage number out of a `P-Step-<stage>.<step>` / `P-Prep-S<stage>-<kind>` plan-item id, or out of a `Stage N` citation in the blocked coverage row's `coveredBy`.
|
|
265
|
+
- **The link must resolve to a stage, not merely exist.** `incremental-scope` reads the stage number out of a `P-Step-<stage>.<step>` / `P-Prep-S<stage>-<kind>` plan-item id, out of `stageScope` / `stageRefs` on the linked plan item or coverage row, or out of a `Stage N` citation in the blocked coverage row's `coveredBy`. A `P-Req-*` / `P-Val-*` id is positional, so a blocker linked only that way MUST carry `stageRefs` or cite the stage in `coveredBy`. Writing the blocked row's `coveredBy` as prose with no `Stage N` in it — `No stage.`, `Partly covered — …` — satisfies nothing unless `stageRefs` is present: the row passes the link check and the next re-run cannot place the answer without asking for stage numbers.
|
|
266
266
|
- What to write when no stage covers the requirement yet: name the stage the answer will change, not the stage that satisfies the requirement today. A `Blocks=approval` row is admissible only when, absent an answer, `implementation` would produce wrong or unsafe code (see the admissibility rule above) — so some stage's code is at stake by construction. If you genuinely cannot name one, the row fails the admissibility test and belongs in `## 5. Missing Information and Risks` with `Blocks=none`, not in the approval gate.
|
|
267
267
|
**Enforced:** `validators/validate-run.py` `_validate_approval_clarification_backtrace` — one failure for a missing link, a separate one for a link that resolves to no stage.
|
|
@@ -30,12 +30,13 @@ LOGIN_SHELL_TIMEOUT_SECONDS = 15
|
|
|
30
30
|
# re-enters cmux's own agent wrapper instead of the real CLI.
|
|
31
31
|
SHIM_DIR_MARKER = "cmux-cli-shims"
|
|
32
32
|
|
|
33
|
-
# The
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
|
|
33
|
+
# The first three workers share one column, so the lead keeps two fifths. A
|
|
34
|
+
# fourth worker opens a second column; the lead drops to two sixths so that
|
|
35
|
+
# extra column has room. Splitting the first column sideways before it is full
|
|
36
|
+
# would make the second worker narrower than the first.
|
|
37
|
+
WORKERS_PER_COLUMN = 3
|
|
38
38
|
LEAD_SHARE_WITH_WORKERS = 2 / 5
|
|
39
|
+
LEAD_SHARE_WITH_MULTIPLE_COLUMNS = 2 / 6
|
|
39
40
|
|
|
40
41
|
# Three fifths is what a worker needs to be worth watching: measured against a
|
|
41
42
|
# Claude Code worker, 67 columns renders losslessly and 33 drops content off the
|
|
@@ -46,8 +47,8 @@ LEAD_SHARE_WITH_WORKERS = 2 / 5
|
|
|
46
47
|
# whole workspace back rather than sitting at its working width.
|
|
47
48
|
LEAD_SHARE_ALONE = 1.0
|
|
48
49
|
|
|
49
|
-
# Two passes per pane above the bottom.
|
|
50
|
-
# workers
|
|
50
|
+
# Two passes per pane above the bottom. The first column holds at most three
|
|
51
|
+
# workers; eight moves is that bound with room to spare.
|
|
51
52
|
MAX_WORKER_HEIGHT_MOVES = 8
|
|
52
53
|
|
|
53
54
|
# Sidebar entries are keyed by source so tools do not overwrite each other's.
|
|
@@ -195,11 +196,11 @@ def plan_worker_placement(
|
|
|
195
196
|
) -> Placement:
|
|
196
197
|
"""Pick the next worker slot from the workspace's current geometry.
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
The first worker splits off the lead to the right. The next two fill that
|
|
200
|
+
column downward from the bottom, so three workers share one width. From the
|
|
201
|
+
fourth onward the new pane splits worker n-3 to the right — the matching
|
|
202
|
+
row of the previous column — which is column-major order of the current
|
|
203
|
+
panes sorted by (x, y).
|
|
203
204
|
|
|
204
205
|
Stateless by design: okstra records surface UUIDs, never a layout, so a
|
|
205
206
|
resumed or crashed run cannot carry a layout model that no longer matches
|
|
@@ -220,7 +221,9 @@ def plan_worker_placement(
|
|
|
220
221
|
]
|
|
221
222
|
if not workers:
|
|
222
223
|
return Placement(pane_id=lead_pane_id, direction="right")
|
|
223
|
-
|
|
224
|
+
if len(workers) < WORKERS_PER_COLUMN:
|
|
225
|
+
return _extend_the_worker_column(workers)
|
|
226
|
+
return _extend_the_worker_grid(workers)
|
|
224
227
|
|
|
225
228
|
|
|
226
229
|
def lead_target_width(
|
|
@@ -232,9 +235,10 @@ def lead_target_width(
|
|
|
232
235
|
) -> float:
|
|
233
236
|
"""How wide the lead should be, in the points `pixel_frame` reports.
|
|
234
237
|
|
|
235
|
-
Two fifths while
|
|
236
|
-
|
|
237
|
-
|
|
238
|
+
Two fifths while the first worker column is filling, two sixths once a
|
|
239
|
+
fourth worker is on screen, all of it when they are gone. The share is
|
|
240
|
+
taken of what okstra may actually place into, not of the window: a
|
|
241
|
+
workspace can hold panes okstra never opened, and handing the lead the
|
|
238
242
|
whole container would shove those off their own width. Their width is
|
|
239
243
|
subtracted first and the share applies to the remainder.
|
|
240
244
|
|
|
@@ -252,12 +256,18 @@ def lead_target_width(
|
|
|
252
256
|
usable = container_width_points - strangers
|
|
253
257
|
if usable <= 0:
|
|
254
258
|
return 0.0
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
and _holds_an_okstra_surface(pane, owned_surface_ids)
|
|
259
|
+
worker_count = sum(
|
|
260
|
+
1
|
|
258
261
|
for pane in panes
|
|
262
|
+
if pane.pane_id != lead_pane_id
|
|
263
|
+
and _holds_an_okstra_surface(pane, owned_surface_ids)
|
|
259
264
|
)
|
|
260
|
-
|
|
265
|
+
if worker_count == 0:
|
|
266
|
+
share = LEAD_SHARE_ALONE
|
|
267
|
+
elif worker_count <= WORKERS_PER_COLUMN:
|
|
268
|
+
share = LEAD_SHARE_WITH_WORKERS
|
|
269
|
+
else:
|
|
270
|
+
share = LEAD_SHARE_WITH_MULTIPLE_COLUMNS
|
|
261
271
|
return usable * share
|
|
262
272
|
|
|
263
273
|
|
|
@@ -292,15 +302,25 @@ def _holds_an_okstra_surface(
|
|
|
292
302
|
|
|
293
303
|
|
|
294
304
|
def _extend_the_worker_column(workers: Sequence[PaneGeometry]) -> Placement:
|
|
295
|
-
"""
|
|
305
|
+
"""Split the bottom of the first column downward. A tab would hide the new worker.
|
|
296
306
|
|
|
297
|
-
The first worker is split off the lead, so it stays at the lead's y.
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
the lead.
|
|
307
|
+
The first worker is split off the lead, so it stays at the lead's y. The
|
|
308
|
+
second and third stack below it. Splitting the bottom parks the new pane at
|
|
309
|
+
the next row rather than inserting it beside the lead.
|
|
301
310
|
"""
|
|
302
|
-
|
|
303
|
-
return Placement(pane_id=
|
|
311
|
+
bottom = max(workers, key=lambda pane: pane.y)
|
|
312
|
+
return Placement(pane_id=bottom.pane_id, direction="down")
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def _extend_the_worker_grid(workers: Sequence[PaneGeometry]) -> Placement:
|
|
316
|
+
"""Split worker n-3 to the right, filling the next 3-row column.
|
|
317
|
+
|
|
318
|
+
Column-major (x, y) matches creation order while this placement is the only
|
|
319
|
+
one writing the grid: worker 4 is to the right of 1, 5 of 2, 6 of 3, 7 of 4.
|
|
320
|
+
"""
|
|
321
|
+
ordered = sorted(workers, key=lambda pane: (pane.x, pane.y))
|
|
322
|
+
source = ordered[len(ordered) - WORKERS_PER_COLUMN]
|
|
323
|
+
return Placement(pane_id=source.pane_id, direction="right")
|
|
304
324
|
|
|
305
325
|
|
|
306
326
|
def plan_worker_height_resize(
|
|
@@ -313,11 +333,17 @@ def plan_worker_height_resize(
|
|
|
313
333
|
again. The bottom pane is never the one named: it absorbs the remainder.
|
|
314
334
|
|
|
315
335
|
`new-split` halves the pane it lands on and does not take a ratio, so a
|
|
316
|
-
third worker split off the
|
|
317
|
-
the
|
|
336
|
+
third worker split off the bottom would otherwise stay at a quarter while
|
|
337
|
+
the top one keeps a half.
|
|
338
|
+
|
|
339
|
+
A second column inherits row height from the pane it split. Equalizing
|
|
340
|
+
every worker as one stack would move the first column independently of the
|
|
341
|
+
pane sitting in the same row to the right.
|
|
318
342
|
"""
|
|
319
343
|
if len(workers) < 2:
|
|
320
344
|
return None
|
|
345
|
+
if len({pane.x for pane in workers}) > 1:
|
|
346
|
+
return None
|
|
321
347
|
ordered = sorted(workers, key=lambda pane: pane.y)
|
|
322
348
|
total = sum(pane.height_points for pane in ordered)
|
|
323
349
|
if total <= 0:
|
|
@@ -649,9 +675,10 @@ def _exec_worker(surface_uuid: str, *, cwd: Path, command: Sequence[str]) -> Non
|
|
|
649
675
|
def _size_lead_pane(workspace: str, owned_surface_ids: Collection[str]) -> None:
|
|
650
676
|
"""Move the lead's border to its share of the workspace.
|
|
651
677
|
|
|
652
|
-
This is the horizontal border okstra places.
|
|
653
|
-
|
|
654
|
-
|
|
678
|
+
This is the horizontal border okstra places. The first worker column
|
|
679
|
+
inherits whatever the lead leaves. A fourth worker also drops the lead
|
|
680
|
+
from two fifths to two sixths, and that extra sixth goes to the neighbour
|
|
681
|
+
that pulls the border in. Worker heights are equalized separately after
|
|
655
682
|
the split that just halved one of them.
|
|
656
683
|
|
|
657
684
|
Which pane carries the request follows from what `pane.resize` does: it
|
|
@@ -706,12 +733,13 @@ def _size_lead_pane(workspace: str, owned_surface_ids: Collection[str]) -> None:
|
|
|
706
733
|
def _equalize_worker_heights(
|
|
707
734
|
workspace: str, owned_surface_ids: Collection[str]
|
|
708
735
|
) -> None:
|
|
709
|
-
"""Give every owned worker the same height in the column.
|
|
736
|
+
"""Give every owned worker the same height in the first column.
|
|
710
737
|
|
|
711
738
|
`new-split` halves whichever pane it lands on, so the third worker of a
|
|
712
|
-
round would otherwise sit at a quarter with the
|
|
739
|
+
round would otherwise sit at a quarter with the top one still at a half.
|
|
713
740
|
Each call moves one border and re-reads: growing the top pane steals from
|
|
714
|
-
the one below, and that is what the next plan has to see.
|
|
741
|
+
the one below, and that is what the next plan has to see. A second column
|
|
742
|
+
is left alone — its row heights came from the pane it split.
|
|
715
743
|
"""
|
|
716
744
|
for _ in range(MAX_WORKER_HEIGHT_MOVES):
|
|
717
745
|
panes = list_panes(workspace)
|