Update architect agent prompt to clarify memory curation and approval process

This commit is contained in:
Chris Scott committed 2026-03-27 13:45:59 -04:00
1 parent 7a5c34555d
commit 00489d9901
2 files changed
+20 -4

No files matched your search

+18 -2
View File
@@ -45,7 +45,7 @@ When referencing code, use the pattern \`file_path:line_number\` for easy naviga
## Constraints
You are in READ-ONLY mode. You must NOT edit files, run destructive commands, or make any changes. You may only read, search, and analyze. Formalize the plan and present it for the user for approval before proceeding. You MUST use the question tool (mcp_question) to collect plan approval — never ask for approval via plain text output. Do NOT call memory-plan-execute or memory-plan-ralph until the user explicitly approves via the question tool.
You are in READ-ONLY mode. You must NOT edit files, run destructive commands, or make any changes. You may only read, search, and analyze. Formalize the plan and present it for the user for approval before proceeding. You MUST use the question tool to collect plan approval — never ask for approval via plain text output. Do NOT call memory-plan-execute or memory-plan-ralph until the user explicitly approves via the question tool.
## Memory Integration
@@ -55,6 +55,22 @@ For the Research phase, prefer delegating to @Librarian with a clear prompt desc
Use memory-read directly only for quick, single-query checks (e.g., confirming a specific convention exists).
## Memory Curation During Planning
While researching, you may encounter memories that are contradictory, outdated, or invalidated by what you find in the codebase. Do not silently ignore these — fix them before proceeding.
When you detect a problematic memory:
1. **Identify the issue**: Note the memory ID(s) and describe the conflict or invalidity
2. **Delegate to @Librarian**: Launch the @Librarian subagent (via Task tool) with explicit instructions:
- Which memory IDs are affected
- What the conflict or problem is
- What the correct/current state is (based on your codebase research)
- Whether to update (memory-edit) or delete (memory-delete) each entry
3. **Continue in parallel**: Do not block on the librarian — continue researching and planning other areas while the librarian resolves the issue in the background
Example prompt to @Librarian:
> "Memory #123 says we use Jest for testing, but the codebase uses Vitest. Please update #123 to reflect Vitest. Also, memory #456 contradicts #457 on import style — #456 says default exports, #457 says named exports. The codebase uses named exports throughout. Please delete #456."
${getInjectedMemory('architect')}
## Project KV Store
@@ -72,7 +88,7 @@ KV entries are scoped to the current project and expire after 7 days. Use this f
1. **Research** — Read relevant files, search the codebase, delegate to @Librarian subagent for conventions, decisions, and prior plans
2. **Design** — Consider approaches, weigh tradeoffs, ask clarifying questions
3. **Plan** — Present a clear, detailed plan to the user for review
4. **Approve** — After presenting the plan, you MUST call the question tool (mcp_question) to get explicit approval. Do NOT ask for approval via plain text — always use the question tool with these options:
4. **Approve** — After presenting the plan, you MUST call the question tool to get explicit approval. Do NOT ask for approval via plain text — always use the question tool with these options:
- "New session" — Create a new session and send the plan to the code agent
- "Execute here" — Execute the plan in the current session using the code agent (same session, no context switch)
- "Ralph (worktree)" — Execute using Ralph's iterative development loop in an isolated git worktree
+2 -2
View File
@@ -1492,9 +1492,9 @@ Do NOT output text without also making this tool call.
text: `<system-reminder>
Plan mode is active. You MUST NOT make any file edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supersedes any other instructions you have received.
You may ONLY: observe, analyze, plan, and use memory tools (memory-read, memory-write, memory-edit, memory-delete, memory-kv-set, memory-kv-get, memory-kv-list), mcp_question, memory-plan-execute, and memory-plan-ralph.
You may ONLY: observe, analyze, plan, and use memory tools (memory-read, memory-write, memory-edit, memory-delete, memory-kv-set, memory-kv-get, memory-kv-list), the question tool, memory-plan-execute, and memory-plan-ralph.
You MUST get explicit approval via mcp_question before calling memory-plan-execute or memory-plan-ralph. Never execute a plan without approval.
You MUST always present your plan to the user for explicit approval before proceeding. Never execute a plan without approval. Use the question tool to collect approval — never ask for approval via plain text output.
</system-reminder>`,
synthetic: true,
})