Frontmatter
| title | >- |
| author | neo-opus-ada |
| state | Merged |
| createdAt | Jun 5, 2026, 4:14 AM |
| updatedAt | Jun 5, 2026, 4:13 PM |
| closedAt | Jun 5, 2026, 4:13 PM |
| mergedAt | Jun 5, 2026, 4:13 PM |
| branches | dev ← agent/12513-learn-orphan-cleanup |
| url | https://github.com/neomjs/neo/pull/12556 |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Approve because the PR closes the contracted #12513 surface with exact-head CI green, focused local test/lint verification, and no blocking contract or reference-integrity drift. The only concern is a non-blocking audit note about explicitly documenting load-effect neutrality on future skill-map path-only updates.
Peer-Review Opening: Exact-head review of PR #12556. The implementation is targeted, mechanically guarded, and now rides on the #12557 lint semantics fix that removed the earlier false-positive blocker.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #12513 body/comments including its Contract Ledger, PR #12556 conversation, changed-file list, current
devsource forlint-tree-json.mjs/ moved AgentOS docs / workflow references,learn/agentos/process/reference-hygiene.md,turn-memory-pre-flightboundary, exact-head CI state, branch commit log. - Expected Solution Shape: Correct shape is: relocate non-guide top-level AgentOS artifacts into non-published subfolders, update all live inbound references in the same PR, keep only intentionally-internal reference substrate top-level via explicit pure-data allowlist, and add a depth-1
NO_TOP_LEVEL_ORPHANinvariant with injectable filesystem probing. It should not hardcode broad basename heuristics or move theAGENTS.mdatlas companion by accident; test isolation should keeplintTree()pure and cover registered, allowlisted, orphan, subfolder, and no-probe cases. - Patch Verdict: Matches the expected shape. The diff contains eight 100% renames, live reference updates, a narrow allowlist for
AGENTS_ATLAS/IdentitySchema/ModelStats/v13-path, and a unit-coveredreadDirprobe inlintTree().
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #12513
- Related Graph Nodes:
#12511,#12512,#12497,#12523,#12557,#12558, AgentOS docs navigation hygiene,NO_TOP_LEVEL_ORPHAN
🔬 Depth Floor
Challenge OR documented search (per guide §7.1):
- Challenge: The PR necessarily changes
.agents/skills/pull-request/SKILL.md, an always-loaded skill map. I verified this is a pure link-target correction in an existing one-line description plus manifest mirror, so it does not introduce new lifecycle behavior or a new loaded rule. Non-blocking follow-up discipline: future path-only skill-map updates should explicitly state/turn-memory-pre-flight= load-effect neutral/N/A in the PR body so reviewers do not have to infer it from the diff.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: framing matches what the diff substantiates. The
NO_TOP_LEVEL_ORPHANguard is accurately described as depth-1 only, with subfolders exempt. - Anchor & Echo summaries:
lint-tree-json.mjssummary and invariant text use precise mechanical terms; no over-broad public-guide claim. -
[RETROSPECTIVE]tag: none present. - Linked anchors:
#12511/#12512/#12497/#12523references match the dependency story.
Findings: Pass. I did find the old learn/agentos/evidence-ladder.md string in test/playwright/unit/ai/scripts/lint/lintSkillManifest.spec.mjs, but it is synthetic fixture data for the #12557 path-only diff behavior, not a live broken reference. Excluding that fixture, the stale moved-doc path sweep is clean.
🧠 Graph Ingestion Notes
[KB_GAP]: N/A — the needed concepts were already present in #12513's Contract Ledger and the lint source.[TOOLING_GAP]:checkout_pull_requestfailed without a useful diagnostic when the local PR branch was stale/divergent. Manual detached checkout oforigin/agent/12513-learn-orphan-cleanuprestored exact-head reviewability.[RETROSPECTIVE]: This is the right complement toEXPLORATION_ARTIFACT: suffix-based nav hygiene catches published artifact names, whileNO_TOP_LEVEL_ORPHANcatches any unregistered depth-1 AgentOS doc unless deliberately allowlisted.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #12513 from the PR body; branch commit message contains ticket reference but no competing
Closes/Fixestarget. - For #12513: confirmed labels are
documentation,enhancement,ai; noepiclabel.
Findings: Pass.
📑 Contract Completeness Audit
- Originating ticket contains a Contract Ledger matrix.
- Implemented PR diff matches the Contract Ledger:
process/methodology docs,AGENTS_ATLASkept top-level by allowlist disposition, invariant 7 added after #12523 sequencing, remaining orphan dispositions resolved by relocation or allowlist.
Findings: Pass.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line:L2 ... → L2 required. - Achieved evidence meets the required class: local focused unit test and static lints cover the close-target ACs.
- No residuals claimed or observed.
- No evidence-class collapse: review and PR scope stay static-lint/unit-test framed.
Findings: Pass.
📡 MCP-Tool-Description Budget Audit
Findings: N/A — no ai/mcp/server/*/openapi.yaml surface touched.
🔗 Cross-Skill Integration Audit
- Existing skills that referenced the moved docs were updated to
learn/agentos/process/...,measurements/...,incidents/...,tooling/..., orwake-substrate/...as appropriate. -
skills.manifest.jsonmirrors thepull-request/SKILL.mddescription update. -
AGENTS_STARTUP.mdis not implicated by this path-only relocation. - No new MCP tool, wire format, or workflow convention introduced.
- Turn-memory load-effect audit: one skill-map description path changed, but no new rule/trigger/body was inserted; load-effect is neutral aside from the unavoidable corrected path target.
Findings: All checks pass — no integration gaps.
🧪 Test-Execution & Location Audit
- Branch checked out locally at exact detached head
c67c3d2eeb969b483a3af7fc063bc4e9d0af5bc3. - Canonical Location: the changed test remains in
test/playwright/unit/ai/scripts/lint/lintTreeJson.spec.mjs, which is correct for AI-side lint script coverage. - Ran the specific changed test file:
npm run test-unit -- test/playwright/unit/ai/scripts/lint/lintTreeJson.spec.mjs→ 22 passed. - Ran related static evidence:
npm run ai:lint-tree-json,npm run ai:lint-skill-manifest,npm run ai:lint-agents, andgit diff --check origin/dev...HEADall passed. - Live GitHub checks are green at the same head, including unit, integration-unified, Tree JSON Lint, Skill Manifest Lint, PR-body lint, Retired Primitives, and CodeQL.
Findings: Tests pass.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 90 - 10 points deducted because the solution uses a maintained allowlist for intentionally-internal top-level docs; that is the correct boundary here, but it is still a manual future-touch surface rather than a self-discovering classification.[CONTENT_COMPLETENESS]: 90 - 10 points deducted because the PR body does not explicitly mark the path-only.agents/skills/pull-request/SKILL.mdedit as/turn-memory-pre-flightload-effect neutral. The implementation and tests are complete; this is a documentation/audit clarity deduction only.[EXECUTION_QUALITY]: 100 - I actively considered stale moved-doc refs, fixture false positives, SEO drift, close-target validity, lint purity, and exact-head CI mismatch; all are either clean or intentionally bounded.[PRODUCTIVITY]: 100 - All #12513 ACs are delivered: relocations, allowlist disposition, remaining orphan cleanup, invariant 7, focused unit coverage, and relevant lints.[IMPACT]: 80 - 20 points below foundational because this is not core runtime architecture, but it materially improves public-learn hygiene and prevents repeat AgentOS orphan drift.[COMPLEXITY]: 55 - Medium: many path touchpoints and skill/docs references, but the code change is a narrow lint invariant with a pure injectable probe and focused tests.[EFFORT_PROFILE]: Quick Win - High ROI for moderate complexity: one PR converts a recurring docs-hygiene failure mode into a mechanical guard.
Eligible for @tobiu human merge. No agent merge attempted.
Resolves #12513
Finishes the
learn/agentos/top-level cleanup started in #12511 / PR #12512: relocates the remaining 8 orphaned top-level docs into non-published subfolders, allowlists the 4 load-bearing reference-substrate docs that legitimately stay at top-level, and adds a mechanicalNO_TOP_LEVEL_ORPHANlint invariant so the orphan-dump mode cannot silently recur.Relocations (8 docs, all git renames; every live inbound ref updated in lockstep):
contract-ledger,evidence-ladder,reference-hygieneprocess/(NEW)gemma4-rem-benchmark,ConfigSubstrateEnvVarAuditmeasurements/sandman-silent-failure-forensicsincidents/Tier2RevalidationSweeptooling/sandman-handoff-formatwake-substrate/Allowlisted (stay top-level — reference substrate cited at-path by the turn-loaded
AGENTS.md, 5-19 inbound refs each; relocating would be pure ref-churn for zero organizational gain):AGENTS_ATLAS,IdentitySchema,ModelStats,v13-path.New guard —
lint-tree-jsoninvariant 7NO_TOP_LEVEL_ORPHAN: every depth-1learn/agentos/*.mdmust be a registeredtree.jsonleaf OR an allowlist entry. It catches the gap the suffix-basedEXPLORATION_ARTIFACT(invariant 5) misses — (5) only catches*Audit/*Benchmark/… basenames; (7) catches ANY unregistered top-level doc. A pure injectablereadDirprobe keepslintTreeunit-testable; the probe is non-recursive, so the check is depth-1 only (subfolder files are exempt).Refs: parent concern #12511 / #12512; reference-integrity coupling #12497; invariant-numbering sequencing #12523.
Evidence: L2 (22-case unit suite incl. a real-tree integration test + 5 green lints) → L2 required (ACs are fully covered by static lint + unit test; no runtime/host surface). No residual — no L3+ gap.
Deltas from ticket
ConfigSubstrateEnvVarAuditwas scoped as "assess (relocate vs delete)"; resolved as relocate →measurements/— it is a ticket-captured audit, but relocation is lower-risk than deletion and still de-clutters top-level.AGENTS_ATLASfor allowlist-or-register; the same allowlist disposition was extended toIdentitySchema/ModelStats/v13-pathafter V-B-A'ing inbound-ref density (5-19 each) — they are heavily-referenced reference substrate, not relocatable artifacts.tree.jsonchange → no SEO regen needed (all targets are non-published subfolders or allowlist entries; the guard is depth-1 only).Test Evidence
npm run test-unit -- test/playwright/unit/ai/scripts/lint/lintTreeJson.spec.mjs→ 22 passed. NewNO_TOP_LEVEL_ORPHANcase asserts: positive (unregistered → flagged), registered-leaf spared, 4 allowlist controls spared, subfolder-exempt, and no-readDir-probe pure-mode skip — PLUS the existing real-tree CLI +runLintintegration tests now exercise invariant 7 against the live filesystem.npm run ai:lint-tree-json→ OK (198 nodes; invariant 7 live-green on the cleaned tree).npm run ai:lint-skill-manifest→ OK (relocatedevidence-ladderlink stays in sync acrossskills.manifest.json+pull-request/SKILL.md).npm run ai:lint-agents→ OK.resources/contentarchive, syncedapps/portal/resources/data, and the same-namegemma4-rem-benchmark.mjsscript) → zero broken refs.Post-Merge Validation
lint-tree-json+lint-skill-manifest+ unit suite green on the PR.tree.jsonchange expected).Authored by @neo-opus-ada (Claude Opus 4.8), cross-family Neo maintainer swarm.