-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.cursorrules
More file actions
224 lines (164 loc) · 7.48 KB
/
.cursorrules
File metadata and controls
224 lines (164 loc) · 7.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# Cursor Agent - Doctrine Stack Integration
**Auto-loaded context for Cursor-based agents**
---
## Bootstrap Protocol
**MANDATORY:** Complete bootstrap before any work.
1. **Read:** `doctrine/guidelines/bootstrap.md` - Initialization sequence
2. **Read:** `doctrine/guidelines/runtime_sheet.md` - Quick operational reference
3. **Create:** Work log in `work/YYYY-MM-DD-[task-name].md`
4. **Mode:** Default to small-footprint (load extended directives on-demand only)
---
## Core Principles
**Behavior:**
- Careful, cooperative assistance
- Clarity over cleverness
- Explicit assumptions
- Small, reviewable changes
**Communication:**
- Concise, collaborative, precise
- Say "I don't know" when uncertain
- Surface assumptions
**Work Directory:**
- `work/` - Scratch notes, progress logs, drafts
- `output/` - Final artifacts for review
- `docs/` - Source of truth (modify only when instructed)
---
## Doctrine Stack Layers
```
┌─────────────────────────────────────────────┐
│ Guidelines (values, preferences) │ ← Highest precedence
├─────────────────────────────────────────────┤
│ Approaches (mental models, philosophies) │
├─────────────────────────────────────────────┤
│ Directives (instructions, constraints) │
├─────────────────────────────────────────────┤
│ Tactics (procedural execution guides) │
├─────────────────────────────────────────────┤
│ Templates (output structure contracts) │ ← Lowest precedence
└─────────────────────────────────────────────┘
```
**Location:** `doctrine/` directory
**Full specification:** `AGENTS.md` (load for high-stakes tasks)
---
## Quick Reference
### Frequently Used Directives
Load on-demand via: Read `doctrine/directives/NNN_name.md`
| Code | Name | Purpose |
|------|------|---------|
| 016 | Acceptance Test-Driven Development | ATDD workflow |
| 017 | Test-Driven Development | TDD workflow |
| 018 | Traceable Decisions | ADR capture protocol |
| 020 | Locality of Change | Premature optimization avoidance |
| 024 | Self-Observation Protocol | Mid-execution course correction |
| 028 | Bug Fixing Techniques | Test-first bug fixes |
| 036 | Boy Scout Rule | Leave code better than found |
### Common Tactics
Discover via: `doctrine/tactics/README.md`
- `stopping-conditions.tactic.md` - Define task exit criteria
- `ATDD_adversarial-acceptance.tactic.md` - Red team acceptance tests
- `premortem-risk-identification.tactic.md` - Identify failure modes
- `safe-to-fail-experiment-design.tactic.md` - Structured exploration
### Specialist Agent Profiles
Load when specializing: Read `doctrine/agents/AGENT.agent.md`
| Agent | Profile | Specialization |
|-------|---------|---------------|
| **Python Pedro** | `python-pedro.agent.md` | Python + ATDD/TDD |
| **Architect Alphonso** | `architect.agent.md` | System design + ADRs |
| **Curator Claire** | `curator.agent.md` | Consistency + metadata |
| **Backend Benny** | `backend-dev.agent.md` | Service architecture |
| **Frontend Freddy** | `frontend.agent.md` | UI/UX + integration |
| **DevOps Danny** | `build-automation.agent.md` | CI/CD pipelines |
| **Code Reviewer Cindy** | `code-reviewer-cindy.agent.md` | Quality assurance |
Full catalog: `doctrine/agents/` (21 profiles)
---
## Common Workflows
### Architecture Decisions
1. Load: `doctrine/agents/architect.agent.md`
2. Load: `doctrine/directives/018_traceable_decisions.md`
3. Use template: `docs/templates/architecture/adr.md`
4. Create: `docs/architecture/adrs/ADR-NNN-title.md`
### Test-Driven Development
1. Load: `doctrine/directives/017_test_driven_development.md`
2. Write failing test (RED)
3. Implement minimal code (GREEN)
4. Refactor (REFACTOR)
5. Commit test + implementation together
### Bug Fixing
1. Load: `doctrine/directives/028_bugfixing_techniques.md`
2. Write test that reproduces bug (fails)
3. Verify test fails for RIGHT reason
4. Fix code (test passes)
5. Run ALL tests (no regressions)
6. Commit test + fix together
### Multi-Agent Orchestration
1. Load: `doctrine/directives/019_file_based_collaboration.md`
2. Read task: `work/collaboration/inbox/*.yaml`
3. Update status: `work/coordination/AGENT_STATUS.md`
4. Move completed: `work/collaboration/done/`
---
## Integrity Symbols
Use in responses and work logs:
- ✅ Alignment confirmed / Success
- ⚠️ Low confidence / Assumption-based reasoning
- ❗️ Critical error / Misalignment detected
---
## Reasoning Modes
**Default:** Analysis mode (calm, structured, evidence-based)
**Alternatives:**
- Creative mode: Narrative, metaphor, exploration
- Meta mode: Self-reflection, process analysis
Annotate transitions: `[mode: analysis → creative]`
---
## Repository Structure
```
quickstart_agent-augmented-development/
├── doctrine/ # Portable agentic framework
│ ├── agents/ # 21 specialist profiles
│ ├── directives/ # Extended instructions (001-036+)
│ ├── tactics/ # Procedural guides
│ ├── approaches/ # Mental models
│ ├── guidelines/ # Core principles
│ └── templates/ # Output contracts
├── work/ # Orchestration workspace
│ ├── collaboration/ # Multi-agent tasks (YAML)
│ ├── coordination/ # Status tracking
│ ├── logs/ # Execution logs
│ └── notes/ # Scratch work
├── docs/ # Documentation & architecture
│ ├── architecture/ # ADRs, design docs
│ └── templates/ # Output structure guides
├── src/ # Production code
│ ├── framework/ # Core runtime
│ └── llm_service/ # LLM dashboard
├── tests/ # Test suites
└── tools/ # Development utilities
```
---
## Key Commands
```bash
python -m pytest # Run all tests
python -m pytest tests/unit/ # Run unit tests
npm run export:all # Export all distributions
npm run deploy:claude # Deploy Claude artifacts
```
---
## Token Efficiency Note
This `.cursorrules` file provides **minimal context** (~500 tokens) with full doctrine stack access by reference.
**For high-stakes tasks:** Explicitly load `AGENTS.md` for complete specification (~3,850 tokens).
**Loading pattern:**
- Read `AGENTS.md` when: Multi-agent coordination, governance compliance, unfamiliar territory
- Stay minimal when: Routine coding, testing, documentation updates
---
## Validation
After bootstrap, run self-check:
1. ✅ Bootstrap protocol completed
2. ✅ Work log created in `work/`
3. ✅ Operational mode selected (small-footprint or full governance)
4. ✅ Relevant directives/agents loaded (if needed)
5. ✅ Integrity symbols available
Announce readiness: `✅ Context loaded — ready for work`
---
**Version:** 1.0.0
**Last Updated:** 2026-02-10
**Canonical Source:** `AGENTS.md`, `doctrine/guidelines/`
**Maintenance:** Review quarterly or when directive count changes significantly