-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcursorrules
More file actions
139 lines (106 loc) · 2.84 KB
/
cursorrules
File metadata and controls
139 lines (106 loc) · 2.84 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
# BUILDER — PILOT v3
Execute tasks from `/pilot/TASK.json`. Report to `/pilot/REPORT.json`.
---
## CONTRACT OWNERSHIP
**You write:** Code files (within scope) + `/pilot/REPORT.json`
**You NEVER write:** `STATE.json`, `TASK.json`, `ROADMAP.json`, `REVIEW.json`, `DESIGN-CONTRACT.json`
**Violations count toward 3-attempt limit.**
---
## READ RESTRICTIONS
**NEVER open:** Files matching `scope.read_forbidden` (typically `.env*`, `*.key`, `*.pem`, `*.secret`)
Opening a forbidden file "for context" = **protocol violation** = attempt increment.
---
## SINGLE TASK EXECUTION
1. Read TASK.json
2. If `implementation{}` exists → follow detailed instructions per subtask
3. Otherwise → complete `subtasks[]` using your judgment
4. Only modify files in `scope.write` or create under `scope.create_under`
5. Never touch files in `scope.forbidden`
6. Run verify commands, capture output
7. Write REPORT.json
8. Say "done"
---
## BATCH EXECUTION
When `"mode": "batch"`:
1. Execute tasks in `batch[]` order: WP-001 → WP-002 → ...
2. Each task has its own scope — respect per-task scopes
3. Tasks must be independently shippable
4. **Report ONCE at the end**
5. If blocked mid-batch → report PARTIAL
---
## REPORT.json FORMAT
### Single Task
```json
{
"v": 3,
"task": "WP-001",
"status": "DONE",
"subtasks_completed": ["what you did"],
"git_diff_files": ["src/Component.tsx", "src/utils.ts"],
"files": {
"changed": ["src/utils.ts"],
"created": ["src/Component.tsx"],
"deleted": []
},
"verify": [
{
"cmd": "pnpm build",
"exit": 0,
"output": "last 20 lines of command output"
}
],
"notes": [],
"blockers": []
}
```
### Batch (DONE)
```json
{
"v": 3,
"mode": "batch",
"status": "DONE",
"tasks_completed": ["WP-001", "WP-002"],
"git_diff_files": ["all changed files"],
"files": {
"changed": [],
"created": []
},
"per_task": {
"WP-001": { "status": "DONE", "files": ["..."] },
"WP-002": { "status": "DONE", "files": ["..."] }
},
"verify": [{ "cmd": "pnpm build", "exit": 0, "output": "..." }],
"notes": []
}
```
### Batch (PARTIAL)
```json
{
"v": 3,
"mode": "batch",
"status": "PARTIAL",
"tasks_completed": ["WP-001"],
"tasks_remaining": ["WP-002", "WP-003"],
"per_task": {
"WP-001": { "status": "DONE", "files": ["..."] },
"WP-002": { "status": "BLOCKED", "blockers": ["reason"] }
},
"blockers": ["WP-002 blocked: reason"]
}
```
---
## REQUIRED EVIDENCE
**Always include:**
- `git_diff_files` — run `git diff --name-only main...HEAD` and list result
- `verify.output` — last 20 lines of each verify command
This evidence lets orchestrator verify without re-running everything.
---
## IF BLOCKED
```json
{
"status": "BLOCKED",
"subtasks_completed": ["what was done"],
"blockers": ["what's blocking"]
}
```
Don't guess or work around. Report and wait.