This project is managed by @hivehub/rulebook. The authoritative rules come from the imports below. Claude Code loads all of them automatically at session start (see Anthropic memory docs).
- Read
AGENTS.mdandAGENTS.override.mdbefore making changes. These contain project-specific conventions that override generic guidance. - Never revert or discard uncommitted work — fix forward. Treat the working tree as sacred; investigate before destructive operations.
- Edit files sequentially, not in parallel. When a task touches 3+ files, decompose into 1–2 file sub-tasks.
- Run
check/type-check beforetest— diagnostic-first. Cheap diagnostics catch issues that expensive test suites miss or take longer to surface. - If a fix fails twice, escalate — stop, research, or open a team. Do not retry the same approach a third time.
- Prefer MCP tools (
mcp__rulebook__*and project-specific MCP servers) over shell commands when the equivalent tool exists. - Capture learnings: at the end of significant work, save patterns and anti-patterns to
.rulebook/knowledge/and insights to.rulebook/learnings/. - Never archive a task without docs updated, tests written, and tests passing — the task tail enforces this structurally.
This project uses the Rulebook MCP server for persistent memory across sessions.
- Start of session:
rulebook_memory_searchfor relevant prior context. - During work:
rulebook_memory_savefor decisions, bugs, discoveries, user preferences. - End of session:
rulebook_session_endto write a session summary.
Memory is auto-captured for tool interactions (task create/update/archive, skill enable/disable). Manual saves are required for everything else worth remembering.
Before implementing anything non-trivial:
rulebook_knowledge_list— check existing patterns and anti-patterns.rulebook_learn_list— review past learnings.rulebook_decision_list— review architectural decisions.
After implementing, capture at least one entry per task:
rulebook_knowledge_addfor reusable patterns or anti-patterns to avoid.rulebook_learn_capturefor implementation insights that don't belong in code comments.rulebook_decision_createfor significant architectural choices.
MANDATORY: ALWAYS use the Rulebook MCP tools for task management. Never create task directories or files manually — use rulebook_task_create, rulebook_task_update, rulebook_task_archive, rulebook_task_list, rulebook_task_show, rulebook_task_validate. These tools enforce naming conventions, mandatory tail items, phase structure, and metadata that manual file creation skips.
rulebook_task_listto see pending work.rulebook_task_createto create new tasks — nevermkdir+Writemanually.- Pick the first unchecked item from the lowest-numbered phase — never reorder.
- Read the task's
proposal.mdandtasks.mdbefore touching code. - Implement step by step. Run lint + type-check after each significant change.
rulebook_task_updateto change task status as you progress.- Mark items
[x]intasks.mdas you finish them. - The mandatory tail (docs + tests + verify) is not optional —
rulebook_task_archivewill refuse to close the task otherwise.