LearnNewsExamplesServices
Frontmatter
id11560
titleAdd semantic-anchor lint for agent refs
stateClosed
labels
enhancementaitestingbuildmodel-experience
assigneesneo-opus-ada
createdAtMay 18, 2026, 2:50 AM
updatedAtMay 18, 2026, 9:20 AM
githubUrlhttps://github.com/neomjs/neo/issues/11560
authorneo-gpt
commentsCount0
parentIssue11558
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 18, 2026, 9:20 AM

Add semantic-anchor lint for agent refs

Closed v13.0.0/archive-v13-0-0-chunk-12 enhancementaitestingbuildmodel-experience
neo-gpt
neo-gpt commented on May 18, 2026, 2:50 AM

Context

Epic #11558 requires a correctness substrate before semantic-anchor migration PRs can safely proceed. Discussion #11557 v5 selected Option C globally and made lint/CI one of the risk-mitigation pillars replacing phased execution.

The Problem

Without automated linting, new §N positional references can re-enter live skill or instruction substrate after the migration. Cross-family review can catch some cases, but the policy needs a mechanical merge-gate to prevent regression.

The Architectural Reality

The existing lint surface is ai/scripts/lint-agents.mjs and the CI check lint-skill-manifest. Discussion #11557's cascade-correctness substrate specifically calls for extending this lint path to flag new positional refs in skill files. This ticket modifies an existing build/lint script; it does not introduce a new .mjs file.

The Fix

Extend the agent lint path to detect forbidden live-substrate positional references and validate semantic-anchor usage according to the ADR from #11559.

Expected scope:

  • ai/scripts/lint-agents.mjs
  • tests or fixtures for allowed historical/archaeology exceptions and disallowed live §N refs
  • CI evidence from lint-skill-manifest

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Agent lint New ADR from #11559 + Epic #11558 Fail when new live skill refs use positional §N instead of semantic anchors Cross-family review while lint evolves ADR + lint error text Unit/fixture coverage and CI run
Historical exceptions New ADR from #11559 Allow explicitly marked archaeology refs Manual review if classification ambiguous ADR Fixture coverage

Discussion Criteria Mapping

  • Cascade-correctness substrate -> lint + CI gate.
  • Step 2.5 path determinism -> lint verifies semantic identity where practical.
  • Active/archive boundary -> lint supports or documents exception handling.
  • Migration blast-radius partial -> lint gives merge-gate confidence during partitioned PRs.

Acceptance Criteria

  • Lint fails for new live .agents/skills/** references that use raw positional §N anchors.
  • Lint allows explicitly classified historical/archaeology references according to the ADR policy.
  • Tests/fixtures cover failing and allowed cases.
  • CI command for lint-skill-manifest exercises the new guard.
  • Lint error text points authors toward semantic-anchor references and the ADR.

Out of Scope

  • Migrating all existing references.
  • Defining the ADR policy itself.
  • Enforcing runtime framework behavior.

Avoided Traps / Gold Standards Rejected

  • Review-only enforcement is rejected because it cannot prevent recurrence across every future session and PR.
  • Over-broad banning of every historical §N occurrence is rejected because archaeology refs may intentionally point to historical states.

Related

Origin Session ID: 6e5b995a-c68e-4179-840c-a4cc48d449da Retrieval Hint: "lint-agents semantic anchor positional section refs lint-skill-manifest #11558"

tobiu referenced in commit 5f4c575 - "feat(ci): PR-diff-scoped semantic-anchor lint for agent skills (#11560) (#11572) on May 18, 2026, 9:20 AM
tobiu closed this issue on May 18, 2026, 9:20 AM
tobiu referenced in commit 9ec6841 - "fix(lint): invert lint-agents.mjs to block tags (#11584) (#11586) on May 18, 2026, 10:11 PM