You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make joshyorko/rcc deliberately promotable through KubeStellar Hive's operational ACMM trust levels on a self-hosted Hive installation without confusing file-presence maturity signals with actual authorization to let agents change or merge RCC.
The goal is not to maximize an ACMM score. The goal is to make each increase in Hive authority earned by deterministic RCC repository controls.
The target end state is:
Hive observes RCC
↓
L1/L2 advisory work
↓
RCC deterministic quality gates become reliable
↓
L3 measurement / quality-gated issue creation
↓
security and workflow boundaries become mechanically enforced
↓
L4 security-aware PR creation
↓
risk classification + human merge controls are reliable
↓
L5 semi-autonomous hold-gated PRs
↓
RCC-specific deterministic merge policy + audit/kill switch
↓
selective L6 full autonomy where the repository can actually defend itself
This issue is an RCC repository-governance / automation program. It is independent of Environment Artifact identity and runtime architecture except where those areas define sensitive paths or required tests.
Important terminology: two different ACMM concepts exist
KubeStellar currently exposes two related but distinct maturity concepts:
Hive operational ACMM — six trust levels, L1 through L6.
This controls what Hive agents are permitted to do: advisory analysis, issue creation, hold-gated PR creation, and eventually merge-on-green behavior.
Codebase maturity scanning / file-presence criteria.
This can open [ACMM L…] issues based on recognized filenames/directories and repository patterns.
Do not treat satisfying a file-presence heuristic as proof that RCC is safe for the corresponding Hive operational permission.
Several existing scanner findings are already stale or structurally mismatched with RCC. Examples include criteria looking for a generic ci.yml even though RCC has a real OS Robot matrix in .github/workflows/rcc.yaml, or looking for web-style E2E directories even though RCC's executable acceptance layer is Robot Framework.
Policy: we may satisfy or close scanner criteria when they represent useful RCC practices, but we must not create dummy files, duplicate orchestration, or weaken existing architecture merely to move a dashboard score.
Hive operational trust model to design against
Use current Hive v4 semantics as the source of truth.
Hive level
Operational meaning for RCC
RCC stance
L1 — Inception
advisory guidance only
safe baseline
L2 — Advisory
broader advisory analysis, no GitHub writes
safe once repo guidance is coherent
L3 — Quality-Gated
measured operation; quality may create issues
requires trustworthy measurement/CI signals
L4 — Security-Aware
security-aware issue creation and selected hold-gated PR behavior
requires security gates and protected workflow boundaries
L5 — Semi-Autonomous
multiple agents may create hold-gated PRs; humans still merge
requires mechanical risk classification and branch protection
L6 — Fully Autonomous
eligible agent PRs may merge on green CI
requires RCC-specific deterministic merge policy, audit, recovery, and selective sensitive-path human gates
Promotion is always an operator decision. RCC should expose evidence that makes that decision defensible.
Current RCC evidence
Hive is not hypothetical here. A self-hosted Hive instance has already exercised RCC with advisory/measured/hold-gated agents and opened useful issues, including:
That is evidence that Hive can already discover meaningful work in RCC. The next step is not more permission by default; it is to make RCC's merge and evidence contract strong enough to trust that permission.
Gate 0 — establish the repository as the source of truth
Existing strengths to preserve:
AGENTS.md defines repository structure, toolkit-first development, testing, and durable-learning receipts.
docs/agent-boundaries.md and repository-local skills define agent behavior.
automated/generated ACMM heuristic issues are marked as operationally relevant, stale, satisfied, or not-applicable rather than left as an undifferentiated score backlog.
Operator precondition
Hive should use a repository-scoped GitHub App / allowlist even when agents are advisory, so later level changes do not require redesigning credentials.
L2 → L3 readiness — quality measurement must be real
L3 is where Hive begins relying on measured quality signals and may create issues from them. RCC must therefore have measurements that cannot be trivially false-green.
Coverage
Current RCC has a real Coverage gate, but the global line threshold is currently only 20%. A single global number is not sufficient for high-autonomy RCC.
Adopt a ratcheted model instead of blindly copying another repository's percentage:
repository-wide coverage must compile/run reproducibly after generating embedded assets;
no unexplained coverage regression from the protected baseline;
critical packages receive explicit floors separate from global coverage;
critical concurrency/security/lifecycle paths are tested even when line coverage appears adequate;
coverage result is uploaded/persisted as evidence that Hive can cite.
Suggested critical package set should include at least the active equivalents of:
environment artifact identity/validation;
artifact provider/CAS;
environment lifecycle/leases;
htfs relocation/materialization;
archive/bundle extraction;
settings/provider profile mutation;
release/version logic;
concurrency primitives used by worker execution.
Deterministic test gates
toolkit-first focused tests are canonical for agents;
go test ./... cannot false-green because generated assets are absent;
Robot acceptance matrix is required for behavior changes;
workflow syntax is validated before GitHub evaluates the workflow;
no required gate can pass solely by skipping the behavior it claims to test;
promotion receipts name exact SHA, commands, platforms, skipped gates, and artifacts.
Do not promote to L3 because a scanner finds a filename. Promote when the measurements are trustworthy.
L3 → L4 readiness — security and CI boundaries become mandatory
At L4, security-oriented agents can create issues and selected agents can begin hold-gated PR behavior. RCC's security pipeline must be reliable before granting that authority.
Immediate concrete gaps
CodeQL
The current CodeQL workflow still targets master while RCC's active branch is main.
change CodeQL push/PR targets to main;
verify the scan actually executes on a representative PR;
pin third-party actions by immutable SHA consistent with RCC's stronger workflows;
decide whether security-extended / quality queries are justified;
make the security result a required check for relevant changes.
Workflow self-protection
The main Rcc workflow currently ignores .github/workflows/** and .dagger/** path changes.
That is dangerous at high autonomy because an agent could modify the machinery that determines whether it is safe while avoiding the normal runtime suite.
add a workflow/meta-CI lane for workflow/Dagger changes;
run actionlint or equivalent deterministic workflow validation;
consider zizmor or another GitHub Actions security/static checker;
verify required-check names cannot disappear silently when a workflow file is changed;
ensure workflow changes receive human/CODEOWNER review at least through L5 and likely remain sensitive at L6.
Security baseline
create SECURITY.md;
keep CodeQL active on main;
add govulncheck / equivalent Go vulnerability checking;
validate dependency/action provenance and pinned third-party Actions;
Hive signs agent commits with DCO sign-off. RCC should mechanically check it if DCO is part of the repository contract.
add a DCO/sign-off required check or explicitly document why another provenance mechanism supersedes it.
L4 → L5 readiness — hold-gated PR autonomy
L5 means many Hive agents may create PRs, but humans still control merge. This is the ideal near-term operating level for RCC while the architecture is evolving quickly.
GitHub repository ruleset
Configure and document a main-branch ruleset equivalent to:
no direct pushes to main;
PR required;
required status checks are explicit and non-optional;
stale approvals are dismissed when head changes;
required checks must apply to the exact PR head;
unresolved review conversations block merge where useful;
administrators bypass only through an audited break-glass process;
force pushes/deletion disabled;
sensitive paths require a human/CODEOWNER approval;
hold-gated Hive PRs cannot merge until hold removal/human approval.
CODEOWNERS / sensitive paths
Treat at least these areas as Sensitive unless stronger evidence narrows them:
Maintenance and low-risk behavioral changes may become autonomous once the gate is proven. Sensitive changes should continue to require a human until there is very strong evidence to relax a specific class.
Sensitive/manual-by-default at L6 should initially include:
release/tag/publishing workflows;
changes to required checks/rulesets/risk policy itself;
credentials/auth/provider security;
archive extraction and path-security boundaries;
Manifest/Artifact identity or compatibility changes;
new external dependencies with executable/build-time behavior;
cross-platform compatibility claims;
deletion/retirement of legacy compatibility surfaces such as rccremote.
The level controls what Hive can do; RCC policy controls what a given change is eligible to do.
Merge queue / stale-green protection
Before autonomous merge:
configure GitHub merge queue or an equivalent serializing merge gate if available;
workflows required for merge support merge_group where GitHub merge queue requires it;
re-test against the synthetic merge result / latest target branch;
avoid a PR merging because it was green against a stale base while another autonomous PR changed the same assumptions.
Self-modifying CI protection
A PR must not be able to remove/weaken the check that decides the PR may merge.
branch/ruleset protects required workflow files;
CODEOWNER/human review protects policy and merge-gate changes;
checks are defined so changing workflow triggers a separate trusted validator;
privileged/release credentials are unavailable to untrusted PR execution.
Audit trail
Retain a durable receipt for autonomous merges containing at least:
Hive instance;
operational ACMM level;
agent role/backend/model where available;
source issue/task;
PR number;
exact head and merge SHAs;
change/risk class;
required checks and results;
coverage/security deltas;
hold/review decisions;
policy revision;
any human override/exception;
release side effects, if any.
Do not build a second agent orchestrator inside RCC merely to satisfy a codebase scanner criterion. Hive is already the orchestrator.
Demotion / kill switch
L6 is incomplete without a safe way to reduce authority.
Document and test the operator procedure to:
switch RCC from L6 → L5/L2 quickly;
disable merge authority without disabling observation;
revoke/rotate the Hive GitHub App installation/token;
stop/drain Hive contributors;
preserve open PR/evidence state;
recover after a bad autonomous merge.
Self-hosted Hive / k3s operator preconditions
These are not RCC source-code features, but they are part of the trust argument for allowing higher repository authority.
Before L5/L6 on the self-hosted k3s instance:
use a GitHub App installed only on authorized repositories rather than a broad PAT where possible;
keep RCC explicitly allowlisted;
use tier-scoped GitHub installation tokens;
verify Hive's full forced-egress proxy mode is active, not degraded/best-effort;
on Kubernetes/k3s, verify the Hive pod has the NET_ADMIN capability required by Hive's forced proxy-egress gate and that namespace Pod Security policy permits it;
use least-privilege ServiceAccount/RBAC;
keep provider/model secrets in Kubernetes Secrets or the configured local proxy path and out of agent-visible repo state;
pin the deployed Hive v4 image/revision and record upgrades;
back up Hive's durable state/config before changing operational ACMM level;
test a deliberate L5/L6 demotion before relying on L6 merge autonomy.
If forced-egress enforcement is not active, do not describe the instance as fully constrained merely because the repo allowlist exists.
Existing RCC issue graph this program should consume
Hive is already useful at this level: scanner, security, quality, CI-maintainer, architect, and guide agents can create work and PRs while a human remains the merge boundary.
Before considering L6, close the structural trust gaps in this issue.
Promotion evidence bundle
For every operator promotion, capture a short immutable receipt:
Outcome
Make
joshyorko/rccdeliberately promotable through KubeStellar Hive's operational ACMM trust levels on a self-hosted Hive installation without confusing file-presence maturity signals with actual authorization to let agents change or merge RCC.The goal is not to maximize an ACMM score. The goal is to make each increase in Hive authority earned by deterministic RCC repository controls.
The target end state is:
This issue is an RCC repository-governance / automation program. It is independent of Environment Artifact identity and runtime architecture except where those areas define sensitive paths or required tests.
Important terminology: two different ACMM concepts exist
KubeStellar currently exposes two related but distinct maturity concepts:
Hive operational ACMM — six trust levels, L1 through L6.
This controls what Hive agents are permitted to do: advisory analysis, issue creation, hold-gated PR creation, and eventually merge-on-green behavior.
Codebase maturity scanning / file-presence criteria.
This can open
[ACMM L…]issues based on recognized filenames/directories and repository patterns.Do not treat satisfying a file-presence heuristic as proof that RCC is safe for the corresponding Hive operational permission.
Several existing scanner findings are already stale or structurally mismatched with RCC. Examples include criteria looking for a generic
ci.ymleven though RCC has a real OS Robot matrix in.github/workflows/rcc.yaml, or looking for web-style E2E directories even though RCC's executable acceptance layer is Robot Framework.Policy: we may satisfy or close scanner criteria when they represent useful RCC practices, but we must not create dummy files, duplicate orchestration, or weaken existing architecture merely to move a dashboard score.
Hive operational trust model to design against
Use current Hive v4 semantics as the source of truth.
Promotion is always an operator decision. RCC should expose evidence that makes that decision defensible.
Current RCC evidence
Hive is not hypothetical here. A self-hosted Hive instance has already exercised RCC with advisory/measured/hold-gated agents and opened useful issues, including:
anyworkconcurrency/cleanup coverage gaps;journalcoverage only 11.3% in the measured run;That is evidence that Hive can already discover meaningful work in RCC. The next step is not more permission by default; it is to make RCC's merge and evidence contract strong enough to trust that permission.
Gate 0 — establish the repository as the source of truth
Existing strengths to preserve:
AGENTS.mddefines repository structure, toolkit-first development, testing, and durable-learning receipts.docs/agent-boundaries.mdand repository-local skills define agent behavior..github/pull_request_template.mdalready requires linked issue, observable behavior, safety impact, change class, exact verification, delivery truth, and documentation receipt.docs/change-classification.mddefinesMaintenance,Behavioral, andSensitivechanges.docs/review-rubric.mddefines correctness, compatibility, safety, verification, delivery truth, and scope review.Required corrections
SECURITY.mddescribing supported versions, vulnerability reporting, trust boundaries, and disclosure expectations.L1 → L2 readiness — advisory operation
L1/L2 agents cannot mutate GitHub, so the primary requirement is good context and deterministic local orientation.
Required RCC contract
AGENTS.mdexists and routes work through RCC's actual toolkit.Operator precondition
Hive should use a repository-scoped GitHub App / allowlist even when agents are advisory, so later level changes do not require redesigning credentials.
L2 → L3 readiness — quality measurement must be real
L3 is where Hive begins relying on measured quality signals and may create issues from them. RCC must therefore have measurements that cannot be trivially false-green.
Coverage
Current RCC has a real
Coverage gate, but the global line threshold is currently only 20%. A single global number is not sufficient for high-autonomy RCC.Adopt a ratcheted model instead of blindly copying another repository's percentage:
Suggested critical package set should include at least the active equivalents of:
htfsrelocation/materialization;Deterministic test gates
go test ./...cannot false-green because generated assets are absent;Do not promote to L3 because a scanner finds a filename. Promote when the measurements are trustworthy.
L3 → L4 readiness — security and CI boundaries become mandatory
At L4, security-oriented agents can create issues and selected agents can begin hold-gated PR behavior. RCC's security pipeline must be reliable before granting that authority.
Immediate concrete gaps
CodeQL
The current CodeQL workflow still targets
masterwhile RCC's active branch ismain.main;security-extended/ quality queries are justified;Workflow self-protection
The main
Rccworkflow currently ignores.github/workflows/**and.dagger/**path changes.That is dangerous at high autonomy because an agent could modify the machinery that determines whether it is safe while avoiding the normal runtime suite.
actionlintor equivalent deterministic workflow validation;zizmoror another GitHub Actions security/static checker;Security baseline
SECURITY.md;main;govulncheck/ equivalent Go vulnerability checking;Commit provenance
Hive signs agent commits with DCO sign-off. RCC should mechanically check it if DCO is part of the repository contract.
L4 → L5 readiness — hold-gated PR autonomy
L5 means many Hive agents may create PRs, but humans still control merge. This is the ideal near-term operating level for RCC while the architecture is evolving quickly.
GitHub repository ruleset
Configure and document a main-branch ruleset equivalent to:
main;CODEOWNERS / sensitive paths
Treat at least these areas as
Sensitiveunless stronger evidence narrows them:.github/workflows/**and release automation;.dagger/**and contained promotion tooling;common/version.go/ release versioning;htfs/**,remotree/**, archive/bundle extraction paths;Machine-readable risk classification
docs/change-classification.mdis a strong human contract. L5 needs mechanical enforcement too.Add a repository-local policy (format open) that can deterministically classify or escalate a PR using changed paths and declared behavior.
Minimum outcomes:
A small diff is not automatically low risk.
AI review evidence
L5 → L6 readiness — selective fully autonomous merge
Do not enable blanket L6 merely because the Hive dashboard says all criteria are present.
L6 means green CI can become merge authority. RCC therefore needs a deterministic RCC trust gate that is stronger than any individual agent.
RCC trust gate
Implement through repository CI and/or an RCC-specific deterministic Hive
hive-project.yamlpipeline stage.The gate should consume:
It should emit one machine-readable result:
Default L6 policy recommendation
Selective L6, not universal L6.
Maintenance and low-risk behavioral changes may become autonomous once the gate is proven. Sensitive changes should continue to require a human until there is very strong evidence to relax a specific class.
Sensitive/manual-by-default at L6 should initially include:
rccremote.The level controls what Hive can do; RCC policy controls what a given change is eligible to do.
Merge queue / stale-green protection
Before autonomous merge:
merge_groupwhere GitHub merge queue requires it;Self-modifying CI protection
A PR must not be able to remove/weaken the check that decides the PR may merge.
Audit trail
Retain a durable receipt for autonomous merges containing at least:
Do not build a second agent orchestrator inside RCC merely to satisfy a codebase scanner criterion. Hive is already the orchestrator.
Demotion / kill switch
L6 is incomplete without a safe way to reduce authority.
Document and test the operator procedure to:
Self-hosted Hive / k3s operator preconditions
These are not RCC source-code features, but they are part of the trust argument for allowing higher repository authority.
Before L5/L6 on the self-hosted k3s instance:
NET_ADMINcapability required by Hive's forced proxy-egress gate and that namespace Pod Security policy permits it;If forced-egress enforcement is not active, do not describe the instance as fully constrained merely because the repo allowlist exists.
Existing RCC issue graph this program should consume
Runtime / product safety
Hive-discovered operational gaps
Do not duplicate those issues here. This issue defines the autonomy gate that consumes their outcomes.
Codebase-maturity scanner issue triage
Review the existing
[ACMM L…]dashboard issues separately and classify each as:Examples that should be re-evaluated immediately because equivalent RCC artifacts now exist include:
Examples that should not automatically be implemented merely to satisfy filenames include:
AGENTS.mdand repository-local skills are canonical;Recommended promotion sequence
Near term
Operate RCC at L5 hold-gated, not L6.
Hive is already useful at this level: scanner, security, quality, CI-maintainer, architect, and guide agents can create work and PRs while a human remains the merge boundary.
Before considering L6, close the structural trust gaps in this issue.
Promotion evidence bundle
For every operator promotion, capture a short immutable receipt:
Promotion should be reversible.
Acceptance
L3-ready
L4-ready
mainand actually run;SECURITY.mdand security boundaries exist;L5-ready
main;L6-eligible
Non-goals
Sensitivechange L6-mergeable.