The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
JavaScript aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
chore: sync Codex marketplace v5.1.48
YeonGyu-Kim75b017473c71
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.jsonindex 3e2f7be9..34246b0b 100644--- a/plugins/omo/.codex-plugin/plugin.json+++ b/plugins/omo/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "omo",- "version": "5.1.47",+ "version": "5.1.48","description": "One Codex plugin namespace for Yeongyu's local Codex components.","author": {"name": "Yeongyu Kim",diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.jsonindex 844ded97..9d3855c2 100644--- a/plugins/omo/components/bootstrap/hooks/hooks.json+++ b/plugins/omo/components/bootstrap/hooks/hooks.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 5.1.47) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 5.1.48) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.jsonindex 2f9c21c0..f21f9cbe 100644--- a/plugins/omo/components/bootstrap/package.json+++ b/plugins/omo/components/bootstrap/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-bootstrap",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.","type": "module","private": true,diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.jsonindex e8ebc73e..c56c0e3b 100644--- a/plugins/omo/components/comment-checker/hooks/hooks.json+++ b/plugins/omo/components/comment-checker/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 5.1.47) Checking Comments"+ "statusMessage": "(OmO 5.1.48) Checking Comments"}]}diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.jsonindex be582291..473a7de3 100644--- a/plugins/omo/components/comment-checker/package.json+++ b/plugins/omo/components/comment-checker/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-comment-checker",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.jsonindex 72755495..19f8b779 100644--- a/plugins/omo/components/git-bash/hooks/hooks.json+++ b/plugins/omo/components/git-bash/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.1.47) Recommending Git Bash MCP"+ "statusMessage": "(OmO 5.1.48) Recommending Git Bash MCP"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.1.47) Resetting Git Bash MCP Reminder"+ "statusMessage": "(OmO 5.1.48) Resetting Git Bash MCP Reminder"}]}diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.jsonindex 141d963c..c1a5eeaa 100644--- a/plugins/omo/components/git-bash/package.json+++ b/plugins/omo/components/git-bash/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.","type": "module","private": true,diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.jsonindex f3aee413..afcbc390 100644--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Verifying LazyCodex Executor Evidence"+ "statusMessage": "(OmO 5.1.48) Verifying LazyCodex Executor Evidence"}]}diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.jsonindex bd65b7bb..6fb19481 100644--- a/plugins/omo/components/lazycodex-executor-verify/package.json+++ b/plugins/omo/components/lazycodex-executor-verify/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.jsonindex 6ed29bc3..ba7fa285 100644--- a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json+++ b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json@@ -1,7 +1,7 @@{"schemaVersion": 1,- "version": "5.1.47",- "inputDigest": "sha256:6cabf483e0820d8ebb42944ea3df97bedb1fcc9362a46f2659007ffa48225e10",+ "version": "5.1.48",+ "inputDigest": "sha256:be1d599745bd7b9394f34c8c277f3888b908c4b7fa1fd672aeae6c8025a4cd07","outputs": [{"path": "cli.d.ts",diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.jsonindex ee01cd38..ff5ee598 100644--- a/plugins/omo/components/lsp/hooks/hooks.json+++ b/plugins/omo/components/lsp/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 5.1.47) Checking LSP Diagnostics"+ "statusMessage": "(OmO 5.1.48) Checking LSP Diagnostics"}]}@@ -21,7 +21,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.1.47) Resetting LSP Diagnostics Cache"+ "statusMessage": "(OmO 5.1.48) Resetting LSP Diagnostics Cache"}]}diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.jsonindex 7dfae669..eb818266 100644--- a/plugins/omo/components/lsp/package.json+++ b/plugins/omo/components/lsp/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lsp",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.jsonindex e52d58ac..59ad09fa 100644--- a/plugins/omo/components/rules/hooks/hooks.json+++ b/plugins/omo/components/rules/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 5.1.47) Loading Project Rules"+ "statusMessage": "(OmO 5.1.48) Loading Project Rules"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.1.47) Loading Project Rules"+ "statusMessage": "(OmO 5.1.48) Loading Project Rules"}]}@@ -32,7 +32,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.1.47) Matching Project Rules"+ "statusMessage": "(OmO 5.1.48) Matching Project Rules"}]}@@ -45,7 +45,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 5.1.47) Resetting Project Rule Cache"+ "statusMessage": "(OmO 5.1.48) Resetting Project Rule Cache"}]}diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.jsonindex 6d6dceda..f01720e8 100644--- a/plugins/omo/components/rules/package.json+++ b/plugins/omo/components/rules/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-rules",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin that injects project rule files into model context through lifecycle hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.jsonindex d43cb77b..9438be5b 100644--- a/plugins/omo/components/teammode/hooks/hooks.json+++ b/plugins/omo/components/teammode/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Thread Title Hygiene"+ "statusMessage": "(OmO 5.1.48) Checking Thread Title Hygiene"}]}diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.jsonindex c631051b..34a16584 100644--- a/plugins/omo/components/teammode/package.json+++ b/plugins/omo/components/teammode/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-teammode",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.","type": "module","private": true,diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.jsonindex aec0d2f4..98050475 100644--- a/plugins/omo/components/telemetry/hooks/hooks.json+++ b/plugins/omo/components/telemetry/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO 5.1.47) Recording Session Telemetry"+ "statusMessage": "(OmO 5.1.48) Recording Session Telemetry"}]}diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.jsonindex 1badf7bd..c3ae4598 100644--- a/plugins/omo/components/telemetry/package.json+++ b/plugins/omo/components/telemetry/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-telemetry",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.jsonindex 77900e53..5f049753 100644--- a/plugins/omo/components/ultrawork/hooks/hooks.json+++ b/plugins/omo/components/ultrawork/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 5.1.47) Checking Ultrawork Trigger"+ "statusMessage": "(OmO 5.1.48) Checking Ultrawork Trigger"}]}diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.jsonindex 3ad769ba..8331fce2 100644--- a/plugins/omo/components/ultrawork/package.json+++ b/plugins/omo/components/ultrawork/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ultrawork",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.jsonindex f6b40f68..ddaf4289 100644--- a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json+++ b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Execute Continuation"+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Execute Continuation"}]}diff --git a/plugins/omo/components/ulw-execute-continuation/package.json b/plugins/omo/components/ulw-execute-continuation/package.jsonindex 56d6125b..3a89aaa1 100644--- a/plugins/omo/components/ulw-execute-continuation/package.json+++ b/plugins/omo/components/ulw-execute-continuation/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-execute-continuation",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex Stop hook continuation injector for omo-codex ulw-execute plans.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.jsonindex 30edb020..8e883012 100644--- a/plugins/omo/components/ulw-loop/hooks/hooks.json+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Loop Steering"+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Loop Steering"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.1.47) Recording Spawn Admission"+ "statusMessage": "(OmO 5.1.48) Recording Spawn Admission"}]}@@ -33,7 +33,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.1.47) Enforcing Unlimited Ulw-Loop Budget"+ "statusMessage": "(OmO 5.1.48) Enforcing Unlimited Ulw-Loop Budget"}]},@@ -44,7 +44,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.1.47) Guarding Ulw-Loop Spawns"+ "statusMessage": "(OmO 5.1.48) Guarding Ulw-Loop Spawns"}]}@@ -56,7 +56,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Loop Resume"+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Loop Resume"}]}diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.jsonindex 2190b6d8..7b54a453 100644--- a/plugins/omo/components/ulw-loop/package.json+++ b/plugins/omo/components/ulw-loop/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-loop",- "version": "5.1.47",+ "version": "5.1.48","description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.jsindex f01608f7..f6306685 100755--- a/plugins/omo/dist/cli-node/index.js+++ b/plugins/omo/dist/cli-node/index.js@@ -2133,7 +2133,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "5.1.47",+ version: "5.1.48",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2316,7 +2316,7 @@ var init_package = __esm(() => {},devDependencies: {"@clack/prompts": "^1.8.1",- "@code-yeongyu/senpi": "2026.10.23-1",+ "@code-yeongyu/senpi": "2026.10.25-2","@modelcontextprotocol/sdk": "^1.30.0","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/ast-grep-mcp": "workspace:*",@@ -2379,18 +2379,18 @@ var init_package = __esm(() => {typescript: "^7.0.2"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "5.1.47",- "oh-my-opencode-darwin-x64": "5.1.47",- "oh-my-opencode-darwin-x64-baseline": "5.1.47",- "oh-my-opencode-linux-arm64": "5.1.47",- "oh-my-opencode-linux-arm64-musl": "5.1.47",- "oh-my-opencode-linux-x64": "5.1.47",- "oh-my-opencode-linux-x64-baseline": "5.1.47",- "oh-my-opencode-linux-x64-musl": "5.1.47",- "oh-my-opencode-linux-x64-musl-baseline": "5.1.47",- "oh-my-opencode-windows-arm64": "5.1.47",- "oh-my-opencode-windows-x64": "5.1.47",- "oh-my-opencode-windows-x64-baseline": "5.1.47"+ "oh-my-opencode-darwin-arm64": "5.1.48",+ "oh-my-opencode-darwin-x64": "5.1.48",+ "oh-my-opencode-darwin-x64-baseline": "5.1.48",+ "oh-my-opencode-linux-arm64": "5.1.48",+ "oh-my-opencode-linux-arm64-musl": "5.1.48",+ "oh-my-opencode-linux-x64": "5.1.48",+ "oh-my-opencode-linux-x64-baseline": "5.1.48",+ "oh-my-opencode-linux-x64-musl": "5.1.48",+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.48",+ "oh-my-opencode-windows-arm64": "5.1.48",+ "oh-my-opencode-windows-x64": "5.1.48",+ "oh-my-opencode-windows-x64-baseline": "5.1.48"},overrides: {hono: "^4.13.8",@@ -92464,7 +92464,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "5.1.47",+ version: "5.1.48",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.jsindex 1a67b121..2e699716 100755--- a/plugins/omo/dist/cli/index.js+++ b/plugins/omo/dist/cli/index.js@@ -2132,7 +2132,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "5.1.47",+ version: "5.1.48",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2315,7 +2315,7 @@ var init_package = __esm(() => {},devDependencies: {"@clack/prompts": "^1.8.1",- "@code-yeongyu/senpi": "2026.10.23-1",+ "@code-yeongyu/senpi": "2026.10.25-2","@modelcontextprotocol/sdk": "^1.30.0","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/ast-grep-mcp": "workspace:*",@@ -2378,18 +2378,18 @@ var init_package = __esm(() => {typescript: "^7.0.2"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "5.1.47",- "oh-my-opencode-darwin-x64": "5.1.47",- "oh-my-opencode-darwin-x64-baseline": "5.1.47",- "oh-my-opencode-linux-arm64": "5.1.47",- "oh-my-opencode-linux-arm64-musl": "5.1.47",- "oh-my-opencode-linux-x64": "5.1.47",- "oh-my-opencode-linux-x64-baseline": "5.1.47",- "oh-my-opencode-linux-x64-musl": "5.1.47",- "oh-my-opencode-linux-x64-musl-baseline": "5.1.47",- "oh-my-opencode-windows-arm64": "5.1.47",- "oh-my-opencode-windows-x64": "5.1.47",- "oh-my-opencode-windows-x64-baseline": "5.1.47"+ "oh-my-opencode-darwin-arm64": "5.1.48",+ "oh-my-opencode-darwin-x64": "5.1.48",+ "oh-my-opencode-darwin-x64-baseline": "5.1.48",+ "oh-my-opencode-linux-arm64": "5.1.48",+ "oh-my-opencode-linux-arm64-musl": "5.1.48",+ "oh-my-opencode-linux-x64": "5.1.48",+ "oh-my-opencode-linux-x64-baseline": "5.1.48",+ "oh-my-opencode-linux-x64-musl": "5.1.48",+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.48",+ "oh-my-opencode-windows-arm64": "5.1.48",+ "oh-my-opencode-windows-x64": "5.1.48",+ "oh-my-opencode-windows-x64-baseline": "5.1.48"},overrides: {hono: "^4.13.8",@@ -92385,7 +92385,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "5.1.47",+ version: "5.1.48",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.jsonindex 53dedf01..f457c610 100644--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.1.47) Resetting Git Bash MCP Reminder",+ "statusMessage": "(OmO 5.1.48) Resetting Git Bash MCP Reminder","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.jsonindex 9b20ad89..ee001a73 100644--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.1.47) Resetting LSP Diagnostics Cache",+ "statusMessage": "(OmO 5.1.48) Resetting LSP Diagnostics Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.jsonindex 2ffbd662..ef78a3b3 100644--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 5.1.47) Resetting Project Rule Cache",+ "statusMessage": "(OmO 5.1.48) Resetting Project Rule Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.jsonindex 8ae2e2c1..4393d2a4 100644--- a/plugins/omo/hooks/post-tool-use-checking-comments.json+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 5.1.47) Checking Comments",+ "statusMessage": "(OmO 5.1.48) Checking Comments","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.jsonindex 0133c981..b11928eb 100644--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 5.1.47) Checking LSP Diagnostics",+ "statusMessage": "(OmO 5.1.48) Checking LSP Diagnostics","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.jsonindex efc5079d..8527a2ef 100644--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Thread Title Hygiene",+ "statusMessage": "(OmO 5.1.48) Checking Thread Title Hygiene","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"}]diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.jsonindex e871a27c..4b54286d 100644--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.1.47) Matching Project Rules",+ "statusMessage": "(OmO 5.1.48) Matching Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.jsonindex 5d35512f..17356f3c 100644--- a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json+++ b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook post-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.1.47) Recording Spawn Admission",+ "statusMessage": "(OmO 5.1.48) Recording Spawn Admission","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook post-tool-use-spawn"}]diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.jsonindex a8a6753f..1898bbd1 100644--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.1.47) Enforcing Unlimited Goal Budget",+ "statusMessage": "(OmO 5.1.48) Enforcing Unlimited Goal Budget","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.jsonindex e3b8d818..88330b63 100644--- a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json+++ b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.1.47) Guarding Ulw-Loop Spawns",+ "statusMessage": "(OmO 5.1.48) Guarding Ulw-Loop Spawns","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use-spawn"}]diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.jsonindex 17449c9e..fbff1a86 100644--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.1.47) Recommending Git Bash MCP",+ "statusMessage": "(OmO 5.1.48) Recommending Git Bash MCP","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.jsonindex 3de24323..50bad2a4 100644--- a/plugins/omo/hooks/session-start-checking-auto-update.json+++ b/plugins/omo/hooks/session-start-checking-auto-update.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start","timeout": 15,- "statusMessage": "(OmO 5.1.47) Checking Auto Update",+ "statusMessage": "(OmO 5.1.48) Checking Auto Update","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"}],diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.jsonindex 844ded97..9d3855c2 100644--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 5.1.47) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 5.1.48) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.jsonindex 84a575ea..ef896d0d 100644--- a/plugins/omo/hooks/session-start-loading-project-rules.json+++ b/plugins/omo/hooks/session-start-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 5.1.47) Loading Project Rules",+ "statusMessage": "(OmO 5.1.48) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.jsonindex 2bece2d6..93d95f7f 100644--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start","timeout": 15,- "statusMessage": "(OmO 5.1.47) Recording Session Telemetry",+ "statusMessage": "(OmO 5.1.48) Recording Session Telemetry","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.jsonindex 08666b66..2839f79a 100644--- a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json+++ b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Execute Continuation",+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Execute Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-execute-continuation\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json b/plugins/omo/hooks/stop-checking-ulw-loop-resume.jsonindex cfafebae..e1b3ddcb 100644--- a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json+++ b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Loop Resume",+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Loop Resume","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.jsonindex d6aeec6a..96c2ec74 100644--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 5.1.47) Verifying LazyCodex Executor Evidence",+ "statusMessage": "(OmO 5.1.48) Verifying LazyCodex Executor Evidence","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"}],diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.jsonindex 74713e51..7771dcf0 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 5.1.47) Checking Ultrawork Trigger",+ "statusMessage": "(OmO 5.1.48) Checking Ultrawork Trigger","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.jsonindex 10ec4bac..d3ce097c 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.1.47) Checking Ulw-Loop Steering",+ "statusMessage": "(OmO 5.1.48) Checking Ulw-Loop Steering","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.jsonindex 3f594e94..32fd2e76 100644--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.1.47) Loading Project Rules",+ "statusMessage": "(OmO 5.1.48) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.jsonindex 98b59ad8..64129cf5 100644--- a/plugins/omo/package-lock.json+++ b/plugins/omo/package-lock.json@@ -1,12 +1,12 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.1.47",+ "version": "5.1.48","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.1.47",+ "version": "5.1.48","workspaces": ["components/comment-checker","components/git-bash",@@ -100,7 +100,7 @@},"components/comment-checker": {"name": "@code-yeongyu/codex-comment-checker",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"omo-comment-checker": "dist/cli.js"@@ -122,7 +122,7 @@},"components/git-bash": {"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "5.1.47",+ "version": "5.1.48","bin": {"omo-git-bash-hook": "dist/cli.js"},@@ -136,7 +136,7 @@},"components/lazycodex-executor-verify": {"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"lazycodex-executor-verify": "dist/cli.js"@@ -154,7 +154,7 @@},"components/lsp": {"name": "@code-yeongyu/codex-lsp",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","dependencies": {"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon",@@ -176,7 +176,7 @@},"components/rules": {"name": "@code-yeongyu/codex-rules",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","dependencies": {"picomatch": "^4.0.7"@@ -199,7 +199,7 @@},"components/teammode": {"name": "@sisyphuslabs/codex-teammode",- "version": "5.1.47",+ "version": "5.1.48","devDependencies": {"@types/node": "^26.6.2","@vitest/coverage-v8": "5.0.1",@@ -213,7 +213,7 @@},"components/telemetry": {"name": "@code-yeongyu/codex-telemetry",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"omo-telemetry": "dist/cli.js"@@ -232,7 +232,7 @@},"components/ultrawork": {"name": "@code-yeongyu/codex-ultrawork",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"omo-ultrawork": "dist/cli.js"@@ -251,7 +251,7 @@},"components/ulw-execute-continuation": {"name": "@code-yeongyu/codex-ulw-execute-continuation",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"omo-ulw-execute-continuation": "dist/cli.js"@@ -269,7 +269,7 @@},"components/ulw-loop": {"name": "@code-yeongyu/codex-ulw-loop",- "version": "5.1.47",+ "version": "5.1.48","license": "MIT","bin": {"omo-ulw-loop": "dist/cli.js",diff --git a/plugins/omo/package.json b/plugins/omo/package.jsonindex 5ac9dd1f..6526720b 100644--- a/plugins/omo/package.json+++ b/plugins/omo/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.1.47",+ "version": "5.1.48","description": "Aggregate Codex plugin root for OMO components.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/skills/browser/runtime/omowright/manifest.json b/plugins/omo/skills/browser/runtime/omowright/manifest.jsonindex 239fc8b9..18059fef 100644--- a/plugins/omo/skills/browser/runtime/omowright/manifest.json+++ b/plugins/omo/skills/browser/runtime/omowright/manifest.json@@ -5,5 +5,5 @@"index.js": "d67d3a847fe0bbc43e824feded48b280890d31879538309e671cd5f671133995","page-bundle.js": "bfd51e8383cf47200d57387bbbed258bce5a3a3d00c38fc108034d2888e23f0c"},- "stagedAtUtc": "2026-10-25T11:01:10.118Z"+ "stagedAtUtc": "2026-10-25T15:23:15.150Z"}diff --git a/plugins/omo/skills/ulw-research/SKILL.md b/plugins/omo/skills/ulw-research/SKILL.mdindex 38d3cff5..ad9d3835 100644--- a/plugins/omo/skills/ulw-research/SKILL.md+++ b/plugins/omo/skills/ulw-research/SKILL.md@@ -166,7 +166,64 @@ Never block collection on the shape of the deliverable, and never guess it eithe1. **Derive first.** Name the lane (`template-strict`, `template-vibe`, `no-format`, `edit-existing`) and the promised formats from the request and its destination (the reference's section 3). When the request refers to an existing deliverable, decide its state with `node "$SKILL_DIR/scripts/report-tools.mjs" outcome state --deliverable <path> --session-dir "$SESSION_DIR"`: `partial` resumes the skeleton on disk, `complete` means edit-existing and never a regenerated report. `$SKILL_DIR` is this skill's own directory, the folder containing this SKILL.md.2. **Read the requester's format memory** with the memory tool when the harness exposes one: the pointer `system/human/report-style.md`, then `reference/human-report-style.md`; take the choice recorded for the most similar context (same destination kind and audience) as the first option.3. **Ask only what is still missing**: at most the reference's three questions (destination and format, audience and length, template lineage) in one call to the harness question tool (`ask_user_question` or `request_user_input`), non-blocking where the harness supports it, each with its default first, a free-text "describe the format" path, and "don't care, you decide". Collection starts without waiting; a late answer is folded in until the assembly worker starts, and after that it becomes a re-render request.-4. **Record it.** Write `## Deliverable` into `brief.md` (lane, state, formats, destination, audience, template, format description, each with `answered_by: user|default|request`) and open the manifest in the same step: `node "$SKILL_DIR/scripts/report-tools.mjs" outcome init --promised <formats> --lane <lane> --session-dir "$SESSION_DIR"`. When the ask is to recreate, reproduce, or rebuild something visual, add `Reference compare: required` with the source (URL or file) and the moments to compare; the comparison runs on every round of the build, not only at the end.+4. **Settle source fidelity in the same step.** Seven fields under `## Fidelity` in `brief.md` say what the report must stay faithful to; the reference's section 4 lists each field's values and default. Infer every field before asking anything; an explicit word in the request decides a field (`answered_by: request`), the destination, the sources, and the Phase 0 axes supply the rest (`answered_by: default`):+ - `as of`: a version, release, tag, commit, date, quarter, "as of", "current", or "latest" in the request decides it; a pointed-at repository anchors on its HEAD or tag at run start, pointed-at documents on their own revisions, and a comparison of two anchors records `multiple: <a>, <b>; rows tagged`. Default `latest at run start, <run date>`, the date of the `$SESSION_DIR` timestamp. Ask when the topic is version-bound or time-sensitive (software, APIs, standards, prices, rates, rankings, laws, programs, schedules) and nothing names an anchor; a stable topic takes the default silently.+ - `meaning check`: the QA tier decides (full: `on`, light: `off`); a chat answer on a legal, medical, financial, procurement, or public-facing question with no speed word is `on`. Ask when two explicit signals disagree: a document deliverable under a literal "quick" or "fast", or a light-tier answer that carries both a speed word and a precision demand; `on` goes first.+ - `source floor`: "official docs only", "peer-reviewed only", "SEC filings" give `primary only` or `classes: <host suffixes>`; "from these only" gives `pointed only: <source ids, URLs, or paths>`; pointed-at sources with no restricting word are seeds, not a floor. Default `standard`. Ask when a restricting phrase sits beside an open-ended question whose answer lives outside that floor. Declare each source's provenance when you snapshot it (`source snapshot --provenance primary|secondary`, by the Phase 3b primary-source rule); `primary only` refuses every source not declared `primary`.+ - `derived numbers`: "compare", "growth", "share", "estimate" give `allowed`; "only the sources' own numbers", "no estimates" give `none`. Default `allowed`. Ask when both kinds of phrase share one request. Record only `allowed` or `none` (any other value stops `fact fill` and `fact verify` with a usage error); a partial or free-text answer records `none`.+ - `languages` (never asked): the report in the user's language or the one they named; sources `en`, plus the user's language for a local topic, plus the pointed-at documents' languages; quotes `original` when every source language equals the report language, else `original with translation beside`.+ - `identifier classes` (never asked): from the Phase 0 axes' domain (software: version strings, package names, commit ids; finance: tickers, filing ids, fiscal periods; law: statute, article, and case numbers; science: gene names, DOIs, trial ids), else `none`. It is recorded only; no gate enforces it yet.+ - `fallback` (never asked): `block-quote`, or `omit` on "drop anything you cannot verify"; no other value is accepted.++ Ask nothing when the request, the destination, and the sources decide every field. Otherwise ask only the fields whose trigger fired, in the same question-tool call as the format questions (`ask_user_question` or `request_user_input`), non-blocking where the harness supports it, each with its default first, a free-text path, and "don't care, you decide" (it resolves to the first option, recorded `answered_by: user`). At most four questions ride in that call: `pending` fidelity fields first, then format Q1, Q2, Q3, then `as of`, `meaning check`, `source floor`, `derived numbers`; a question that loses its slot runs on its default and is named, with that default, in the reply that opens collection. When each reading of a field would make part of the request undeliverable, record it `pending` with no default. Collection starts regardless: `source snapshot`, `fact add`, `fact quote`, `fact derive`, `fact retract`, and `fact export` keep working while answers are pending; only the six reader-facing commands (`fact fill`, `fact verify`, `fact pairs`, `fact meaning-check`, `fact polish-apply`, `fact polish-diff`) and the assembly lane wait for the lock, and those commands exit 1 with `fidelity_interview_incomplete` while a field is `pending` or missing. When the assembly lane is about to start, a field still awaiting its answer keeps its default; a `pending` field is asked once more, blocking this time.+5. **Record it.** Write `## Deliverable` into `brief.md` (lane, state, formats, destination, audience, template, format description, each with `answered_by: user|default|request`) plus `## Fidelity` (the block below), and open the manifest in the same step: `node "$SKILL_DIR/scripts/report-tools.mjs" outcome init --promised <formats> --lane <lane> --session-dir "$SESSION_DIR"`. When the ask is to recreate, reproduce, or rebuild something visual, add `Reference compare: required` with the source (URL or file) and the moments to compare; the comparison runs on every round of the build, not only at the end.++#### The fidelity questions++Ask them in the user's language, translating these English texts faithfully and keeping the option order; `<run date>` is the `$SESSION_DIR` date.++- **`as of`**, header `As of`: "Which version or date must the facts hold for? Sources are snapshotted and quoted against that anchor."+ 1. `Latest as of today, <run date>` - The state published at the run's start; anything older is flagged as stale.+ 2. `Other: a named version, release, or date` - Type it (v3.2, 2026-Q3, a commit or tag). Every quote and number is checked against sources valid at that anchor.+ 3. `Don't care, you decide` - Resolves to option 1.+- **`meaning check`**, header `Drift check`: "Numbers and quotes are always script-checked against source snapshots. Should every explanatory sentence also be read against its source quote by a separate reader? Slower and more tokens; it catches widened scope and dropped hedges."+ 1. `On` - Every sentence is paired with its source and read; confirmed drift is rewritten from the quote or listed in the briefing.+ 2. `Off (faster)` - Script checks only: numbers, units, quotes, qualifiers, bindings. A paraphrase that shifts meaning is not read.+ 3. `Other: where to focus` - Type it ("the financial sections", "anything about the competitor"); those pairs go to the strongest reader.+ 4. `Don't care, you decide` - Resolves to option 1.+- **`source floor`**, header `Sources`: "Which sources may back a statement of fact?"+ 1. `Standard: primary source required for high-risk claims` - Numeric, legal, financial, dated, and causal claims need a primary source plus two independent domains; other claims may cite attributed secondary sources.+ 2. `Primary only` - Every fact traces to a first-party source (standard, filing, dataset, official doc); commentary appears only as attributed opinion.+ 3. `Only the sources I pointed at` - Ledger rows come from the named files and URLs only; anything else is context, not evidence.+ 4. `Other: name the source classes` - Type it ("peer-reviewed only", "no vendor blogs").+ 5. `Don't care, you decide` - Resolves to option 1.+- **`derived numbers`**, header `Derived`: "May the report state numbers no source states (sums, growth rates, shares, unit conversions, estimates)?"+ 1. `Yes, computed by script and labeled DERIVED` - Each one names its operation and input rows; inputs are checked for unit, period, and population compatibility; an estimate carries its assumptions.+ 2. `No, sourced numbers only` - Every number is a MEASURED ledger value; comparisons are stated in words or shown side by side.+ 3. `Other: describe` - Type it ("growth rates yes, estimates no"). A partial allowance is recorded as `none`, and the reply that opens collection says so.+ 4. `Don't care, you decide` - Resolves to option 1.++#### The `## Fidelity` block++Write it in the same step as `## Deliverable`, provisional defaults included, one line per field with its `answered_by`, plus an `asked:` line naming the fidelity questions sent:++```text+## Fidelity+as of: latest at run start, 2026-10-23 (answered_by: default)+meaning check: on (answered_by: default)+source floor: standard (answered_by: default)+derived numbers: pending (answered_by: pending)+languages: report en; sources en; quotes original (answered_by: default)+identifier classes: version strings, package names, commit ids (answered_by: default)+fallback: block-quote (answered_by: default)+asked: derived numbers+```++Values carry no parentheses; `pending` goes only with `answered_by: pending`. When an answer lands, rewrite that one line with `answered_by: user` and leave `asked:` as history; a late answer after `fact fill` is a re-render: fill again, then verify.++**Re-entry.** An `edit-existing` session, or any session created before this block existed, has no `## Fidelity`. Before any `fact` command, run the inference step above and write the block with `answered_by: default` on every field. `claims index` on a free-form `claim-graph.md` (no claim table) returns `{claims: [], errors: [...]}`, exits 2, and writes no `claims.json`; run `fact verify` without it, and the gate reports each unbound sentence as `unbound_sentence` (major) instead of blocking.++**Calibration.** `fact meaning-check` appends one line per flagged pair to `--calibration` (default `$SESSION_DIR/fidelity-calibration.jsonl`). After each run, also append that run's new lines to the workspace-level `.omo/ulw-research/fidelity-calibration.jsonl`; promotion of `meaning_drift_confirmed` is decided from that log.Phase 5 opens by turning the recorded fields into `design-spec.md`.diff --git a/plugins/omo/skills/ulw-research/references/deliverable-phase.md b/plugins/omo/skills/ulw-research/references/deliverable-phase.mdindex f5649d28..958277de 100644--- a/plugins/omo/skills/ulw-research/references/deliverable-phase.md+++ b/plugins/omo/skills/ulw-research/references/deliverable-phase.md@@ -54,7 +54,7 @@ QA tiers: **light** runs the static gates and one render check of the answer, an## 4. The empty-info interview-The interview has exactly three questions, asked together through the harness question tool without waiting for the answer. A question is **skipped** when the request, the destination, a pointed-at document, or a declared memory episode already answers it; when all three are answered, nothing is asked.+The interview has three format questions, asked together through the harness question tool without waiting for the answer; the fidelity questions (below) ride in the same call only when their triggers fire. A question is **skipped** when the request, the destination, a pointed-at document, or a declared memory episode already answers it; when all three are answered, nothing is asked.- **Q1 - destination and format.** Options in this order: the memory hit (the choice recorded for the most similar prior context, section 5) when there is one; the derived default from section 3; "describe the format in your own words" (free text, which becomes the brief for the design spec); "don't care, you decide" (resolves to the derived default).- **Q2 - audience and length.** Who reads it, and a length band: `short` (a page or a post), `standard` (a report of about 5 to 12 pages), or `deep` (a full dossier). The derived default is first.@@ -76,6 +76,48 @@ format description: none`answered_by` is one of `user`, `default`, `request`. Run `outcome init` (section 9) in the same step, with the formats as the promised list.+### The fidelity fields and the lock++The values below are read by `scripts/fidelity-policy.mjs`, the single registry: `SOURCE_FLOOR_RULES` and `parseSourceFloor()` for the `source floor` forms (`pointedFlag` in source registration reads the same grammar), and `FIDELITY_VALUE_RULES` for `derived numbers`, `languages`, `fallback`, and `meaning check`. `derived numbers` and `fallback` accept only the values in their row below (`FIDELITY_VALUE_RULES.tables`, any case); any other value, a free-text answer included, is a usage error (exit `2`) naming the field and the value, as an unknown `source floor` form is. Map a free-text answer onto a table value before writing it: a partial allowance ("growth rates yes, estimates no") records `derived numbers: none`.++Beside `## Deliverable`, the brief records what the report must stay faithful to, under `## Fidelity`. The fields are inferred first; only `as of`, `meaning check`, `source floor`, and `derived numbers` may be asked, each on its own trigger, in the same question call as Q1-Q3 (at most four questions in that call). The inference rules, the triggers, and the question texts are in `SKILL.md`.++| Field | Values | Default | Read by |+| --- | --- | --- | --- |+| `as of` | `latest at run start, <YYYY-MM-DD>`; one anchor (version, release, tag, commit, date, period); `multiple: <anchor>, <anchor>; rows tagged` | `latest at run start, <run date>` | `fact verify` (`quote_stale_version` when a quoted source's revision is not the anchor) |+| `meaning check` | `on`, `off`, `on; force strong: <scope>` | `on` in the full tier, `off` in the light tier | `fact pairs` (`off` writes `{"skipped": true}`) and the orchestrator's reader lanes |+| `source floor` | `standard`, `primary only`, `pointed only: <list>`, `classes: <list>` | `standard` | `fact fill` and `fact verify` (`source_outside_floor`) |+| `derived numbers` | `allowed`, `none` | `allowed` | `fact fill` and `fact verify` (`derived_not_allowed`) |+| `languages` | `report <lang>; sources <langs>; quotes original`, or `...; quotes original with translation beside` | report in the requester's language; quotes with translation when a source language differs | `fact fill` (whether a translation binds to its quote) |+| `identifier classes` | `none`, or a list of token classes | from the domain of the Phase 0 axes | recorded only: no gate enforces it yet |+| `fallback` | `block-quote`, `omit` | `block-quote` | `fact fill --replace-failed` |++```text+## Fidelity+as of: latest at run start, 2026-10-23 (answered_by: default)+meaning check: on (answered_by: default)+source floor: standard (answered_by: default)+derived numbers: pending (answered_by: pending)+languages: report en; sources en; quotes original (answered_by: default)+identifier classes: version strings, package names, commit ids (answered_by: default)+fallback: block-quote (answered_by: default)+asked: derived numbers+```++Each line is `<field>: <value> (answered_by: user|default|request|pending)`; values carry no parentheses, `pending` goes only with `answered_by: pending`, and `asked:` is an optional history line. A malformed line or a second block is a usage error (exit `2`) naming the line.++**The lock.** The brief is locked when all seven fields are present and none is `pending`. Six stages refuse an unlocked brief with one `fidelity_interview_incomplete` defect (blocker, integrity), exit `1`, and write nothing: `fact fill`, `fact verify`, `fact pairs`, `fact meaning-check`, `fact polish-apply`, `fact polish-diff`. Each reads `--brief`, default `$SESSION_DIR/brief.md`. Collection never waits: `source snapshot`, `fact add`, `fact quote`, `fact derive`, `fact retract`, `fact export`, and `claims index` never read the lock. Provisional defaults are written at brief time, so the lock fires only on a `pending` field still open when the assembly lane is about to start; that one question is then asked again, blocking.++**What fill and verify enforce.** At every `fact fill`, each placeholder's row is checked against the current lock, and `fact verify` checks every `data-fact` element of the edition against it again, so tightening the brief after fill fails the next verify:++- `derived numbers: none` refuses a `derived`, `converted`, or `assumed` row (`derived_not_allowed`): the requester was promised measured values only.+- The source floor is evaluated live against the `meta.json` of every source behind the row (a derived row's sources are its operands' sources): `pointed only: <list>` admits a source whose id (`S4`), URL, or path is in the list; `primary only` admits a source whose declared provenance is `primary` (`source snapshot --provenance primary|secondary`, default `unknown`; `secondary` and `unknown` are refused); `classes: <list>` admits a source whose URL host equals a listed host suffix or ends with `.<suffix>` (`sec.gov`, `go.kr`); `standard` refuses nothing. Under any floor but `standard`, a row resting on no source (an `assumed` row, or a derived row with such an operand) is refused as well: no source of it can be inside the floor. A refused row is `source_outside_floor`. Rows registered while the floor was pending are reclassified the moment it locks or changes. The row's `outside_floor` is the cached result of the last fill, never an input; fill writes it to the ledger even when it refuses.+- `languages` with `quotes original with translation beside` lets a `{{Q7:label}}` be followed by its translation, `<span data-translates="Q7">...</span>` in HTML or `<!-- translates: Q7 -->` and the sentence in Markdown; fill binds it to Q7, and `fact pairs` emits it as a `translation` pair. Under `quotes original` fill does not bind it.+- `fallback: omit` makes `--replace-failed` remove a twice-failed sentence instead of replacing it with an attributed block quote.+- Fill records `brief_sha256` in `<out>.fill-map.json`: the sha256 of the locked block normalized to its seven `field: value` lines in field order (`answered_by` and `asked:` excluded). `fact verify` reads that map (`--fill-map`, else `<report>.fill-map.json` when present) and refuses with `brief_changed` when the hash is not the current block's or the map has none; re-fill, then verify.++**Re-entry.** A session started before this block existed (an `edit-existing` run included) has no `## Fidelity`: run the inference step and write the block with `answered_by: default` before any `fact` command.+## 5. Report-format memory episodesWhen the memory tool is present, the requester's report-format choices are kept as an append-only episode log, so a repeat requester is not asked the same question twice. When no memory tool is present, skip this section silently.@@ -156,7 +198,7 @@ node "$SKILL_DIR/scripts/report-tools.mjs" repair decide --state "$SESSION_DIR/r- `action: repair`: fix the listed defects, re-render, re-run the gate, and ask again.- `action: deliver`: stop repairing and deliver. `reason` is `clean` or the stop condition that fired; the residual defects are written into the manifest and listed in the closing briefing.-- `action: block` (exit `1`): do not deliver. Either a content-integrity defect remains (`missing_closing_section`, `missing_citation_section`, `broken_asset_reference`, `missing_required_section`, `missing_promised_deliverable`, or a fidelity integrity code: `unresolved_placeholder`, `value_mismatch`, `unit_mismatch`, `quote_not_verbatim`, `claim_status_invalid`, `incompatible_operands`, `pointer_label_mismatch`, `quote_anchor_unresolved`, `unit_duplicated`, `polish_diff_fail`, `fidelity_interview_incomplete`, `derived_not_allowed`, `source_outside_floor`, `snapshot_hash_mismatch`, `chart_value_untraceable`, `quote_unbound`, `edition_unverified`), or a stop fired without proof of a usable artifact (`--artifact-bytes` and `--renders`). Tell the requester what blocks delivery and record the affected rows as `failed` with the reason.+- `action: block` (exit `1`): do not deliver. Either a content-integrity defect remains (`missing_closing_section`, `missing_citation_section`, `broken_asset_reference`, `missing_required_section`, `missing_promised_deliverable`, or a fidelity integrity code: `unresolved_placeholder`, `value_mismatch`, `unit_mismatch`, `quote_not_verbatim`, `claim_status_invalid`, `incompatible_operands`, `pointer_label_mismatch`, `quote_anchor_unresolved`, `unit_duplicated`, `polish_diff_fail`, `fidelity_interview_incomplete`, `derived_not_allowed`, `source_outside_floor`, `brief_changed`, `snapshot_hash_mismatch`, `chart_value_untraceable`, `quote_unbound`, `edition_unverified`), or a stop fired without proof of a usable artifact (`--artifact-bytes` and `--renders`). Tell the requester what blocks delivery and record the affected rows as `failed` with the reason.**The fidelity barrier is separate from the budget.** A `deliver` decision does not release fidelity defects: `outcome verify` and `outcome finish` use the fidelity gate's `blocksDelivery` predicate over `DEFECT_CODES` (integrity, blocker, or major), never a CLI code list or the row's claimed severity. Unknown codes refuse with `unknown defect code <code>`; known blockers produce `fidelity_unresolved`. Fix the defect and re-verify the edition before delivery. The table and the record schema in `scripts/fidelity-records.mjs` are the spec for the barrier. Every fidelity record carries one envelope (`record_kind`, `artifact_sha256`, `report`, `written_at`, `defects`) plus the fields its kind declares; a record with a missing, unknown, or ill-typed field refuses as malformed (`edition_unverified`). `FIDELITY_RECORDS` has one row per record kind, each rule a column: where its records are, when a delivered session must carry one, the envelope field that binds it to the delivered bytes (`artifact_sha256`), and which defects block. The rows are `fidelity` (`fact verify`, one record per delivered edition, named by `--verified-by`) and `meaning` (`fidelity-meaning-defects.json` from `fact meaning-check`, one per session, required while the locked brief's `meaning check` is `on` or its `## Fidelity` block is malformed; missing: `meaning gate not run`, the same `edition_unverified` refusal, released only by the logged `fidelity not_run` exemption in a session with no ledger or fidelity record). A record whose `artifact_sha256` matches no delivered edition's source bytes refuses as `is for a different edition`, so a meaning record from an earlier draft never passes a rewritten one: rerun `fact pairs` and the readers after every rewrite. A `meaning_drift_confirmed` or `meaning_unverified` in that record holds the barrier like any other major.@@ -214,17 +256,17 @@ Invoke every command as `node "$SKILL_DIR/scripts/report-tools.mjs" <command>`.| `outcome briefing` | `--json`, `--ledger <file>`, `--session-dir <dir>`, `--now <ISO>` | never || `format-extract <reference>` | `--out <design-spec.md>` (required), `--from-url` | never (an unsupported reference exits `2`) || `--help` | `--json` | never |-| `source snapshot` | `--id S<n>` (required), one of `--url <u>`, `--html <file>`, `--text <file>` (with optional `--extractor NAME@VERSION`), `--command '<argv json>' --cwd <dir>`; `--kind page\|command\|document`, `--provenance primary\|secondary`, `--revision <r>`, `--session-dir <dir>` | the id already holds different content (`snapshot_exists`) |+| `source snapshot` | `--id S<n>` (required), one of `--url <u>`, `--html <file>`, `--text <file>` (with optional `--extractor NAME@VERSION`), `--command '<argv json>' --cwd <dir>`; `--kind page\|command\|document`, `--provenance primary\|secondary` (default `unknown`, read by `source floor: primary only`), `--revision <r>`, `--session-dir <dir>` | the id already holds different content (`snapshot_exists`) || `fact add` | `--source S<n>` with `--find <text>` (`--unit-expected <unit>`), or `--table <id> --row <label> --col <label>`, or `--page N --line N`; `--label`, `--entity`, `--valid-at`, `--population`, `--accounting-basis`, `--observation O<n>`, `--json`, `--session-dir <dir>`. Or `--assumed <value> --unit <unit> --rationale <text> --label <label>` | `fact_not_located`, `fact_ambiguous`, `unit_mismatch` (no row written) || `fact quote` | `--source S<n> --match <text>` (required), `--label`, `--json`, `--session-dir <dir>` | `fact_not_located`, `fact_ambiguous` || `fact retract <id>` | `--reason <text>` (required), `--replacement <id>`, `--session-dir <dir>` | never (an illegal transition exits `2`) || `fact export` | `--csv`, `--out <file>`, `--session-dir <dir>` | never |-| `fact fill <src>` | `--out <file>` or `--view`, `--format html\|md\|tex`, `--inline`, `--replace-failed`, `--session-dir <dir>` | a fill error (nothing is written) |-| `fact verify <report>` | `--format html\|md` (from the extension by default), `--sources <dir>`, `--claims <claims.json>`, `--fill-map <file>` (a Markdown edition reads `<report>.fill-map.json` by default), `--brief <brief.md>`, `--out <record>`, `--session-dir <dir>` | any blocker or major defect |-| `fact pairs <report>` | `--format html\|md`, `--ledger <fact-ledger.json>`, `--claims <claims.json>`, `--changed-since <fill-map.json>` (keep only the pairs whose sentence text is not in the pre-polish artifact that map names, so the readers re-check exactly what polish rewrote; the map must carry `artifact_sha256` and the artifact must still hash to it, otherwise the command exits `2`), `--brief <brief.md>`, `--out <pairs.json>`, `--session-dir <dir>` | the brief has no locked `## Fidelity` block (with `meaning check: off` it writes `{"skipped": true}` and exits `0`) |-| `fact polish-apply <report.html>` | `--edits <polish-edits.json>` and `--out <report.polished.html>` (both required; a missing flag or a Markdown edition exits `2`), `--format html`, `--ledger <fact-ledger.json>`, `--session-dir <dir>` | never: it exits `0` whenever it wrote the output. Each rejected (`polish_edit_rejected`) or unlocated (`polish_edit_unlocated`) edit leaves its text unchanged and is printed verbatim, one line per rejection, in the summary and in `data.rejected_reasons`; `data` also carries `applied`, `rejected`, `unlocated`, `applied_indexes`, `input_sha256`, `edits_sha256`, and `out_sha256` |-| `fact polish-diff` | `--before <pre-polish.html>` and `--after <polished.html>` (both required; a missing flag exits `2`), `--ledger <fact-ledger.json>`, `--out <record>` (default `$SESSION_DIR/polish-defects.json`), `--session-dir <dir>` | a registry blocker in the diff (majors and minors are reported and exit `0`; a defect code the registry does not know refuses with `unknown defect code <code>`). The record is `{command, status, exitCode, before, artifact, artifact_sha256, defects[], counts}`, with `counts` in contract buckets |-| `fact meaning-check` | `--pairs <pairs.json>` and `--verdicts <file>` (required; repeatable, one per reader tier), `--dispute P<n> --reason <text>`, `--run-id <id>`, `--calibration <file>` (default `fidelity-calibration.jsonl`), `--out <record>` (default `fidelity-meaning-defects.json`), `--session-dir <dir>` | `meaning_drift_confirmed` (stderr carries one JSON line with the defect and dropped-verdict counts) |+| `fact fill <src>` | `--out <file>` or `--view`, `--format html\|md\|tex`, `--inline`, `--replace-failed`, `--brief <brief.md>`, `--session-dir <dir>` | `fidelity_interview_incomplete`, `derived_not_allowed`, `source_outside_floor` (section 4), or a fill error: no edition, fill map, or state is written; the ledger's cached `outside_floor` is (section 4). Off-table `derived numbers` or `fallback` exits `2` |+| `fact verify <report>` | `--format html\|md` (from the extension by default), `--sources <dir>`, `--claims <claims.json>`, `--fill-map <file>` (a Markdown edition reads `<report>.fill-map.json` by default), `--brief <brief.md>`, `--out <record>`, `--session-dir <dir>` | `fidelity_interview_incomplete` (no record written), or any blocker or major defect, `brief_changed`, `derived_not_allowed`, and `source_outside_floor` under the current brief included (section 4) |+| `fact pairs <report>` | `--format html\|md`, `--ledger <fact-ledger.json>`, `--claims <claims.json>`, `--changed-since <fill-map.json>` (keep only the pairs whose sentence text is not in the pre-polish artifact that map names, so the readers re-check exactly what polish rewrote; the map must carry `artifact_sha256` and the artifact must still hash to it, otherwise the command exits `2`), `--brief <brief.md>`, `--out <pairs.json>`, `--session-dir <dir>` | `fidelity_interview_incomplete` (with `meaning check: off` it writes `{"skipped": true}` and exits `0`) |+| `fact polish-apply <report.html>` | `--edits <polish-edits.json>` and `--out <report.polished.html>` (both required; a missing flag or a Markdown edition exits `2`), `--format html`, `--ledger <fact-ledger.json>`, `--brief <brief.md>`, `--session-dir <dir>` | `fidelity_interview_incomplete` (nothing written); otherwise never: it exits `0` whenever it wrote the output. Each rejected (`polish_edit_rejected`) or unlocated (`polish_edit_unlocated`) edit leaves its text unchanged and is printed verbatim, one line per rejection, in the summary and in `data.rejected_reasons`; `data` also carries `applied`, `rejected`, `unlocated`, `applied_indexes`, `input_sha256`, `edits_sha256`, and `out_sha256` |+| `fact polish-diff` | `--before <pre-polish.html>` and `--after <polished.html>` (both required; a missing flag exits `2`), `--ledger <fact-ledger.json>`, `--out <record>` (default `$SESSION_DIR/polish-defects.json`), `--brief <brief.md>`, `--session-dir <dir>` | `fidelity_interview_incomplete` (nothing written), or a registry blocker in the diff (majors and minors are reported and exit `0`; a defect code the registry does not know refuses with `unknown defect code <code>`). The record is `{command, status, exitCode, before, artifact, artifact_sha256, defects[], counts}`, with `counts` in contract buckets |+| `fact meaning-check` | `--pairs <pairs.json>` and `--verdicts <file>` (required; repeatable, one per reader tier), `--dispute P<n> --reason <text>`, `--run-id <id>`, `--calibration <file>` (default `fidelity-calibration.jsonl`), `--brief <brief.md>`, `--out <record>` (default `fidelity-meaning-defects.json`), `--session-dir <dir>` | `fidelity_interview_incomplete`, or `meaning_drift_confirmed` (stderr carries one JSON line with the defect and dropped-verdict counts) || `fact derive` | `--op <op>` (required) with the operation's operands (section 11), `--unit`, `--to`, `--rationale`, `--disjoint`, `--label`, `--json`, `--session-dir <dir>` | `incompatible_operands` (no row written) || `claims index <claim-graph.md>` | `--out <claims.json>` (required) | never (a malformed claim table exits `2`) |diff --git a/plugins/omo/skills/ulw-research/references/report-gates.md b/plugins/omo/skills/ulw-research/references/report-gates.mdindex a9fe47bc..d343a0a7 100644--- a/plugins/omo/skills/ulw-research/references/report-gates.md+++ b/plugins/omo/skills/ulw-research/references/report-gates.md@@ -47,7 +47,8 @@ Raised only by the fidelity verifier (the fact ledger, fill, verify, meaning, an| `polish_diff_fail` | blocker | true | The polish pass changed protected fact spans, numerals or units, tickers, table rows, or any markup byte (including every attribute, comments, and script/style/template content). | Revert to the pre-polish artifact and apply text-node edits only; markup changes require the full fidelity gates. || `fidelity_interview_incomplete` | blocker | true | A fidelity field in the brief is still pending or missing when a fidelity command runs. | A fidelity field is pending or missing in brief.md; answer the open question or record its default, then rerun. || `derived_not_allowed` | blocker | true | A placeholder resolves to a derived, converted, or assumed row while the brief allows no derived numbers. | The brief allows no derived or assumed numbers; cite a source row directly or change the brief with the requester. |-| `source_outside_floor` | blocker | true | A ledger row's source lies outside the source floor the brief records (pointed sources only, or the allowed source classes). | The row's source is outside the source floor the brief records; use a source the brief allows or remove the fact. |+| `source_outside_floor` | blocker | true | A ledger row's source lies outside the source floor the brief records (pointed sources only, primary only, or the allowed source classes), or the row rests on no source under any floor but `standard`. | The row's source is outside the source floor the brief records; use a source the brief allows or remove the fact. |+| `brief_changed` | blocker | true | `fact verify` reads an edition's fill map whose recorded brief hash is not the hash of the current locked `## Fidelity` block, or that records none. | The edition's fill map was not written under the current ## Fidelity block (it changed after fill, or the map predates the binding); re-run fact fill, then fact verify. || `snapshot_hash_mismatch` | blocker | true | A pinned source snapshot's text no longer hashes to its recorded hash, or indexed slices no longer equal the snapshot text. | The source snapshot changed after it was pinned; re-snapshot the source and re-register its rows. || `chart_value_untraceable` | blocker | true | A chart data label, axis tick, or chart data file does not match the ledger-backed data the chart declares, or the chart declares no data source. | A chart value, tick, or data file does not match its ledger-backed data source; re-render the chart from the exported data. || `quote_unbound` | blocker | true | A direct quotation in the report has no ledger quote row behind it; a citation marker alone does not bind it. | A direct quotation has no ledger quote row; register it with fact quote and insert it through its placeholder. |diff --git a/plugins/omo/skills/ulw-research/scripts/contracts.mjs b/plugins/omo/skills/ulw-research/scripts/contracts.mjsindex 27cbe39d..60aa7e33 100644--- a/plugins/omo/skills/ulw-research/scripts/contracts.mjs+++ b/plugins/omo/skills/ulw-research/scripts/contracts.mjs@@ -62,6 +62,7 @@ export const DEFECT_CODES = deepFreeze({fidelity_interview_incomplete: { severity: "blocker", integrity: true, hint: "A fidelity field is pending or missing in brief.md; answer the open question or record its default, then rerun." },derived_not_allowed: { severity: "blocker", integrity: true, hint: "The brief allows no derived or assumed numbers; cite a source row directly or change the brief with the requester." },source_outside_floor: { severity: "blocker", integrity: true, hint: "The row's source is outside the source floor the brief records; use a source the brief allows or remove the fact." },+ brief_changed: { severity: "blocker", integrity: true, hint: "The edition's fill map was not written under the current ## Fidelity block (it changed after fill, or the map predates the binding); re-run fact fill, then fact verify." },snapshot_hash_mismatch: { severity: "blocker", integrity: true, hint: "The source snapshot changed after it was pinned; re-snapshot the source and re-register its rows." },chart_value_untraceable: { severity: "blocker", integrity: true, hint: "A chart value, tick, or data file does not match its ledger-backed data source; re-render the chart from the exported data." },quote_unbound: { severity: "blocker", integrity: true, hint: "A direct quotation has no ledger quote row; register it with fact quote and insert it through its placeholder." },@@ -99,7 +100,7 @@ export const DEFECT_CODES = deepFreeze({export const FIDELITY_CODES = Object.freeze(["unresolved_placeholder", "value_mismatch", "unit_mismatch", "quote_not_verbatim", "claim_status_invalid","incompatible_operands", "pointer_label_mismatch", "quote_anchor_unresolved", "unit_duplicated", "polish_diff_fail",- "fidelity_interview_incomplete", "derived_not_allowed", "source_outside_floor", "snapshot_hash_mismatch",+ "fidelity_interview_incomplete", "derived_not_allowed", "source_outside_floor", "brief_changed", "snapshot_hash_mismatch","chart_value_untraceable", "quote_unbound", "edition_unverified", "untraceable_number", "unsupported_verification", "claim_kind_mismatch","conflicting_readings", "hedge_dropped", "direction_flipped", "causality_added", "qualifier_dropped", "unbound_sentence","meaning_drift_confirmed", "meaning_unverified", "polish_edit_rejected", "polish_hedging_decreased", "polish_text_churn", "snapshot_mismatch",@@ -134,16 +135,7 @@ export const GATE_STATUSES = Object.freeze(["pass", "fail", "not_run"])export const LINEAGE_MODES = Object.freeze(["inline", "section"])export const ANSWERED_BY = Object.freeze(["user", "default", "request", "pending"])export const REPAIR_DEFAULTS = Object.freeze({ maxAttempts: 3, plateauLimit: 2, wallClockMs: 15 * 60 * 1000 })-export const DESIGN_SPEC_SECTIONS = Object.freeze([- "Extracted from",- "Tokens",- "Typography",- "Layout",- "Structure",- "Figures",- "Citations",- "Open questions",-])+export const DESIGN_SPEC_SECTIONS = Object.freeze(["Extracted from", "Tokens", "Typography", "Layout", "Structure", "Figures", "Citations", "Open questions"])const ISO_DATE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/diff --git a/plugins/omo/skills/ulw-research/scripts/fact-commands-fill.mjs b/plugins/omo/skills/ulw-research/scripts/fact-commands-fill.mjsnew file mode 100644index 00000000..1838f635--- /dev/null+++ b/plugins/omo/skills/ulw-research/scripts/fact-commands-fill.mjs@@ -0,0 +1,86 @@+// fact-commands-fill.mjs - `fact fill`, the reader-facing fill of a placeholder source.+//+// It refuses an unlocked brief (fidelity_interview_incomplete) and applies the locked `## Fidelity`+// fields: `derived numbers: none` and the source floor refuse rows (derived_not_allowed,+// source_outside_floor, evaluated at every fill), `languages` decides whether a translation after a+// quote binds to it, and `fallback` picks the block quote or omission for --replace-failed. Any+// error writes no edition, fill map, or state; the one write that survives a refusal is the+// ledger's cached outside_floor per row (skipped under --view). The fill map records brief_sha256,+// the locked block fact verify checks it against. node: builtins and sibling imports only.++import { readFileSync, writeFileSync } from "node:fs"+import { dirname, extname, resolve } from "node:path"++import { CliError, sha256Of, writeJsonAtomic } from "./cli-support.mjs"+import { DEFECT_CODES } from "./contracts.mjs"+import { FILL_FORMATS, fill } from "./fact-fill.mjs"+import { readLedger, writeLedger } from "./fact-ledger.mjs"+import { briefHashOf, fillPolicy, lockedBrief, policyErrors } from "./fidelity-policy.mjs"+import { readState, writeState } from "./fidelity-state.mjs"+import { findPlaceholders } from "./placeholder.mjs"+import { sessionDirOf } from "./source-commands.mjs"++/** The CLI's input vocabulary: fill's output formats plus aliases (tex is filled as md), and the extension defaults. */+export const FILL_INPUT_FORMAT_RULES = Object.freeze({+ aliases: Object.freeze({ tex: "md" }),+ extensions: Object.freeze({ ".md": "md", ".tex": "tex" }),+})+export const FILL_INPUT_FORMATS = Object.freeze([...FILL_FORMATS, ...Object.keys(FILL_INPUT_FORMAT_RULES.aliases)])+const fillFormatOf = (format) => FILL_INPUT_FORMAT_RULES.aliases[format] ?? format++function readText(path) {+ try {+ return readFileSync(path, "utf8")+ } catch (error) {+ throw new CliError(`cannot read ${path}: ${error.code ?? error.message}`)+ }+}++/** The inline edition: local stylesheets and scripts inlined, relative image paths made absolute. */+function inlineAssets(html, baseDir) {+ const local = (ref) => !/^[a-z][a-z0-9+.-]*:|^\/\//i.test(ref)+ return html+ .replace(/<link\b[^>]*\brel=["']stylesheet["'][^>]*>/gi, (tag) => {+ const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1]+ return href && local(href) ? `<style>${readText(resolve(baseDir, href))}</style>` : tag+ })+ .replace(/<script\b([^>]*)\bsrc=["']([^"']+)["']([^>]*)><\/script>/gi, (tag, pre, src, post) => (local(src) ? `<script${pre}${post}>${readText(resolve(baseDir, src))}</script>` : tag))+ .replace(/(<img\b[^>]*\bsrc=["'])([^"']+)(["'])/gi, (tag, pre, src, post) => (local(src) && !src.startsWith("/") ? `${pre}${resolve(baseDir, src)}${post}` : tag))+}++/** @param {{ positionals: string[], flags: Record<string, any> }} args parsed by runFact */+export function runFactFill(args) {+ const [source] = args.positionals+ const { flags } = args+ if (!source || (flags.out === undefined && !flags.view)) throw new CliError("usage: fact fill <src> (--out <path> | --view) [--format html|md|tex] [--inline] [--replace-failed] [--brief brief.md]")+ const format = flags.format ?? FILL_INPUT_FORMAT_RULES.extensions[extname(source).toLowerCase()] ?? "html"+ if (!FILL_INPUT_FORMATS.includes(format)) throw new CliError(`--format must be ${FILL_INPUT_FORMATS.slice(0, -1).join(", ")}, or ${FILL_INPUT_FORMATS.at(-1)}`)+ if (flags.inline && format !== "html") throw new CliError("--inline applies to the html edition only")+ const sessionDir = sessionDirOf(flags)+ const { parsed, refusal } = lockedBrief("fact fill", flags)+ if (refusal) return refusal+ const policy = fillPolicy(parsed)+ const text = readText(source)+ const ledger = readLedger(sessionDir)+ const refused = policyErrors(text, findPlaceholders(text), ledger, sessionDir, policy)+ if (refused.cacheChanged && !flags.view) writeLedger(sessionDir, ledger)+ const state = flags["replace-failed"] ? readState(sessionDir) : null+ const result = fill(text, ledger, { format: fillFormatOf(format), view: flags.view === true, fallback: policy.fallback, ...(state ? { replaceFailed: state } : {}) })+ const warnings = result.warnings+ if (result.out === null || refused.errors.length > 0) {+ const filled = result.errors.map((error) => ({ ...error, severity: DEFECT_CODES[error.code]?.severity ?? "blocker", hint: DEFECT_CODES[error.code]?.hint ?? null }))+ const defects = [...refused.errors, ...filled]+ return { json: { command: "fact fill", status: "fail", exitCode: 1, defects, warnings }, summary: `fact fill: FAIL - ${defects.length} error(s), nothing written`, exitCode: 1 }+ }+ const entries = policy.translations ? result.fillMap : result.fillMap.filter((entry) => entry.translates === undefined)+ const out = flags.inline ? inlineAssets(result.out, dirname(resolve(source))) : result.out+ if (flags.view) return { text: out, summary: `fact fill --view: ${entries.length} pointer(s), ${warnings.length} warning(s)`, exitCode: 0 }+ writeFileSync(flags.out, out)+ if (state) writeState(sessionDir, state)+ const artifact = sha256Of(out)+ const map = `${resolve(flags.out)}.fill-map.json`+ const brief = briefHashOf(parsed)+ writeJsonAtomic(map, { schemaVersion: 1, format, artifact: resolve(flags.out), artifact_sha256: artifact, brief_sha256: brief, entries })+ const data = { out: resolve(flags.out), map, artifact_sha256: artifact, brief_sha256: brief, occurrences: entries.length, warnings }+ return { json: { command: "fact fill", status: "pass", exitCode: 0, defects: [], data }, summary: `fact fill: wrote ${flags.out} (${entries.length} pointer(s))`, exitCode: 0 }+}diff --git a/plugins/omo/skills/ulw-research/scripts/fact-commands-meaning.mjs b/plugins/omo/skills/ulw-research/scripts/fact-commands-meaning.mjsindex 74f0b659..5c10c641 100644--- a/plugins/omo/skills/ulw-research/scripts/fact-commands-meaning.mjs+++ b/plugins/omo/skills/ulw-research/scripts/fact-commands-meaning.mjs@@ -8,7 +8,8 @@// fidelity-calibration.jsonl: a header with the promotion criterion on first write, then per run// one run line plus one line per flagged pair. The run id hashes the inputs only, so a rerun or a// --dispute rerun of the same inputs replaces that run's lines in place (disputes carry forward)-// instead of counting a second run. Neither command calls a model or the network.+// instead of counting a second run. Both refuse an unlocked brief (fidelity_interview_incomplete) before+// reading anything else. Neither command calls a model or the network.import { existsSync, readFileSync } from "node:fs"import { dirname, join, resolve } from "node:path"@@ -18,7 +19,8 @@ import { countDefects } from "./contracts.mjs"import { ledgerFrom, markdownAsHtml, readEdition, sessionOf } from "./fact-commands-verify.mjs"import { pairsChangedSince } from "./fact-commands-polish.mjs"import { extractPairs, PAIR_KINDS } from "./fact-pairs.mjs"-import { FIDELITY_INCOMPLETE, meaningCheckEnabled, requireLockedBrief } from "./fidelity-brief.mjs"+import { FIDELITY_INCOMPLETE } from "./fidelity-brief.mjs"+import { briefPathOf, lockedBrief, meaningCheckEnabled } from "./fidelity-policy.mjs"import { MEANING_RECORD, writeFidelityRecord } from "./fidelity-records.mjs"import { blocksDelivery } from "./gates-fidelity.mjs"import { ingestVerdicts, unverifiedDefects, VERDICT_SCHEMA } from "./meaning-check.mjs"@@ -36,25 +38,15 @@ const inSession = (session, name, flag) => {return join(session, name)}-function briefState(flags, session) {- const path = flags.brief ?? inSession(session, "brief.md", "--brief")- const lock = requireLockedBrief(path)- if (lock.exitCode === 2) throw new CliError(`${path}: malformed ## Fidelity block: ${lock.errors.join("; ")}`)- return { path, locked: lock.locked, off: !meaningCheckEnabled(lock.parsed) }-}-function runPairs(args) {const [report] = args.positionalsconst { flags } = argsif (!report) throw new CliError("usage: fact pairs <report> [--format html|md] [--ledger F] [--claims claims.json] [--changed-since <fill-map.json>] [--brief brief.md] [--out pairs.json]")const session = sessionOf(flags)const out = resolve(flags.out ?? inSession(session, PAIRS_FILE, "--out"))- const brief = briefState(flags, session)- if (!brief.locked) {- const json = { command: "fact pairs", status: "fail", exitCode: 1, error: "fidelity_interview_incomplete", message: `${brief.path} has no locked ## Fidelity block` }- return { json, summary: `fact pairs: ${json.message}`, exitCode: 1 }- }- if (brief.off) {+ const { parsed, refusal } = lockedBrief("fact pairs", flags)+ if (refusal) return refusal+ if (!meaningCheckEnabled(parsed)) {const record = { schemaVersion: 1, skipped: true, reason: "meaning check: off", pairs: [] }writeJsonAtomic(out, record)return { json: { command: "fact pairs", status: "skipped", exitCode: 0, data: { out, ...record } }, summary: "fact pairs: skipped (meaning check: off)", exitCode: 0 }@@ -125,23 +117,23 @@ function recordCalibration(path, lines, runId, pairsSha) {}/** A `{ skipped: true }` pairs file is accepted only when the locked brief turns the meaning check off. */-function skippedRefusal(flags, session) {- const brief = briefState(flags, session)- if (!brief.locked) return { error: FIDELITY_INCOMPLETE, message: `${brief.path} has no locked ## Fidelity block, so a skipped meaning check cannot be accepted` }- if (!brief.off) return { error: "meaning_check_required", message: `${flags.pairs} says skipped but ${brief.path} has meaning check on; rerun fact pairs` }+function skippedRefusal(flags, parsed) {+ if (meaningCheckEnabled(parsed)) return { error: "meaning_check_required", message: `${flags.pairs} says skipped but ${briefPathOf(flags)} has meaning check on; rerun fact pairs` }return null}function runMeaningCheck(args) {const { flags } = args- const usage = "usage: fact meaning-check --pairs pairs.json --verdicts cheap.json [--verdicts strong.json] [--dispute P<n> --reason TEXT] [--run-id ID] [--calibration F] [--out F]"+ const usage = "usage: fact meaning-check --pairs pairs.json --verdicts cheap.json [--verdicts strong.json] [--dispute P<n> --reason TEXT] [--run-id ID] [--calibration F] [--brief brief.md] [--out F]"if (flags.pairs === undefined || !Array.isArray(flags.verdicts)) throw new CliError(usage)const session = sessionOf(flags)+ const { parsed, refusal } = lockedBrief("fact meaning-check", flags)+ if (refusal) return { ...refusal, json: { ...refusal.json, error: FIDELITY_INCOMPLETE } }const pairsText = readFileSync(flags.pairs, "utf8")const pairsDoc = readJsonFile(flags.pairs)if (pairsDoc?.skipped === true) {- const refusal = skippedRefusal(flags, session)- if (refusal !== null) return { json: { command: "fact meaning-check", status: "fail", exitCode: 1, ...refusal }, summary: `fact meaning-check: ${refusal.message}`, exitCode: 1 }+ const skipped = skippedRefusal(flags, parsed)+ if (skipped !== null) return { json: { command: "fact meaning-check", status: "fail", exitCode: 1, ...skipped }, summary: `fact meaning-check: ${skipped.message}`, exitCode: 1 }return { json: { command: "fact meaning-check", status: "skipped", exitCode: 0, defects: [] }, summary: JSON.stringify({ command: "fact meaning-check", status: "skipped" }), exitCode: 0 }}if (typeof pairsDoc?.artifact_sha256 !== "string" || typeof pairsDoc.report !== "string") throw new CliError(`${flags.pairs} names no artifact_sha256 and report, so the meaning record cannot be bound to an edition; rerun fact pairs`)diff --git a/plugins/omo/skills/ulw-research/scripts/fact-commands-polish.mjs b/plugins/omo/skills/ulw-research/scripts/fact-commands-polish.mjsindex faa1fab3..0021101b 100644--- a/plugins/omo/skills/ulw-research/scripts/fact-commands-polish.mjs+++ b/plugins/omo/skills/ulw-research/scripts/fact-commands-polish.mjs@@ -19,6 +19,7 @@ import { CliError, parseArgs, readJsonFile, sha256Of, writeJsonAtomic, writeTextimport { countDefects, DEFECT_CODES } from "./contracts.mjs"import { editionFormatOf, ledgerFrom, markdownAsHtml, sessionOf } from "./fact-commands-verify.mjs"import { extractPairs } from "./fact-pairs.mjs"+import { lockedBrief } from "./fidelity-policy.mjs"import { applyEdits, POLISH_EDIT_FIELDS, validatePolishEdits } from "./polish-apply.mjs"import { diffPolish } from "./polish-diff.mjs"import { normalizeText } from "./text-normalize.mjs"@@ -57,8 +58,10 @@ const rejectionLine = (entry, edit) => ` rejected edit ${entry.index} ("${beforfunction runPolishApply(args) {const [report] = args.positionalsconst { flags } = args- if (!report || flags.edits === undefined || flags.out === undefined) throw new CliError("usage: fact polish-apply <report.html> --edits polish-edits.json --out <report.polished.html> [--ledger F] [--session-dir D]")+ if (!report || flags.edits === undefined || flags.out === undefined) throw new CliError("usage: fact polish-apply <report.html> --edits polish-edits.json --out <report.polished.html> [--ledger F] [--brief brief.md] [--session-dir D]")if (editionFormatOf(report, flags.format) === "md") throw new CliError("fact polish-apply takes the filled HTML edition; polish a Markdown edition through its HTML source")+ const { refusal } = lockedBrief("fact polish-apply", flags)+ if (refusal) return refusalconst html = readText(report)const editsText = readText(flags.edits)const edits = readJsonFile(flags.edits)@@ -79,7 +82,9 @@ function runPolishApply(args) {function runPolishDiff(args) {const { flags } = args- if (flags.before === undefined || flags.after === undefined) throw new CliError("usage: fact polish-diff --before <pre-polish.html> --after <polished.html> [--ledger F] [--out polish-defects.json] [--session-dir D]")+ if (flags.before === undefined || flags.after === undefined) throw new CliError("usage: fact polish-diff --before <pre-polish.html> --after <polished.html> [--ledger F] [--out polish-defects.json] [--brief brief.md] [--session-dir D]")+ const { refusal } = lockedBrief("fact polish-diff", flags)+ if (refusal) return refusalconst after = readText(flags.after)const defects = diffPolish(readText(flags.before), after, ledgerFrom(flags)).map((defect) => ({ ...defect, hint: DEFECT_CODES[defect.code]?.hint ?? null }))const counts = countDefects(defects)diff --git a/plugins/omo/skills/ulw-research/scripts/fact-commands-verify.mjs b/plugins/omo/skills/ulw-research/scripts/fact-commands-verify.mjsindex c9fef75f..f139a55b 100644--- a/plugins/omo/skills/ulw-research/scripts/fact-commands-verify.mjs+++ b/plugins/omo/skills/ulw-research/scripts/fact-commands-verify.mjs@@ -8,6 +8,11 @@// escaped HTML projection (same line numbers) and checked with its fill map, which is the only// record of where its values sit; LaTeX is verified through its Markdown source.//+// The locked brief is re-judged here, not only at fill: the edition's fill map (--fill-map, else+// `<report>.fill-map.json` when present) must carry the current brief's brief_sha256+// (brief_changed), and policyErrors re-runs over every data-fact the edition carries, so an+// edition that violates the current derived-numbers or source-floor rule fails here too.+//// The delivery barrier that reads these records (and every other fidelity record) is// fidelity-records.mjs.@@ -19,6 +24,7 @@ import { countDefects } from "./contracts.mjs"import { recompute } from "./fact-derive.mjs"import { readLedger } from "./fact-ledger.mjs"import { validateLedger } from "./fact-ledger-schema.mjs"+import { briefBindingErrors, fillPolicy, lockedBrief, policyErrors } from "./fidelity-policy.mjs"import { FIDELITY_RECORD, writeFidelityRecord } from "./fidelity-records.mjs"import { blocksDelivery, checkFidelity } from "./gates-fidelity.mjs"import { parseMarkdown } from "./md-lite.mjs"@@ -159,8 +165,11 @@ export function runFactVerify(args) {const [report] = args.positionalsconst { flags } = argsif (!report) throw new CliError("usage: fact verify <report> [--format html|md] [--sources D] [--claims claims.json] [--fill-map F] [--brief brief.md] [--out fidelity-defects.json]")- const edition = readEdition(report, flags)const sessionDir = sessionDirOf(flags)+ const { parsed, refusal } = lockedBrief("fact verify", flags)+ if (refusal) return refusal+ const policy = fillPolicy(parsed)+ const edition = readEdition(report, flags)const claimsPath = flags.claims ?? join(sessionDir, "claims.json")const briefPath = flags.brief ?? join(sessionDir, "brief.md")const ledger = readLedger(sessionDir)@@ -174,10 +183,15 @@ export function runFactVerify(args) {baseDir: dirname(resolve(report)),recompute,})- const counts = countDefects(result.defects)- const status = result.defects.some(blocksDelivery) ? "fail" : "pass"+ const checked = projected?.html ?? edition.text+ const pointers = [...checked.matchAll(/\bdata-fact="([^"]+)"/gu)].map((match) => ({ token: match[0], start: match.index, parsed: { id: match[1] } }))+ const mapPath = flags["fill-map"] ?? `${report}.fill-map.json`+ const bound = existsSync(mapPath) ? briefBindingErrors(readJsonFile(mapPath), mapPath, parsed) : []+ const defects = [...bound, ...policyErrors(checked, pointers, ledger, sessionDir, policy).errors, ...result.defects]+ const counts = countDefects(defects)+ const status = defects.some(blocksDelivery) ? "fail" : "pass"const exitCode = status === "fail" ? 1 : 0const out = resolve(flags.out ?? join(sessionDir, FIDELITY_RECORD))- const record = writeFidelityRecord(out, "fidelity", { command: "fact verify", status, exitCode, format: edition.format, report: resolve(report), artifact_sha256: sha256Of(edition.text), defects: result.defects, counts, gatesRun: result.gatesRun })+ const record = writeFidelityRecord(out, "fidelity", { command: "fact verify", status, exitCode, format: edition.format, report: resolve(report), artifact_sha256: sha256Of(edition.text), defects, counts, gatesRun: result.gatesRun })return { json: { ...record, out }, summary: `fact verify: ${status.toUpperCase()} - ${counts.blocker} blocker, ${counts.major} major, ${counts.minor} minor`, exitCode }}diff --git a/plugins/omo/skills/ulw-research/scripts/fact-commands.mjs b/plugins/omo/skills/ulw-research/scripts/fact-commands.mjsindex 64c370f3..0dffa7bc 100644--- a/plugins/omo/skills/ulw-research/scripts/fact-commands.mjs+++ b/plugins/omo/skills/ulw-research/scripts/fact-commands.mjs@@ -1,22 +1,19 @@-// fact-commands.mjs - the `fact` subcommands of report-tools: add, quote, retract, export, fill,-// derive, verify (fact-commands-verify.mjs), pairs and meaning-check (fact-commands-meaning.mjs), polish-apply and-// polish-diff (fact-commands-polish.mjs). Every value reaches the ledger from a source+// fact-commands.mjs - the `fact` subcommands of report-tools: add, quote, retract, export, derive,+// fill (fact-commands-fill.mjs), verify (fact-commands-verify.mjs), pairs and meaning-check+// (fact-commands-meaning.mjs), polish-apply and polish-diff (fact-commands-polish.mjs). Every value reaches the ledger from a source// snapshot through a deterministic locator or from a declared derivation; nothing here accepts a// typed value. add and quote print the row with 60 chars of source context on each side (JSON// with --json). Exit 0 ok, 1 semantic failure (fact_not_located, fill errors, a refused// derivation), 2 usage. node: builtins and sibling imports only.import { existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs"-import { dirname, extname, join, resolve } from "node:path"+import { join, resolve } from "node:path"-import { CliError, parseArgs, sha256Of, writeJsonAtomic } from "./cli-support.mjs"-import { DEFECT_CODES } from "./contracts.mjs"+import { CliError, parseArgs, sha256Of } from "./cli-support.mjs"import { derive } from "./fact-derive.mjs"-import { fill } from "./fact-fill.mjs"import { addRow, readLedger, retractRow, supersedeRow, writeLedger } from "./fact-ledger.mjs"import { locateFind, locateMatch, locatePageLine, locateTable } from "./fact-locate.mjs"import { QUALIFIER_FORMS } from "./fidelity-lexicon.mjs"-import { readState, writeState } from "./fidelity-state.mjs"import { exportRows } from "./fidelity-values.mjs"import { pointedFlag, sessionDirOf, snapshotOf } from "./source-commands.mjs"@@ -157,44 +154,6 @@ function runExport(args) {return { json: { command: "fact export", status: "pass", exitCode: 0, data: { out: resolve(args.flags.out), format: args.flags.csv ? "csv" : "json", sha256: sha256Of(text), coverage } }, summary: coverage, exitCode: 0 }}-/** The inline edition: local stylesheets and scripts inlined, relative image paths made absolute. */-function inlineAssets(html, baseDir) {- const local = (ref) => !/^[a-z][a-z0-9+.-]*:|^\/\//i.test(ref)- return html- .replace(/<link\b[^>]*\brel=["']stylesheet["'][^>]*>/gi, (tag) => {- const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1]- return href && local(href) ? `<style>${readText(resolve(baseDir, href))}</style>` : tag- })- .replace(/<script\b([^>]*)\bsrc=["']([^"']+)["']([^>]*)><\/script>/gi, (tag, pre, src, post) => (local(src) ? `<script${pre}${post}>${readText(resolve(baseDir, src))}</script>` : tag))- .replace(/(<img\b[^>]*\bsrc=["'])([^"']+)(["'])/gi, (tag, pre, src, post) => (local(src) && !src.startsWith("/") ? `${pre}${resolve(baseDir, src)}${post}` : tag))-}--function runFill(args) {- const [source] = args.positionals- const { flags } = args- if (!source || (flags.out === undefined && !flags.view)) throw new CliError("usage: fact fill <src> (--out <path> | --view) [--format html|md|tex] [--inline] [--replace-failed]")- const format = flags.format ?? ({ ".md": "md", ".tex": "tex" }[extname(source).toLowerCase()] ?? "html")- if (!["html", "md", "tex"].includes(format)) throw new CliError("--format must be html, md, or tex")- if (flags.inline && format !== "html") throw new CliError("--inline applies to the html edition only")- const sessionDir = sessionDirOf(flags)- const state = flags["replace-failed"] ? readState(sessionDir) : null- const result = fill(readText(source), readLedger(sessionDir), { format: format === "tex" ? "md" : format, view: flags.view === true, ...(state ? { replaceFailed: state } : {}) })- const warnings = result.warnings- if (result.out === null) {- const defects = result.errors.map((error) => ({ ...error, severity: DEFECT_CODES[error.code]?.severity ?? "blocker", hint: DEFECT_CODES[error.code]?.hint ?? null }))- return { json: { command: "fact fill", status: "fail", exitCode: 1, defects, warnings }, summary: `fact fill: FAIL - ${defects.length} error(s), nothing written`, exitCode: 1 }- }- const out = flags.inline ? inlineAssets(result.out, dirname(resolve(source))) : result.out- if (flags.view) return { text: out, summary: `fact fill --view: ${result.fillMap.length} pointer(s), ${warnings.length} warning(s)`, exitCode: 0 }- writeFileSync(flags.out, out)- if (state) writeState(sessionDir, state)- const artifact = sha256Of(out)- const map = `${resolve(flags.out)}.fill-map.json`- writeJsonAtomic(map, { schemaVersion: 1, format, artifact: resolve(flags.out), artifact_sha256: artifact, entries: result.fillMap })- const data = { out: resolve(flags.out), map, artifact_sha256: artifact, occurrences: result.fillMap.length, warnings }- return { json: { command: "fact fill", status: "pass", exitCode: 0, defects: [], data }, summary: `fact fill: wrote ${flags.out} (${result.fillMap.length} pointer(s))`, exitCode: 0 }-}-function runDerive(args) {const { flags } = argsconst op = args.required("op")@@ -230,7 +189,7 @@ export async function runFact(argv) {case "export":return runExport(args)case "fill":- return runFill(args)+ return (await import("./fact-commands-fill.mjs")).runFactFill(args)case "derive":return runDerive(args)case "verify":diff --git a/plugins/omo/skills/ulw-research/scripts/fact-fill.mjs b/plugins/omo/skills/ulw-research/scripts/fact-fill.mjsindex 3a233124..bb69a937 100644--- a/plugins/omo/skills/ulw-research/scripts/fact-fill.mjs+++ b/plugins/omo/skills/ulw-research/scripts/fact-fill.mjs@@ -10,7 +10,8 @@ import { failureCount, markReplaced, sentenceKey } from "./fidelity-state.mjs"import { findPlaceholders, lead, qualifiedText, renderBlockquote, renderQuote, renderValueHtml, subSpan, valueParts } from "./placeholder.mjs"import { splitSentences } from "./sentence-split.mjs"-const FORMATS = Object.freeze(["html", "md"])+/** The output formats fill renders. */+export const FILL_FORMATS = Object.freeze(["html", "md"])const TRANSLATION = Object.freeze({html: /^\s*<span data-translates="(Q\d+)">[\s\S]*?<\/span>/u,md: /^\s*<!-- translates: (Q\d+) -->[^\n]*/u,@@ -166,7 +167,7 @@ function assemble(text, parts, context) {*/export function fill(sourceText, ledger, options = {}) {const format = options.format ?? "html"- if (!FORMATS.includes(format)) throw new TypeError(`format must be one of ${FORMATS.join(", ")}`)+ if (!FILL_FORMATS.includes(format)) throw new TypeError(`format must be one of ${FILL_FORMATS.join(", ")}`)const rows = new Map(ledger.rows.map((row) => [row.fact_id, row]))const found = findPlaceholders(sourceText)const errors = []diff --git a/plugins/omo/skills/ulw-research/scripts/fidelity-policy.mjs b/plugins/omo/skills/ulw-research/scripts/fidelity-policy.mjsnew file mode 100644index 00000000..4ebee10c--- /dev/null+++ b/plugins/omo/skills/ulw-research/scripts/fidelity-policy.mjs@@ -0,0 +1,183 @@+// fidelity-policy.mjs - what the locked `## Fidelity` block of brief.md means to the CLI stages.+//+// lockedBrief is the gate the six reader-facing stages (fact fill, verify, pairs, meaning-check,+// polish-apply, polish-diff) run before reading or writing anything: an unlocked brief returns+// one fidelity_interview_incomplete defect (exit 1), a malformed block is a usage error (exit 2).+// fillPolicy reads the fields fact fill consumes (a value off its table is a usage error, exit 2),+// and policyErrors refuses a placeholder whose row the brief forbids: derived_not_allowed+// (`derived numbers: none` against a derived, converted, or assumed row) and source_outside_floor+// (the source floor is evaluated live against each source's meta.json at every fill and verify;+// under any floor but `standard` a row resting on no source is refused too; a row's outside_floor+// is only the cached result). briefHashOf binds the locked block into the fill map, and+// briefBindingErrors refuses an edition whose map was filled under another brief (brief_changed).+// Collection stages never call this module. node: builtins and sibling imports only.++import { existsSync, readFileSync } from "node:fs"+import { join, resolve } from "node:path"++import { CliError, sha256Of } from "./cli-support.mjs"+import { DEFECT_CODES } from "./contracts.mjs"+import { KIND_RULES } from "./fact-ledger-kinds.mjs"+import { FIDELITY_FIELDS, meaningCheckEnabled, requireLockedBrief } from "./fidelity-brief.mjs"++export { meaningCheckEnabled }++/**+ * Ledger kinds a brief with `derived numbers: none` refuses. A policy list, not the ledger's+ * derivation set: it also names assumed. Every name must be a KIND_RULES kind (checked at load).+ */+const DERIVED_KINDS = Object.freeze(["derived", "converted", "assumed"])+for (const kind of DERIVED_KINDS) {+ if (!Object.hasOwn(KIND_RULES, kind)) throw new Error(`fidelity-policy: ${kind} is not a KIND_RULES kind`)+}++/** Fields whose only legal values are a closed table: value (any case) -> its reading. */+const VALUE_TABLES = Object.freeze({+ "derived numbers": Object.freeze({ allowed: false, none: true }),+ fallback: Object.freeze({ "block-quote": "quote", omit: "omit" }),+})++/** The reading of a table value; any other text is a usage error naming the field and the value. */+function tableValue(field, value) {+ const table = VALUE_TABLES[field]+ const key = value.trim().toLowerCase()+ if (Object.hasOwn(table, key)) return table[key]+ throw new CliError(`${field} "${value}" is not ${Object.keys(table).join(", ")}`)+}++/** How each field value the fill stages consume is read; the single owner of those readings. */+export const FIDELITY_VALUE_RULES = Object.freeze({+ tables: VALUE_TABLES,+ derivedKinds: DERIVED_KINDS,+ derivedRefused: (kind) => DERIVED_KINDS.includes(kind),+ derivedNone: (value) => tableValue("derived numbers", value),+ fallback: (value) => tableValue("fallback", value),+ translations: (value) => /with translation beside/iu.test(value),+ meaningCheck: (value) => meaningCheckEnabled({ fields: { "meaning check": value } }),+})++/** The `source floor` forms: `pattern` reads one, `listed` forms carry a comma list. */+export const SOURCE_FLOOR_RULES = Object.freeze([+ Object.freeze({ kind: "standard", form: "standard", pattern: /^standard$/iu, listed: false }),+ Object.freeze({ kind: "primary", form: "primary only", pattern: /^primary only$/iu, listed: false }),+ Object.freeze({ kind: "pointed", form: "pointed only: <list>", pattern: /^pointed only:\s*(.+)$/iu, listed: true }),+ Object.freeze({ kind: "classes", form: "classes: <list>", pattern: /^classes:\s*(.+)$/iu, listed: true }),+])+const lineOf = (text, at) => text.slice(0, at).split("\n").length+const listOf = (text) => text.split(",").map((entry) => entry.trim()).filter(Boolean)++/** brief.md from --brief, else the session's; a usage error when neither is known. */+export function briefPathOf(flags) {+ if (flags.brief !== undefined && flags.brief !== true) return resolve(flags.brief)+ const dir = flags["session-dir"] ?? process.env.SESSION_DIR+ if (!dir || dir === true) throw new CliError("--brief is required without --session-dir (or SESSION_DIR)")+ return join(resolve(dir), "brief.md")+}++/**+ * @returns {{ parsed: object, refusal: null } | { parsed: null, refusal: { json: object, summary: string, exitCode: 1 } }}+ */+export function lockedBrief(command, flags) {+ const path = briefPathOf(flags)+ const lock = requireLockedBrief(path)+ if (lock.exitCode === 2) throw new CliError(`${path}: ${lock.errors.join("; ")}`)+ if (lock.locked) return { parsed: lock.parsed, refusal: null }+ const json = { command, status: "fail", exitCode: 1, defects: lock.defects }+ return { parsed: null, refusal: { json, summary: `${command}: ${lock.defects[0].message}`, exitCode: 1 } }+}++/**+ * The source floor as a rule, or null for `standard`; a usage error for any other text.+ * @returns {null | { kind: "primary" } | { kind: "pointed" | "classes", list: string[] }}+ */+export function parseSourceFloor(value) {+ const text = value.trim()+ for (const rule of SOURCE_FLOOR_RULES) {+ const match = rule.pattern.exec(text)+ if (!match) continue+ if (rule.kind === "standard") return null+ return rule.listed ? { kind: rule.kind, list: listOf(match[1]) } : { kind: rule.kind }+ }+ throw new CliError(`source floor "${value}" is not ${SOURCE_FLOOR_RULES.map((rule) => rule.form).join(", ")}`)+}++function hostOf(url) {+ return typeof url === "string" && URL.canParse(url) ? new URL(url).hostname.toLowerCase() : null+}++/** Whether one source (id and meta.json) satisfies a parsed floor rule. */+export function sourceInsideFloor(rule, sourceId, meta) {+ if (rule.kind === "primary") return meta.provenance === "primary"+ if (rule.kind === "pointed") return rule.list.includes(sourceId) || rule.list.includes(meta.url)+ const host = hostOf(meta.url)+ return host !== null && rule.list.some((entry) => host === entry.toLowerCase() || host.endsWith(`.${entry.toLowerCase()}`))+}++/** The fields fact fill consumes: the fallback form and whether a translation binds to its quote. */+export function fillPolicy(parsed) {+ const field = (name) => parsed.fields[name]+ return {+ fallback: FIDELITY_VALUE_RULES.fallback(field("fallback")),+ translations: FIDELITY_VALUE_RULES.translations(field("languages")),+ derivedNone: FIDELITY_VALUE_RULES.derivedNone(field("derived numbers")),+ floor: parseSourceFloor(field("source floor")),+ }+}++/** Source ids behind a row: its own, or for a derived row its operands' sources; null marks a leaf with no source. */+function sourcesOf(row, rows, seen = new Set()) {+ if (seen.has(row.fact_id)) return []+ seen.add(row.fact_id)+ if (row.source_id) return [row.source_id]+ const inputs = [...(row.operands ?? []), ...(row.derived_from ?? [])]+ if (inputs.length === 0) return [null]+ return inputs.flatMap((id) => (rows.has(id) ? sourcesOf(rows.get(id), rows, seen) : [null]))+}++/** sha256 of the locked `## Fidelity` block normalized: the seven fields in FIDELITY_FIELDS order, `field: value` per line. */+export const briefHashOf = (parsed) => sha256Of(FIDELITY_FIELDS.map((field) => `${field}: ${parsed.fields[field]}`).join("\n"))++/** brief_changed when a fill map was not written under the current brief (or predates the binding). */+export function briefBindingErrors(map, mapPath, parsed) {+ if (map.brief_sha256 === briefHashOf(parsed)) return []+ const why = typeof map.brief_sha256 === "string" ? "was filled under a different ## Fidelity block" : "records no brief_sha256"+ return [{ code: "brief_changed", token: null, line: null, message: `${mapPath} ${why}; re-run fact fill under the current brief`, severity: DEFECT_CODES.brief_changed.severity, integrity: DEFECT_CODES.brief_changed.integrity, hint: DEFECT_CODES.brief_changed.hint }]+}++function metaOf(sessionDir, sourceId, cache) {+ if (!cache.has(sourceId)) {+ const file = join(sessionDir, "sources", sourceId, "meta.json")+ cache.set(sourceId, existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : { url: null, provenance: "unknown" })+ }+ return cache.get(sourceId)+}++const defect = (code, pointer, text, message) => ({ code, token: pointer.token, line: lineOf(text, pointer.start), message, severity: DEFECT_CODES[code].severity, hint: DEFECT_CODES[code].hint })++/**+ * Refusals for the placeholders of one fill source (or the data-fact elements of one edition at+ * verify). Sets each referenced row's outside_floor to this evaluation and reports whether any+ * cached value changed.+ * @param {{ token: string, start: number, parsed: { id?: string } }[]} found findPlaceholders output+ * @returns {{ errors: object[], cacheChanged: boolean }}+ */+export function policyErrors(text, found, ledger, sessionDir, policy) {+ const rows = new Map(ledger.rows.map((row) => [row.fact_id, row]))+ const metas = new Map()+ const errors = []+ let cacheChanged = false+ for (const pointer of found) {+ const row = rows.get(pointer.parsed?.id)+ if (row === undefined || row.status !== "active") continue+ if (policy.derivedNone && FIDELITY_VALUE_RULES.derivedRefused(row.kind)) {+ errors.push(defect("derived_not_allowed", pointer, text, `${row.fact_id} is ${row.kind}; the brief records derived numbers: none`))+ }+ const sources = sourcesOf(row, rows)+ const outside = policy.floor === null ? [] : [...new Set(sources.filter((id) => id === null || !sourceInsideFloor(policy.floor, id, metaOf(sessionDir, id, metas))))]+ if (row.outside_floor !== outside.length > 0) cacheChanged = true+ row.outside_floor = outside.length > 0+ const named = outside.map((id) => id ?? "no source").join(", ")+ if (outside.length > 0) errors.push(defect("source_outside_floor", pointer, text, `${row.fact_id} rests on ${named}, outside the source floor`))+ }+ return { errors, cacheChanged }+}diff --git a/plugins/omo/skills/ulw-research/scripts/source-commands.mjs b/plugins/omo/skills/ulw-research/scripts/source-commands.mjsindex 244e1589..80ec098b 100644--- a/plugins/omo/skills/ulw-research/scripts/source-commands.mjs+++ b/plugins/omo/skills/ulw-research/scripts/source-commands.mjs@@ -14,6 +14,7 @@ import { join, resolve } from "node:path"import { indexClaims } from "./claims-index.mjs"import { CliError, parseArgs, sha256Of, writeJsonAtomic } from "./cli-support.mjs"import { parseFidelityBlock } from "./fidelity-brief.mjs"+import { parseSourceFloor } from "./fidelity-policy.mjs"import { writeSnapshot } from "./source-snapshot.mjs"const FETCH_TIMEOUT_MS = 30_000@@ -44,12 +45,16 @@ export function snapshotOf(sessionDir, id) {return { meta: JSON.parse(readInput(join(dir, "meta.json"))), text: readInput(join(dir, "text.txt")), html: existsSync(html) ? readInput(html) : null }}-/** Whether the brief's source floor lists this source as pointed at (`pointed only: a, b`). */+/**+ * Whether the brief's source floor lists this source as pointed at (`pointed only: a, b`). An absent+ * or pending floor points at nothing; a malformed floor is a usage error (parseSourceFloor's CliError).+ */export function pointedFlag(sessionDir, url) {const brief = join(sessionDir, "brief.md")const floor = existsSync(brief) ? (parseFidelityBlock(readInput(brief)).fields?.["source floor"] ?? "") : ""- const match = /^pointed only:\s*(.+)$/i.exec(floor.trim())- return match ? match[1].split(",").map((entry) => entry.trim()).includes(url) : false+ if (floor === "" || floor === "pending") return false+ const rule = parseSourceFloor(floor)+ return rule?.kind === "pointed" && rule.list.includes(url)}async function fetchSource(url) {