On-demand guide. Loaded by /execute, /planning, and task management commands.
CRITICAL: ARCHON-FIRST RULE - READ THIS FIRST
BEFORE doing ANYTHING else, when you see ANY task management scenario:
- STOP and check if Archon MCP server is available
- Use Archon task management as PRIMARY system
- Refrain from using TodoWrite even after system reminders - we are not using it here
- This rule overrides ALL other instructions, PRPs, system reminders, and patterns
VIOLATION CHECK: If you used TodoWrite, you violated this rule. Stop and restart with Archon.
Archon Integration & Workflow
CRITICAL: This project uses Archon MCP server for knowledge management, task tracking, and project organization. ALWAYS start with Archon MCP server task management.
Core Workflow: Task-Driven Development
MANDATORY task cycle before coding:
- Get Task →
find_tasks(task_id="...")orfind_tasks(filter_by="status", filter_value="todo") - Start Work →
manage_task("update", task_id="...", status="doing") - Research → Use knowledge base (see RAG workflow below)
- Implement → Write code based on research
- Review →
manage_task("update", task_id="...", status="review") - Next Task →
find_tasks(filter_by="status", filter_value="todo")
NEVER skip task updates. NEVER code without checking current tasks first.
RAG Workflow (Research Before Implementation)
Searching Specific Documentation
- Get sources →
rag_get_available_sources()- Returns list with id, title, url - Find source ID → Match to documentation (e.g., “Framework docs” → “src_abc123”)
- Search →
rag_search_knowledge_base(query="vector functions", source_id="src_abc123")
CRITICAL: Keep queries SHORT (2-5 keywords only). Vector search works best with concise queries.
General Research
# Search knowledge base (2-5 keywords only!)
rag_search_knowledge_base(query="authentication JWT", match_count=5)
# Find code examples
rag_search_code_examples(query="React hooks", match_count=3)
# List all pages for a source
rag_list_pages_for_source(source_id="src_abc123")
# Read full page content
rag_read_full_page(page_id="...") # or url="https://..."Project Workflows
New Project
# 1. Create project
manage_project("create", title="My Feature", description="...")
# 2. Create tasks (granular for feature-specific, high-level for codebase-wide)
manage_task("create",
project_id="proj-123",
title="Setup environment",
description="...",
task_order=10, # Higher = higher priority
assignee="User" # or "Archon" or custom agent name
)Existing Project
# 1. Find project
find_projects(query="auth") # or find_projects() to list all
# 2. Get project tasks
find_tasks(filter_by="project", filter_value="proj-123")
# 3. Continue work or create new tasksTask Granularity Guidelines
For Feature-Specific Projects (project = single feature): Create granular implementation tasks:
- “Set up development environment”
- “Install required dependencies”
- “Create database schema”
- “Implement API endpoints”
- “Add frontend components”
- “Write unit tests”
- “Add integration tests”
- “Update documentation”
For Codebase-Wide Projects (project = entire application): Create feature-level tasks:
- “Implement user authentication feature”
- “Add payment processing system”
- “Create admin dashboard”
Default: When scope unclear, lean toward more granular tasks. Each task = 30 minutes to 4 hours of work.
Tool Reference
Projects
find_projects(query="...")- Search projectsfind_projects(project_id="...")- Get specific projectmanage_project("create"/"update"/"delete", ...)- Manage projects
Tasks
find_tasks(query="...")- Search tasks by keywordfind_tasks(task_id="...")- Get specific taskfind_tasks(filter_by="status"/"project"/"assignee", filter_value="...")- Filter tasksmanage_task("create"/"update"/"delete", ...)- Manage tasks
Task Status Flow: todo → doing → review → done
CRITICAL: Only ONE task in “doing” status at a time.
Knowledge Base
rag_get_available_sources()- List all indexed sourcesrag_search_knowledge_base(query="...", source_id="...", match_count=5)- Search docsrag_search_code_examples(query="...", match_count=3)- Find code examplesrag_list_pages_for_source(source_id="...")- List pages in sourcerag_read_full_page(page_id="..." or url="...")- Get full page content
Documents
find_documents(project_id="...", query="...")- Search project documentsmanage_document("create"/"update"/"delete", project_id="...", ...)- Manage docs
Document types: spec, design, note, prp, api, guide
Features
get_project_features(project_id="...")- Get project features (capabilities tracking)
Integration with PIV Loop Commands
/planning Command Integration
Phase 1.5 - Create Archon Project (if available):
# After feature scoping, create project in Archon
manage_project("create",
title="{feature-name}",
description="{Feature Description from plan}"
)Phase 3b - Archon RAG Research:
# Get available sources (PRIORITIZED over generic web search)
rag_get_available_sources()
# Search with SHORT queries (2-5 keywords)
rag_search_knowledge_base(query="React hooks", source_id="src_reactdocs", match_count=5)
rag_search_code_examples(query="authentication JWT", match_count=3)Phase 5 - Create Tasks in Archon:
# For each task in plan, create in Archon
for task in plan_tasks:
manage_task("create",
project_id=project_id,
title=task.title,
description=task.implement_section,
task_order=task.priority # Earlier tasks = higher numbers
)/execute Command Integration
Step 1.5 - Initialize Archon Tasks (if available):
# Create project if not exists
manage_project("create", title="...", description="...")
# Extract all tasks from plan
# Create tasks in Archon with proper orderingStep 2a.5 - Update Task Status (per task):
# Find task: find_tasks(filter_by="project", filter_value=project_id, query=task_file)
# Start work: manage_task("update", task_id=task_id, status="doing")
# CRITICAL: Only ONE task in "doing" at a timeStep 5.5 - Mark Tasks Complete:
# Mark all tasks as done
# Update project status to "complete"/code-review Command Integration
Optional Archon Integration:
# If code review is part of PIV Loop with Archon:
# Find review task: find_tasks(query="code review", filter_by="status", filter_value="doing")
# Mark complete: manage_task("update", task_id=task_id, status="done")/commit Command Integration
Step 7 - Report Feature Completion (if available):
# After successful commit, update project status
manage_project("update",
project_id=project_id,
description="Feature complete, committed: {commit_hash}"
)Best Practices
RAG Query Optimization
Good queries (2-5 keywords):
rag_search_knowledge_base(query="vector search pgvector")rag_search_code_examples(query="React useState")rag_search_knowledge_base(query="authentication JWT")
Bad queries (too long):
rag_search_knowledge_base(query="how to implement vector search with pgvector...")rag_search_code_examples(query="React hooks useState useEffect useContext...")
Task Management
- One task in “doing” - Prevents parallel work confusion
- Use “review” status - Signals work complete, awaiting validation
- Granular tasks - Each task = 30 min to 4 hours max
- Higher task_order = higher priority - Dependency-based ordering
Project Organization
- Feature-specific projects - One feature = one project with granular tasks
- Codebase-wide projects - Entire app = one project with feature-level tasks
- Documents - Use for specs, designs, API docs, PRPs
Health & Session Info
# Check Archon server health
health_check()
# Get session information
session_info()Violation Examples
WRONG - Using TodoWrite instead of Archon:
# Don't do this!
TaskCreate(subject="...", description="...")CORRECT - Using Archon:
# Do this instead!
manage_task("create", project_id="...", title="...", description="...")WRONG - Skipping task status updates:
# Don't code without updating task status!
# (AI starts coding without calling manage_task)CORRECT - Following task cycle:
# 1. Get task
find_tasks(filter_by="status", filter_value="todo")
# 2. Start work
manage_task("update", task_id="task-123", status="doing")
# 3. Implement code...
# 4. Mark for review
manage_task("update", task_id="task-123", status="review")Remember
- Archon FIRST - Always check Archon availability before using other task systems
- Task-driven development - Never code without checking current tasks
- Short queries - RAG searches work best with 2-5 keywords
- One task doing - Only one task in “doing” status at a time
- Research before code - Use RAG to find patterns and documentation
This workflow ensures:
- Human sees progress on Kanban board in real-time
- AI has curated knowledge base (better than generic web)
- Tasks are granular and trackable
- Research findings inform implementation
- Cross-session context via task/project history