panopticon-cli 0.4.6 → 0.4.7
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/package.json +2 -1
- package/skills/beads/README.md +120 -0
- package/skills/beads/SKILL.md +214 -0
- package/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +59 -0
- package/skills/beads/resources/AGENTS.md +62 -0
- package/skills/beads/resources/ASYNC_GATES.md +168 -0
- package/skills/beads/resources/BOUNDARIES.md +469 -0
- package/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
- package/skills/beads/resources/CLI_REFERENCE.md +558 -0
- package/skills/beads/resources/DEPENDENCIES.md +747 -0
- package/skills/beads/resources/INTEGRATION_PATTERNS.md +407 -0
- package/skills/beads/resources/ISSUE_CREATION.md +139 -0
- package/skills/beads/resources/MOLECULES.md +354 -0
- package/skills/beads/resources/PATTERNS.md +341 -0
- package/skills/beads/resources/RESUMABILITY.md +207 -0
- package/skills/beads/resources/STATIC_DATA.md +54 -0
- package/skills/beads/resources/TROUBLESHOOTING.md +489 -0
- package/skills/beads/resources/WORKFLOWS.md +623 -0
- package/skills/beads/resources/WORKTREES.md +94 -0
- package/skills/beads-completion-check/SKILL.md +90 -0
- package/skills/beads-panopticon-guide/SKILL.md +171 -0
- package/skills/bug-fix/SKILL.md +32 -0
- package/skills/clear-writing/SKILL.md +105 -0
- package/skills/clear-writing/references/elements-of-style/01-introductory.md +3 -0
- package/skills/clear-writing/references/elements-of-style/02-elementary-rules-of-usage.md +214 -0
- package/skills/clear-writing/references/elements-of-style/03-elementary-principles-of-composition.md +398 -0
- package/skills/clear-writing/references/elements-of-style/04-a-few-matters-of-form.md +89 -0
- package/skills/clear-writing/references/elements-of-style/05-words-and-expressions-commonly-misused.md +342 -0
- package/skills/clear-writing/references/signs-of-ai-writing.md +901 -0
- package/skills/code-review/SKILL.md +37 -0
- package/skills/code-review-performance/SKILL.md +53 -0
- package/skills/code-review-security/SKILL.md +35 -0
- package/skills/dependency-update/SKILL.md +30 -0
- package/skills/feature-work/SKILL.md +39 -0
- package/skills/incident-response/SKILL.md +32 -0
- package/skills/knowledge-capture/SKILL.md +463 -0
- package/skills/onboard-codebase/SKILL.md +34 -0
- package/skills/opus-plan/SKILL.md +400 -0
- package/skills/pan-approve/SKILL.md +136 -0
- package/skills/pan-code-review/SKILL.md +249 -0
- package/skills/pan-config/SKILL.md +164 -0
- package/skills/pan-convoy-synthesis/SKILL.md +249 -0
- package/skills/pan-diagnose/SKILL.md +360 -0
- package/skills/pan-docker/SKILL.md +279 -0
- package/skills/pan-docs/SKILL.md +113 -0
- package/skills/pan-down/SKILL.md +434 -0
- package/skills/pan-health/SKILL.md +240 -0
- package/skills/pan-help/SKILL.md +237 -0
- package/skills/pan-install/SKILL.md +339 -0
- package/skills/pan-issue/SKILL.md +596 -0
- package/skills/pan-kill/SKILL.md +172 -0
- package/skills/pan-logs/SKILL.md +255 -0
- package/skills/pan-network/SKILL.md +320 -0
- package/skills/pan-oversee/SKILL.md +290 -0
- package/skills/pan-plan/SKILL.md +521 -0
- package/skills/pan-projects/SKILL.md +239 -0
- package/skills/pan-quickstart/SKILL.md +440 -0
- package/skills/pan-reload/SKILL.md +44 -0
- package/skills/pan-rescue/SKILL.md +271 -0
- package/skills/pan-restart/SKILL.md +53 -0
- package/skills/pan-setup/SKILL.md +478 -0
- package/skills/pan-skill-creator/SKILL.md +168 -0
- package/skills/pan-skill-creator/references/output-patterns.md +141 -0
- package/skills/pan-skill-creator/references/workflows.md +90 -0
- package/skills/pan-skill-creator/scripts/init_skill.py +176 -0
- package/skills/pan-status/SKILL.md +493 -0
- package/skills/pan-subagent-creator/SKILL.md +295 -0
- package/skills/pan-subagent-creator/assets/validate-readonly-query.sh +35 -0
- package/skills/pan-subagent-creator/references/example-agents.md +308 -0
- package/skills/pan-subagent-creator/scripts/init_agent.py +126 -0
- package/skills/pan-sync/SKILL.md +272 -0
- package/skills/pan-tell/SKILL.md +157 -0
- package/skills/pan-test-config/SKILL.md +208 -0
- package/skills/pan-tracker/SKILL.md +288 -0
- package/skills/pan-up/SKILL.md +458 -0
- package/skills/pan-workspace-config/SKILL.md +303 -0
- package/skills/refactor/SKILL.md +30 -0
- package/skills/refactor-radar/SKILL.md +475 -0
- package/skills/release/SKILL.md +25 -0
- package/skills/send-feedback-to-agent/SKILL.md +98 -0
- package/skills/session-health/SKILL.md +76 -0
- package/skills/session-health/scripts/check_sessions.py +166 -0
- package/skills/skill-creator/SKILL.md +92 -0
- package/skills/skill-creator/scripts/init_skill.py +152 -0
- package/skills/skill-creator/scripts/package_skill.py +123 -0
- package/skills/stitch-design-md/README.md +34 -0
- package/skills/stitch-design-md/SKILL.md +172 -0
- package/skills/stitch-design-md/examples/DESIGN.md +154 -0
- package/skills/stitch-react-components/README.md +36 -0
- package/skills/stitch-react-components/SKILL.md +47 -0
- package/skills/stitch-react-components/examples/gold-standard-card.tsx +80 -0
- package/skills/stitch-react-components/package-lock.json +231 -0
- package/skills/stitch-react-components/package.json +16 -0
- package/skills/stitch-react-components/resources/architecture-checklist.md +15 -0
- package/skills/stitch-react-components/resources/component-template.tsx +37 -0
- package/skills/stitch-react-components/resources/stitch-api-reference.md +14 -0
- package/skills/stitch-react-components/resources/style-guide.json +27 -0
- package/skills/stitch-react-components/scripts/fetch-stitch.sh +30 -0
- package/skills/stitch-react-components/scripts/validate.js +68 -0
- package/skills/stitch-setup/SKILL.md +94 -0
- package/skills/web-design-guidelines/SKILL.md +39 -0
- package/skills/work-complete/SKILL.md +79 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# Integration Patterns with Other Skills
|
|
2
|
+
|
|
3
|
+
How bd-issue-tracking integrates with TodoWrite, writing-plans, and other skills for optimal workflow.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [TodoWrite Integration](#todowrite-integration) - Temporal layering pattern
|
|
8
|
+
- [writing-plans Integration](#writing-plans-integration) - Detailed implementation plans
|
|
9
|
+
- [Cross-Skill Workflows](#cross-skill-workflows) - Using multiple skills together
|
|
10
|
+
- [Decision Framework](#decision-framework) - When to use which tool
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## TodoWrite Integration
|
|
15
|
+
|
|
16
|
+
**Both tools complement each other at different timescales:**
|
|
17
|
+
|
|
18
|
+
### Temporal Layering Pattern
|
|
19
|
+
|
|
20
|
+
**TodoWrite** (short-term working memory - this hour):
|
|
21
|
+
- Tactical execution: "Review Section 3", "Expand Q&A answers"
|
|
22
|
+
- Marked completed as you go
|
|
23
|
+
- Present/future tense ("Review", "Expand", "Create")
|
|
24
|
+
- Ephemeral: Disappears when session ends
|
|
25
|
+
|
|
26
|
+
**Beads** (long-term episodic memory - this week/month):
|
|
27
|
+
- Strategic objectives: "Continue work on strategic planning document"
|
|
28
|
+
- Key decisions and outcomes in notes field
|
|
29
|
+
- Past tense in notes ("COMPLETED", "Discovered", "Blocked by")
|
|
30
|
+
- Persistent: Survives compaction and session boundaries
|
|
31
|
+
|
|
32
|
+
**Key insight**: TodoWrite = working copy for the current hour. Beads = project journal for the current month.
|
|
33
|
+
|
|
34
|
+
### The Handoff Pattern
|
|
35
|
+
|
|
36
|
+
1. **Session start**: Read bead → Create TodoWrite items for immediate actions
|
|
37
|
+
2. **During work**: Mark TodoWrite items completed as you go
|
|
38
|
+
3. **Reach milestone**: Update bead notes with outcomes + context
|
|
39
|
+
4. **Session end**: TodoWrite disappears, bead survives with enriched notes
|
|
40
|
+
|
|
41
|
+
**After compaction**: TodoWrite is gone forever, but bead notes reconstruct what happened.
|
|
42
|
+
|
|
43
|
+
### Example: TodoWrite tracks execution, Beads capture meaning
|
|
44
|
+
|
|
45
|
+
**TodoWrite (ephemeral execution view):**
|
|
46
|
+
```
|
|
47
|
+
[completed] Implement login endpoint
|
|
48
|
+
[in_progress] Add password hashing with bcrypt
|
|
49
|
+
[pending] Create session middleware
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Corresponding bead notes (persistent context):**
|
|
53
|
+
```bash
|
|
54
|
+
bd update issue-123 --notes "COMPLETED: Login endpoint with bcrypt password
|
|
55
|
+
hashing (12 rounds). KEY DECISION: Using JWT tokens (not sessions) for stateless
|
|
56
|
+
auth - simplifies horizontal scaling. IN PROGRESS: Session middleware implementation.
|
|
57
|
+
NEXT: Need user input on token expiry time (1hr vs 24hr trade-off)."
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**What's different**:
|
|
61
|
+
- TodoWrite: Task names (what to do)
|
|
62
|
+
- Beads: Outcomes and decisions (what was learned, why it matters)
|
|
63
|
+
|
|
64
|
+
**Don't duplicate**: TodoWrite tracks execution, Beads captures meaning and context.
|
|
65
|
+
|
|
66
|
+
### When to Update Each Tool
|
|
67
|
+
|
|
68
|
+
**Update TodoWrite** (frequently):
|
|
69
|
+
- Mark task completed as you finish each one
|
|
70
|
+
- Add new tasks as you break down work
|
|
71
|
+
- Update in_progress when switching tasks
|
|
72
|
+
|
|
73
|
+
**Update Beads** (at milestones):
|
|
74
|
+
- Completed a significant piece of work
|
|
75
|
+
- Made a key decision that needs documentation
|
|
76
|
+
- Hit a blocker that pauses progress
|
|
77
|
+
- About to ask user for input
|
|
78
|
+
- Session token usage > 70%
|
|
79
|
+
- End of session
|
|
80
|
+
|
|
81
|
+
**Pattern**: TodoWrite changes every few minutes. Beads updates every hour or at natural breakpoints.
|
|
82
|
+
|
|
83
|
+
### Full Workflow Example
|
|
84
|
+
|
|
85
|
+
**Scenario**: Implement OAuth authentication (multi-session work)
|
|
86
|
+
|
|
87
|
+
**Session 1 - Planning**:
|
|
88
|
+
```bash
|
|
89
|
+
# Create bd issue
|
|
90
|
+
bd create "Implement OAuth authentication" -t feature -p 0 --design "
|
|
91
|
+
JWT tokens with refresh rotation.
|
|
92
|
+
See BOUNDARIES.md for bd vs TodoWrite decision.
|
|
93
|
+
"
|
|
94
|
+
|
|
95
|
+
# Mark in_progress
|
|
96
|
+
bd update oauth-1 --status in_progress
|
|
97
|
+
|
|
98
|
+
# Create TodoWrite for today's work
|
|
99
|
+
TodoWrite:
|
|
100
|
+
- [ ] Research OAuth 2.0 refresh token flow
|
|
101
|
+
- [ ] Design token schema
|
|
102
|
+
- [ ] Set up test environment
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**End of Session 1**:
|
|
106
|
+
```bash
|
|
107
|
+
# Update bd with outcomes
|
|
108
|
+
bd update oauth-1 --notes "COMPLETED: Researched OAuth2 refresh flow. Decided on 7-day refresh tokens.
|
|
109
|
+
KEY DECISION: RS256 over HS256 (enables key rotation per security review).
|
|
110
|
+
IN PROGRESS: Need to set up test OAuth provider.
|
|
111
|
+
NEXT: Configure test provider, then implement token endpoint."
|
|
112
|
+
|
|
113
|
+
# TodoWrite disappears when session ends
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Session 2 - Implementation** (after compaction):
|
|
117
|
+
```bash
|
|
118
|
+
# Read bd to reconstruct context
|
|
119
|
+
bd show oauth-1
|
|
120
|
+
# See: COMPLETED research, NEXT is configure test provider
|
|
121
|
+
|
|
122
|
+
# Create fresh TodoWrite from NEXT
|
|
123
|
+
TodoWrite:
|
|
124
|
+
- [ ] Configure test OAuth provider
|
|
125
|
+
- [ ] Implement token endpoint
|
|
126
|
+
- [ ] Add basic tests
|
|
127
|
+
|
|
128
|
+
# Work proceeds...
|
|
129
|
+
|
|
130
|
+
# Update bd at milestone
|
|
131
|
+
bd update oauth-1 --notes "COMPLETED: Test provider configured, token endpoint implemented.
|
|
132
|
+
TESTS: 5 passing (token generation, validation, expiry).
|
|
133
|
+
IN PROGRESS: Adding refresh token rotation.
|
|
134
|
+
NEXT: Implement rotation, add rate limiting, security review."
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**For complete decision criteria and boundaries, see:** [BOUNDARIES.md](BOUNDARIES.md)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## writing-plans Integration
|
|
142
|
+
|
|
143
|
+
**For complex multi-step features**, the design field in bd issues can link to detailed implementation plans that break work into bite-sized RED-GREEN-REFACTOR steps.
|
|
144
|
+
|
|
145
|
+
### When to Create Detailed Plans
|
|
146
|
+
|
|
147
|
+
**Use detailed plans for:**
|
|
148
|
+
- Complex features with multiple components
|
|
149
|
+
- Multi-session work requiring systematic breakdown
|
|
150
|
+
- Features where TDD discipline adds value (core logic, critical paths)
|
|
151
|
+
- Work that benefits from explicit task sequencing
|
|
152
|
+
|
|
153
|
+
**Skip detailed plans for:**
|
|
154
|
+
- Simple features (single function, straightforward logic)
|
|
155
|
+
- Exploratory work (API testing, pattern discovery)
|
|
156
|
+
- Infrastructure setup (configuration, wiring)
|
|
157
|
+
|
|
158
|
+
**The test:** If you can implement it in one session without a checklist, skip the detailed plan.
|
|
159
|
+
|
|
160
|
+
### Using the writing-plans Skill
|
|
161
|
+
|
|
162
|
+
When design field needs detailed breakdown, reference the **writing-plans** skill:
|
|
163
|
+
|
|
164
|
+
**Pattern:**
|
|
165
|
+
```bash
|
|
166
|
+
# Create issue with high-level design
|
|
167
|
+
bd create "Implement OAuth token refresh" --design "
|
|
168
|
+
Add JWT refresh token flow with rotation.
|
|
169
|
+
See docs/plans/2025-10-23-oauth-refresh-design.md for detailed plan.
|
|
170
|
+
"
|
|
171
|
+
|
|
172
|
+
# Then use writing-plans skill to create detailed plan
|
|
173
|
+
# The skill creates: docs/plans/YYYY-MM-DD-<feature-name>.md
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Detailed plan structure** (from writing-plans):
|
|
177
|
+
- Bite-sized tasks (2-5 minutes each)
|
|
178
|
+
- Explicit RED-GREEN-REFACTOR steps per task
|
|
179
|
+
- Exact file paths and complete code
|
|
180
|
+
- Verification commands with expected output
|
|
181
|
+
- Frequent commit points
|
|
182
|
+
|
|
183
|
+
**Example task from detailed plan:**
|
|
184
|
+
```markdown
|
|
185
|
+
### Task 1: Token Refresh Endpoint
|
|
186
|
+
|
|
187
|
+
**Files:**
|
|
188
|
+
- Create: `src/auth/refresh.py`
|
|
189
|
+
- Test: `tests/auth/test_refresh.py`
|
|
190
|
+
|
|
191
|
+
**Step 1: Write failing test**
|
|
192
|
+
```python
|
|
193
|
+
def test_refresh_token_returns_new_access_token():
|
|
194
|
+
refresh_token = create_valid_refresh_token()
|
|
195
|
+
response = refresh_endpoint(refresh_token)
|
|
196
|
+
assert response.status == 200
|
|
197
|
+
assert response.access_token is not None
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Step 2: Run test to verify it fails**
|
|
201
|
+
Run: `pytest tests/auth/test_refresh.py::test_refresh_token_returns_new_access_token -v`
|
|
202
|
+
Expected: FAIL with "refresh_endpoint not defined"
|
|
203
|
+
|
|
204
|
+
**Step 3: Implement minimal code**
|
|
205
|
+
[... exact implementation ...]
|
|
206
|
+
|
|
207
|
+
**Step 4: Verify test passes**
|
|
208
|
+
[... verification ...]
|
|
209
|
+
|
|
210
|
+
**Step 5: Commit**
|
|
211
|
+
```bash
|
|
212
|
+
git add tests/auth/test_refresh.py src/auth/refresh.py
|
|
213
|
+
git commit -m "feat: add token refresh endpoint"
|
|
214
|
+
```
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Integration with bd Workflow
|
|
218
|
+
|
|
219
|
+
**Three-layer structure**:
|
|
220
|
+
1. **bd issue**: Strategic objective + high-level design
|
|
221
|
+
2. **Detailed plan** (writing-plans): Step-by-step execution guide
|
|
222
|
+
3. **TodoWrite**: Current task within the plan
|
|
223
|
+
|
|
224
|
+
**During planning phase:**
|
|
225
|
+
1. Create bd issue with high-level design
|
|
226
|
+
2. If complex: Use writing-plans skill to create detailed plan
|
|
227
|
+
3. Link plan in design field: `See docs/plans/YYYY-MM-DD-<topic>.md`
|
|
228
|
+
|
|
229
|
+
**During execution phase:**
|
|
230
|
+
1. Open detailed plan (if exists)
|
|
231
|
+
2. Use TodoWrite to track current task within plan
|
|
232
|
+
3. Update bd notes at milestones, not per-task
|
|
233
|
+
4. Close bd issue when all plan tasks complete
|
|
234
|
+
|
|
235
|
+
**Don't duplicate:** Detailed plan = execution steps. BD notes = outcomes and decisions.
|
|
236
|
+
|
|
237
|
+
**Example bd notes after using detailed plan:**
|
|
238
|
+
```bash
|
|
239
|
+
bd update oauth-5 --notes "COMPLETED: Token refresh endpoint (5 tasks from plan: endpoint + rotation + tests)
|
|
240
|
+
KEY DECISION: 7-day refresh tokens (vs 30-day) - reduces risk of token theft
|
|
241
|
+
TESTS: All 12 tests passing (auth, rotation, expiry, error handling)"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### When NOT to Use Detailed Plans
|
|
245
|
+
|
|
246
|
+
**Red flags:**
|
|
247
|
+
- Feature is simple enough to implement in one pass
|
|
248
|
+
- Work is exploratory (discovering patterns, testing APIs)
|
|
249
|
+
- Infrastructure work (OAuth setup, MCP configuration)
|
|
250
|
+
- Would spend more time planning than implementing
|
|
251
|
+
|
|
252
|
+
**Rule of thumb:** Use detailed plans when systematic breakdown prevents mistakes, not for ceremony.
|
|
253
|
+
|
|
254
|
+
**Pattern summary**:
|
|
255
|
+
- **Simple feature**: bd issue only
|
|
256
|
+
- **Complex feature**: bd issue + TodoWrite
|
|
257
|
+
- **Very complex feature**: bd issue + writing-plans + TodoWrite
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Cross-Skill Workflows
|
|
262
|
+
|
|
263
|
+
### Pattern: Research Document with Strategic Planning
|
|
264
|
+
|
|
265
|
+
**Scenario**: User asks "Help me write a strategic planning document for Q4"
|
|
266
|
+
|
|
267
|
+
**Tools used**: bd-issue-tracking + developing-strategic-documents skill
|
|
268
|
+
|
|
269
|
+
**Workflow**:
|
|
270
|
+
1. Create bd issue for tracking:
|
|
271
|
+
```bash
|
|
272
|
+
bd create "Q4 strategic planning document" -t task -p 0
|
|
273
|
+
bd update strat-1 --status in_progress
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
2. Use developing-strategic-documents skill for research and writing
|
|
277
|
+
|
|
278
|
+
3. Update bd notes at milestones:
|
|
279
|
+
```bash
|
|
280
|
+
bd update strat-1 --notes "COMPLETED: Research phase (reviewed 5 competitor docs, 3 internal reports)
|
|
281
|
+
KEY DECISION: Focus on market expansion over cost optimization per exec input
|
|
282
|
+
IN PROGRESS: Drafting recommendations section
|
|
283
|
+
NEXT: Get exec review of draft recommendations before finalizing"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
4. TodoWrite tracks immediate writing tasks:
|
|
287
|
+
```
|
|
288
|
+
- [ ] Draft recommendation 1: Market expansion
|
|
289
|
+
- [ ] Add supporting data from research
|
|
290
|
+
- [ ] Create budget estimates
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Why this works**: bd preserves context across sessions (document might take days), skill provides writing framework, TodoWrite tracks current work.
|
|
294
|
+
|
|
295
|
+
### Pattern: Multi-File Refactoring
|
|
296
|
+
|
|
297
|
+
**Scenario**: Refactor authentication system across 8 files
|
|
298
|
+
|
|
299
|
+
**Tools used**: bd-issue-tracking + systematic-debugging (if issues found)
|
|
300
|
+
|
|
301
|
+
**Workflow**:
|
|
302
|
+
1. Create epic and subtasks:
|
|
303
|
+
```bash
|
|
304
|
+
bd create "Refactor auth system to use JWT" -t epic -p 0
|
|
305
|
+
bd create "Update login endpoint" -t task
|
|
306
|
+
bd create "Update token validation" -t task
|
|
307
|
+
bd create "Update middleware" -t task
|
|
308
|
+
bd create "Update tests" -t task
|
|
309
|
+
|
|
310
|
+
# Link hierarchy
|
|
311
|
+
bd dep add auth-epic login-1 --type parent-child
|
|
312
|
+
bd dep add auth-epic validation-2 --type parent-child
|
|
313
|
+
bd dep add auth-epic middleware-3 --type parent-child
|
|
314
|
+
bd dep add auth-epic tests-4 --type parent-child
|
|
315
|
+
|
|
316
|
+
# Add ordering
|
|
317
|
+
bd dep add validation-2 login-1 # validation depends on login
|
|
318
|
+
bd dep add middleware-3 validation-2 # middleware depends on validation
|
|
319
|
+
bd dep add tests-4 middleware-3 # tests depend on middleware
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
2. Work through subtasks in order, using TodoWrite for each:
|
|
323
|
+
```
|
|
324
|
+
Current: login-1
|
|
325
|
+
TodoWrite:
|
|
326
|
+
- [ ] Update login route signature
|
|
327
|
+
- [ ] Add JWT generation
|
|
328
|
+
- [ ] Update tests
|
|
329
|
+
- [ ] Verify backward compatibility
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
3. Update bd notes as each completes:
|
|
333
|
+
```bash
|
|
334
|
+
bd close login-1 --reason "Updated to JWT. Tests passing. Backward compatible with session auth."
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
4. If issues discovered, use systematic-debugging skill + create blocker issues
|
|
338
|
+
|
|
339
|
+
**Why this works**: bd tracks dependencies and progress across files, TodoWrite focuses on current file, skills provide specialized frameworks when needed.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Decision Framework
|
|
344
|
+
|
|
345
|
+
### Which Tool for Which Purpose?
|
|
346
|
+
|
|
347
|
+
| Need | Tool | Why |
|
|
348
|
+
|------|------|-----|
|
|
349
|
+
| Track today's execution | TodoWrite | Lightweight, shows current progress |
|
|
350
|
+
| Preserve context across sessions | bd | Survives compaction, persistent memory |
|
|
351
|
+
| Detailed implementation steps | writing-plans | RED-GREEN-REFACTOR breakdown |
|
|
352
|
+
| Research document structure | developing-strategic-documents | Domain-specific framework |
|
|
353
|
+
| Debug complex issue | systematic-debugging | Structured debugging protocol |
|
|
354
|
+
|
|
355
|
+
### Decision Tree
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
Is this work done in this session?
|
|
359
|
+
├─ Yes → Use TodoWrite only
|
|
360
|
+
└─ No → Use bd
|
|
361
|
+
├─ Simple feature → bd issue + TodoWrite
|
|
362
|
+
└─ Complex feature → bd issue + writing-plans + TodoWrite
|
|
363
|
+
|
|
364
|
+
Will conversation history get compacted?
|
|
365
|
+
├─ Likely → Use bd (context survives)
|
|
366
|
+
└─ Unlikely → TodoWrite is sufficient
|
|
367
|
+
|
|
368
|
+
Does work have dependencies or blockers?
|
|
369
|
+
├─ Yes → Use bd (tracks relationships)
|
|
370
|
+
└─ No → TodoWrite is sufficient
|
|
371
|
+
|
|
372
|
+
Is this specialized domain work?
|
|
373
|
+
├─ Research/writing → developing-strategic-documents
|
|
374
|
+
├─ Complex debugging → systematic-debugging
|
|
375
|
+
├─ Detailed implementation → writing-plans
|
|
376
|
+
└─ General tracking → bd + TodoWrite
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Integration Anti-Patterns
|
|
380
|
+
|
|
381
|
+
**Don't**:
|
|
382
|
+
- Duplicate TodoWrite tasks into bd notes (different purposes)
|
|
383
|
+
- Create bd issues for single-session linear work (use TodoWrite)
|
|
384
|
+
- Put detailed implementation steps in bd notes (use writing-plans)
|
|
385
|
+
- Update bd after every TodoWrite task (update at milestones)
|
|
386
|
+
- Use writing-plans for exploratory work (defeats the purpose)
|
|
387
|
+
|
|
388
|
+
**Do**:
|
|
389
|
+
- Update bd when changing tools or reaching milestones
|
|
390
|
+
- Use TodoWrite as "working copy" of bd's NEXT section
|
|
391
|
+
- Link between tools (bd design field → writing-plans file path)
|
|
392
|
+
- Choose the right level of formality for the work complexity
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Summary
|
|
397
|
+
|
|
398
|
+
**Key principle**: Each tool operates at a different timescale and level of detail.
|
|
399
|
+
|
|
400
|
+
- **TodoWrite**: Minutes to hours (current execution)
|
|
401
|
+
- **bd**: Hours to weeks (persistent context)
|
|
402
|
+
- **writing-plans**: Days to weeks (detailed breakdown)
|
|
403
|
+
- **Other skills**: As needed (domain frameworks)
|
|
404
|
+
|
|
405
|
+
**Integration pattern**: Use the lightest tool sufficient for the task, add heavier tools only when complexity demands it.
|
|
406
|
+
|
|
407
|
+
**For complete boundaries and decision criteria, see:** [BOUNDARIES.md](BOUNDARIES.md)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Issue Creation Guidelines
|
|
2
|
+
|
|
3
|
+
Guidance on when and how to create bd issues for maximum effectiveness.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [When to Ask First vs Create Directly](#when-to-ask)
|
|
8
|
+
- [Issue Quality](#quality)
|
|
9
|
+
- [Making Issues Resumable](#resumable)
|
|
10
|
+
- [Design vs Acceptance Criteria](#design-vs-acceptance)
|
|
11
|
+
|
|
12
|
+
## When to Ask First vs Create Directly {#when-to-ask}
|
|
13
|
+
|
|
14
|
+
### Ask the user before creating when:
|
|
15
|
+
- Knowledge work with fuzzy boundaries
|
|
16
|
+
- Task scope is unclear
|
|
17
|
+
- Multiple valid approaches exist
|
|
18
|
+
- User's intent needs clarification
|
|
19
|
+
|
|
20
|
+
### Create directly when:
|
|
21
|
+
- Clear bug discovered during implementation
|
|
22
|
+
- Obvious follow-up work identified
|
|
23
|
+
- Technical debt with clear scope
|
|
24
|
+
- Dependency or blocker found
|
|
25
|
+
|
|
26
|
+
**Why ask first for knowledge work?** Task boundaries in strategic/research work are often unclear until discussed, whereas technical implementation tasks are usually well-defined. Discussion helps structure the work properly before creating issues, preventing poorly-scoped issues that need immediate revision.
|
|
27
|
+
|
|
28
|
+
## Issue Quality {#quality}
|
|
29
|
+
|
|
30
|
+
Use clear, specific titles and include sufficient context in descriptions to resume work later.
|
|
31
|
+
|
|
32
|
+
### Field Usage
|
|
33
|
+
|
|
34
|
+
**Use --design flag for:**
|
|
35
|
+
- Implementation approach decisions
|
|
36
|
+
- Architecture notes
|
|
37
|
+
- Trade-offs considered
|
|
38
|
+
|
|
39
|
+
**Use --acceptance flag for:**
|
|
40
|
+
- Definition of done
|
|
41
|
+
- Testing requirements
|
|
42
|
+
- Success metrics
|
|
43
|
+
|
|
44
|
+
## Making Issues Resumable (Complex Technical Work) {#resumable}
|
|
45
|
+
|
|
46
|
+
For complex technical features spanning multiple sessions, enhance notes field with implementation details.
|
|
47
|
+
|
|
48
|
+
### Optional but valuable for technical work:
|
|
49
|
+
- Working API query code (tested, with response structure)
|
|
50
|
+
- Sample API responses showing actual data
|
|
51
|
+
- Desired output format examples (show, don't describe)
|
|
52
|
+
- Research context (why this approach, what was discovered)
|
|
53
|
+
|
|
54
|
+
### Example pattern:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
bd update issue-9 --notes "IMPLEMENTATION GUIDE:
|
|
58
|
+
WORKING CODE: service.about().get(fields='importFormats')
|
|
59
|
+
Returns: dict with 49 entries like {'text/markdown': [...]}
|
|
60
|
+
OUTPUT FORMAT: # Drive Import Formats (markdown with categorized list)
|
|
61
|
+
CONTEXT: text/markdown support added July 2024, not in static docs"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**When to add:** Multi-session technical features with APIs or specific formats. Skip for simple tasks.
|
|
65
|
+
|
|
66
|
+
**For detailed patterns and examples, read:** [RESUMABILITY.md](RESUMABILITY.md)
|
|
67
|
+
|
|
68
|
+
## Design vs Acceptance Criteria (Critical Distinction) {#design-vs-acceptance}
|
|
69
|
+
|
|
70
|
+
Common mistake: Putting implementation details in acceptance criteria. Here's the difference:
|
|
71
|
+
|
|
72
|
+
### DESIGN field (HOW to build it):
|
|
73
|
+
- "Use two-phase batchUpdate approach: insert text first, then apply formatting"
|
|
74
|
+
- "Parse with regex to find * and _ markers"
|
|
75
|
+
- "Use JWT tokens with 1-hour expiry"
|
|
76
|
+
- Trade-offs: "Chose batchUpdate over streaming API for atomicity"
|
|
77
|
+
|
|
78
|
+
### ACCEPTANCE CRITERIA (WHAT SUCCESS LOOKS LIKE):
|
|
79
|
+
- "Bold and italic markdown formatting renders correctly in the Doc"
|
|
80
|
+
- "Solution accepts markdown input and creates Doc with specified title"
|
|
81
|
+
- "Returns doc_id and webViewLink to caller"
|
|
82
|
+
- "User tokens persist across sessions and refresh automatically"
|
|
83
|
+
|
|
84
|
+
### Why this matters:
|
|
85
|
+
- Design can change during implementation (e.g., use library instead of regex)
|
|
86
|
+
- Acceptance criteria should remain stable across sessions
|
|
87
|
+
- Criteria should be **outcome-focused** ("what must be true?") not **step-focused** ("do these steps")
|
|
88
|
+
- Each criterion should be **verifiable** - you can definitively say yes/no
|
|
89
|
+
|
|
90
|
+
### The pitfall
|
|
91
|
+
|
|
92
|
+
Writing criteria like "- [ ] Use batchUpdate approach" locks you into one implementation.
|
|
93
|
+
|
|
94
|
+
Better: "- [ ] Formatting is applied atomically (all at once or not at all)" - allows flexible implementation.
|
|
95
|
+
|
|
96
|
+
### Test yourself
|
|
97
|
+
|
|
98
|
+
If you rewrote the solution using a different approach, would the acceptance criteria still apply? If not, they're design notes, not criteria.
|
|
99
|
+
|
|
100
|
+
### Example of correct structure
|
|
101
|
+
|
|
102
|
+
✅ **Design field:**
|
|
103
|
+
```
|
|
104
|
+
Two-phase Docs API approach:
|
|
105
|
+
1. Parse markdown to positions
|
|
106
|
+
2. Create doc + insert text in one call
|
|
107
|
+
3. Apply formatting in second call
|
|
108
|
+
Rationale: Atomic operations, easier to debug formatting separately
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
✅ **Acceptance criteria:**
|
|
112
|
+
```
|
|
113
|
+
- [ ] Markdown formatting renders in Doc (bold, italic, headings)
|
|
114
|
+
- [ ] Lists preserve order and nesting
|
|
115
|
+
- [ ] Links are clickable
|
|
116
|
+
- [ ] Large documents (>50KB) process without timeout
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
❌ **Wrong (design masquerading as criteria):**
|
|
120
|
+
```
|
|
121
|
+
- [ ] Use two-phase batchUpdate approach
|
|
122
|
+
- [ ] Apply formatting in second batchUpdate call
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Quick Reference
|
|
126
|
+
|
|
127
|
+
**Creating good issues:**
|
|
128
|
+
|
|
129
|
+
1. **Title**: Clear, specific, action-oriented
|
|
130
|
+
2. **Description**: Problem statement, context, why it matters
|
|
131
|
+
3. **Design**: Approach, architecture, trade-offs (can change)
|
|
132
|
+
4. **Acceptance**: Outcomes, success criteria (should be stable)
|
|
133
|
+
5. **Notes**: Implementation details, session handoffs (evolves over time)
|
|
134
|
+
|
|
135
|
+
**Common mistakes:**
|
|
136
|
+
|
|
137
|
+
- Vague titles: "Fix bug" → "Fix: auth token expires before refresh"
|
|
138
|
+
- Implementation in acceptance: "Use JWT" → "Auth tokens persist across sessions"
|
|
139
|
+
- Missing context: "Update database" → "Update database: add user_last_login for session analytics"
|