6.3 KiB
6.3 KiB
Rules for ALL agents
Core Principles:
- Accuracy Over Speed: If you are not sure about file content or codebase structure pertaining to the user’s request, use your tools (
read_file,search_files,list_files) to gather the relevant information. DO NOT GUESS or make up an answer. Verify information before acting. - Plan and Reflect: You MUST plan extensively before each significant action or function call, and reflect thoroughly on the outcomes of previous function calls. DO NOT rely solely on function calls for the entire process; thoughtful planning and reflection are crucial for insightful problem-solving.
- Context Management:
- Be mindful of the context window. Prefer reading specific sections of files over entire large files.
- Proactive Summarization: Regularly summarize key information, progress, and context from logs and detailed documents into higher-level status files (e.g., Conductor summarizes Performer logs into task sheet notes; Score summarizes Conductor reports into project status notes). This helps keep essential information readily available without rereading large files.
- Check context usage conceptually or via
/check-contextcommand (if user-initiated). If approaching limits (e.g., 80%), prioritize summarization and prepare for potential handoff if essential.
Communication and Delegation:
- Automation Level Check: Before delegating (
new_task) or initiating communication using another agent's user command, you MUST verify the current automation level specified insymphony-[project-slug]/core/symphony-core.mdpermits this action. Follow the automation level guidelines strictly. - Delegation Logging: Before delegating to another agent via
new_task, update the relevant team log (symphony-[project-slug]/communication/[goal-id]/[goal-id]-team-log.mdorsymphony-[project-slug]/communication/agent-interactions.mdif goal-specific log doesn't exist). For each delegation include:----Begin Update---- # Goal: [Goal-ID or N/A] # Task: [Task-ID or N/A] - [Brief Task Name] Description: [brief description of delegated task] Assigned to: [Agent-Slug] Communicated on: [date and time] ----End Update---- - Common Commands: Standard commands like
/delegate-to,/request-review,/escalateshould be used consistently as defined in each agent's command list, always respecting the current automation level. Delegation typically usesnew_taskinternally, while/delegate-tomight be reserved for specific user-like interactions when automation is high./escalatealways targets a higher coordinating role (Conductor -> Score, Score -> Composer).
Standard User Commands & Procedures:
- Agents should recognize standard commands defined in their respective
03-user-commands.mdfiles. /continueCommand Procedure: When an agent receives the/continuecommand, it MUST follow the standard handoff procedure:- Identify its own agent slug/type and current context (Goal/Task ID, mode).
- Generate a comprehensive handoff markdown document in the
symphony-[project-slug]/handoffs/directory, following naming conventions (DDMMYYYYHHHH_[agent-slug]_[brief-topic].md). This document must summarize the current state, progress, issues, relevant code snippets (read_file), file references, and the objective for the next agent. Usewrite_to_fileto create it andread_fileto verify. - Check the current automation level in
symphony-core.mdusingread_file. - If automation allows, delegate the task via
new_taskto another agent of the same type. Thenew_taskmessage must state it's a continuation, reference the handoff document path, and specify the objective. Log the delegation usingappend_to_fileappend toagent-interactions.md. - If automation does not allow delegation, inform the user that the handoff document is created but the
new_taskdelegation requires manual initiation. - Log all tool calls with rationale as per standard procedure.
File System Usage:
- Reserved Directory: The
symphony-[project-slug]/folder structure is reserved EXCLUSIVELY for the following file types used by Symphony agents:
No other file types (e.g., source code, binaries, general images) should be stored directly within this structure unless explicitly part of a required artifact (like a Mermaid diagram within aMarkdown - .md Text - .txt.mdfile). Source code belongs in the project's main directories, tests intests/, etc. - Log Files: All log files (work logs, team logs, communication logs) MUST be updated using an append-only approach. DO NOT delete or overwrite previous entries. Always timestamp new entries.
- Structured Data: Where appropriate (e.g., status files, registries), use structured data formats within Markdown files (like consistent key-value pairs, tables, or embedded JSON/YAML-like blocks) to facilitate easier parsing and targeted updates using
apply_diffor carefulwrite_to_file. - Verification: After critical file operations (
write_to_file,apply_diff), consider usingread_fileon the relevant section or checking file metadata to verify the change was successful, especially if the change affects system state. - Visual Documentation: Where instructed (e.g., for architecture, plans, flows), generate diagrams using Mermaid syntax within Markdown files. Ensure diagrams are kept up-to-date with the state they represent.
Error Handling:
- Tool Failures: If a tool like
write_to_fileorapply_difffails, log the error and attempt the operation again using a safer method (e.g., switch fromapply_difftowrite_to_filefor the whole file). If it still fails, escalate the issue. - Command Failures: If a command via
execute_commandfails:- Analyze the error output.
- If the cause is clear (e.g., syntax error, missing dependency), attempt to fix it and retry the command once.
- If the cause is unclear or the retry fails, log the command, the error, and escalate the issue to the appropriate role (e.g., Performer -> Conductor).
- Conflicting Information: If you detect conflicting information between different state files, prioritize the source of truth defined by the system (e.g.,
symphony-core.mdfor automation levels, Conductor's task sheet for task status). Log the discrepancy and escalate if it impacts critical operations.