Skip to content

docs(agent-docs): enforce canonical AGENTS symlinks#3298

Merged
caio-pizzol merged 1 commit into
mainfrom
caio/agent-docs-symlink-direction
May 14, 2026
Merged

docs(agent-docs): enforce canonical AGENTS symlinks#3298
caio-pizzol merged 1 commit into
mainfrom
caio/agent-docs-symlink-direction

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol commented May 14, 2026

Follow-up to #3296. Standardizes the AGENTS.md / CLAUDE.md symlink direction across the repo.

Every nested location already used AGENTS.md as the real file and CLAUDE.md as the symlink. Only the repo root inverted that pattern. This PR flips root to match, with AGENTS.md as the canonical file and CLAUDE.md preserved for Claude Code compatibility.

  • Policy: adds a canonical symlink direction rule under Placement.
  • L1 scanner: reports symlinked pairs with the wrong canonical file as linked-inverted deterministic findings.
  • Root files: flips AGENTS.md to the real 85-line file and CLAUDE.md to a symlink.

Verified locally: L1 audit no longer reports the root pair as inverted; the 12 linked AGENTS.md / CLAUDE.md pairs classify as canonical: AGENTS.md, with packages/superdoc intentionally different and allowlisted.

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 14, 2026 14:10
@caio-pizzol caio-pizzol merged commit 6e02c1c into main May 14, 2026
14 checks passed
@caio-pizzol caio-pizzol deleted the caio/agent-docs-symlink-direction branch May 14, 2026 14:12
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0047512d32

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +346 to +347
if (pair.classification === 'linked-inverted') return true;
if (pair.classification === 'unexpected-duplicate') return true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include pair findings in the full audit summary

When an inverted symlink pair is found during a full weekly/dispatch audit with ANTHROPIC_API_KEY available, this helper marks the pair as review-worthy only for renderL1Markdown; flaggedForReview(scan) still returns only files, and .github/scripts/agent-docs-audit.mjs prints renderMarkdown(report) rather than the L1 markdown on the non-skip path. As a result, linked-inverted pairs are uploaded in /tmp/agent-docs-audit-l1.md but are absent from the Step Summary/JSON that reviewers normally see, so the new canonical-direction finding is easy to miss unless AI is skipped.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant