diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-22 23:45:19 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-22 23:45:19 +0000 |
| commit | 8abc63efdbc0bb96cd6c9aa99d6e9166e0bcabae (patch) | |
| tree | f4d6a082eed9b10bc67436a3ca5188e0182961eb /.agent/config.md | |
| parent | 11b905fd437d651b2e39745aa82a5dd36f70331e (diff) | |
chore: unify and centralize agent configuration in .agent/
Diffstat (limited to '.agent/config.md')
| -rw-r--r-- | .agent/config.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.agent/config.md b/.agent/config.md new file mode 100644 index 0000000..45ead3b --- /dev/null +++ b/.agent/config.md @@ -0,0 +1,62 @@ +# Agent Configuration & Master Rulebook (.agent/config.md) + +This is the primary source of truth for all AI agents working on **Doot**. These instructions take absolute precedence over general defaults. + +## 1. Project Directory Structure (.agent/) + +| File | Purpose | +|------|---------| +| `config.md` | **Main Entry Point** — Rules, workflows, and core mandates. | +| `worklog.md` | **Session State** — Current focus, recently completed, and next steps. | +| `design.md` | **Architecture** — High-level design, database schema, and components. | +| `coding_standards.md` | **Technical Standards** — Go/HTMX idioms, testing, and security. | +| `ux_philosophy.md` | **UX Principles** — Interaction models, palette, and mobile-first design. | +| `narrative.md` | **Background** — Historical context and evolution of the project. | + +## 2. Core Mandates + +### ULTRA-STRICT ROOT SAFETY PROTOCOL +1. **Inquiry-Only Default:** Treat every message as research/analysis unless it is an explicit, imperative command (Directive). +2. **Zero Unsolicited Implementation:** Never modify files, directories, or processes based on assumptions. +3. **Interactive Strategy Checkpoint:** Research first, present a strategy, and **WAIT** for an explicit "GO" before any system-changing tool call. +4. **No Destructive Assumptions:** Always verify state (`ps`, `ls`, `git status`) before proposing actions. +5. **Root-Awareness:** Prioritize system integrity and user confirmation over proactiveness. + +### Task Management +- **Worklog:** Update `.agent/worklog.md` at the start and end of every session. +- **Claudomator:** Use `claudomator create "Name" --instructions "Goals"` for new tasks. Use `claudomator finish <id>` when done. + +### Living Documentation Mandate +1. **Continuous Capture:** Agents MUST proactively update the files in `.agent/` (Design, UX, Standards, Mission, Preferences) as new decisions, patterns, or user preferences are revealed. +2. **No Stale Instructions:** If a workflow or technical standard evolves, the agent is responsible for reflecting that change in the Master Rulebook immediately. +3. **Worklog Integrity:** The `.agent/worklog.md` must be updated at the start and end of EVERY session to ensure continuity. + +## 3. Workflows + +### Research -> Strategy -> Execution +1. **Research:** Map codebase, validate assumptions, reproduce bugs. +2. **Strategy:** Share a summary. Wait for approval if significant. +3. **Execution (Plan-Act-Validate):** + - **Plan:** Define implementation and testing. + - **Act:** Apply surgical, idiomatic changes. + - **Validate:** Run `go test ./...` and `npm run build`. + +## 4. Agent Context API (Snapshots) + +The project includes an internal API for agents to understand the current user's task and meal context. + +- **Request Access:** `POST /agent/auth/request` (returns `request_token`). +- **Poll Status:** `GET /agent/auth/poll?token=<request_token>` (awaits browser approval). +- **Get Context:** `GET /agent/context` (requires Bearer token). +- **Snapshot Endpoint:** `GET /api/claude/snapshot` (legacy, see `internal/handlers/agent.go` for new unified flow). + +## 5. Essential Commands + +| Command | Action | +|---------|--------| +| `go run cmd/dashboard/main.go` | Start application | +| `go test ./...` | Run all tests | +| `./scripts/deploy` | Deploy to production | +| `./scripts/logs` | View production logs | +| `./scripts/bugs` | List open production bugs | +| `./scripts/resolve-bug <id>` | Resolve a production bug | |
