Skip to content

Implement constitutional RQGM and Manuscript Complete - #79

Draft
kotama7 wants to merge 49 commits into
mainfrom
RQGM
Draft

kotama7 wants to merge 49 commits into
mainfrom
RQGM

Conversation

@kotama7

@kotama7 kotama7 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What changed

  • completes the constitutional RQGM / Knowledge–Capability–Assurance branch and retains verified native GEMM, SpMM, and Stencil Harness evidence
  • implements the default-off Manuscript Complete compiler from exploration snapshots through readiness, bounded authoring briefs, repair/resume, publication decisions, and immutable locks
  • binds linear and RQGM archive authoring to one digest lineage and makes contextual-negative, forbidden-evidence, disclosure, claim, assurance, reproduction, and freshness failures non-compensable
  • adds permanent schemas, public read contracts, fixtures, evaluation, migration/rollback documentation, and a dedicated release-evidence workflow
  • retains the temporary Manuscript plans separately with their deletion criteria; they remain not deletable until remote CI, merge/release review, and post-merge review are complete

Why

Exploration previously had no single deterministic boundary guaranteeing that paper authoring received all applicable evidence, negative results, omissions, and assurance state. This change makes the exploration-to-publication handoff explicit, digest-bound, resumable, and fail-closed under enforce while preserving byte-compatible default-off behavior.

Impact

The feature is opt-in through manuscript.mode = off|audit|enforce; the default remains off. Existing RQGM, paper archive, Provider, and Harness ownership boundaries remain separate.

Validation

  • clean local release report for 712ea52bbbab4081d97ab1793608fdfb73b6340a: all 9 checks passed, release_eligible=true
  • report digest: sha256:dce4924ee33eeea7163c1049411725a809543db027223924f176c6ba64353a58
  • Manuscript Complete: 38 passed
  • authentic production Harness evidence: 2 passed
  • paper skill: 159 passed
  • tool registry: 102 passed, 1 skipped
  • public API boundaries: 19 passed
  • schema sync, public/CLI/MCP/viz snapshots, documentation links, and patch whitespace: passed
  • broad ari-core run reached 5283 passed, 15 skipped, 2 xfailed; its one promotion-lock boundary waiver mismatch was corrected and the affected boundary suites then passed

The manuscript-complete workflow reruns the closed four-topology / 13-failure-family manifest and retains the revision-bound report and logs as a 90-day Actions artifact.

kotama7 and others added 30 commits July 28, 2026 08:15
…nance seams

Snapshot of the RQGM branch work-in-progress (previously all uncommitted,
including the entire ari-core/ari/rqgm/ subsystem). See CHANGELOG.md
"Unreleased - Constitutional ARI-RQGM" for the full per-task record.

Latest batch - the governance mechanisms are now connected to the LIVE paths,
not merely defined:

- #76 the epoch's FROZEN utility_policy now drives real scoring: bind_evaluator
  + _apply_epoch_policy_to_scoring re-sync the LLMEvaluator composite/axis_weights
  and cfg.bfts at each epoch open (frozen within an epoch, evolves at boundaries).
- #77 the boundary RE-SCORES the surviving tree under the new criterion:
  FrontierRepairEngine.repair(new_utility_policy=...) re-weights each retired-
  policy node from its stored _axis_scores under the new composite/axis_weights
  (a deliberate, scoped reversal of "invalidate never re-weight"; empty
  axis_weights is a valid equal-weight re-score - the common composite_swap
  case; fail-closed to invalidation).
- #78a the governance judge recuses on self-adjudication (adjudicator != target).
- #78b the judiciary (auditor/evidence_clerk/governance_judge) are now FOUNDING
  components and therefore impeachable; new events.GOVERNANCE_ACTOR_ROLES third
  role category; governance_judge added to the capability matrix
  (CONSTITUTION_HASH 6643c12a510e -> 2edf93776904, re-pinned).
- #79 CK-REG-101 authority-non-expansion now compares candidate vs INCUMBENT on
  the live adoption path (RTE attaches the incumbent; the stateless kernel reads
  it and also fires on flag/target entries).

Verification: ari-core suite 4766 passed, scripts/tests 104 passed (incl.
check_docs_source_sync). A 6-epoch codex e2e confirms #76/#77/#78b fire live
(#77's boundary re-score was found broken live - empty axis_weights fail-close -
and fixed, re-verified: policy_rescored=5, invalidated=[]). #78a/#79 are wired
and unit-tested but structurally unreachable by the default emergent governance
(exploration adversaries implicate no role; mutators never widen authority) -
they require paper mode or a seeded precondition to exercise live.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Selective erasure was enforced only at expansion. `select_best_node` never
read `_valid_for_frontier`, so an erased node — its score produced under a
retired policy or prompt — could still become the paper candidate, the
archive seed, and the lineage grounding the paper's claims. The RQGM paper
gets this for free by deleting records; ARI erases logically for
auditability, which silently converted that guarantee into a per-consumer
filtering obligation. Plan 10 §3 recorded the obligation as an open question
that "must not be silently dropped". It was.

Closing it surfaced four more defects of the same class, and adversarial
review of the fixes caught three regressions I introduced while fixing them.

Selection and grounding
- `select_best_node` hard-excludes erased nodes; all-erased yields no winner
  rather than falling back to contaminated evidence.
- `build_verified_context` drops erased ancestors from the lineage (erasure
  does not propagate to descendants, so a valid winner can carry an erased
  parent), and `write_verified_context` deletes a stale artifact whose
  winner or lineage changed — the paper reads the file, not the fresh build.
