mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Read from AGENTS.md before CONTEXT.md
This commit is contained in:
1 file changed
+5
-4
+5
-4
@@ -57,22 +57,23 @@ export async function makeSystemPrompt(opts: MakeSystemPromptOpts): Promise<stri
|
||||
// README.md not found, continue
|
||||
}
|
||||
|
||||
// Add context from CONTEXT.md if it exists
|
||||
// Add context from AGENTS.md if it exists
|
||||
try {
|
||||
const { text } = await getContext(fs, cwd);
|
||||
const { text } = await getAgentContext(fs, cwd);
|
||||
system += "\n\n" + text;
|
||||
} catch {
|
||||
// CONTEXT.md not found, continue
|
||||
// AGENTS.md not found, continue
|
||||
}
|
||||
|
||||
return system;
|
||||
}
|
||||
|
||||
async function getContext(
|
||||
async function getAgentContext(
|
||||
fs: JSRuntimeFS,
|
||||
cwd: string,
|
||||
): Promise<{ filename: string; text: string }> {
|
||||
const contextFiles = [
|
||||
"AGENTS.md",
|
||||
"CONTEXT.md",
|
||||
"CLAUDE.md",
|
||||
"codex.md",
|
||||
|
||||
Reference in new issue
Block a user