Skip to content

Commit ebb165a

Browse files
royangerclaude
andcommitted
refactor(shared): shorten the AGENTS.md intro and link the Markdown docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 04262f8 commit ebb165a

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎packages/shared/src/__tests__/agentRules.spec.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,8 @@ describe('Clerk plugin rules', () => {
237237
it('uses the requested line endings', () => {
238238
expect(renderClerkSdkPluginBlock('\r\n')).not.toMatch(/[^\r]\n/);
239239
});
240+
241+
it('links agents to the Markdown Clerk docs in the root block', () => {
242+
expect(renderClerkAgentRulesBlock()).toContain('Clerk docs: https://clerk.com/docs.md');
243+
});
240244
});

‎packages/shared/src/agentRules/index.ts‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,9 @@ export function renderClerkAgentRulesBlock(eol = '\n') {
121121
122122
## Clerk: your training data is out of date
123123
124-
This project uses Clerk. The installed SDKs are newer than your training data. APIs,
125-
component names, and file conventions may have changed. Read the Clerk SDK section(s)
126-
below before writing or editing any auth code.
124+
Read the Clerk sections below before touching auth code. Only use Clerk APIs that exist in the installed package's types. Clerk docs: https://clerk.com/docs.md
127125
128-
Never recall a Clerk API from memory. If a symbol is not in the installed package's
129-
types, it does not exist.
130-
131-
This block is written by the Clerk SDK when a supported dev server starts, or by
132-
\`npx @clerk/upgrade --agents-md\`. Removing it from a diff can recreate the uncommitted
133-
change; commit it with your work.
126+
The Clerk SDK writes this block. Commit it with your work.
134127
135128
${PLUGIN_SECTION}
136129

0 commit comments

Comments
 (0)