safeword 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{check-OUVIK2O6.js → check-I2J6THGQ.js} +3 -3
- package/dist/{chunk-QYCKBF57.js → chunk-DES5CSPH.js} +2 -2
- package/dist/{chunk-SIK3BC7F.js → chunk-DXT6TWW4.js} +33 -8
- package/dist/{chunk-SIK3BC7F.js.map → chunk-DXT6TWW4.js.map} +1 -1
- package/dist/{chunk-TP334635.js → chunk-VXKJ5ZIV.js} +2 -2
- package/dist/cli.js +6 -6
- package/dist/{diff-ASRWAPYJ.js → diff-4YFDNEZB.js} +3 -3
- package/dist/{reset-4G5DEEMY.js → reset-QVERBAQJ.js} +3 -3
- package/dist/{setup-URK77YMR.js → setup-ZSMZ7HZG.js} +3 -3
- package/dist/sync-VQW5DSTV.js +9 -0
- package/dist/{upgrade-IDR2ZALG.js → upgrade-WILVVHUY.js} +4 -4
- package/package.json +1 -1
- package/templates/cursor/rules/safeword-brainstorming.mdc +198 -0
- package/templates/cursor/rules/safeword-debugging.mdc +202 -0
- package/templates/cursor/rules/safeword-enforcing-tdd.mdc +207 -0
- package/templates/cursor/rules/safeword-quality-reviewer.mdc +158 -0
- package/templates/cursor/rules/safeword-refactoring.mdc +175 -0
- package/templates/cursor/rules/safeword-writing-plans.mdc +218 -0
- package/templates/skills/safeword-brainstorming/SKILL.md +210 -0
- package/templates/skills/{safeword-systematic-debugger → safeword-debugging}/SKILL.md +1 -71
- package/templates/skills/{safeword-tdd-enforcer → safeword-enforcing-tdd}/SKILL.md +17 -17
- package/templates/skills/safeword-quality-reviewer/SKILL.md +17 -67
- package/templates/skills/safeword-writing-plans/SKILL.md +219 -0
- package/dist/sync-AOKWEHCY.js +0 -9
- /package/dist/{check-OUVIK2O6.js.map → check-I2J6THGQ.js.map} +0 -0
- /package/dist/{chunk-QYCKBF57.js.map → chunk-DES5CSPH.js.map} +0 -0
- /package/dist/{chunk-TP334635.js.map → chunk-VXKJ5ZIV.js.map} +0 -0
- /package/dist/{diff-ASRWAPYJ.js.map → diff-4YFDNEZB.js.map} +0 -0
- /package/dist/{reset-4G5DEEMY.js.map → reset-QVERBAQJ.js.map} +0 -0
- /package/dist/{setup-URK77YMR.js.map → setup-ZSMZ7HZG.js.map} +0 -0
- /package/dist/{sync-AOKWEHCY.js.map → sync-VQW5DSTV.js.map} +0 -0
- /package/dist/{upgrade-IDR2ZALG.js.map → upgrade-WILVVHUY.js.map} +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: Use when spec is complete and you need detailed implementation tasks for LLM agents. Creates execution plans with exact file paths, complete code examples, and verification steps. Triggers: 'write plan', 'execution plan', 'implementation plan', 'break down into tasks', 'detailed steps'.
|
|
4
|
+
allowed-tools: '*'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Writing Execution Plans
|
|
8
|
+
|
|
9
|
+
Convert specs into detailed implementation plans for LLM agents.
|
|
10
|
+
|
|
11
|
+
**Iron Law:** EXACT PATHS. COMPLETE CODE. VERIFICATION GATES.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
Answer IN ORDER. Stop at first match:
|
|
16
|
+
|
|
17
|
+
1. Spec exists and is approved? → Use this skill
|
|
18
|
+
2. No spec yet? → Use brainstorming skill first
|
|
19
|
+
3. Simple task, obvious steps? → Skip (use enforcing-tdd directly)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Phase 1: CONTEXT
|
|
24
|
+
|
|
25
|
+
**Purpose:** Understand the spec and identify all affected files.
|
|
26
|
+
|
|
27
|
+
**Protocol:**
|
|
28
|
+
|
|
29
|
+
1. Read the spec from `.safeword/planning/specs/`
|
|
30
|
+
2. Identify all files that will be created or modified
|
|
31
|
+
3. Check existing patterns in the codebase
|
|
32
|
+
4. Note test file locations and naming conventions
|
|
33
|
+
|
|
34
|
+
**Exit Criteria:**
|
|
35
|
+
|
|
36
|
+
- [ ] Spec read and understood
|
|
37
|
+
- [ ] All affected files identified
|
|
38
|
+
- [ ] Existing patterns noted
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Phase 2: DECOMPOSE
|
|
43
|
+
|
|
44
|
+
**Purpose:** Break the spec into atomic tasks.
|
|
45
|
+
|
|
46
|
+
**Protocol:**
|
|
47
|
+
|
|
48
|
+
1. Each task = one logical unit (one component, one function, one integration point)
|
|
49
|
+
2. Order tasks by dependency (foundations first)
|
|
50
|
+
3. Each task must be independently verifiable
|
|
51
|
+
|
|
52
|
+
**Task sizing guide:**
|
|
53
|
+
|
|
54
|
+
| Too Big | Right Size | Too Small |
|
|
55
|
+
| ----------------- | ---------------------------------- | ---------------- |
|
|
56
|
+
| "Add auth system" | "Add password validation function" | "Import bcrypt" |
|
|
57
|
+
| "Build API" | "Add POST /users endpoint" | "Add route file" |
|
|
58
|
+
|
|
59
|
+
**Exit Criteria:**
|
|
60
|
+
|
|
61
|
+
- [ ] Tasks are atomic and ordered
|
|
62
|
+
- [ ] No task depends on uncommitted work from another
|
|
63
|
+
- [ ] Each task has clear boundaries
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 3: DETAIL
|
|
68
|
+
|
|
69
|
+
**Purpose:** Write exact implementation details for each task.
|
|
70
|
+
|
|
71
|
+
**Protocol:**
|
|
72
|
+
|
|
73
|
+
For each task, provide:
|
|
74
|
+
|
|
75
|
+
1. **Files** - Exact paths (create/modify/test)
|
|
76
|
+
2. **Test code** - Complete, runnable test
|
|
77
|
+
3. **Implementation code** - Complete, minimal code to pass
|
|
78
|
+
4. **Verification command** - Exact command with expected output
|
|
79
|
+
5. **Commit message** - Ready to use
|
|
80
|
+
|
|
81
|
+
**Task Format** (adapt syntax to project's language/test framework):
|
|
82
|
+
|
|
83
|
+
````markdown
|
|
84
|
+
### Task N: [Name]
|
|
85
|
+
|
|
86
|
+
**Files:**
|
|
87
|
+
|
|
88
|
+
- Create: `src/path/to/file.ext`
|
|
89
|
+
- Test: `src/path/to/file.test.ext`
|
|
90
|
+
|
|
91
|
+
**Step 1: Write failing test**
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
[Complete test code using project's test framework]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Step 2: Verify test fails**
|
|
98
|
+
|
|
99
|
+
Run: `[exact test command]`
|
|
100
|
+
Expected: FAIL - "[specific error message]"
|
|
101
|
+
|
|
102
|
+
**Step 3: Implement**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
[Complete implementation code]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Step 4: Verify test passes**
|
|
109
|
+
|
|
110
|
+
Run: `[exact test command]`
|
|
111
|
+
Expected: PASS
|
|
112
|
+
|
|
113
|
+
**Step 5: Commit**
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git add [files]
|
|
117
|
+
git commit -m "[type]: [description]"
|
|
118
|
+
```
|
|
119
|
+
````
|
|
120
|
+
|
|
121
|
+
**Exit Criteria:**
|
|
122
|
+
|
|
123
|
+
- [ ] Every task has complete code (no "add validation here")
|
|
124
|
+
- [ ] Every task has exact verification command
|
|
125
|
+
- [ ] Every task has commit message
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Phase 4: SAVE
|
|
130
|
+
|
|
131
|
+
**Purpose:** Write the plan to disk.
|
|
132
|
+
|
|
133
|
+
**Protocol:**
|
|
134
|
+
|
|
135
|
+
1. Create plan file at `.safeword/planning/plans/{slug}.md`
|
|
136
|
+
2. Include header with metadata
|
|
137
|
+
3. Include all tasks in order
|
|
138
|
+
|
|
139
|
+
**Plan Header:**
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
# [Feature Name] Execution Plan
|
|
143
|
+
|
|
144
|
+
**Source Spec:** `.safeword/planning/specs/{spec-file}.md`
|
|
145
|
+
**Created:** YYYY-MM-DD
|
|
146
|
+
**Status:** Ready
|
|
147
|
+
|
|
148
|
+
**Goal:** [One sentence]
|
|
149
|
+
|
|
150
|
+
**Tasks:** N tasks
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Exit Criteria:**
|
|
156
|
+
|
|
157
|
+
- [ ] Plan saved to `.safeword/planning/plans/`
|
|
158
|
+
- [ ] Header includes source spec reference
|
|
159
|
+
- [ ] All tasks included
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Phase 5: HANDOFF
|
|
164
|
+
|
|
165
|
+
**Purpose:** Transition to execution.
|
|
166
|
+
|
|
167
|
+
**Protocol:**
|
|
168
|
+
|
|
169
|
+
1. Summarize the plan (task count, scope)
|
|
170
|
+
2. Offer execution options:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
Plan saved to `.safeword/planning/plans/{slug}.md`
|
|
174
|
+
|
|
175
|
+
**Execution options:**
|
|
176
|
+
|
|
177
|
+
1. **Continue here** - I'll execute tasks one-by-one using enforcing-tdd
|
|
178
|
+
2. **Fresh session** - Open new session, reference the plan file
|
|
179
|
+
|
|
180
|
+
Which approach?
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
3. If continuing: Start with Task 1, use enforcing-tdd skill
|
|
184
|
+
|
|
185
|
+
**Exit Criteria:**
|
|
186
|
+
|
|
187
|
+
- [ ] User chose execution approach
|
|
188
|
+
- [ ] Handed off appropriately
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Key Principles
|
|
193
|
+
|
|
194
|
+
| Principle | Why |
|
|
195
|
+
| ------------------ | -------------------------------------------------- |
|
|
196
|
+
| Exact file paths | LLMs hallucinate paths without specifics |
|
|
197
|
+
| Complete code | "Add X here" leads to inconsistent implementations |
|
|
198
|
+
| Verification gates | LLMs need explicit pass/fail criteria |
|
|
199
|
+
| Atomic tasks | Fresh context per task = less drift |
|
|
200
|
+
| TDD per task | Catches errors immediately |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Anti-Patterns
|
|
205
|
+
|
|
206
|
+
| Don't | Do |
|
|
207
|
+
| ------------------------------ | ---------------------------------- |
|
|
208
|
+
| "Add error handling" | Show exact try/catch code |
|
|
209
|
+
| "Create test file" | Show complete test with assertions |
|
|
210
|
+
| "Run tests" | `npm test -- path/to/file.test.ts` |
|
|
211
|
+
| Combine 3 features in one task | One feature per task |
|
|
212
|
+
| Skip verification step | Always: Run X, expect Y |
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Related
|
|
217
|
+
|
|
218
|
+
- @./.safeword/guides/planning-guide.md
|
|
219
|
+
- @./.safeword/guides/testing-guide.md
|
package/dist/sync-AOKWEHCY.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|