- The working-context injection, `build_best_nodes_context`, the stagnation
  window, `build_lineage_state`, the run-best GUI cards, the score-jump
  parent lookup, and the skill-side winner resolvers all read the sentinel.

Paper-candidate escalation was never observational
- A judge-validated attack applies the bounded utility penalty, and every
  downstream re-selection sees it, so a penalized candidate could be
  replaced by a node that never received its own L3 round. Selection now
  runs to a fixpoint.
- The penalty lived only in memory while the round marker suppressed
  re-runs, so the same checkpoint produced different winners across
  invocations. `replay_utility_penalties` restores it deterministically from
  the durable records, skipping any the repair chain formally reversed.
- The pre-flight moved into the dispatch all three CLI entries share, so
  `ari run`/`ari resume` reach it. It is gated on the paper evidence
  existing: the one-shot marker spent on an empty bundle would permanently
  suppress the artifact-grounded round, so it defers to after the pipeline.

Memory
- `ari-skill-memory` reads the published erasure rollup itself: entries from
  an erased node come back labelled, not hidden — erasure withdraws the
  standing of a judgment, not the measurements — while grounded claim lists
  exclude. A cross-package test pins the field name, schema version and
  writer path, so a rename cannot turn the reader into dead code.

Governance wiring
- `_change` carries declared capabilities on succession edges, so
  CK-REG-101's incumbent comparison is reachable from the live adoption
  path; the transient kernel attachments are stripped from the audit event.
- The governance judge's self-adjudication recusal gets its first test.
- `paper_archive_state.json` journals a changed seed instead of leaving a
  silently stale record.

Repo state
- 504 README descriptions written from the actual sources.
- 24 docs re-verified against their declared sources: 82 corrections,
  including a guide that told users to use two config files that do not
  exist and a stage key the driver never reads.
- The complexity ratchet was failing unconditionally with 73 findings
  outside its baseline; refrozen, with the worst functions named rather
  than buried.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Quality Report

  • Generated (UTC): 2026-08-07T05:24:02Z
  • Repo: /home/runner/work/ARI/ARI
  • Checkers: 1 run, 7 unavailable
  • Findings: 23 total; 0 net-new vs baseline

Checkers

checker status findings allowlisted Δ new note
check_complexity unavailable 0 0 0 no JSON for check_complexity in quality-artifacts
check_import_boundaries unavailable 0 0 0 no JSON for check_import_boundaries in quality-artifacts
check_public_api_contracts error 0 0 0 unparseable JSON (check_public_api_contracts.json): Expectin
check_viz_api_schema ok 23 23 0
check_prompts unavailable 0 0 0 no JSON for check_prompts in quality-artifacts
check_dead_code unavailable 0 0 0 no JSON for check_dead_code in quality-artifacts
check_directory_policy unavailable 0 0 0 no JSON for check_directory_policy in quality-artifacts
check_bundle_budget unavailable 0 0 0 no JSON for check_bundle_budget in quality-artifacts

Areas

area LOC findings
ari-core/ari/agent 3883 0
ari-core/ari/assurance 4189 0
ari-core/ari/calibration 17 0
ari-core/ari/capability_binding 1699 0
ari-core/ari/cli 5776 0
ari-core/ari/clone 675 0
ari-core/ari/config 4393 0
ari-core/ari/configs 69 0
ari-core/ari/evaluator 1472 0
ari-core/ari/knowledge 2917 0
ari-core/ari/llm 2387 0
ari-core/ari/manuscript 5716 0
ari-core/ari/mcp 2537 0
ari-core/ari/memory 353 0
ari-core/ari/migrations 436 0
ari-core/ari/orchestrator 3430 0
ari-core/ari/pipeline 5526 0
ari-core/ari/prompts 431 0
ari-core/ari/protocols 902 0
ari-core/ari/providers 623 0
ari-core/ari/public 1230 0
ari-core/ari/publish 908 0
ari-core/ari/registry 511 0
ari-core/ari/rqgm 40885 0
ari-core/ari/schemas 20 0
ari-core/ari/viz 18313 23
ari-skill-benchmark/src 932 0
ari-skill-coding/src 883 0
ari-skill-evaluator/src 825 0
ari-skill-harness/src 191 0
ari-skill-idea/src 2998 0
ari-skill-knowledge/src 189 0
ari-skill-memory/src 3801 0
ari-skill-orchestrator/src 3642 0
ari-skill-paper/src 6087 0
ari-skill-paper-re/src 8502 0
ari-skill-plot/src 1019 0
ari-skill-replicate/src 2636 0
ari-skill-tool-registry/src 15749 0
ari-skill-transform/src 3859 0
ari-skill-vlm/src 976 0
ari-skill-web/src 1515 0

Dead code

  • Source: check_dead_code (status: unavailable)
  • Note: no JSON for check_dead_code in quality-artifacts
  • Baseline: scripts/quality/baselines/dead_code_baseline.json
  • Safe-to-delete surviving human review: 0
classification count
SAFE_DELETE_CANDIDATE 0
QUARANTINE_CANDIDATE 0
TEST_ONLY 0
DOCS_ONLY 0
DYNAMIC_REFERENCE_RISK 0
PUBLIC_CONTRACT 0
REVIEW_REQUIRED 0

kotama7 and others added 6 commits August 6, 2026 06:14
The evidence commit added the registration models, schema, config
fixtures, and test without extending the per-directory Contents
listings, so the readme-sync gate failed on four READMEs. Regenerated
with scripts/readme_sync.py --write; the change is purely additive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant