okstra 0.214.1 → 0.216.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 +2 -1
- package/dist/cli-registry.d.mts +14 -0
- package/dist/cli-registry.mjs +12 -0
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/chat/chat.mjs +2 -56
- package/dist/commands/chat/chat.mjs.map +1 -1
- package/dist/commands/execute/render-bundle.mjs +5 -2
- package/dist/commands/execute/render-bundle.mjs.map +1 -1
- package/dist/commands/execute/wizard.mjs +6 -0
- package/dist/commands/execute/wizard.mjs.map +1 -1
- package/dist/commands/memory/memory.mjs +57 -6
- package/dist/commands/memory/memory.mjs.map +1 -1
- package/dist/lib/file-lock.d.mts +1 -0
- package/dist/lib/file-lock.mjs +60 -0
- package/dist/lib/file-lock.mjs.map +1 -0
- package/dist/lib/python-command.mjs +11 -1
- package/dist/lib/python-command.mjs.map +1 -1
- package/dist/lib/skill-catalog.mjs +1 -0
- package/dist/lib/skill-catalog.mjs.map +1 -1
- package/dist/lib/types.d.mts +1 -1
- package/docs/architecture.md +2 -2
- package/docs/cli.md +36 -14
- package/docs/project-structure-overview.md +6 -3
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/lib/okstra/cli.sh +9 -2
- package/runtime/bin/lib/okstra/globals.sh +2 -0
- package/runtime/bin/lib/okstra/interactive.sh +8 -2
- package/runtime/bin/lib/okstra/usage.sh +3 -1
- package/runtime/bin/okstra.sh +7 -1
- package/runtime/prompts/duties/discussion-worker.json +32 -0
- package/runtime/prompts/lead/convergence.md +58 -136
- package/runtime/prompts/lead/okstra-lead-contract.md +45 -12
- package/runtime/prompts/profiles/_common-contract.md +1 -1
- package/runtime/prompts/wizard/prompts.ko.json +14 -1
- package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +4 -0
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +4 -11
- package/runtime/python/okstra_ctl/agent/invocation.py +1 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/dynamic_verifier.py +2 -2
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +4 -4
- package/runtime/python/okstra_ctl/agent/prompt_cli/run_identity.py +2 -2
- package/runtime/python/okstra_ctl/analysis_packet.py +3 -0
- package/runtime/python/okstra_ctl/consumers.py +8 -2
- package/runtime/python/okstra_ctl/convergence.py +143 -29
- package/runtime/python/okstra_ctl/convergence_critic_prompt.py +57 -0
- package/runtime/python/okstra_ctl/convergence_critic_verify_prompt.py +106 -0
- package/runtime/python/okstra_ctl/convergence_engine.py +140 -95
- package/runtime/python/okstra_ctl/convergence_reverify_prompt.py +3 -27
- package/runtime/python/okstra_ctl/convergence_store.py +11 -4
- package/runtime/python/okstra_ctl/dispatch_core.py +4 -1
- package/runtime/python/okstra_ctl/domain/role.py +1 -0
- package/runtime/python/okstra_ctl/manager_cli.py +27 -1
- package/runtime/python/okstra_ctl/manager_launch.py +44 -4
- package/runtime/python/okstra_ctl/manager_sync.py +14 -1
- package/runtime/python/okstra_ctl/manager_view.py +53 -1
- package/runtime/python/okstra_ctl/next_phase.py +1 -0
- package/runtime/python/okstra_ctl/phases/catalog.py +2 -1
- package/runtime/python/okstra_ctl/phases/discussion/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/discussion/boundary.json +11 -0
- package/runtime/python/okstra_ctl/phases/discussion/cli.py +512 -0
- package/runtime/python/okstra_ctl/phases/discussion/entry.py +116 -0
- package/runtime/python/okstra_ctl/phases/discussion/followup.py +876 -0
- package/runtime/python/okstra_ctl/phases/discussion/memory.py +294 -0
- package/runtime/python/okstra_ctl/phases/discussion/overview.py +85 -0
- package/runtime/python/okstra_ctl/phases/discussion/profile.json +31 -0
- package/runtime/python/okstra_ctl/phases/discussion/profile.md +48 -0
- package/runtime/python/okstra_ctl/phases/discussion/report.py +73 -0
- package/runtime/python/okstra_ctl/phases/discussion/report_assets/discussion.template.html +15 -0
- package/runtime/python/okstra_ctl/phases/discussion/report_assets/discussion.template.md +6 -0
- package/runtime/python/okstra_ctl/phases/discussion/spec.md +197 -0
- package/runtime/python/okstra_ctl/phases/discussion/store.py +1143 -0
- package/runtime/python/okstra_ctl/phases/discussion/validation.py +111 -0
- package/runtime/python/okstra_ctl/phases/discussion/wizard.py +90 -0
- package/runtime/python/okstra_ctl/phases/discussion/workflow.py +667 -0
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-deliverable.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/host-rules.md +4 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +1 -1
- package/runtime/python/okstra_ctl/phases/requirements_discovery/spec.md +1 -1
- package/runtime/python/okstra_ctl/plan_run_root.py +8 -0
- package/runtime/python/okstra_ctl/render.py +7 -20
- package/runtime/python/okstra_ctl/render_final_report.py +2 -1
- package/runtime/python/okstra_ctl/report_assembly.py +22 -0
- package/runtime/python/okstra_ctl/report_contract.py +2 -0
- package/runtime/python/okstra_ctl/report_narrative.py +13 -4
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +10 -0
- package/runtime/python/okstra_ctl/run.py +40 -7
- package/runtime/python/okstra_ctl/stage_close.py +46 -11
- package/runtime/python/okstra_ctl/stage_reopen.py +151 -0
- package/runtime/python/okstra_ctl/verdict_blocks.py +11 -35
- package/runtime/python/okstra_ctl/wizard/cli.py +8 -0
- package/runtime/python/okstra_ctl/wizard/confirmation.py +4 -1
- package/runtime/python/okstra_ctl/wizard/engine.py +8 -0
- package/runtime/python/okstra_ctl/wizard/ids.py +12 -0
- package/runtime/python/okstra_ctl/wizard/registry.py +35 -3
- package/runtime/python/okstra_ctl/wizard/render.py +4 -1
- package/runtime/python/okstra_ctl/wizard/sources.py +2 -2
- package/runtime/python/okstra_ctl/wizard/state.py +11 -1
- package/runtime/python/okstra_ctl/wizard/steps_identity.py +4 -4
- package/runtime/python/okstra_ctl/worker_prompt_policy.py +24 -6
- package/runtime/python/okstra_token_usage/pricing.py +2 -0
- package/runtime/schemas/convergence-groups-v1.0.schema.json +1 -1
- package/runtime/schemas/convergence-groups-v2.0.schema.json +1 -1
- package/runtime/schemas/final-report-v3.0.schema.json +90 -1
- package/runtime/skills/_fragments/wizard-bash-invocation-rule.md +1 -0
- package/runtime/skills/_fragments/wizard-confirm-step.md +7 -0
- package/runtime/skills/_fragments/wizard-lead-takeover.md +8 -0
- package/runtime/skills/_fragments/wizard-preflight.md +75 -0
- package/runtime/skills/_fragments/wizard-prompt-loop.md +22 -0
- package/runtime/skills/_fragments/wizard-relay-protocol.md +40 -0
- package/runtime/skills/_fragments/wizard-render-bundle.md +74 -0
- package/runtime/skills/okstra-discussion/SKILL.md +347 -0
- package/runtime/skills/okstra-pr-gen/SKILL.md +7 -0
- package/runtime/skills/okstra-run/SKILL.md +22 -2
- package/runtime/templates/manager/view.template.html +3 -0
- package/runtime/templates/reports/html/i18n/en.json +5 -0
- package/runtime/templates/reports/html/i18n/ko.json +5 -0
- package/runtime/validators/validate-brief.py +3 -2
- package/runtime/validators/validate-run.py +4 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.mjs","sourceRoot":"","sources":["../../../src/commands/memory/memory.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,SAAS;IACT,UA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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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withFileLock<T>(lockPath: string, busyMessage: string, fn: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
// 잠금 한 번의 작업은 밀리초 단위다. 이보다 오래된 잠금은 죽은 프로세스의 잔여다.
|
|
4
|
+
const STALE_LOCK_MS = 5_000;
|
|
5
|
+
function processAlive(pid) {
|
|
6
|
+
try {
|
|
7
|
+
process.kill(pid, 0);
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
// ESRCH 만 "없는 프로세스"다. EPERM 은 다른 사용자의 살아 있는 프로세스다.
|
|
12
|
+
return err.code !== "ESRCH";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// 잠금 파일에는 소유자 pid 가 있다. 소유자가 죽었거나 잠금이 오래되면 지운다.
|
|
16
|
+
async function reclaimStaleLock(lockPath) {
|
|
17
|
+
let ownerText;
|
|
18
|
+
let mtimeMs;
|
|
19
|
+
try {
|
|
20
|
+
ownerText = await fs.readFile(lockPath, "utf8");
|
|
21
|
+
mtimeMs = (await fs.stat(lockPath)).mtimeMs;
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
if (err.code === "ENOENT")
|
|
25
|
+
return;
|
|
26
|
+
throw err;
|
|
27
|
+
}
|
|
28
|
+
const owner = Number.parseInt(ownerText.trim(), 10);
|
|
29
|
+
const ownerDead = Number.isInteger(owner) && owner > 0 && !processAlive(owner);
|
|
30
|
+
const tooOld = Date.now() - mtimeMs > STALE_LOCK_MS;
|
|
31
|
+
if (ownerDead || tooOld)
|
|
32
|
+
await fs.rm(lockPath, { force: true });
|
|
33
|
+
}
|
|
34
|
+
export async function withFileLock(lockPath, busyMessage, fn) {
|
|
35
|
+
await fs.mkdir(dirname(lockPath), { recursive: true });
|
|
36
|
+
let handle;
|
|
37
|
+
for (let i = 0; i < 50; i++) {
|
|
38
|
+
try {
|
|
39
|
+
handle = await fs.open(lockPath, "wx");
|
|
40
|
+
await handle.writeFile(`${process.pid}\n`, "utf8");
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
if (err.code !== "EEXIST")
|
|
45
|
+
throw err;
|
|
46
|
+
await reclaimStaleLock(lockPath);
|
|
47
|
+
await new Promise((resolve) => setTimeout(resolve, 20));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (handle === undefined)
|
|
51
|
+
throw new Error(busyMessage);
|
|
52
|
+
try {
|
|
53
|
+
return await fn();
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
await handle.close();
|
|
57
|
+
await fs.rm(lockPath, { force: true });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=file-lock.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-lock.mjs","sourceRoot":"","sources":["../../src/lib/file-lock.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,iDAAiD;AACjD,MAAM,aAAa,GAAG,KAAK,CAAC;AAE5B,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,mDAAmD;QACnD,OAAQ,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IAAI,CAAC;YACH,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACvC,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM;QACR,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,GAAG,CAAC;YAChE,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACjC,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IACD,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { runInstalledScript, runPythonModule } from "./python-helper.mjs";
|
|
2
|
+
import { join } from "node:path";
|
|
2
3
|
import { resolvePaths } from "./paths.mjs";
|
|
4
|
+
import { getPackageRoot } from "./version.mjs";
|
|
3
5
|
// 이 명령이 스스로 정하는 플래그. 사용자가 같은 플래그를 주면 주입값과
|
|
4
6
|
// 충돌하므로 파이썬에 닿기 전에 exit 2 로 끊는다.
|
|
5
7
|
function ownedFlags(spec) {
|
|
@@ -10,6 +12,14 @@ function ownedFlags(spec) {
|
|
|
10
12
|
function findForbidden(args, owned) {
|
|
11
13
|
return args.find((arg) => owned.some((flag) => arg === flag || arg.startsWith(`${flag}=`)));
|
|
12
14
|
}
|
|
15
|
+
// okstra-cli 는 지금 실행 중인 패키지의 진입점이다 — PATH 의 okstra 는 다른 설치본일 수 있다.
|
|
16
|
+
function injectedPath(which, paths) {
|
|
17
|
+
if (which === "okstra-bin")
|
|
18
|
+
return paths.bin;
|
|
19
|
+
if (which === "okstra-cli")
|
|
20
|
+
return join(getPackageRoot(), "bin", "okstra");
|
|
21
|
+
return paths.workspace;
|
|
22
|
+
}
|
|
13
23
|
// 레지스트리 한 줄을 실행 가능한 러너로 바꾼다. 명령마다 있던 포워더 파일이
|
|
14
24
|
// 하던 일 — 인자 앞에 고정 argv 를 붙이고 python 을 띄우는 것 — 이 전부다.
|
|
15
25
|
// `--help` 는 파이썬 argparse 에 그대로 도달한다: 도움말의 저자는 파이썬이다.
|
|
@@ -25,7 +35,7 @@ export function makePythonRunner(name, spec) {
|
|
|
25
35
|
if (spec.inject?.length) {
|
|
26
36
|
const paths = await resolvePaths();
|
|
27
37
|
for (const which of spec.inject) {
|
|
28
|
-
injected.push(`--${which}`, which
|
|
38
|
+
injected.push(`--${which}`, injectedPath(which, paths));
|
|
29
39
|
}
|
|
30
40
|
}
|
|
31
41
|
injected.push(...(spec.prefix ?? []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python-command.mjs","sourceRoot":"","sources":["../../src/lib/python-command.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"python-command.mjs","sourceRoot":"","sources":["../../src/lib/python-command.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,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D,OAAO,MAAM,kBAAkB,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-catalog.mjs","sourceRoot":"","sources":["../../src/lib/skill-catalog.mts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,0EAA0E;AAC1E,8CAA8C;AAE9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,sBAAsB;IACtB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC,CAAC;AAEH,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,QAAQ;IACR,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,sEAAsE;IACtE,0EAA0E;IAC1E,gEAAgE;IAChE,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,GAAG,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"skill-catalog.mjs","sourceRoot":"","sources":["../../src/lib/skill-catalog.mts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,0EAA0E;AAC1E,8CAA8C;AAE9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,sBAAsB;IACtB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC,CAAC;AAEH,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,QAAQ;IACR,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,sEAAsE;IACtE,0EAA0E;IAC1E,gEAAgE;IAChE,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,GAAG,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/lib/types.d.mts
CHANGED
|
@@ -53,7 +53,7 @@ export type PythonTarget = {
|
|
|
53
53
|
} | {
|
|
54
54
|
readonly script: string;
|
|
55
55
|
};
|
|
56
|
-
export type PythonInjectedPath = "workspace-root" | "okstra-bin";
|
|
56
|
+
export type PythonInjectedPath = "workspace-root" | "okstra-bin" | "okstra-cli";
|
|
57
57
|
export interface PythonCommandSpec {
|
|
58
58
|
readonly target: PythonTarget;
|
|
59
59
|
readonly prefix?: readonly string[];
|
package/docs/architecture.md
CHANGED
|
@@ -156,9 +156,9 @@ Runtime entry points are consolidated in Python packages. Bash and skills only c
|
|
|
156
156
|
- Host and provider registries remain separate: the active registered host owns the native lead session, while non-native providers run through their registered CLI wrappers.
|
|
157
157
|
- [`skills/okstra-setup/SKILL.md`](../skills/okstra-setup/SKILL.md) — **first-run bootstrap**. Runs `okstra install` and creates `project.json`.
|
|
158
158
|
- [`skills/okstra-run/SKILL.md`](../skills/okstra-run/SKILL.md) — host-aware in-session entry point that starts an okstra task in the current registered host session and calls `prepare_task_bundle` directly.
|
|
159
|
-
-
|
|
159
|
+
- Sixteen skills are user-invocable: `skills/okstra-setup/SKILL.md`, `skills/okstra-brief-gen/SKILL.md`, `skills/okstra-run/SKILL.md`, `skills/okstra-discussion/SKILL.md`, `skills/okstra-manager/SKILL.md`, `skills/okstra-memory/SKILL.md`, `skills/okstra-chat/SKILL.md`, `skills/okstra-inspect/SKILL.md`, `skills/okstra-rollup/SKILL.md`, `skills/okstra-usage/SKILL.md`, `skills/okstra-schedule-gen/SKILL.md`, `skills/okstra-container-build/SKILL.md`, `skills/okstra-pr-gen/SKILL.md`, `skills/okstra-user-response/SKILL.md`, `skills/okstra-code-review/SKILL.md`, and `skills/okstra-explain-flow/SKILL.md`. Only these are copied into the agent skill home. They cover brief authoring, phase execution, multi-agent discussions that settle requirements before planning, cross-project manager task coordination, global Memory Book storage/search, global chat rooms, read-side status/history/report/time/logs/cost/errors/recap, task-group-level aggregation of run results (rollup), project-wide historical resource usage, schedule support, local container deployment, PR description generation, clarification-response submission, and census-based code review of a stage or branch diff. `okstra-manager` uses `okstra manager` CLI JSON/launch packets as the source of truth, and stores manager-owned plans, assignments, directives, snapshots, and events under `~/.okstra/managers/<manager-id>/`. `okstra-rollup` is a read-side layer that fans the single-task aggregators from `okstra-inspect` (time/errors/recap) out to a task group or the whole project catalog. The `okstra rollup` CLI owns deterministic aggregation, while the skill (LLM) writes only the synthesized report summary. `okstra-usage` is a separate read-only resource snapshot grouped by lifecycle task type; it does not replace single-task `okstra-inspect` detail or the status/report digest from `okstra-rollup`. The canonical definition of `okstra-inspect` read-side facets is the subcommand table in `skills/okstra-inspect/SKILL.md`. `okstra-inspect logs` provides a read-only inventory and cleanup guidance for the live-log sidecars that the Codex/Antigravity wrappers write on every dispatch at the resolved `<run-dir>/prompts/<worker>-prompt-<phase>-<seq>.log`; for stage executions, the stage-qualified `run_dir` includes `stage-<N>/`. `okstra-inspect cost` summarizes `okstra context-cost`; `okstra-inspect errors` collects a task's okstra-run error logs into a timestamped Markdown error report and prints a summary; and `okstra-inspect recap` answers free-form questions about `.okstra` artifacts in addition to summarizing phases before and after each task run.
|
|
160
160
|
- Internal operating contracts—`context-loader` / `team-contract` / `convergence` / `report-writer` and the lead contract—have moved to `prompts/lead/*.md`. Language-specific coding preflight for implementation/verification workers has moved to `prompts/coding-preflight/*` (overview router + clean-code + three-stage language/framework/architecture selection). All are runtime resources installed under `~/.okstra/prompts/` and are not discoverable as skills. The generated launch prompt provides the lead with absolute paths, and reinstalling prunes the legacy exact-name skill directories `okstra-context-loader` / `okstra-team-contract` / `okstra-convergence` / `okstra-report-writer` / `okstra-coding-preflight` / `okstra`.
|
|
161
|
-
- Plugin manifest: [`../../.claude-plugin/plugin.json`](../.claude-plugin/plugin.json) — referenced by the supplementary `npx skills@latest add Devonshin/okstra` channel. Use `npx okstra@latest install` for normal setup. The plugin manifest exposes only the
|
|
161
|
+
- Plugin manifest: [`../../.claude-plugin/plugin.json`](../.claude-plugin/plugin.json) — referenced by the supplementary `npx skills@latest add Devonshin/okstra` channel. Use `npx okstra@latest install` for normal setup. The plugin manifest exposes only the sixteen user entry points (`okstra-setup`, `okstra-brief-gen`, `okstra-run`, `okstra-discussion`, `okstra-manager`, `okstra-memory`, `okstra-chat`, `okstra-inspect`, `okstra-rollup`, `okstra-usage`, `okstra-schedule-gen`, `okstra-container-build`, `okstra-pr-gen`, `okstra-user-response`, `okstra-code-review`, `okstra-explain-flow`).
|
|
162
162
|
- Installation location: `~/.claude/skills/<name>/SKILL.md` or `~/.agents/skills/<name>/SKILL.md`.
|
|
163
163
|
- Release procedure: [`../../RELEASING.md`](../RELEASING.md) — npm publish flow and release-please / manual fallback.
|
|
164
164
|
|
package/docs/cli.md
CHANGED
|
@@ -17,6 +17,7 @@ The Node CLI requires Node.js 22 or newer. Its TypeScript sources are compiled f
|
|
|
17
17
|
- [`--task-id`](#--task-id)
|
|
18
18
|
- [`--task-type`](#--task-type)
|
|
19
19
|
- [`--task-brief`](#--task-brief)
|
|
20
|
+
- [`--discussion-start`](#--discussion-start)
|
|
20
21
|
- [`--yes`](#--yes)
|
|
21
22
|
- [Optional arguments and options](#optional-arguments-and-options)
|
|
22
23
|
- [`--task-key`](#--task-key)
|
|
@@ -60,7 +61,7 @@ The Node CLI requires Node.js 22 or newer. Its TypeScript sources are compiled f
|
|
|
60
61
|
Base command for initial entry with full arguments:
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
|
-
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] [--terminal-backend cmux-pane|cli-wrapper] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<modelRef>] [--lead-runtime <host-id-or-alias>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--executor claude|codex|antigravity|grok|kimi] [--critic claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--base-ref <branch|tag|sha>] [--clarification-response <previous-final-report>] [--selected-direction <selection-final-report.md>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> --task-brief <brief-path> [--directive <directive>] [--fix-cycle <yes|no>]
|
|
64
|
+
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] [--terminal-backend cmux-pane|cli-wrapper] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<modelRef>] [--lead-runtime <host-id-or-alias>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--executor claude|codex|antigravity|grok|kimi] [--critic claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--base-ref <branch|tag|sha>] [--clarification-response <previous-final-report>] [--selected-direction <selection-final-report.md>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> (--task-brief <brief-path> | --discussion-start <start-input>) [--directive <directive>] [--fix-cycle <yes|no>]
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
Analysis input ownership is narrower than the base shell command. The `/okstra-run` wizard collects `--analysis-target` and `--evidence-inputs` values and passes them internally to `node bin/okstra render-bundle`. `scripts/okstra.sh` does not accept either flag. Because `feature-analysis` requires a target, start that task type with the in-host skill; the two option sections below document the internal Node render inputs, not standalone shell options.
|
|
@@ -202,6 +203,7 @@ feature-analysis / change-impact-analysis), while
|
|
|
202
203
|
release-handoff preparation automatically creates an input document that cites the verification report
|
|
203
204
|
at `<task_root>/release-handoff-input.md` and uses it in place of a brief.
|
|
204
205
|
A non-empty `--task-brief` is rejected immediately for release-handoff.
|
|
206
|
+
It does not apply to `discussion` either; `--discussion-start` takes its place.
|
|
205
207
|
|
|
206
208
|
Examples:
|
|
207
209
|
|
|
@@ -210,6 +212,20 @@ Examples:
|
|
|
210
212
|
|
|
211
213
|
When the task-group directory beside the brief holds `group-context.md` (`.okstra/briefs/<task-group>/group-context.md`, skeleton from `okstra group-context init`), preparation validates it, copies it to `instruction-set/task-group-context.md`, and the analysis packet carries its human sections as `## Task-Group Context` ahead of `## Task-Specific Brief Extract` and its okstra-written region — the group's start order and each sibling task's latest conclusion, recorded by `report-finalize` — as `## Task-Group Memory` after the brief extract, without this task's own entry. A file that still carries a template placeholder line fails preparation; delete it if the group needs no context. A file okstra created with only the memory region (no human section) passes as it is.
|
|
212
214
|
|
|
215
|
+
### `--discussion-start`
|
|
216
|
+
|
|
217
|
+
The start input of a `discussion` run, in place of `--task-brief`: a ticket or project link, a short
|
|
218
|
+
description, or the task's own key to continue its discussion. One research cycle runs per run, so the
|
|
219
|
+
next cycle, and a replacement roster, open in a continuation run prepared with
|
|
220
|
+
`--discussion-start <project-id:task-group:task-id>`. Without `--yes`, a missing value is asked for
|
|
221
|
+
instead of the brief path. `okstra.sh` forwards the value to prepare and passes no `--task-brief` for a
|
|
222
|
+
discussion, and does not fill the brief from the task manifest, whose brief is the input document
|
|
223
|
+
prepare wrote.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
scripts/okstra.sh --task-type discussion --project-id jobs --task-group tasks --task-id 8852 --discussion-start jobs:tasks:8852
|
|
227
|
+
```
|
|
228
|
+
|
|
213
229
|
### `--yes`
|
|
214
230
|
|
|
215
231
|
Skips interactive prompts and confirmation.
|
|
@@ -220,7 +236,7 @@ The following values are required instead:
|
|
|
220
236
|
- `task-group`
|
|
221
237
|
- `task-id`
|
|
222
238
|
- `task-type`
|
|
223
|
-
- `brief-path`
|
|
239
|
+
- `brief-path` (`discussion-start` for a discussion)
|
|
224
240
|
|
|
225
241
|
If any required argument is missing, the command exits immediately without prompting.
|
|
226
242
|
|
|
@@ -482,13 +498,13 @@ Then `okstra worker-dispatch --project-root <dir> --run-manifest <run-manifest>
|
|
|
482
498
|
The Codex worker (`--role-model analyser=codex/<model>`, `--codex-model`) and Codex lead runtime are separate. The former creates a worker assignment whose runner depends on the host; the latter selects Codex as the native lead boundary. On Claude Code the Codex worker uses a CLI wrapper, while on Codex it uses the host-native worker/session primitive.
|
|
483
499
|
|
|
484
500
|
> Every `--*-model` flag accepts only aliases registered in the provider mappings in `scripts/okstra_ctl/models.py`. An unregistered value is immediately rejected with `UnknownModelError`, preventing a contract violation where the manifest's `modelExecutionValue` differs from the actual execution value. Allowed values:
|
|
485
|
-
> - Claude (`--lead-model` / `--claude-model` / `--report-writer-model`): `fable`, `fable-5-1`, `claude-fable-5-1`, `fable-5`, `claude-fable-5`, `opus`, `opus-5`, `claude-opus-5`, `sonnet`, `sonnet-5`, `claude-sonnet-5`, `haiku`, `haiku-
|
|
501
|
+
> - Claude (`--lead-model` / `--claude-model` / `--report-writer-model`): `fable`, `fable-5-1`, `claude-fable-5-1`, `fable-5`, `claude-fable-5`, `opus`, `opus-5`, `claude-opus-5`, `sonnet`, `sonnet-5`, `claude-sonnet-5`, `haiku`, `haiku-5-5`, `claude-haiku-5-5`
|
|
486
502
|
> - Codex (`--codex-model`): `gpt-6-astra`, `gpt-6.1-sol`, `gpt-6-luna`. The bundled default is `gpt-6.1-sol`, which okstra runs at `high` reasoning effort (`-c model_reasoning_effort=high`, overriding `~/.codex/config.toml`) for both workers and a launched lead. GPT-6 Sol, GPT-5.6 Sol, Terra, and Luna, `gpt-5.4-mini`, and `codex-auto-review` remain in the catalog for historical records but are not selectable. When the CLI model cache matches the running CLI version, dispatch rejects identifiers absent from that catalog rather than renaming them. A missing or mismatched cache leaves availability enforcement to the provider CLI; model selection does not guarantee account access.
|
|
487
|
-
> - Antigravity (`--antigravity-model`): `gemini-3.1-pro` (default), `gemini-3.8-flash`, and their space-separated aliases. The antigravity worker uses the `agy` CLI to run Gemini-family models, so model IDs retain the `gemini-*` form.
|
|
503
|
+
> - Antigravity (`--antigravity-model`): `gemini-3.1-pro` (default), `gemini-4-argon`, `gemini-3.8-flash`, and their space-separated aliases. The antigravity worker uses the `agy` CLI to run Gemini-family models, so model IDs retain the `gemini-*` form.
|
|
488
504
|
> - Grok (`--worker-model grok=<model>`): `grok-4.7`
|
|
489
505
|
> - Kimi (`--worker-model kimi=<model>`): `kimi-k3`, `k3`, `k3-256k` and their registered display aliases
|
|
490
506
|
>
|
|
491
|
-
> Not every registered alias is offered for selection. A model whose `ModelSpec` sets `selectable=False` stays in the catalog — so served-model attestation and historical pricing still resolve it — but it is hidden from the wizard's role-model picker, from `okstra model list`, and from `--role-model`. `okstra model list` still prints them, marked `selectable: no` with the reason. Currently hidden: `claude/fable-5-1`, `claude/fable-5`, `claude/opus-5`, `claude/sonnet-5`, `claude/haiku-
|
|
507
|
+
> Not every registered alias is offered for selection. A model whose `ModelSpec` sets `selectable=False` stays in the catalog — so served-model attestation and historical pricing still resolve it — but it is hidden from the wizard's role-model picker, from `okstra model list`, and from `--role-model`. `okstra model list` still prints them, marked `selectable: no` with the reason. Currently hidden: `claude/fable-5-1`, `claude/fable-5`, `claude/opus-5`, `claude/sonnet-5`, `claude/haiku-5-5` (each one the pinned twin of a channel entry that already appears; `claude/fable-5` is the previous served id, kept for attestation and pricing), `kimi/k3` (same model as `kimi/kimi-k3`), `codex/gpt-5.4-mini`, `codex/codex-auto-review`, `grok/grok-build-0.1`, `kimi/k3-256k`.
|
|
492
508
|
|
|
493
509
|
### `--role-count`
|
|
494
510
|
|
|
@@ -591,7 +607,7 @@ scripts/okstra.sh --task-type implementation \
|
|
|
591
607
|
|
|
592
608
|
### `--critic`
|
|
593
609
|
|
|
594
|
-
Selects the provider for the opt-in critic slot on `requirements-discovery`, `error-analysis`, `implementation-planning`, and `final-verification`. The value is `claude`, `codex`, `antigravity`, `grok`, or `kimi`. `--critic off` runs the phase with no critic; an analyser 1-1 tie then stays `needs-reverify` and `okstra plan-items next-dispatch` answers `user-decision` — the split becomes an approval decision for the user instead of another verification round. Prefer `--role-model critic=<provider>/<model>` so the user picks the model. The critic also settles plan-body 1-1 splits in `implementation-planning` (`critic-worker` on `--tie-vote` items).
|
|
610
|
+
Selects the provider for the opt-in critic slot on `requirements-discovery`, `error-analysis`, `implementation-planning`, and `final-verification`. The value is `claude`, `codex`, `antigravity`, `grok`, or `kimi`. `--critic off` runs the phase with no critic; an analyser 1-1 tie then stays `needs-reverify` and `okstra plan-items next-dispatch` answers `user-decision` — the split becomes an approval decision for the user instead of another verification round. Prefer `--role-model critic=<provider>/<model>` so the user picks the model. The critic also settles plan-body 1-1 splits in `implementation-planning` (`critic-worker` on `--tie-vote` items) and, in every phase that has it, a Phase 5.5 finding whose vote ties once the origin worker is counted; without a critic that finding is `contested`.
|
|
595
611
|
|
|
596
612
|
- Critic dispatch runs concurrently with the first convergence reverify round in Phase 5.5, with critic input fixed to the integrated Round 0 result. One gap/blocker verification round runs in Phase 5.6 after convergence finishes. It detects coverage gaps in discovery, error-analysis, and implementation-planning, and acts as an acceptance devil's advocate in final-verification. Follow the "Coverage critic pass" and "Acceptance critic pass" sections of `prompts/lead/convergence.md` for the detailed contract.
|
|
597
613
|
- It shares the same value space as the critic-selection step in the in-session `okstra-run` wizard. `_resolve_model_bindings` in `prepare_task_bundle` validates the value; anything else is rejected immediately with `PrepareError`.
|
|
@@ -822,11 +838,12 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
822
838
|
| `okstra preflight [--runtime <name>] [--cwd <dir>] [--machine]` | Single skill-preflight call combining `ensure-installed`, with silent reinstall when stale, `check-project`, and host-specific `runtimeReadiness`. It defaults to a fixed text projection. `--machine` returns the automation JSON contract, and `--json` is a deprecated one-release alias. A `claude-code` host checks project workspace trust. A `codex` current-session host verifies write access to `~/.okstra/worktrees/registry.lock`; a sandbox denial blocks before the wizard with the `switch-codex-to-full-access-and-rerun` action. `antigravity` and `external` hosts return ready without reading Claude Code state. Step 0 of every project-scoped skill converges on this command |
|
|
823
839
|
| `okstra convergence seed --groups <path> --work-state <path> --final-state <path> --migration-dir <dir> [--restart-from-round0]` | Create, resume, reuse, or explicitly recover deterministic convergence state |
|
|
824
840
|
| `okstra convergence plan-round --work-state <path> --plan <path>` | Persist the next roster-aware dispatch plan without mutating working state |
|
|
825
|
-
| `okstra convergence collect-results --plan <round-plan.json> --
|
|
841
|
+
| `okstra convergence collect-results --plan <round-plan.json> --result <worker>=<path>… --run-manifest <run-manifest.json> --output <round-results.json>` | Read one round's worker responses into the `apply-round --results` shape. The reverify prompt answers `REFUTED` / `SURVIVES` / `SURVIVES-WITH-CAVEAT` / `UNVERIFIABLE`, which this maps to `disagree` / `agree` / `supplement` / `unverifiable`, and copies `**Basis**` into `disagreeBasis`. `--dispatch` supplies the terminal status and duration, which live in the dispatch rather than the response; a worker that never returned gets a `--dispatch` and no `--result`. Exits 2 on a dispatched finding with no verdict, a verdict for a finding the plan did not dispatch to that worker, a planned worker with no recorded outcome, or a vote with no explanation |
|
|
826
842
|
| `okstra convergence apply-round --work-state <path> --plan <path> --results <path>` | Validate one complete structured result set and atomically reduce it into working state |
|
|
827
|
-
| `okstra convergence critic-prompt --run-manifest <path>` | Render the
|
|
828
|
-
| `okstra convergence reverify-prompt --run-manifest <path> --plan <round-plan.json> --worker <worker-id>` | Render one worker's reverify task instructions to stdout; the lead writes the output verbatim into the file the prompt materializer's `--instruction` takes. The body carries the
|
|
829
|
-
| `okstra convergence critic-verify-prompt --run-manifest <path> --gaps <
|
|
843
|
+
| `okstra convergence critic-prompt --run-manifest <path>` | Render the critic task instructions to stdout — the acceptance critic's on `final-verification`, the coverage critic's elsewhere; the lead writes the output verbatim into the file the prompt materializer's `--instruction` takes. The body carries the run's Round 0 consolidated findings, one line per Phase 4 analyser (worker id, result path, its finding ids), the two mandates plus the `duplicateOf` declaration rule, and — on an implementation-planning re-run — an already-covered index of the prior report's requirement-coverage row ids, clarification row ids, and stage titles (ids and titles only, never body text). Emits the `**Prompt Delivery Mode:**` header and the `Primary analysis packet` line the critic dispatch contract requires, so no part of the critic body is hand-written. The acceptance body carries the analysis packet, the analyser result lines and the acceptance mandate with the `### [AC-NNN]` candidate format, and omits the Round 0 list to stay inside the final-verification 96-line cap. Exits 2 when the run has published no grouping yet, or when the manifest carries no `analysisPacketPath` |
|
|
844
|
+
| `okstra convergence reverify-prompt --run-manifest <path> --plan <round-plan.json> --worker <worker-id>` | Render one worker's reverify task instructions to stdout; the lead writes the output verbatim into the file the prompt materializer's `--instruction` takes. The body carries the adversarial mandate, the plan row's findings in plan order — each with its summary, origin worker, cited-evidence line, the origin worker's result file and `### <item-id>` section, and the origin audit sidecar the verifier is told it may open — and the response format the collector parses. Exits 2 when the plan dispatches nothing to that worker, names a finding the grouping lacks, or is not a `dispatch` plan |
|
|
845
|
+
| `okstra convergence critic-verify-prompt --run-manifest <path> --gaps <critic-batch.json> --worker <worker-id>` | Render one Phase 4 analyser's coverage-critic gap verification instructions to stdout; the lead writes the output verbatim into the file the prompt materializer's `--instruction` takes and materializes it with `--dispatch-kind critic-verify` under the analyser's `reverify/<worker-id>` assignment ref. Input is the pre-vote coverage batch (`mode: coverage`, `gaps[]` with `gapId`, `summary`, `category`, `ticketIds`, `originEvidence`, optional `duplicateOf`) the lead later passes to `apply-critic-gaps`; gaps are assigned round-robin over the grouping's analysis roster exactly as `apply-critic-gaps` checks them, and the body carries only this analyser's share — each gap with the critic's result file (`<provider>-worker-critic-<task-type>-<seq>.md`) and `### [<gapId>]` section, the critic audit sidecar, and the adversarial response format. A batch with `mode: acceptance-devils-advocate` and `candidates[]` (`candidateId`, `statement`, `severity`, `originEvidence`) renders the confirm-or-downgrade instructions instead: every analyser gets every candidate, each pointing at the critic result section whose heading names that `candidateId`, in either the bracketed or the plain heading form. Exits 2 when the batch's taskKey or mode does not match, the run has no critic assignment, the critic result is not collected yet, the worker is not an analyser, or round-robin assigns it no gap |
|
|
846
|
+
| `okstra convergence collect-acceptance-votes --run-manifest <path> --candidates <batch.json> --result <worker>=<path>… --output <batch.json>` | Read the analysers' `critic-verify` responses to the acceptance candidates and write the `apply-acceptance-critic --results` batch: a candidate any analyser answers `SURVIVES` or `SURVIVES-WITH-CAVEAT` is `confirmed`, every other candidate `downgraded`; each candidate row keeps the per-analyser votes. Exits 2 when a worker is not an analyser or returned no verdict for a candidate |
|
|
830
847
|
| `okstra convergence census-audit --run-manifest <path> --result <worker>=<path>… [--gapfill <worker>=<path>…]` | Read every analysis worker's `Coverage Verdicts` against the run's coverage census and write `state/coverage-census-audit-<task-type>-<seq>.json`: each worker's cells without a usable verdict and why, the cell × worker matrix, the cells one worker judged `finding` and another `clean`, and per-cell grouping suggestions. `--gapfill` merges a worker's one `census-gapfill` result; a `--result` or `--gapfill` path that does not exist is recorded as missing. Prints a JSON summary with `gapfillNeeded` and per-worker `unverdicted` counts. Unjudged cells never change the exit code; a run without a census prints `"census": "absent"` and writes nothing |
|
|
831
848
|
| `okstra convergence census-gapfill-prompt --run-manifest <path> --worker <worker-id>` | Render one analysis worker's census gap-fill instructions from the latest audit to stdout: only the cells that worker left unjudged, grouped by why, plus the `**Prompt Delivery Mode:**` header and the `Primary analysis packet` line. The lead materializes it under the worker's `initial/<worker-id>` assignment with `--dispatch-kind census-gapfill`. Exits 2 when no audit exists, the worker left no cell unjudged, or the worker already had its one gap-fill |
|
|
832
849
|
| `okstra convergence apply-critic-gaps --work-state <path> --results <path>` | Apply one verified coverage-critic batch after the main queue reaches a terminal state |
|
|
@@ -848,12 +865,12 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
848
865
|
| `okstra plan-items correction-prompt --state <plan-body-verification.json> --run-manifest <path> --worker <id>` | Emit the planning-time environment-gap paragraph, then the assigned queue. The environment exception is first. Exits 2 unless `next-dispatch` named that worker as a blanket-UNVERIFIABLE correction target. |
|
|
849
866
|
| `okstra error-log append-observed --out <errors.jsonl> --task-key <key> --phase <task-type> --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. |
|
|
850
867
|
| `okstra config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Manage persistent settings such as `pr-template-path` with atomic JSON writes |
|
|
851
|
-
| `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 |
|
|
868
|
+
| `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. `add --source-key <key>` records the source an entry stands for: adding the same key again returns the stored entry (`created: false`) instead of a second one, also when two adds race, and with `--json` a likely-secret refusal is printed as `{ ok: false, refused: "secret", secrets, message }`. An add without `--source-key` is unchanged |
|
|
852
869
|
| `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 body may span several lines. 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; the second and later lines of a body follow on rows indented by two spaces. `ack --through` rejects an id behind the current cursor. Room and display names `.` and `..` are reserved. A `.lock` left by a dead process (pid recorded in the file) or older than 5 s is reclaimed. CLI basis of the `okstra-chat` skill. |
|
|
853
870
|
| `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. |
|
|
854
871
|
| `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. |
|
|
855
872
|
| `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. |
|
|
856
|
-
| `okstra manager <init\|discover-projects\|new\|task\|list\|remove\|view> [--json]` | Public CLI for grouping cross-project okstra tasks into manager-owned context. The default is purpose-specific fixed text for model use; `--json` preserves the machine contract and exit codes. `new project --project-root` accepts only existing directories and performs setup-equivalent registration only if `.okstra/project.json` is absent. `list managers`, `list projects --manager-id <id>` and `list tasks --manager-id <id>` enumerate manager state; `view --manager-id <id>` writes `~/.okstra/managers/<id>/view/index.html` and prints its path and `file://` URL. `task split --plan <json>` writes one validated brief with a `## Project Scope` section into each project an issue is assigned to and registers those children; `task run` then passes `--task-brief`. `list task-groups` lists groups including empty ones; `task update` edits a task's objective, common brief or progress mode; `remove project`, `remove task`, `remove task-group` and `task remove-child` print their targets and delete manager files only with `--confirm`, and `remove project` keeps the project's children marked unlinked. |
|
|
873
|
+
| `okstra manager <init\|discover-projects\|new\|task\|list\|remove\|view> [--json]` | Public CLI for grouping cross-project okstra tasks into manager-owned context. The default is purpose-specific fixed text for model use; `--json` preserves the machine contract and exit codes. `new project --project-root` accepts only existing directories and performs setup-equivalent registration only if `.okstra/project.json` is absent. `list managers`, `list projects --manager-id <id>` and `list tasks --manager-id <id>` enumerate manager state; `view --manager-id <id>` writes `~/.okstra/managers/<id>/view/index.html` and prints its path and `file://` URL. `task split --plan <json>` writes one validated brief with a `## Project Scope` section into each project an issue is assigned to and registers those children; `task run` then passes `--task-brief`. For a child whose task type is `discussion`, `task sync` records a `discussion` block read from the discussion record without writing to it — state (`draft`, `completed`, or `unknown` when the record cannot be read), phase, pending questions, revisions with their change reasons, and each follow-up's pinned revision and impact-review state, re-read from the follow-up's brief — and `task status` counts the child under `discussion`, never under `done`. `task run` for a child without a registered brief takes the brief that `okstra discussion follow-up-brief` wrote for it, found in the last-synced links of a discussion child of the same manager task. `list task-groups` lists groups including empty ones; `task update` edits a task's objective, common brief or progress mode; `remove project`, `remove task`, `remove task-group` and `task remove-child` print their targets and delete manager files only with `--confirm`, and `remove project` keeps the project's children marked unlinked. |
|
|
857
874
|
| `okstra rollup [--task-group <group>] [--project-root <dir>] [--cwd <dir>] [--text\|--json]` | Read-only backend for the okstra-rollup skill. `--text` emits ordered fixed labels for model use. The default and `--json` preserve the full machine JSON contract and exit codes. Omitting `--task-group` targets the whole project catalog. |
|
|
858
875
|
| `okstra usage-report [--days <positive-int>] [--project-root <dir>] [--cwd <dir>] [--text\|--json]` | Read-only backend for the okstra-usage skill. `--text` emits ordered fixed labels for model use. The default and `--json` preserve the full machine JSON contract and exit codes. Defaults to the current project's last 30 days. |
|
|
859
876
|
| `okstra worker-state transition --team-state <path> --worker <id> --status <in-progress\|completed\|timeout\|error\|not-run> [--reason <text>] [--model <execution-value>]` | Atomically update one persisted worker row. `in-progress` records the authoritative `startedAt` and clears `endedAt`; terminal states record `endedAt`; `timeout`, `error`, and `not-run` require a reason. Dispatch adapters use this same transition path, so CLI-backed and in-process orchestration share the status timestamp contract |
|
|
@@ -871,7 +888,12 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
871
888
|
| `okstra task-list [--project-root <path>]` | Combine `list_project_tasks` and `read_latest_task` into JSON containing the task catalog and latest task |
|
|
872
889
|
| `okstra task-show <task-key> [--project-root <path>]` | Summarize workflow, phase, status, and artifacts from the Task Read-Side Snapshot |
|
|
873
890
|
| `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,cancelled}], doneStages:[int] }`. Each stage row carries `cancelled: true` when the plan marks that Stage Map row `status: cancelled`; such a stage is never selected, cannot be closed, and is left out of whole-task final verification and release handoff. `sourcePlanPath` is the task's latest implementation-planning report — the authority on which stages exist, so a plan amendment's added stages are selectable as soon as the amended plan lands. `state` is `ready` for a resolved source and `missing` when no Stage Map exists; a corrupt source returns a structured non-zero error 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 |
|
|
874
|
-
| `okstra stage-close <task-key> --stage <N> --from-commit <sha> [--cwd <dir>\|--project <dir>]` | Record the `done` stage-consumer row an implementation run would have written, for a stage whose work is already committed but which never registered as done — the run ended before writing its carry sidecar, and `backfill_done_from_carry` recovers only from that file. Without it `stage-map` reports `doneStages: []` while the branch carries the commit, the next plan re-describes the stage, and every RED expectation it produces is unreachable. Refuses unless the Stage Map has that stage and does not mark it cancelled, no `done`/`failed` row exists for it, `--from-commit` resolves to a commit in the project repo, and the stage's conformance gate permits progress — the same `decide_conformance_gate` the run validator uses, so a stage closed here is not one the validator would have blocked. Closing also moves the `stage-<N>-exit` tag and releases the stage reservation, exactly as a normal stage completion does. Emits `{ ok, taskKey, taskRoot, stage, headCommit, conformance, consumersPath }` |
|
|
891
|
+
| `okstra stage-close <task-key> --stage <N> --from-commit <sha> [--supersede-failed <reason>] [--cwd <dir>\|--project <dir>]` | Record the `done` stage-consumer row an implementation run would have written, for a stage whose work is already committed but which never registered as done — the run ended before writing its carry sidecar, and `backfill_done_from_carry` recovers only from that file. Without it `stage-map` reports `doneStages: []` while the branch carries the commit, the next plan re-describes the stage, and every RED expectation it produces is unreachable. Refuses unless the Stage Map has that stage and does not mark it cancelled, no `done`/`failed` row exists for it, `--from-commit` resolves to a commit in the project repo, and the stage's conformance gate permits progress — the same `decide_conformance_gate` the run validator uses, so a stage closed here is not one the validator would have blocked. `--supersede-failed <reason>` closes a stage whose last row is `failed` under the same checks, for a failure that no longer applies (the checks ran in the wrong environment and the commit needs no product edit); the `done` row records `superseded_status`, the reason, the latest plan path and the conformance verdict. Closing also moves the `stage-<N>-exit` tag and releases the stage reservation, exactly as a normal stage completion does. Emits `{ ok, taskKey, taskRoot, stage, headCommit, conformance, consumersPath, supersededFailed, sourcePlanPath }` |
|
|
892
|
+
| `okstra stage-reopen <task-key> --stage <N> --reason <why> [--evidence <path>] [--cwd <dir>\|--project <dir>]` | Append a `failed` stage-consumer row after a stage's `done` row, so `/okstra-run` offers that stage again for a fix run and its dependents stop branching from the withdrawn head. Use it when a later verification found a defect in a done stage — a single-stage final-verification that ended `blocked` and points at `implementation` is the case the wizard otherwise refuses. The row records the reason, `reopened_by: stage-reopen`, the head it withdraws and, with `--evidence`, the project-relative report path. Refuses a stage that is not in the latest Stage Map, is cancelled, or whose last row is not `done`. Emits `{ ok, taskKey, stage, headCommit, reason, evidencePath, consumersPath }` |
|
|
893
|
+
| `okstra discussion <confirm-subject\|ask\|address\|answer\|decide> <task-key> … --run-manifest <path>` / `okstra discussion draft <task-key>` | The facilitator's only way to write a discussion task's record under `<task-root>/discussion/`: the confirmed subject and question, questions for the user (`ask`), the user's question to one worker (`address`), answers and user decisions. `--run-manifest` must be a discussion run manifest of the same task; authors are `leader` or a worker of that run, and only a question's addressee answers it. A resent record returns the stored one (`created: false`). Every write rebuilds `draft.json`; `draft` prints it as the fixed text every participant reads. Write commands emit `{ ok, created, record, pendingForUser, pendingForParticipants }`. `add-material --kind <evidence|alternative>` records new evidence or a new alternative, and `status` prints the phase, the next question for the user, unrecovered failures and remaining disagreements |
|
|
894
|
+
| `okstra discussion <cycle-open\|settle\|cycle-close> <task-key> --run-manifest <path>` / `okstra discussion recover <task-key> --failure <X-NNNN> --choice <retry\|replace\|reduce> --run-manifest <path>` / `okstra discussion <question-prompt\|collect-answer> <task-key> --question <Q-NNNN> --run-manifest <path>` | The research, refutation and question cycle of a discussion, one research cycle per run. `cycle-open` writes the research instruction from the record and records its input references (start inputs, subject, answers, materials), or returns why nothing is dispatched: `await-user`, `await-participant`, `await-recovery`, `present-options` (the references equal the last closed cycle's) or `prepare-run` (the next cycle needs a run prepared with `--discussion-start <task-key>`). `settle` records each analyser's `initial` result and each failure the dispatcher left after its retry loop (`start` when the batch could not launch, `after-retries` otherwise); `recover` records the user's choice for one failure. `cycle-close` validates the run's convergence final state and imports its findings as claims with their origin worker and verdicts. `question-prompt` writes one direct question's instruction and `agent-prompt materialize --batch` file (dispatch kind `discussion-question`), and `collect-answer` records the addressee's whole result as the answer |
|
|
895
|
+
| `okstra discussion <add-requirement\|add-scope> <task-key> --text <what> --author <user\|leader\|worker-id> --run-manifest <path>` / `okstra discussion confirm-completion <task-key> --draft-version <sha256:…> --direction <text> --risk <text> --run-manifest <path>` / `okstra discussion reopen <task-key> --revision <task-key/revision-NNN> --reason <text> --run-manifest <path>` / `okstra discussion <revisions\|record> <task-key>` / `okstra discussion revision-show <task-key> --revision <id>` / `okstra discussion memory-sync <task-key> [--revision <id> [--summary-file <path>]]` | User completion of a discussion. `add-requirement` (`--applies-to <common\|follow-up label>`) and `add-scope --kind <in-scope\|excluded>` record the current draft's requirements and scope; an item the draft already holds is returned instead of added twice. After `reopen` the draft starts with the reopened revision's requirements and scope under their original record ids, marked with that revision, so unchanged items are not entered again; `okstra discussion withdraw <task-key> --item <N-NNNN\|B-NNNN> --reason <text> --run-manifest <path>` removes one item with the user's reason, and replacing an item is a withdrawal followed by an addition. `confirm-completion` binds the user's direction and risk confirmation to the draft version `status` prints, refuses a stale version or a draft missing its subject, a requirement, a scope entry, a closed research cycle, an answer or a failure choice, and publishes one read-only revision `<task-root>/discussion/revisions/revision-NNN.json` (id `<task-key>/revision-NNN`); a resent confirmation returns it. A completed discussion takes only `reopen`, which names the latest revision and the reason; the next revision carries both and lists under `itemChanges` the items it carried, added and withdrawn. `revisions` lists the publications, `revision-show` prints one revision byte-for-byte, `record` prints the draft read model with every research result in full. The run's final report references the revision only by id and content digest. After publication, `confirm-completion` registers the revision in the Memory Book without a prompt (`okstra memory add --source-key discussion:<revision-id>`): a summary of decisions, disagreements, risks and unverified scope with the revision id, content digest, project and task, kept with its registration state in `<task-root>/discussion/memory/`; its `memory` field names the entry or the state. A failed registration leaves the revision published and `pending`; `status` lists it under `memoryRegistration`, and `okstra discussion memory-sync <task-key>` retries it with the same source key. A summary refused as a likely secret is `refused` and is not retried until `memory-sync --revision <id> --summary-file <path>` supplies a changed summary |
|
|
896
|
+
| `okstra discussion follow-up-brief <task-key> --revision <id> --follow-up <label> --target-task <task-key> [--target-project-root <dir>] [--end-state <N-NNNN>=<EB\|PB\|EO>[:<how>]]… [--replace]` / `okstra discussion links <task-key>` / `okstra discussion impact <task-key> --from <id> --to <id> [--follow-up <label>]` / `okstra discussion apply <task-key> --revision <latest id> --target-task <task-key> --choice <adopt\|keep> [--end-state …]… [--replace]` | Follow-up tasks of a published revision, run outside a discussion run at the user's request. `follow-up-brief` writes `<target-project-root>/.okstra/briefs/<task-group>/<task-id>-<label>.md` from the revision's common requirements and those of `--follow-up`, through `validators/validate-brief.py`; it recommends `requirements-discovery` and pins the discussion, revision id, content digest and requirement ids in the frontmatter, which prepare copies into the run inputs as `discussionRevisionRef`. `--end-state` maps a requirement to an `EB`/`PB`/`EO` item; an observation method the revision does not carry leaves the brief `reporter-confirmations: pending` with an `intent-check:` row for the user. The brief is written before the link in `<task-root>/discussion/links.jsonl`, so a resend after an interruption records the link once; a brief this command did not write last needs `--replace`. `links` re-reads every target (`current`, `needs-impact-review`, `kept`, `amendment-pending`, or `unknown` when the target cannot be read), `impact` prints the changes between two revisions, and `apply` records the user's choice for one target and the latest revision: `keep`, or `adopt`, which rewrites the brief of a target without an implementation-planning plan and routes a target with a plan to the plan amendment path without touching its plan, brief or source. A resent choice returns the stored record. `okstra discussion complete-amendment <task-key> --revision <id> --target-task <task-key> [--end-state …]… [--replace]` finishes a routed adoption once the target has an implementation-planning report newer than the one it had at routing whose `frontmatter.approved` is `true`: it rewrites the brief to pin the revision and records the plan report it relied on, and `links` then shows the target `current`. Without such a report it is refused and names what is missing, and `links` shows the same in the target's `next`; it never edits or approves a plan |
|
|
875
897
|
| `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): 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`. `--run-manifest <path>` is required for a decision (not for `--preview`): the same decision is written to the record that manifest names in `incrementalDecisionPath`, so the report writer's authoring contract and `okstra incremental-carry` read it instead of CSVs the lead re-typed. `mode: "unresolved"` is a question back to the lead and is deliberately not recorded. `--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` |
|
|
876
898
|
| `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`. Pass `--decision <incrementalDecisionPath>` for the two stage sets — the same record the report writer's authoring contract was built from — instead of `--carry-stages` / `--reverify-stages`, which the lead re-typed off stdout; the two forms cannot be combined, and a record whose `mode` is not `incremental` is refused. 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. |
|
|
877
899
|
| `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 |
|
|
@@ -879,7 +901,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
879
901
|
| `okstra worktree-lookup <project-id> <task-group> <task-id>` | Return the `worktree_registry.lookup` result: reserved path, branch, base ref, and current status |
|
|
880
902
|
| `okstra worktree-status [--path <dir>] [--check-clean]` | Answer "is this worktree clean?" over source paths only, excluding what okstra provisioned there — `.okstra`, the configured sync entries (`.project-docs`, `.claude`, …), and any nested stage worktree. A bare `git status --porcelain` in a task worktree is never empty for that reason, so a plan step asserting a clean tree with one fails on okstra's scaffolding instead of on the stage's own work; this is the same gate `handoff` and stage integration use. Output is JSON `{ ok, path, clean, entries, excluded }` where `entries` holds the `git status --short` rows that made it dirty. Exit code is 0 regardless unless `--check-clean` is given, which exits 1 on a dirty tree so it can stand as a shell assertion (`okstra worktree-status --check-clean`). okstra writes `stage-<N>-exit` itself when it settles the stage, so a plan step must not tag. A path outside a git work tree exits 2 rather than reporting a clean tree |
|
|
881
903
|
| `okstra plan-validate <plan-path>` | Run `_validate_approved_plan` and report frontmatter `approved` recognition plus unresolved Blocks=approval rows |
|
|
882
|
-
| `okstra render-bundle <args…> [--stage <auto\|N>] [--stages <csv>]` | Thin shim over `prepare_task_bundle(render_only=True)` with the same signature as `python3 -m okstra_ctl.run --render-only`. `--stage` is for `implementation` and `final-verification`: for implementation, `auto` (default) selects the earliest incomplete stage with satisfied dependencies, while `<N>` forces a stage; for final-verification, `<N>` verifies one stage with artifacts under `runs/final-verification/stage-<N>/` and a `-fv-s<N>` team suffix, while an empty value performs whole-task verification with the flat layout. The separate `--stages <csv>` channel is for `release-handoff`: it names the stages to open a PR for, one PR per stage, and an empty value takes every eligible stage. Preparation enforces eligibility—`done` + accepted `verified` + not yet `pr`—and automatically creates an input document that cites verification reports |
|
|
904
|
+
| `okstra render-bundle <args…> [--stage <auto\|N>] [--stages <csv>]` | Thin shim over `prepare_task_bundle(render_only=True)` with the same signature as `python3 -m okstra_ctl.run --render-only`. `--stage` is for `implementation` and `final-verification`: for implementation, `auto` (default) selects the earliest incomplete stage with satisfied dependencies, while `<N>` forces a stage; for final-verification, `<N>` verifies one stage with artifacts under `runs/final-verification/stage-<N>/` and a `-fv-s<N>` team suffix, while an empty value performs whole-task verification with the flat layout. The separate `--stages <csv>` channel is for `release-handoff`: it names the stages to open a PR for, one PR per stage, and an empty value takes every eligible stage. Preparation enforces eligibility—`done` + accepted `verified` + not yet `pr`—and automatically creates an input document that cites verification reports. `--discussion-start <link\|text\|task-key>` is for `discussion`, which takes no `--task-brief`: prepare records the start input in the task's discussion record and writes the input document from it |
|
|
883
905
|
| `okstra profile show <task-type> [--resolved]` | Print a phase profile. `--resolved` expands its `{{INCLUDE:}}` targets and appends the lazy-read sidecars named in the profile body — transitively, because sidecars name sidecars of their own (`_implementation-executor.md` points at the coding-conventions preflight, the diff-review sweep, and the completion self-check). That matters because a profile is assembled from three places, so grepping only the top-level file returns false negatives: `grep clarification scripts/okstra_ctl/phases/implementation/profile.md` finds nothing while the assembled profile has many hits. One grep over this output answers whether a task-type covers a rule. The sidecar list is read from the profile body, never hard-coded, so a newly added sidecar is picked up without a code change. Read-only: it writes no manifest and registers no run, which is what separates it from `render-bundle` — `render-bundle` answers the same question but records a run in `recent.jsonl`, so it cannot be used to look something up. Exits 2 for an unknown task-type |
|
|
884
906
|
| `okstra codex-run <args…>` | Codex lead-adapter dry-run entry point. Accepts the same arguments as `render-bundle` but owns `--render-only --lead-runtime codex`. It prepares the task bundle and prints the prompt for the Codex lead without dispatching workers |
|
|
885
907
|
| `okstra worker-dispatch --project-root <dir> --run-manifest <path> [--workers <csv>] [--dry-run]` | Provider-neutral deterministic dispatcher for `runner=cli-wrapper` assignments. It verifies each adjacent invocation specification against the immutable run manifest immediately before process creation and records `core-pre-dispatch`; native-session rows stay with the host. The default selects CLI analysis assignments only. Phase 6 uses explicit `--workers report-writer`, and a mixed analysis/report batch is rejected. `--dry-run` performs the same verification and resolution without starting a provider process. A real dispatch records the lead checkpoints it owns in the run's lead-events ledger and returns them as `progressLines`: `phase-3-team-create` when it writes the implicit-team marker, `phase-4-dispatch` for each `initial` job, `phase-6-synthesis` on the first report-writer dispatch, and `phase-5-collect` for each `initial` dispatch it settled. |
|
|
@@ -154,7 +154,7 @@ Runtime/install asset changes follow this checklist:
|
|
|
154
154
|
|
|
155
155
|
`bin/okstra` is a thin dynamic-import router.
|
|
156
156
|
|
|
157
|
-
`src/cli-registry.mts` is the one routing table, and each entry routes exactly one way. A **Node-owned** command names a module and its exported `run(args) -> Promise<number>` (or a named install/uninstall runner) under `src/commands/{lifecycle,execute,memory,pr}/`; these 15 own npm layout, install manifests, and host resolution, which is knowledge Node holds. Every other command names a **python target** — a module, an installed helper script, or a validator — optionally with a fixed argv prefix and the runtime paths only Node can resolve (`--workspace-root`, `--okstra-bin`). `src/lib/python-command.mts` turns such an entry into a runner; there is no per-command TypeScript file, and `--help` reaches the python parser, which is the single author of that command's help.
|
|
157
|
+
`src/cli-registry.mts` is the one routing table, and each entry routes exactly one way. A **Node-owned** command names a module and its exported `run(args) -> Promise<number>` (or a named install/uninstall runner) under `src/commands/{lifecycle,execute,memory,pr}/`; these 15 own npm layout, install manifests, and host resolution, which is knowledge Node holds. Every other command names a **python target** — a module, an installed helper script, or a validator — optionally with a fixed argv prefix and the runtime paths only Node can resolve (`--workspace-root`, `--okstra-bin`, and `--okstra-cli`, the running package's `bin/okstra`). `src/lib/python-command.mts` turns such an entry into a runner; there is no per-command TypeScript file, and `--help` reaches the python parser, which is the single author of that command's help.
|
|
158
158
|
|
|
159
159
|
`npm run build:ts` compiles these sources to `dist/**/*.mjs`; `bin/okstra` executes the compiled output.
|
|
160
160
|
|
|
@@ -173,6 +173,7 @@ The Module column below is where the command's behaviour lives — a `src/` modu
|
|
|
173
173
|
| `migrate` | `scripts/okstra_ctl/migrate.py` | One-shot legacy `.project-docs/okstra` → `.okstra` migration helper |
|
|
174
174
|
| `git-reconcile` | `scripts/okstra_ctl/git_reconcile.py` | Reconcile stale stage SHAs after external git history changes |
|
|
175
175
|
| `stage-close` | `scripts/okstra_ctl/stage_close.py` | Close an already-landed implementation stage as done (commit + conformance evidence required) |
|
|
176
|
+
| `stage-reopen` | `scripts/okstra_ctl/stage_reopen.py` | Reopen a done implementation stage for a fix run (appends a `failed` row with the reason and evidence report) |
|
|
176
177
|
| `option-votes` | `scripts/okstra_ctl/option_votes.py` | List the implementation candidates that only lack feasibility votes, and the analyser owing each one |
|
|
177
178
|
| `handoff` | `scripts/okstra_ctl/handoff.py` | CLI assembly and common verification recording; release policy is in `phases/release_handoff/operations.py` |
|
|
178
179
|
| `integrate-stages` | `scripts/okstra_ctl/stage_integrate.py` | Merge verified stages into the task worktree and clean stage worktrees |
|
|
@@ -204,7 +205,7 @@ The Module column below is where the command's behaviour lives — a `src/` modu
|
|
|
204
205
|
| `wizard` | `src/commands/execute/wizard.mts` | Drive the `okstra-run` interactive state machine, including the final outcome envelope |
|
|
205
206
|
| `token-usage` | `scripts/okstra-token-usage.py` | Wrap installed Python token usage CLI |
|
|
206
207
|
| `spawn-followups`, `error-log` | `scripts/okstra-spawn-followups.py`, `scripts/okstra-error-log.py` | Follow-up task bundle creation and run error-log append helpers |
|
|
207
|
-
| `memory` | `src/commands/memory/memory.mts` | Store/find global conversation memory under `~/.okstra/memory-book` |
|
|
208
|
+
| `memory` | `src/commands/memory/memory.mts` | Store/find global conversation memory under `~/.okstra/memory-book`; `add --source-key` returns the stored entry for a key it already holds, under a per-key lock (`src/lib/file-lock.mts`, shared with `chat`) |
|
|
208
209
|
| `pr` | `src/commands/pr/pr.mts` | `okstra pr <template\|branches\|gen>` — PR body template store under `~/.okstra/template/pr/` (bundled fallback `src/commands/pr/default.md`), base-branch recommendation, and a fixed-text generation bundle for the okstra-pr-gen skill. `--json` preserves the template + `<base>..HEAD` commits + `<base>...HEAD` diffstat machine contract. Git-only; no project registration required |
|
|
209
210
|
| `recap` | `scripts/okstra_ctl/recap.py` | `okstra recap <assemble\|record\|note>` Node wrapper backing the okstra-inspect `recap` facet — `assemble` is a read-only phase-transition summary for a task or, with `--task-group`, the group's start order plus each task's latest conclusion; `record` appends one line to `recap/recap-log.jsonl` (task) or `.okstra/tasks/<group>/.recap/recap-log.jsonl` (`--task-group`); `note` writes an agent-authored note under `notes/` and prints the `--clarification-response` argument for a follow-up run |
|
|
210
211
|
| `stage-map` | `scripts/okstra_ctl/stage_map_cli.py` | `okstra stage-map <task-key>` — exposes a task's implementation-planning Stage Map as JSON (`stages[].{stage_number,title,depends_on,step_count}` + consumer-state-based `doneStages[]`). If there is no Stage Map, `stages: []`. The read-side basis from which `okstra-schedule-gen` derives stage units and dependency closure |
|
|
@@ -426,7 +427,7 @@ Important modules:
|
|
|
426
427
|
|
|
427
428
|
#### Phase packages
|
|
428
429
|
|
|
429
|
-
All
|
|
430
|
+
All 13 task types have a phase package. Each phase owns `profile.md`, `profile.json`, `boundary.json`, `spec.md`, `report.py`, dedicated `report_assets/` and its policy tests. The catalog resolves the existing logical profile and template names to these files. Pytest collects phase-local tests; the runtime copy excludes them. Common report shells, schemas, worker dispatch and evidence readers remain shared.
|
|
430
431
|
|
|
431
432
|
| Task type and specification | Phase-owned policy |
|
|
432
433
|
|---|---|
|
|
@@ -442,6 +443,7 @@ All 12 task types have a phase package. Each phase owns `profile.md`, `profile.j
|
|
|
442
443
|
| [implementation](../scripts/okstra_ctl/phases/implementation/spec.md) | `entry.py` claims and publishes a stage run; `wizard.py` owns stage selection; `validation.py` checks verifier independence; `instructions/` contains executor and verifier guidance. [Input template](../scripts/okstra_ctl/phases/implementation/report_assets/implementation-input.template.md). |
|
|
443
444
|
| [final-verification](../scripts/okstra_ctl/phases/final_verification/spec.md) | `entry.py`, `target.py`, `wizard.py` and `validation.py` own the prepared verification target, scope and acceptance checks. [Input template](../scripts/okstra_ctl/phases/final_verification/report_assets/final-verification-input.template.md). |
|
|
444
445
|
| [release-handoff](../scripts/okstra_ctl/phases/release_handoff/spec.md) | `entry.py`, `operations.py` and `wizard.py` own handoff input, eligibility, selected remote operations and delivery choices. [Input template](../scripts/okstra_ctl/phases/release_handoff/report_assets/release-handoff-input.template.md). |
|
|
446
|
+
| [discussion](../scripts/okstra_ctl/phases/discussion/spec.md) | `profile.md` holds the facilitator and research instructions; `profile.json` holds the analyser, verifier and report-writer roles. `entry.py` classifies the start input and writes the input document that replaces the brief; `store.py` owns the task-level record under `<task-root>/discussion/` (append-only records and the draft read model); `workflow.py` owns the research, refutation and question cycle (cycle open and close, result and failure settlement, user recovery choices, direct-question dispatch input) on top of the common dispatch path and the convergence engine; `validation.py` checks a draft before the user's completion confirmation and the content of a published revision; `store.py` also publishes the immutable revisions under `<task-root>/discussion/revisions/`; `report.py` builds the report's `discussion` block (revision id and content digest, or the draft version) and checks it; `followup.py` writes follow-up briefs from a revision, keeps the follow-up link and apply records in `<task-root>/discussion/links.jsonl` and re-reads each target's pinned revision for impact review; `memory.py` registers each published revision's summary in the Memory Book through `okstra memory add --source-key` and keeps the summary and registration state in `<task-root>/discussion/memory/`; `overview.py` builds the read-only view a manager sync stores for a discussion child; `cli.py` is `okstra discussion`; `wizard.py` asks the start input. |
|
|
445
447
|
|
|
446
448
|
`prompts/lead/phase-routing.md` owns the lead's continuation decisions. Common `next_phase.py`, release gates, verification evidence, stage state and selected-direction readers consume recorded facts without importing another phase's execution policy. CLI modules such as `option_votes.py`, `option_comparison.py` and `handoff.py` remain assembly entrypoints.
|
|
447
449
|
|
|
@@ -529,6 +531,7 @@ Boilerplate shared by several skills (bash invocation rule, outdated-CLI preflig
|
|
|
529
531
|
|---|---:|---|
|
|
530
532
|
| `okstra-brief-gen` | yes | Produce task brief from ticket/doc/link/conversation |
|
|
531
533
|
| `okstra-run` | yes | Start/resume an okstra task in the current registered host session |
|
|
534
|
+
| `okstra-discussion` | yes | Start or continue a `discussion` task through the same wizard and `prepare_task_bundle()` call as `okstra-run`, then facilitate one research cycle per run, the user's completion, follow-up briefs and Memory Book recovery |
|
|
532
535
|
| `okstra-memory` | yes | Store/search/archive global conversation memory under `~/.okstra/memory-book` |
|
|
533
536
|
| `okstra-chat` | yes | Global rooms under `~/.okstra/chat` so host sessions from different providers can send and read addressed messages |
|
|
534
537
|
| `okstra-inspect` | yes | Unified read-side — sub-commands `status` (lifecycle + workStatus), `history` (past runs / re-run / resume), `report` (find final-report), `time` (elapsed-time breakdown), `logs` (wrapper log inventory + cleanup), `cost` (task bundle context/read cost), `errors` (error-log aggregation), `error-zip` (anonymized cross-project error bundle), `run-audit` (progress-invariant audit over run artifacts), `recap` (cross-run phase recap). `SKILL.md` is a thin core (preflight + dispatch table + shared rules) and each sub-command body lives in `skills/okstra-inspect/facets/<sub-command>.md`, lazily read only after dispatch resolves; the 1:1 match between dispatch rows and facet files is enforced by `tests/contract/test_okstra_inspect_facets.py` |
|