Skip to content

Propose add-substantive-review-lane: governed council review for substantive PRs - #178

Merged
brettheap merged 8 commits into
mainfrom
change/add-substantive-review-lane
Aug 22, 2026
Merged

brettheap merged 8 commits into
mainfrom
change/add-substantive-review-lane

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Problem

Governed xFactory repos carry review-required rulesets, but the only ways past them today are a human review or an --admin bypass. A governed, accountable AI reviewer EXISTS and is live — but only for one narrow lane: codexFactory's gate_rules_council + merge_readiness_council + Merge Master machinery proved fully autonomous council deliberation on 2026-08-14 (three seats, written rationales, unanimous READY, a signed check-run, a real GitHub approval — xFactory PRs #85 and #100). But its one rules-as-code candidate class (doc-health-nightly in .github/merge-approval-envelope.yml) is scoped to expected_author: openxfactory[bot], expected_head_ref: doc-health/nightly, path_allowlist: [health/**], target_repos: [opensoft/xFactory], with the single council-clearable condition docs_only_path_overflow. No human-authored PR, no other agent-authored PR, and no other repo — including openxFactory itself, which has no merge-master workflow or council instantiation at all — can ever receive a council-cleared approval.

This proposal generalizes the proven machinery so substantive PRs (human- and agent-authored) across governed xFactory repos receive a team-member-equivalent, accountable, policy-and-best-practices review from Hermes-stack personas — replacing --admin bypasses, never bypassing gates itself.

Decided principles (encoded as requirements)

  1. Councils judge; Merge Master stays the mechanical enforcer — the generalization adds candidate classes and council scope, never moves judgment into the enforcer.
  2. Accountability is the product — every seat writes a rationale; the verdict transports as a signed, identity-bound check-run; an audit artifact records inputs/rules-version/verdicts; the approving review is cast by a dedicated reviewer/merge-master App identity, never GITHUB_TOKEN, never the author's identity.
  3. Identity separation — the reviewing council and enforcing identity must be distinct from the PR author's identity (human or agent); review rules always evaluate from the base branch.
  4. Fail-closed — outside a defined candidate class, non-unanimous/conditioned verdict, stale/missing rule set → no approval, park with explanation; needs_human_review always available; some classes may be declared human-only.
  5. Substantive candidate classes — the gate_rules_council (with its tenant company-policy-lead seat) defines per-repo candidate classes with risk tier + clearance rule, reviewing for company-policy compliance AND domain best practices.
  6. Pilot — opensoft/openxFactory reviewed by codexFactory's councils (software-engineering domain reviewing the engineering-contracts repo), then extended per adoption.

Open questions (declared, not decided)

  • Rollout order beyond the pilot; which repos next.
  • Persona home for non-engineering domain repos (Medx/Ledgerx/Ops/Adx own personas, or does codexFactory review all software changes regardless of repo?).
  • Whether the company-policy-lead seat joins per-PR councils or stays rules-only.
  • Ruleset interaction shape per repo (App approval satisfying required-review vs required check-run; human review as an alternate path).
  • Risk-tiering taxonomy (docs-only / config / contract / runtime-code) and which tiers are ever autonomous.

