Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(daemon): move profile guidance under self-awareness (#547)

Gustavo Ye338ef2404e6a
diff --git a/src/daemon/src/drivers/systemPrompt.ts b/src/daemon/src/drivers/systemPrompt.ts
index c6e21b684..290d5d6a9 100644
--- a/src/daemon/src/drivers/systemPrompt.ts
+++ b/src/daemon/src/drivers/systemPrompt.ts
@@ -86,18 +86,6 @@ function identitySection(config: HostLaunchConfig): string {
"useful with strangers, careful in public. Let the channel set the tone.",
);
- if (config.description) {
- parts.push(
- "",
- "### Role",
- "",
- config.description,
- "",
- "A starting point, not a script. Capture how the role evolves in `./memory.md` " +
- "(the Role text above isn't editable directly).",
- );
- }
-
return parts.join("\n");
}
@@ -434,7 +422,22 @@ function chaosAwarenessSection(): string {
].join("\n");
}
-function workspaceMemorySection(): string {
+function workspaceMemorySection(config: HostLaunchConfig): string {
+ const roleSection = config.description
+ ? [
+ "",
+ "### Your bio",
+ "",
+ config.description,
+ "",
+ "Your bio is the public description of your role that other people and agents see on " +
+ "your Alook profile.",
+ "",
+ `You can change your own role and bio description with \`${CLI} setting profile ` +
+ `--set-bio <text>\`.`,
+ ]
+ : [];
+
return [
"## Self-awareness",
"",
@@ -446,6 +449,7 @@ function workspaceMemorySection(): string {
"",
"When context is missing, don't guess. Re-read `memory.md`, the context timeline, the workspace, " +
"or relevant channel history. That check *is* your remembering.",
+ ...roleSection,
"",
"### Napping",
"",
@@ -513,7 +517,7 @@ export function buildCliSystemPrompt(config: HostLaunchConfig): string {
criticalRulesSection(),
executionModelSection(),
chaosAwarenessSection(),
- workspaceMemorySection(),
+ workspaceMemorySection(config),
utilsSection(),
];
diff --git a/src/daemon/src/manager/agentProfile.test.ts b/src/daemon/src/manager/agentProfile.test.ts
index 5ee5b54b6..4d9cdfc62 100644
--- a/src/daemon/src/manager/agentProfile.test.ts
+++ b/src/daemon/src/manager/agentProfile.test.ts
@@ -68,7 +68,6 @@ describe("agent profile from server-downlinked RuntimeConfig", () => {
expect(ctxs).toHaveLength(1);
expect(ctxs[0].standingPrompt).toContain("You are the onboarding assistant.");
- expect(ctxs[0].standingPrompt).toContain("### Role");
expect(ctxs[0].config.description).toBe(
"You are the onboarding assistant.",
);
@@ -83,7 +82,6 @@ describe("agent profile from server-downlinked RuntimeConfig", () => {
runtimeConfig: makeRuntimeConfig({ runtime: "mock", agentName: "Bot" }),
});
mgr.deliver("agent_2", { seq: 1, text: "hi" });
- expect(ctxs[0].standingPrompt).toContain("### Role");
expect(ctxs[0].standingPrompt).toContain("Bot");
expect(ctxs[0].config.description).toBe("Bot");
});