Skip to content

Commit 6448306

Browse files
authored
chore: auto-include AGENTS.md content in Claude Code sessions (#4931)
* chore: auto-include AGENTS.md content in Claude Code sessions The markdown link to AGENTS.md was informational only — it did not pull file content into context. Switch to the @-include syntax so the canonical conventions load automatically and apply by default. * chore: auto-include canonical docs in Claude Code slash commands The four slash commands each have a "Canonical reference" pointing to a doc in documentation/agent-instructions/, but the existing markdown links were informational only — the canonical content was not loaded when the command ran, so the agent had to Read the doc manually. Add @-includes so the canonical instructions enter context the moment the command is invoked.
1 parent 7a2099e commit 6448306

5 files changed

Lines changed: 10 additions & 0 deletions

File tree

.claude/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
>
66
> This file holds only Claude-Code-specific configuration that doesn't belong in `AGENTS.md`.
77
8+
@../AGENTS.md
9+
810
## Path-Scoped Rules
911

1012
Claude Code automatically loads rules in `.claude/rules/` when working on matching files:

.claude/commands/accessibility-audit.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Conduct an accessibility audit of the URL provided in **$ARGUMENTS** against WCA
44

55
> **Canonical reference:** [`documentation/agent-instructions/ACCESSIBILITY_AUDIT.md`](../../documentation/agent-instructions/ACCESSIBILITY_AUDIT.md) — the 13-section audit checklist, output format, severity rubric, and tips for the agent. Project-wide accessibility expectations live in [`AGENTS.md`](../../AGENTS.md) § Accessibility.
66
7+
@../../documentation/agent-instructions/ACCESSIBILITY_AUDIT.md
8+
79
## Steps
810

911
1. Open the URL with a browser-automation MCP server (Playwright or Chrome DevTools). MCP servers are configured in personal Claude Code settings.

.claude/commands/audit-harnesses.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Run a read-only consistency audit across the AI agent configurations in this rep
44

55
> **Canonical reference:** [`documentation/agent-instructions/HARNESS_AUDIT.md`](../../documentation/agent-instructions/HARNESS_AUDIT.md) — explicit scope (Claude Code, Copilot, OpenCode), the canonical-docs pattern, the eight audit steps, finding classification, severity rubric, and report format.
66
7+
@../../documentation/agent-instructions/HARNESS_AUDIT.md
8+
79
## Workflow
810

911
1. Read the canonical playbook above. The scope, the surfaces in play, and the report shape all live there.

.claude/commands/create-component-doc.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Restructure the raw content in **$ARGUMENTS** into a properly formatted componen
44

55
> **Canonical reference:** [`documentation/agent-instructions/COMPONENT_DOC_STYLE.md`](../../documentation/agent-instructions/COMPONENT_DOC_STYLE.md) — tone of voice, formatting conventions (British English, no em-dashes, admonitions), section order, output template, Storybook iframes workflow, sidebar registration, and the verification checklist. Project-wide conventions live in [`AGENTS.md`](../../AGENTS.md).
66
7+
@../../documentation/agent-instructions/COMPONENT_DOC_STYLE.md
8+
79
## Input
810

911
$ARGUMENTS

.claude/commands/new-component.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Create a new EDS 2.0 component named **$ARGUMENTS** in `packages/eds-core-react/
44

55
> **Canonical reference:** [`documentation/agent-instructions/BUILDING_EDS_2_COMPONENTS.md`](../../documentation/agent-instructions/BUILDING_EDS_2_COMPONENTS.md) — foundation data-attributes, critical patterns, file templates, common mistakes, advanced patterns, and the anti-patterns checklist. Project-wide conventions live in [`AGENTS.md`](../../AGENTS.md).
66
7+
@../../documentation/agent-instructions/BUILDING_EDS_2_COMPONENTS.md
8+
79
This command focuses on the per-component scaffolding flow. The patterns and code templates referenced below all live in the canonical doc above — read them there rather than inferring from memory.
810

911
## Workflow

0 commit comments

Comments
 (0)