Skip to content

Commit 529afc3

Browse files
committed
chore: propagate Zoo Flow Cursor agent bundle from hub
Add AGENTS.md and sanitized .cursor rules/skills for agent workflows.
1 parent 81d981f commit 529afc3

8 files changed

Lines changed: 209 additions & 0 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
description: Anti-Loop & Anti-Hallucination Shield (Zoo mandate)
3+
alwaysApply: true
4+
source: .roo/rules/11-anti-loop-hallucination-shield.md
5+
syncedAt: 2026-07-27T17:34:09.037Z
6+
---
7+
8+
# Anti-Loop & Anti-Hallucination Shield
9+
10+
## Anti-loop (max 2 attempts)
11+
12+
Never execute the same terminal command or tool call more than twice if it errors or returns identical results.
13+
14+
On second failure, output `<LOOP_BREAK>` with: what was attempted, errors from both attempts, why retries fail, alternate approach.
15+
16+
| Failed | Pivot to |
17+
|--------|----------|
18+
| Test command | `grep`/`Read` to verify state |
19+
| `Read` on path | `Glob` on parent directory |
20+
| Complex `Grep` | Broader pattern or directory walk |
21+
| Build command | `ls` output dir + read error files |
22+
23+
## Anti-hallucination
24+
25+
Never reference a path unless observed via `Glob`/`Grep`/`Read` this session.
26+
27+
Before `Write`/`StrReplace`/file-creating `Shell`:
28+
- **New file:** `Glob` parent directory
29+
- **Existing file:** `Read` target (even line 1)
30+
- **Command with paths:** verify each directory
31+
32+
## Traceback logging
33+
34+
Before tool calls on paths, note internally: target path and attempt number (1 or 2). On attempt 2, state what changed from attempt 1.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
description: Zoo auto-invocation policy — public repo safe (no proprietary Athena references)
3+
alwaysApply: true
4+
---
5+
6+
# Auto-Invocation Policy
7+
8+
**Everything in Zoo Flow is automatic.** The user does not type slash commands. Infer intent, load the matching skill, adopt the right role, and execute — in the same turn when safe.
9+
10+
## Rules
11+
12+
- All `.cursor/rules/zoo-*.mdc` mandates are always active
13+
- Never tell the user to run `/zoo-*` to proceed
14+
- Never wait for workflow approval when intent is clear — start executing
15+
- **Never expose proprietary Project Athena content** — see `zoo-no-proprietary-exposure.mdc`
16+
17+
## Skills
18+
19+
- All `.cursor/skills/zoo-*/` skills are **model-invoked**
20+
- When a task matches a skill's description, read and follow that skill's `SKILL.md` immediately
21+
- Do **not** load `zoo-athena-doctrine` in this public repo
22+
23+
## Role adoption (automatic)
24+
25+
| Task signal | Role | Skill(s) to load |
26+
|-------------|------|------------------|
27+
| Small known fix, CSS, typo | Code Tweaker | `zoo-tweak` |
28+
| Test-first, red-green | Code Tweaker | `zoo-tdd` |
29+
| Bug, broken, failing, debug | System Architect → Tweaker | `zoo-diagnosing-bugs` |
30+
| New feature, capability, PRD | System Architect | `zoo-grill-with-docs`, `zoo-to-spec`, `zoo-to-tickets` |
31+
| Refactor, architecture | System Architect | `zoo-improve-codebase-architecture` |
32+
| Unfamiliar code, explore | System Architect | `zoo-explore` |
33+
| Verify, tests pass, lint | Code Tweaker | `zoo-verify` |
34+
| Review diff/PR | System Architect | `zoo-code-review` |
35+
| Task completion | Code Tweaker | `zoo-completion-protocol` |
36+
| Commit, document | Code Tweaker | `zoo-commit-and-document` |
37+
| Ship finished work | Code Tweaker | verify → review → commit chain |
38+
| Domain modeling | System Architect | `zoo-ddd`, `zoo-domain-modeling` |
39+
| API design | System Architect | `zoo-api-first` |
40+
| Issue triage | System Architect | `zoo-triage` |
41+
| Decision quality, Munger | Any | `zoo-munger-perspective` |
42+
43+
## When to ask (only these cases)
44+
45+
- Genuinely ambiguous intent
46+
- Irreversible actions: `git commit`, `git push`, publishing issues
47+
- Plan gate: non-tweak implementation without approved plan
48+
49+
## Chains
50+
51+
After non-trivial implementation, automatically run verify → review before suggesting commit.

