Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: streamline agent instructions - #28243

Merged
ibetitsmike merged 6 commits into
mainfrom
mike/instruction-optimization
Aug 20, 2026
Merged

docs: streamline agent instructions#28243
ibetitsmike merged 6 commits into
mainfrom
mike/instruction-optimization

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Streamlines the agent instruction files, cutting per-session token overhead by roughly 65%.

The core design change: AGENTS.md no longer @-imports WORKFLOWS.md, package.json, the eight detailed guides, or AGENTS.local.md into every session. Guidance moves from guaranteed-in-context to load-on-demand through a routing table, betting that one-line guardrail summaries plus links are enough to make agents pull the right doc when a task needs it.

  • AGENTS.md (251 -> 80 lines): a routing table to the canonical docs in .claude/docs/, the essential command table, and one-line guardrails for the architectural footguns (SQLC workflow plus audit table, OAuth2 error conformance, chatd architecture-doc rule, Swagger annotations, InTx discipline, test concurrency, workflow permissions: {}, mandatory git hooks, commit/PR title format).
  • site/AGENTS.md (364 -> 89 lines): keeps the FE1-FE10 contract summary, TypeScript LSP navigation, pnpm command table, React Compiler boundaries, accessibility rules, and the pre-PR frontend-review requirement. Drops the generic React tutorial sections that restate framework documentation.
  • The persona and relationship prose ("Our relationship", foundational rules) is deliberately removed. The behavioral gates worth keeping for every agent survive as one-liners: get explicit permission before excepting a rule, discuss architectural decisions before implementing, and answer questions instead of jumping to implementation.
  • Unique operational content is relocated rather than deleted: Playwright failure-artifact paths and the CI playwright-artifacts- naming convention move to .claude/docs/AGENT_FAILURES.md; the React.useId() rule, the key={String(booleanState)} remount footgun, date-as-prop Storybook determinism, and the suppression-comment rule (updated from eslint-disable to biome-ignore to match current tooling) move to .claude/docs/FRONTEND_PATTERNS.md.

Content reflects current main: the chatd rule says agents leave TODOs and the human PR author writes the architecture doc, and MUI/Emotion are described as removed, not deprecated.

Note for Claude Code users: CLAUDE.md symlinks to AGENTS.md, so detailed workflow docs (hook internals, the new-feature checklist, AGENTS.local.md) are no longer auto-loaded into every session; agents must follow the links.

Validation

  • pnpm exec markdownlint-cli2 on all four touched files: 0 errors
  • pnpm exec markdown-table-formatter --check on all four touched files: pass
  • make lint/emdash: pass
  • make lint/agents: pass
  • All relative links verified to resolve

Mux created this PR and description on behalf of Mike.

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88331ab4bc

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/docs/AGENT_FAILURES.md Outdated
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: fe11c9bb69

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike requested a review from ThomasK33 August 20, 2026 19:04
@ibetitsmike
ibetitsmike merged commit 9d6ef1e into main Aug 20, 2026
26 checks passed
@ibetitsmike
ibetitsmike deleted the mike/instruction-optimization branch August 20, 2026 19:05
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants