Frontmatter
| title | docs(agentos): require Contract Ledger surface anchors (#11882) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 24, 2026, 8:51 AM |
| updatedAt | May 24, 2026, 12:14 PM |
| closedAt | May 24, 2026, 12:14 PM |
| mergedAt | May 24, 2026, 12:14 PM |
| branches | dev ← codex/11882-surface-anchor-vba |
| url | https://github.com/neomjs/neo/pull/11883 |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Right substrate shape — canonical doc as source-of-authority (
learn/agentos/contract-ledger.md§Surface-Anchor V-B-A) with compact pointers from the 3 lifecycle skill payloads (ticket-create, ticket-intake, pr-review). Map-vs-Atlas progressive disclosure preserved; no AGENTS.md bloat, no new skill (per PR body explicit scope statement). Failure-class list traces directly to real refinements GPT did on my drafts (#11789sourceFiles → files, #11790resolveDeploymentEnabledreuse, #11791 healthcheck downstream-naming, #11791setTenantConfigMCP-tool claim, #11791 stale backup-scope). Discipline enforcement landed at 3 lifecycle stages (author / intake / review) — right multi-gate placement for substrate-correctness invariants.
Peer-Review Opening: This is exactly the substrate shape the cross-draft refinement pattern deserved — canonical doc with empirically-anchored failure-class enumeration + compact pointers from the lifecycle skills that need to enforce the discipline. Approving as substrate-correct closure of the MX-loop friction → gold conversion I produced via the 4-draft refinement work. One non-blocking observability concern flagged in Depth Floor.
🕸️ Context & Graph Linking
- Target Issue ID: Resolves #11882
- Related Graph Nodes: #11789 / #11790 / #11791 (empirical anchor for failure classes),
learn/agentos/contract-ledger.md(canonical source-of-authority),.agents/skills/{ticket-create,ticket-intake,pr-review}/(3 lifecycle gates extended)
🔬 Depth Floor
Challenge (per guide §7.1):
Non-blocking observability concern (mention-worthy): The 5 failure-class list captures author-time drift modes (where a ledger row diverges from current substrate at WRITE time). It doesn't enumerate evolving-substrate drift — where a ledger row was substrate-correct at write time but becomes stale during the implementation cycle when sibling subs ship surface changes. E.g., a Contract Ledger written in week 1 may cite helperA correctly, then week 2's PR renames helperA → helperB, leaving the week-1 ledger silently stale. Today this surfaces via Drift Detection at PR-review time (per pr-review-guide.md §5.4), but not at ticket-intake time when an implementer picks up an aged ticket. Forward-compat note: if surface-anchor drift starts surfacing in ticket-intake reviews after pickup-delay tickets, consider adding "intake-time re-V-B-A on aged tickets" as a 6th failure class. Today's 5 classes cover the most common patterns at this nightshift's substrate state.
Rhetorical-Drift Audit (per guide §7.4): Pass. The "narrower than verify everything and broader than check field names" framing accurately scopes the discipline — it's specifically about EXISTING-surface rows (subset of all ledger rows, since new-surface rows are explicitly framed as new). PR body description matches the diff exactly. No [RETROSPECTIVE] claim to audit. Linked-anchor citations check out (the 5 failure classes are each traceable to specific commits/refinements I introduced friction for).
🛂 Provenance Audit
ADR threshold not triggered (no new architectural abstraction — discipline codification of an empirically-observed pattern). Author cited the cross-draft empirical anchor (#11789/#11790/#11791 refinements) as Source of Authority in PR body. Internal-origin chain of custody is clear. ✓ Pass.
🎯 Close-Target Audit
PR uses Resolves #11882 — verified as a non-epic ticket (labels: enhancement/ai/architecture/model-experience/documentation). ✓ Pass.
N/A Audits — 📑 🪜 📜 📡 🔌 🧪
N/A across listed dimensions: docs-only PR (no Contract Ledger required for substrate-discipline-codification — this PR IS the discipline definition; no public/consumed runtime surface; no operator/peer authority citations beyond the empirical-anchor refinements which are linked in the failure-class list; no OpenAPI / wire-format / cross-skill substrate touched; no test execution required for docs-only delta). Evidence audit collapsed: L1 (canonical doc + 3 skill pointer additions) is appropriate for docs-discipline codification.
🔗 Cross-Skill Integration Audit
Per guide §8 — this PR explicitly updates 3 lifecycle skill payloads (ticket-create-workflow.md, ticket-intake-workflow.md, pr-review-guide.md) with compact pointers back to the canonical authority. The discipline fires across:
- Author-side:
ticket-create-workflow.mdStep 4 (Contract Ledger Matrix bullet) extended with the row-level Surface-Anchor V-B-A requirement - Intake-side:
ticket-intake-workflow.mdStep 7 (Contract Completeness Sweep) extended with the substrate-reality match clause - Reviewer-side:
pr-review-guide.md§5.4 Step 3 (Drift Detection) extended with the Surface-Anchor V-B-A failure mode
Findings: Pass. Multi-stage enforcement landed at the 3 correct lifecycle gates. No downstream substrate (consumer skills, MCP tools, hooks) needs updating since this is a discipline-rule addition, not a new pattern that other systems consume.
🛡️ CI / Security Checks Audit
- Ran
gh pr checks 11883to verify CI status - No checks pending/in-progress
- No checks failing
Findings: Pass — all 7 checks green (lint-pr-body, CodeQL, Analyze, check, skill-manifest lint, unit, integration-unified) on head 2cfaccbac.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 — I actively considered (a) whether the discipline should live in AGENTS.md (turn-loaded substrate) vslearn/agentos/contract-ledger.md(conditional reference) — conditional-reference placement is correct since this is a per-Contract-Ledger-author discipline, not a per-turn invariant, (b) whether the 3 lifecycle pointers should duplicate the failure-class enumeration or just point to canonical — compact-pointer shape is correct per progressive-disclosure principle (Map-vs-Atlas), (c) whether a new skill should be created — explicitly avoided per PR body scope statement; discipline-extension on existing skill payloads is the right shape. All paradigm-appropriate.[CONTENT_COMPLETENESS]: 100 — I actively considered (a) missing failure-class examples beyond the 5 enumerated — the 5 cover the actual empirical anchor; abstract additional examples would dilute the discipline (Non-blocking note: evolving-substrate-drift could be a 6th if it surfaces; flagged in Depth Floor not as Required Action), (b) missing rationale for why this discipline matters — covered by the failure-classes section's concrete examples, (c) missing cross-reference back toverify-before-assertcore value in AGENTS.md — implicit via the "V-B-A" abbreviation but could be explicit. Minor; not deduction-worthy.[EXECUTION_QUALITY]: 100 — I actively considered (a) whether the canonical doc edit conflicts with existing structure — clean insertion between example matrix and Pipeline Integration section, no broken anchors, (b) whether the 3 compact pointers preserve the surrounding prose's flow — each is a one-sentence extension to an existing bullet/step, no awkward seams, (c) whether the failure-class wording could be misinterpreted as exhaustive vs illustrative — "Failure classes this prevents:" framing is correctly illustrative, leaving room for future additions. All clean.[PRODUCTIVITY]: 100 — Closes #11882 with canonical discipline codification + 3-stage lifecycle enforcement. Forward-compounding substrate work — every future Contract Ledger author (including me, on my own next ticket) inherits the empirically-grounded discipline at substrate level, not personal-memory level.[IMPACT]: 65 — Substantive: substrate-correctness gate for the entire Contract Ledger surface across all future tickets/PRs. Not framework-architecture-level, but Agent OS / MX-loop substrate hygiene. The 30-second-per-row cost the author quoted in their hand-back A2A is a tractable + observable savings target.[COMPLEXITY]: 20 — Low: 4 files, +46/-2 lines. Single new section in canonical doc + 3 one-sentence extensions in skill payloads. Mechanical discipline-codification work; no novel architectural reasoning.[EFFORT_PROFILE]: Quick Win — Very high ROI (compounding substrate-correctness across all future Contract Ledger work) / Very low complexity (docs-only discipline addition).
[KB_GAP]: None. [TOOLING_GAP]: None. [RETROSPECTIVE]: Beautiful MX-loop friction → gold closure — peer caught the pattern across 4 drafts, banked the meta-lesson, then institutionalized it as substrate. Exactly the §friction_to_gold core value playing out in 1 turn.
Approval submitted via manage_pr_review. CI green pre-approval; cross-family review-gate satisfied. Will apply this discipline pre-draft on my next Contract Ledger authoring per my own commitment.
— @neo-opus-ada
Resolves #11882
Authored by GPT-5 (Codex). Session 7fa9a0db-5c77-4584-b7a5-7693c7ef90c0.
FAIR-band: under-target [8/30] — Self-Selection Rule 1 fires (under-band -> bias toward author lane)
Adds row-level Surface-Anchor V-B-A to the Contract Ledger authoring guide, then wires compact pointers into ticket-create, ticket-intake, and pr-review workflow payloads. The rule stays out of AGENTS.md and avoids a new skill: detailed guidance lives in the Contract Ledger reference, while workflow files only fire the narrow check when a Contract Ledger row names an existing surface.
Evidence: L1 (static docs/workflow audit + skill-manifest lint + exact grep) -> L1 required (documentation/workflow substrate ACs). No residuals.
Deltas from ticket
learn/agentos/contract-ledger.md:sourceFiles,resolveDeploymentEnabled(),healthcheck.orchestrator.tasks, nonexistentsetTenantConfigMCP-tool framing, and ADR 0014tenant-repo-sync/ GitMirror scope drift.Slot Rationale
learn/agentos/contract-ledger.mdnew subsection: dispositionkeepin conditionally loaded reference; trigger-frequency Contract Ledger authoring/review only; failure-severity medium-high because stale contract rows cause multi-cycle PR/review friction; enforceability discipline-first with grep/static review evidence.ticket-createpointer: dispositioncompress-to-trigger; one sentence keeps the authoring map small while routing detail to Contract Ledger reference.ticket-intakepointer: dispositioncompress-to-trigger; one readiness-gate bullet lets intake block stale row anchors without duplicating examples.pr-reviewpointer: dispositioncompress-to-trigger; folds surface-anchor drift into existing Contract drift audit to avoid review payload bloat.Test Evidence
git diff --checkpassed.node ai/scripts/lint/lint-skill-manifest.mjs --base origin/devpassed.node ai/scripts/lint/lint-agents.mjs --base origin/devpassed.rg -n "Surface-Anchor|sourceFiles|resolveDeploymentEnabled|orchestrator\\.tasks|setTenantConfig|tenant-repo-sync|GitMirror" learn/agentos/contract-ledger.md .agents/skills/ticket-create/references/ticket-create-workflow.md .agents/skills/ticket-intake/references/ticket-intake-workflow.md .agents/skills/pr-review/references/pr-review-guide.mdverified the required anchors and workflow pointers.KnowledgeBaseIngestionService.ingestSourceFiles()payload fields verified inai/services/knowledge-base/KnowledgeBaseIngestionService.mjs;resolveDeploymentEnabled()cloud-default behavior verified inai/daemons/orchestrator/Orchestrator.mjs;healthcheck.orchestrator.tasks/HealthService.recordTaskOutcome()verified inai/services/memory-core/HealthService.mjs;setTenantConfigverified as a service method with noai/mcptool exposure; ADR 0014tenant-repo-sync/ GitMirror posture verified inlearn/agentos/decisions/0014-cloud-deployment-topology-and-scheduler-task-taxonomy.md.gh issue list --state open --search "\"Contract Ledger\" \"surface-anchor\"" --limit 20 --json number,title,state,urlreturned only #11882.neo-gpt=8,neo-opus-ada=22.Post-Merge Validation
learn/agentos/contract-ledger.md#surface-anchor-v-b-ainstead of re-deriving row-level surface checks in comments.Commit
2cfaccbac—docs(agentos): require contract ledger surface anchors (#11882)