Repository navigation
docs(governance): add the orchestration governance proposal and merge plan - #375
Conversation
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
tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth
tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth
…ne fix The published commit 5d8a0b6 already carries the complete rewrite. This merge is forward-only and reconciles the one-line trailing-newline difference without rewriting published history. tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: restore fast-forward parity with origin without force-push
…olved conflicts The recomputed residuals (recomputed against origin/master 2aea04d via git merge-tree --write-tree) now cover 12 open PRs in the KCode stack. The four PRs previously flagged as needing hand-resolved conflicts (#140, #127, #157, #158) have already been merged against origin/master by a parallel agent as real 2-parent merge commits at d6e4cfa, b6508e6, 264c09a, and 47b42e2 respectively; merge-tree reports zero conflict markers for all four. Two new PRs (#163 transport pipe-stem, #164 CI timeout headroom) extend the stack to 12. The CI Quality Guardrails clippy gate has a coverage gap that no existing PR fixes: the command is 'cargo clippy --all-targets --all-features -- -D warnings' with no --workspace, so exactly one workspace member (jcode-sdk) is unreachable from the root package and is never linted. In the green run id 39390720989 the cargo test -p jcode-sdk parity step still emitted the 'never used' warning for the Subscriber alias at crates/jcode-sdk/src/client.rs:330. The --workspace change is NOT a no-op and may surface additional pre-existing violations; this is recorded as an OPEN RISK, not a resolved fact. The KCode self-hosted runner desk-kcode-1 wedged on 2026-10-21 in the Build & Test (desk-linux) job of run 39530002307. Root cause: the desk WSL2 instance is capped by .wslconfig at memory=16GB (not the 64GB the Windows host has), was competing with a 1h43m orphaned cargo llvm-cov --workspace job, and the Build step in .github/workflows/ci.yml has no per-step run_with_timeout.py wrapper. Remediation (terminating the orphan) brought memory from 13.9/16 GB to 9.4/16 GB and recovered the runner. Detailed conflict resolutions and the runner wedge root-cause analysis moved to a new companion file 05a_MERGE_EVIDENCE.md so the plan itself fits the 500-line cap. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-19-orchestration-governance/ tx-intent: Refresh the merge plan against recomputed 12-PR residuals + 4 applied conflict resolutions + clippy coverage gap + runner wedge
|
Warning Review limit reachedYou'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 59 minutes. View limit details
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. |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
|
|
|
||
| ## 1. Problem statement | ||
|
|
||
| The "management-only root lane" rule (verbatim operator, 2026-10-11 21:08: "use subagents ALWAYS, main ctx strictly must only be management\high level ctx") is **written down** in `~/AGENTS.md` and in `~/.jcode/memories/global/harness-agents.md`, but it is **not enforceable** in any harness today. Three independent failure modes recur: |
There was a problem hiding this comment.
WARNING: Typo in verbatim operator quote: "management\high level ctx" uses backslash instead of separator
The quote reads management\high level ctx — the backslash is likely a typo for / (management/high level) or or (management or high level). This appears in the Problem Statement quoting the operator directive from 2026-10-11.
|
|
||
| ### 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`." |
There was a problem hiding this comment.
SUGGESTION: Noisy command regex may match too broadly
Pattern git log\b.*-[0-9]{2,} would match git log --oneline -5 (single digit) because .* is greedy and - in --oneline satisfies the - before digits. Consider git log\b(?:\s+\S+)*\s+-[0-9]{2,}\b to match a trailing -N argument more precisely.
| |---:|---|---:|---:|---|---| | ||
| | #160 | `fix/sdk-typescript-kcode-assertions` | 7 | +18 | yes | **MERGE.** Recommended SDK PR. Strict superset of #148. | | ||
| | #152 | `fix/cli-exit-status-kcode-bin` | 1 | +3 | yes | **MERGE.** Real env-var fix; see section 2.1. | | ||
| | #145 | `docs/orchestration-governance-docs-only` | 2 | +675 | yes | **MERGE.** This document. | |
There was a problem hiding this comment.
WARNING: Table lists PR #145 as "2 files" but PR changes 3 files
Section 2 table shows #145 | docs/orchestration-governance-docs-only | 2 | +675. However, this PR modifies 04_ORCHESTRATION_GOVERNANCE_PROPOSAL.md and 05_MERGE_INTEGRATION_PLAN.md AND creates new file 05a_MERGE_EVIDENCE.md (3 files total, 966 insertions per PR description). The "true residual" count should reflect all 3 files or explain why 05a is excluded.
|
|
||
| These are binding for every step in this document and for any agent acting on it. | ||
|
|
||
| Forbidden: |
There was a problem hiding this comment.
CRITICAL: Binding constraints forbid gh pr merge/gh pr close but operator action list requires them
Section 8 (lines 349-362) lists gh pr merge and gh pr close as Forbidden commands for "every step in this document and for any agent acting on it." However, Section 6.1 (Merge, in this order) and 6.2 (Close) explicitly instruct the operator to merge 9 PRs and close 3 PRs — which requires exactly those forbidden commands. This contradiction must be resolved: either the constraints apply only to agents (not operators) and should say so, or the operator actions need different tooling.
| @@ -0,0 +1,499 @@ | |||
| # Merge Integration Plan - KCode PR Stack (2026-10-21T05:46Z) | |||
There was a problem hiding this comment.
SUGGESTION: Add historical context note — documents are dated Oct 2026 but PR created Nov 2026
The document header shows Date: 2026-10-21 and 2026-10-21T05:46Z but the PR was opened 2026-11-27 during a branch-retirement pass. Readers may be confused by the "future" date. Consider adding a line: Note: This document was originally written 2026-10-21 and recovered from branch docs/orchestration-governance-docs-only during 2026-11-27 branch retirement. (Applies to all three files in this session.)
| Verified against the green CI run GitHub Actions run id `39390720989`, | ||
| job `Quality Guardrails`: | ||
|
|
||
| - The clippy step runs `cargo clippy --all-targets --all-features -- -D warnings`. |
There was a problem hiding this comment.
SUGGESTION: Specify exact CI workflow file and step name for clippy command
Section 5.1 states the clippy step runs cargo clippy --all-targets --all-features -- -D warnings without --workspace. For verification, it would help to cite the exact workflow file (likely .github/workflows/ci.yml) and job/step name so operators can confirm the current command and the proposed --workspace change location.



User description
Salvage
This branch was found during the 2026-11-27 branch-retirement pass and is
not contained in
master. It is opened here so the work is reviewable anddoes not silently rot as a remote ref.
Evidence it is not redundant (all three must hold; see
host-ops/kcode-branch-retirement):git merge-tree --write-tree origin/master origin/docs/orchestration-governance-docs-onlyproduces a tree thatdiffers from
origin/master(so merging it changes master).origin/master's historyof the paths it touches.
Size: 3 file(s), 3 files changed, 966 insertions(+).
Review this as a normal contribution. It is not auto-merged, and the branch is
kept until someone decides.
Recovery/identity: the branch is
docs/orchestration-governance-docs-onlyat815e3b9fe8e3c76ba6173d50916b1009492f9d98.tx-agent: jcode
CodeAnt-AI Description
Document cross-harness orchestration proposals and the current KCode PR merge plan
What Changed
Impact
✅ Clearer KCode PR merge order✅ Fewer unnecessary conflict-resolution steps✅ Runner and CI risks documented for operators💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.
Refs #143