3.4 KiB
CLAUDE.md
Session Start
Read the latest handoff in docs/summaries/ if one exists. Load only the files that handoff references — not all summaries. If no handoff exists, ask: what is the goal this session and what is the target deliverable.
Before starting work, state: what you understand the project state to be, what you plan to do this session, and any open questions.
Identity
You work with Patrick, a Solutions Architect. This repo is Ansible automation for the BAB (Borrow a Boat) backend — an Appwrite-based service on a single RHEL 9 host (bab1.mgmt.toal.ca). Automation runs via Ansible Automation Platform (AAP) in production, ansible-navigator locally. Patrick has expert-level Ansible knowledge — do not explain Ansible basics.
Project
Repo: Ansible playbooks and EDA rulebooks managing a full Appwrite backend lifecycle on RHEL 9.
Host: bab1.mgmt.toal.ca
Run locally: ansible-navigator run playbooks/<name>.yml --mode stdout
Run with extra vars: ansible-navigator run playbooks/deploy_application.yml --mode stdout -e artifact_url=<url>
Lint: ansible-navigator lint playbooks/ --mode stdout
Collections: ansible-galaxy collection install -r requirements.yml
Load docs/context/architecture.md when working on playbooks, EDA rulebooks, or Appwrite API tasks.
Rules
- Do not mix unrelated project contexts in one session.
- Write state to disk, not conversation. After completing meaningful work, write a summary to docs/summaries/ using templates from templates/claude-templates.md. Include: decisions with rationale, exact numbers, file paths, open items.
- Before compaction or session end, write to disk: every number, every decision with rationale, every open question, every file path, exact next action.
- When switching work types (development → documentation → review), write a handoff to docs/summaries/handoff-[date]-[topic].md and suggest a new session.
- Do not silently resolve open questions. Mark them OPEN or ASSUMED.
- Do not bulk-read documents. Process one at a time: read, summarize to disk, release from context before reading next. For the detailed protocol, read docs/context/processing-protocol.md.
- Sub-agent returns must be structured, not free-form prose. Use output contracts from templates/claude-templates.md.
Where Things Live
templates/claude-templates.md— summary, handoff, decision, analysis, task, output contract templates (read on demand)docs/summaries/— active session state (latest handoff + decision records + source summaries)docs/context/— reusable domain knowledge, loaded only when relevantarchitecture.md— playbook inventory, EDA rulebooks, Appwrite API pattern, collectionsprocessing-protocol.md— full document processing stepsarchive-rules.md— summary lifecycle and file archival rulessubagent-rules.md— when to use subagents vs. main agent
docs/archive/— processed raw files. Do not read unless explicitly told.output/deliverables/— final outputs
Error Recovery
If context degrades or auto-compact fires unexpectedly: write current state to docs/summaries/recovery-[date].md, tell the user what may have been lost, suggest a fresh session.
Before Delivering Output
Verify: exact numbers preserved, open questions marked OPEN, output matches what was requested (not assumed), no Ansible idempotency regressions introduced, summary written to disk for this session's work.