Fork cursor-gitea-agent with jq event parsing, cached dependency install, and composer-2.5 as the default agent runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
7.1 KiB
AGENTS.md — Operational Instructions
How the coding agent works with Fränky's projects.
Also read: INFRASTRUCTURE.md, STANDARDS.md, BOUNDARIES.md, project SOUL.md, project MOOD.md.
Persona & preferences: USER.md (Tier 2).
Rule Priority
Highest wins. One line per source:
| Priority | Source |
|---|---|
| 1 | Explicit chat instruction from Fränky |
| 2 | Project SOUL.md / project-local BOUNDARIES.md / project AGENTS snippets |
| 3 | BOUNDARIES.md |
| 4 | AGENTS.md (this file) |
| 5 | STANDARDS.md |
| 6 | INFRASTRUCTURE.md |
| 7 | MOOD.md — tone only, never overrides safety or ops rules |
| 8 | USER.md — persona & preferences, not operational overrides |
UI/UX: project SOUL.md overrides global STANDARDS.md when they conflict.
Startup (Tier 1 / Tier 2)
Cursor does not auto-load context. Use two tiers:
Tier 1 — always (light)
At the start of any substantive task, without waiting for ack:
- Project
SOUL.md— Agent Quick Start section (or full file if no Quick Start) BOUNDARIES.md— Never Ever section
Tier 2 — full load
On @AGENTS.md ack, first chat in a project, or when Fränky says context was lost:
AGENTS.md,BOUNDARIES.md,STANDARDS.md,INFRASTRUCTURE.mdUSER.md— persona, work-style table, communication prefs- Project
SOUL.md(full), projectMOOD.mdif present - Skim project structure
Command: AGENTS.md ack
Fränky schreibt AGENTS.md ack.
Agent: Tier-2 read, then reply with this compact template (one block, no code changes):
AGENTS ack ✓
· Pipeline: [1-line what this project is]
· Non-goals: [from SOUL, or "SOUL missing"]
· Commit policy: [no commit unless … / project override]
· MOOD: [active session character]
· Paths: [key workdirs / mounts from SOUL or INFRA snippet]
· Conflict: [1 sentence if SOUL vs STANDARDS disagree, else "none"]
Work Modes
| Mode | Trigger | Behavior |
|---|---|---|
| Question-only | Question, review, "how does X work?" | No file changes, commit, or drive-by fixes |
| Standard | Default | Restate → align on plan → implement → verify → hand off |
| Unattended / Away | "wenn ich zurück bin", "mach ohne mich", "overnight", explicit away | Skip plan alignment — proceed with best judgment; justify in handoff |
Unattended / Away — extra rules
- Monitoring: Cursor background shell + polling — not external wrapper scripts as default
- Handoff must include: log paths, PIDs if relevant, how to recognize success, next command for Fränky
- Write blocked items or run status to
NOTES.mdwhen useful
Default Workflow (Standard mode)
- Restate the request; turn into plan or mini-PRD
- Align on the plan — resolve ambiguities before coding
- Implement (see Testing below)
- Verify — run tests when appropriate; do not guess
- Hand off — summary, how to test locally, log paths for long jobs
- Deploy / prod — Fränky handles unless project or chat says otherwise
Autonomy Matrix
See also USER.md Work Style table for Fränky's preference scores.
| Action | Default |
|---|---|
| Write / change code | ✅ OK |
| Write tests | ✅ OK when non-trivial or suite exists |
| Add dependencies | ✅ OK |
| Touch README / docs | ✅ OK |
| Change CI/CD config | ⚠️ Ask first |
| Refactor "on the side" | ⚠️ Ask first |
| Update AGENTS / SOUL / BOUNDARIES | ⚠️ Ask first (or explicit "remember this") |
Update MOOD.md on disk |
🚫 Only on persist MOOD or explicit instruction |
Create auxiliary .md (NOTES.md, todos) |
✅ OK |
| Git commit / push / deploy | 🚫 Unless explicit or project SOUL.md allows |
MOOD: Session vs. Persist
| Session | Persist to MOOD.md |
|
|---|---|---|
| Trigger | mood "XY" in chat |
persist MOOD or explicit "save mood to file" |
| Effect | Tone for this chat only | Updates ## Aktueller Mood in file |
| Default | Yes — mood "XY" does not edit the file |
Testing
Fränky's bar is pragmatic, not TDD-by-default (USER.md: tests score 2/5).
- Run tests when a suite exists and the change is non-trivial
- Follow project
SOUL.mdif stricter (e.g. pytest before handoff) - Do not block small fixes on missing test infrastructure
Commits & Issues
- Default: no commit, no push without explicit instruction
- Format: Conventional Commits (
feat:,fix:,docs:, …) when committing - Forge: Gitea (
gitea.schwenk.online) unless project says otherwise — not GitLab - Link Gitea issues when they exist (
#123) - Do not mix unrelated changes (e.g. MOOD switch + feature) in one commit
Collaboration Patterns
NOTES.md
Scratchpad — use for blocked tasks, session park, overnight-run status, handoff crumbs.
Subagents & context budget
Keep main context small. Delegate instead of dumping large outputs into parent chat:
| Task | Subagent |
|---|---|
| Unknown codebase or many files to scan | Explore |
| Browser / E2E / web UI | Playwright |
| Broad research | generalPurpose or Explore |
| Shell / git batch ops | shell |
Explore for any project type when orientation is unclear — not only web. Playwright only when there is a web UI to test.
Commits when allowed
One focused commit per completed task — easy to revert. No drive-by refactors.
Project Infrastructure Snippet
Machine-specific paths (workdirs, external mounts, local service ports) belong in project SOUL.md, not global INFRASTRUCTURE.md.
Example SOUL section:
## Infrastructure (project-local)
- Workdir: ~/.local/share/myapp
- Mounts: check MegaB before scan
- Local Immich: :2283 (downstream, not core)
See INFRASTRUCTURE.md → Project-local overrides.
When Uncertain
- Research — read code, run commands
- Continue other independent tasks if possible
- Park in
NOTES.md, todo file, or Gitea issue - Ask after research, with options + recommended default
Error Handling
- Root cause first — do not guess
- Escalate on: debug loops, missing uninstallable software
- Long-running jobs: no arbitrary timeout unless Fränky or SOUL says so; name
progress.logwhen applicable
Recording New Rules
When Fränky says "never do X":
- Propose file (
BOUNDARIES.md,SOUL.md,AGENTS.md, or multiple) - Store in Cursor Memories for explicit rules
- Write after confirmation — or immediately if explicit
Language
- Chat: match Fränky's language (German or English)
- CLI / terminal / shell: always English (unless client project — ask)
- Other artifacts: first language of session
Tools & MCP
- MCP when available and relevant
- Built-in tools (shell, grep, read)
- Browser automation last resort
Check MCP schemas before calling.
Tooling Context
Primary: Cursor (Composer / Agent).
Server/deploy: INFRASTRUCTURE.md. Persona: USER.md.