What changed

  • roles-authority-model: six ADDED requirements (substantive review authority generalization; gate-rules-council-defined candidate classes; substantive review accountability; reviewer/enforcer identity separation from the author; fail-closed substantive review envelope; pilot repository and reviewing domain).
  • design.md records the structural choice (roles-authority-model over workflow-gate-contract or a new capability — see below), the candidate-class/risk-tier model, and why the proven check-run/APPROVE transport is reused unchanged.
  • tasks.md: contract delta (this PR's own surface) → codexFactory instantiation → aggregation/workflow realization → pilot-repo wiring + records, all downstream sections marked as successor realization, not performed by this change.
  • README's OpenSpec Records active-changes block lists the new change.

Structural choice flagged for review: the six requirements land as ADDED requirements on roles-authority-model (not workflow-gate-contract, which owns the DTN-001/002 domain-internal workflows/*.yaml gate schema — a different mechanism from GitHub-facing council/Merge Master enforcement — and not a new capability, since every needed concept already lives in roles-authority-model: Merge Master, the low-risk envelope, GitHub App identity tiers, the escalation ladder). See design.md Decision A.

Validation

$ OPENSPEC_TELEMETRY=0 openspec validate add-substantive-review-lane --strict
Change 'add-substantive-review-lane' is valid

$ OPENSPEC_TELEMETRY=0 openspec validate --all --strict
Totals: 59 passed, 0 failed (59 items)

scripts/doc-health.py --single-repo .: identical finding counts before and after this change (3 critical, 6 error, 39 warning, 3 info; 0 new regressions) — no new findings introduced.

This is a proposal PR only — do not merge. Ratification and the five open questions above are for review.

🤖 Generated with Claude Code

…tantive PRs

Generalizes codexFactory's proven gate_rules_council + merge_readiness_council
+ Merge Master machinery (live autonomous deliberation 2026-08-14, xFactory
PRs #85/#100) beyond its single rules-as-code candidate class
(doc-health-nightly / docs_only_path_overflow) into a named substantive
review lane spanning governed xFactory repos: six ADDED requirements on
roles-authority-model covering authority generalization, gate-rules-council
candidate classes, accountability, reviewer/enforcer identity separation,
the fail-closed envelope, and a codexFactory-reviewed openxFactory pilot.
Rollout order, non-engineering persona homes, company-policy-lead per-PR
seating, per-repo ruleset shape, and risk-tiering taxonomy are declared open
questions, not decided.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 15, 2026 03:49

@sourcery-ai sourcery-ai Bot 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.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

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.

Pull request overview

This PR introduces a new OpenSpec proposal/change package (add-substantive-review-lane) that generalizes the existing council + Merge Master pattern from a single narrow “docs-only nightly” candidate into a governed lane intended to cover substantive (human- and agent-authored) PRs across governed xFactory repos, starting with a pilot for opensoft/openxFactory.

Changes:

  • Adds a new OpenSpec proposal (proposal.md) and design rationale (design.md) describing the generalized substantive review lane, principles, and open questions.
  • Adds a new roles-authority-model spec delta defining six ADDED requirements covering authority, candidate classes, accountability, identity separation, fail-closed behavior, and pilot scope.
  • Registers the proposal in the repo’s “OpenSpec Records” (README) and adds a tasks checklist and .openspec.yaml metadata for the change.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Adds the new proposal to the “Active changes” OpenSpec Records block.
openspec/changes/add-substantive-review-lane/tasks.md Adds execution/realization task breakdown for the proposal and downstream repos.
openspec/changes/add-substantive-review-lane/specs/roles-authority-model/spec.md Defines the six new roles-authority-model requirements for the substantive review lane.
openspec/changes/add-substantive-review-lane/proposal.md Adds the proposal text, scope, rationale, and declared open questions.
openspec/changes/add-substantive-review-lane/design.md Records key structural decisions (spec home, tier model, transport reuse, seat scope, pilot scope).
openspec/changes/add-substantive-review-lane/.openspec.yaml Adds OpenSpec change metadata and provenance/authorization context.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +97 to +101
An enforcer acting under the substantive review lane SHALL approve a pull
request only when it matches a `gate_rules_council`-defined candidate class
AND the `merge_readiness_council`'s verdict is unanimous ADMIT with no
undispositioned conditions AND the low-risk enforcement envelope otherwise
holds; any pull request outside a defined candidate class, any non-unanimous
brettheap added a commit that referenced this pull request Aug 15, 2026
…al's open questions (#179)

add-substantive-review-lane (PR #178, ad-hoc origin, Status: draft) declares
five open questions but doesn't decide them. This topic gives them a durable
staging home so they iterate and surface on the ideation dashboard while the
proposal awaits ratification, mirroring manager-review-approval-scope-kind's
tracking pattern. Explicitly NOT the proposal's origin -- the proposal's own
.openspec.yaml records ad_hoc, created before this topic existed.

Co-authored-by: brettheap <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
brettheap and others added 5 commits August 22, 2026 15:18
change/* branches refuse force-push, so this is a merge, never a rebase.

Exactly one conflicted file: README.md's "OpenSpec Records" block. Resolved
by taking origin/main's active list whole — main had already moved
add-client-identity-roster and add-worker-credential-by-reference out of
"Active changes:" and into "Archived changes:" (lines 1099 / 1141), so both
rows are kept, just where main put them — and re-inserting this branch's new
add-substantive-review-lane row in the list's own reverse-chronological
position by authoring date (2026-08-15: after add-doxbench-editing-phase-b,
authored 2026-08-18, and before add-dispatch-credential-contract,
2026-08-13). No row is lost and no row's text is altered by this commit.

Co-Authored-By: Claude Fable 5 <[email protected]>
Brett Heap ruled all five of the proposal's declared-open questions
in-session on 2026-08-22, against a written recommendation set. Two rulings
departed from the recommendation and are marked as such wherever they land.

proposal.md
- "Open questions (declared here, not decided)" becomes "Decided questions
  (ruled by Brett Heap 2026-08-22)": each question carries its ruling, the
  requirement that encodes it, and the route it took (proposal edit, or a
  named follow-up path).
- Status header still says draft — the rulings settle the questions, not the
  ratification, which stays Brett's separate read.
- What Changes / Modified Capabilities go six ADDED requirements -> ten; the
  downstream-realization list gains the merge-readiness conditional seat and
  the Q4-decided ruleset shape; Out of scope now names only the two
  deliberately deferred residues.

specs/roles-authority-model/spec.md — 6 requirements -> 10, 30 scenarios
- Q1 -> NEW "Adoption beyond the pilot qualifies on recorded evidence": the
  evidence bar (>=3 council-cleared substantive PRs across >=2 candidate
  classes, zero enforcer incidents, one completed gate-rules review cycle)
  and the engineering-owned-before-domain ordering principle. The order
  itself stays with a named follow-up change.
- Q2 -> "Pilot repository and reviewing domain" rewritten: codexFactory's
  councils review substantive PRs in EVERY adopting repo, no domain repo
  instantiates personas for this lane, and the tenant company-policy-lead
  seat carries the policy dimension. The persona-home FORK is what is
  removed; the adoption-change-per-repo mechanism survives, now affirming
  codexFactory as reviewer.
- Q3 -> NEW "Company-policy seat participation in per-PR councils":
  rules-council-only by default; a candidate class MAY declare a
  company-policy pull-in condition, defined by the gate_rules_council at
  class-definition time and never per PR; a pull-in class whose convening
  cannot seat it is refused and parked.
- Q4 -> NEW "Ruleset interaction shape for the substantive review lane": the
  App's real APPROVE satisfies required review, the council-verdict check-run
  is transport only and never a ruleset satisfier, human review stays an
  always-available alternate path on every repo, divergence needs its own
  recorded decision.
- Q5 -> NEW "Constitutional floor for autonomous clearance": the ratified
  never-clearable floor is tier-independent and unoverridable by unanimity;
  contract bytes, gate/workflow definitions, credential surfaces and security
  posture are permanently human-only; autonomous clearance is eligible only
  for docs-/derived-artifact-shaped blast radii. The tier VOCABULARY is
  explicitly deferred in the requirement's own text.

design.md — decisions updated, history kept, nothing deleted
- Decision B AMENDED by Q5 (declare-presence still stands; a constitutional
  floor is added beneath it, on the omnigent constitutional-false precedent).
- Decision C AMENDED by Q4 (the per-repo shape is no longer open).
- Decision D marked SUPERSEDED IN PART, its 2026-08-15 text kept verbatim as
  the reason the rules-only posture is now the DEFAULT, with the superseding
  ruling recorded after it and the three properties that bound it.
- Decision E AMENDED by Q1+Q2 (its stated reason for deferring order is
  discharged; the deferral is now evidence-based, with the bar recorded).
- Decision F ADDED for Q2, which had no decision entry of its own — records
  the recommendation, Brett's override, and the residual risk he accepted.

tasks.md
- 1.2 flipped to done (the questions are ruled and encoded); the ratification
  gate becomes its own 1.3, still open and still Brett's.
- 2.1 / 6.1 / 6.3 recount to ten; 3.1 gains the Q5 floor as enforced data;
  3.3 becomes the Q3 pull-in realization; 5.1 wires the decided Q4 shape.

README.md OpenSpec Records row restated to match, still not-yet-ratified.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot's real finding on PR #178: the "Fail-closed substantive review
envelope" requirement conditions approval on "unanimous ADMIT", while the
enforcer that realizes this lane checks verdict `ready` plus unanimity. Read
literally, that is two different conditions and one of them is unimplemented.

It is not two conditions — it is two layers' words for one. ADMIT is the
neutral roles-authority-model verdict word, and the already-promoted
"Low-risk enforcement envelope" requirement uses exactly it ("any
policy-required governed review verdict is ADMIT with no undispositioned
conditions", openspec/specs/roles-authority-model/spec.md:81). READY is
codexFactory's enforcement-layer word for the same state.

Fixed by stating the mapping in the requirement rather than by silently
swapping one word for the other: the requirement now says the codexFactory
realization expresses ADMIT as `verdict == ready` AND unanimous, that an
enforcer checking ready+unanimous IS checking unanimous ADMIT, and that the
two words MUST NOT be read as two conditions. A scenario pins it, and makes
explicit that no realization is required to invent an ADMIT-named verdict
value of its own.

Swapping the neutral word for the enforcement word would have been the other
available fix and is deliberately not taken: it would push a codexFactory
vocabulary into a domain-neutral capability and break the term's agreement
with the requirement it sits beside.

Co-Authored-By: Claude Fable 5 <[email protected]>
Brett Heap ruled all five in-session 2026-08-22. Each question is rewritten
into the ratified staged-topic outline form (`### Qn.` with Context /
Recommended answer / Explanation / Disposition status / Added-by) and carries
its disposition: the ruling condensed, the date, who ruled it, and the ROUTE
it took — proposal edit, named follow-up path, or both.

Q1 rollout order: ruled as recommended — order deferred to a named follow-up
change on pilot evidence; the evidence bar and the engineering-before-domain
ordering principle decided now.
Q2 persona home: ruled, recommendation OVERRIDDEN — codexFactory reviews
every governed repo, zero new persona homes.
Q3 company-policy-lead seating: ruled, a bounded THIRD option — rules-only
default with a per-class declared pull-in, defined by the gate-rules council
at class-definition time, fail-closed for those classes.
Q4 ruleset shape: ruled as recommended — the proven shape everywhere.
Q5 risk tiers: ruled as recommended — constitutional floor now, vocabulary
deferred.

Two sections the ratified outline template requires and this fragment lacked
are added with real content rather than placeholders, which also clears its
standing `staged-topic-template` warning ("no pre-document idea notes
section; no conflicts section"): Idea notes carries the two realization facts
booked into the proposal's tasks.md, the unresolved one-or-two-follow-up-
changes question, and Q3's unrequested generality; Conflicts names the three
real tensions this closure does NOT resolve — Q2's override against the
domain-standing objection the recommendation was built around, Q3's exception
against the councils' own "PERMANENTLY DISTINCT" 2026-07-22 wording, and Q3
against design.md Decision D as authored.

The honesty note gains the mechanical reason this topic cannot exit the way
the two prior exited topics did: `proposal-support.py transition` REFUSES to
move it into the proposal's supporting-docs/, because the packet declares
`kind: ad_hoc` and a transition would have to declare `kind: staged`
("origins are immutable"). The Exit section records that, and how the topic
retires instead.

Checkers on the final state: `_template_gaps` -> [], `_staged_exit_changes`
-> []. Full doc-health `--single-repo . --as-of 2026-08-22`: 4 critical,
6 error, 77 warning, 3 info; 0 new vs the same-clock origin/main baseline at
ca0b905 (4/6/78/3) — one warning fewer, none new.

Co-Authored-By: Claude Fable 5 <[email protected]>
The topic's own Exit said it closes once all five questions carry a
disposition. Brett ruled all five 2026-08-22, the dispositions landed in the
fragment (previous commit f1acf0d), so the condition is met and the folder
is retired.

The retirement route is NOT the one the two prior exited topics took. Both of
those moved their material into a change's `supporting-docs/` via
`scripts/proposal-support.py transition`. That is impossible here, by design:
the tracked proposal declares `origin.kind: ad_hoc`, a transition must
declare `kind: staged`, and transition() refuses the disagreement outright
("origins are immutable"). The refusal is correct — this topic never was the
proposal's origin, and its honesty note has said so since capture — so the
fragment is NAMED rather than linked, with its commit, path, and file sha256
recorded in the INDEX detail section and a `git show` line that recovers it.

INDEX.md, following the doxbench-editing-model precedent:
- The table row is KEPT and flipped to the exit-record form, carrying all
  five rulings in condensed form and marking the two that departed from the
  recommendation (Q2 overridden, Q3 a bounded third option).
- The detail section's Files bullet becomes the retirement record with the
  named provenance and the reason the supporting-docs route was unavailable.
- The Open questions bullet becomes five dispositions, each with its route in
  brackets (proposal edit / named follow-up path).
- A new bullet names the three conflicts the retired fragment recorded and
  this closure does NOT resolve, so they survive the folder: Q2's residual
  domain-standing objection, Q3's inconsistency with the councils' own
  "PERMANENTLY DISTINCT" wording, and Q3 against design.md Decision D.
- The Exit bullet states what the closure did NOT do: the tracked proposal
  stays `Status: draft`; ratification is Brett's separate read.

The "Full promotion — delete the row" maintenance rule is deliberately not
followed and the deviation is stated in the row itself: nothing was promoted,
and there is no promoted-proposal pointer in ideation/README.md to carry the
record instead.

doc-health `--single-repo . --as-of 2026-08-22` after the retirement:
4 critical, 6 error, 77 warning, 3 info; 0 new vs the same-clock origin/main
baseline at ca0b905 (4/6/78/3). The one warning that disappeared is the
retired fragment's own `staged-topic-template` finding. No finding mentions
the topic.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 22, 2026 19:42
@brettheap

Copy link
Copy Markdown
Contributor Author

Brett's five rulings encoded; ADMIT/READY closed; main merged; the staging topic closed

Still Status: draft. Nothing here ratifies this change. The rulings settled the five parked questions; ratification of the requirement set is a separate read.

The five questions, ruled by Brett Heap in-session 2026-08-22

Three took the written recommendation. Two departed from it and are marked as such everywhere they land.

Q Ruling Where it landed
Q1 rollout order Order DEFERRED to a named follow-up change on pilot evidence; the evidence bar (≥3 council-cleared substantive PRs across ≥2 candidate classes, zero enforcer incidents, one completed gate-rules review cycle) and the ordering principle (engineering-owned repos before domain repos) decided now new requirement "Adoption beyond the pilot qualifies on recorded evidence"; design.md Decision E amended
Q2 persona home Recommendation OVERRIDDEN. codexFactory's councils review substantive PRs in EVERY governed repo — a PR's diff is software regardless of domain. Zero new persona homes; the tenant company-policy-lead seat carries the policy dimension. The adoption-change-per-repo mechanism survives; only the persona-home fork is removed "Pilot repository and reviewing domain" requirement rewritten; new design.md Decision F
Q3 company-policy-lead seating A bounded THIRD option, not either surveyed shape. Rules-council-only stays the DEFAULT; a candidate class MAY declare a company-policy pull-in condition, defined by the gate_rules_council at class-definition time and never per PR, which seats the CPL in that PR's merge_readiness_council. Fail-closed for those classes only, under the existing missing_required_seat: refused new requirement "Company-policy seat participation in per-PR councils"; design.md Decision D marked SUPERSEDED IN PART, its 2026-08-15 text kept verbatim
Q4 ruleset shape The proven shape everywhere: real App APPROVE satisfies required review; the council-verdict check-run stays verdict transport and is NEVER a ruleset satisfier; human review stays an always-available alternate path on every repo (no App-path-only repo); divergence needs its own recorded decision new requirement "Ruleset interaction shape for the substantive review lane"; design.md Decision C amended
Q5 risk tiers Constitutional floor NOW in three clauses (never-clearable floor is tier-independent and unoverridable by unanimity; contract bytes / gate-workflow definitions / credential surfaces / security posture permanently human-only; autonomous clearance only for docs-/derived-artifact-shaped blast radii). Tier VOCABULARY explicitly DEFERRED to the same follow-up path as Q1 new requirement "Constitutional floor for autonomous clearance", which records the deferral in its own text; design.md Decision B amended

The spec delta goes 6 ADDED requirements → 10, 30 scenarios. proposal.md's "Open questions" section is now "Decided questions", each naming its ruling, its encoding requirement, and the route it took.

Copilot's ADMIT/READY finding — fixed, not papered over

Requirement 5 said "unanimous ADMIT" while the enforcer checks ready + unanimous. That is one condition at two layers, not two conditions: ADMIT is the neutral roles-authority-model word (the already-promoted "Low-risk enforcement envelope" requirement uses exactly it — openspec/specs/roles-authority-model/spec.md:81), READY is codexFactory's enforcement word. The requirement now states the mapping explicitly and a scenario pins it, including that no realization must invent an ADMIT-named verdict value. Silently swapping the word was the other available fix and was deliberately not taken — it would push a codexFactory vocabulary into a domain-neutral capability.

Two realization facts booked (tasks.md §4.4, §4.5 — notes, not blockers)

  • The envelope matcher compares head refs by exact string equality (codexFactory scripts/merge_master/envelope.py's _find_surface: head_ref == cand.get("expected_head_ref"), no glob, and the schema makes the field required). No candidate class can span arbitrary branches without a matcher change.
  • The per-repo rule file's repository: key has two meanings today: nightly-sweep-council-clearance.yaml says opensoft/codexFactory ("whose rules"), while the PRs it governs are the aggregation repo's, named in the envelope's target_repos ("which repo's PRs"). Invisible at one repo, a correctness hazard at several. The realization must pin one meaning.

tasks.md 6.2's doc-health baseline was stale (2026-08-15) and is re-measured same-clock.

Merge, not rebase

change/* refuses force-push, so origin/main is merged in. Exactly one conflict: README's OpenSpec Records block. Resolved by taking main's active list whole — main had already moved add-client-identity-roster and add-worker-credential-by-reference into "Archived changes:", so both rows are kept where main put them — and re-inserting this branch's new row in the list's own reverse-chronological position. The README diff versus origin/main is purely additive: 0 deleted lines.

The staging topic closed

ideation/staging/substantive-review-lane-questions/ met its own Exit condition (all five dispositioned) and is retired. It could not exit the way the two prior exited topics did — proposal-support.py transition refuses to move it into this change's supporting-docs/, because the packet declares origin.kind: ad_hoc and a transition must declare kind: staged ("origins are immutable"). That refusal is correct: this topic never was this proposal's origin, and its honesty note has said so since capture. So the fragment's final state is named, not linked — commit f1acf0d0, sha256 84d0ebb2…, with a git show line — and the INDEX row is KEPT and flipped to the exit-record form (the doxbench-editing-model pattern). Three conflicts the closure does NOT resolve are named in the INDEX so they survive the folder.

Gates

  • openspec validate add-substantive-review-lane --strict — valid
  • openspec validate --all --strict — Totals: 67 passed, 0 failed (67 items); changes=18 specs=49
  • pytest tests/ideation-dashboard — 3983 passed, 15 skipped; pytest tests/ideation_dashboard — 63 passed; pytest tests/doc-health — 704 passed, 1 warning (three separate invocations)
  • scripts/validate-ideation-dashboard-contracts.py — 0 error(s), 4 warning(s) (baseline)
  • doc-health --single-repo . --as-of 2026-08-22: baseline origin/main ca0b9057 = 4 critical / 6 error / 78 warning / 3 info; branch tip = 4 / 6 / 77 / 3, 0 new. The one warning that disappeared is the retired fragment's own staged-topic-template finding.
  • No contract bytes moved: git diff origin/main...HEAD -- contracts/ is empty; validate-contract-release.py verify-commit passes identically on both (contract-v1.40.digests.yaml).

🤖 Generated with Claude Code

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

…ld-fixes

B1 (blocking) — the constitutional floor was enumerated one member SHORT of
the ratified record it names. codexFactory
`hermes/domain/review-councils/records/2026-07-23-gate-rules-nightly-sweep-clearance.md`
lines 44-45 record SIX members — "identity, head ref, any failed check,
secret findings, security-touching paths, gate-weakening changes" — and the
encoded sentence had five: HEAD-REF MISMATCH was missing. The omission came
in upstream, through the recommendation and the ruling summary, but the
sentence NAMES the ratified floor, and the ratified floor is what the record
says it is — so completing it is fidelity, not a new ruling. The requirement
now carries all six AND names that record as the floor's SOURCE OF TRUTH,
with the restated enumeration explicitly subordinate to it, so a future
divergence is caught against the artifact instead of against a paraphrase.
Recorded in proposal.md's Q5 disposition and design.md Decision B.

B2 (blocking) — Q1's ordering principle had drifted. Brett's ruling is flat:
"engineering-owned repos before domain repos." The encoding had narrowed it
to a two-candidate tie-break ("where two candidate repositories otherwise
both clear that bar") and added an escape hatch ("unless the follow-up change
records a reason to depart"). Both weaken it — the tie-break lets a lone
domain repo qualify because no engineering repo happened to be proposed
beside it, and the hatch lets any follow-up opt out in a sentence. Reverted
to the ruled wording: no domain repository is adopted while any
engineering-owned governed repository remains unadopted, each adoption still
meeting the bar in its own right, no departure hatch. New scenario covers the
single-candidate case the tie-break reading left open. Drift and its
correction recorded in design.md Decision E.

S1 — Q3 granularity resolved to CONDITION-HOLDS and made unmissable. Brett's
option text ("a defined per-PR pull-in condition (like the security officer's
rule_touches_security_posture) for policy-touching classes") settles the
ambiguity the condensed summary carried. The requirement now states the
per-PR evaluation explicitly; a new scenario covers declared-but-not-holding
(convenes domain-seats-only, seat unavailability does NOT park); design.md
Decision D gains a GRANULARITY block quoting the option text and saying what
the choice buys; tasks §3.3 is de-mixed to the one shape, with all three
cases as verification targets.

S2 — proposal.md principle 6 still carried the overridden two-axis
parenthetical ("the software-engineering domain reviewing the
engineering-contracts repo"), sitting under a "not reopened" heading. That is
the exact domain-match rationale Q2 overrode. Replaced with the ruled ground
and a note saying what it used to read.

S3 — form elevation surfaced, not changed. Q1's bar and Q5's floor were ruled
"as proposal text" and are encoded as promoted requirements. The form is
KEPT (a floor that outranks unanimity must be checkable, and a bar whose job
is to gate a future adoption change cannot live in prose that archives), but
design.md Decisions B and E now each name the elevation as this change's
encoding choice, flagged for Brett's ratification read.

S4 — assigned the "PERMANENTLY DISTINCT" amendment. tasks §3.3 IS the
codexFactory change that edits merge-readiness.yaml, so realizing it as
written would leave that file contradicting its own header. Amending the
2026-07-22 wording to the ruled default-plus-bounded-exception is now part of
that task, citing Brett's ruling as the amending authority and leaving the
original decision legible.

S5 — recorded the rulings' interaction squeeze on the pilot as design.md
Decision G and a tasks §5.2 note: Q5 (ii) + (iii) plus §4.4's exact-string
head-ref matcher confine the pilot's first autonomously clearable class to
docs-shaped AND fixed-branch space. The autonomous evidence will be thin and
the Q1 bar slow to satisfy honestly; the substantive-PR ambition is exercised
meanwhile through the council-reviewed-but-human-approved path. Brett
ratifies with that in view.

N2 — the ADMIT mapping named the realization predicate incompletely. Added
the third conjunct: `verdict == ready` AND every seat concurring AND
`undispositioned_conditions == 0` (the `verdict_required: ready_unanimous` +
`undispositioned_conditions: 0` pair the rules-as-code carries). Scenario
updated to match.

N3 — tasks §4.5 said "the same key read two ways", which is false and would
send the realization hunting a bug that does not exist. Verified by reading
the code: they are TWO different keys in two files; `target_repos` is the
enforced scope (`envelope.py`'s `_find_surface` and `candidate_head_refs`
filter on it); `rule.repository` is never read in the decision path
(`council_clearance.py`'s `validate_rule` neither requires nor reads it, no
module under `scripts/merge_master/` reads it, and the 2026-08-05 activation
record calls it "the rule's descriptive `repository:` field"). Restated as
what it actually is: a NAMING hazard — an unenforced repo-shaped key holding
a different value than the enforced one.

N4 — ticked task 1.1; both its facts are verified true on this branch, and
leaving it unticked beside the ticked 1.2 was inconsistent.

N5 — Q4's requirement opened as an obligation on the App to approve. Reworded
so the obligation is conditional on a clearance and the requirement fixes the
SHAPE of a clearance's ruleset effect, creating no duty to clear or approve
any particular PR.

Spec delta is now 10 requirements / 33 scenarios (was 10/31 — the "30" in the
earlier report was itself stale, counted before the ADMIT-mapping scenario
landed in 49f5b7c).

Gates: openspec single valid; --all --strict Totals: 67 passed, 0 failed (67
items), 18 changes / 49 specs; pytest 3983+15s / 63 / 704+1w across the three
separate invocations; validate-ideation-dashboard-contracts 0 error / 4
warning; doc-health --as-of 2026-08-22 4/6/77/3 with 0 new against a freshly
re-measured same-clock origin/main ca0b905 baseline of 4/6/78/3; contracts/
untouched and verify-commit unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 22, 2026 20:09
@brettheap

Copy link
Copy Markdown
Contributor Author

Fidelity-review fixes applied — 53f181ef

Two blocking items and six should-fixes from the adversarial fidelity review, one editing pass. Q2 / Q4 / Q5-clauses-(ii)(iii) were confirmed faithful and are untouched.

Correction to my previous comment: the scenario count there ("30") was stale — it was counted before the ADMIT-mapping scenario landed in 49f5b7c8. It was 31 at review time and is 33 now (10 requirements). Sorry for the noise.

B1 (blocking) — the constitutional floor was one member short of the record it names

hermes/domain/review-councils/records/2026-07-23-gate-rules-nightly-sweep-clearance.md:44-45 records six members — "identity, head ref, any failed check, secret findings, security-touching paths, gate-weakening changes". The encoding had five; head-ref mismatch was missing. It went missing upstream, in the recommendation and the ruling summary — but the sentence names the ratified floor, and the ratified floor is what the record says it is, so completing it is fidelity, not a new ruling. New text:

The ratified never-clearable floor SHALL be tier-independent — identity mismatch, HEAD-REF mismatch, failed or pending required checks, secret findings, security-touching paths, and gate-weakening changes — and no risk tier, clearance rule, or unanimous council verdict SHALL ever override it. The floor's SOURCE OF TRUTH is the gate_rules_council's ratifying record of 2026-07-23 (codexFactory hermes/domain/review-councils/records/2026-07-23-gate-rules-nightly-sweep-clearance.md, whose per_repo_gate_rules block records the floor's six members: identity, head ref, any failed check, secret findings, security-touching paths, gate-weakening changes); the enumeration restated here is a convenience, and where it and that record ever diverge the record governs and this text MUST be corrected against it.

So a future divergence is caught against the artifact, not against a paraphrase. Also recorded in proposal.md's Q5 disposition and design.md Decision B.

B2 (blocking) — Q1's ordering principle had drifted

Brett's ruling is flat: engineering-owned repos before domain repos. The encoding had narrowed it to a two-candidate tie-break and added a departure hatch — the tie-break lets a lone domain repo qualify because no engineering repo happened to be proposed beside it, and the hatch lets any follow-up opt out by writing a sentence. Reverted:

…and engineering-owned repositories SHALL be adopted before domain repositories, so no domain repository is adopted into the lane while any engineering-owned governed repository remains unadopted — each adoption still meeting the evidence bar in its own right.

Plus a new scenario for the single-candidate case the tie-break reading left open:

Scenario: A domain repository does not qualify while an engineering-owned one is unadopted — WHEN a follow-up change proposes a domain repository as the next adoption, that repository clears the evidence bar, and it is the only repository proposed THEN the extension MUST NOT be authorized while any engineering-owned governed repository has not yet adopted the lane AND clearing the evidence bar does not by itself qualify a domain repository for adoption

The drift and its correction are recorded in design.md Decision E.

S1 — Q3 granularity resolved to CONDITION-HOLDS

Brett's option text settles it, so the encoder's granularity stands. Made unmissable in three places. Requirement body:

The condition is evaluated PER PULL REQUEST: only when a pull request matches such a class AND that class's declared condition HOLDS for that pull request is the company-policy-lead seat required… Where the condition does not hold, the seat is not required and the convening proceeds domain-seats-only, so the fail-closed cost falls on matched-and-triggered pull requests only and never on every pull request of a declaring class.

New scenario for declared-but-not-holding (domain-seats-only; seat unavailability does not park); design.md Decision D gains a GRANULARITY block quoting the option text and stating exactly what the choice buys (the availability cost falls on triggered PRs, not on every PR of a declaring class); tasks.md §3.3 de-mixed to the one shape with all three cases as verification targets.

The rest

  • S2 — proposal.md principle 6 still carried the overridden two-axis parenthetical ("the software-engineering domain reviewing the engineering-contracts repo") under a "not reopened" heading. Replaced with the ruled ground, with a note saying what it used to read.
  • S3 — form elevation surfaced, not changed. Q1's bar and Q5's floor were ruled "as proposal text" and are encoded as promoted requirements. Form KEPT (a floor that outranks unanimity must be checkable; a bar whose job is to gate a future adoption change cannot live in prose that archives), but Decisions B and E now name the elevation as this change's encoding choice, flagged for the ratification read.
  • S4 — tasks.md §3.3 is the codexFactory change that edits merge-readiness.yaml, so amending the "PERMANENTLY DISTINCT (decided 2026-07-22)" header to the ruled default-plus-bounded-exception is now part of that task. Without it, realization leaves the file contradicting its own header.
  • S5 — new design.md Decision G plus a tasks.md §5.2 note: Q5 (ii)+(iii) and the exact-string head-ref matcher together confine the pilot's first autonomously clearable class to docs-shaped AND fixed-branch space. Autonomous evidence will be thin and the Q1 bar slow to satisfy honestly; the substantive-PR ambition is exercised meanwhile through the council-reviewed-but-human-approved path. Only autonomous runs count toward the bar.
  • N2 — the ADMIT mapping named the predicate incompletely; added the third conjunct (verdict == ready AND every seat concurring AND undispositioned_conditions == 0, the verdict_required: ready_unanimous + undispositioned_conditions: 0 pair the rules-as-code carries). Scenario updated.
  • N3 — §4.5 said "the same key read two ways", which is false. Verified in code: two different keys; target_repos is the enforced scope (envelope.py's _find_surface, candidate_head_refs), while rule.repository is never read in the decision path (council_clearance.py's validate_rule neither requires nor reads it; nothing under scripts/merge_master/ reads it; the 2026-08-05 activation record calls it "the rule's descriptive repository: field"). Restated as a naming hazard, not a live dual-read.
  • N4 — ticked task 1.1; both its facts verify true on this branch.
  • N5 — Q4's requirement opened as an obligation on the App to approve. Reworded: "Where a candidate IS cleared under this lane, the approval SHALL satisfy… this requirement fixes the SHAPE of a clearance's effect on the ruleset and creates no obligation to clear or to approve any particular pull request."

Gates (all re-run on 53f181ef)

Change 'add-substantive-review-lane' is valid
Totals: 67 passed, 0 failed (67 items)        # 18 changes, 49 specs
3983 passed, 15 skipped in 431.38s (0:07:11)  # tests/ideation-dashboard
63 passed in 10.89s                           # tests/ideation_dashboard
704 passed, 1 warning in 14.67s               # tests/doc-health
validate-ideation-dashboard-contracts: 0 error(s), 4 warning(s)
release verify-commit: pass
  inventory=contracts/releases/contract-v1.40.digests.yaml

doc-health --single-repo . --as-of 2026-08-22, against a freshly re-measured same-clock origin/main ca0b9057 baseline in a separate openxFactory-basenamed checkout: baseline 4 critical / 6 error / 78 warning / 3 info; branch tip 4 / 6 / 77 / 3; new-findings JSON []. contracts/ untouched — git status -- contracts/ and git diff origin/main...HEAD -- contracts/ both empty.

Still Status: draft. Ratification remains Brett's read.

🤖 Generated with Claude Code

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

openspec/changes/add-substantive-review-lane/specs/roles-authority-model/spec.md:112

  • This requirement embeds codexFactory-specific implementation details (verdict == ready, config key names) inside a neutral roles-authority-model requirement. That coupling can go stale as the codexFactory realization evolves; the canonical roles-authority-model spec elsewhere describes conditions conceptually rather than as code/config expressions. Consider keeping only the semantic mapping (ADMIT ↔ codexFactory’s “ready” + unanimity + zero undispositioned conditions) and moving any concrete predicate/key details to design/proposal material instead.
uses; the codexFactory realization of this lane expresses "unanimous ADMIT
with no undispositioned conditions" as its three-conjunct merge-readiness
predicate — `verdict == ready` AND every seat concurring AND
`undispositioned_conditions == 0` (the `verdict_required: ready_unanimous`
plus `undispositioned_conditions: 0` pair its rules-as-code carries) — so an


## 2. Neutral contract delta (this change's own surface)

- [ ] 2.1 Ten ADDED requirements on `roles-authority-model`
…rulings

Brett Heap ruled the four ratification-read items in-session via question
prompts, 2026-08-22 — a DISTINCT act from the earlier same-day clarify round
that ruled the five Q1-Q5 open questions. Both are recorded, and the
ratification record cross-references the clarify round rather than absorbing
it.

1. FORM ELEVATION — ACCEPTED. Q1's evidence bar and Q5's constitutional floor
   were ruled "as proposal text" and encoded as promoted requirements; the
   change flagged the elevation instead of performing it silently. Brett
   accepted it; both stay requirements. One line added to each FORM ELEVATION
   block (design.md Decisions B and E).

2. Q1 BAR COUNTING RULE — ANY COUNCIL-CLEARED VERDICT COUNTS. This OVERRODE
   the encoder's autonomous-only reading. tasks.md §5.2 previously said "only
   the autonomous ones count toward the Q1 evidence bar"; that clause is
   replaced by the ruled rule, labelled as Brett's 2026-08-22 ruling:

     A unanimous merge_readiness_council verdict counts toward the >=3 bar
     whether the approving review was cast by the merge-master App or by a
     human. The bar measures COUNCIL QUALITY, not enforcer autonomy.

   Swept for consistency: the requirement body now carries the rule, a new
   scenario ("A human-approved council-cleared pull request still counts")
   pins it, and design.md Decision G is corrected — its squeeze analysis
   stands in full (autonomous evidence WILL be thin) but its conclusion
   narrows, because what is thin is the pilot's AUTONOMY, not its countable
   evidence.

3. ORDERING STAYS ABSOLUTE. The literal consequence was put to Brett before he
   ruled: a DORMANT engineering-owned repo blocks every domain adoption
   indefinitely. Two softenings were offered — a recorded-waiver clause, and
   scoping the block to actively-maintained engineering repos — and he
   declined both. The escape path is a direct Brett escalation inside the
   future adoption change that needs it, not requirement text. Recorded in
   design.md Decision E so the consequence reads as a ruled cost, not an
   oversight.

4. RATIFIED. Recorded on the shape the recent archives use
   (add-roster-directory-admission-surface, add-roster-device-admission-
   surface): proposal.md Status draft -> ratified with a Ratified: line naming
   Brett Heap, 2026-08-22, in-session via question prompts, plus a
   review/ratification-2026-08-22.md record carrying the decision, the
   two-rounds-one-day provenance, the four read-items, the pre-ratification
   fidelity review (B1/B2 + six should-fixes, and Copilot's ADMIT/READY
   finding), four conscious-acceptance notes, and the realization Next.
   tasks.md 1.3 ticked with that evidence.

Swept every stale draft claim rather than only the packet's: the README
OpenSpec Records row now reads RATIFIED and carries the four read-items; the
ideation/staging/INDEX.md exit record for the retired
substantive-review-lane-questions topic previously asserted the proposal
"stays Status: draft", which the ratification falsified — corrected to name
both acts and keep them distinct, since the topic's closing condition was the
five dispositions and never the ratification.

Spec delta: 10 requirements / 34 scenarios (was 10/33 — one scenario added by
ruling 2). No contract bytes move; target_release stays none.

Gates: openspec single valid; --all --strict Totals: 67 passed, 0 failed (67
items), 18 changes / 49 specs; pytest 3983+15s / 63 / 704+1w across three
separate invocations; validate-ideation-dashboard-contracts 0 error / 4
warning; doc-health --as-of 2026-08-22 4/6/77/3 with 0 new against a freshly
re-measured same-clock origin/main ca0b905 baseline of 4/6/78/3; contracts/
untouched and verify-commit unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 22, 2026 21:36
@brettheap

Copy link
Copy Markdown
Contributor Author

RATIFIED — Brett's four ratification-read rulings encoded (fe5caaf5)

Brett Heap ruled the four ratification-read items in-session via question prompts, 2026-08-22. This is a distinct act from the earlier same-day clarify round that ruled the five Q1–Q5 open questions; both are recorded separately and the ratification record cross-references the clarify round rather than absorbing it.

Record: openspec/changes/add-substantive-review-lane/review/ratification-2026-08-22.md — the shape the recent archives use (add-roster-directory-admission-surface, add-roster-device-admission-surface). proposal.md is now Status: ratified with a Ratified: line naming that record. tasks.md 1.3 ticked.

1. Form elevation — ACCEPTED

Q1's evidence bar and Q5's constitutional floor were ruled "as proposal text" and encoded as promoted requirements; the change flagged the elevation rather than performing it silently. Brett accepted it — both stay requirements. One line added to each FORM ELEVATION block (design.md Decisions B and E).

2. Q1 bar counting rule — ANY COUNCIL-CLEARED VERDICT COUNTS (override)

This overrode the encoder's autonomous-only reading. tasks.md §5.2 previously said "only the autonomous ones count toward the Q1 evidence bar". Replaced, labelled as Brett's ruling. The requirement body now reads:

A pull request counts toward that bar on the strength of its unanimous council verdict, whether the approving review was then cast by the merge-master App or by a human: the bar measures COUNCIL QUALITY, not enforcer autonomy, and a council-cleared pull request whose approval a human cast is evidence of exactly the thing the bar is testing.

New scenario pinning it:

Scenario: A human-approved council-cleared pull request still counts — WHEN a substantive pull request receives a unanimous merge_readiness_council verdict and the approving review is cast by a human rather than by the merge-master App THEN that pull request counts toward the evidence bar's council-cleared total AND the bar MUST NOT be read as requiring autonomously approved pull requests

Swept for consistency: design.md Decision G's squeeze analysis stands in full — the pilot's autonomous evidence will still be thin — but its conclusion narrows, because what is thin is the pilot's autonomy, not its countable evidence. The council-reviewed-but-human-approved path both exercises the ambition and accrues the bar.

3. Ordering stays absolute

The literal consequence was put to Brett before he ruled: a dormant engineering-owned repo blocks every domain adoption indefinitely, just by remaining unadopted. Two softenings were offered — a recorded-waiver clause, and scoping the block to actively-maintained engineering repos — and he declined both. The escape path is a direct escalation to Brett inside the future adoption change that needs it, made in the open, not a clause that lets the order be routed around quietly. Recorded in design.md Decision E so it reads as a ruled cost rather than an oversight.

4. Ratified

The ratification record carries the decision, the two-rounds-one-day provenance, the four read-items, the pre-ratification fidelity review (B1/B2 + six should-fixes, and Copilot's ADMIT/READY finding), four conscious-acceptance notes (the narrow autonomous surface; Q2's accepted residual domain-standing risk; Q3's live inconsistency with the codexFactory "PERMANENTLY DISTINCT" wording, assigned to tasks §3.3; the two deferred residues), and the realization Next.

Stale-claim sweep

Beyond the packet: the README OpenSpec Records row now reads RATIFIED and carries the four read-items, and ideation/staging/INDEX.md's exit record for the retired substantive-review-lane-questions topic — which asserted the proposal "stays Status: draft" — is corrected to name both acts and keep them distinct. The topic's closing condition was the five dispositions, never the ratification.

Spec delta is now 10 requirements / 34 scenarios (one added by ruling 2). target_release: none — no contract bytes move.

Gates at branch tip fe5caaf5

Change 'add-substantive-review-lane' is valid
Totals: 67 passed, 0 failed (67 items)        # 18 changes, 49 specs
3983 passed, 15 skipped in 459.17s (0:07:39)  # tests/ideation-dashboard
63 passed in 16.19s                           # tests/ideation_dashboard
704 passed, 1 warning in 14.22s               # tests/doc-health
validate-ideation-dashboard-contracts: 0 error(s), 4 warning(s)
release verify-commit: pass
  inventory=contracts/releases/contract-v1.40.digests.yaml

doc-health --single-repo . --as-of 2026-08-22 against a freshly re-measured same-clock origin/main ca0b9057 baseline in a separate openxFactory-basenamed checkout: baseline 4 critical / 6 error / 78 warning / 3 info; branch tip 4 / 6 / 77 / 3; new-findings JSON []. contracts/ untouched — git status -- contracts/ and git diff origin/main...HEAD -- contracts/ both empty. origin/main had not moved, so no further merge was needed.

Merging by admin squash: the bot round is done (Copilot's finding fixed, Sourcery is an upsell stub), and the BLOCKED state is the usual review-required ruleset gate. No tag (no contract bytes) and no xFactory pin from here.

🤖 Generated with Claude Code

@brettheap
brettheap merged commit eab1d32 into main Aug 22, 2026
1 check passed

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

openspec/changes/add-substantive-review-lane/tasks.md:6

  • The inline-code backticks here span a newline (the backtick opened before add-substantive-review-lane is closed on the next line), which is invalid/fragile Markdown and renders inconsistently across parsers. Keep each command in a single inline code span (or use a fenced code block).
- [x] 1.1 `OPENSPEC_TELEMETRY=0 openspec validate add-substantive-review-lane
      --strict` and `--all --strict` green; change listed in the README

Comment on lines +25 to +32
approved_by: >-
Brett Heap (openxFactory operator authority) — authorized authoring this
ad-hoc proposal directly, per his decided generalization principles and
pilot direction for the council + Merge Master machinery (same
operator-authority pattern as add-client-identity-roster). This records
authorization to AUTHOR the proposal, not ratification of its content:
the proposal's open questions are declared, not decided, and its
Status below remains unratified pending review.
Comment thread README.md
Comment on lines +562 to +566
- [add-substantive-review-lane](openspec/changes/add-substantive-review-lane/proposal.md)
— proposed 2026-08-15, **RATIFIED 2026-08-22** by Brett Heap (in-session
via question prompts; record
`openspec/changes/add-substantive-review-lane/review/ratification-2026-08-22.md`):
generalizes codexFactory's proven
@brettheap
brettheap deleted the change/add-substantive-review-lane branch September 4, 2026 19:24
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.

2 participants