agent-lyceum 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prompt.js +6 -2
- package/package.json +1 -1
package/dist/prompt.js
CHANGED
|
@@ -19,6 +19,10 @@ function readCapped(file, limit) {
|
|
|
19
19
|
return { text: buf.toString("utf8"), truncated: false };
|
|
20
20
|
return { text: buf.subarray(0, limit).toString("utf8"), truncated: true };
|
|
21
21
|
}
|
|
22
|
+
/** A PR only needs to say agent-lyceum opened it; no agent or role names. */
|
|
23
|
+
const PR_ATTRIBUTION_RULE = "- If you open a pull request, end its description with a line saying it was opened by agent-lyceum (e.g. `🤖 Opened by agent-lyceum`). Do not name any agent or role in it.";
|
|
24
|
+
/** A tool call that never returns (a server or daemon started in the foreground) burns the whole wake-up timeout and the finished work is thrown away with it. */
|
|
25
|
+
const NO_DAEMONS_RULE = "- Never start a server, daemon or watcher (pm2, `serve`, `dev`, `--watch`) in the foreground of a command, and never leave one running. Run it in the background, bound every such command with `timeout 60`, stop what you started before you finish, and if it cannot start (e.g. a sandbox denies binding a port) report that as unverified instead of retrying.";
|
|
22
26
|
export function readPersona(agent) {
|
|
23
27
|
return fs.readFileSync(agent.agentMd, "utf8").trim();
|
|
24
28
|
}
|
|
@@ -41,7 +45,7 @@ export function buildSoloSystemPrompt(project, agent) {
|
|
|
41
45
|
if (mems.length) {
|
|
42
46
|
lines.push("Keep a `MEMORY.md` index in each memory directory (one line per entry, pointing at a file). Its contents are shown in your prompt on every wake-up; you can write only inside these directories.", "Use memory only for durable lessons that stay true across tasks; never record task-specific details there.");
|
|
43
47
|
}
|
|
44
|
-
lines.push("", "## Rules", "- Never edit any `AGENT.md`, `COMMON.md`, or the repository's own `CLAUDE.md`/`AGENTS.md`.", "- Never touch another agent's memory, inbox or outbox, or the configuration files of agent-lyceum.");
|
|
48
|
+
lines.push("", "## Rules", "- Never edit any `AGENT.md`, `COMMON.md`, or the repository's own `CLAUDE.md`/`AGENTS.md`.", "- Never touch another agent's memory, inbox or outbox, or the configuration files of agent-lyceum.", PR_ATTRIBUTION_RULE, NO_DAEMONS_RULE);
|
|
45
49
|
return lines.join("\n");
|
|
46
50
|
}
|
|
47
51
|
/** The prompt of a `call`: the memory indexes the agent is used to, then the task. */
|
|
@@ -118,7 +122,7 @@ export function buildSystemPrompt(project, agent) {
|
|
|
118
122
|
}
|
|
119
123
|
lines.push("", "## Rules");
|
|
120
124
|
lines.push("- Never edit any `AGENT.md`, `COMMON.md`, or the repository's own `CLAUDE.md`/`AGENTS.md`" +
|
|
121
|
-
(isLead || agent.canEditAgentMd ? " unless you need to as lead (changes are logged)." : "."), "- Never touch another agent's memory, inbox or outbox, or the team's config files.", `- The shared team context is in \`${commonFile(project)}\`${isLead ? " (you maintain it; keep it short)" : " (read-only)"}.`,
|
|
125
|
+
(isLead || agent.canEditAgentMd ? " unless you need to as lead (changes are logged)." : "."), "- Never touch another agent's memory, inbox or outbox, or the team's config files.", `- The shared team context is in \`${commonFile(project)}\`${isLead ? " (you maintain it; keep it short)" : " (read-only)"}.`, PR_ATTRIBUTION_RULE, NO_DAEMONS_RULE);
|
|
122
126
|
if (project.dispatcher.max_parallel > 1 && agent.owns.length > 0 && !isLead) {
|
|
123
127
|
lines.push(`- You own these repo paths and must only change files there: ${agent.owns.join(", ")}.`);
|
|
124
128
|
}
|