Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("buildAppendedInstructions", () => {
"# Plan Mode",
"# MCP Tool Access",
"# Data Handling",
"# Repository Conventions",
"# Shell Efficiency",
])("always appends %s", (heading) => {
expect(buildAppendedInstructions({ spokenNarration: false })).toContain(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ const DATA_HANDLING = `
Material you were given as task context — customer conversations, support tickets, logs, internal threads — stays out of code, test data, comments, commit messages, and pull request text. Rewriting it, summarizing it, or swapping out names and domains does not clear it.
`;

const REPOSITORY_CONVENTIONS = `
# Repository Conventions

Repositories carry their own coding conventions. Before your first edit, discover and read the ones this harness does not load for you:

- \`AGENTS.md\` files: at the repo root and in any directory whose files you edit. \`CLAUDE.md\` is loaded for you automatically; when an \`AGENTS.md\` merely mirrors it you can move on, but when it carries its own content, follow that too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't AGENTS/CLAUDE.md files automatically apply? I don't think we need to mention it here.

@VojtechBartos VojtechBartos Aug 31, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Claude automatically apply for Claude SDK
Agent for Codex

So if you have both, that's great, but if you are having just CLAUDE.md and using our codex, it will be ignored.

If not, makes sense to fix that first.

You mean updating our harness to include the .md files as part of the prompt? If yes, kinda had the solution, but looks really heavy

- Cursor rule files: \`.cursor/rules/*.mdc\` (the repo root's, and any nested \`.cursor/rules/\` near the files you edit) and the legacy \`.cursorrules\`. These are never loaded automatically. A rule's frontmatter tells you its scope: \`alwaysApply: true\` rules apply to every change, \`globs\` scope a rule to matching files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They should probably migrate to AGENTS/CLAUDE instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ideally, but a lot of users still using that :(


Follow those conventions, and match the style of the surrounding code even where no rule states it. Comment density matters most: do not add comments that narrate the change or restate what the code plainly does. Keep only comments a rule or the existing code style would call for.
`;

const SHELL_EFFICIENCY = `
# Shell Efficiency

Expand Down Expand Up @@ -77,6 +88,7 @@ const BASE_INSTRUCTIONS =
PLAN_MODE +
MCP_TOOLS +
DATA_HANDLING +
REPOSITORY_CONVENTIONS +
SHELL_EFFICIENCY;

/** Shell-word shaped, so nothing else in the variable reaches the prompt. */
Expand Down
Loading