From c17b078521bc56da67a36f7940917e52e3eaae5d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 18:21:46 +0800 Subject: [PATCH 1/4] docs(#465): remove PowerShell from live documentation Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018bnC1Tos5MvBbFEj5zzi51 --- AGENTS.md | 16 +- CONTEXT.md | 2 +- docs/INVENTORY.md | 37 +- docs/adr/0001-rust-cli-reads-artifacts.md | 2 + .../0009-atomic-capability-execution-model.md | 2 + .../0011-primary-cli-and-recovery-launcher.md | 2 + docs/agents/overnight-run-v2.md | 12 +- docs/architecture/reference-capability-map.md | 36 +- docs/artifact-data-contract.md | 25 +- docs/atomic-development-model.md | 4 +- ...ode-intel-architecture-convergence-plan.md | 3 + docs/code-intel-architecture.md | 2 +- docs/codenexus-provider-adapter.md | 2 +- docs/committed-run-index.md | 2 +- ...tibility-retire-codenexus-direct-branch.md | 39 -- ...patibility-retire-doctor-wrapper-branch.md | 75 --- docs/compatibility-retire-hospital-branch.md | 29 - docs/compatibility-retire-index-branch.md | 29 - ...compatibility-retire-native-code-branch.md | 33 -- ...bility-retire-provider-preflight-branch.md | 47 -- ...compatibility-retire-publication-branch.md | 28 - ...compatibility-retire-recommender-branch.md | 42 -- docs/compatibility-retirement-gate.md | 41 -- ...ompatibility-retirement-ticket-template.md | 34 -- docs/execution-kernel-architecture.md | 7 +- docs/github-gitlab-remote-linkage-design.md | 2 +- docs/graph-provider-adapter.md | 2 +- docs/hospital-diagnosis.md | 4 +- docs/implementation-minimalism-benchmark.md | 8 +- docs/inventory-rg-capability-contract.md | 7 +- docs/model-executable-handle.md | 9 - docs/native-code-evidence.md | 8 +- docs/openspec-detector.md | 2 +- docs/openssf-best-practices-gap.md | 2 +- docs/plans/adr-0010-execution-plan.md | 3 + docs/pon-multilanguage-code-evidence.md | 2 +- docs/ponytail-gain-ledger.md | 12 +- docs/ponytail-governance-gate.md | 6 - docs/ponytail-impact-scoreboard.md | 2 +- docs/project-orientation-benchmark.md | 2 +- docs/ps1-exit/contract-inventory.md | 532 ------------------ docs/ps1-exit/t2-dot-source-parity-map.md | 142 ----- docs/ps1-exit/t2-launcher-classification.md | 237 -------- docs/release-provenance-runbook.md | 2 +- docs/repository-snapshot-identity.md | 2 +- docs/repository-survival-scan.md | 2 +- docs/repowise-adapter.md | 6 +- docs/run-commit.md | 4 +- docs/runtime-ci-evidence.md | 2 +- docs/sentrux-provider-adapter.md | 2 +- docs/tool-effectiveness-baseline.md | 10 +- 51 files changed, 96 insertions(+), 1467 deletions(-) delete mode 100644 docs/compatibility-retire-codenexus-direct-branch.md delete mode 100644 docs/compatibility-retire-doctor-wrapper-branch.md delete mode 100644 docs/compatibility-retire-hospital-branch.md delete mode 100644 docs/compatibility-retire-index-branch.md delete mode 100644 docs/compatibility-retire-native-code-branch.md delete mode 100644 docs/compatibility-retire-provider-preflight-branch.md delete mode 100644 docs/compatibility-retire-publication-branch.md delete mode 100644 docs/compatibility-retire-recommender-branch.md delete mode 100644 docs/compatibility-retirement-gate.md delete mode 100644 docs/compatibility-retirement-ticket-template.md delete mode 100644 docs/model-executable-handle.md delete mode 100644 docs/ps1-exit/contract-inventory.md delete mode 100644 docs/ps1-exit/t2-dot-source-parity-map.md delete mode 100644 docs/ps1-exit/t2-launcher-classification.md diff --git a/AGENTS.md b/AGENTS.md index f6a55da9..572087a1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,16 +57,15 @@ Consequences: ## Verification - Rust changes require focused `cargo test` coverage plus the relevant integration-contract checks. -- Run `code-intel lint hardcoded-paths` before pushing (issue #275: the Rust - implementation replaced `legacy/tools/check-hardcoded-paths.ps1`). It scans tracked - `.ps1`/`.psm1`/`.md`/`.yml` for machine-specific paths, and it strips +- Run `code-intel lint hardcoded-paths` before pushing (issue #275). It scans tracked + `.md`/`.yml` and other text files for machine-specific paths, and it strips `$env:VAR` references before matching. So naming one of the scanned Windows user-directory variables bare — in **prose or a comment**, not just in code — fails the scan, while the `$env:`-prefixed form passes. Always write the `$env:` form, including in comments and documentation. On a host that cannot build the checkout (DR-0013 / #403) and whose installed - release predates the command (0.7.1 lacks it), do not substitute the retired - PowerShell script: CI runs the same scan on every PR in all three + release predates the command (0.7.1 lacks it), do not substitute a hand-rolled + scan: CI runs the same scan on every PR in all three `cross-platform-smoke` lanes ("Hardcoded path scan"). The first release that ships the command is the prerelease `v0.7.2-beta.6`; installing it is not compiling, but per the Skill's install rules it needs the owner's explicit @@ -76,12 +75,11 @@ Consequences: assertion. Re-sync those pins **once, after every other edit**, by literal string replacement — never by reserializing the JSON. Several of those files are historical attestations whose formatting and unrelated digests must not - move, and a pin can chain: editing `legacy/run-code-intel.ps1` to update a digest it - quotes changes `legacy/run-code-intel.ps1`'s own pinned digest too. + move, and a pin can chain: editing a pinned file to update a digest it + quotes changes that file's own pinned digest too. - MoonBit experiments require `moon test` and parity fixtures against the current artifact contract before promotion. - New documentation and command examples must lead with the compiled `code-intel` CLI. Do not - document PowerShell as an operational prerequisite; mention it only when identifying a retained - compatibility fixture or migration boundary. + document PowerShell as a prerequisite or an entry point; it is gone from the product (DR-0018). ## While writing code diff --git a/CONTEXT.md b/CONTEXT.md index aac92d38..296c3c2d 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -131,7 +131,7 @@ _Avoid_: Project commitment, approved roadmap, generated backlog as fact _Avoid_: LLM plan, draft roadmap, inferred priority **Scanner**: The authoritative producer of a new artifact run for a target repository. The scanner gathers current evidence and writes the reports that other components read. -_Avoid_: PowerShell runner, Rust scanner, artifact reader +_Avoid_: Rust scanner, artifact reader **Resume CLI**: A command-line reader for existing artifact runs. It does not produce fresh repository evidence and does not replace the scanner. _Avoid_: Rust scanner, new pipeline, replacement scanner diff --git a/docs/INVENTORY.md b/docs/INVENTORY.md index 29e8e120..a74b62f4 100644 --- a/docs/INVENTORY.md +++ b/docs/INVENTORY.md @@ -9,7 +9,7 @@ log) if a fresh inventory is needed. Columns: `path` (current location), `class` Verification method: every `one-shot` disposition below was confirmed against a primary source (status.json, orchestration schema, or checked implementation) before moving, not from filename pattern alone — see TASK_REPORT.md for the cases where the obvious pattern match was wrong -(7 of 8 `compatibility-retire-*` docs turned out to still be blocked/live, not completed). +(7 of 8 `compatibility-retire-*` docs turned out to still be blocked/live, not completed; those docs and `docs/ps1-exit/` were later deleted with the PowerShell removal, DR-0018). ## ADRs — permanent records (untouched per spec) @@ -58,38 +58,12 @@ pattern alone — see TASK_REPORT.md for the cases where the obvious pattern mat | docs/archive/plans/understanding-quadrant-complexity-idea.md | one-shot | archived | Refactor done: staged a01/a03 helper tests exist | | docs/archive/plans/v0.3.0-release-bootstrap-and-layout-idea.md | one-shot | archived | v0.3.0 shipped; repo now v0.7.0-beta.2 | -## Moved this sweep: one-shot compatibility retirement (executed) - -| path | class | disposition | reason | -| --- | --- | --- | --- | -| docs/compatibility-retire-doctor-wrapper-branch.md | living-contract | kept (restored) | E09 packet reconciliation pins this path as evidence; packets freeze paths even after retired=true | - ## Kept: implemented plan retained as a living contract (do not archive) | path | class | disposition | reason | | --- | --- | --- | --- | | docs/plans/adr-0010-execution-plan.md | living-contract | kept | Status "implemented; superseded as an execution plan"; retained because 3 live files cite it | -## Kept: compatibility retirement tickets still blocked (7 of 8 — verified via status.json, not archived) - -| path | class | disposition | reason | -| --- | --- | --- | --- | -| docs/compatibility-retire-codenexus-direct-branch.md | living-contract | kept | E04 status.json: decision=blocked, not retired | -| docs/compatibility-retire-hospital-branch.md | living-contract | kept | E08 status.json: decision=blocked, not retired | -| docs/compatibility-retire-index-branch.md | living-contract | kept | E10 status.json: decision=blocked, not retired | -| docs/compatibility-retire-native-code-branch.md | living-contract | kept | E07 status.json: decision=blocked, not retired | -| docs/compatibility-retire-provider-preflight-branch.md | living-contract | kept | E03 status.json: decision=blocked, not retired | -| docs/compatibility-retire-publication-branch.md | living-contract | kept | E05 status.json: decision=blocked, not retired | -| docs/compatibility-retire-recommender-branch.md | living-contract | kept | E02 status.json: decision=blocked, not retired | - -## Kept: PS1-exit migration docs (all directly cited by live Rust source) - -| path | class | disposition | reason | -| --- | --- | --- | --- | -| docs/ps1-exit/contract-inventory.md | living-contract | kept | Companion doc to live parity-observe.yml harness | -| docs/ps1-exit/t2-dot-source-parity-map.md | living-contract | kept | Cited by crates/.../hospital_score.rs source | -| docs/ps1-exit/t2-launcher-classification.md | living-contract | kept | Cited by crates/.../execution_policy/inputs.rs source | - ## Kept: living-contract docs (referenced by code/tests/other current docs) | path | class | disposition | reason | @@ -111,8 +85,6 @@ pattern alone — see TASK_REPORT.md for the cases where the obvious pattern mat | docs/code-intel-architecture.md | living-contract | kept | Referenced by reference-capability-map.md | | docs/codenexus-provider-adapter.md | living-contract | kept | Referenced by providers.rs | | docs/committed-run-index.md | living-contract | kept | Referenced by reference-capability-map.md | -| docs/compatibility-retirement-gate.md | living-contract | kept | Live src + test module (compatibility_retirement_gate) | -| docs/compatibility-retirement-ticket-template.md | living-contract | kept | Live test module (compatibility_retirement_ticket_template) | | docs/dag-coordinator.md | living-contract | kept | Live src + test module (dag_coordinator) | | docs/decision-gap-detector.md | living-contract | kept | Backtick paths verified live (rules json, fixture) | | docs/decision-request-response-port.md | living-contract | kept | Referenced by decision_port.rs | @@ -133,17 +105,16 @@ pattern alone — see TASK_REPORT.md for the cases where the obvious pattern mat | docs/internalization-advisory-candidates.md | living-contract | kept | Referenced by final-commitment-reconciliation.md | | docs/internalization-r09-r26-records.md | living-contract | kept | Referenced by final-commitment-reconciliation.md | | docs/internalization-record-engine.md | living-contract | kept | Documents live internalization_record.rs module | -| docs/inventory-rg-capability-contract.md | living-contract | kept | References live legacy/run-code-intel.ps1 | +| docs/inventory-rg-capability-contract.md | living-contract | kept | Referenced by its Rust test | | docs/language-adapter-acceptance-standard.md | living-contract | kept | Backtick paths verified live (policy json, doc) | | docs/method-catalog.md | living-contract | kept | Live src + test module (method_catalog, #[path]-included) | | docs/method-selection.md | living-contract | kept | References live method-selection-rules.v1.json | | docs/model-channel-routing.md | living-contract | kept | Documents live model_channels.rs routing | -| docs/model-executable-handle.md | living-contract | kept | References 3 live legacy scripts | | docs/native-code-evidence.md | living-contract | kept | Live src + test module (native_code_evidence) | | docs/openspec-detector.md | living-contract | kept | Referenced by internalization_record.rs test fixtures | | docs/pon-multilanguage-code-evidence.md | living-contract | kept | Referenced by pon-multilanguage.json | | docs/ponytail-gain-ledger.md | living-contract | kept | Active tracked cleanup ledger; cross-confirms this sweep | -| docs/ponytail-governance-gate.md | living-contract | kept | Referenced by test-ponytail-gate-contract.ps1 | +| docs/ponytail-governance-gate.md | living-contract | kept | Referenced by ponytail gate docs | | docs/ponytail-impact-scoreboard.md | living-contract | kept | Linked from README.md | | docs/project-management-support.md | living-contract | kept | Linked from README.md | | docs/project-orientation-benchmark.md | living-contract | kept | Live src + test module (project_orientation_benchmark) | @@ -167,7 +138,7 @@ pattern alone — see TASK_REPORT.md for the cases where the obvious pattern mat ## Totals - Files inventoried: 123 -- living-contract (kept): 104 (14 ADR + 1 open plan + 7 blocked retirements + 3 ps1-exit + 79 other) +- living-contract (kept): 104 (14 ADR + 1 open plan + 79 other) - one-shot archived this sweep: 17 (16 plans + 1 compatibility-retire) - one-shot already archived (prior sweep): 2 - stale: 0 (no doc found describing wholly nonexistent paths/symbols; a handful of docs have one diff --git a/docs/adr/0001-rust-cli-reads-artifacts.md b/docs/adr/0001-rust-cli-reads-artifacts.md index 46f08d13..56bb8cbe 100644 --- a/docs/adr/0001-rust-cli-reads-artifacts.md +++ b/docs/adr/0001-rust-cli-reads-artifacts.md @@ -1,3 +1,5 @@ +> Superseded in part by DR-0018: PowerShell was removed; the steps below now run through the Rust `code-intel` CLI. + # Rust CLI reads artifacts before replacing the scanner Accepted. The Rust `code-intel` CLI starts as an artifact consumer for existing scanner output instead of replacing the PowerShell scanner. This keeps the current evidence-producing workflow stable while giving humans and Agents a typed, testable way to resume from `report.json`, `hospital-report.json`, and related artifact files; a future scanner rewrite must preserve the artifact data contract rather than silently changing the handoff surface. diff --git a/docs/adr/0009-atomic-capability-execution-model.md b/docs/adr/0009-atomic-capability-execution-model.md index ad891978..b9e296f2 100644 --- a/docs/adr/0009-atomic-capability-execution-model.md +++ b/docs/adr/0009-atomic-capability-execution-model.md @@ -1,3 +1,5 @@ +> Superseded in part by DR-0018: PowerShell was removed; the steps below now run through the Rust `code-intel` CLI. + # ADR 0009: Adopt an Atomic Capability Execution Model - Status: accepted diff --git a/docs/adr/0011-primary-cli-and-recovery-launcher.md b/docs/adr/0011-primary-cli-and-recovery-launcher.md index 59d4f0df..a68dc078 100644 --- a/docs/adr/0011-primary-cli-and-recovery-launcher.md +++ b/docs/adr/0011-primary-cli-and-recovery-launcher.md @@ -3,6 +3,8 @@ status: accepted date: 2026-07-25 --- +> Superseded in part by DR-0018: PowerShell was removed; the steps below now run through the Rust `code-intel` CLI. + # Make code-intel the primary entry and PowerShell the recovery launcher The compiled `code-intel` command is the only Primary Operator Entry and the diff --git a/docs/agents/overnight-run-v2.md b/docs/agents/overnight-run-v2.md index bf24110f..f85eaed0 100644 --- a/docs/agents/overnight-run-v2.md +++ b/docs/agents/overnight-run-v2.md @@ -9,7 +9,7 @@ | `DEADLINE` | `{{DEADLINE}}` ← 投放时填绝对时间戳 | | `TEST_CMD` | `cargo test -p code-intel --locked -j 4 -- --test-threads=4` | | `LINT_CMD` | `cargo fmt -p code-intel -- --check && cargo check --locked` | -| `LOC_CMD` | `pwsh -NoProfile -Command "(Get-ChildItem crates -Recurse -Filter *.rs \| Where-Object { $_.FullName -notmatch '\\tests\\' } \| Get-Content \| Where-Object { $_ -notmatch '^\s*(//\|$)' }).Count"` | +| `LOC_CMD` | `rg --files -g 'crates/**/*.rs' -g '!**/tests/**' \| xargs cat \| rg -v '^\s*(//\|$)' \| wc -l` (经 `rtk proxy` 前缀直跑) | | `BENCH_CMD` | `cargo build -p code-intel --release --locked` 然后 `target/release/code-intel.exe benchmark orientation --out <每次全新目录,放 %TEMP%> --repetitions 3` | | `PERF_METRICS` | `report.json` 里 typical p95(orientation 与 fixture-materialization 分列)+ 每 fixture 重放 digest 全等 | | `PERF_TOLERANCE` | 相对基线 p95 劣化 ≤ 10%,且绝对契约 typical p95 ≤ 60s 不破 | @@ -52,9 +52,9 @@ 按顺序执行,结果写入 `.night/BASELINE.md`: -1. TEST_CMD 连续跑 **2 遍**,**经 PowerShell 通道执行**(§8.1;若只有 Bash 通道则加 `rtk proxy` 前缀——裸跑第二遍可能吃 RTK 缓存重放,两遍恒等,FLAKY 集为假空)。两遍结果不一致的测试进入 **FLAKY 集**,逐条记录。此后所有"全绿"的定义都是:**(全部测试 − FLAKY 集)全绿**。FLAKY 集今晚只在此刻确定,不再增补。同时记录通过测试总数(近期基线量级 ~3400+)。 +1. TEST_CMD 连续跑 **2 遍**,**加 `rtk proxy` 前缀执行**(§8.1——裸跑第二遍可能吃 RTK 缓存重放,两遍恒等,FLAKY 集为假空)。两遍结果不一致的测试进入 **FLAKY 集**,逐条记录。此后所有"全绿"的定义都是:**(全部测试 − FLAKY 集)全绿**。FLAKY 集今晚只在此刻确定,不再增补。同时记录通过测试总数(近期基线量级 ~3400+)。 2. 跑 BENCH_CMD:先 `cargo build -p code-intel --release --locked`,然后 `target/release/code-intel.exe benchmark orientation --out %TEMP%\night-bench-baseline --repetitions 3`(输出目录必须事先不存在;reps 3 与 CI 口径一致,该基准内部已含 cold/warm × 9 个语料格,reps 调高整轮时间会失控)。把 `report.json` 的 typical p95(orientation / fixture-materialization 分列)与 determinism 结论抄进 `BASELINE.md`。此后"性能无回归"的定义:p95 劣化 ≤ 10% 且绝对 p95 ≤ 60s 且 determinism digest 全等。 -3. 跑 LOC_CMD(表格里的 pwsh 命令)记录源码行数。口径:`crates/` 下全部 `.rs`,排除 `tests/` 目录,排除空行与 `//` 注释行;**inline `mod tests` 计入此口径**,因此删 inline 测试刷不动净减少——"测试数不减"(第 1 步的总数)是配对绊线。参考值(2026-08-06):53,675。 +3. 跑 LOC_CMD(表格里的命令)记录源码行数。口径:`crates/` 下全部 `.rs`,排除 `tests/` 目录,排除空行与 `//` 注释行;**inline `mod tests` 计入此口径**,因此删 inline 测试刷不动净减少——"测试数不减"(第 1 步的总数)是配对绊线。参考值(2026-08-06):53,675。 4. 建 `.night/REPORT.md` 骨架(§7 结构,各节留空)。报告从此刻起**增量书写**。 5. 在报告顶部用**三句话**复述今晚要做什么。说不清就回去重读,不要动手。 6. commit 上述全部至 `night` 分支。**此后对 `BASELINE.md` 的任何改动即违规**——早上报告须附 `git log --oneline -- .night/BASELINE.md`,只允许出现这一次提交。 @@ -72,7 +72,7 @@ | #106 | bug(gate): `sentrux check` 与权威 self-scan 口径漂移,最小门禁给假绿灯 | 复现 = 找一个权威 self-scan 红、`sentrux check` 绿的输入;修判据别修表象 | | #178 | bug(test): 并行测试进程共享 target/tool-path 且无归属 | 与已修的 #175/#177 同因;修法先例:资源命名带进程归属 | | #186 | test helpers 继承宿主环境,env 变量漏进被测分支 | 修法:枚举全部 env 分支输入,子进程 env 用显式 allowlist(仓里已有同类修复先例) | -| #176 | gate: 门禁清单漏掉 PowerShell 合同测试,cargo test + repin 全绿仍被 CI 打回 | 与 #184 同病:写入方/校验方各持清单必然盲区;修法方向:单一清单模块 + 从磁盘发现 | +| #176 | gate: 门禁清单漏掉部分合同测试,cargo test + repin 全绿仍被 CI 打回 | 与 #184 同病:写入方/校验方各持清单必然盲区;修法方向:单一清单模块 + 从磁盘发现 | **先 triage 后修复。** 每条固定 20 分钟只做一件事:写出复现脚本,标把握度(高/中/低)。全部过完后按把握度从高到低修。 @@ -185,7 +185,7 @@ State: <分支名 + 停在哪> ## 8. 本仓陷阱(与正文同级效力) -1. **RTK 命令重写与缓存重放。** 本机 Bash 工具挂了 RTK hook:命令会被透明重写(`grep`→`rg`、`find`→`fd`,语义不同会直接炸),且**重复执行同一命令可能重放旧缓存结果**——修好的红灯会"复活",没修的绿灯会假绿。规避通道按优先级:(a) **所有判定命令(基线、退出条件、验证)一律经 PowerShell 执行**——RTK hook 只挂在 Bash 工具上,pwsh 通道机制上不过 rtk,重写与缓存双免;(b) 只有 Bash 通道可用时,加 `rtk proxy ` 前缀直跑;(c) `find`/`grep` 管道无论哪个通道都改用 pwsh 等价物(LOC_CMD 已是)。hook 已配 10s 超时(fail-open),rtk 自身卡死不会吊死工具调用,但超时后命令是**未经重写**原样执行的——对判定命令无影响(它们本来就该原样跑)。 +1. **RTK 命令重写与缓存重放。** 本机 Bash 工具挂了 RTK hook:命令会被透明重写(`grep`→`rg`、`find`→`fd`,语义不同会直接炸),且**重复执行同一命令可能重放旧缓存结果**——修好的红灯会"复活",没修的绿灯会假绿。规避办法:**所有判定命令(基线、退出条件、验证)一律加 `rtk proxy ` 前缀直跑**,重写与缓存双免;`find`/`grep` 管道改用 `rg` 等价写法(LOC_CMD 已是)。hook 已配 10s 超时(fail-open),rtk 自身卡死不会吊死工具调用,但超时后命令是**未经重写**原样执行的——对判定命令无影响(它们本来就该原样跑)。 2. **内存红线。** 本机 commit charge 长期贴顶;cargo 默认并行在 LLVM 阶段会 OOM,子进程撞 error 1455 **静默死(空 stderr)**。`-j 4` 与 `--test-threads=4` 是硬参数不许调高。症状识别:测试数骤降、进程无输出消失 → 按环境故障写 blocker,不是当测试失败去修。 3. **禁 push、禁 PR,全夜。** 本仓 PR 绿灯即自动合并。夜里一切只落在本地 `night` 分支,早上人 review 后才谈 PR。 4. **主 checkout 占用检查。** 开跑第一步 `git status` + `git branch --show-current`:若工作树不净或停在别的 agent 的分支(如 `codex/*`),写 blocker 终止,不许 stash 别人的东西。若不得不在 worktree 里跑:每个测试子进程显式设 `CODE_INTEL_HOME` 指向该 worktree(默认会读主 checkout 的 manifest),且 repowise 在 worktree 里不可用是预期,自扫已带 `--doctor-require-repowise false`。 @@ -203,4 +203,4 @@ State: <分支名 + 停在哪> 2. 腾出主 checkout `D:\projects\code-intel-pipeline`:切回 main、工作树净、无别的 agent 会话占用(2026-08-06 时它停在 `codex/architecture-convergence`)。 3. 暂时把 `.git/hooks/post-commit` 挪出(`post-commit.night-bak`),早上恢复。理由:它每次 commit 起后台 `repowise update`,整夜几十个 commit 会与 cargo 编译抢内存——本机 commit charge 贴顶,这是 #123 静默死子进程的同款根因。 4. 关掉其他并行 agent 会话与大内存进程,确认磁盘余量(`target/` + release 构建 + bench 输出,预留 ≥ 20GB)。 -5. RTK 不用拆:hook 已配 10s 超时(fail-open),且判定命令按 §8.1 走 PowerShell 通道,机制上不经过 rtk。 +5. RTK 不用拆:hook 已配 10s 超时(fail-open),且判定命令按 §8.1 加 `rtk proxy` 前缀,机制上不吃缓存重放。 diff --git a/docs/architecture/reference-capability-map.md b/docs/architecture/reference-capability-map.md index 157f4825..a040a488 100644 --- a/docs/architecture/reference-capability-map.md +++ b/docs/architecture/reference-capability-map.md @@ -2,6 +2,8 @@ Status: canonical audit baseline (2026-07-13) +> PowerShell was removed from the product (DR-0018). "Current invocation" and coupling cells below that mention a PowerShell wrapper or runner describe the 2026-07-13 baseline; the equivalent behavior now lives in the compiled Rust `code-intel` CLI or has been deleted. + This map classifies the active integrations and design references named by the restored commitment checkpoints. It is an inventory, not an adoption approval, implementation claim, or health claim. Repository code and accepted/proposed ADRs are the primary evidence; the checkpoints are audit inputs that establish coverage expectations only. ## Classification rules @@ -15,33 +17,33 @@ This map classifies the active integrations and design references named by the r | Integration / reference | Capability supplied | Evidence type | Current invocation path | Ownership | Lifecycle state | Coupling | Trust boundary | Replacement / exit path | Source evidence | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| doctor | Repository/tool preflight, registered-integration validation and machine-readable readiness | Observed environment and repository-state evidence | `legacy/check-code-intel-tools.ps1 -RepoPath ... -Json`; stable wrapper runs doctor before the scanner | Pipeline | `active-required` | Medium: PowerShell probes installed commands, local provider sources and repository state | Tool presence is not capability conformance; secrets are reported only as presence/absence and must never enter output | Move probes behind the Rust runtime while retaining the `doctor_json` contract and a shell-compatible bootstrap path | `orchestration/integrations.json` integration id `doctor`; `legacy/check-code-intel-tools.ps1`; `legacy/invoke-code-intel.ps1` | +| doctor | Repository/tool preflight, registered-integration validation and machine-readable readiness | Observed environment and repository-state evidence | a removed PowerShell wrapper (DR-0018); stable wrapper runs doctor before the scanner | Pipeline | `active-required` | Medium: PowerShell probes installed commands, local provider sources and repository state | Tool presence is not capability conformance; secrets are reported only as presence/absence and must never enter output | Move probes behind the Rust runtime while retaining the `doctor_json` contract and a shell-compatible bootstrap path | `orchestration/integrations.json` integration id `doctor`; a removed PowerShell wrapper (DR-0018); a removed PowerShell wrapper (DR-0018) | | runtime.code-intel | Integration planning/validation, provider routes, graph generation, artifact resume/classification and artifact doctor | Control-plane execution plus deterministic derived status | `code-intel` subcommands `orchestrate`, `provider`, `route`, `graph`, `doctor`, `resume`, `classify` | Pipeline | `active-required` | Medium: compiled Rust core exists, while the main scan/report orchestration still resides in PowerShell | Rust results are authoritative only for the operation and contract they actually implement; they do not prove the PowerShell scanner has been retired | Expand atom-by-atom behind stable contracts; keep PowerShell as a temporary compatibility adapter until parity is tested | `orchestration/integrations.json` integration id `runtime.code-intel`; `crates/code-intel-cli/src/main.rs`; `docs/integration-orchestration.md` section “PowerShell Compatibility Direction” | -| inventory.rg | Exact file inventory and text-search surface | Observed repository evidence | Normal runner invokes `rg` and writes `files.txt` plus the `rg file inventory` step | Pipeline owns invocation/artifact contract; upstream owns `rg` | `active-required` | Low CLI coupling, currently embedded in the main runner | Inventory is bounded by scope/exclusions and snapshot; absence from a search is not proof of semantic absence outside that scope | Replace the executable behind an inventory adapter while preserving exact inventory artifacts and failure semantics | `orchestration/integrations.json` integration id `inventory.rg`; `legacy/run-code-intel.ps1` step name `rg file inventory` | -| Git | Working-tree state, repository identity, HEAD/history and recent-commit context | Observed version-control evidence | `git status`, `git rev-parse`, `git log` from runner/adapters | Pipeline owns interpretation; Git owns repository protocol/CLI | `drift-unregistered` | Medium: multiple scripts call Git directly and CodeNexus-lite uses history context | Dirty state, HEAD and worktree policy must be explicit in Snapshot Identity; Git commands are read-only unless a separately authorized effect declares mutation | Register a version-control evidence adapter and centralize snapshot semantics; alternate VCS providers may conform to the same port | `legacy/run-code-intel.ps1` step name `git status`; `legacy/Invoke-CodeNexusLite.ps1`; absent from `orchestration/integrations.json` | -| Repowise | Semantic index, state, scoped shadow workspace, optional generated docs | Observed evidence and semantic-memory artifacts; provider-generated prose remains non-authoritative | `legacy/Invoke-ScopedRepowise.ps1`; normal runner invokes it; Rust provider routes exist for status/index/docs | Pipeline owns adapter and egress contract; upstream owns CLI/provider internals | `active-required` | Medium/high: CLI plus Python/package behavior is still wrapped and patched locally | Scope inventory and frozen provider payload must be validated before network/provider execution; secrets remain outside artifacts | Preserve `.repowise/state.json`/`wiki.db` and provider-port semantics; replace CLI behind adapter or complete selective internalization | `orchestration/integrations.json` integration id `memory.repowise`; `docs/artifact-data-contract.md` section “Scoped Repowise Egress Contract”; `crates/code-intel-cli/src/providers.rs`; `overlays/repowise/README.md` | +| inventory.rg | Exact file inventory and text-search surface | Observed repository evidence | Normal runner invokes `rg` and writes `files.txt` plus the `rg file inventory` step | Pipeline owns invocation/artifact contract; upstream owns `rg` | `active-required` | Low CLI coupling, currently embedded in the main runner | Inventory is bounded by scope/exclusions and snapshot; absence from a search is not proof of semantic absence outside that scope | Replace the executable behind an inventory adapter while preserving exact inventory artifacts and failure semantics | `orchestration/integrations.json` integration id `inventory.rg`; a removed PowerShell wrapper (DR-0018) step name `rg file inventory` | +| Git | Working-tree state, repository identity, HEAD/history and recent-commit context | Observed version-control evidence | `git status`, `git rev-parse`, `git log` from runner/adapters | Pipeline owns interpretation; Git owns repository protocol/CLI | `drift-unregistered` | Medium: multiple scripts call Git directly and CodeNexus-lite uses history context | Dirty state, HEAD and worktree policy must be explicit in Snapshot Identity; Git commands are read-only unless a separately authorized effect declares mutation | Register a version-control evidence adapter and centralize snapshot semantics; alternate VCS providers may conform to the same port | a removed PowerShell wrapper (DR-0018) step name `git status`; a removed PowerShell wrapper (DR-0018); absent from `orchestration/integrations.json` | +| Repowise | Semantic index, state, scoped shadow workspace, optional generated docs | Observed evidence and semantic-memory artifacts; provider-generated prose remains non-authoritative | a removed PowerShell wrapper (DR-0018); normal runner invokes it; Rust provider routes exist for status/index/docs | Pipeline owns adapter and egress contract; upstream owns CLI/provider internals | `active-required` | Medium/high: CLI plus Python/package behavior is still wrapped and patched locally | Scope inventory and frozen provider payload must be validated before network/provider execution; secrets remain outside artifacts | Preserve `.repowise/state.json`/`wiki.db` and provider-port semantics; replace CLI behind adapter or complete selective internalization | `orchestration/integrations.json` integration id `memory.repowise`; `docs/artifact-data-contract.md` section “Scoped Repowise Egress Contract”; `crates/code-intel-cli/src/providers.rs`; `overlays/repowise/README.md` | | Understand-compatible internal graph | Architecture graph state, freshness, compatible graph artifact | Observed structural evidence promoted only after snapshot/freshness validation | `code-intel graph --repo ... --write --json`; normal run consumes `.understand-anything/knowledge-graph.json` | Pipeline | `active-required` | Low/medium: internal Rust producer, but artifact name/schema retains compatibility | Graph freshness and snapshot identity must match the examined repository; stale presence is not success | Any graph provider may replace implementation if it emits the Pipeline-owned compatible artifact through the provider port | `orchestration/integrations.json` integration id `graph.code-intel-understand`; `docs/integration-orchestration.md` section “Understand Direction”; `crates/code-intel-cli/src/graph/mod.rs` | | Understand Anything external | Rich Agent-side architecture graph refresh | Observed evidence from an external/interactive provider | `/understand --language zh [--full]` only as fallback or explicit richer pass | Upstream provider; Pipeline owns admission of its artifact | `compatibility-fallback` | Low at runtime, medium artifact compatibility | External command is non-deterministic/host-dependent; output must pass the same snapshot/freshness contract | Remove fallback when internal or another non-interactive provider reaches required conformance | `orchestration/integrations.json` integration id `graph.understand-external`; `docs/integration-orchestration.md` section “Understand Direction”; `skills/code-intel-pipeline/SKILL.md` graph-missing workflow | -| Sentrux | Structural scan, rules, regression gate, DSM, test gaps, evolution, what-if | Observed structural evidence plus derived governance models/gate results | `legacy/Invoke-SentruxAgentTool.ps1`; Rust `code-intel sentrux ...`; external binary through repo shim with lite-core fallback | Pipeline owns adapter, normalization, rules and lite fallback; external binary is accelerator | `active-required` | High today: large PowerShell wrapper; external CLI format is normalized locally | Raw CLI status/exit code is not authoritative until normalized; governed scope, exclusions, baseline and rules are explicit | Migrate operations atom-by-atom behind Rust/provider contracts; retain lite survival capability; external accelerator remains replaceable | `orchestration/integrations.json` integration id `structure.sentrux`; `docs/integration-orchestration.md` section “Sentrux Direction”; `crates/code-intel-cli/src/sentrux.rs`; `legacy/tools/sentrux-shim/sentrux-lite-core.ps1` | -| tree-sitter-v | V-language parsing grammar for Sentrux | Third-party parser artifact used to create structural evidence | `legacy/Install-SentruxVlangOverlay.ps1`; installed as Sentrux `vlang` plugin | Pipeline owns overlay/ABI alias and installer; upstream owns grammar | `active-optional` | Medium: compiled grammar ABI and Sentrux plugin contract | Compiled artifact provenance/ABI must be verified; current repository records source URL and MIT license but no pinned source revision | Drop overlay when upstream Sentrux ships a conforming V plugin, or rebuild from a pinned reviewed revision | `overlays/sentrux/vlang/plugin.toml:11`; `overlays/sentrux/vlang/plugin.toml:14`; `overlays/sentrux/vlang/README.md:7`; `legacy/Install-SentruxVlangOverlay.ps1` | -| CodeNexus-lite | Hotspot localization, recent commits, reference hits; compatibility scan/lite/doctor surface | Deterministic derived localization view | Runner conditionally invokes `legacy/Invoke-CodeNexusLite.ps1` when a Sentrux target and script exist; exceptions only add a note; canonical provider route is `codenexus/lite` | Pipeline | `active-optional` | Medium: both manifest ids are optional compatibility entries and the canonical provider operation is optional/nonblocking; two manifest ids still share one implementation while the legacy `repowise/lite` provider alias is being retired | `codenexus-context.json` is a derived view, not independent provider fact or a semantic graph; Survival Scanner preserves localization when the adapter is unavailable | Keep canonical `codenexus/lite`, retire the compatibility alias after its transition window, and let a full CodeNexus or another provider conform to the artifact/provider port | `orchestration/integrations.json` ids `runtime.code-nexus-lite` and `localization.codenexus-lite`; `crates/code-intel-cli/src/providers.rs` operations `codenexus/lite` and deprecated `repowise/lite`; `legacy/run-code-intel.ps1` variable `$codeNexusLiteTool` and its nonblocking `catch` | +| Sentrux | Structural scan, rules, regression gate, DSM, test gaps, evolution, what-if | Observed structural evidence plus derived governance models/gate results | a removed PowerShell wrapper (DR-0018); Rust `code-intel sentrux ...`; external binary through repo shim with lite-core fallback | Pipeline owns adapter, normalization, rules and lite fallback; external binary is accelerator | `active-required` | High today: large PowerShell wrapper; external CLI format is normalized locally | Raw CLI status/exit code is not authoritative until normalized; governed scope, exclusions, baseline and rules are explicit | Migrate operations atom-by-atom behind Rust/provider contracts; retain lite survival capability; external accelerator remains replaceable | `orchestration/integrations.json` integration id `structure.sentrux`; `docs/integration-orchestration.md` section “Sentrux Direction”; `crates/code-intel-cli/src/sentrux.rs`; a removed PowerShell wrapper (DR-0018) | +| tree-sitter-v | V-language parsing grammar for Sentrux | Third-party parser artifact used to create structural evidence | a removed PowerShell wrapper (DR-0018); installed as Sentrux `vlang` plugin | Pipeline owns overlay/ABI alias and installer; upstream owns grammar | `active-optional` | Medium: compiled grammar ABI and Sentrux plugin contract | Compiled artifact provenance/ABI must be verified; current repository records source URL and MIT license but no pinned source revision | Drop overlay when upstream Sentrux ships a conforming V plugin, or rebuild from a pinned reviewed revision | `overlays/sentrux/vlang/plugin.toml:11`; `overlays/sentrux/vlang/plugin.toml:14`; `overlays/sentrux/vlang/README.md:7`; a removed PowerShell wrapper (DR-0018) | +| CodeNexus-lite | Hotspot localization, recent commits, reference hits; compatibility scan/lite/doctor surface | Deterministic derived localization view | Runner conditionally invokes a removed PowerShell wrapper (DR-0018) when a Sentrux target and script exist; exceptions only add a note; canonical provider route is `codenexus/lite` | Pipeline | `active-optional` | Medium: both manifest ids are optional compatibility entries and the canonical provider operation is optional/nonblocking; two manifest ids still share one implementation while the legacy `repowise/lite` provider alias is being retired | `codenexus-context.json` is a derived view, not independent provider fact or a semantic graph; Survival Scanner preserves localization when the adapter is unavailable | Keep canonical `codenexus/lite`, retire the compatibility alias after its transition window, and let a full CodeNexus or another provider conform to the artifact/provider port | `orchestration/integrations.json` ids `runtime.code-nexus-lite` and `localization.codenexus-lite`; `crates/code-intel-cli/src/providers.rs` operations `codenexus/lite` and deprecated `repowise/lite`; a removed PowerShell wrapper (DR-0018) variable `$codeNexusLiteTool` and its nonblocking `catch` | | CodeNexus full provider boundary | Independent code/Git indexing, retrieval, perception and impact relationships | Observed provider evidence | None in current repository; only CodeNexus-lite artifacts and the ADR/vocabulary boundary exist | Independent provider owns runtime/storage; Pipeline owns Evidence Provider Port and cross-provider synthesis | `proposed` | Intended low coupling; actual adapter contract is not implemented | No shared database/internal model or lockstep release; observed output requires provenance/snapshot/freshness validation | Retain Survival Scanner and swap provider adapters; Pipeline remains operable when this provider is absent | `CONTEXT.md` definition “CodeNexus Evidence Provider”; `docs/adr/0010-tool-neutral-engineering-intelligence-core.md` decision text; `docs/code-intel-architecture.md` section describing `codenexus-context.json` | -| Greenfield | Behavioral-spec extraction, test vectors, acceptance criteria, clean-room provenance | External provider output and advisory/specification artifacts | `legacy/Invoke-GreenfieldSpecExtraction.ps1 -RepoPath ... [-Analyze] -Json`; interactive Claude plugin only when explicitly requested | Pipeline owns adapter/manifest; Greenfield owns plugin execution | `active-optional` | Medium: Claude CLI/plugin command and workspace layout | Default scan cannot block on interactive Agent/plugin; generated specs require review and provenance | Replace plugin with non-interactive provider conforming to the same behavior-spec artifact contract, or keep plan-only handoff | `orchestration/integrations.json` integration id `spec.greenfield`; `docs/integration-orchestration.md` section “Greenfield Direction”; `legacy/Invoke-GreenfieldSpecExtraction.ps1` schema `code-intel-greenfield-spec-extraction.v1` | -| Repomix | Whole-repository context pack in markdown/XML/JSON/plain | Derived materialized view; not fact authority | `legacy/Invoke-RepomixCodePack.ps1`; runner calls it when installed and not skipped | Pipeline owns wrapper/output schema; upstream owns CLI | `drift-unregistered` | Low/medium CLI coupling | Pack can expose repository content; invocation must honor repository scope and local-only policy. No repository Reuse Record is present | Register as optional materialized-view provider or remove it; native inventory/Code Evidence remains fallback | `legacy/run-code-intel.ps1:3621`; `legacy/run-code-intel.ps1:3644`; `legacy/Invoke-RepomixCodePack.ps1:42`; absent from `orchestration/integrations.json` | -| Native Code Evidence | Default files, symbols, chunks, imports, scorecard and Agent Code Slice | Observed code evidence plus deterministic derived slices | Internal functions in `legacy/run-code-intel.ps1`, beginning with `Get-CodeEvidenceLanguage` and `New-CodeEvidenceLayer` | Pipeline | `drift-unregistered` | High: embedded in the monolithic runner | Parser heuristics and coverage limits must remain explicit; v1 does not claim complete call-graph precision | Extract as a registered built-in Survival Scanner/code-evidence atom; keep stable artifacts so specialized providers can replace/augment it | `legacy/run-code-intel.ps1:1010`; `legacy/run-code-intel.ps1:1340`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; absent from `orchestration/integrations.json` | -| cocoindex-code | Optional richer Code Evidence adapter and A/B comparison candidate | External observed code evidence with typed optional outcome | Configured under `pipeline.config.json` and evaluated by `New-CodeEvidenceLayer`; disabled by default | Upstream tool owns implementation; Pipeline owns adapter outcome and comparison | `active-optional` | Low when disabled; command/artifact coupling when enabled; production participation is not registered centrally | Missing command must skip non-fatally unless future policy explicitly makes it required; evidence cannot silently replace native facts | Remove adapter without losing baseline evidence; another adapter may emit the same Code Evidence contract | `pipeline.config.json:8`; `legacy/run-code-intel.ps1:1433`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; `legacy/scripts/tests/test-code-evidence-layer.ps1:154` | -| GitHub Solution Research | Searches upstream issues, PRs, repositories and examples for classified blockers | Advisory research dossier; never direct Engineering Fact or Adoption Decision | `legacy/Invoke-GitHubSolutionResearch.ps1`, conditionally invoked by runner only for eligible failure categories | Pipeline owns query construction/artifact; GitHub/`gh` provide external data | `drift-unregistered` | Medium: `gh` CLI, network, GitHub result schemas | Network results are untrusted reference evidence; authentication and external mutation are outside scanner authority | Register as optional research provider; disable/replace without affecting deterministic scan and diagnosis | `legacy/run-code-intel.ps1:3950`; `legacy/Invoke-GitHubSolutionResearch.ps1:266`; `CONTEXT.md:207`; absent from `orchestration/integrations.json` | -| OpenSpec / spec-kit / matt-flow / gstack | Recommends specification, planning, delivery and quality workflows from repo signals | Advisory output only | Duplicated detector in `legacy/run-code-intel.ps1` and `legacy/OpenSpec-Detector.ps1`; no workflow is auto-authorized | Pipeline currently owns detector; named tools own their workflows | `drift-unregistered` | High: tool names/rules are embedded twice in the scanner control plane | Recommendation cannot initialize tools, create commitments, or write external trackers without explicit authority | Extract one registered, deterministic Workflow Recommender Advisory Atom; candidates become data/Method Implementations and can be added/removed independently | `legacy/run-code-intel.ps1:109`; `legacy/run-code-intel.ps1:3530`; `legacy/OpenSpec-Detector.ps1:2`; `CONTEXT.md:112` | +| Greenfield | Behavioral-spec extraction, test vectors, acceptance criteria, clean-room provenance | External provider output and advisory/specification artifacts | a removed PowerShell wrapper (DR-0018); interactive Claude plugin only when explicitly requested | Pipeline owns adapter/manifest; Greenfield owns plugin execution | `active-optional` | Medium: Claude CLI/plugin command and workspace layout | Default scan cannot block on interactive Agent/plugin; generated specs require review and provenance | Replace plugin with non-interactive provider conforming to the same behavior-spec artifact contract, or keep plan-only handoff | `orchestration/integrations.json` integration id `spec.greenfield`; `docs/integration-orchestration.md` section “Greenfield Direction”; a removed PowerShell wrapper (DR-0018) schema `code-intel-greenfield-spec-extraction.v1` | +| Repomix | Whole-repository context pack in markdown/XML/JSON/plain | Derived materialized view; not fact authority | a removed PowerShell wrapper (DR-0018); runner calls it when installed and not skipped | Pipeline owns wrapper/output schema; upstream owns CLI | `drift-unregistered` | Low/medium CLI coupling | Pack can expose repository content; invocation must honor repository scope and local-only policy. No repository Reuse Record is present | Register as optional materialized-view provider or remove it; native inventory/Code Evidence remains fallback | `a removed PowerShell wrapper (DR-0018):3621`; `a removed PowerShell wrapper (DR-0018):3644`; `a removed PowerShell wrapper (DR-0018):42`; absent from `orchestration/integrations.json` | +| Native Code Evidence | Default files, symbols, chunks, imports, scorecard and Agent Code Slice | Observed code evidence plus deterministic derived slices | Internal functions in a removed PowerShell wrapper (DR-0018), beginning with `Get-CodeEvidenceLanguage` and `New-CodeEvidenceLayer` | Pipeline | `drift-unregistered` | High: embedded in the monolithic runner | Parser heuristics and coverage limits must remain explicit; v1 does not claim complete call-graph precision | Extract as a registered built-in Survival Scanner/code-evidence atom; keep stable artifacts so specialized providers can replace/augment it | `a removed PowerShell wrapper (DR-0018):1010`; `a removed PowerShell wrapper (DR-0018):1340`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; absent from `orchestration/integrations.json` | +| cocoindex-code | Optional richer Code Evidence adapter and A/B comparison candidate | External observed code evidence with typed optional outcome | Configured under `pipeline.config.json` and evaluated by `New-CodeEvidenceLayer`; disabled by default | Upstream tool owns implementation; Pipeline owns adapter outcome and comparison | `active-optional` | Low when disabled; command/artifact coupling when enabled; production participation is not registered centrally | Missing command must skip non-fatally unless future policy explicitly makes it required; evidence cannot silently replace native facts | Remove adapter without losing baseline evidence; another adapter may emit the same Code Evidence contract | `pipeline.config.json:8`; `a removed PowerShell wrapper (DR-0018):1433`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; `a removed PowerShell wrapper (DR-0018):154` | +| GitHub Solution Research | Searches upstream issues, PRs, repositories and examples for classified blockers | Advisory research dossier; never direct Engineering Fact or Adoption Decision | a removed PowerShell wrapper (DR-0018), conditionally invoked by runner only for eligible failure categories | Pipeline owns query construction/artifact; GitHub/`gh` provide external data | `drift-unregistered` | Medium: `gh` CLI, network, GitHub result schemas | Network results are untrusted reference evidence; authentication and external mutation are outside scanner authority | Register as optional research provider; disable/replace without affecting deterministic scan and diagnosis | `a removed PowerShell wrapper (DR-0018):3950`; `a removed PowerShell wrapper (DR-0018):266`; `CONTEXT.md:207`; absent from `orchestration/integrations.json` | +| OpenSpec / spec-kit / matt-flow / gstack | Recommends specification, planning, delivery and quality workflows from repo signals | Advisory output only | Duplicated detector in a removed PowerShell wrapper (DR-0018) and a removed PowerShell wrapper (DR-0018); no workflow is auto-authorized | Pipeline currently owns detector; named tools own their workflows | `drift-unregistered` | High: tool names/rules are embedded twice in the scanner control plane | Recommendation cannot initialize tools, create commitments, or write external trackers without explicit authority | Extract one registered, deterministic Workflow Recommender Advisory Atom; candidates become data/Method Implementations and can be added/removed independently | `a removed PowerShell wrapper (DR-0018):109`; `a removed PowerShell wrapper (DR-0018):3530`; `a removed PowerShell wrapper (DR-0018):2`; `CONTEXT.md:112` | | qiaomu-goal-meta-skill / awesome-agent-loops | Goal authoring and choice of persistent execution-loop pattern before scanning/execution | Design reference and upstream task-contract input | No scanner invocation; documented Agent Goal Intake handoff (`/goal`, `/loop`, `/schedule`) | Agent-intake layer; external references retain implementation ownership | `reference-internalized` | None at scanner runtime | Goal/loop text cannot become repository evidence, gate result, or scanner state | Keep the internal Agent Goal Intake contract; swap or remove authoring catalogs without scanner changes | `docs/adr/0002-agent-goal-intake-outside-scanner.md:3`; `docs/agent-goal-intake.md:9` | | MetaHarness | Packaging/distribution pattern for branded CLI, host bundle, release gates, SBOM and provenance | Design reference | No runtime invocation | Harness/distribution layer, outside scanner | `reference-only` | None | Packaging must not own scanner facts or destabilize artifact consumers | Use any harness factory or direct release tooling; preserve scanner/artifact contracts | `docs/adr/0003-harness-factory-as-distribution-reference.md:3`; `docs/harness-factory-reference.md:18` | -| yao-meta-skill | Benchmark for trigger design, evaluation evidence, portability, release gates and failure libraries | Design/quality reference | Not executed; `legacy/scripts/tests/test-skill-development-benchmark.ps1` verifies internalized benchmark surfaces | Pipeline owns its benchmark; upstream owns reference implementation | `reference-internalized` | None at runtime | Passing local documentation tests is not proof that upstream tooling ran or that runtime behavior conforms | Maintain internal benchmark or replace its reference source while preserving measurable quality criteria | `docs/adr/0004-yao-meta-skill-as-skill-development-benchmark.md:3`; `docs/skill-development-benchmark.md:20`; `docs/skill-development-benchmark.md:45` | -| Ponytail | Rejects unnecessary Agent-produced code/docs/config/abstraction/process; requires Necessity Trace | Governance policy/reference, not repository evidence | Vocabulary in `CONTEXT.md`; terminology checked by `legacy/scripts/tests/test-skill-development-benchmark.ps1`; no comprehensive runtime enforcement found | Pipeline policy | `reference-internalized` | Low conceptual coupling; runtime enforcement remains pending | It cannot justify skipping understanding, safety, evidence or verification; missing trace means reject output, not invent value | Preserve canonical policy and implement tool-neutral Necessity Trace gate; source project may be removed without semantic loss | `CONTEXT.md:22`; `CONTEXT.md:25`; `legacy/scripts/tests/test-skill-development-benchmark.ps1`; restored checkpoint `20260713-133502-code-intel-commitment-closure.md` | +| yao-meta-skill | Benchmark for trigger design, evaluation evidence, portability, release gates and failure libraries | Design/quality reference | Not executed; a removed PowerShell wrapper (DR-0018) verifies internalized benchmark surfaces | Pipeline owns its benchmark; upstream owns reference implementation | `reference-internalized` | None at runtime | Passing local documentation tests is not proof that upstream tooling ran or that runtime behavior conforms | Maintain internal benchmark or replace its reference source while preserving measurable quality criteria | `docs/adr/0004-yao-meta-skill-as-skill-development-benchmark.md:3`; `docs/skill-development-benchmark.md:20`; `docs/skill-development-benchmark.md:45` | +| Ponytail | Rejects unnecessary Agent-produced code/docs/config/abstraction/process; requires Necessity Trace | Governance policy/reference, not repository evidence | Vocabulary in `CONTEXT.md`; terminology checked by a removed PowerShell wrapper (DR-0018); no comprehensive runtime enforcement found | Pipeline policy | `reference-internalized` | Low conceptual coupling; runtime enforcement remains pending | It cannot justify skipping understanding, safety, evidence or verification; missing trace means reject output, not invent value | Preserve canonical policy and implement tool-neutral Necessity Trace gate; source project may be removed without semantic loss | `CONTEXT.md:22`; `CONTEXT.md:25`; a removed PowerShell wrapper (DR-0018); restored checkpoint `20260713-133502-code-intel-commitment-closure.md` | | mattpocock/skills | Issue-tracker selection, triage vocabulary, domain-doc layout and delivery-flow concepts | Design/reference input to agent intake and recommender | No scanner runtime dependency; concepts appear in project-management docs and workflow detector | Pipeline owns absorbed concepts; upstream owns skills | `reference-internalized` | None at scanner runtime; medium conceptual coupling in recommender | Skills cannot replace scanner artifacts or silently create hosted work | Retain internal issue/triage/domain contracts; replace source reference or workflow candidate independently | `docs/adr/0006-project-management-support-as-agent-intake.md:3`; `docs/project-management-support.md:3`; `docs/openspec-detector.md:11` | | Linear | Optional hosted issue projection | External mutable project-management state, not engineering evidence authority | No scanner write path; external tooling only when explicitly requested or already authoritative | External tracker/project owner; Pipeline has no runtime ownership | `reference-only` | None in scanner; optional output projection only | Credentials stay outside repo; exactly one task-state authority; availability/quota cannot block Pipeline | Prefer existing Git-backed Work-OS/repo-native graph; stop projection or migrate deliberately without touching scanner artifacts | `docs/project-management-support.md:20`; `docs/agents/issue-tracker.md:10`; `docs/agents/issue-tracker.md:23`; `docs/adr/0008-local-first-project-control-plane.md:27` | | Obsidian / LLM Wiki | Knowledge view and, only for an already reviewed Git-backed Work-OS contract, possible task-state owner | Materialized knowledge/project-management view | No scanner runtime path; optional mirror/index/link workflow | External/local Work-OS owner; Pipeline owns only source artifacts | `reference-only` | None in scanner; optional output projection only | Never replaces scanner measurements; task authority must be explicit and singular | Remove/migrate wiki projection while retaining repo docs and artifact runs as technical evidence | `docs/project-management-support.md:12`; `docs/project-management-support.md:30`; `docs/adr/0008-local-first-project-control-plane.md:29` | | my-code-machine | Host-machine detection, organization, cleanup, checkpoint and sync capabilities proposed for a separate `machine` boundary | Control-plane effects and host-state observations | No merged `machine` crate exists; proposed Python-to-Rust migration only | Proposed Pipeline workspace `machine`/`sync` crates; current external Python project retains implementation | `proposed` | Unknown/high migration scope; no current runtime integration evidence | Host mutation/sync is distinct from target-repository scanning and requires explicit effect boundaries; big-bang rewrite is rejected by later ADR direction | Keep current tool operational until atom-by-atom parity; abandon merge without changing scanner contracts, or integrate behind separate CLI/crate boundary | `docs/adr/0001-merge-mcm-rust-unified.md:3`; `docs/adr/0001-merge-mcm-rust-unified.md:12`; current `crates/` contains only `code-intel-cli` and `code-nexus-lite` | -| diagnosis.hospital | Triage, disposition, protocols, treatment and surgery-plan routing | Deterministic derived diagnosis/materialized views | `legacy/run-code-intel.ps1` constructs `hospital-report.json`, `hospital.md` and surgery-plan artifacts | Pipeline | `active-required` | High: diagnosis functions remain embedded in the large PowerShell runner | Diagnosis consumes admitted evidence and must fail closed when authoritative modalities are missing/untrusted; narrative is not the source of truth | Extract diagnosis atoms behind stable machine contracts; rebuild Markdown from JSON | `orchestration/integrations.json` integration id `diagnosis.hospital`; `legacy/run-code-intel.ps1` functions prefixed `New-Hospital`; `docs/hospital-mode.md` | -| artifact.index-committed-only | Cross-repository discovery of the latest A07-committed Artifact Run | Derived, rebuildable materialized index | Rust `artifact index` route; `legacy/update-code-intel-index.ps1` compatibility facade | Pipeline | `active-required` | Low: bounded local traversal plus A07 marker/manifest/Artifact Ref validation | Index is never artifact authority; staging, incomplete, forged, and legacy runs remain diagnostic-only in normal mode | Rebuild from committed runs; explicit `-LegacyCompatibilityMode` preserves rollback without deleting old data | `orchestration/integrations.json` integration id `artifact.index-committed-only`; `crates/code-intel-cli/src/artifact_index.rs`; `docs/committed-run-index.md` | +| diagnosis.hospital | Triage, disposition, protocols, treatment and surgery-plan routing | Deterministic derived diagnosis/materialized views | a removed PowerShell wrapper (DR-0018) constructs `hospital-report.json`, `hospital.md` and surgery-plan artifacts | Pipeline | `active-required` | High: diagnosis functions remain embedded in the large PowerShell runner | Diagnosis consumes admitted evidence and must fail closed when authoritative modalities are missing/untrusted; narrative is not the source of truth | Extract diagnosis atoms behind stable machine contracts; rebuild Markdown from JSON | `orchestration/integrations.json` integration id `diagnosis.hospital`; a removed PowerShell wrapper (DR-0018) functions prefixed `New-Hospital`; `docs/hospital-mode.md` | +| artifact.index-committed-only | Cross-repository discovery of the latest A07-committed Artifact Run | Derived, rebuildable materialized index | Rust `artifact index` route; a removed PowerShell wrapper (DR-0018) compatibility facade | Pipeline | `active-required` | Low: bounded local traversal plus A07 marker/manifest/Artifact Ref validation | Index is never artifact authority; staging, incomplete, forged, and legacy runs remain diagnostic-only in normal mode | Rebuild from committed runs; explicit `-LegacyCompatibilityMode` preserves rollback without deleting old data | `orchestration/integrations.json` integration id `artifact.index-committed-only`; `crates/code-intel-cli/src/artifact_index.rs`; `docs/committed-run-index.md` | ## Reconciliation findings diff --git a/docs/artifact-data-contract.md b/docs/artifact-data-contract.md index 70b180e0..bfb21c7c 100644 --- a/docs/artifact-data-contract.md +++ b/docs/artifact-data-contract.md @@ -96,12 +96,7 @@ canonical `run-complete.json` marker last. The completed-only index revalidates manifest, refs, and exactly one repository-iteration provenance payload against the authority directory names. -The legacy PowerShell compatibility report path uses a staging directory named -`.staging-`. The scanner writes artifacts there, rewrites -published path references, promotes the directory to its final timestamped -name, but does not write a canonical marker. Its `report.json`, markdown, and auxiliary files are -a non-authoritative compatibility view. The normal index must reject those directories; explicit -legacy compatibility traversal may read them only as advisory reports. +Directories without a canonical marker (for example legacy timestamped or `.staging-` reports) are a non-authoritative compatibility view. The normal index must reject them. The provenance contract is non-cryptographic. A local actor able to coherently replace a whole publication can forge the JSON and digests; defending against that actor requires signed @@ -147,22 +142,6 @@ code-intel sentrux-debt-register --failures sentrux-failures.json --repo Shell wrappers may still orchestrate tools, but normalized Sentrux JSON and debt classification should converge on these CLI commands. -## Exit Code Contract (issue #130) - -`legacy/run-code-intel.ps1` (and the legacy `check-code-intel-tools.ps1`/`code-intel.ps1`/`invoke-code-intel.ps1` compatibility chain, which forwards its exit code unchanged) uses a three-value exit code, not a binary one: - -| Exit | Meaning | -|---|---| -| `0` | Clean: no failures, no gate findings. | -| `1` | The pipeline genuinely did not complete: a tool crash, missing artifacts, an unrecoverable step, or a `sentrux gate` step that failed without producing any parseable `gate:*` output at all. | -| `2` | The pipeline completed. `sentrux gate` reported architecture/quality debt (`god_files`, `coupling`, `quality`, `cycles`, ...) for the target repo. This is gate **output**, not a process failure. | - -Before this fix, any blocking `sentrux gate` finding was folded into the same `effectiveFailed`/exit-1 path as a genuine crash: a repo with real architecture debt made the pipeline look like it had failed to run at all, even though every artifact was produced. The discriminator is `sentrux-failures.json`'s `gate` field (from `New-CodeIntelSentruxFailures`): non-null means a `gate:*` record was actually parsed from `sentrux gate` stdout (a finding); null means the step failed without producing any recognizable output (a genuine crash), which still counts as an effective failure. - -This exemption is scoped to `sentrux gate` only. `sentrux check` (`check:*`, max_cc) keeps its prior blocking-debt-gated behavior. - -`report.summary.gateFindings` is the count of blocking `sentrux gate`-sourced debt entries. It is informational — it does not raise `effectiveFailed`, `effectiveFailureCategories.sentruxFail`, or the process exit code past `2`. Consumers that read the legacy exit code directly must treat `2` the same as success unless they specifically want to gate on any Sentrux architecture/quality finding. - ## Hospital Trust Contract Hospital state and scoring are fail-closed: @@ -213,4 +192,4 @@ Artifact consumers must preserve these fields: - `hospital-report.json.triage.research_required` - `hospital-report.json.state_machine.current_state` -When these fields change, update the PowerShell writer, GitHub research writer if relevant, CLI readers, cross-run indexers if searchable, README artifact lists, and contract tests together. +When these fields change, update the Rust report writer, GitHub research writer if relevant, CLI readers, cross-run indexers if searchable, README artifact lists, and contract tests together. diff --git a/docs/atomic-development-model.md b/docs/atomic-development-model.md index 326a008b..135560ec 100644 --- a/docs/atomic-development-model.md +++ b/docs/atomic-development-model.md @@ -68,7 +68,7 @@ code-intel capability exec --request - --out - large evidence crosses boundaries by Artifact Ref; - exit code distinguishes a domain failure from invalid input, unavailable dependency, internal error, or I/O error. -Existing PowerShell, Python, and Rust implementations remain valid adapters while they converge on this contract. +Python and Rust implementations remain valid adapters while they converge on this contract. Capability requests with Artifact Ref inputs pass an independent `--artifact-root`; see `docs/artifact-ref-verifier.md`. Verification returns owned bytes so consumers never treat the @@ -91,14 +91,12 @@ Network-backed results will also bind provider, model, prompt/config digest, and 5. Wrap Repowise, Understand, and Sentrux behind effect-declaring adapters. 6. Add node-level cache, resume, and red-green invalidation. 7. Separate rendering, transactional publish, and indexing. -8. Keep `legacy/run-code-intel.ps1` as a compatibility façade until parity is proven. ## Non-Goals - Do not turn every function into a process. - Do not pass repository contents through stdout. - Do not introduce a workflow engine, database, message queue, Nix, Bazel, or OPA runtime. -- Do not migrate all PowerShell to Rust before contracts and parity tests exist. - Do not cache network output without provider and configuration provenance. The project absorbs mechanisms from Unix pipes, reproducible builds, content-addressed storage, incremental query systems, SLSA provenance, and policy-as-code. It does not import those systems as mandatory runtime dependencies. diff --git a/docs/code-intel-architecture-convergence-plan.md b/docs/code-intel-architecture-convergence-plan.md index dfb887be..b33e56fe 100644 --- a/docs/code-intel-architecture-convergence-plan.md +++ b/docs/code-intel-architecture-convergence-plan.md @@ -1,5 +1,8 @@ # Code Intel Pipeline architecture convergence plan +> PowerShell was removed from the product (DR-0018). References below to `.ps1` scripts, the PowerShell runner and its compatibility facades describe the plan-authoring baseline; that code no longer exists and the work now runs through the Rust `code-intel` CLI. + + Status: proposed implementation plan Date: 2026-08-02 Scope: converge the existing implementation without dropping committed product behavior diff --git a/docs/code-intel-architecture.md b/docs/code-intel-architecture.md index ee8a04cb..cf83924d 100644 --- a/docs/code-intel-architecture.md +++ b/docs/code-intel-architecture.md @@ -60,7 +60,7 @@ As the pipeline absorbs Repowise, Sentrux, graph providers, and future project-i That place is `orchestration/integrations.json`. -The rule is simple: no new project-intelligence dependency goes straight into an agent-facing script. Register the integration first, declare its stage, capabilities, artifact contract, and adapter entrypoint, then wire the adapter into the runner. When a Rust target exists, the Rust crate is the real integration entrypoint and `.ps1` files are compatibility surfaces. `code-intel.exe orchestrate` validates the registry and can print the current plan for humans or agents. +The rule is simple: no new project-intelligence dependency goes straight into an agent-facing script. Register the integration first, declare its stage, capabilities, artifact contract, and adapter entrypoint, then wire the adapter into the Rust runner. When a Rust target exists, the Rust crate is the integration entrypoint (PowerShell was removed, DR-0018). `code-intel orchestrate` validates the registry and can print the current plan for humans or agents. Detailed extension rules are in `docs/integration-orchestration.md`. diff --git a/docs/codenexus-provider-adapter.md b/docs/codenexus-provider-adapter.md index 0ce2464f..655f311d 100644 --- a/docs/codenexus-provider-adapter.md +++ b/docs/codenexus-provider-adapter.md @@ -12,7 +12,7 @@ Provider absence is an observation, not an empty result. It is represented as `s ## Full/lite swap and rollback -Full CodeNexus is the `primary` provider. `legacy/Invoke-CodeNexusLite.ps1` is a compatibility implementation and may appear only as `explicit_fallback` or `legacy_rollback`. It uses the same port and A04 path, but its provenance and repository/Git/Sentrux effects remain distinct. The demoted Rust worker is not part of this adapter. +Full CodeNexus is the `primary` provider. A lite compatibility implementation (the PowerShell one was removed, DR-0018) may appear only as `explicit_fallback` or `legacy_rollback`. It uses the same port and A04 path, but its provenance and repository/Git/Sentrux effects remain distinct. The demoted Rust worker is not part of this adapter. This design makes provider replacement an adapter-level change: no shared storage migration, Pipeline-side impact algorithm, or change to downstream admission semantics is required. diff --git a/docs/committed-run-index.md b/docs/committed-run-index.md index 0937272a..716735d0 100644 --- a/docs/committed-run-index.md +++ b/docs/committed-run-index.md @@ -37,7 +37,7 @@ code-intel artifact index --artifact-root --output --operati code-intel artifact index --artifact-root --output --operation incremental --existing ``` -`legacy/update-code-intel-index.ps1` is the compatibility facade. Normal mode routes to the Rust engine and writes a Markdown projection alongside the JSON index. The previous report-based traversal remains available only with `-LegacyCompatibilityMode`; it is advisory, cannot establish repository authority, and does not delete or migrate legacy data. +The Rust engine writes a Markdown projection alongside the JSON index. Legacy report-based directories are advisory, cannot establish repository authority, and are neither deleted nor migrated. ## Snapshot catalog and query views (#264) diff --git a/docs/compatibility-retire-codenexus-direct-branch.md b/docs/compatibility-retire-codenexus-direct-branch.md deleted file mode 100644 index af39b236..00000000 --- a/docs/compatibility-retire-codenexus-direct-branch.md +++ /dev/null @@ -1,39 +0,0 @@ -# E04 CodeNexus direct branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E04 is restricted to the one normal-run branch in `legacy/run-code-intel.ps1` that directly invokes -`legacy/Invoke-CodeNexusLite.ps1`. It does not authorize changes to the lite implementation, B04 provider -translation, B05 survival scanning, Hospital diagnosis, Sentrux, publication, or any other facade -branch. - -The current call graph is not yet retired. The normal path still invokes the lite script directly. -Separate B04 and B05 facade entry points exist and the full, lite, and unavailable fixtures pass, -but those entry points have not replaced the live normal-path call. Therefore E04 records a real -blocked packet and leaves `legacy/run-code-intel.ps1` unchanged. - -Generate and validate a fresh packet after building the Rust CLI: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/New-CodeNexusDirectRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e04-codenexus-direct ` - -EvaluatedAt -pwsh -NoProfile -File legacy/tools/compatibility/Test-CodeNexusDirectRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e04-codenexus-direct -``` - -The packet freezes three B04 modes through one port: full remains primary, lite remains an explicit -fallback/rollback implementation, and unavailable remains `provider_unavailable`. Unavailable then -selects B05, which may report basic repository inventory but must keep structural knowledge unknown. -Provider process and storage ownership remain outside the facade; mode-specific effects are recorded -instead of being flattened into a false parity claim. - -The deletion diff is a one-file, one-hunk, replayable delete-only proposal. E01 validates it and then -rejects it because the real E00 decision is blocked. No route substitution or deletion is executed. -Until the normal facade uses B04/B05, the 30-day observation window completes, and independent E00 -approval exists, `deletionExecuted=false` and `retired=false` are mandatory. The E00 projection in -`status.json` is mirrored by `PG-011` in the Gain Ledger; both remain blocked evidence of unfinished -retirement, not a completed gain. diff --git a/docs/compatibility-retire-doctor-wrapper-branch.md b/docs/compatibility-retire-doctor-wrapper-branch.md deleted file mode 100644 index 9e8c8a56..00000000 --- a/docs/compatibility-retire-doctor-wrapper-branch.md +++ /dev/null @@ -1,75 +0,0 @@ -# E09 direct doctor-wrapper retirement (historical) - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E09 owned only the three direct production-doctor route segments in `invoke-code-intel.ps1`: the -`check-code-intel-tools.ps1` binding, the preflight invocation block, and its existence guard. It -never owned the retained fresh-machine bootstrap script, B10's Rust adapter, A09, publication, -indexing, Hospital, Native Code Evidence, or provider branches. - -**The branch is gone, and it did not go through this gate.** `status.json` records -`decision = retired_out_of_band`, `retired = true`, `deletionExecuted = true`, and -`governanceBypass = true`. The E00 gate output in `gate-out/` is unchanged and still reads -`blocked`. That disagreement is deliberate: it is the record that the branch was removed by -ordinary development rather than because the gate was satisfied. Do not "fix" it by rewriting the -gate decision. - -## What actually happened - -| Commit | Date | Effect on the three route markers | -|---|---|---| -| `399dd75` Support portable repo paths | 2026-05-26 | full route present — `[1, 2, 1]` | -| `42de063` feat: complete model-independent code intel pipeline | 2026-07-23 | **added this packet and rewrote the wrapper in the same commit** — `[1, 0, 0]` | -| `804e2f0` feat: make compiled CLI the primary entry | 2026-07-25 | last marker removed — `[0, 0, 0]` | -| `372dd83` Merge pull request #13 | 2026-07-25 | deletion lands on `main` | - -Two consequences worth stating plainly: - -- **The packet was born stale.** `42de063` introduced E09 *and* dropped the frozen three-marker - route to `[1, 0, 0]` in the same commit. The old verifier asserted `directInvocationCount -eq 2`, - so that assertion has never held at any commit that contains the packet. -- **The frozen snapshot was never a commit.** The packet declares - `head: "working-tree-e09"`, `workingTreePolicy: "explicit_overlay"`, and it means it. All 185 - commits were scanned and none reproduces `snapshotIdentity ff712225…`. The `invoke-code-intel.ps1` - `baseText` alone matches `f3a4e867` "Integrate provider orchestration surfaces (#7)", but - `doctor_adapter.rs`, `doctor_envelope.rs` and `dag_run.rs` did not exist at that commit, so the - six-input set was never simultaneously real. Re-deriving the snapshot from the live tree is - therefore not merely stale — it is impossible, and always was. - -## Why this was not driven to an approved retirement instead - -The gate's four blockers are preserved verbatim in `status.unmetGateBlockersAtDeletion`. Satisfying -them after the fact would require restoring the branch, running a 30-day compatibility window that -never started, and obtaining an independent approval that does not exist. Manufacturing any of that -evidence would be worse than recording the bypass. The bypass is recorded. - -## Regeneration - -`New-DoctorWrapperRetirementPacket.ps1` **cannot regenerate this packet** and is retained only for -reference. It requires exactly one match for each of the three route-marker regexes in the live -wrapper and throws `E09 route marker absent or ambiguous` on the first one, because the live -`legacy/invoke-code-intel.ps1` is a thin facade forwarding to `code-intel.ps1` with zero -occurrences of the string `doctor`. The pre-deletion wrapper survives only as the packet's own -rehearsal artifact, `rollback-rehearsal/invoke-code-intel.ps1`. - -## Verification - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Test-DoctorWrapperRetirementPacket.ps1 -PacketRoot orchestration/retirements/e09-doctor-wrapper -``` - -The verifier is anchored to history, not to the live tree. It checks that the four artifacts share -the one frozen `snapshotIdentity`; that the deletion diff is one bounded three-hunk deletions-only -branch whose `baseText` is content-bound and replays exactly to its declared result; that the -rehearsal artifact is byte-identical to that `baseText` and **no longer** matches the live wrapper; -that all three route markers are absent from the live wrapper and it does not mention `doctor` at -all; that every commit cited in the out-of-band record resolves in this repository; that the E00 -decision still reads `blocked`; and that the retained bootstrap was not deleted along with the -branch. The frozen bootstrap hash is deliberately *not* asserted against the working tree — -`check-code-intel-tools.ps1` is a live script and has drifted since the freeze, which E09 has no -authority over. - -`PG-015` mirrors the E00 Gain Ledger projection, now carrying `status: "retired_out_of_band"`. diff --git a/docs/compatibility-retire-hospital-branch.md b/docs/compatibility-retire-hospital-branch.md deleted file mode 100644 index 2c3480f1..00000000 --- a/docs/compatibility-retire-hospital-branch.md +++ /dev/null @@ -1,29 +0,0 @@ -# E08 Hospital branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E08 owns only the embedded Hospital diagnosis/rendering function block and its invocation block in -`legacy/run-code-intel.ps1`. Its stable branch id is -`run-code-intel.hospital.embedded-diagnosis-render`; physical line numbers are not authoritative. -B09 semantics, publication, index, and doctor ownership are excluded. - -The B09 `diagnosis.hospital` capability is registered and its Rust contract tests prove fail-closed -precedence, rebuildable Markdown views, A09-seeded A01 execution, and stable machine parity against -the legacy facade on the same untrusted authoritative fixture. The normal facade still executes the -embedded PowerShell authority, however, so the replacement atom is not production-routed. - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Test-HospitalRetirementBoundary.ps1 -pwsh -NoProfile -File legacy/tools/compatibility/New-HospitalRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e08-hospital -EvaluatedAt ` - -CodeIntel work/e01-review-target/debug/code-intel.exe -pwsh -NoProfile -File legacy/tools/compatibility/Test-HospitalRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e08-hospital -``` - -Rollback is rehearsed only on an exclusive copy. Until the normal facade routes through B09, the -30-day usage window completes, and independent approval exists, E00 remains blocked and E01 remains -a draft validation boundary. Therefore `deletionExecuted=false` and `retired=false`. diff --git a/docs/compatibility-retire-index-branch.md b/docs/compatibility-retire-index-branch.md deleted file mode 100644 index ae0a4f2f..00000000 --- a/docs/compatibility-retire-index-branch.md +++ /dev/null @@ -1,29 +0,0 @@ -# E10 index branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E10 owns only the explicit legacy traversal below `function Read-JsonFile` in -`legacy/update-code-intel-index.ps1`. Its stable branch id is -`update-code-intel-index.legacy-compatibility-traversal`. A08 index semantics and E05 publication -ownership are excluded. - -Normal public refresh already routes through A08 and emits `code-intel-artifact-index.v1`. Tests -prove rebuild/incremental byte parity and admit only valid A07 runs while diagnosing staging, -markerless, forged, and legacy trees. `-LegacyCompatibilityMode` remains publicly reachable, but its -array output is diagnostic compatibility data and cannot claim the authoritative A08 schema. - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Test-IndexRetirementBoundary.ps1 -pwsh -NoProfile -File legacy/tools/compatibility/New-IndexRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e10-index -EvaluatedAt ` - -CodeIntel work/e01-review-target/debug/code-intel.exe -pwsh -NoProfile -File legacy/tools/compatibility/Test-IndexRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e10-index -``` - -E05 publication retirement remains blocked. Until that dependency, the observation window, usage -evidence, and independent approval pass, E00 remains blocked and E01 is only a draft boundary. -Therefore the legacy script remains present, `deletionExecuted=false`, and `retired=false`. diff --git a/docs/compatibility-retire-native-code-branch.md b/docs/compatibility-retire-native-code-branch.md deleted file mode 100644 index 9bd03670..00000000 --- a/docs/compatibility-retire-native-code-branch.md +++ /dev/null @@ -1,33 +0,0 @@ -# E07 embedded Native Code Evidence retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E07 is restricted to the embedded Native Code Evidence function family and its direct -`New-CodeEvidenceLayer` call in `legacy/run-code-intel.ps1`. It does not own the B08 algorithm, A09 DAG, -publication, committed-run indexing, Hospital diagnosis, provider adapters, or other facade branches. - -The branch is not retired. Normal and full modes still reach the embedded call unless the separate -`-DagCoordinate` route is explicitly selected. B08 is declared and A09 can execute it after Snapshot -Identity and inventory, but that opt-in route has not replaced the public normal/full path. E07 must -therefore remain `blocked`, with `deletionExecuted=false` and `retired=false`. - -Generate and validate a fresh packet only after the R06/B07 toolchain digest is current: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/New-NativeCodeRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e07-native-code ` - -EvaluatedAt -pwsh -NoProfile -File legacy/tools/compatibility/Test-NativeCodeRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e07-native-code -``` - -The packet freezes normalized legacy/B08 artifact parity, eight verified Artifact Refs, the exact -`repo_read` and `local_write` effects, explicit unknown relationship/call-graph precision for -unsupported languages, B07 registry reconciliation, and a two-segment single-branch rollback replay. -E01 validates the replayable deletion draft and rejects it while E00 remains blocked. - -`PG-012` mirrors the E00 Gain Ledger projection. It is unfinished retirement evidence, not a -completed deletion or a claim that normal/full already execute through A09. diff --git a/docs/compatibility-retire-provider-preflight-branch.md b/docs/compatibility-retire-provider-preflight-branch.md deleted file mode 100644 index 7bfeed9a..00000000 --- a/docs/compatibility-retire-provider-preflight-branch.md +++ /dev/null @@ -1,47 +0,0 @@ -# E03 provider-preflight branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E03 is restricted to the historical direct production call from `legacy/run-code-intel.ps1` to -`test-code-intel-provider.ps1`. The current production route calls -`legacy/Invoke-RepowiseProviderProbe.ps1`; the test-named script is a test-only compatibility wrapper. -`legacy/install-code-intel-pipeline.ps1 -CheckProvider` is a separate installer diagnostic and is not -authorized by this single-branch retirement. - -Run the static boundary check with: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Test-ProviderPreflightRetirementBoundary.ps1 -``` - -Generate and validate the independent historical-base packet with an exclusive output directory: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/New-ProviderPreflightRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e03-provider-preflight ` - -EvaluatedAt ` - -CodeIntel work/e01-review-target/debug/code-intel.exe -pwsh -NoProfile -File legacy/tools/compatibility/Test-ProviderPreflightRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e03-provider-preflight -``` - -The rollback command accepts only an explicit target or an exclusive rehearsal root. Packet -generation uses the rehearsal form and verifies the live facade digest is unchanged: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Restore-ProviderPreflightLegacyBranch.ps1 ` - -RehearsalRoot work/e03-provider-preflight-rollback- -``` - -The B01/A04 proving set is `legacy/scripts/tests/test-repowise-adapter-contract.ps1`, the quota/index-only case in -`repowise_route`, and the quota plus index-only cases in `repowise_adapter`. These prove that docs -quota does not erase a current index and that index-only evidence still passes A04. - -The historical direct call is discoverable from Git for rollback provenance, but it is not live in -the current facade. Therefore E03 must not delete or reroute the current production probe. A final -retirement packet remains blocked until a historical-base replayable deletion proof, completed -observation window, and independent repository-governed E00 approval exist. Until then -`deletionExecuted=false` and `retired=false` are mandatory. diff --git a/docs/compatibility-retire-publication-branch.md b/docs/compatibility-retire-publication-branch.md deleted file mode 100644 index 2e4a6e7f..00000000 --- a/docs/compatibility-retire-publication-branch.md +++ /dev/null @@ -1,28 +0,0 @@ -# E05 publication branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E05 owns only the two bounded legacy publication hunks in `legacy/run-code-intel.ps1`: staging-directory -allocation and final path rewrite/promotion/legacy completion-marker publication. Artifact generation -and E10 index traversal are excluded. The stable branch id is -`run-code-intel.publication.legacy-staging-marker`; no physical line number is authoritative. - -The current `-DagCoordinate` facade returns after A09 and is not connected to A07. A07's internal -seven-phase fail-closed matrix and marker-last success are green, but they are not represented as a -completed facade failure matrix. Consequently the packet remains blocked and cannot authorize deletion. - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Test-PublicationRetirementBoundary.ps1 -pwsh -NoProfile -File legacy/tools/compatibility/New-PublicationRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e05-publication -EvaluatedAt ` - -CodeIntel work/e01-review-target/debug/code-intel.exe -pwsh -NoProfile -File legacy/tools/compatibility/Test-PublicationRetirementPacket.ps1 ` - -PacketRoot orchestration/retirements/e05-publication -``` - -Rollback is rehearsed only on an exclusive copy. Until A09→A07 routing, a real facade phase matrix, -the observation window, and independent approval are complete, `deletionExecuted=false` and -`retired=false`. `legacy/update-code-intel-index.ps1` is neither read as deletion input nor modified by E05. diff --git a/docs/compatibility-retire-recommender-branch.md b/docs/compatibility-retire-recommender-branch.md deleted file mode 100644 index d06b3852..00000000 --- a/docs/compatibility-retire-recommender-branch.md +++ /dev/null @@ -1,42 +0,0 @@ -# E02 recommender branch retirement - -> **Superseded by [DR-0018](decisions/DR-0018-delete-powershell.md).** The packet generator, validator, -> restorer and rollback-rehearsal snapshots this page names were deleted in #452. Remaining -> PowerShell is deleted directly once a Rust test covers its live behavior; rollback is git history. -> The packet's `status.json` stays as the historical record. - -E02 is limited to the duplicated inline workflow recommender in `legacy/run-code-intel.ps1` and its one -legacy invocation path. The replacement is `advisory.workflow-recommend`; provider preflight, -publication, CodeNexus, and every other facade branch are outside this ticket. - -Generate a fresh, snapshot-bound packet only after building the Rust CLI: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/New-RecommenderRetirementPacket.ps1 ` - -OutDir orchestration/retirements/e02-recommender ` - -EvaluatedAt -``` - -The generator runs the recommender golden/contract/effect/authority checks, executes rollback on an -exclusive temporary copy, creates E00 evidence and an E01 draft ticket, and then runs E00. The E00 -approval subject binds `legacy/run-code-intel.ps1::run-code-intel.workflow-recommender.inline` and the -single affected file. The deletion evidence is a two-hunk `replayable-delete-only-v1` patch with -base/result blob hashes and no added lines; its prose summary is non-authoritative. The generator -passes that patch through E01 and requires E01 to reject specifically because E00 is still blocked. -It never deletes code. A blocked E00 decision is a hard stop: `status.json` must keep -`deletionExecuted` and `retired` false. - -The current packet is intentionally blocked because no 30-day production usage/compatibility -observation, D02 clean-machine repetition, or independent repository-governed approval exists. -Passing local parity tests or reducing line count cannot substitute for those gates. - -Rollback rehearsal uses: - -```powershell -pwsh -NoProfile -File legacy/tools/compatibility/Restore-RecommenderLegacyBranch.ps1 ` - -RehearsalRoot work/e02-recommender-rollback -``` - -The script extracts only the historical inline recommender and invocation from the requested Git -revision and applies them to a copy. Applying it to a real checkout requires the explicit -`-TargetPath` parameter and remains an independently authorized bounded-window action. diff --git a/docs/compatibility-retirement-gate.md b/docs/compatibility-retirement-gate.md deleted file mode 100644 index 983ed6e5..00000000 --- a/docs/compatibility-retirement-gate.md +++ /dev/null @@ -1,41 +0,0 @@ -# Compatibility Retirement Gate (E00) - -`compatibility.retirement-gate` decides whether one legacy branch has enough evidence to enter a -separate retirement ticket. It cannot delete, rewrite, disable, or reroute that branch. Its sole -effect is publishing a local, snapshot-bound decision artifact and a Gain Ledger projection. - -The A01 capability consumes one A03-verified closed retirement manifest plus the exact A03-verified -evidence artifacts referenced by that manifest. Extra evidence, missing evidence, reused evidence, -digest mismatches, snapshot mismatches, and unregistered artifact types fail closed. -The request must provide exactly one explicit `options.evaluatedAt` integer; this keeps freshness -evaluation deterministic and replayable instead of reading wall-clock time implicitly. - -Approval requires independently content-bound evidence for: - -- a production-ready replacement atom with a non-cyclic dependency set; -- golden, contract, and effect parity with at least one passing assertion each; -- B07 registry reconciliation for the legacy participant and replacement capability; -- a completed compatibility observation window whose `checkedAt <= evaluatedAt <= expiresAt`; -- an owned rollback command and a real, matching execution with exit code 0; -- production usage observation covering the same compatibility window, with internally reconciled - totals, positive replacement traffic, and zero legacy invocations; -- an admitted C00 necessity decision whose change ID and trace digest bind this retirement record; -- one matching approved dependency state for every replacement dependency, including D02 when it - is a dependency; and -- an approval bound to the SHA-256 of the complete approval subject and a current repository-trusted - authority event. The reviewer must match the trusted event approver and differ from the legacy - owner; `authorIndependent: true` alone has no authority. - -The complete approval subject includes a canonical `::` call path and the -exact sorted, unique set of affected files. Those fields are therefore covered by both the subject -SHA-256 and the independent approval. A later ticket cannot broaden the call path or add a second -file/branch under the same E00 approval. - -`pending` or `rejected` dependency evidence remains a visible blocker. The gate never fabricates a -D02 approval. A replacement that names itself or the legacy capability as a dependency is cyclic -and blocked. Line reduction is explicitly fixed to `false` in the manifest contract because fewer -lines are not correctness evidence. - -The output is `approved` or `blocked`, retains sorted blocker codes, fixes the authority boundary to -`approval_only_no_deletion_authority`, and projects an `approved-for-ticket` or `blocked` Gain -Ledger item. Actual deletion remains an E01+ branch-specific action with its own authority. diff --git a/docs/compatibility-retirement-ticket-template.md b/docs/compatibility-retirement-ticket-template.md deleted file mode 100644 index b650a090..00000000 --- a/docs/compatibility-retirement-ticket-template.md +++ /dev/null @@ -1,34 +0,0 @@ -# Compatibility retirement ticket template (E01) - -E01 freezes one small, reversible deletion ticket after E00 has approved the exact retirement -subject. It is a planner/validator boundary: the output remains `draft` and carries -`template_only_no_approval_or_deletion_authority`; it cannot approve, delete, reroute, disable, or -roll back a branch. - -Each ticket names exactly one legacy capability, branch, and call path; one replacement capability -and its dependencies; affected files; golden, contract, effect, usage, rollback-rehearsal, and -deletion-diff evidence; distinct owner and verifier; and an observation expiry. The contract is -closed, so plural/extra branch fields are rejected rather than interpreted. - -The A01 capability consumes A03-verified ticket, E00 manifest, E00 decision, and deletion-diff -artifacts. It requires an `approved` E00 decision, verifies the decision and manifest Artifact Ref -digests, recomputes the E00 approval-subject digest, and compares every projected evidence ref to -the consumed E00 manifest. It also requires the ticket's canonical call path and exact sorted, -unique affected-file set to equal the E00-approved values. - -The deletion diff must name that same branch and exact file set. `deletionsOnly` and `summary` are -descriptive fields, not proof. The authoritative `replayable-delete-only-v1` patch binds every -file's base/result UTF-8 text to SHA-256, supplies exact deletion hunks, forbids added lines, and is -replayed by the runtime to prove that the result is obtained only by deletion. A forged summary, -replacement/addition, hidden touched path, hash mismatch, or non-replayable hunk fails closed with -exit 65. `options.evaluatedAt` is explicit and deterministic; expired observations fail. - -Run the standalone completeness lint with: - -```text -target/debug/code-intel.exe compatibility retirement-ticket lint --ticket --evaluated-at -``` - -Run the content-bound A01 projection with `capability exec compatibility.retirement-ticket-template`. -Passing either command means only that the draft is complete and bound to E00; a separate verifier -and a separately authorized deletion executor are still required. diff --git a/docs/execution-kernel-architecture.md b/docs/execution-kernel-architecture.md index 711d18a9..9a8c26da 100644 --- a/docs/execution-kernel-architecture.md +++ b/docs/execution-kernel-architecture.md @@ -6,7 +6,7 @@ Make one deep Rust module authoritative for a Code Intel run. The typed CLI adap intent into one immutable policy; the authoritative-run controller owns the production request, committed-run validation, and completed-only index publication. Its private kernel owns policy application, DAG execution, outcome classification, and atomic run publication. PowerShell -remains a compatibility adapter and batch selector. +was removed from the product (DR-0018). ## External interface @@ -80,9 +80,8 @@ legacy doctor overrides. 1. Replace stringly run outcomes with a typed enum that owns exit semantics. 2. Replace duplicated CLI/executor policy fields with one immutable `ExecutionPolicy`. 3. Add a high-level Rust authoritative-run route that executes and publishes in one call. -4. Move the stable PowerShell wrapper to the high-level route. -5. Apply optional/offline provider behavior without changing artifact authority. -6. Retire compatibility routes only after their observation window and rollback gates pass. +4. Apply optional/offline provider behavior without changing artifact authority. +5. Retire compatibility routes only after their observation window and rollback gates pass. ## Regression contract diff --git a/docs/github-gitlab-remote-linkage-design.md b/docs/github-gitlab-remote-linkage-design.md index f86480ed..47cc3c16 100644 --- a/docs/github-gitlab-remote-linkage-design.md +++ b/docs/github-gitlab-remote-linkage-design.md @@ -209,7 +209,7 @@ diverging from the `model_channels.rs` CC-Switch shape (`CODE_INTEL_CC_SWITCH_EN config, structurally identical to the existing `CODE_INTEL_INTEGRATIONS_MANIFEST` pattern in `capability.rs::discover_manifest()` (env var → file path → `.is_file()` check → fallback candidate paths under `CODE_INTEL_HOME`/`CODE_INTEL_DATA_ROOT`). Inline JSON in a Windows -PowerShell env var is exactly the quoting pain ADR 0001 names as its #1 motivating complaint +shell env var is exactly the quoting pain ADR 0001 names as its #1 motivating complaint ("every time PowerShell trips me up it kills efficiency") — a file path sidesteps that entirely, so the manifest shape is the better-fitting precedent here, even though CC-Switch is the more recently-added example. diff --git a/docs/graph-provider-adapter.md b/docs/graph-provider-adapter.md index c0782806..bce6a022 100644 --- a/docs/graph-provider-adapter.md +++ b/docs/graph-provider-adapter.md @@ -12,7 +12,7 @@ code-intel provider graph-adapt \ --max-age-seconds ``` -The PowerShell facade exposes the same route through `-GraphAdapterRequest`, `-GraphAdapterArtifactRoot`, `-GraphAdapterEvaluatedAt`, and `-GraphAdapterMaxAgeSeconds`. Success emits one `code-intel-graph-route-result.v1` document and exits `0`. Usage errors exit `64`. Invalid input, stale evidence, a wrong snapshot, digest failure, or payload/port drift emits one rejected route document and exits `65`. Diagnostics never include request bytes. +Success emits one `code-intel-graph-route-result.v1` document and exits `0`. Usage errors exit `64`. Invalid input, stale evidence, a wrong snapshot, digest failure, or payload/port drift emits one rejected route document and exits `65`. Diagnostics never include request bytes. ## Provider-neutral port diff --git a/docs/hospital-diagnosis.md b/docs/hospital-diagnosis.md index 7f2935a3..9688bd98 100644 --- a/docs/hospital-diagnosis.md +++ b/docs/hospital-diagnosis.md @@ -47,6 +47,6 @@ registered A01 `diagnosis.hospital` capability, and re-verifies all four outputs through A03. Snapshot mismatch, unknown schema/type, digest mismatch, empty seeds, and non-admitted evidence fail closed without a hospital report. -`legacy/run-code-intel.ps1` remains the rollback facade until E08. Its stable diagnosis -labels and precedence are the compatibility baseline; new authority belongs to +The former PowerShell runner's stable diagnosis +labels and precedence remain the compatibility baseline; new authority belongs to the A01/A03/A04/A09 path above. diff --git a/docs/implementation-minimalism-benchmark.md b/docs/implementation-minimalism-benchmark.md index 5e86a1bb..8131b8cb 100644 --- a/docs/implementation-minimalism-benchmark.md +++ b/docs/implementation-minimalism-benchmark.md @@ -11,7 +11,7 @@ Before writing code, choose the first sufficient rung: 1. Do nothing: if the requested behavior already exists or the safest answer is documentation, configuration, or a runbook. 2. Reuse this repository: call an existing function, script, template, test helper, or documented workflow. 3. Use the standard library: prefer built-in language and shell capabilities over a new package. -4. Use platform native capability: prefer PowerShell, git, cargo, CI, OS, or host-agent features that are already required by this repo. +4. Use platform native capability: prefer git, cargo, CI, OS, or host-agent features that are already required by this repo. 5. Use an already-installed dependency: reuse dependencies that are already part of the project contract. 6. Use a one-liner: when the behavior is genuinely a small expression or command and readability remains clear. 7. Write the smallest local implementation: add only the code needed for the verified behavior, with tests scaled to risk. @@ -41,10 +41,10 @@ Measured impact is tracked in `docs/ponytail-impact-scoreboard.md`. ## Local Check -Run the skill benchmark gate after changing this document, `skills/code-intel-pipeline/SKILL.md`, or related ADRs: +Run the documentation contract tests after changing this document, `skills/code-intel-pipeline/SKILL.md`, or related ADRs: -```powershell -.\legacy/scripts/tests/test-skill-development-benchmark.ps1 -RepoPath . +```sh +cargo test -p code-intel --test internalization_record ``` The check verifies Code Intel internalized the implementation minimalism benchmark and its safety boundaries without making Ponytail a runtime dependency. diff --git a/docs/inventory-rg-capability-contract.md b/docs/inventory-rg-capability-contract.md index 96f5be6e..f65408e7 100644 --- a/docs/inventory-rg-capability-contract.md +++ b/docs/inventory-rg-capability-contract.md @@ -1,7 +1,7 @@ # inventory.rg capability contract -`inventory.rg` v1 is the deterministic capability-envelope adapter for the existing -`legacy/run-code-intel.ps1` file-inventory step. It does not replace the compatibility facade. +`inventory.rg` v1 is the deterministic capability-envelope adapter for the file-inventory step +previously implemented by the PowerShell runner (removed, DR-0018). Compatibility is defined over the normalized file set, not the byte order emitted by a particular `rg --files` process. The legacy runner preserves ripgrep's process order, which is @@ -12,8 +12,7 @@ containing a newline or non-UTF-8 byte is not trimmed, split, or otherwise rewri and platform encoding are versioned materialized-view rules; they do not add or remove path values. The adapter applies the legacy default exclusions and accepts `options.inventoryExclude` as an -ordered array of additional ripgrep glob arguments. Tests compare the normalized output of the -real PowerShell runner with the capability output, including hidden files, default exclusions, +ordered array of additional ripgrep glob arguments. Tests cover hidden files, default exclusions, custom exclusions, Unicode, whitespace, quotes, and shell metacharacters. Glob evaluation is delegated to the pinned `rg` executable rather than reimplemented. The lease diff --git a/docs/model-executable-handle.md b/docs/model-executable-handle.md deleted file mode 100644 index 37c87866..00000000 --- a/docs/model-executable-handle.md +++ /dev/null @@ -1,9 +0,0 @@ -# Model Request Synthesis And Executable Handles - -`legacy/New-ModelAdapterRequest.ps1` converts a ready routing result and the matching inventory candidate into a closed v2 adapter request. Cost scope, model identity, external-egress posture, and consent states are derived from those inputs; a caller cannot weaken them in a hand-authored synthesis request. - -CLI requests use `legacy/New-ModelExecutableHandle.ps1`. The short-lived handle binds adapter identity, canonical path, SHA-256, file length, last-write ticks, observation time, and expiry. `legacy/Invoke-ModelChannelDelegate.ps1` revalidates every field immediately before starting the process and rejects expired, mutated, moved, or adapter-mismatched executables before invocation. - -The handle is content-bound and tamper-evident, not a cryptographic authorization signature: a local actor able to rewrite both the executable and handle can recompute its digest. OS replacement between final verification and process creation also remains a platform-level TOCTOU limit. The control prevents stale or accidentally substituted executables; it does not replace host integrity or code-signing policy. - -Raw-path v1 CLI requests are disabled by default. A direct delegate caller must explicitly pass `-AllowLegacyRawExecutable` to enter that compatibility surface; the production `legacy/run-code-intel.ps1` facade does not expose or pass that switch. Automatically synthesized requests always use v2 and require a verified handle. diff --git a/docs/native-code-evidence.md b/docs/native-code-evidence.md index 0c578da9..36f30a25 100644 --- a/docs/native-code-evidence.md +++ b/docs/native-code-evidence.md @@ -11,12 +11,10 @@ chunks, symbol containment, heuristic imports, the scorecard, and Agent Code Sli Artifact Ref and is reverified by A03 before A09 exposes it to downstream nodes. Markdown Agent Code Slice views are deterministic rebuildable views of those machine artifacts. -Coverage is deliberately bounded. The built-in extractor uses line heuristics for PowerShell, -Python, JavaScript/TypeScript, Rust, Go, and Java. Other files remain in files/chunks but appear in +Coverage is deliberately bounded. The built-in extractor uses line heuristics for Python, JavaScript/TypeScript, Rust, Go, and Java. Other files remain in files/chunks but appear in `code-evidence/coverage.json` as unsupported. Symbol and import precision are `heuristic`; relationship precision and call-graph status are always `unknown`. The atom never emits a call-graph artifact and makes no claim about external cocoindex or specialized semantic graphs. -Declared and observed effects are exactly `repo_read` and `local_write`. The existing embedded -PowerShell producer remains the compatibility/rollback implementation until later facade -retirement tickets complete parity and independent verification. +Declared and observed effects are exactly `repo_read` and `local_write`. The former embedded +PowerShell producer was removed with PowerShell (DR-0018). diff --git a/docs/openspec-detector.md b/docs/openspec-detector.md index 4567bf59..840806fd 100644 --- a/docs/openspec-detector.md +++ b/docs/openspec-detector.md @@ -69,7 +69,7 @@ ## 代码规模扫描 - 扫描范围:仓库根目录递归,排除 `node_modules/ .git/ target/ dist/ build/ vendor/ venv/ .venv/ __pycache__/` -- 扩展名:`.ts .tsx .js .jsx .rs .py .go .ps1 .psm1 .cs .java .kt .swift .vue .svelte .v` +- 扩展名:`.ts .tsx .js .jsx .rs .py .go .cs .java .kt .swift .vue .svelte .v` - 不再局限于 `src/lib/app/packages/crates` 五个白名单目录,避免像 `tools/` 下的脚本被漏统计 ## 集成到 Code Intel Pipeline diff --git a/docs/openssf-best-practices-gap.md b/docs/openssf-best-practices-gap.md index 2b071f9d..e1748ae0 100644 --- a/docs/openssf-best-practices-gap.md +++ b/docs/openssf-best-practices-gap.md @@ -58,7 +58,7 @@ move. |---|---|---| | `build` — working automated build | Met | `cargo build`, wired into every CI workflow. | | `build_common_tools` (SUGGESTED) | Met | Standard Cargo/rustup toolchain. | -| `build_floss_tools` — buildable with only FLOSS tools | Met | Rust toolchain, ripgrep, Python — all FLOSS. PowerShell 7+ (`pwsh`) is required by the installer/launchers; PowerShell 7 is FLOSS (MIT) and cross-platform, so this still holds. | +| `build_floss_tools` — buildable with only FLOSS tools | Met | Rust toolchain, ripgrep, Python — all FLOSS. The installer is the Skill bootstrap plus `code-intel setup`; no PowerShell is required. | | `test` — automated, publicly released, documented test suite | Met | `cargo test`, Python `tests/*.py`; invocation documented in `release.yml`/`ci.yml` and this repo's own docs. | | `test_invocation` (SUGGESTED) | Met | Standard `cargo test` / `python -m unittest` invocations. | | `test_most` (SUGGESTED) — most branches/functionality covered | Not verified this pass | No line/branch coverage tool is wired into CI to measure this against; the audit report's `supply-chain` finding does not cover test quality (out of this department's scope — `security`/`quality` territory). | diff --git a/docs/plans/adr-0010-execution-plan.md b/docs/plans/adr-0010-execution-plan.md index 820c1644..f5a217ad 100644 --- a/docs/plans/adr-0010-execution-plan.md +++ b/docs/plans/adr-0010-execution-plan.md @@ -1,5 +1,8 @@ # ADR 0010 Execution Plan +> PowerShell was removed from the product (DR-0018). References below to `.ps1` scripts, the PowerShell runner and its compatibility facades describe the plan-authoring baseline; that code no longer exists and the work now runs through the Rust `code-intel` CLI. + + Status: implemented; superseded as an execution plan Scope: ADR 0009 runtime convergence plus ADR 0010 tool-neutral engineering-intelligence core Rule: every ticket below delivers exactly one independently testable capability. A checked-in definition, schema, ADR, or plan is not implementation evidence. diff --git a/docs/pon-multilanguage-code-evidence.md b/docs/pon-multilanguage-code-evidence.md index e25a61d9..d7d8e10b 100644 --- a/docs/pon-multilanguage-code-evidence.md +++ b/docs/pon-multilanguage-code-evidence.md @@ -12,7 +12,7 @@ The Pipeline's language-neutral structural representation is the existing Code E - `imports.json`: normalized import target observations; - `coverage.json`: supported heuristics and explicit unknowns. -Python, JavaScript, TypeScript, Rust, Go, Java, and PowerShell adapters emit the same field shapes. Consumers can therefore rank and navigate code without branching on source syntax. The multilingual fixture is a ratchet over that shared contract: a supported language cannot silently disappear, change fact shape, or fabricate additional facts without a reviewed fixture change. +Python, JavaScript, TypeScript, Rust, Go, and Java adapters emit the same field shapes. Consumers can therefore rank and navigate code without branching on source syntax. The multilingual fixture is a ratchet over that shared contract: a supported language cannot silently disappear, change fact shape, or fabricate additional facts without a reviewed fixture change. ## Precision boundary diff --git a/docs/ponytail-gain-ledger.md b/docs/ponytail-gain-ledger.md index 3f1f623b..c91d6e82 100644 --- a/docs/ponytail-gain-ledger.md +++ b/docs/ponytail-gain-ledger.md @@ -14,20 +14,20 @@ Status meanings: | ID | Status | Gain | Evidence | First harvest | | --- | --- | --- | --- | --- | | PG-001 | harvest-next | Remove tracked local repo aliases from `pipeline.config.json`. | `pipeline.config.json` contains machine-local `D:\projects\opencli-admin` aliases while `pipeline.config.example.json` already exists. | Delete tracked `pipeline.config.json`; keep real aliases in ignored `pipeline.config.local.json`; update docs only if a command assumes the tracked file. | -| PG-002 | harvest-next | Remove target-repo business taxonomy from generic Sentrux module naming. | `legacy/Invoke-SentruxAgentTool.ps1` `Get-ModuleBucket` contains `strategy`, `trading`, `brokers`, `markets`, `okx`, `ashare`, `crypto`, `sentiment`, and `narrative` buckets. | Fall back to generic path/stem grouping; move special buckets to config only if a governed repo proves it needs them. | -| PG-003 | open | Demote `crates/code-nexus-lite` until the iii worker is actually shipped. | Main pipeline still uses local PowerShell CodeNexus context; the Rust crate adds `iii-sdk`, HTTP triggers, and a separate runtime surface. | Remove it from workspace members or move it to an incubator path; keep the artifact contract in PowerShell until distribution requires the worker. | +| PG-002 | closed | Remove target-repo business taxonomy from generic Sentrux module naming. | The PowerShell implementation this row targeted was deleted (DR-0018). | None; closed by the PowerShell removal. | +| PG-003 | open | Demote `crates/code-nexus-lite` until the iii worker is actually shipped. | The PowerShell CodeNexus context was removed (DR-0018); the Rust crate adds `iii-sdk`, HTTP triggers, and a separate runtime surface. | Remove it from workspace members or move it to an incubator path; keep the artifact contract in the main CLI until distribution requires the worker. | | PG-004 | harvest-next | Delete nested `crates/code-nexus-lite/Cargo.lock`. | Workspace root already tracks `Cargo.lock`. | Remove the nested lock if `code-nexus-lite` stays in the workspace. | | PG-005 | closed | Slim `skills/code-intel-pipeline/SKILL.md` back to the hot path. | The Skill now keeps installation, run order, failure categories, and report order in the hot path while linking detailed contracts from the installed release. | Keep project-specific examples in docs or runbooks. | -| PG-006 | open | Split or slim `legacy/Invoke-SentruxAgentTool.ps1`. | Sentrux artifact reports 2701 lines, 77 functions, `Get-ModuleBucket` cc=86, `Invoke-DsmTool` cc=44. | Harvest PG-002 first; then split only if complexity remains concentrated. Candidate seams: `dsm`, `git signals`, `what_if`. | -| PG-007 | blocked | Remove bundled Sentrux lite core fallback. | `legacy/tools/sentrux-shim/sentrux-lite-core.ps1` duplicates enough Sentrux behavior to keep new machines closed-loop. | Keep until upstream `sentrux.exe` install and Windows plugin behavior are reliable in CI and teammate setup. | +| PG-006 | closed | Split or slim `legacy/Invoke-SentruxAgentTool.ps1`. | The PowerShell implementation this row targeted was deleted (DR-0018). | None; closed by the PowerShell removal. | +| PG-007 | closed | Remove bundled Sentrux lite core fallback. | The PowerShell implementation this row targeted was deleted (DR-0018). | None; closed by the PowerShell removal. | | PG-008 | open | Collapse repeated README/skill/architecture operational prose. | README, `skills/code-intel-pipeline/SKILL.md`, and `docs/code-intel-architecture.md` still overlap on the stable run and report order. | Make README narrative, Skill hot-path commands, architecture boundaries; delete duplicate command blocks elsewhere. | | PG-009 | harvest-next | Keep Ponytail benchmark gate additions minimal. | Current benchmark test was table-driven to avoid Sentrux complexity regression, but it expanded the file more than the concept needs. | Keep the new assertions, but do not add more gates unless a published contract depends on them. Prefer one array per concept over per-phrase blocks. | | PG-010 | blocked | Retire one compatibility branch only after E00 approval. | `compatibility.retirement-gate` projects a content-bound `approved-for-ticket` or `blocked` item from replacement, parity, registry, window, rollback execution, usage, C00, dependency, and independent-review evidence. | Open one E01 retirement ticket for the named branch; the gate itself has no deletion authority. | -| PG-011 | blocked | Retire `run-code-intel.codenexus-lite.direct` after the normal path is routed through B04 and unavailable mode selects B05. | E04's packet proves full/lite/unavailable contract fixtures, provider-owned process/storage effects, B05's `structuralVerdict=unknown` boundary, and exact rollback replay; the current normal path still contains one direct `legacy/Invoke-CodeNexusLite.ps1` block. | Substitute the single call path under a separately reviewed change, complete the 30-day usage window and independent E00 approval, then execute the one-file deletion ticket; until then `deletionExecuted=false` and `retired=false`. | +| PG-011 | closed | Retire `run-code-intel.codenexus-lite.direct` after the normal path is routed through B04 and unavailable mode selects B05. | The PowerShell implementation this row targeted was deleted (DR-0018). | None; closed by the PowerShell removal. | | PG-012 | blocked | Retire `run-code-intel.native-code.embedded` after normal/full execute B08 through A09. | B08 preserves normalized v1 artifacts, emits eight snapshot-bound Artifact Refs, declares `repo_read`/`local_write`, and reports unsupported relationship precision as unknown; the facade still contains the embedded function family and direct call. | Route normal/full through A09, complete the 30-day observation window and independent E00 approval, then execute the two-segment one-file deletion ticket; until then `deletionExecuted=false` and `retired=false`. | | PG-013 | blocked | Retire `run-code-intel.hospital.embedded-diagnosis-render` after the normal facade executes B09. | B09 proves fail-closed precedence, rebuildable Markdown views, A09-seeded A01 execution, and stable machine parity against the legacy facade on the same untrusted authoritative fixture; the normal facade still owns one embedded function block and one direct invocation block. | Route the normal facade through `diagnosis.hospital`, complete the 30-day usage window and independent E00 approval, then execute the two-hunk one-file deletion ticket; until then `deletionExecuted=false` and `retired=false`. | | PG-014 | blocked | Retire `update-code-intel-index.legacy-compatibility-traversal` after E05 and E00 approval. | Normal public refresh already routes through A08 with rebuild/incremental parity and valid-A07-only admission; explicit legacy compatibility traversal remains publicly reachable and produces diagnostic, non-authoritative output. | Keep the legacy branch until E05, the observation window, usage evidence, and independent approval pass; then execute the one-hunk one-file deletion ticket. Until then `deletionExecuted=false` and `retired=false`. | -| PG-015 | blocked | Retire `invoke-code-intel.doctor.direct-production` after public preflight routes through B10. | B10 proves one-result envelope behavior for manifest drift and present-but-nonconforming providers, secret redaction, and readiness/conformance separation; `legacy/invoke-code-intel.ps1` still invokes the retained PowerShell bootstrap directly, and that observation-only bootstrap has no declared expiry. | Keep `legacy/check-code-intel-tools.ps1`; route public preflight through `doctor`, declare an owned expiry/removal criterion for the non-authoritative bootstrap, complete the 30-day usage window and independent E00 approval, then execute only the three-hunk one-file deletion ticket. Until then `deletionExecuted=false` and `retired=false`. | +| PG-015 | closed | Retire `invoke-code-intel.doctor.direct-production` after public preflight routes through B10. | The PowerShell implementation this row targeted was deleted (DR-0018). | None; closed by the PowerShell removal. | ## Retained After Audit diff --git a/docs/ponytail-governance-gate.md b/docs/ponytail-governance-gate.md index 86e6abee..4029306a 100644 --- a/docs/ponytail-governance-gate.md +++ b/docs/ponytail-governance-gate.md @@ -54,11 +54,5 @@ exits 0; an enforce result with `enforcedBlock=true` remains schema-valid on std Usage errors exit 64, contract-invalid input exits 65 without emitting a result, and host I/O failures exit 74. The gate is not coupled to the A09 DAG runner. -Run the focused CI contract with: - -```powershell -./legacy/scripts/tests/test-ponytail-gate-contract.ps1 -RepoPath . -``` - No Ponytail package or runtime is installed or invoked. The source project remains a reference; the semantic contract is owned by Code Intel Pipeline. diff --git a/docs/ponytail-impact-scoreboard.md b/docs/ponytail-impact-scoreboard.md index 45ab9efe..4fd9e15c 100644 --- a/docs/ponytail-impact-scoreboard.md +++ b/docs/ponytail-impact-scoreboard.md @@ -16,7 +16,7 @@ Rule: measured impact only. If a value was not measured, record `not_measured`. | benchmark_after_seconds | not_measured | not_measured | not_measured | not_measured | No before/after timing benchmark has been run. | | cost_before | not_measured | not_measured | not_measured | not_measured | No token, API, or tool-cost baseline has been captured. | | cost_after | not_measured | not_measured | not_measured | not_measured | No token, API, or tool-cost baseline has been captured. | -| quality_gate_status | passed | passed | unchanged | measured | `legacy/scripts/tests/test-skill-development-benchmark.ps1 -RepoPath .` passed after adding the benchmark docs. | +| quality_gate_status | passed | passed | unchanged | measured | the skill benchmark documentation gate passed after adding the benchmark docs. | ## Scoreboard Contract diff --git a/docs/project-orientation-benchmark.md b/docs/project-orientation-benchmark.md index 80b14952..a397a842 100644 --- a/docs/project-orientation-benchmark.md +++ b/docs/project-orientation-benchmark.md @@ -4,7 +4,7 @@ ## Run -```powershell +```sh cargo build -p code-intel target/debug/code-intel.exe benchmark orientation --out artifacts/orientation-benchmark --repetitions 3 ``` diff --git a/docs/ps1-exit/contract-inventory.md b/docs/ps1-exit/contract-inventory.md deleted file mode 100644 index c9e716c8..00000000 --- a/docs/ps1-exit/contract-inventory.md +++ /dev/null @@ -1,532 +0,0 @@ -# PS1 Monolith Contract Inventory (T1) - -Addresses issue #46 (campaign map #55, "PS1 巨石退役战役"). **Zero production -behavior changes** — this document and its companion parity harness -(`legacy/scripts/tests/test-ps1-rust-parity.ps1`) are pure analysis and test -infrastructure. If this inventory surfaces an actual bug, it is recorded in -[§7 Gaps and known issues](#7-gaps-and-known-issues) rather than fixed here. - -Every `evidence` cell below is a `file:line` this session actually read -(via `Read`/`Grep`/a sandboxed file-content pass — never guessed from a -symbol name or a stale index). Uncertain classifications are marked `?` -with one line of reasoning per the ticket's instruction to prefer -under-claiming over a confidently wrong row. - -## 0. Scope correction (read this before the tables) - -The ticket's description of `legacy/Invoke-SentruxAgentTool.ps1`'s "distinctive -surfaces" — shim management, pro activation, failure normalization, output -adaptation — does not match what is actually in that file. Verified by -grepping the live file for `shim`, `activation`, `pro license`, -`normalizeFailure`, `output adapt`: **zero matches** for any of them. The -real picture, confirmed by tracing actual call sites: - -| Claimed surface | Actually lives in | -|---|---| -| Sentrux shim management (core-binary resolution, thin-forwarder detection) | `legacy/tools/sentrux-shim/sentrux-shim.ps1` (339 lines) | -| Pro activation (license write/read, auto-disable, `sentrux pro` subcommand) | `legacy/tools/sentrux-shim/sentrux-shim.ps1` (same file) | -| Failure normalization (`code-intel-sentrux-failures.v1`, the schema in `docs/archive/2026-07/sentrux-failure-normalization-plan.md`) | `legacy/run-code-intel.ps1`'s `New-CodeIntelSentruxFailures` (:2741) and related helpers — i.e. **the other named monolith**, not this one | -| Output adaptation | Arguably this file's actual job (see §2), but not under that name anywhere in the source | - -`legacy/run-code-intel.ps1` does call `legacy/Invoke-SentruxAgentTool.ps1` — but only for -three of its eleven tool operations (`dsm`, `evolution`, `what_if`; see -§2.2 and §1.8), and its "sentrux check"/"sentrux gate" pipeline steps go -through the **separate** `sentrux` shim command (`legacy/tools/sentrux-shim/`), -confirmed by `grep -c Invoke-SentruxAgentTool legacy/tools/sentrux-shim/*.ps1` = 0. - -This document therefore inventories `legacy/Invoke-SentruxAgentTool.ps1` as what -it verifiably is (§2: an 11-operation DSM/git-churn/complexity metrics -engine), gives `legacy/tools/sentrux-shim/*.ps1` the light pass the "shim -management + pro activation" framing actually calls for (§3, 906 lines, -well within the spirit of the ticket even though those files were not -named in the ticket body), and does not force PS1 code to match a premise -the code itself contradicts. - -## 1. `legacy/run-code-intel.ps1` (4723 lines) - -### 1.1 `param()` block — 72 parameters (16 switches, 56 value params) - -Full block: `legacy/run-code-intel.ps1:3-91`. Grouped by cohesive behavior rather -than listed as 72 flat rows (a `?`-worthy judgment call in itself — the -ticket says "every parameter", so the full flat list is preserved in -§1.1.1 for completeness; this table is the behavioral grouping used for -classification). - -| behavior | evidence | existing test coverage | classification | notes/gap | -|---|---|---|---|---| -| `-Repo` / `-RepoPath` (repo path resolution, `-Repo` is a deprecated alias resolved via `Resolve-Repo`) | `:4-5`, `Resolve-Repo` fn `:249-258` | widely covered (12+ files pass `-RepoPath`) | port | Core entry, must exist in Rust equivalent (`--repo` already does in `code-intel run execute`). | -| `-Config` (path to a JSON config file merged under CLI args) | `:7` | `test-doctor-repo-config-resolution.ps1`, `test-repo-config-resolution.ps1` | port | | -| `-Platform` (`auto`\|`windows`\|`macos`\|`linux`) | `:9-10` | indirectly via `-RepoPath` family tests | port | Drives `Get-CodeIntelPlatform` in `legacy/tools/code-intel-platform.psm1`. | -| `-Mode` (`lite`\|`normal`\|`full`) | `:12-13` | `test-code-evidence-layer.ps1`, `test-primary-launchers.ps1`, `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1` | port | See §1.2 for full semantics. | -| `-Language` | `:15` | none found | port? | Only observed use is composing the advisory `$understandCommand` string (`:3611`); low-risk, `?` because I did not trace every consumer exhaustively. | -| `-ArtifactRoot` | `:17` | widely covered | port | Defaults via `Get-CodeIntelArtifactRoot` (`legacy/tools/code-intel-platform.psm1:98`, reads `CODE_INTEL_ARTIFACT_ROOT`) when empty — see §1.4. | -| `-SentruxPath` | `:18` | `test-code-intel-pipeline.ps1` | port | Scoping path for the sentrux stage; defaults to repo root via `Resolve-ChildPath`. | -| `-RepowiseScopePaths`, `-RepowiseRootFiles` | `:21-22` | `test-repo-config-resolution.ps1` (via the camelCase `repo.json` config keys `repowiseScopePaths`/`repowiseRootFiles`, `:39-40` — config-resolution path, not a direct `-Flag` CLI invocation) | port | | -| `-RepowiseWorkspaceRoot` | `:19` | weak: `test-code-evidence-layer.ps1:53` sets `repowiseWorkspaceRoot = ""` in a fixture object but does not assert on it — a hollow match, treated as effectively uncovered | port | | -| `-RepowiseShadowRoot` | `:20` | none found | port | | -| `-RepowiseTimeoutSeconds`, `-RepowiseProvider`, `-RepowiseModel`, `-RepowiseReasoning` | `:23-26` | **none found** — corrected. An earlier pass of this doc claimed `test-code-intel-provider.ps1`/`test-repowise-adapter-contract.ps1`/`test-repowise-provider-probe-classification.ps1` covered these; verified false: `test-code-intel-provider.ps1` tests the unrelated `legacy/Invoke-RepowiseProviderProbe.ps1` script (confirmed by reading it — its only Repowise-shaped match is the string `"Repowise provider probe is missing"`), and neither of the other two files references `-RepowiseProvider`/`-RepowiseModel`/`-RepowiseReasoning` as literal flags either. The original grep matched substrings of unrelated function names (`Get-RepowiseProviderArgs`, `Normalize-RepowiseProvider`). Left in as an explicit self-correction rather than silently fixed, since a wrong "covered" claim is exactly the failure mode this ticket's verification discipline exists to catch. | port | `RepowiseProvider`/`Model`/`Reasoning` are also resolvable from env vars — see §1.3. | -| `-SkipRepowise` (switch) | `:71`, gate at `:3646` | 5 files (`test-code-evidence-layer.ps1`, `test-code-intel-pipeline.ps1`, `test-primary-launchers.ps1`, `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1`) plus `tests/stable_wrapper_e2e.rs`, which asserts the skip reaches the authoritative doctor policy | port | Skips the entire Repowise stage. | -| `-RepowiseDocs` (switch) | `:72`, effect at `:3174,3396-3423,3502,3674,3743` | `test-code-intel-pipeline.ps1` | port | Selects `anthropic` vs `mock` provider (`:3174`); auto-disabled under several routing conditions (`:3404,3423,3512`) — real decision logic, not a thin flag. | -| `-AllowRepowiseShadowMutation` (switch) | `:73`, gate at `:3660` | none found | port | | -| `-ModelRoutingResult`, `-ModelInventoryResult`, `-ModelExecutableHandle`, `-ModelPromptFile`, `-ModelEndpoint`, `-ModelProtocol`, `-ModelCredentialEnvName`, `-ModelTimeoutSeconds`, `-ModelResponseFormat` | `:27-38` | `test-model-request-synthesis-and-handle.ps1` | shim | Feed the model-request-synthesis early-exit facade (§1.8, block 1) which forwards to `legacy/New-ModelAdapterRequest.ps1` + `legacy/Invoke-ModelChannelDelegate.ps1` (both out of this ticket's scope) and exits. The facade itself is thin; whether the two target scripts are thin is a separate ticket's concern. | -| `-ModelAdapterRequest`, `-ModelAdapterArtifactRoot` | `:39-40` | `test-model-request-synthesis-and-handle.ps1` | shim | Second early-exit facade (§1.8, block 2), forwards to `legacy/Invoke-ModelChannelDelegate.ps1` directly. | -| `-RuntimeCiEvidenceRequest`, `-RuntimeCiEvidenceArtifactRoot` | `:41-42` | `test-runtime-ci-hospital-pet.ps1` | shim | Mid-flow facade (not an early exit) at `:4214-4218`, forwards to `$defaultRustCli`. | -| `-RepowiseAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` | `:43-46` | `test-repowise-adapter-contract.ps1` (request only; `ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` not independently exercised) | shim | Early-exit facade (§1.8, block 3): `& $rustCli provider repowise-adapt ...` then `exit $LASTEXITCODE` (`:151-167`). Already a thin forwarder to Rust. | -| `-GraphAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` | `:47-50` | **none found** | shim | Early-exit facade (§1.8, block 4): `& $rustCli provider graph-adapt ...` (`:169-185`). Untested gap — see §6. | -| `-SentruxAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` | `:51-54` | **none found** | shim | Early-exit facade (§1.8, block 5): `& $rustCli provider sentrux-adapt ...` (`:187-197`). Not to be confused with the separately-tested `-SkipSentruxGate`/check flow — this is a distinct facade. Untested gap. | -| `-CodeNexusAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` | `:55-58` | `test-codenexus-adapter-contract.ps1` (request + `ArtifactRoot`; not independently confirmed for `EvaluatedAt`/`MaxAgeSeconds`) | shim | Early-exit facade (§1.8, block 6): `:199-215`. | -| `-SurvivalScanRequest` | `:59` | **none found** | shim | Early-exit facade (§1.8, block 7): `& $rustCli repository survival-scan ...` (`:217-229`). Untested gap — `legacy/scripts/tests/test-survival-scan-contract.ps1` exists and covers `-SurvivalScanArtifactRoot`, but not `-SurvivalScanRequest` (likely tests the Rust `repository survival-scan` subcommand directly rather than this PS1 facade — see §4.2). | -| `-SurvivalScanArtifactRoot` | `:60` | `test-survival-scan-contract.ps1` | shim | Same facade as above; only this one companion param is exercised. | -| `-RunCommitSourceRoot`/`AuthorityRoot`/`ManifestRef`/`FinalName` | `:61-64` | `tests/run_commit.rs::production_run_commit_cli_restages_a09_refs_through_a06_and_publishes`, `::cli_publication_preserves_the_callers_manifest_bytes_and_digest`; marker shape at `tests/decision_record.rs:318`; admission at `tests/dag_run.rs::production_dag_output_commits_and_enters_the_authoritative_index` and the mutated-marker rejections in `tests/artifact_index.rs:159-182` | shim | Early-exit facade (§1.8, block 8): `& $rustCli run commit ...` (`:231-247`). `test-run-commit-contract.ps1` was deleted once those Rust tests were confirmed to cover every assertion it made; the one assertion not carried over — that the marker lacks the legacy `generatedAt`/`reportSha256` fields — guarded the PowerShell producer, which no longer writes the marker. | -| `-InventoryExclude` (string[]) | `:65` | **none found** | port | Merged with `$defaultInventoryExclude` (`:3239`); feeds `rg` file inventory. | -| `-DagCoordinate` (switch) | `:67`, facade at `:3258-3270` | `tests/dag_run.rs::artifact_root_routes_runs_where_readers_look_and_matches_the_environment_default`, `::out_and_artifact_root_cannot_both_name_the_staging_directory`, `::ungoverned_repository_completes_instead_of_failing_the_architecture_gate`, `::production_run_preserves_doctor_domain_failure_and_completes_unrelated_branches` | shim | `& $rustCli` (DAG coordinate path), `throw`s on non-zero exit rather than propagating — see §1.5. The artifact-path composition this facade owned (`//.dag-staging-`) is now `run dag-coordinate --artifact-root`, which also reads `CODE_INTEL_ARTIFACT_ROOT`. `test-dag-facade.ps1` is off CI but still on disk: `New-PublicationRetirementPacket.ps1:15` executes it as E05's golden-parity evidence, so it can only be deleted when E05 closes. | -| `-SaveSentruxBaseline`, `-AutoSaveMissingSentruxBaseline` (switches) | `:69-70`, effect at `:3836-3852` | **none found** | port | Baseline-save branch of the sentrux gate; copies existing baseline to `.prev.json` before overwrite. | -| `-SkipRepomix` (switch), `-RepomixStyle` (`xml`\|`markdown`\|`json`\|`plain`), `-RepomixCompress` (switch) | `:74-77` | `-SkipRepomix`/`-RepomixCompress`: `test-transactional-publication.ps1`. `-RepomixStyle`: **none found** | shim? | Shells out to the external `repomix` tool (`:3582-3597` area); classified `shim` because the PS1 code appears to just build args and invoke it, but I did not fully trace whether output gets reinterpreted — `?`. | -| `-SkipSentrux` (switch, whole-stage) | `:78`, gate at `:3785` | `test-code-evidence-layer.ps1`, `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1` | port | Mutually exclusive with the `Mode -eq "lite"` skip (`:3773`) — two different code paths produce the same "sentrux skipped" outcome; see §1.3. | -| `-SkipSentruxCheck` (switch) | `:79`, gate at `:3804,3810` | `test-code-intel-pipeline.ps1` | port | Skips just the `sentrux check` sub-step (metrics production); gate below still runs. | -| `-SkipSentruxGate` (switch) | `:80`, gate at `:3824` | `test-code-intel-pipeline.ps1`, `test-sentrux-failure-normalization.ps1` | port | Skips baseline-regression comparison only; independent of `-SkipSentruxCheck`. | -| `-RequireUnderstandGraph` (switch) | `:81`, effect at `:3633,3638,3640` | **none found** (pre-existing; this PR's harness now exercises the *default*, i.e. NOT passing it) | port | Missing `knowledge-graph.json` is fatal (`status=failed`, `exitCode=1`) when set, soft (`manual_required`, `exitCode=0`) when not. | -| `-SkipGitHubResearch` (switch) | `:82` | 5 files pass the flag (`test-code-evidence-layer.ps1`, `test-code-intel-pipeline.ps1`, `test-github-solution-research.ps1`, `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1`) — **but none assert on its effect, because it has none** | **kill-candidate** | **Confirmed dead.** Zero other references to `$SkipGitHubResearch` in the file. `$githubResearch` is unconditionally `New-GitHubSolutionResearchNotApplicable` (`:3919`, stub defined `:684-696`, unconditional regardless of the flag). `Test-GitHubSolutionResearchRequired` (`:531`) is defined but has **zero call sites** anywhere in the file — a second, independent kill-candidate. Not fixed here per the ticket's "record, don't fix" instruction. | -| `-WorkspaceAdd` (switch) | `:83`, gate at `:3755` | **none found** | port | | -| `-SkipOpenSpec` (switch) | `:84`, gate at `:3449` | `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1` | port | **No graceful degradation**: when not skipped, `:3450-3453` hardcodes `$rustCli = $defaultRustCli` (`target/debug/`) and `throw`s if that debug binary is absent — the only one of the `$defaultRustCli` call sites with no fallback. Load-bearing for the parity harness's flag choice (see harness comments). | -| `-AutoOpenSpec` (switch) | `:85`, effect at `:3470` | **none found** | port | | -| `-ProactiveSkillSuggestions` (`auto`\|`enabled`\|`disabled`), `-AutomaticPullRequests` (`auto`\|`ask`\|`enabled`\|`disabled`) | `:86-89`, resolved together at `:3253-3256` via `Resolve-CodeIntelFollowUpSettings` | `legacy/tests/test-follow-up-automation.ps1` — **note the directory**: this is `tests/`, a sibling of `scripts/tests/` that this inventory's primary sweep initially missed (caught by the supplementary automated cross-reference pass, §4). `tests/` holds 5 more PS1 test files: `test-automatic-pull-request-flow.ps1`, `test-automatic-pull-request.ps1`, `test-follow-up-automation.ps1`, `test-model-channel-degraded-pipeline.ps1`, `test-model-channel-delegate.ps1` — none of these were named in the ticket, all are in-scope for §4's cross-reference and now included. | port | Feed `Write-CodeIntelFollowUpPrompt` (`:4714`) and the hospital report's follow-up automation block. | -| `-BugSkill` | `:90` | none found (`legacy/tests/test-follow-up-automation.ps1` covers the other two params in this trio but not this one — confirmed by direct read) | port | | - -#### 1.1.1 Full flat parameter list (for exhaustiveness) - -`Repo, RepoPath, Config, Platform, Mode, Language, ArtifactRoot, SentruxPath, RepowiseWorkspaceRoot, RepowiseShadowRoot, RepowiseScopePaths, RepowiseRootFiles, RepowiseTimeoutSeconds, RepowiseProvider, RepowiseModel, RepowiseReasoning, ModelRoutingResult, ModelInventoryResult, ModelExecutableHandle, ModelPromptFile, ModelEndpoint, ModelProtocol, ModelCredentialEnvName, ModelTimeoutSeconds, ModelResponseFormat, ModelAdapterRequest, ModelAdapterArtifactRoot, RuntimeCiEvidenceRequest, RuntimeCiEvidenceArtifactRoot, RepowiseAdapterRequest, RepowiseAdapterArtifactRoot, RepowiseAdapterEvaluatedAt, RepowiseAdapterMaxAgeSeconds, GraphAdapterRequest, GraphAdapterArtifactRoot, GraphAdapterEvaluatedAt, GraphAdapterMaxAgeSeconds, SentruxAdapterRequest, SentruxAdapterArtifactRoot, SentruxAdapterEvaluatedAt, SentruxAdapterMaxAgeSeconds, CodeNexusAdapterRequest, CodeNexusAdapterArtifactRoot, CodeNexusAdapterEvaluatedAt, CodeNexusAdapterMaxAgeSeconds, SurvivalScanRequest, SurvivalScanArtifactRoot, RunCommitSourceRoot, RunCommitAuthorityRoot, RunCommitManifestRef, RunCommitFinalName, InventoryExclude, DagCoordinate, SaveSentruxBaseline, AutoSaveMissingSentruxBaseline, SkipRepowise, RepowiseDocs, AllowRepowiseShadowMutation, SkipRepomix, RepomixStyle, RepomixCompress, SkipSentrux, SkipSentruxCheck, SkipSentruxGate, RequireUnderstandGraph, SkipGitHubResearch, WorkspaceAdd, SkipOpenSpec, AutoOpenSpec, ProactiveSkillSuggestions, AutomaticPullRequests, BugSkill` -(72 names; counted programmatically from the param block, cross-checked against the grouped table above.) - -### 1.2 `-Mode` semantics - -| behavior | evidence | existing test coverage | classification | notes/gap | -|---|---|---|---|---| -| `Mode = "full"` appends `--full` to the advisory `$understandCommand` string | `:3612-3614` | none isolating this specifically | port | Does not change what gets scanned — only the recommended manual command text. | -| `Mode -ne "lite"` gates Repowise docs (`RepowiseDocs` combination) and the Repowise state/workspace re-check block | `:3674`, `:3719` | `test-code-intel-pipeline.ps1` (indirectly) | port | | -| `Mode -eq "lite"` skips the entire Sentrux stage | `:3773-3784` | `test-runtime-ci-hospital-pet.ps1`, `test-transactional-publication.ps1` pass `-Mode` but I did not confirm any test asserts the lite-mode sentrux-skip specifically — `?` | port | Produces a `steps` entry `{name:"sentrux", status:"skipped", error:""}` distinct from the `-SkipSentrux` path's equivalent entry (`:3785-3797`, `error:"sentrux not found"` wording differs) — two code paths, same externally-visible "skipped" outcome, slightly different metadata. Worth a T2-T5 note. | - -### 1.3 Environment variables consumed directly (`grep '\$env:'`) - -| variable | evidence | direction | existing test coverage | classification | notes/gap | -|---|---|---|---|---|---| -| `PYTHONIOENCODING`, `PYTHONUTF8`, `TERM`, `NO_COLOR`, `RICH_FORCE_TERMINAL` | `:107-111` | write (forced to fixed values, not read) | none found | shim | Console/subprocess encoding hygiene; not behavior-bearing for parity purposes. | -| `CODE_INTEL_SENTRUX_DSM_PROVIDER` (`rust`\|`powershell`) | `:3937-3943` | read | none found | port | Selects the DSM provider preference; `throw`s on any other value. | -| `CODE_INTEL_RUST_CLI` | `:3945-3948` | read | none found | shim | Overrides `$defaultRustCli` **only** for the Sentrux-DSM call site — the other ~9 `$defaultRustCli` call sites (facades, DAG coordinator, OpenSpec, runtime-CI evidence) do **not** consult this variable and always resolve `target/debug/` relative to `$PSScriptRoot`. Load-bearing finding for the parity harness (documented in the harness's own comments). | -| `CODE_INTEL_REPOWISE_PROVIDER`, `REPOWISE_PROVIDER` | `:3180` (via `Resolve-ConfigString -EnvNames`) | read | `test-code-intel-provider.ps1` (uncertain which exact var) | port | | -| `CODE_INTEL_REPOWISE_MODEL`, `REPOWISE_MODEL` | `:3188` | read | as above | port | | -| `CODE_INTEL_REPOWISE_REASONING`, `REPOWISE_REASONING` | `:3195` | read | as above | port | | - -Transitively (not a direct `$env:` reference in this file, but a real -effect on default behavior when the corresponding param is empty): -`CODE_INTEL_ARTIFACT_ROOT` and `CODE_INTEL_SHADOW_ROOT`, read by -`Get-CodeIntelArtifactRoot`/`Get-CodeIntelShadowRoot` in -`legacy/tools/code-intel-platform.psm1:104,118`, called from `Get-DefaultArtifactRoot`/`Get-DefaultShadowRoot` -(`legacy/run-code-intel.ps1:371-377`). Listed for completeness; evidence cell -intentionally points at the module, not this file, since that is where the -`$env:` read actually happens. - -`ModelCredentialEnvName` (`:34`) is a parameter whose **string value names -an env var for a downstream script to read** (`legacy/Invoke-ModelChannelDelegate.ps1`, -out of scope) — this file never reads that named variable itself, it only -forwards the name (`:137`). - -### 1.4 Exit code semantics - -| behavior | evidence | existing test coverage | classification | notes/gap | -|---|---|---|---|---| -| 8 early-exit facades: `exit $LASTEXITCODE` after forwarding to `$defaultRustCli` or `legacy/Invoke-ModelChannelDelegate.ps1` | `:140,148,166,184,196,214,228,246` | see §1.1 per-facade rows | shim | Directly propagates the child process's exit code — no translation. | -| Final success/failure: `exit 1` if `$effectiveFailed.Count -gt 0`, else `exit 0` | `:4715-4723` | `test-code-intel-pipeline.ps1` and most integration tests exercise the success path; failure-path exit code not independently isolated in a dedicated test I found — `?` | port | **Binary only** (0 or 1). No architecture/domain-vs-process distinction. | -| Mid-flow `throw` on subprocess failure (DAG coordinator, workflow recommendation) | `:3268`, `:3455`, `:3478` | `test-dag-facade.ps1` (DAG only) | port | An uncaught `throw` in PowerShell run via `pwsh -File` terminates with a non-zero exit code (observed as `1` in practice) — same binary outcome as the final block, different code path. | -| ~50 other `throw` statements throughout (config/contract validation) | counted programmatically, not individually cited | scattered | port | Not enumerated row-by-row — each is a validation guard (e.g. `:117,122,155,173,191,203,219,235,1857`-adjacent-style contract asserts), not a top-level exit-code contract. Flagged in aggregate; a T2-T5 ticket doing the actual port should re-grep `throw` rather than trust a static count here. | - -**Current parity gap (see §5 for the harness's live measurement):** the -Rust CLI's `code-intel run execute` distinguishes exit code `10` -(architecture/domain gate failure) from `70` (process failure) — documented -in `.github/workflows/ci.yml`'s self-scan step comment. `legacy/run-code-intel.ps1` -has no equivalent split; every failure surfaces as exit `1`. This is a real, -already-observable contract divergence, not a hypothetical one. Note this -is distinct from — and not contradicted by — the fact that codes `10`/`70` -(and the fuller `0,10,20,64,65,69,70,74` outcome matrix) **are** tested -elsewhere: `crates/code-intel-cli/tests/capability_contract.rs` validates -that vocabulary at the schema/contract level against -`docs/adr/0009-atomic-capability-execution-model.md`, for the Rust side's -own atomic-capability model. No test anywhere asserts a **live** -`legacy/run-code-intel.ps1` process actually exiting `10` or `70`, because it -never does — confirmed by this section's own line-cited evidence that its -only exit statements are `exit 1`/`exit 0` (`:4721,4723`) and the -propagated-`$LASTEXITCODE` facades (`:140` etc., which forward whatever -the invoked Rust subcommand returned verbatim — whether those specific -subcommands, `provider repowise-adapt` etc., actually use the same -`10`/`70` vocabulary as `run execute` was not independently confirmed -this session, `?`). Either way, a propagated code is Rust's exit code -passing through unmodified, not legacy/run-code-intel.ps1's own main-flow -contract, which stays binary. - -### 1.5 Artifacts written - -| artifact | evidence | schema cross-ref | existing test coverage | classification | notes/gap | -|---|---|---|---|---|---| -| `/report.json` | `:4178,4694` | no `orchestration/schemas/*.json` file matches this name; closest relative is `code-intel-run-manifest.v1` on the Rust side, but the shapes are unrelated (steps-array vs. DAG-nodes-map) | widely covered | port | The PS1 "overall run" artifact; NOT the same shape as Rust's `run-manifest.json` despite both being "the top-level report" for their respective paths. | -| `/hospital-report.json` | `:4181,4697`, built by `New-CodeIntelHospitalReport` (`:2344-2551`) | `orchestration/schemas/code-intel-hospital.v1.schema.json`; **both** PS1 and Rust claim `schema: "code-intel-hospital.v1"` | `test-hospital-trust-contract.ps1` (decision-logic level, not full-document schema) | port | Top-level shape has already drifted from the Rust producer of the same schema string — see §5. | -| `/summary.md`, `/understanding.md`, `/hospital.md` | `:4179-4182,4695-4698` | none (markdown, not schema'd) | widely covered | port | | -| `/surgery-plan.json` / `.md` (via `Convert-SurgeryPlanToMarkdown`, `New-CodeIntelSurgeryPlan`) | fn defs `:1676-1801` | `code-intel-surgery-plan.v1` (Rust side confirms this name empirically — see §5) | none found isolating this file directly | port | | -| `/sentrux-evolution.json`, `sentrux-hotspots.json`, `sentrux-dsm.json`, `sentrux-what-if.json`, `codenexus-context.json` (paths built around `:3931-4134`) | variable names `sentruxEvolutionPath` etc., confirmed via searchable-terms sweep of the file; exact `Join-Path` lines not individually re-verified for each — `?` | none | none found | port | | -| `/model-assistance-dossier.json` | `:3426` (`$dossierPath`) | `code-intel-model-assistance-dossier.v1.schema.json` | `test-model-request-synthesis-and-handle.ps1` | port | | -| no canonical marker in `` | final promotion block after the staging-path rewrite | compiled `code-intel run execute` exclusively owns `code-intel-run-commit.v1` under the authority root | `test-transactional-publication.ps1` | retired | The PowerShell path atomically promotes a legacy report directory but deliberately does not write `run-complete.json`; its `report.json` and markdown are advisory compatibility output and cannot enter normal index authority. | - -### 1.6 Side effects - -| effect | evidence | classification | notes/gap | -|---|---|---|---| -| Console/subprocess env var mutation (`PYTHONIOENCODING` etc.) | `:107-111` | shim | Process-local, does not escape to the calling shell. | -| In-place text rewrite of any repomix/text-extension file under `$runDir` that contains the staging path, replacing it with the final path post-rename | `:4670-4690` | port | Runs over **every text file in the run directory**, not just known artifacts — a broad, generic find-and-replace. Worth noting for anyone porting this: it is easy to under-scope a Rust reimplementation to "the artifacts we know about" and miss this catch-all. | -| Atomic publish via `[System.IO.Directory]::Move($runDir, $finalRunDir)` | `:4692` | port | PS1's own staging/promote pattern, structurally analogous to (but implemented independently of) the Rust `staged_artifact`/authority-root commit mechanism. | -| `sentrux gate --save` / `sentrux check` invoke the external `sentrux` shim command (`legacy/tools/sentrux-shim/`), which itself may write `.sentrux/baseline.json`, `.sentrux/baseline.prev.json` **inside the scanned repo tree** | `:3799-3852` | port | File placement outside the artifact root — writes land in the repo being scanned, not in `-ArtifactRoot`. Intentional (that's where `.sentrux/` configuration lives), but worth calling out explicitly since it means running this pipeline against a repo mutates that repo. | - -### 1.7 `-Mode`/Skip-flag interaction matrix (condensed) - -Already covered per-flag above; the one non-obvious interaction worth a -dedicated callout: **`-SkipSentrux` and `Mode -eq "lite"` are two -independent code paths that produce the same user-visible "sentrux -skipped" outcome** (`:3773-3784` vs `:3785-3797`) with slightly different -step metadata (`error` field differs). A behavior-preserving Rust port -needs to decide whether to preserve two paths or collapse them — flagged, -not decided, here. - -### 1.8 The eight early-exit facade blocks (`legacy/run-code-intel.ps1:113-247`) - -These are the single most important finding for classification purposes: -**over 10% of this file's externally observable behavior (8 of the file's -distinct entry-point behaviors) is already a thin forwarder to the Rust -CLI**, gated purely by which optional parameter is non-empty: - -| # | trigger param | forwards to | evidence | -|---|---|---|---| -| 1 | `-ModelInventoryResult` (+ Routing/PromptFile/AdapterArtifactRoot) | `legacy/New-ModelAdapterRequest.ps1` then `legacy/Invoke-ModelChannelDelegate.ps1` | `:113-141` | -| 2 | `-ModelAdapterRequest` | `legacy/Invoke-ModelChannelDelegate.ps1` | `:143-149` | -| 3 | `-RepowiseAdapterRequest` | `$rustCli provider repowise-adapt` | `:151-167` | -| 4 | `-GraphAdapterRequest` | `$rustCli provider graph-adapt` | `:169-185` | -| 5 | `-SentruxAdapterRequest` | `$rustCli provider sentrux-adapt` | `:187-197` | -| 6 | `-CodeNexusAdapterRequest` | `$rustCli provider codenexus-adapt` | `:199-215` | -| 7 | `-SurvivalScanRequest` | `$rustCli repository survival-scan` | `:217-229` | -| 8 | `-RunCommitManifestRef` | `$rustCli run commit` | `:231-247` | - -All eight validate required companion params, resolve `$rustCli = -$defaultRustCli` (`target/debug/`, `:103`), `throw` if that binary is -missing, invoke it, and `exit $LASTEXITCODE`. Classification: **shim**, -uniformly — the actual retirement work for these eight is "stop routing -through legacy/run-code-intel.ps1 at all and call `code-intel` directly", not -"port logic to Rust" (the logic already lives there). - -## 2. `legacy/Invoke-SentruxAgentTool.ps1` (3125 lines) - -An 11-operation DSM / git-churn / complexity-metrics engine invoked either -(a) directly (by an agent/user, per its `-Tool` positional dispatch — the -tool names read like MCP-style operations) or (b) programmatically from -`legacy/run-code-intel.ps1` for exactly three operations (`dsm`, `evolution`, -`what_if`; see §1.8-adjacent evidence below). It does **not** implement -shim management, pro activation, or failure normalization (§0). - -### 2.1 `param()` block — 6 parameters - -Full block: `legacy/Invoke-SentruxAgentTool.ps1:3-16`. - -| behavior | evidence | existing test coverage | classification | notes/gap | -|---|---|---|---|---| -| `-Tool` (mandatory, positional 0, `ValidateSet` of 15 values) | `:4-6` | 3 files reference the script by name (`test-code-intel-pipeline.ps1`, `test-regression-fixes.ps1`, `test-sentrux-failure-normalization.ps1`); exact per-operation breakdown not independently confirmed for each — `?` | port | See §2.2 for the 15-value → 11-operation normalization. | -| `-Path` (positional 1, default `"."`) | `:8-9` | as above | port | | -| `-SessionId` | `:11` | as above | port | | -| `-Recent` (int, default 10) | `:12` | none isolated | port | Session-history window for `evolution`. | -| `-Platform` (`auto`\|`windows`\|`macos`\|`linux`) | `:13-14` | none isolated | port | | -| `-PollutionExclusions` (string[]) | `:15` | **none found** | port | Feeds `Get-PollutionSignals` (`:293-347`). | - -### 2.2 `-Tool` dispatch — 15 accepted values, 11 distinct operations - -`sentrux_*`-prefixed values are aliases, stripped by -`$normalizedTool = if ($Tool.StartsWith("sentrux_")) {...}` (`:3107`) -before the `switch` at `:3108-3123`. - -**Coverage-detection gotcha, caught by the supplementary automated -cross-reference (§4) and independently re-verified here**: `-Tool`/`-Path` -are `[Parameter(Position=0/1)]`-bound (`:4,8`), so real call sites invoke -this script positionally — `& $sentruxAgentTool dsm $targetPath` -(`legacy/run-code-intel.ps1:3995` is a real example of this exact shape) — and -**never** write a literal `-Tool "dsm"` string. A naive grep for quoted -tool-value strings (`'dsm'`, `'health'`, ...) finds nothing even where -real coverage exists, because the value appears as a bare unquoted -positional token. Precise coverage below was re-derived by reading actual -call sites, not by trusting either the naive grep or the cross-reference -pass blindly. - -| operation | evidence | rust equivalent? | existing test coverage | classification | notes/gap | -|---|---|---|---|---|---| -| `dsm` (+ `sentrux_dsm`) | `:3116-3119`, fn `Invoke-DsmTool:2292-2334` | **yes, partially** — `legacy/run-code-intel.ps1:3952` prefers `$rustCli sentrux dsm` and falls back to this PS1 tool only when the rust binary is absent or `CODE_INTEL_SENTRUX_DSM_PROVIDER=powershell` | `test-code-intel-pipeline.ps1:389`, `test-regression-fixes.ps1:250` (positional invocation + `Assert-Equal "dsm" $dsm.tool`) | port? | Marked `?`: this is simultaneously "the fallback implementation for an already-ported operation" and "900+ lines of real, non-thin logic" — whether T2-T5 should delete it (once the rust path is trusted) or keep porting parity into it is a product decision, not something this inventory can resolve. | -| `health` (+ `sentrux_health`) | `:3110`, fn `:468-491` | unknown — not independently verified | `test-code-intel-pipeline.ps1:385` (positional) | port | | -| `git_stats` (+ `sentrux_git_stats`) | `:3120`, fn `Invoke-GitStatsTool:2398-2518` | unknown | `test-code-intel-pipeline.ps1:396` (positional, as `sentrux_git_stats`) | port | | -| `scan` (+ `sentrux_scan` alias, `rescan`) | `:3109,3113`, fn `Invoke-ScanTool:434-467` | unknown | **none found** | port | | -| `session_start` | `:3111`, fn `:492-514` | n/a (session bookkeeping) | **none found** | port | Writes `.sentrux/agent-sessions/*.start.json` inside the **scanned repo**, not an artifact root — see §2.4. | -| `session_end` | `:3112`, fn `:515-583` | n/a | **none found** | port | | -| `check_rules` | `:3114`, fn `:584-615` | unknown | **none found** | port | | -| `test_gaps` (+ `sentrux_test_gaps`) | `:3121`, fn `Invoke-TestGapsTool:2347-2397` | unknown | **none found** | port | | -| `what_if` | `:3122`, fn `Invoke-WhatIfTool:2897-3058` | **no** — confirmed: `legacy/run-code-intel.ps1:4128` calls `& $sentruxAgentTool what_if` unconditionally, with no rust-preference branch analogous to the `dsm` one | **none found** | port | Concrete, evidenced gap: this operation has no rust counterpart today, and no test isolates it. | -| `evolution` | `:3115` (top dispatch) / `:4109` (called from legacy/run-code-intel.ps1) | **no** — same unconditional-call evidence as `what_if` (`legacy/run-code-intel.ps1:4109`) | **none found** | port | | - -Net: **3 of 11 operations** (`dsm`, `health`, `git_stats`) have direct -per-operation test coverage; the remaining 8 have none isolated (the file -is still exercised as a whole by the 3 files noted in §2.1, just not per -`-Tool` value). - -### 2.3 Environment variables / exit codes - -| behavior | evidence | classification | notes/gap | -|---|---|---|---| -| `$env:PYTHONIOENCODING`, `$env:PYTHONUTF8`, `$env:NO_COLOR` — writes only | `:23-25` | shim | Same console-hygiene pattern as `legacy/run-code-intel.ps1`; no reads at all in this file (`grep GetEnvironmentVariable` = 0 matches). | -| Exit codes: **none set explicitly anywhere in the file** (`grep -i '\bexit\b'` = 0 matches) | whole-file negative result | port | Relies entirely on PowerShell's implicit behavior: normal completion of the final `$result \| ConvertTo-Json -Depth 14` (`:3125`) → exit 0; an uncaught `throw` anywhere upstream → non-zero (observed as 1). No custom exit-code contract to preserve beyond "0 on success". | - -### 2.4 Artifacts / side effects - -| behavior | evidence | classification | notes/gap | -|---|---|---|---| -| Reads `/.sentrux/baseline.json`, `/.sentrux/rules.toml` | `:207,440-441,530,587,2719` | port | Same config files `legacy/run-code-intel.ps1`'s sentrux stage reads — shared contract surface between the two monoliths. | -| Writes `/.sentrux/agent-sessions/*.start.json` / presumably `*.end.json` | `Get-SessionDir:348-352`, `Write-JsonFile:370-380` | port | **Side effect outside any artifact root** — writes land inside the scanned repository itself, same pattern as §1.6's sentrux-baseline note. | -| Final stdout: `$result \| ConvertTo-Json -Depth 14` | `:3125` | port | No file write for the primary tool result itself — it is a stdout-only tool; callers (including `legacy/run-code-intel.ps1`) capture and redirect it. | - -## 3. `legacy/tools/sentrux-shim/*.ps1` (light pass — the real shim/pro-activation surface) - -Not one of the two ticket-named files; included because §0's correction -means the "shim management + pro activation" framing genuinely describes -this pair of files, and a contract inventory that silently drops the -behavior the ticket asked for (just because it named the wrong file) would -be a worse deliverable than a short, clearly-scoped extra section. -`sentrux-shim.ps1` = 339 lines, `sentrux-lite-core.ps1` = 567 lines (906 -total — small enough for a light pass, not a full second monolith -inventory). - -| behavior | evidence | existing test coverage | classification | notes/gap | -|---|---|---|---|---| -| Core-binary resolution order: `$env:SENTRUX_CORE_EXE` override → `sentrux-core.exe` next to the shim → `sentrux.exe`/`sentrux-core.exe` in the parent dir → PowerShell `sentrux-lite-core.ps1` fallback | `sentrux-shim.ps1:195-282` (`Resolve-Core`, `Invoke-Core`) | `test-regression-fixes.ps1` references `sentrux-shim`/`sentrux-lite-core` by name; exact assertions not enumerated here — `?` | shim | `SENTRUX_CORE_EXE` is a **new env var** not previously listed in either monolith's inventory — genuinely lives only here. | -| `Test-CodeIntelThinForwarderCandidate` — refuses to treat a directory as a "real core" location unless it has both a sibling `repo.json` and `sentrux-shim.ps1`, specifically to prevent recursive PATH resolution | `sentrux-shim.ps1:176-193` | as above | shim | This function's own docstring-comment explicitly invokes the "thin forwarder" concept the ticket asked about — the clearest piece of evidence that shim-thinness is a deliberate, documented design constraint in this file, not an accident. | -| `sentrux pro` subcommand: `Show-ProStatus`, `Write-License`, `Deactivate-Pro`, `Show-ProHelp`, `Get-LicensePath`, `Get-AutoDisabledPath`, `Clear-AutoDisabled`, `Ensure-AutoActivation` | `sentrux-shim.ps1:23-165,285-` (dispatch on `$RemainingArgs[0] -eq "pro"`, `:285`) | as above | port | Pro license lifecycle — not exercised by this ticket's parity harness (no `sentrux pro` invocation in the T1 scope). | -| `sentrux-lite-core.ps1` (567 lines) | not individually read this session beyond confirming its role as `Invoke-Core`'s fallback (`sentrux-shim.ps1:276-280`) | `test-regression-fixes.ps1` (per name reference) | port? | Flagged `?` — genuinely out of budget for this pass; a dedicated light-pass ticket on `legacy/tools/sentrux-shim/*` would be reasonable follow-up scope, not assumed here. | - -## 4. Test coverage cross-reference (`scripts/tests/*.ps1` [51 files] + `tests/*.ps1` [5 files]) - -Methodology: literal grep of each behavior identifier (parameter name, -tool-operation name, env var name), run this session, **in two passes**: -a manual sweep (scoped to `scripts/tests/*.ps1`, matching the ticket's own -"`scripts/tests/*.ps1` 50+ 套" framing) plus a supplementary automated -cross-reference sub-agent that additionally searched a sibling `tests/` -directory (5 more PS1 files, not mentioned in the ticket, holding real -coverage the manual pass would otherwise have missed and mis-reported as -gaps — `legacy/tests/test-follow-up-automation.ps1` in particular). The two -passes disagreed on several rows; every disagreement was re-verified -directly against the actual test file content (not just trusted from -either pass) before being written into §1-§3. One disagreement traced to -a genuine error in the manual pass's own grep (a substring false-positive -on `-RepowiseProvider` matching unrelated function names -`Get-RepowiseProviderArgs`/`Normalize-RepowiseProvider`) — corrected in -§1.1 rather than silently smoothed over, per the same verification -discipline this whole document is built on. See evidence cells above, -which cite the covering file(s) per-behavior rather than repeating a -separate master table here. - -### 4.1 Coverage summary - -Counted programmatically from the tables in §1-§3 after the corrections -above (not estimated): - -| | rows | fully covered | zero coverage | partial | -|---|---|---|---|---| -| `legacy/run-code-intel.ps1` (§1.1-1.6) | 62 | 43 | 15 | 4 | -| `legacy/Invoke-SentruxAgentTool.ps1` (§2.1-2.4) | 21 | 13 | 8 | 0 | -| `legacy/tools/sentrux-shim/*.ps1` (§3) | 4 | 4 (see `?`-hedged caveats inline) | 0 | 0 | -| **Total** | **87** | **60** | **23** | **4** | - -For `legacy/Invoke-SentruxAgentTool.ps1` specifically: of its 11 `-Tool` -operations, only **3** (`dsm`, `health`, `git_stats`) have per-operation -coverage — found only after discovering the operations are invoked -**positionally**, not as `-Tool "value"` flags, which is why a naive -grep for quoted tool-value strings found nothing (§2.2 documents this -explicitly). The other 8 operations, and `-PollutionExclusions`, have no -coverage at any granularity. - -### 4.2 Gaps (zero test coverage found) and a proposed minimal test each - -Per the ticket: this is an inventory of gaps, not new tests written in -this PR (none of these are "trivially small" enough to justify bundling -into a docs+harness PR). - -| gap | proposed minimal test | -|---|---| -| `-GraphAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` facade (`:169-185`) | New `test-graph-adapter-contract.ps1` mirroring `test-repowise-adapter-contract.ps1`'s shape: invoke with a minimal valid request JSON, assert `exit $LASTEXITCODE` matches the underlying `code-intel provider graph-adapt` call. | -| `-SentruxAdapterRequest`/`ArtifactRoot`/`EvaluatedAt`/`MaxAgeSeconds` facade (`:187-197`) | Same pattern, `test-sentrux-adapter-contract.ps1`. | -| `-SurvivalScanRequest` facade (`:217-229`, companion `-SurvivalScanArtifactRoot` IS covered) | `legacy/scripts/tests/test-survival-scan-contract.ps1` already exists and covers the companion param — extend it with a `-SurvivalScanRequest` case rather than write a new file. | -| `-RequireUnderstandGraph` (`:3633-3640`) | Extend `test-code-intel-pipeline.ps1` (or a new small file) with two cases: knowledge-graph missing + flag set → assert `exit 1`; missing + flag unset → assert `exit 0` and `manual_required` in the report. | -| `-SaveSentruxBaseline` / `-AutoSaveMissingSentruxBaseline` (`:3836-3852`) | New small test asserting `.sentrux/baseline.prev.json` is written before overwrite when a prior baseline exists. | -| `-WorkspaceAdd` (`:3755`) | Needs a scoped-Repowise fixture; out of budget to design here — flagged only. | -| `-AutoOpenSpec` (`:3470`) | Small test asserting the `options.auto` boolean in the OpenSpec request payload reflects the switch. | -| `-InventoryExclude` (`:3239`) | Small test asserting excluded globs are absent from `inventory.rg/files.txt`-equivalent output. | -| `-BugSkill` (`:90,3253-3256`) — `-ProactiveSkillSuggestions`/`-AutomaticPullRequests` are covered by `legacy/tests/test-follow-up-automation.ps1`, this one is not | Extend that same file with a `-BugSkill` case asserting it lands in the hospital report's follow-up block. | -| `-RepowiseShadowRoot` (`:20`) — its siblings `-RepowiseScopePaths`/`-RepowiseRootFiles` are covered via config-resolution, `-RepowiseWorkspaceRoot` is weakly represented | Small test extending `test-repo-config-resolution.ps1`'s pattern with a `repowiseShadowRoot` config key. | -| `-RepowiseProvider` / `-RepowiseModel` / `-RepowiseReasoning` (`:24-26`) — corrected gap, see §1.1's self-correction note | New test invoking `legacy/run-code-intel.ps1` with each flag set and a mock/no-op provider, asserting the resolved provider/model/reasoning appear in the run's Repowise stage output. The env-var override path (`CODE_INTEL_REPOWISE_PROVIDER` etc., §1.3) is an equally-uncovered adjacent gap worth folding into the same test. | -| `-RepomixStyle` (as distinct from the already-covered `-SkipRepomix`/`-RepomixCompress`) | Small test asserting the `--style` arg passed to the external `repomix` tool matches the parameter. | -| `-Language` | Low priority (advisory-string-only effect per §1.1) — a test would mostly assert string composition, low value. | -| legacy/Invoke-SentruxAgentTool.ps1 `-PollutionExclusions` | Small test asserting a pattern in this list suppresses the corresponding `Get-PollutionSignals` finding. | -| legacy/Invoke-SentruxAgentTool.ps1 8 of 11 `-Tool` operations (`scan`, `session_start`, `session_end`, `check_rules`, `test_gaps`, `what_if`, `evolution`, and the `sentrux_scan`/`sentrux_health`/`rescan` aliases) — `dsm`, `health`, `git_stats` are covered (§2.2) | Would mean adding positional invocations (`& $tool $path`, matching the real call shape — see §2.2's coverage-detection gotcha) to an existing suite or a new one. `what_if`/`evolution` are the highest-value pair to close first since they're also the two operations confirmed to have no Rust equivalent yet. | -| `legacy/tools/sentrux-shim/sentrux-shim.ps1`'s `sentrux pro` subcommand | New `test-sentrux-pro-activation.ps1`: exercise `Show-ProStatus`/`Write-License`/`Deactivate-Pro` against a temp `HOME`-scoped license path. | - -## 5. Current parity status (harness run, this session) - -Ran `legacy/scripts/tests/test-ps1-rust-parity.ps1` **twice**, back to back, both -against the current worktree HEAD, both against a freshly-built -`target/release/code-intel.exe` (`cargo build -p code-intel --release ---locked` — confirmed the lockfile is in sync, `--locked` succeeds). The -two runs' JSON verdicts are **byte-for-byte identical** (`diff` reported -no differences), confirming the harness is deterministic in its verdict -after volatile-field normalization. - -**A third, independent confirmation came for free from CI itself.** The -first real run of `.github/workflows/parity-observe.yml` on this PR (a -genuinely fresh `windows-latest` runner, not this dev box) had no `rg` on -PATH — a real environment difference this local session could not have -produced. Both paths failed early (`rustExitCode: 65` — "cannot launch -rg.exe: program not found"; `ps1ExitCode: 1` — `legacy/run-code-intel.ps1:3499`, -`throw "Missing required tool: rg"`). The harness **did not crash**: it -produced a coherent, correctly-degenerate verdict -(`rustArtifactsFound`/`ps1ArtifactsFound` all `false`, `compared: 6`, -`matched: 5`, one real divergence for the two null-shaped hospital-verdict -objects), wrote it, and the workflow uploaded it — validating the -tolerant-of-missing-artifacts design worked exactly as intended under a -real failure this session's own local runs never exercised. Root cause -was a genuine gap in `parity-observe.yml` (missing the same "Install -ripgrep" step `ci.yml` already has for its own jobs) — fixed in a -follow-up commit; not a harness bug. - -```json -{ - "schema": "code-intel-ps1-rust-parity-verdict.v1", - "ok": false, - "compared": 17, - "matched": 4, - "rustExitCode": 0, - "ps1ExitCode": 0, - "rustArtifactsFound": { "runManifest": true, "hospitalReport": true, "sentruxPayload": true }, - "ps1ArtifactsFound": { "runDir": true, "report": true, "hospitalReport": true }, - "diverged": [ - { "label": "nodes.rust-only.diagnosis.hospital", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.rust-only.doctor", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.rust-only.evidence.graph", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.rust-only.evidence.native-code", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.rust-only.inventory.rg", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.rust-only.repo.snapshot", "reason": "Rust DAG node with no evidenced PS1 step counterpart at T1" }, - { "label": "nodes.ps1-only.git status", "reason": "PS1 step with no evidenced Rust node counterpart at T1" }, - { "label": "nodes.ps1-only.node lint hygiene", "reason": "PS1 step with no evidenced Rust node counterpart at T1" }, - { "label": "nodes.ps1-only.rg file inventory", "reason": "PS1 step with no evidenced Rust node counterpart at T1" }, - { "label": "nodes.ps1-only.sentrux gate", "reason": "PS1 step with no evidenced Rust node counterpart at T1" }, - { "label": "nodes.ps1-only.understand graph", "reason": "PS1 step with no evidenced Rust node counterpart at T1" }, - { "label": "hospital.state_machine.current_state", "rust": "post_op", "ps1": "diagnose" }, - { "label": "hospital.verdict_shape", "rust": "{domainVerdict:pass, impression:'clean snapshot', risk:green}", "ps1": "{status:amber, primary_diagnosis:'architecture graph missing', overall_score:54}" } - ] -} -``` - -(Full verdict, including the exact `New-Comparison`-normalized JSON -strings, is reproducible by running the harness; abbreviated here for -readability — no divergence entry was cut, only the redundant per-entry -`rust`/`ps1`/`reason` JSON-string escaping was trimmed for this table.) - -**Interpretation** (this is what the harness is *for* — observing, not -judging): - -1. **Node/step vocabularies are completely disjoint except one pairing.** - The only stage this harness can currently assert a real evidenced - pairing for — `evidence.sentrux` (Rust) ↔ `sentrux check` (PS1) — - **matched** (does not appear in `diverged`). Every other Rust DAG node - (`diagnosis.hospital`, `doctor`, `evidence.graph`, - `evidence.native-code`, `inventory.rg`, `repo.snapshot`) and every - other PS1 step (`git status`, `node lint hygiene`, `rg file inventory`, - `sentrux gate`, `understand graph`) has no asserted counterpart. This - is expected at T1 — establishing those pairings (or documenting that - some genuinely have none) is T2-T5 work. -2. **Hospital state machine disagrees on real data.** Rust lands in - `post_op` (clean snapshot, `domainVerdict: pass`); PS1 lands in - `diagnose` (`primary_diagnosis: "architecture graph missing"`, - `overall_score: 54`, `status: amber`). Root cause, evidenced: this - worktree has no `.understand-anything/knowledge-graph.json` (confirmed - absent — `test -f` returned false during this session), and PS1's - hospital-decision logic treats that as diagnostically significant - (`New-HospitalAdmissionReason`/`New-HospitalDecisionBlock`, not - individually re-cited here) while the Rust - `architecture-graph.internal` evidence provider apparently does not - route a missing graph to the same failure mode. This is a genuine, - concrete behavior gap — not a harness artifact — and is exactly the - kind of finding T1 exists to surface. -3. **Both processes completed successfully** (`rustExitCode: 0`, - `ps1ExitCode: 0`) — the divergence is in artifact *content*, not - process failure. That both paths ran clean end-to-end against this - repository's own snapshot is itself a useful T1 data point. -4. **`ok: false` is the expected result right now**, which is exactly why - `.github/workflows/parity-observe.yml` is `continue-on-error` at both - the job and step level — a passing harness today would be more - surprising than this result. - -## 6. Classification tallies - -Counted programmatically from the actual `classification` column values -across every table in §1-§3 (a script pass over this file's own markdown, -not a manual estimate — the first draft of this section under-counted by -manually guessing while writing, which is exactly the kind of error this -ticket's verification discipline exists to catch; corrected before -landing): - -| classification | count | includes | -|---|---|---| -| `port` | 64 | Core pipeline orchestration logic in both files: hospital/report construction, sentrux stage glue, repowise stage glue, follow-up automation, code-evidence layer, most DSM/evolution/what-if/git-stats/test-gaps/scan/health/session tool operations, sentrux-shim pro-activation lifecycle, most individual params in the §1.1 flat grouping. | -| `shim` | 18 | The 8 early-exit facades in legacy/run-code-intel.ps1 (§1.8) plus their env-var/model-channel counterparts, the Sentrux-DSM rust/powershell provider switch, console-encoding env writes (both files), sentrux-shim's core-binary resolution + thin-forwarder guard. | -| `kill-candidate` | 1 | The `-SkipGitHubResearch` row — which documents **two** independently-dead symbols (the param itself, and `Test-GitHubSolutionResearchRequired`, a function with zero call sites) as one classified behavior, since both die together for the same reason. | -| `port?` / `shim?` (uncertain, reasoning given inline) | 4 | `-Language` effect scope (port?), repomix shim-vs-port framing (shim?), the `dsm` tool operation's port-vs-delete framing (port?), `sentrux-lite-core.ps1`'s own classification (port?). | - -87 rows carry a classification value in total (row count grew from an -earlier 83 after §4's coverage corrections split a few grouped rows — -e.g. the Repowise workspace/scope/root-files/shadow quartet — into -per-param rows once their coverage turned out to differ per param, not -uniformly across the group). This underscores the §1.8 finding: `shim` -(18) is not a small residual category — a meaningful slice of -`legacy/run-code-intel.ps1`'s parameter surface is already-thin forwarding, and -the campaign's retirement work for that slice is routing-away, not -porting. - -## 7. Gaps and known issues - -Recorded per the ticket's instruction ("If you find an actual BUG while -inventorying, record it in the doc's gap section — do not fix it here"). - -1. **`-SkipGitHubResearch` is dead code.** See §1.1 and §6. Confirmed via: - zero other references to `$SkipGitHubResearch` in the file; - `$githubResearch` unconditionally set to a hardcoded "not applicable" - stub at `:3919` regardless of the flag; `Test-GitHubSolutionResearchRequired` - (`:531`) has zero call sites. -2. **Legacy publication is intentionally non-authoritative.** PowerShell still promotes its - staging report directory atomically, but it no longer writes a report-digest - `run-complete.json`. The compiled `code-intel run execute` controller is the only producer of - the canonical marker under `///run-complete.json`; consumers - must not infer authority from the presence of a legacy `report.json`. -3. **`$defaultRustCli` inconsistency.** Of the ~11 call sites that resolve - `target/debug/`, only one (Sentrux DSM, `:3945-3948`) honors - `$env:CODE_INTEL_RUST_CLI`; the rest hardcode the debug-build path with - no override and, in the `-SkipOpenSpec`-gated case (`:3450-3453`), no - graceful fallback either — a bare `throw`. Not fixed here (constraints - forbid editing this file); documented so T2-T5 doesn't have to - rediscover it, and because it directly shaped this harness's own flag - choices (see the harness's inline comments). -4. **Two independent code paths produce the same "sentrux skipped" - outcome** (`Mode -eq "lite"` at `:3773` vs. `-SkipSentrux` at `:3785`) - with slightly different `error` field text. Flagged in §1.7. -5. **Hospital top-level shape has already drifted between the two - `code-intel-hospital.v1` producers** (§5, finding 2) — PS1 nests its - verdict under `triage`, Rust nests it under `diagnosis` + - `domainVerdict`. Both claim the same schema string. This is the - single highest-value finding for whoever picks up the hospital-report - port ticket: the schema name is not currently a reliable guarantee of - shape compatibility between the two implementations. diff --git a/docs/ps1-exit/t2-dot-source-parity-map.md b/docs/ps1-exit/t2-dot-source-parity-map.md deleted file mode 100644 index 104d8cc1..00000000 --- a/docs/ps1-exit/t2-dot-source-parity-map.md +++ /dev/null @@ -1,142 +0,0 @@ -# T2 step 4: dot-source parity map (issue #47) - -The evidence the classification document said was required before any -PowerShell deletion: - -> "a Rust suite exists" is not by itself evidence that a specific assertion -> survives. Treat any PowerShell case with no Rust counterpart as a gap to -> close before the file is deleted, not after. -> -> — [t2-launcher-classification.md](t2-launcher-classification.md) §0 - -That verification is now done, and **it overturns the working assumption for -about half the surface.** Measured against `5065482`. - -## Result - -| dot-sourced group | functions | Rust counterpart | verdict | -|---|---|---|---| -| code-evidence symbol extraction | 9 | `native_code_evidence.rs` | genuinely duplicated — retire | -| sentrux gate metric deltas | 3 | `sentrux_gate.rs` | genuinely duplicated — retire | -| hospital state machine / diagnosis | ~5 | `hospital_diagnosis.rs` | genuinely duplicated — retire | -| **hospital scoring / measurements** | **~7** | arithmetic ported to `hospital_score.rs`; not wired, inputs incomplete | **integration gap, see §3** | - -## 1. Code-evidence symbol extraction — duplicated - -`New-CodeEvidenceNativeSymbol`, `Get-CodeEvidencePowerShellSymbol`, -`Get-CodeEvidencePythonSymbol`, `Get-CodeEvidenceJavaScriptSymbol`, -`Get-CodeEvidenceRustSymbol`, `Get-CodeEvidenceGoSymbol`, -`Get-CodeEvidenceJavaSymbol`, `Get-CodeEvidenceSymbolCandidate`, -`Get-CodeEvidenceSymbols`. - -Evidence the Rust owner covers the same ground: - -- `native_code_evidence.rs` handles every extension the PowerShell set does - and more: `ps1, psm1, py, rs, go, ts, tsx, js, jsx, mjs, cjs, java, cs`. -- It runs in production as the `evidence.native-code` DAG node; the live - self-scan of this repository emits 2993 symbols through it. -- `tests/native_code_evidence.rs` carries an explicit legacy-parity case, - `a01_a09_artifacts_match_the_real_legacy_producer_on_the_same_fixture`, - plus cases for unsupported languages, binary files and non-UTF-8 source - that the PowerShell suite does not have. - -Retiring these loses nothing and removes a second implementation of symbol -extraction that nobody runs. - -## 2. Sentrux gate metric deltas — duplicated - -`New-SentruxMetricDelta`, `Test-SentruxGateNoDegradation`, -`Resolve-SentruxMetricRegressions`. - -`sentrux_gate.rs` (1080 lines) computes the same four gated metrics and is -exercised on every CI run and every local `code-intel sentrux gate .` — this -campaign has been gated by it repeatedly, including two god-file regressions -it caught. Production use is stronger evidence than a unit test here. - -## 3. Hospital scoring — was NOT duplicated, and this is the finding - -`Get-StepScore`, `New-HospitalMeasurements`, `Get-ImportResolutionScore`, -`Get-SourceCoverageScore`, `New-HospitalScoreBlock`, `Read-HospitalArtifacts`, -`Read-HospitalArtifactFile`. - -**Status after this change:** the arithmetic is now ported to -`crates/code-intel-cli/src/hospital_score.rs` and verified value-for-value -against the PowerShell originals (dot-sourced and executed, not read). What -remains is *integration*, not translation — the launcher is not wired to it, -and several score inputs still have no Rust producer (§3.2). Until that lands, -the emitted report is unchanged and still carries nulls. - -The measurement that made this a finding rather than a de-duplication, taken -before the port on the same repository at the same commit: - -| field | PowerShell producer | Rust producer | -|---|---|---| -| `triage.overall_score` | `46` | `null` | -| `report_quality.overall_score` | `46` | `null` | -| `report_quality.diagnostic_score` | `50` | `null` | -| `report_quality.governance_score` | `33` | `null` | -| `report_quality.dimensions` | populated (e.g. `source_coverage`) | `[]` | - -`hospital_diagnosis.rs:410,425` hardcodes those nulls. It is not a TODO and -not a failure path — the fields are emitted with the legacy names and no -values, which `docs/hospital-diagnosis.md` describes as preserving "the legacy -stable fields used by existing readers". - -Nine of the sixteen PowerShell hospital test cases exist to pin this scoring -behaviour: - -- missing surgery target is unresolved -- missing current hotspot is unresolved -- known changed hotspot retains resolved behavior -- unknown import, pollution, and source coverage are explicit zero-confidence evidence -- known complete measurements retain pass scores -- known negative and partial measurements retain evidence-driven scores -- manual and skipped steps are unknown and receive zero confidence -- known modality artifacts retain established scores and explicit status -- deleted and corrupt modality artifacts remain zero-confidence - -Deleting them would not be de-duplication. It would delete the only test -coverage of behaviour that exists in exactly one place. - -The remaining seven cases — gate failure, unknown check, clean-gate green, -discharge evidence, missing structural summaries, provider quota, structural -completeness wiring — map onto -`precedence_matrix_matches_the_legacy_stable_diagnoses_and_fails_closed`, -`provider_quota_precedes_missing_current_graph_and_is_replay_stable`, and the -`structural_evidence_*` unit tests added in `d029b3f`. `?` on -"discharge requires affirmative resolved post-op target evidence": the Rust -ladder ends at `post_op` and no test names `discharge_ready`, so this one may -be a second, smaller gap. It needs its own check before deletion. - -### 3.2 What still blocks wiring - -The arithmetic is complete; roughly half its inputs are not produced by any -Rust node: - -| score dimension | input | Rust producer | -|---|---|---| -| governance (rules / gate / check) | structural signals | present | -| graph | architecture graph admission | present | -| source coverage | inventory file count, scan file count | present (`inventory.rg`, sentrux payload) | -| import resolution | resolved / unresolved import counts | present (sentrux payload) | -| pollution | DSM `scope.excluded_files` | **absent** — DSM is a PowerShell tool operation, T5 (#50) | -| MRI | CodeNexus context | **absent** | -| PET | runtime CI health, or what-if + evolution | **absent** | -| memory | repowise step result | **absent from the default DAG** | - -Wiring the arithmetic to inputs that do not exist would publish confidently -wrong numbers. `0` in this scheme means *observed and absent*, not *never -attempted* — the same distinction `d029b3f` drew for structural evidence, and -the reason `hospital_score.rs` ships unwired behind `allow(dead_code)`. - -## 4. Product decision (settled) - -Whether hospital scoring survives was not answerable from the code, so it was -escalated rather than guessed. **Decision: it survives** — the scoring is real -product behaviour, so it ports to Rust and the nine PowerShell test cases port -with it, rather than the null fields becoming the intended contract. - -Consequence for T2's exit criteria: `run-code-intel.ps1` cannot reach ≤50 -lines until the wiring in §3.2 lands, because the scoring engine has to stay -somewhere until Rust can produce the same numbers. The twelve genuinely -duplicated functions in §1 and §2 are unblocked and can retire first. diff --git a/docs/ps1-exit/t2-launcher-classification.md b/docs/ps1-exit/t2-launcher-classification.md deleted file mode 100644 index 6b299ca9..00000000 --- a/docs/ps1-exit/t2-launcher-classification.md +++ /dev/null @@ -1,237 +0,0 @@ -# T2 launcher classification (issue #47) - -Status: historical classification; the compiled Rust authority described below is implemented. - -This document preserves measurements and retirement reasoning from `origin/main` at `02f0444`. -Statements phrased as “today”, “current”, or “to port” describe that historical checkpoint, not -the living runtime contract. The current production path is `code-intel run execute`; retained -PowerShell is compatibility/advisory only and does not create repository-run authority. - -Working document for retiring `legacy/run-code-intel.ps1` (4742 lines, 90 -function definitions, 72 parameters) into `code-intel run` plus a ≤50-line -thin forwarder. - -Every claim below is a measurement taken against `origin/main` at -`02f0444`, not an estimate. Uncertain rows are marked `?` with the reason, -following the T1 discipline in [contract-inventory.md](contract-inventory.md). - -## 0. The blocker T1 did not name - -`run-code-intel.ps1` is not only an entry point. It is also a **function -library that two PowerShell test suites dot-source out of**, via -`Get-ScriptFunctionsSource -Path .../run-code-intel.ps1 -Only @(...)`: - -| test file | functions pulled | subject | -|---|---|---| -| `legacy/scripts/tests/test-hospital-trust-contract.ps1` | 18 | hospital state machine, diagnosis, scoring | -| `legacy/scripts/tests/test-regression-fixes.ps1` | 9 | code-evidence symbol extraction (6 languages) | -| `legacy/scripts/tests/test-regression-fixes.ps1` | 3 | sentrux gate metric deltas / no-degradation | -| `legacy/scripts/tests/test-regression-fixes.ps1` | 4 | hospital state machine + surgery target | - -34 function references in total. **Shrinking the launcher to a forwarder -deletes the subject of those tests.** No amount of parameter forwarding -avoids this: the tests reach past the parameter surface into the file body. - -This is why the ticket's exit criterion (`≤50 lines`) cannot be met by -routing alone, and why T2 necessarily touches test assets that the campaign -map assigns to T7. - -### Why retiring them is safe rather than a coverage loss - -Both subjects already have native implementations with their own integration -suites on the Rust side: - -| PowerShell subject | Rust owner | Rust test suite | -|---|---|---| -| hospital state machine / diagnosis / scoring | `crates/code-intel-cli/src/hospital_diagnosis.rs` (558 lines) | `tests/hospital_diagnosis.rs` — 978 lines, 10 tests | -| code-evidence symbol extraction | `crates/code-intel-cli/src/native_code_evidence.rs` (718 lines) | `tests/native_code_evidence.rs` — 511 lines, 6 tests | -| sentrux gate metric deltas | `crates/code-intel-cli/src/sentrux_gate.rs` (1080 lines) | exercised by the repo's own `sentrux gate` self-scan in CI | - -The PowerShell copies are duplicate implementations of logic the Rust DAG -already runs in production — `diagnosis.hospital` and `evidence.native-code` -are live DAG nodes in every `code-intel run execute`. Retiring the -PowerShell copies removes duplication, not coverage. - -**Not yet verified, and required before deletion (`?`):** that each of the 16 -Rust tests asserts the *same* behaviour as the PowerShell test it would -replace, case for case. A per-function mapping table has to land in the -retirement PR; "a Rust suite exists" is not by itself evidence that a -specific assertion survives. Treat any PowerShell case with no Rust -counterpart as a gap to close before the file is deleted, not after. - -## 1. Parameter classification - -72 parameters. The three buckets the ticket asks for. - -### 1.1 Already covered by `code-intel run execute` - -The Rust runner already accepts these concepts; T2 only needs flag aliases -and the config-alias resolution the PowerShell side did. - -| PowerShell | Rust today | note | -|---|---|---| -| `-RepoPath` | `--repo` | direct | -| `-Repo` (alias via `pipeline.config.json`) | — | alias resolution itself must port; `code-intel doctor bootstrap` already ports the same `repos`/`sentruxPath` lookup in `doctor_bootstrap/config.rs` and can be reused | -| `-ArtifactRoot` | `--authority-root` / `--out` | staging vs authority split differs; see §3 | -| `-Platform` | implicit from target | no flag needed | -| `-DagCoordinate` | `run dag-coordinate` | already a subcommand | - -### 1.2 To port - -Mode and the Skip/Allow switches are the substance. The architectural home -is already there: `ExecutionPolicy` in `crates/code-intel-cli/src/execution_policy.rs` -compiles a profile into an immutable `ProviderPolicy`, and `dag_run.rs` -already gates node inclusion on `policy.capability_enabled(...)` and -`policy.provider_diagnosis_enabled()`. Skip flags become policy inputs, not -branches in a script. - -Load-bearing property to preserve: `with_doctor_overrides` refuses to weaken -`Strict` or re-enable `Offline`. Any new Skip flag must inherit that -guarantee, or a compatibility flag becomes a way to silently disarm a strict -run. - -| behaviour | current PS1 anchor | target | -|---|---|---| -| `-Mode lite\|normal\|full` | mode gates the sentrux stage and repowise docs | a `RunProfile`-adjacent input, not a fourth profile — see §2 | -| `-SkipRepowise` / `-SkipSentrux` / `-SkipSentruxCheck` / `-SkipSentruxGate` | per-stage gates | `ProviderRequirement::Disabled` on the matching capability | -| `-SkipOpenSpec` / `-AutoOpenSpec` | OpenSpec stage | **ported.** `advisory.workflow-recommend` is a standalone `run execute`/`dag-coordinate` DAG node gated by `ProviderPolicy::open_spec` (Optional under Default/Offline-disabled, Required under Strict/Compatibility); `-SkipOpenSpec` maps to `--skip-open-spec` narrowing that requirement, `-AutoOpenSpec` maps to `--auto-open-spec`, a passthrough option independent of the requirement (`ExecutionPolicy::with_open_spec_auto`) | -| `-RequireUnderstandGraph` | missing graph is fatal vs advisory | maps onto `providers.understand` requirement | -| `-SaveSentruxBaseline` / `-AutoSaveMissingSentruxBaseline` | writes `.sentrux/baseline.json` inside the scanned repo | needs an explicit effect declaration; writing into the scanned tree is a declared effect, not a side effect | -| `-InventoryExclude` | feeds the `rg` inventory | `inventory.rg` node options | -| `-ProactiveSkillSuggestions` / `-AutomaticPullRequests` / `-BugSkill` | follow-up automation block in the hospital report | `?` — consumer is the hospital report renderer | -| multi-artifact publishing (`report.json`, `summary.md`, `understanding.md`, `hospital.md`) | `:4179-4182` area | Rust publishes a run manifest; the markdown views are PS1-only today | - -### 1.3 Declare dead - -| item | evidence | why dead | -|---|---|---| -| `-SkipGitHubResearch` | T1 §1.1 and §7.1: zero other references to `$SkipGitHubResearch`; `$githubResearch` is unconditionally the `New-GitHubSolutionResearchNotApplicable` stub regardless of the flag | the switch has no effect at all — five test files pass it and none assert on it, because there is nothing to assert | -| `Test-GitHubSolutionResearchRequired` | T1 §1.1: defined, zero call sites | dead function reachable only by dot-sourcing | -| `-SkipRepomix` / `-RepomixStyle` / `-RepomixCompress` | `orchestration/integrations.json` productionRegistry: `pack.repomix` `status: "deleted"`, `reviewedDeletion` 2026-07-14, evidence "R05 audited host and npm cache: no Repomix executable or pinned package; production call site removed fail-closed"; launcher's own repomix block (pre-edit `:3612-3639`) never invoked `repomix` — the three params only toggled a static `reason` string on a `$repomixPack` object permanently pinned to `status: "skipped"` | the underlying `pack.repomix` capability was already governance-closed before this ticket; the launcher's params were vestigial surface over a stub that could never do real work either way | - -Both were recorded by T1 as findings and deliberately left unfixed there -("record, don't fix"). T2 is the ticket that removes them. - -**Status (2026-08-07): removed.** `$SkipGitHubResearch` and -`Test-GitHubSolutionResearchRequired` are deleted from `run-code-intel.ps1`. -Every real caller that threaded the no-op flag through — `invoke-code-intel.ps1`'s -own dead passthrough param, `test-code-intel-pipeline.ps1`'s param and -forwarding block, `test-ps1-rust-parity.ps1`, `test-transactional-publication.ps1`, -`test-runtime-ci-hospital-pet.ps1`, `test-code-evidence-layer.ps1`, -`Invoke-NativeRetrievalBenchmark.ps1`, `Invoke-CccSliceBenchmark.ps1`, -`Invoke-CodeEvidenceABTest.ps1`, `ci.yml` (both self-scan jobs), -`release.yml`, and `orchestration/code-intel-project-conformance-policy.v1.json` (since deleted, #450) -— had the argument dropped too. `legacy/scripts/tests/test-github-solution-research.ps1` -was **not** touched: it exercises `Invoke-GitHubSolutionResearch.ps1`'s own, -unrelated `-SkipGitHubResearch` switch, a same-name flag on a different -script. Verified: pwsh AST parse on every edited `.ps1`, YAML/JSON parse on -the workflow and policy files, `cargo test -p code-intel --test -native_code_evidence` (6 passed), and every directly-touched PowerShell -contract test run standalone (`test-ps1-rust-parity.ps1`, -`test-transactional-publication.ps1`, `test-runtime-ci-hospital-pet.ps1`, -`test-code-evidence-layer.ps1`, `test-code-intel-pipeline.ps1`, -`test-github-solution-research.ps1`) — all exit 0. The T1 parity harness's -overall `ok:false` verdict is pre-existing (documented node-coverage and -hospital-shape drift this same document already catalogs in §0/§3, plus a -worktree-local `doctor`/`sentrux` self-scan false-negative unrelated to this -change), not something this removal introduced. - -**Status (2026-08-22): removed.** `-SkipRepomix`, `-RepomixStyle`, and -`-RepomixCompress` are deleted from `run-code-intel.ps1`'s param block, along -with the `$repomixConfig`-driven resolution block that only ever fed them. -`$repomixPack` is now an unconditional literal — `status: "skipped"`, a fixed -`reason` string, `style: "markdown"` — instead of a three-branch conditional -over params that could never change real behavior (the block never invoked -`repomix` either way). The literal reason string is preserved verbatim -because `crates/code-intel-cli/tests/internalization_record.rs`'s -`ticket_r05_repomix_is_a_measured_reviewed_deletion_not_fake_production` -asserts it appears in the launcher's source text as part of the permanent -R05 governance record; `report.json`'s `repomixPack.schema` field is -preserved too, since `test-code-intel-pipeline.ps1` still asserts on it. -Every real caller that passed `-SkipRepomix` — `test-transactional-publication.ps1`, -`legacy/tests/test-model-channel-degraded-pipeline.ps1`, and -`crates/code-intel-cli/tests/native_code_evidence.rs` — had the argument -dropped too (dropping it is a no-op: the flag never changed observable -behavior). `pipeline.config.example.json`'s now-inert `"repomix": {...}` -block is removed, and README's tool table/reading-order sections no longer -describe Repomix packing as something that can succeed. Verified: pwsh AST -parse on every edited `.ps1`, `cargo test -p code-intel --test -native_code_evidence` (7 passed), `cargo test -p code-intel --test -internalization_record ticket_r05` (1 passed), and every directly-touched -PowerShell contract test run standalone (`test-transactional-publication.ps1`, -`test-model-channel-degraded-pipeline.ps1`, `test-code-intel-pipeline.ps1` -with `-RepoPath .`) — all exit 0 with `"ok": true`. - -The rest of §1.2/§1.3/§1.4 (flag porting, remaining dead-item removal, the -route-away items) and the launcher shrink itself (blocked on the §0 -dot-source test migration) are still open. - -### 1.4 Route away rather than port - -The eight early-exit facades (T1 §1.8) are already thin forwarders into the -Rust CLI. Their retirement work is *stop routing through the launcher*, not -*port logic*, because the logic already lives in Rust: - -`-ModelInventoryResult`, `-ModelAdapterRequest`, `-RepowiseAdapterRequest`, -`-GraphAdapterRequest`, `-SentruxAdapterRequest`, `-CodeNexusAdapterRequest`, -`-SurvivalScanRequest`, `-RunCommitManifestRef` (plus their companion -`*ArtifactRoot`/`*EvaluatedAt`/`*MaxAgeSeconds` parameters). - -Each already resolves `target/debug/`, invokes a subcommand, and -`exit $LASTEXITCODE`. Callers should invoke `code-intel` directly; the -forwarder does not need to reproduce them. - -`-SentruxAdapterArtifactRoot`, `-SentruxAdapterEvaluatedAt` and -`-SentruxAdapterMaxAgeSeconds` are additionally never passed by any live -caller — measured across every non-frozen `.ps1`/`.yml` in the tree. - -## 2. Open design question: what `-Mode` becomes - -`RunProfile` already has four values (`Default`, `Strict`, `Offline`, -`Compatibility`) that describe *provider requirement policy*. `-Mode` -(`lite`/`normal`/`full`) describes *how much work to do*. These are -orthogonal — a strict lite run is meaningful — so `-Mode` must not be -flattened into `RunProfile`. - -Recommended: a separate `--mode` input that adjusts which optional nodes -enter the DAG, composed with, never overriding, the profile's requirement -policy. Deciding this before writing code matters, because collapsing the -two axes is the kind of mistake that is expensive to reverse once the flag -is public. - -## 3. Contract divergences recorded for the port - -The following were carried from T1 §5 and §7 at `02f0444`. Current-state annotations distinguish -resolved behavior from historical evidence: - -1. **Exit codes.** `run execute` distinguishes `10` (architecture/domain - gate) from `70` (process failure). The launcher only ever exits `0` or - `1`. The forwarder must decide whether to propagate the richer code or - collapse it; propagating is preferable but is a behaviour change for - anything parsing the old binary outcome. -2. **Publication authority (resolved).** At the measured checkpoint, both paths wrote - `run-complete.json` with unrelated shapes. That is no longer current behavior: only the - compiled Run Commit path writes canonical `code-intel-run-commit.v1`. The PowerShell report - path atomically promotes an advisory compatibility directory and writes no canonical marker. -3. **Hospital shape drift.** Both producers claim schema - `code-intel-hospital.v1`; PS1 nests its verdict under `triage`, Rust under - `diagnosis` + `domainVerdict`. The schema string is not currently a - guarantee of shape compatibility. -4. **Two paths to "sentrux skipped".** `-Mode lite` and `-SkipSentrux` - produce the same user-visible outcome with different `error` text. The - port has to pick one. - -## 4. Sequencing - -1. Land this classification. *(this commit)* -2. Resolve §2 (`--mode` axis) and §3.1 (exit-code contract) — both are - public-surface decisions that are cheap now and expensive later. -3. Port §1.2 into `ExecutionPolicy` + `dag_run`, with the strict/offline - non-weakening guarantee extended to every new switch. -4. Build the per-function mapping table for §0 and close any assertion gaps - on the Rust side. -5. Delete the dead items in §1.3, retire the duplicated PowerShell functions - and their tests, shrink the launcher to a forwarder. -6. Repoint `ci.yml`, `release.yml`, `README.md` and the skill docs to the - binary; keep the forwarder as a documented compatibility entry point. -7. T1 parity harness green across the forwarder and the direct path. diff --git a/docs/release-provenance-runbook.md b/docs/release-provenance-runbook.md index bcfcf0d4..ac7e67cd 100644 --- a/docs/release-provenance-runbook.md +++ b/docs/release-provenance-runbook.md @@ -29,7 +29,7 @@ machine and recorded."* Run against the already-published `v0.7.0-beta.6` release (the most recent tag built after the attestation step landed in `ad67738`, 2026-07-28): -```powershell +```sh gh release download v0.7.0-beta.6 -p 'code-intel-pipeline-v0.7.0-beta.6-windows.zip' gh attestation verify code-intel-pipeline-v0.7.0-beta.6-windows.zip --repo 2233admin/code-intel-pipeline # exit 0 -- 1 attestation verified, Sigstore certificate chain resolves to diff --git a/docs/repository-snapshot-identity.md b/docs/repository-snapshot-identity.md index f607ebcf..184eb6cb 100644 --- a/docs/repository-snapshot-identity.md +++ b/docs/repository-snapshot-identity.md @@ -4,7 +4,7 @@ ## Command -```powershell +```sh code-intel snapshot identity --repo --working-tree-policy --scope ``` diff --git a/docs/repository-survival-scan.md b/docs/repository-survival-scan.md index 3de3a1f3..04fa278e 100644 --- a/docs/repository-survival-scan.md +++ b/docs/repository-survival-scan.md @@ -12,4 +12,4 @@ Production CLI: code-intel repository survival-scan --request --artifact-root ``` -The PowerShell facade exposes the same route through `-SurvivalScanRequest` and `-SurvivalScanArtifactRoot`. The existing `inventory.rg` adapter remains the rollback-compatible inventory producer; B05 does not add a parser or provider database. +The existing `inventory.rg` adapter remains the rollback-compatible inventory producer; B05 does not add a parser or provider database. diff --git a/docs/repowise-adapter.md b/docs/repowise-adapter.md index 6f96ed42..893410bd 100644 --- a/docs/repowise-adapter.md +++ b/docs/repowise-adapter.md @@ -31,11 +31,7 @@ Its `code-intel-repowise-route-result.v1` output keeps the translation and an A0 emitted evidence channel. Exit `0` means every emitted observation was admitted (including an `unknown` domain verdict for partial docs); exit `65` means the native contract or at least one A04 check was rejected. Missing CLI emits no fabricated evidence. Native diagnostics are never copied. -The `legacy/run-code-intel.ps1 -RepowiseAdapterRequest ...` facade selects this same Rust route. - -`legacy/Invoke-RepowiseProviderProbe.ps1` is the production health probe. The historical -`legacy/scripts/tests/test-code-intel-provider.ps1` name is now only a test wrapper over that production seam. -`legacy/run-code-intel.ps1` uses the production probe and continues index-only execution when optional +The Rust provider probe is the production health probe; index-only execution continues when optional docs health fails. Existing direct Repowise CLI/index commands remain compatibility and rollback surfaces; they are optional diagnostics/rollback only, and their raw output has no evidence or fact authority. diff --git a/docs/run-commit.md b/docs/run-commit.md index e6bee378..d38387ce 100644 --- a/docs/run-commit.md +++ b/docs/run-commit.md @@ -2,7 +2,7 @@ `run.commit` is the sole transaction boundary between A06 staging and a published run. It does not generate artifacts, execute DAG nodes, diagnose results, synthesize repository-iteration provenance, or update A08 indexes. -The administrative CLI is `code-intel run commit --source-root --authority-root --manifest-ref --final-name `. It revalidates the source A09 manifest and refs, copies the already-authorized bytes through a fresh A06 owned staging set, rewrites the terminal manifest to the resulting content-addressed Artifact Refs, and then invokes the publication transaction. The PowerShell flags `-RunCommitSourceRoot`, `-RunCommitAuthorityRoot`, `-RunCommitManifestRef`, and `-RunCommitFinalName` are compatibility forwarding only. +The administrative CLI is `code-intel run commit --source-root --authority-root --manifest-ref --final-name `. It revalidates the source A09 manifest and refs, copies the already-authorized bytes through a fresh A06 owned staging set, rewrites the terminal manifest to the resulting content-addressed Artifact Refs, and then invokes the publication transaction. For a fresh authoritative repository iteration, use `code-intel run execute --repo --out --authority-root --final-name `. Its private Rust controller creates the versioned `repository.iteration` provenance Artifact Ref before invoking Run Commit, validates the committed publication, rebuilds the Rust A08 completed-only index, and publishes that index. A direct administrative `run commit` never invents this provenance, so a snapshot-only or governance manifest cannot become repository-query authority merely by being committed. @@ -10,4 +10,4 @@ Before promotion it reopens and validates the A09 terminal run manifest, every r Failures before promotion leave A06 ownership cleanup intact. Failures after promotion leave an uncommitted, recoverable directory; `recover` repeats full validation and synchronizes the promoted directory entry before publishing a marker. A post-marker verification failure removes a marker only when both its stable file identity and bytes still match the file published by that attempt. Existing destination directories and competing marker files are never replaced or recursively deleted. -Directories without a valid marker, including legacy timestamp reports and the retired `{generatedAt,report,reportSha256}` marker shape, are not committed authority. A08 is implemented in Rust: `code-intel artifact index` accepts only completed A07 publications with exactly one verified, succeeded `repository.iteration` provenance ref bound to the manifest, marker, repository directory, and publication directory. `legacy/update-code-intel-index.ps1` normally forwards to that implementation; its explicit legacy compatibility traversal is advisory and cannot establish repository authority. +Directories without a valid marker, including legacy timestamp reports and the retired `{generatedAt,report,reportSha256}` marker shape, are not committed authority. A08 is implemented in Rust: `code-intel artifact index` accepts only completed A07 publications with exactly one verified, succeeded `repository.iteration` provenance ref bound to the manifest, marker, repository directory, and publication directory. Legacy report traversal is advisory and cannot establish repository authority. diff --git a/docs/runtime-ci-evidence.md b/docs/runtime-ci-evidence.md index 021645bc..844bb2d4 100644 --- a/docs/runtime-ci-evidence.md +++ b/docs/runtime-ci-evidence.md @@ -16,7 +16,7 @@ Snapshot mismatch and stale evidence produce a rejected summary with `health: un The stable `facts` array contains only conservative deterministic claims. Hospital/PET can consume the summary without learning provider-specific JSON and without converting absence into success. -`legacy/run-code-intel.ps1 -RuntimeCiEvidenceRequest -RuntimeCiEvidenceArtifactRoot ` invokes the registered provider during a normal run. Hospital/PET cites the emitted `runtime-ci-summary.json`, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. +The registered provider is invoked during a normal run. Hospital/PET cites the emitted `runtime-ci-summary.json`, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. ## Deliberate limits diff --git a/docs/sentrux-provider-adapter.md b/docs/sentrux-provider-adapter.md index 019684d7..b244bbef 100644 --- a/docs/sentrux-provider-adapter.md +++ b/docs/sentrux-provider-adapter.md @@ -4,7 +4,7 @@ `provider sentrux-adapt` is the only structural-evidence ingress for Sentrux observations. In the default normal DAG, the built-in Rust provider executes real gate/check commands, preserves typed comparisons, blocking violations and advisories, binds evidence to the actual repository snapshot, and submits it to A04 before exposing diagnosis eligibility. Report/projection consumers retain raw Quality regressions and distinguish advisory from blocking admission. -Known hard-rule failures remain verified failing evidence, not an unknown result. Unknown rule kinds, incomplete collection, missing or incompatible baseline, unknown policy/provider/profile, snapshot mismatch, and provider crashes cannot authorize admission. External providers require a valid approved-policy handshake; exit 0 alone is insufficient. `legacy/Invoke-SentruxAgentTool.ps1` and the bundled shim remain compatibility/rollback paths, not the normal authority route. +Known hard-rule failures remain verified failing evidence, not an unknown result. Unknown rule kinds, incomplete collection, missing or incompatible baseline, unknown policy/provider/profile, snapshot mismatch, and provider crashes cannot authorize admission. External providers require a valid approved-policy handshake; exit 0 alone is insufficient. Current native, adapter, structural port/payload, command observation and capability artifact contracts are v2 with mandatory `gatePolicy`; report/projection contracts are also v2. The outer `code-intel-sentrux-route-result.v1` wrapper remains unchanged. Historical v1 artifacts may be retained as diagnostic references, never current success authority. Structural evidence is not Engineering Facts; downstream diagnosis and fact promotion remain separate authority decisions. Policy approval does not authorize deployment or lift the excluded-host compilation restriction. diff --git a/docs/tool-effectiveness-baseline.md b/docs/tool-effectiveness-baseline.md index d4680eda..892c69da 100644 --- a/docs/tool-effectiveness-baseline.md +++ b/docs/tool-effectiveness-baseline.md @@ -59,11 +59,11 @@ than hiding trade-offs in one score. The deterministic scorer is available as: -```powershell -code-intel benchmark tools ` - --corpus ` - --runs ` - --artifact-root ` +```sh +code-intel benchmark tools \ + --corpus \ + --runs \ + --artifact-root \ --out ``` From f6c0d0bf1f880062eaa7caa8744b0255f187828b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 18:26:51 +0800 Subject: [PATCH 2/4] docs(#465): re-sync pinned digests of edited docs Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018bnC1Tos5MvBbFEj5zzi51 --- orchestration/internalization/graph.json | 4 ++-- orchestration/internalization/pon-multilanguage.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/orchestration/internalization/graph.json b/orchestration/internalization/graph.json index 92771aac..aa7cad24 100644 --- a/orchestration/internalization/graph.json +++ b/orchestration/internalization/graph.json @@ -15,8 +15,8 @@ { "integrationId": "provider.graph-adapt", "operation": "capabilityExec", "command": "target/debug/code-intel.exe capability exec provider.graph-adapt --request --out --artifact-root ", "implementationIdentity": { "providerId": "code-intel.graph", "implementationId": "provider.graph-builtin.compat", "activation": "required production capability envelope" }, "source": { "path": "crates/code-intel-cli/src/builtin_provider_evidence.rs", "sha256": "a0127c7e3d6745f1c415522159adb9a73eb502d109c0def01aefee72eacbaacd" }, "conformance": { "path": "crates/code-intel-cli/tests/dag_run.rs", "sha256": "1a95f8f6102df4b475800da942e85325f40afdde532ed545da584c49fde6b5dc", "testName": "production_dag_output_commits_and_enters_the_authoritative_index" } }, { "integrationId": "graph.code-intel-understand", "operation": "refresh", "command": "target/debug/code-intel.exe graph --repo --language zh --write --json", "implementationIdentity": { "providerId": "code-intel.graph", "implementationId": "internal-rust-graph", "activation": "primary" }, "source": { "path": "crates/code-intel-cli/src/graph/mod.rs", "sha256": "245bd6d7eb6f774ea6f9cead43eb67f8b351fc92c930252d180d072f00524947" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "internal_and_external_current_outputs_share_one_port_and_provenance_schema" } }, { "integrationId": "graph.code-intel-understand", "operation": "refreshFull", "command": "target/debug/code-intel.exe graph --repo --language zh --full --write --json", "implementationIdentity": { "providerId": "code-intel.graph", "implementationId": "internal-rust-graph", "activation": "primary" }, "source": { "path": "crates/code-intel-cli/src/graph/mod.rs", "sha256": "245bd6d7eb6f774ea6f9cead43eb67f8b351fc92c930252d180d072f00524947" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "internal_and_external_current_outputs_share_one_port_and_provenance_schema" } }, - { "integrationId": "graph.understand-external", "operation": "refresh", "command": "/understand --language zh", "implementationIdentity": { "providerId": "understand-anything", "implementationId": "unverified-upstream", "activation": "explicit_fallback" }, "source": { "path": "docs/graph-provider-adapter.md", "sha256": "dbaf8f1a9bbe434e9ab313ab0466d0e4d1e75449873f49eb7f24d90b812310d0" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "fallback_identity_and_payload_identity_cannot_be_relabelled" } }, - { "integrationId": "graph.understand-external", "operation": "refreshFull", "command": "/understand --language zh --full", "implementationIdentity": { "providerId": "understand-anything", "implementationId": "unverified-upstream", "activation": "legacy_rollback" }, "source": { "path": "docs/graph-provider-adapter.md", "sha256": "dbaf8f1a9bbe434e9ab313ab0466d0e4d1e75449873f49eb7f24d90b812310d0" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "fallback_identity_and_payload_identity_cannot_be_relabelled" } } + { "integrationId": "graph.understand-external", "operation": "refresh", "command": "/understand --language zh", "implementationIdentity": { "providerId": "understand-anything", "implementationId": "unverified-upstream", "activation": "explicit_fallback" }, "source": { "path": "docs/graph-provider-adapter.md", "sha256": "5444d0dc90445a8682d434ee5ce4bf200ce11b024947171e7455dc04a0ae1ce8" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "fallback_identity_and_payload_identity_cannot_be_relabelled" } }, + { "integrationId": "graph.understand-external", "operation": "refreshFull", "command": "/understand --language zh --full", "implementationIdentity": { "providerId": "understand-anything", "implementationId": "unverified-upstream", "activation": "legacy_rollback" }, "source": { "path": "docs/graph-provider-adapter.md", "sha256": "5444d0dc90445a8682d434ee5ce4bf200ce11b024947171e7455dc04a0ae1ce8" }, "conformance": { "path": "crates/code-intel-cli/tests/graph_adapter.rs", "sha256": "0b8b9a9ce192d387e073fb09107bc948e4897a484115afd9f1f09038e67da726", "testName": "fallback_identity_and_payload_identity_cannot_be_relabelled" } } ], "economics": { "benefit": { "metric": "B02 implementation identities exercised by swap conformance", "value": 2, "unit": "implementations" }, "cost": { "metric": "registered internal and external implementation lifecycles", "value": 2, "unit": "implementations" }, "benefitEvidence": { "evidenceIds": ["local:b02:internal-external-identity-separation", "gap:graph:representative-utility-measurement"], "checkedAt": 1783900800, "expiresAt": 1791676800 }, "costEvidence": { "evidenceIds": ["local:b02:production-operation-traces", "gap:graph:latency-storage-cost-measurement"], "checkedAt": 1783900800, "expiresAt": 1791676800 } }, "assurance": { "maintenanceEvidence": { "evidenceIds": ["local:b02:replaceable-provider-port", "gap:graph:external-maintenance-status"], "checkedAt": 1783900800, "expiresAt": 1791676800 }, "securityEvidence": { "evidenceIds": ["local:b02:stale-snapshot-rejection", "gap:graph:external-security-review"], "checkedAt": 1783900800, "expiresAt": 1791676800 } }, diff --git a/orchestration/internalization/pon-multilanguage.json b/orchestration/internalization/pon-multilanguage.json index 9734fe5d..78e8d007 100644 --- a/orchestration/internalization/pon-multilanguage.json +++ b/orchestration/internalization/pon-multilanguage.json @@ -7,7 +7,7 @@ "kind": "design_reference", "source": { "uri": "https://github.com/can1357/pon", - "revision": "ab9067dbd2899c64c4d67a4bc27b8ad49472b126; local-plan-sha256:13aba02afe50ba96b51f8af8f25a5f4adbf485737d4ccc4897d3f769aee7cea9; local-doc-sha256:ab190f0b1d5df7b552567bd89b48eef177b2d1318d19a6eb3bc828bbfcdc23ab; local-test-sha256:83620098bbe864243e7b0f83bcea1836bca534b25ae5b8810687d859158e457c; local-fixture-sha256:26429a991641d142404eca462fdfb23b5256fdf3501724b63b6d441faa58cd6d" + "revision": "ab9067dbd2899c64c4d67a4bc27b8ad49472b126; local-plan-sha256:13aba02afe50ba96b51f8af8f25a5f4adbf485737d4ccc4897d3f769aee7cea9; local-doc-sha256:7dadae1b81ad355ce135f8bf5c7caf613223926c42a5d9e95eda175a3e90444a; local-test-sha256:83620098bbe864243e7b0f83bcea1836bca534b25ae5b8810687d859158e457c; local-fixture-sha256:26429a991641d142404eca462fdfb23b5256fdf3501724b63b6d441faa58cd6d" }, "license": { "id": "UNKNOWN-RESEARCH-ONLY", From 3031ba719d125f3c8ed2331a6fae5a2232b0eb38 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 19:06:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?docs(#465):=20address=20review=20=E2=80=94?= =?UTF-8?q?=20locatable=20history,=20portable=20command,=20counts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018bnC1Tos5MvBbFEj5zzi51 --- docs/INVENTORY.md | 4 +-- docs/architecture/reference-capability-map.md | 36 +++++++++---------- docs/project-orientation-benchmark.md | 3 +- docs/runtime-ci-evidence.md | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/INVENTORY.md b/docs/INVENTORY.md index a74b62f4..8ea5067f 100644 --- a/docs/INVENTORY.md +++ b/docs/INVENTORY.md @@ -137,8 +137,8 @@ pattern alone — see TASK_REPORT.md for the cases where the obvious pattern mat ## Totals -- Files inventoried: 123 -- living-contract (kept): 104 (14 ADR + 1 open plan + 79 other) +- Files inventoried: 100 +- living-contract (kept): 81 (14 ADR + 1 open plan + 66 other) - one-shot archived this sweep: 17 (16 plans + 1 compatibility-retire) - one-shot already archived (prior sweep): 2 - stale: 0 (no doc found describing wholly nonexistent paths/symbols; a handful of docs have one diff --git a/docs/architecture/reference-capability-map.md b/docs/architecture/reference-capability-map.md index a040a488..ef7dcdc5 100644 --- a/docs/architecture/reference-capability-map.md +++ b/docs/architecture/reference-capability-map.md @@ -2,7 +2,7 @@ Status: canonical audit baseline (2026-07-13) -> PowerShell was removed from the product (DR-0018). "Current invocation" and coupling cells below that mention a PowerShell wrapper or runner describe the 2026-07-13 baseline; the equivalent behavior now lives in the compiled Rust `code-intel` CLI or has been deleted. +> PowerShell was removed from the product (DR-0018). This table is the 2026-07-13 baseline: the `legacy/*.ps1` paths and line numbers it cites no longer exist on `main`; read them at commit `f59be54`, the last commit before their deletion. The equivalent behavior now lives in the compiled Rust `code-intel` CLI or has been deleted. This map classifies the active integrations and design references named by the restored commitment checkpoints. It is an inventory, not an adoption approval, implementation claim, or health claim. Repository code and accepted/proposed ADRs are the primary evidence; the checkpoints are audit inputs that establish coverage expectations only. @@ -17,33 +17,33 @@ This map classifies the active integrations and design references named by the r | Integration / reference | Capability supplied | Evidence type | Current invocation path | Ownership | Lifecycle state | Coupling | Trust boundary | Replacement / exit path | Source evidence | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| doctor | Repository/tool preflight, registered-integration validation and machine-readable readiness | Observed environment and repository-state evidence | a removed PowerShell wrapper (DR-0018); stable wrapper runs doctor before the scanner | Pipeline | `active-required` | Medium: PowerShell probes installed commands, local provider sources and repository state | Tool presence is not capability conformance; secrets are reported only as presence/absence and must never enter output | Move probes behind the Rust runtime while retaining the `doctor_json` contract and a shell-compatible bootstrap path | `orchestration/integrations.json` integration id `doctor`; a removed PowerShell wrapper (DR-0018); a removed PowerShell wrapper (DR-0018) | +| doctor | Repository/tool preflight, registered-integration validation and machine-readable readiness | Observed environment and repository-state evidence | `legacy/check-code-intel-tools.ps1 -RepoPath ... -Json`; stable wrapper runs doctor before the scanner | Pipeline | `active-required` | Medium: PowerShell probes installed commands, local provider sources and repository state | Tool presence is not capability conformance; secrets are reported only as presence/absence and must never enter output | Move probes behind the Rust runtime while retaining the `doctor_json` contract and a shell-compatible bootstrap path | `orchestration/integrations.json` integration id `doctor`; `legacy/check-code-intel-tools.ps1`; `legacy/invoke-code-intel.ps1` | | runtime.code-intel | Integration planning/validation, provider routes, graph generation, artifact resume/classification and artifact doctor | Control-plane execution plus deterministic derived status | `code-intel` subcommands `orchestrate`, `provider`, `route`, `graph`, `doctor`, `resume`, `classify` | Pipeline | `active-required` | Medium: compiled Rust core exists, while the main scan/report orchestration still resides in PowerShell | Rust results are authoritative only for the operation and contract they actually implement; they do not prove the PowerShell scanner has been retired | Expand atom-by-atom behind stable contracts; keep PowerShell as a temporary compatibility adapter until parity is tested | `orchestration/integrations.json` integration id `runtime.code-intel`; `crates/code-intel-cli/src/main.rs`; `docs/integration-orchestration.md` section “PowerShell Compatibility Direction” | -| inventory.rg | Exact file inventory and text-search surface | Observed repository evidence | Normal runner invokes `rg` and writes `files.txt` plus the `rg file inventory` step | Pipeline owns invocation/artifact contract; upstream owns `rg` | `active-required` | Low CLI coupling, currently embedded in the main runner | Inventory is bounded by scope/exclusions and snapshot; absence from a search is not proof of semantic absence outside that scope | Replace the executable behind an inventory adapter while preserving exact inventory artifacts and failure semantics | `orchestration/integrations.json` integration id `inventory.rg`; a removed PowerShell wrapper (DR-0018) step name `rg file inventory` | -| Git | Working-tree state, repository identity, HEAD/history and recent-commit context | Observed version-control evidence | `git status`, `git rev-parse`, `git log` from runner/adapters | Pipeline owns interpretation; Git owns repository protocol/CLI | `drift-unregistered` | Medium: multiple scripts call Git directly and CodeNexus-lite uses history context | Dirty state, HEAD and worktree policy must be explicit in Snapshot Identity; Git commands are read-only unless a separately authorized effect declares mutation | Register a version-control evidence adapter and centralize snapshot semantics; alternate VCS providers may conform to the same port | a removed PowerShell wrapper (DR-0018) step name `git status`; a removed PowerShell wrapper (DR-0018); absent from `orchestration/integrations.json` | -| Repowise | Semantic index, state, scoped shadow workspace, optional generated docs | Observed evidence and semantic-memory artifacts; provider-generated prose remains non-authoritative | a removed PowerShell wrapper (DR-0018); normal runner invokes it; Rust provider routes exist for status/index/docs | Pipeline owns adapter and egress contract; upstream owns CLI/provider internals | `active-required` | Medium/high: CLI plus Python/package behavior is still wrapped and patched locally | Scope inventory and frozen provider payload must be validated before network/provider execution; secrets remain outside artifacts | Preserve `.repowise/state.json`/`wiki.db` and provider-port semantics; replace CLI behind adapter or complete selective internalization | `orchestration/integrations.json` integration id `memory.repowise`; `docs/artifact-data-contract.md` section “Scoped Repowise Egress Contract”; `crates/code-intel-cli/src/providers.rs`; `overlays/repowise/README.md` | +| inventory.rg | Exact file inventory and text-search surface | Observed repository evidence | Normal runner invokes `rg` and writes `files.txt` plus the `rg file inventory` step | Pipeline owns invocation/artifact contract; upstream owns `rg` | `active-required` | Low CLI coupling, currently embedded in the main runner | Inventory is bounded by scope/exclusions and snapshot; absence from a search is not proof of semantic absence outside that scope | Replace the executable behind an inventory adapter while preserving exact inventory artifacts and failure semantics | `orchestration/integrations.json` integration id `inventory.rg`; `legacy/run-code-intel.ps1` step name `rg file inventory` | +| Git | Working-tree state, repository identity, HEAD/history and recent-commit context | Observed version-control evidence | `git status`, `git rev-parse`, `git log` from runner/adapters | Pipeline owns interpretation; Git owns repository protocol/CLI | `drift-unregistered` | Medium: multiple scripts call Git directly and CodeNexus-lite uses history context | Dirty state, HEAD and worktree policy must be explicit in Snapshot Identity; Git commands are read-only unless a separately authorized effect declares mutation | Register a version-control evidence adapter and centralize snapshot semantics; alternate VCS providers may conform to the same port | `legacy/run-code-intel.ps1` step name `git status`; `legacy/Invoke-CodeNexusLite.ps1`; absent from `orchestration/integrations.json` | +| Repowise | Semantic index, state, scoped shadow workspace, optional generated docs | Observed evidence and semantic-memory artifacts; provider-generated prose remains non-authoritative | `legacy/Invoke-ScopedRepowise.ps1`; normal runner invokes it; Rust provider routes exist for status/index/docs | Pipeline owns adapter and egress contract; upstream owns CLI/provider internals | `active-required` | Medium/high: CLI plus Python/package behavior is still wrapped and patched locally | Scope inventory and frozen provider payload must be validated before network/provider execution; secrets remain outside artifacts | Preserve `.repowise/state.json`/`wiki.db` and provider-port semantics; replace CLI behind adapter or complete selective internalization | `orchestration/integrations.json` integration id `memory.repowise`; `docs/artifact-data-contract.md` section “Scoped Repowise Egress Contract”; `crates/code-intel-cli/src/providers.rs`; `overlays/repowise/README.md` | | Understand-compatible internal graph | Architecture graph state, freshness, compatible graph artifact | Observed structural evidence promoted only after snapshot/freshness validation | `code-intel graph --repo ... --write --json`; normal run consumes `.understand-anything/knowledge-graph.json` | Pipeline | `active-required` | Low/medium: internal Rust producer, but artifact name/schema retains compatibility | Graph freshness and snapshot identity must match the examined repository; stale presence is not success | Any graph provider may replace implementation if it emits the Pipeline-owned compatible artifact through the provider port | `orchestration/integrations.json` integration id `graph.code-intel-understand`; `docs/integration-orchestration.md` section “Understand Direction”; `crates/code-intel-cli/src/graph/mod.rs` | | Understand Anything external | Rich Agent-side architecture graph refresh | Observed evidence from an external/interactive provider | `/understand --language zh [--full]` only as fallback or explicit richer pass | Upstream provider; Pipeline owns admission of its artifact | `compatibility-fallback` | Low at runtime, medium artifact compatibility | External command is non-deterministic/host-dependent; output must pass the same snapshot/freshness contract | Remove fallback when internal or another non-interactive provider reaches required conformance | `orchestration/integrations.json` integration id `graph.understand-external`; `docs/integration-orchestration.md` section “Understand Direction”; `skills/code-intel-pipeline/SKILL.md` graph-missing workflow | -| Sentrux | Structural scan, rules, regression gate, DSM, test gaps, evolution, what-if | Observed structural evidence plus derived governance models/gate results | a removed PowerShell wrapper (DR-0018); Rust `code-intel sentrux ...`; external binary through repo shim with lite-core fallback | Pipeline owns adapter, normalization, rules and lite fallback; external binary is accelerator | `active-required` | High today: large PowerShell wrapper; external CLI format is normalized locally | Raw CLI status/exit code is not authoritative until normalized; governed scope, exclusions, baseline and rules are explicit | Migrate operations atom-by-atom behind Rust/provider contracts; retain lite survival capability; external accelerator remains replaceable | `orchestration/integrations.json` integration id `structure.sentrux`; `docs/integration-orchestration.md` section “Sentrux Direction”; `crates/code-intel-cli/src/sentrux.rs`; a removed PowerShell wrapper (DR-0018) | -| tree-sitter-v | V-language parsing grammar for Sentrux | Third-party parser artifact used to create structural evidence | a removed PowerShell wrapper (DR-0018); installed as Sentrux `vlang` plugin | Pipeline owns overlay/ABI alias and installer; upstream owns grammar | `active-optional` | Medium: compiled grammar ABI and Sentrux plugin contract | Compiled artifact provenance/ABI must be verified; current repository records source URL and MIT license but no pinned source revision | Drop overlay when upstream Sentrux ships a conforming V plugin, or rebuild from a pinned reviewed revision | `overlays/sentrux/vlang/plugin.toml:11`; `overlays/sentrux/vlang/plugin.toml:14`; `overlays/sentrux/vlang/README.md:7`; a removed PowerShell wrapper (DR-0018) | -| CodeNexus-lite | Hotspot localization, recent commits, reference hits; compatibility scan/lite/doctor surface | Deterministic derived localization view | Runner conditionally invokes a removed PowerShell wrapper (DR-0018) when a Sentrux target and script exist; exceptions only add a note; canonical provider route is `codenexus/lite` | Pipeline | `active-optional` | Medium: both manifest ids are optional compatibility entries and the canonical provider operation is optional/nonblocking; two manifest ids still share one implementation while the legacy `repowise/lite` provider alias is being retired | `codenexus-context.json` is a derived view, not independent provider fact or a semantic graph; Survival Scanner preserves localization when the adapter is unavailable | Keep canonical `codenexus/lite`, retire the compatibility alias after its transition window, and let a full CodeNexus or another provider conform to the artifact/provider port | `orchestration/integrations.json` ids `runtime.code-nexus-lite` and `localization.codenexus-lite`; `crates/code-intel-cli/src/providers.rs` operations `codenexus/lite` and deprecated `repowise/lite`; a removed PowerShell wrapper (DR-0018) variable `$codeNexusLiteTool` and its nonblocking `catch` | +| Sentrux | Structural scan, rules, regression gate, DSM, test gaps, evolution, what-if | Observed structural evidence plus derived governance models/gate results | `legacy/Invoke-SentruxAgentTool.ps1`; Rust `code-intel sentrux ...`; external binary through repo shim with lite-core fallback | Pipeline owns adapter, normalization, rules and lite fallback; external binary is accelerator | `active-required` | High today: large PowerShell wrapper; external CLI format is normalized locally | Raw CLI status/exit code is not authoritative until normalized; governed scope, exclusions, baseline and rules are explicit | Migrate operations atom-by-atom behind Rust/provider contracts; retain lite survival capability; external accelerator remains replaceable | `orchestration/integrations.json` integration id `structure.sentrux`; `docs/integration-orchestration.md` section “Sentrux Direction”; `crates/code-intel-cli/src/sentrux.rs`; `legacy/tools/sentrux-shim/sentrux-lite-core.ps1` | +| tree-sitter-v | V-language parsing grammar for Sentrux | Third-party parser artifact used to create structural evidence | `legacy/Install-SentruxVlangOverlay.ps1`; installed as Sentrux `vlang` plugin | Pipeline owns overlay/ABI alias and installer; upstream owns grammar | `active-optional` | Medium: compiled grammar ABI and Sentrux plugin contract | Compiled artifact provenance/ABI must be verified; current repository records source URL and MIT license but no pinned source revision | Drop overlay when upstream Sentrux ships a conforming V plugin, or rebuild from a pinned reviewed revision | `overlays/sentrux/vlang/plugin.toml:11`; `overlays/sentrux/vlang/plugin.toml:14`; `overlays/sentrux/vlang/README.md:7`; `legacy/Install-SentruxVlangOverlay.ps1` | +| CodeNexus-lite | Hotspot localization, recent commits, reference hits; compatibility scan/lite/doctor surface | Deterministic derived localization view | Runner conditionally invokes `legacy/Invoke-CodeNexusLite.ps1` when a Sentrux target and script exist; exceptions only add a note; canonical provider route is `codenexus/lite` | Pipeline | `active-optional` | Medium: both manifest ids are optional compatibility entries and the canonical provider operation is optional/nonblocking; two manifest ids still share one implementation while the legacy `repowise/lite` provider alias is being retired | `codenexus-context.json` is a derived view, not independent provider fact or a semantic graph; Survival Scanner preserves localization when the adapter is unavailable | Keep canonical `codenexus/lite`, retire the compatibility alias after its transition window, and let a full CodeNexus or another provider conform to the artifact/provider port | `orchestration/integrations.json` ids `runtime.code-nexus-lite` and `localization.codenexus-lite`; `crates/code-intel-cli/src/providers.rs` operations `codenexus/lite` and deprecated `repowise/lite`; `legacy/run-code-intel.ps1` variable `$codeNexusLiteTool` and its nonblocking `catch` | | CodeNexus full provider boundary | Independent code/Git indexing, retrieval, perception and impact relationships | Observed provider evidence | None in current repository; only CodeNexus-lite artifacts and the ADR/vocabulary boundary exist | Independent provider owns runtime/storage; Pipeline owns Evidence Provider Port and cross-provider synthesis | `proposed` | Intended low coupling; actual adapter contract is not implemented | No shared database/internal model or lockstep release; observed output requires provenance/snapshot/freshness validation | Retain Survival Scanner and swap provider adapters; Pipeline remains operable when this provider is absent | `CONTEXT.md` definition “CodeNexus Evidence Provider”; `docs/adr/0010-tool-neutral-engineering-intelligence-core.md` decision text; `docs/code-intel-architecture.md` section describing `codenexus-context.json` | -| Greenfield | Behavioral-spec extraction, test vectors, acceptance criteria, clean-room provenance | External provider output and advisory/specification artifacts | a removed PowerShell wrapper (DR-0018); interactive Claude plugin only when explicitly requested | Pipeline owns adapter/manifest; Greenfield owns plugin execution | `active-optional` | Medium: Claude CLI/plugin command and workspace layout | Default scan cannot block on interactive Agent/plugin; generated specs require review and provenance | Replace plugin with non-interactive provider conforming to the same behavior-spec artifact contract, or keep plan-only handoff | `orchestration/integrations.json` integration id `spec.greenfield`; `docs/integration-orchestration.md` section “Greenfield Direction”; a removed PowerShell wrapper (DR-0018) schema `code-intel-greenfield-spec-extraction.v1` | -| Repomix | Whole-repository context pack in markdown/XML/JSON/plain | Derived materialized view; not fact authority | a removed PowerShell wrapper (DR-0018); runner calls it when installed and not skipped | Pipeline owns wrapper/output schema; upstream owns CLI | `drift-unregistered` | Low/medium CLI coupling | Pack can expose repository content; invocation must honor repository scope and local-only policy. No repository Reuse Record is present | Register as optional materialized-view provider or remove it; native inventory/Code Evidence remains fallback | `a removed PowerShell wrapper (DR-0018):3621`; `a removed PowerShell wrapper (DR-0018):3644`; `a removed PowerShell wrapper (DR-0018):42`; absent from `orchestration/integrations.json` | -| Native Code Evidence | Default files, symbols, chunks, imports, scorecard and Agent Code Slice | Observed code evidence plus deterministic derived slices | Internal functions in a removed PowerShell wrapper (DR-0018), beginning with `Get-CodeEvidenceLanguage` and `New-CodeEvidenceLayer` | Pipeline | `drift-unregistered` | High: embedded in the monolithic runner | Parser heuristics and coverage limits must remain explicit; v1 does not claim complete call-graph precision | Extract as a registered built-in Survival Scanner/code-evidence atom; keep stable artifacts so specialized providers can replace/augment it | `a removed PowerShell wrapper (DR-0018):1010`; `a removed PowerShell wrapper (DR-0018):1340`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; absent from `orchestration/integrations.json` | -| cocoindex-code | Optional richer Code Evidence adapter and A/B comparison candidate | External observed code evidence with typed optional outcome | Configured under `pipeline.config.json` and evaluated by `New-CodeEvidenceLayer`; disabled by default | Upstream tool owns implementation; Pipeline owns adapter outcome and comparison | `active-optional` | Low when disabled; command/artifact coupling when enabled; production participation is not registered centrally | Missing command must skip non-fatally unless future policy explicitly makes it required; evidence cannot silently replace native facts | Remove adapter without losing baseline evidence; another adapter may emit the same Code Evidence contract | `pipeline.config.json:8`; `a removed PowerShell wrapper (DR-0018):1433`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; `a removed PowerShell wrapper (DR-0018):154` | -| GitHub Solution Research | Searches upstream issues, PRs, repositories and examples for classified blockers | Advisory research dossier; never direct Engineering Fact or Adoption Decision | a removed PowerShell wrapper (DR-0018), conditionally invoked by runner only for eligible failure categories | Pipeline owns query construction/artifact; GitHub/`gh` provide external data | `drift-unregistered` | Medium: `gh` CLI, network, GitHub result schemas | Network results are untrusted reference evidence; authentication and external mutation are outside scanner authority | Register as optional research provider; disable/replace without affecting deterministic scan and diagnosis | `a removed PowerShell wrapper (DR-0018):3950`; `a removed PowerShell wrapper (DR-0018):266`; `CONTEXT.md:207`; absent from `orchestration/integrations.json` | -| OpenSpec / spec-kit / matt-flow / gstack | Recommends specification, planning, delivery and quality workflows from repo signals | Advisory output only | Duplicated detector in a removed PowerShell wrapper (DR-0018) and a removed PowerShell wrapper (DR-0018); no workflow is auto-authorized | Pipeline currently owns detector; named tools own their workflows | `drift-unregistered` | High: tool names/rules are embedded twice in the scanner control plane | Recommendation cannot initialize tools, create commitments, or write external trackers without explicit authority | Extract one registered, deterministic Workflow Recommender Advisory Atom; candidates become data/Method Implementations and can be added/removed independently | `a removed PowerShell wrapper (DR-0018):109`; `a removed PowerShell wrapper (DR-0018):3530`; `a removed PowerShell wrapper (DR-0018):2`; `CONTEXT.md:112` | +| Greenfield | Behavioral-spec extraction, test vectors, acceptance criteria, clean-room provenance | External provider output and advisory/specification artifacts | `legacy/Invoke-GreenfieldSpecExtraction.ps1 -RepoPath ... [-Analyze] -Json`; interactive Claude plugin only when explicitly requested | Pipeline owns adapter/manifest; Greenfield owns plugin execution | `active-optional` | Medium: Claude CLI/plugin command and workspace layout | Default scan cannot block on interactive Agent/plugin; generated specs require review and provenance | Replace plugin with non-interactive provider conforming to the same behavior-spec artifact contract, or keep plan-only handoff | `orchestration/integrations.json` integration id `spec.greenfield`; `docs/integration-orchestration.md` section “Greenfield Direction”; `legacy/Invoke-GreenfieldSpecExtraction.ps1` schema `code-intel-greenfield-spec-extraction.v1` | +| Repomix | Whole-repository context pack in markdown/XML/JSON/plain | Derived materialized view; not fact authority | `legacy/Invoke-RepomixCodePack.ps1`; runner calls it when installed and not skipped | Pipeline owns wrapper/output schema; upstream owns CLI | `drift-unregistered` | Low/medium CLI coupling | Pack can expose repository content; invocation must honor repository scope and local-only policy. No repository Reuse Record is present | Register as optional materialized-view provider or remove it; native inventory/Code Evidence remains fallback | `legacy/run-code-intel.ps1:3621`; `legacy/run-code-intel.ps1:3644`; `legacy/Invoke-RepomixCodePack.ps1:42`; absent from `orchestration/integrations.json` | +| Native Code Evidence | Default files, symbols, chunks, imports, scorecard and Agent Code Slice | Observed code evidence plus deterministic derived slices | Internal functions in `legacy/run-code-intel.ps1`, beginning with `Get-CodeEvidenceLanguage` and `New-CodeEvidenceLayer` | Pipeline | `drift-unregistered` | High: embedded in the monolithic runner | Parser heuristics and coverage limits must remain explicit; v1 does not claim complete call-graph precision | Extract as a registered built-in Survival Scanner/code-evidence atom; keep stable artifacts so specialized providers can replace/augment it | `legacy/run-code-intel.ps1:1010`; `legacy/run-code-intel.ps1:1340`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; absent from `orchestration/integrations.json` | +| cocoindex-code | Optional richer Code Evidence adapter and A/B comparison candidate | External observed code evidence with typed optional outcome | Configured under `pipeline.config.json` and evaluated by `New-CodeEvidenceLayer`; disabled by default | Upstream tool owns implementation; Pipeline owns adapter outcome and comparison | `active-optional` | Low when disabled; command/artifact coupling when enabled; production participation is not registered centrally | Missing command must skip non-fatally unless future policy explicitly makes it required; evidence cannot silently replace native facts | Remove adapter without losing baseline evidence; another adapter may emit the same Code Evidence contract | `pipeline.config.json:8`; `legacy/run-code-intel.ps1:1433`; `docs/adr/0007-code-evidence-layer-v1-boundary.md:3`; `legacy/scripts/tests/test-code-evidence-layer.ps1:154` | +| GitHub Solution Research | Searches upstream issues, PRs, repositories and examples for classified blockers | Advisory research dossier; never direct Engineering Fact or Adoption Decision | `legacy/Invoke-GitHubSolutionResearch.ps1`, conditionally invoked by runner only for eligible failure categories | Pipeline owns query construction/artifact; GitHub/`gh` provide external data | `drift-unregistered` | Medium: `gh` CLI, network, GitHub result schemas | Network results are untrusted reference evidence; authentication and external mutation are outside scanner authority | Register as optional research provider; disable/replace without affecting deterministic scan and diagnosis | `legacy/run-code-intel.ps1:3950`; `legacy/Invoke-GitHubSolutionResearch.ps1:266`; `CONTEXT.md:207`; absent from `orchestration/integrations.json` | +| OpenSpec / spec-kit / matt-flow / gstack | Recommends specification, planning, delivery and quality workflows from repo signals | Advisory output only | Duplicated detector in `legacy/run-code-intel.ps1` and `legacy/OpenSpec-Detector.ps1`; no workflow is auto-authorized | Pipeline currently owns detector; named tools own their workflows | `drift-unregistered` | High: tool names/rules are embedded twice in the scanner control plane | Recommendation cannot initialize tools, create commitments, or write external trackers without explicit authority | Extract one registered, deterministic Workflow Recommender Advisory Atom; candidates become data/Method Implementations and can be added/removed independently | `legacy/run-code-intel.ps1:109`; `legacy/run-code-intel.ps1:3530`; `legacy/OpenSpec-Detector.ps1:2`; `CONTEXT.md:112` | | qiaomu-goal-meta-skill / awesome-agent-loops | Goal authoring and choice of persistent execution-loop pattern before scanning/execution | Design reference and upstream task-contract input | No scanner invocation; documented Agent Goal Intake handoff (`/goal`, `/loop`, `/schedule`) | Agent-intake layer; external references retain implementation ownership | `reference-internalized` | None at scanner runtime | Goal/loop text cannot become repository evidence, gate result, or scanner state | Keep the internal Agent Goal Intake contract; swap or remove authoring catalogs without scanner changes | `docs/adr/0002-agent-goal-intake-outside-scanner.md:3`; `docs/agent-goal-intake.md:9` | | MetaHarness | Packaging/distribution pattern for branded CLI, host bundle, release gates, SBOM and provenance | Design reference | No runtime invocation | Harness/distribution layer, outside scanner | `reference-only` | None | Packaging must not own scanner facts or destabilize artifact consumers | Use any harness factory or direct release tooling; preserve scanner/artifact contracts | `docs/adr/0003-harness-factory-as-distribution-reference.md:3`; `docs/harness-factory-reference.md:18` | -| yao-meta-skill | Benchmark for trigger design, evaluation evidence, portability, release gates and failure libraries | Design/quality reference | Not executed; a removed PowerShell wrapper (DR-0018) verifies internalized benchmark surfaces | Pipeline owns its benchmark; upstream owns reference implementation | `reference-internalized` | None at runtime | Passing local documentation tests is not proof that upstream tooling ran or that runtime behavior conforms | Maintain internal benchmark or replace its reference source while preserving measurable quality criteria | `docs/adr/0004-yao-meta-skill-as-skill-development-benchmark.md:3`; `docs/skill-development-benchmark.md:20`; `docs/skill-development-benchmark.md:45` | -| Ponytail | Rejects unnecessary Agent-produced code/docs/config/abstraction/process; requires Necessity Trace | Governance policy/reference, not repository evidence | Vocabulary in `CONTEXT.md`; terminology checked by a removed PowerShell wrapper (DR-0018); no comprehensive runtime enforcement found | Pipeline policy | `reference-internalized` | Low conceptual coupling; runtime enforcement remains pending | It cannot justify skipping understanding, safety, evidence or verification; missing trace means reject output, not invent value | Preserve canonical policy and implement tool-neutral Necessity Trace gate; source project may be removed without semantic loss | `CONTEXT.md:22`; `CONTEXT.md:25`; a removed PowerShell wrapper (DR-0018); restored checkpoint `20260713-133502-code-intel-commitment-closure.md` | +| yao-meta-skill | Benchmark for trigger design, evaluation evidence, portability, release gates and failure libraries | Design/quality reference | Not executed; `legacy/scripts/tests/test-skill-development-benchmark.ps1` verifies internalized benchmark surfaces | Pipeline owns its benchmark; upstream owns reference implementation | `reference-internalized` | None at runtime | Passing local documentation tests is not proof that upstream tooling ran or that runtime behavior conforms | Maintain internal benchmark or replace its reference source while preserving measurable quality criteria | `docs/adr/0004-yao-meta-skill-as-skill-development-benchmark.md:3`; `docs/skill-development-benchmark.md:20`; `docs/skill-development-benchmark.md:45` | +| Ponytail | Rejects unnecessary Agent-produced code/docs/config/abstraction/process; requires Necessity Trace | Governance policy/reference, not repository evidence | Vocabulary in `CONTEXT.md`; terminology checked by `legacy/scripts/tests/test-skill-development-benchmark.ps1`; no comprehensive runtime enforcement found | Pipeline policy | `reference-internalized` | Low conceptual coupling; runtime enforcement remains pending | It cannot justify skipping understanding, safety, evidence or verification; missing trace means reject output, not invent value | Preserve canonical policy and implement tool-neutral Necessity Trace gate; source project may be removed without semantic loss | `CONTEXT.md:22`; `CONTEXT.md:25`; `legacy/scripts/tests/test-skill-development-benchmark.ps1`; restored checkpoint `20260713-133502-code-intel-commitment-closure.md` | | mattpocock/skills | Issue-tracker selection, triage vocabulary, domain-doc layout and delivery-flow concepts | Design/reference input to agent intake and recommender | No scanner runtime dependency; concepts appear in project-management docs and workflow detector | Pipeline owns absorbed concepts; upstream owns skills | `reference-internalized` | None at scanner runtime; medium conceptual coupling in recommender | Skills cannot replace scanner artifacts or silently create hosted work | Retain internal issue/triage/domain contracts; replace source reference or workflow candidate independently | `docs/adr/0006-project-management-support-as-agent-intake.md:3`; `docs/project-management-support.md:3`; `docs/openspec-detector.md:11` | | Linear | Optional hosted issue projection | External mutable project-management state, not engineering evidence authority | No scanner write path; external tooling only when explicitly requested or already authoritative | External tracker/project owner; Pipeline has no runtime ownership | `reference-only` | None in scanner; optional output projection only | Credentials stay outside repo; exactly one task-state authority; availability/quota cannot block Pipeline | Prefer existing Git-backed Work-OS/repo-native graph; stop projection or migrate deliberately without touching scanner artifacts | `docs/project-management-support.md:20`; `docs/agents/issue-tracker.md:10`; `docs/agents/issue-tracker.md:23`; `docs/adr/0008-local-first-project-control-plane.md:27` | | Obsidian / LLM Wiki | Knowledge view and, only for an already reviewed Git-backed Work-OS contract, possible task-state owner | Materialized knowledge/project-management view | No scanner runtime path; optional mirror/index/link workflow | External/local Work-OS owner; Pipeline owns only source artifacts | `reference-only` | None in scanner; optional output projection only | Never replaces scanner measurements; task authority must be explicit and singular | Remove/migrate wiki projection while retaining repo docs and artifact runs as technical evidence | `docs/project-management-support.md:12`; `docs/project-management-support.md:30`; `docs/adr/0008-local-first-project-control-plane.md:29` | | my-code-machine | Host-machine detection, organization, cleanup, checkpoint and sync capabilities proposed for a separate `machine` boundary | Control-plane effects and host-state observations | No merged `machine` crate exists; proposed Python-to-Rust migration only | Proposed Pipeline workspace `machine`/`sync` crates; current external Python project retains implementation | `proposed` | Unknown/high migration scope; no current runtime integration evidence | Host mutation/sync is distinct from target-repository scanning and requires explicit effect boundaries; big-bang rewrite is rejected by later ADR direction | Keep current tool operational until atom-by-atom parity; abandon merge without changing scanner contracts, or integrate behind separate CLI/crate boundary | `docs/adr/0001-merge-mcm-rust-unified.md:3`; `docs/adr/0001-merge-mcm-rust-unified.md:12`; current `crates/` contains only `code-intel-cli` and `code-nexus-lite` | -| diagnosis.hospital | Triage, disposition, protocols, treatment and surgery-plan routing | Deterministic derived diagnosis/materialized views | a removed PowerShell wrapper (DR-0018) constructs `hospital-report.json`, `hospital.md` and surgery-plan artifacts | Pipeline | `active-required` | High: diagnosis functions remain embedded in the large PowerShell runner | Diagnosis consumes admitted evidence and must fail closed when authoritative modalities are missing/untrusted; narrative is not the source of truth | Extract diagnosis atoms behind stable machine contracts; rebuild Markdown from JSON | `orchestration/integrations.json` integration id `diagnosis.hospital`; a removed PowerShell wrapper (DR-0018) functions prefixed `New-Hospital`; `docs/hospital-mode.md` | -| artifact.index-committed-only | Cross-repository discovery of the latest A07-committed Artifact Run | Derived, rebuildable materialized index | Rust `artifact index` route; a removed PowerShell wrapper (DR-0018) compatibility facade | Pipeline | `active-required` | Low: bounded local traversal plus A07 marker/manifest/Artifact Ref validation | Index is never artifact authority; staging, incomplete, forged, and legacy runs remain diagnostic-only in normal mode | Rebuild from committed runs; explicit `-LegacyCompatibilityMode` preserves rollback without deleting old data | `orchestration/integrations.json` integration id `artifact.index-committed-only`; `crates/code-intel-cli/src/artifact_index.rs`; `docs/committed-run-index.md` | +| diagnosis.hospital | Triage, disposition, protocols, treatment and surgery-plan routing | Deterministic derived diagnosis/materialized views | `legacy/run-code-intel.ps1` constructs `hospital-report.json`, `hospital.md` and surgery-plan artifacts | Pipeline | `active-required` | High: diagnosis functions remain embedded in the large PowerShell runner | Diagnosis consumes admitted evidence and must fail closed when authoritative modalities are missing/untrusted; narrative is not the source of truth | Extract diagnosis atoms behind stable machine contracts; rebuild Markdown from JSON | `orchestration/integrations.json` integration id `diagnosis.hospital`; `legacy/run-code-intel.ps1` functions prefixed `New-Hospital`; `docs/hospital-mode.md` | +| artifact.index-committed-only | Cross-repository discovery of the latest A07-committed Artifact Run | Derived, rebuildable materialized index | Rust `artifact index` route; `legacy/update-code-intel-index.ps1` compatibility facade | Pipeline | `active-required` | Low: bounded local traversal plus A07 marker/manifest/Artifact Ref validation | Index is never artifact authority; staging, incomplete, forged, and legacy runs remain diagnostic-only in normal mode | Rebuild from committed runs; explicit `-LegacyCompatibilityMode` preserves rollback without deleting old data | `orchestration/integrations.json` integration id `artifact.index-committed-only`; `crates/code-intel-cli/src/artifact_index.rs`; `docs/committed-run-index.md` | ## Reconciliation findings diff --git a/docs/project-orientation-benchmark.md b/docs/project-orientation-benchmark.md index a397a842..4cadf002 100644 --- a/docs/project-orientation-benchmark.md +++ b/docs/project-orientation-benchmark.md @@ -5,8 +5,7 @@ ## Run ```sh -cargo build -p code-intel -target/debug/code-intel.exe benchmark orientation --out artifacts/orientation-benchmark --repetitions 3 +cargo run -p code-intel -- benchmark orientation --out artifacts/orientation-benchmark --repetitions 3 ``` The output directory must not already exist. The runner writes: diff --git a/docs/runtime-ci-evidence.md b/docs/runtime-ci-evidence.md index 844bb2d4..eeb0392a 100644 --- a/docs/runtime-ci-evidence.md +++ b/docs/runtime-ci-evidence.md @@ -16,7 +16,7 @@ Snapshot mismatch and stale evidence produce a rejected summary with `health: un The stable `facts` array contains only conservative deterministic claims. Hospital/PET can consume the summary without learning provider-specific JSON and without converting absence into success. -The registered provider is invoked during a normal run. Hospital/PET cites the emitted `runtime-ci-summary.json`, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. +Ingestion is its own route: `code-intel provider runtime-ci-evidence --artifact-root --request --out ` reads the explicitly supplied request, then the local artifact. Hospital/PET cites the emitted `runtime-ci-summary.json`, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. ## Deliberate limits From 4ce4ea8153e62d7028b6fb70ac1a71819ee7e8ab Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 19:47:06 +0800 Subject: [PATCH 4/4] docs(#465): runtime-CI summary is read from the --out path Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018bnC1Tos5MvBbFEj5zzi51 --- docs/runtime-ci-evidence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/runtime-ci-evidence.md b/docs/runtime-ci-evidence.md index eeb0392a..bcadd7b5 100644 --- a/docs/runtime-ci-evidence.md +++ b/docs/runtime-ci-evidence.md @@ -16,7 +16,7 @@ Snapshot mismatch and stale evidence produce a rejected summary with `health: un The stable `facts` array contains only conservative deterministic claims. Hospital/PET can consume the summary without learning provider-specific JSON and without converting absence into success. -Ingestion is its own route: `code-intel provider runtime-ci-evidence --artifact-root --request --out ` reads the explicitly supplied request, then the local artifact. Hospital/PET cites the emitted `runtime-ci-summary.json`, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. +Ingestion is its own route: `code-intel provider runtime-ci-evidence --artifact-root --request --out ` reads the explicitly supplied request, then the local artifact. Hospital/PET cites the summary written to that `--out` path, reports health/freshness/completeness, and uses Sentrux evolution/what-if only as the fallback when no runtime/CI request was supplied. ## Deliberate limits