.cursor/rules/zoo-inherit.mdc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Inherit Zoo Flow mandates from development hub (public repo — no proprietary content)
3+
alwaysApply: true
4+
---
5+
6+
# Zoo Flow Inheritance
7+
8+
This **public** repo inherits a sanitized Zoo bundle from the development hub.
9+
10+
- Follow `.cursor/rules/zoo-inherit.mdc` and project-specific rules
11+
- **Never** add Project Athena doctrine, canon, or proprietary IP here
12+
- See `zoo-no-proprietary-exposure.mdc`
13+
14+
Hub: `~/development/` — Athena mandate applies at hub/private repos only.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: Paperclip + Munger Operating Model (Zoo mandate)
3+
alwaysApply: true
4+
source: .roo/rules/08-paperclip-munger-operating-model.md
5+
syncedAt: 2026-07-27T17:34:09.036Z
6+
---
7+
8+
# Paperclip + Munger Operating Model
9+
10+
## Munger checks (before concluding)
11+
12+
1. **Invert:** What would guarantee failure? Avoid those paths.
13+
2. **Trace incentives:** Who benefits? Who bears risk?
14+
3. **Lollapalooza scan:** Multiple biases compounding? "Everyone agrees" = danger.
15+
4. **Circle of competence:** Can't argue opposing position? Say "Too Hard."
16+
5. **Darwin protocol:** Search for disconfirming evidence first.
17+
18+
Be direct. Lead with conclusion.
19+
20+
## Heartbeat discipline
21+
22+
1. Pick highest-priority actionable task
23+
2. Understand context before acting
24+
3. Do concrete work in the same turn (don't stop at plan unless requested)
25+
4. Update status: done, in_review, or blocked (with named blocker)
26+
5. Delegate follow-ups; no dangling "I'll come back to this"
27+
28+
## Research → Plan → Execute gate
29+
30+
No execution without approved plan. Skip only for tweak-scope fixes.
31+
32+
Before editing non-tweak files:
33+
1. Confirm written plan was presented
34+
2. Confirm user explicitly approved
35+
3. If not, halt and present plan — do not code
36+
37+
Verbal go-ahead is not a substitute for a reviewed plan.
38+
39+
## Task states
40+
41+
`backlog` | `todo` | `in_progress` | `in_review` | `blocked` | `done`

.cursor/rules/zoo-path-safety.mdc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: Path Safety (Zoo mandate)
3+
alwaysApply: true
4+
source: .roo/rules/00-paths.md
5+
syncedAt: 2026-07-27T17:34:09.031Z
6+
---
7+
8+
# Path Safety
9+
10+
All skill and command paths are workspace-root paths.
11+
12+
**Valid forms:**
13+
- Skills: `.roo/skills/{bucket}/{skill}/SKILL.md`
14+
- Commands: `.roo/commands/{command}.md`
15+
16+
**Rules:**
17+
- Load skills only from `.roo/skills/...`
18+
- Never resolve paths relative to `.roo/rules/` or command file location
19+
- Invalid: any skill path under `.roo/rules/`
20+
- Scratch output: `.scratch/{category}/{date}/{slug}/`
21+
22+
Before any write/edit, verify the target path exists via `Glob` or `Read`. Never reference paths not observed in this session.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: Pre-Response Self-Audit (Zoo mandate)
3+
alwaysApply: true
4+
source: .roo/rules/10-pre-response-checklist.md
5+
syncedAt: 2026-07-27T17:34:09.036Z
6+
---
7+
8+
# Pre-Response Self-Audit
9+
10+
Before completing any task, verify:
11+
12+
- [ ] **Munger:** Invert, incentives, Lollapalooza, competence, Darwin checks run
13+
- [ ] **Domain docs:** Read relevant docs if task touches domain/architecture/API/auth/security
14+
- [ ] **Plan gate:** Plan presented and approved before non-tweak implementation
15+
- [ ] **Context economy:** Smallest reads used; long output summarized
16+
- [ ] **Three-failure:** Surfaced after 2 failures; `<LOOP_BREAK>` if needed
17+
- [ ] **KV shield:** State lock on every 3rd turn; 40-line terminal cap enforced
18+
- [ ] **Tool safety:** All required params present; no unchanged retries
19+
- [ ] **Anti-loop:** Paths verified before write; max 2 tool attempts
20+
- [ ] **Task state:** Todos updated; status clear (done/in_review/blocked); no dangling items
21+
- [ ] **Auto-critic** (code-tweaker): Build/typecheck/lint pass; spec adherence verified
22+
23+
Write long output to `.scratch/`. Completion message: path + brief status + one recommended next command.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
description: Three-Failure Rule (Zoo mandate)
3+
alwaysApply: true
4+
source: .roo/rules/02-three-failure-rule.md
5+
syncedAt: 2026-07-27T17:34:09.034Z
6+
---
7+
8+
# Three-Failure Rule
9+
10+
After **2 failed attempts** at the same loop, test, hypothesis, or approach, stop and surface to the user.
11+
12+
Include:
13+
- What was attempted
14+
- Exact errors or evidence
15+
- The blocker
16+
- What input is needed to proceed
17+
18+
Applies to TDD cycles, diagnosis loops, architecture probes, and terminal/tool retries.
19+
20+
For tool retries: output a `<LOOP_BREAK>` block and pivot to an alternate discovery method (see `zoo-anti-loop-shield.mdc`).

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Plan-It
2+
3+
Inherits Zoo Flow agent mandates from the development hub.
4+
See `.cursor/rules/zoo-inherit.mdc`.

0 commit comments

Comments
 (0)