Skip to content

Commit 5695555

Browse files
committed
Add documentation guidance hierarchy for AI agents
1 parent d1544ec commit 5695555

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/agent/composer.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ export function composeCursorPrinciples(config: ProjectConfig): string[] {
541541
"",
542542
"# AI Working Rules",
543543
"",
544+
"Before making changes:",
545+
"1. Read `docs/AGENTS.md` for project rules and constraints.",
546+
"2. Read `docs/instructions.md` for setup, verification, and extension workflow.",
547+
"3. Treat these documents as the source of truth for repository-specific agent behavior.",
548+
"",
544549
"Act like: Senior Engineer + Pragmatic Architect + Fast Implementer.",
545550
"",
546551
"Prioritize:",

src/utils/agentRules.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ function buildAgentsGuide(config: ProjectConfig): string {
7575
"- Dribbble designer",
7676
"- Framework collector",
7777
"",
78+
"## Guidance Order",
79+
"",
80+
"When working in this repository:",
81+
"1. Follow `.cursorrules` for concise working behavior.",
82+
"2. Follow this `AGENTS.md` for engineering policy and constraints.",
83+
"3. Use `docs/instructions.md` for setup, verification, and extension workflow.",
84+
"",
7885
...composeSharedConstitution(),
7986
"",
8087
"## Current Project Profile",

0 commit comments

Comments
 (0)