Artifact Management
Local .AGENTS.md (Per-Directory)
- •Purpose: Distributed long-term memory for specific directories.
- •Location: In every source code directory (e.g.,
src/services/.AGENTS.md). - •Single Writer: ONLY the Developer agent is allowed to create or update these files. All other agents (Analyst, Reviewer, etc.) must only READ them.
- •Format:
markdown
# Directory: src/services/ ## Purpose [Brief description of the directory's purpose] ## Files ### [filename.py] **Classes/Functions:** - `[ClassName]` — [Description] - `[method_name]` — [Description]
Global Artifacts
- •TASK.md: Technical Specification. Managed by Analyst.
- •ARCHITECTURE.md: System Architecture. Managed by Architect.
- •PLAN.md: Development Plan. Managed by Planner.
Dual State Tracking (CRITICAL)
You serve TWO masters:
- •Agentic Mode (Internal): You have an internal
<appDataDir>/brain/.../task.mdfor YOUR mental state. This is ephemeral and for your eyes only. - •Project Protocol (External): You MUST maintain
docs/TASK.mdas the persistent Source of Truth for the TEAM.
Resolution Rule:
NEVER let your internal
task.mdreplace or obsolete the Projectdocs/TASK.md. You must keepdocs/TASK.mdup-to-date even if you are tracking granular steps internally. When "Creating a TASK", you createdocs/TASK.md.
Archiving Protocol (CRITICAL)
[!IMPORTANT] Complete protocol is in
skill-archive-task. This skill depends onskill-archive-taskfor archivingdocs/TASK.md.
Before creating a NEW docs/TASK.md:
- •Apply Skill:
skill-archive-task - •Follow the 6-step protocol defined there
See skill-archive-task for:
- •When to Archive (conditions)
- •Decision Logic (new vs refinement)
- •Protocol Steps (6 steps)
- •Filename generation (tool or manual fallback)
Safe Commands (Auto-Run without Approval)
See
skill-safe-commandsfor the complete list of commands safe for auto-execution.
Key commands: mv docs/TASK.md docs/tasks/..., ls, cat — read-only validation.
Protocol
- •Read First: Before starting work, read relevant artifacts.
- •Update Immediately: Update artifacts corresponding to your changes (Developer updates
.AGENTS.md, Analyst updatesTASK.md). - •Consistency: Ensure artifacts match the actual code state.