okstra 0.185.0 → 0.185.1

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 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) |
@@ -81,7 +81,7 @@ function cleanDisplayName(raw) {
81
81
  }
82
82
  function formatLine(message) {
83
83
  const to = message.to === BROADCAST ? BROADCAST : `@${message.to}`;
84
- return `${message.id}:${message.at}:${to}:${message.body}`;
84
+ return `${message.id}:${message.at}:@${message.from}:${to}:${message.body}`;
85
85
  }
86
86
  function emptyIndex() {
87
87
  return { rooms: [] };
@@ -293,7 +293,8 @@ async function opUnread(args) {
293
293
  const state = await loadRoom(room);
294
294
  requireMember(state, name);
295
295
  const after = state.cursors[name] ?? 0;
296
- const rows = inboxOf(await loadMessages(room), name, after);
296
+ // 채팅 알림은 읽음 커서 이후 수신함에서 자신이 보낸 글을 뺀다.
297
+ const rows = inboxOf(await loadMessages(room), name, after).filter((message) => message.from !== name);
297
298
  printLines(rows.map(formatLine), "no unread");
298
299
  return 0;
299
300
  }
@@ -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,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,YAAY,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,SAAS,CAAC,IAAuB,EAAE,KAAa,EAAE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BACR,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"}
@@ -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 requires `--to` (`all` or a member). Unread is the inbox after the read cursor; `inbox` keeps arrivals after ack. CLI basis of the `okstra-chat` skill. |
828
+ | `okstra chat <rooms\|create\|join\|members\|send\|unread\|inbox\|log\|ack>` | Global rooms under `~/.okstra/chat`. Join takes an explicit `--name`. Send requires `--to` (`all` or a member); `--to` may equal `--as`. 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:time:@from:to:body`. 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 |
@@ -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:time:@from:to:body`; recipient `all` stays `all`.
29
+
30
+ `send --to` may equal `--as`. `members` is the full roster.
31
+
32
+ The skill picker is `all` plus `members` minus the current display name. After showing unread rows, the skill runs `ack --through` with the last unread id unless the output is `no unread`.
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 plan-item verdicts into the convergence-owned v3 plan state with a `carriedForwardFromSeq` tag. The historical v2 data.json form remains readable. Ownership, scope, or schema drift exits non-zero with `CarryError`. CLI: `okstra incremental-carry` |
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.185.0",
3
+ "version": "0.185.1",
4
4
  "description": "Host-aware multi-provider cross-verification orchestrator runtime and agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.185.0",
3
- "builtAt": "2026-08-23T12:45:52.129Z",
2
+ "package": "0.185.1",
3
+ "builtAt": "2026-08-23T14:31:57.118Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -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` on purpose. `P-Opt-*`, `P-Var-*`,
214
- `P-Dep-*`, `P-Rb-*` and `P-Dir-1` judge the plan as a whole, and scoping them out
215
- would stop an unrequested-work verdict from blocking a start. So does a coverage
216
- or validation row whose plan has not filled `stageRefs` yet an absent scope is
217
- read as every stage, which is the safe direction.
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-*`, items with no `stageScope`) stay. **Enforced:** `okstra_ctl.plan_items.dispatch_item_ids` / `reverify_item_ids`.
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 only its prior `P-Step-*` / `P-Prep-*` verdicts into the convergence-owned state. Overlap, omissions, and canonical conflicts return `CarryError`. On that error, discard the partial state and run full re-verification.
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
@@ -262,6 +262,6 @@ roles:
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`. Every other plan-item prefix (`P-Dir-1`, `P-Req-*`, `P-Val-*`, `P-Opt-*`, `P-Dep-*`, `P-Rb-*`) carries no stage, so a blocker linked only that way MUST also have its coverage row 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: the row passes the link check and the next re-run cannot place the answer without asking for stage numbers.
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.
@@ -13,10 +13,18 @@ from .convergence_store import write_json_atomic
13
13
  from .final_report_schema import load_schema_version
14
14
  from .report_narrative import parse_narrative, writer_owned_data
15
15
  from .json_boundary import load_owned_object
16
+ from .plan_items import (
17
+ PlanItemContractError,
18
+ content_hash,
19
+ extract_plan_items,
20
+ planning_stage_ledger,
21
+ reverify_item_ids,
22
+ )
16
23
 
17
24
 
18
25
  PREP_VERDICT_RE = re.compile(r"^P-Prep-S([1-9][0-9]*)-")
19
26
  STEP_VERDICT_RE = re.compile(r"^P-Step-([1-9][0-9]*)\.")
27
+ _CHECKLIST_ID_PREFIXES = ("P-Val-", "P-Req-", "P-Rb-")
20
28
 
21
29
 
22
30
  class CarryError(Exception):
@@ -306,6 +314,100 @@ def _plan_item_stage(item: Mapping[str, Any]) -> int | None:
306
314
  return None
307
315
 
308
316
 
317
+ def _checklist_id(item_id: str) -> bool:
318
+ return item_id.startswith(_CHECKLIST_ID_PREFIXES)
319
+
320
+
321
+ def _item_stages(item: Mapping[str, Any]) -> list[int]:
322
+ scope = item.get("stageScope")
323
+ if not isinstance(scope, list):
324
+ return []
325
+ return [
326
+ value for value in scope
327
+ if isinstance(value, int) and not isinstance(value, bool)
328
+ ]
329
+
330
+
331
+ def _stamp_carried(previous: dict, current: Mapping[str, Any], prev_seq: str) -> dict:
332
+ carried = copy.deepcopy(previous)
333
+ carried["carriedForwardFromSeq"] = str(prev_seq)
334
+ current_hash = current.get("contentHash")
335
+ if isinstance(current_hash, str) and current_hash:
336
+ carried["verifiedContentHash"] = current_hash
337
+ carried["contentHash"] = current_hash
338
+ return carried
339
+
340
+
341
+ def _carry_unchanged_checklists(
342
+ prev: Mapping[str, Any],
343
+ narrative: Mapping[str, Any],
344
+ state_items: dict[str, dict],
345
+ prev_items: dict[str, dict],
346
+ *,
347
+ prev_seq: str,
348
+ reverify_stages: set[int],
349
+ ) -> None:
350
+ """본문이 같은 P-Val / P-Req / P-Rb 판정을 이월한다.
351
+
352
+ 단계가 없으면 매 재실행 라운드 1 큐에 남아 이미 통과한 줄이 다시 반대되고
353
+ 새 C 가 열린다. 추출 해시가 같으면 이전 표를 가져오고, 재검증 스테이지에
354
+ 걸린 행과 본문이 바뀐 행은 그대로 둔다.
355
+ """
356
+ try:
357
+ prev_extracted = {
358
+ item["id"]: item
359
+ for item in extract_plan_items(_planning(dict(prev)))
360
+ if isinstance(item.get("id"), str)
361
+ }
362
+ cur_extracted = {
363
+ item["id"]: item
364
+ for item in extract_plan_items(_planning(dict(narrative)))
365
+ if isinstance(item.get("id"), str)
366
+ }
367
+ except (CarryError, PlanItemContractError, KeyError, TypeError):
368
+ return
369
+ for item_id, current in list(state_items.items()):
370
+ if not _checklist_id(item_id):
371
+ continue
372
+ stages = _item_stages(current)
373
+ if stages and set(stages) & reverify_stages:
374
+ continue
375
+ previous = prev_items.get(item_id)
376
+ if previous is None:
377
+ continue
378
+ prev_row = prev_extracted.get(item_id)
379
+ cur_row = cur_extracted.get(item_id)
380
+ if prev_row is None or cur_row is None:
381
+ continue
382
+ if content_hash(prev_row) != content_hash(cur_row):
383
+ continue
384
+ state_items[item_id] = _stamp_carried(previous, current, prev_seq)
385
+
386
+
387
+ def _recompute_dispatch_queue(
388
+ narrative: Mapping[str, Any],
389
+ state_items: dict[str, dict],
390
+ ) -> list[str]:
391
+ try:
392
+ extracted = extract_plan_items(_planning(dict(narrative)))
393
+ except (CarryError, PlanItemContractError, KeyError, TypeError):
394
+ return []
395
+ by_id = {
396
+ item["id"]: item
397
+ for item in extracted
398
+ if isinstance(item.get("id"), str)
399
+ }
400
+ previous_hashes = {
401
+ item_id: content_hash(by_id[item_id])
402
+ for item_id, row in state_items.items()
403
+ if row.get("carriedForwardFromSeq") and item_id in by_id
404
+ }
405
+ if not previous_hashes:
406
+ return []
407
+ ledger = planning_stage_ledger(_planning(dict(narrative)))
408
+ return reverify_item_ids(extracted, previous_hashes, ledger)
409
+
410
+
309
411
  def _writer_stage_rows(data: Mapping[str, Any], *, snapshot: str) -> dict[int, dict]:
310
412
  planning = _planning(dict(writer_owned_data(data)))
311
413
  return _stage_rows(planning, snapshot=snapshot)
@@ -320,7 +422,7 @@ def merge_v3_plan_state(
320
422
  carry_stages: set[int],
321
423
  reverify_stages: set[int],
322
424
  ) -> dict[str, Any]:
323
- """이전 판정 중 이월 스테이지 소유분만 v3 수렴 상태에 복사한다."""
425
+ """이전 판정 중 이월 스테이지 소유분과 본문이 같은 체크리스트를 복사한다."""
324
426
  prev_stages = _writer_stage_rows(prev, snapshot="prior")
325
427
  cur_stages = _stage_rows(_planning(narrative), snapshot="current")
326
428
  _validate_stage_sets(prev_stages, cur_stages, carry_stages, reverify_stages)
@@ -351,9 +453,7 @@ def merge_v3_plan_state(
351
453
  for field in ("subject", "sourceSection"):
352
454
  if current.get(field) != previous.get(field):
353
455
  raise CarryError(f"carry-owned plan item {item_id} changed {field}")
354
- carried = copy.deepcopy(previous)
355
- carried["carriedForwardFromSeq"] = str(prev_seq)
356
- state_items[item_id] = carried
456
+ state_items[item_id] = _stamp_carried(previous, current, prev_seq)
357
457
 
358
458
  prior_carried_ids = {
359
459
  item_id
@@ -363,12 +463,55 @@ def merge_v3_plan_state(
363
463
  missing = sorted(prior_carried_ids - set(state_items))
364
464
  if missing:
365
465
  raise CarryError(f"current state omitted carry-owned plan items: {missing}")
366
- state["planBodyVerification"]["planItems"] = [
466
+ _carry_unchanged_checklists(
467
+ prev,
468
+ narrative,
469
+ state_items,
470
+ prev_items,
471
+ prev_seq=prev_seq,
472
+ reverify_stages=reverify_stages,
473
+ )
474
+ pbv = state.setdefault("planBodyVerification", {})
475
+ pbv["planItems"] = [
367
476
  state_items[item_id] for item_id in sorted(state_items)
368
477
  ]
478
+ queue = _recompute_dispatch_queue(narrative, state_items)
479
+ if queue:
480
+ pbv["dispatchQueue"] = queue
369
481
  return state
370
482
 
371
483
 
484
+ def _sync_prepared_dispatch_queue(state_path: Path, merged: Mapping[str, Any]) -> None:
485
+ """이월 뒤 프롬프트 큐를 상태 파일과 맞춘다.
486
+
487
+ `plan-items prompt` 는 prepare 가 쓴 `plan-items-*.json` 을 읽는다. 시드가
488
+ 그 파일을 먼저 쓰므로, 이월이 큐를 줄인 뒤에는 형제 파일을 같이 고쳐야
489
+ 워커가 이미 통과한 P-Val 을 다시 보지 않는다.
490
+ """
491
+ name = state_path.name
492
+ prefix = "plan-body-verification-"
493
+ if not name.startswith(prefix):
494
+ return
495
+ prepared = state_path.with_name("plan-items-" + name.removeprefix(prefix))
496
+ if not prepared.is_file():
497
+ return
498
+ queue = (
499
+ merged.get("planBodyVerification", {}).get("dispatchQueue")
500
+ if isinstance(merged.get("planBodyVerification"), Mapping)
501
+ else None
502
+ )
503
+ if not isinstance(queue, list):
504
+ return
505
+ try:
506
+ envelope = load_owned_object(prepared, artifact="prepared plan items")
507
+ except (OSError, ValueError):
508
+ return
509
+ if not isinstance(envelope, dict):
510
+ return
511
+ envelope["dispatchQueue"] = queue
512
+ write_json_atomic(prepared, envelope)
513
+
514
+
372
515
  def _parse_stage_csv(value: str | None, *, option: str) -> set[int] | None:
373
516
  if value is None:
374
517
  return None
@@ -457,6 +600,7 @@ def main(argv: list[str]) -> int:
457
600
 
458
601
  try:
459
602
  write_json_atomic(output, merged)
603
+ _sync_prepared_dispatch_queue(output, merged)
460
604
  except OSError as exc:
461
605
  print(f"carry refused: --out could not be written: {exc}", file=sys.stderr)
462
606
  return 1
@@ -34,9 +34,8 @@ DECLARED_FULL_PREFIX = "declared structural change:"
34
34
  UNRESOLVED_MODE = "unresolved"
35
35
 
36
36
  # `P-Step-<stage>.<step>` and `P-Prep-S<stage>-<kind>` carry their stage in the
37
- # id itself. Every other prefix (`P-Opt`, `P-Dep`, `P-Val`, `P-Rb`, `P-Req`) is
38
- # numbered by position in its own array, so its stage is only recoverable from
39
- # the prose the planner wrote.
37
+ # id itself. Every other prefix is numbered by position; its stage comes from
38
+ # `stageScope` / `stageRefs`, then from the prose the planner wrote.
40
39
  _STRUCTURAL_STAGE_IN_ID_RE = re.compile(r"^P-(?:Step-(\d+)\.\d+|Prep-S(\d+)-)")
41
40
 
42
41
 
@@ -131,10 +130,32 @@ def design_prep_impacted_stages(data: dict, item_ids: set[str]) -> set[int]:
131
130
  return impacted
132
131
 
133
132
 
133
+ def _int_stages(value: object) -> set[int]:
134
+ if not isinstance(value, list):
135
+ return set()
136
+ stages: set[int] = set()
137
+ for entry in value:
138
+ if isinstance(entry, int) and not isinstance(entry, bool) and entry >= 1:
139
+ stages.add(entry)
140
+ return stages
141
+
142
+
134
143
  def _plan_item_stages(item: dict) -> set[int]:
144
+ """항목이 걸린 스테이지. id 좌표, 그다음 기록된 범위, 그다음 산문.
145
+
146
+ `P-Val-*` / `P-Req-*` 는 위치 번호라 id 에서 스테이지가 안 나온다. 행이
147
+ `stageScope` / `stageRefs` 를 실어도 산문 `subject` 만 읽으면 C-039 같은
148
+ 답이 unlinked 가 되어 재실행이 full 로 떨어진다.
149
+ """
135
150
  structural = _STRUCTURAL_STAGE_IN_ID_RE.match(str(item.get("id") or ""))
136
151
  if structural:
137
152
  return {int(structural.group(1) or structural.group(2))}
153
+ stages = _int_stages(item.get("stageScope")) or _int_stages(item.get("stageRefs"))
154
+ payload = item.get("payload")
155
+ if not stages and isinstance(payload, dict):
156
+ stages = _int_stages(payload.get("stageRefs"))
157
+ if stages:
158
+ return stages
138
159
  return cited_stage_numbers(str(item.get("subject") or ""))
139
160
 
140
161
 
@@ -169,6 +190,7 @@ def _stages_blocked_on(coverage: object, clarification_id: str) -> set[int]:
169
190
  for row in coverage if isinstance(coverage, list) else []:
170
191
  if coverage_row_blocked_on(row, clarification_id):
171
192
  stages |= cited_stage_numbers(str(row.get("coveredBy") or ""))
193
+ stages |= _int_stages(row.get("stageRefs"))
172
194
  return stages
173
195
 
174
196
 
@@ -407,6 +407,15 @@ def expected_plan_item_ids(implementation_planning: Mapping[str, Any]) -> list[s
407
407
 
408
408
  _STARTABLE_STATUSES = frozenset({"ready", "active"})
409
409
 
410
+ # 계획 전체를 판정하는 항목. 스테이지 하나를 고쳐도 요청하지 않은 작업이
411
+ # 들어왔는지 다시 봐야 한다. P-Val / P-Req / P-Rb 는 여기 넣지 않는다 —
412
+ # stageRefs 가 비어 있어도 이웃 수정의 일소 대상이 되면 C 행이 매 라운드 늘어난다.
413
+ _PLAN_WIDE_ID_PREFIXES = ("P-Opt-", "P-Var-", "P-Dir-", "P-Dep-")
414
+
415
+
416
+ def _is_plan_wide(item_id: str) -> bool:
417
+ return item_id.startswith(_PLAN_WIDE_ID_PREFIXES)
418
+
410
419
 
411
420
  def content_hash(item: Mapping[str, Any]) -> str:
412
421
  """이 항목 본문의 지문. 문구가 같으면 라운드가 달라도 같은 판정이다.
@@ -430,9 +439,13 @@ def stage_scope_bucket(
430
439
  ) -> str:
431
440
  """게이트·디스패치가 공유하는 범위. ``in-scope`` / ``observed`` / ``deferred``.
432
441
 
433
- 원장이 없거나 항목에 스테이지가 없으면 계획 전체로 읽는다. 검증기
442
+ 원장이 없거나 계획 전체 항목이면 in-scope 이다. 검증기
434
443
  ``_stage_scope_bucket`` 과 같은 판정이어야 한다 — 디스패치와 게이트가
435
444
  다른 통을 쓰면 워커가 본 항목과 승인을 막는 항목이 갈라진다.
445
+
446
+ 단계가 없는 ``P-Val`` / ``P-Req`` / ``P-Rb`` 는 원장에 ``done`` 이 생긴
447
+ 뒤부터는 다음 착수를 막지 않는다. 생략된 ``stageRefs`` 를 모든 스테이지로
448
+ 읽으면 이미 끝난 계획의 재실행마다 체크리스트 전부가 다시 채점된다.
436
449
  """
437
450
  if not isinstance(ledger, Mapping) or not ledger:
438
451
  return "in-scope"
@@ -442,6 +455,11 @@ def stage_scope_bucket(
442
455
  if isinstance(value, int) and not isinstance(value, bool)
443
456
  ] if isinstance(scope, list) else []
444
457
  if not stages:
458
+ item_id = str(item.get("id") or "")
459
+ if _is_plan_wide(item_id):
460
+ return "in-scope"
461
+ if "done" in {str(value) for value in ledger.values()}:
462
+ return "deferred"
445
463
  return "in-scope"
446
464
  statuses = {str(ledger.get(str(stage)) or "") for stage in stages}
447
465
  if statuses & _STARTABLE_STATUSES:
@@ -548,6 +566,10 @@ def reverify_item_ids(
548
566
 
549
567
  이전이 없으면 첫 라운드라 디스패치 큐 전부다. 해시가 같은 다른 스테이지
550
568
  항목은 보내지 않는다 — 그게 96개 일소 배치를 만들던 규칙이다.
569
+
570
+ 단계가 없는 항목 전부가 계획 전체는 아니다. `P-Opt` / `P-Var` / `P-Dir` /
571
+ `P-Dep` 만 이웃 수정에 다시 묶인다. `P-Val` / `P-Req` / `P-Rb` 는 자기
572
+ 해시가 바뀔 때만 다시 본다.
551
573
  """
552
574
  dispatched = dispatch_item_ids(items, ledger)
553
575
  by_id = {
@@ -558,8 +580,8 @@ def reverify_item_ids(
558
580
  if not previous_hashes:
559
581
  return dispatched
560
582
  changed = [
561
- item_id for item_id in dispatched
562
- if previous_hashes.get(item_id) != content_hash(by_id[item_id])
583
+ item_id for item_id, item in by_id.items()
584
+ if previous_hashes.get(item_id) != content_hash(item)
563
585
  ]
564
586
  changed_stages: set[int] = set()
565
587
  for item_id in changed:
@@ -570,6 +592,7 @@ def reverify_item_ids(
570
592
  if isinstance(value, int) and not isinstance(value, bool)
571
593
  )
572
594
  queue: list[str] = []
595
+ queued: set[str] = set()
573
596
  for item_id in dispatched:
574
597
  item = by_id[item_id]
575
598
  scope = item.get("stageScope")
@@ -578,11 +601,24 @@ def reverify_item_ids(
578
601
  if isinstance(value, int) and not isinstance(value, bool)
579
602
  ] if isinstance(scope, list) else []
580
603
  if not stages:
581
- if changed:
604
+ if item_id in changed or (changed and _is_plan_wide(item_id)):
582
605
  queue.append(item_id)
606
+ queued.add(item_id)
583
607
  continue
584
608
  if item_id in changed or changed_stages.intersection(stages):
585
609
  queue.append(item_id)
610
+ queued.add(item_id)
611
+ # done 이후 디스패치에서 빠진 체크리스트라도 본문이 바뀌면 다시 본다.
612
+ for item_id in changed:
613
+ if item_id in queued or item_id not in by_id:
614
+ continue
615
+ scope = by_id[item_id].get("stageScope")
616
+ stages = [
617
+ value for value in scope
618
+ if isinstance(value, int) and not isinstance(value, bool)
619
+ ] if isinstance(scope, list) else []
620
+ if not stages:
621
+ queue.append(item_id)
586
622
  return queue
587
623
 
588
624
 
@@ -59,16 +59,28 @@ If the host has a native picker, use it. Otherwise print a numbered list.
59
59
  okstra chat unread --room <room> --as <display>
60
60
  ```
61
61
 
62
- Show the rows. Each row is `id:time:recipient:body`.
62
+ Show the rows. Each row is `id:time:@from:to:body`. Recipient `all` stays `all`. Sender is always `@name`.
63
+
64
+ If the output is `no unread`, do not ack.
65
+
66
+ If there are unread rows, always run:
67
+
68
+ ```bash
69
+ okstra chat ack --room <room> --as <display> --through <id>
70
+ ```
71
+
72
+ Use the last unread row's id. CLI unread does not move the cursor; this ack does.
63
73
 
64
74
  ## Step 3: Next action
65
75
 
66
- Ask: send, inbox, log, ack, or done.
76
+ Ask: send, unread, inbox, log, or done.
77
+
78
+ There is no ack menu item. Choosing unread again shows the rows then acks, same as Step 2.
67
79
 
68
80
  ### Send
69
81
 
70
82
  1. Run `okstra chat members --room <room>`.
71
- 2. Pick the recipient from `all` plus those names. Recipient is required.
83
+ 2. Pick the recipient from `all` plus those names except the current display name (`--as`). Filter after `okstra chat members`. Do not pass `--as` to `members`. Recipient is required.
72
84
  3. Ask for the body as free input.
73
85
  4. Run `okstra chat send --room <room> --as <display> --to <all|name> --body <text>`.
74
86
 
@@ -78,7 +90,7 @@ Ask: send, inbox, log, ack, or done.
78
90
  okstra chat inbox --room <room> --as <display>
79
91
  ```
80
92
 
81
- This is every arrival to `@you` or `all`, including messages already acked.
93
+ This is every arrival to `@you` or `all`, including messages already acked and messages you sent to `all` or to yourself. Inbox does not move the cursor.
82
94
 
83
95
  ### Log
84
96
 
@@ -86,15 +98,7 @@ This is every arrival to `@you` or `all`, including messages already acked.
86
98
  okstra chat log --room <room> --as <display>
87
99
  ```
88
100
 
89
- The whole room, including messages not addressed to you.
90
-
91
- ### Ack
92
-
93
- After unread, mark the last id the user has read:
94
-
95
- ```bash
96
- okstra chat ack --room <room> --as <display> --through <id>
97
- ```
101
+ The whole room, including messages not addressed to you. Log does not move the cursor.
98
102
 
99
103
  ## Rules
100
104
 
@@ -4178,10 +4178,11 @@ def _stage_scope_bucket(item: dict, pbv: dict) -> str:
4178
4178
 
4179
4179
  Returns `in-scope` (may block), `observed` (only frozen stages), or
4180
4180
  `deferred` (only stages not yet startable). Anything unresolvable is
4181
- `in-scope`: an absent ledger is no basis to narrow, and an item with no
4182
- `stageScope` belongs to the plan as a whole — `P-Opt-*` and `P-Var-*` live
4183
- there permanently, and scoping them out would stop an unrequested-work
4184
- verdict from blocking a start.
4181
+ `in-scope`: an absent ledger is no basis to narrow. Plan-wide items
4182
+ (`P-Opt-*`, `P-Var-*`, `P-Dep-*`, `P-Dir-1`) with no `stageScope` stay
4183
+ in-scope. An unscoped `P-Val-*` / `P-Req-*` / `P-Rb-*` stays in-scope only
4184
+ until a stage is `done`; after that it is `deferred` so a re-plan does not
4185
+ re-score the whole checklist.
4185
4186
 
4186
4187
  디스패치 큐와 같은 함수를 쓴다. 검증기가 다른 통을 내면 워커가 안 본
4187
4188
  항목이 승인을 막거나, 본 항목이 게이트에서 빠진다.
@@ -6161,12 +6162,13 @@ def _validate_approval_clarification_backtrace(
6161
6162
  f"final-report data.json: clarification `{row_id}` blocks approval "
6162
6163
  "and is linked, but the link resolves to no stage. `incremental-"
6163
6164
  "scope` reads the stage from a `P-Step-<stage>.<step>` / `P-Prep-"
6164
- "S<stage>-<kind>` plan-item id, or from a `Stage N` citation in the "
6165
- f"blocked coverage row's `coveredBy`. A `P-Req-*` / `P-Val-*` id "
6166
- "carries no stage number, so a row linked only that way must cite "
6167
- "the stage in `coveredBy`. A blocker whose blast radius resolves to "
6168
- "no stage cannot auto-narrow the next re-run; this report fails "
6169
- "rather than forcing a full re-run."
6165
+ "S<stage>-<kind>` plan-item id, from `stageScope` / `stageRefs` on "
6166
+ "the linked plan item or coverage row, or from a `Stage N` citation "
6167
+ f"in the blocked coverage row's `coveredBy`. A `P-Req-*` / `P-Val-*` "
6168
+ "id carries no stage number, so a row linked only that way must "
6169
+ "carry `stageRefs` or cite the stage in `coveredBy`. A blocker "
6170
+ "whose blast radius resolves to no stage cannot auto-narrow the "
6171
+ "next re-run; this report fails rather than forcing a full re-run."
6170
6172
  )
6171
6173
 
6172
6174
 
@@ -8238,11 +8240,11 @@ def _validate_plan_body_clarification_matching(
8238
8240
  failures: list[str],
8239
8241
  accepted_item_ids: set[str] | None = None,
8240
8242
  ) -> None:
8241
- """H5 — every plan item that the recorded verdicts make `majority-disagree`
8242
- must point (via `clarificationId`) at an existing `blocks: approval`
8243
- clarification row. Closes the hole where a majority-disagree item blocks the
8244
- gate but no §1 Clarification row is raised, so the user never sees why
8245
- approval is withheld (implementation-planning.md self-review step 7).
8243
+ """H5 — every plan item whose *gate class after stage scope* is
8244
+ `majority-disagree` must point at an existing `blocks: approval`
8245
+ clarification row. Observed / deferred / record items stay in `setAside`
8246
+ and must not become a new C row — that is what grew the clarification
8247
+ list while the next stage was already executable.
8246
8248
  """
8247
8249
  ip = data.get("implementationPlanning")
8248
8250
  if not isinstance(ip, dict):
@@ -8264,9 +8266,7 @@ def _validate_plan_body_clarification_matching(
8264
8266
  for item in pbv.get("planItems") or []:
8265
8267
  if not isinstance(item, dict):
8266
8268
  continue
8267
- if _classify_plan_item_gate(item) != "majority-disagree":
8268
- continue
8269
- if _is_dissent_downgraded(item, pbv, accepted):
8269
+ if _plan_item_gate_class(item, pbv, accepted) != "majority-disagree":
8270
8270
  continue
8271
8271
  item_id = item.get("id") or "<unknown>"
8272
8272
  cids = _plan_item_clarification_ids(item)
@@ -8319,7 +8319,7 @@ def _validate_self_fix_before_clarification(data: dict, failures: list[str]) ->
8319
8319
  for item in pbv.get("planItems") or []:
8320
8320
  if not isinstance(item, dict):
8321
8321
  continue
8322
- if _classify_plan_item_gate(item) != "majority-disagree":
8322
+ if _plan_item_gate_class(item, pbv, set()) != "majority-disagree":
8323
8323
  continue
8324
8324
  if _has_planner_fixable_majority(item):
8325
8325
  allowed = " / ".join(sorted(_SELF_FIX_EXHAUSTED_REASONS))