@orderful/droid 0.25.2 → 0.26.0

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.
Files changed (86) hide show
  1. package/.claude-plugin/marketplace.json +114 -0
  2. package/.github/workflows/ci.yml +20 -0
  3. package/AGENTS.md +53 -0
  4. package/CHANGELOG.md +44 -0
  5. package/README.md +30 -4
  6. package/dist/bin/droid.js +62 -51
  7. package/dist/index.js +9 -1
  8. package/dist/lib/skill-config.d.ts.map +1 -1
  9. package/dist/tools/README.md +1 -1
  10. package/dist/tools/brain/.claude-plugin/plugin.json +16 -0
  11. package/dist/tools/brain/commands/brain.md +1 -1
  12. package/dist/tools/brain/commands/scratchpad.md +1 -1
  13. package/dist/tools/brain/skills/droid-brain/SKILL.md +1 -1
  14. package/dist/tools/brain/skills/droid-brain-obsidian/SKILL.md +1 -1
  15. package/dist/tools/coach/.claude-plugin/plugin.json +16 -0
  16. package/dist/tools/coach/commands/coach.md +1 -1
  17. package/dist/tools/coach/skills/droid-coach/SKILL.md +1 -1
  18. package/dist/tools/code-review/.claude-plugin/plugin.json +16 -0
  19. package/dist/tools/code-review/commands/code-review.md +1 -1
  20. package/dist/tools/code-review/skills/droid-code-review/SKILL.md +1 -1
  21. package/dist/tools/codex/.claude-plugin/plugin.json +16 -0
  22. package/dist/tools/codex/TOOL.yaml +2 -2
  23. package/dist/tools/codex/commands/codex.md +1 -1
  24. package/dist/tools/codex/skills/droid-codex/SKILL.md +1 -1
  25. package/dist/tools/comments/.claude-plugin/plugin.json +16 -0
  26. package/dist/tools/comments/commands/comments.md +1 -1
  27. package/dist/tools/comments/skills/droid-comments/SKILL.md +1 -1
  28. package/dist/tools/droid/.claude-plugin/plugin.json +15 -0
  29. package/dist/tools/droid/TOOL.yaml +1 -1
  30. package/dist/tools/droid/skills/droid/SKILL.md +1 -1
  31. package/dist/tools/project/.claude-plugin/plugin.json +16 -0
  32. package/dist/tools/project/commands/project.md +1 -1
  33. package/dist/tools/project/skills/droid-project/SKILL.md +1 -1
  34. package/dist/tools/tech-design/.claude-plugin/plugin.json +16 -0
  35. package/dist/tools/tech-design/TOOL.yaml +18 -0
  36. package/dist/tools/tech-design/commands/tech-design.md +93 -0
  37. package/dist/tools/tech-design/skills/droid-tech-design/SKILL.md +218 -0
  38. package/dist/tools/tech-design/skills/droid-tech-design/references/draft.md +321 -0
  39. package/dist/tools/tech-design/skills/droid-tech-design/references/gaps.md +328 -0
  40. package/dist/tools/tech-design/skills/droid-tech-design/references/publish.md +409 -0
  41. package/dist/tools/tech-design/skills/droid-tech-design/references/research-doc-template.md +129 -0
  42. package/dist/tools/tech-design/skills/droid-tech-design/references/rollup-template.md +55 -0
  43. package/dist/tools/tech-design/skills/droid-tech-design/references/start.md +353 -0
  44. package/dist/tools/tech-design/skills/droid-tech-design/references/think.md +356 -0
  45. package/dist/tools/tech-design/skills/droid-tech-design/references/thought-doc-template.md +72 -0
  46. package/package.json +3 -2
  47. package/scripts/build-plugins.ts +207 -0
  48. package/src/lib/skill-config.ts +95 -57
  49. package/src/lib/skills.ts +2 -2
  50. package/src/tools/README.md +1 -1
  51. package/src/tools/brain/.claude-plugin/plugin.json +16 -0
  52. package/src/tools/brain/commands/brain.md +1 -1
  53. package/src/tools/brain/commands/scratchpad.md +1 -1
  54. package/src/tools/brain/skills/droid-brain/SKILL.md +1 -1
  55. package/src/tools/brain/skills/droid-brain-obsidian/SKILL.md +1 -1
  56. package/src/tools/coach/.claude-plugin/plugin.json +16 -0
  57. package/src/tools/coach/commands/coach.md +1 -1
  58. package/src/tools/coach/skills/droid-coach/SKILL.md +1 -1
  59. package/src/tools/code-review/.claude-plugin/plugin.json +16 -0
  60. package/src/tools/code-review/commands/code-review.md +1 -1
  61. package/src/tools/code-review/skills/droid-code-review/SKILL.md +1 -1
  62. package/src/tools/codex/.claude-plugin/plugin.json +16 -0
  63. package/src/tools/codex/TOOL.yaml +2 -2
  64. package/src/tools/codex/commands/codex.md +1 -1
  65. package/src/tools/codex/skills/droid-codex/SKILL.md +1 -1
  66. package/src/tools/comments/.claude-plugin/plugin.json +16 -0
  67. package/src/tools/comments/commands/comments.md +1 -1
  68. package/src/tools/comments/skills/droid-comments/SKILL.md +1 -1
  69. package/src/tools/droid/.claude-plugin/plugin.json +15 -0
  70. package/src/tools/droid/TOOL.yaml +1 -1
  71. package/src/tools/droid/skills/droid/SKILL.md +1 -1
  72. package/src/tools/project/.claude-plugin/plugin.json +16 -0
  73. package/src/tools/project/commands/project.md +1 -1
  74. package/src/tools/project/skills/droid-project/SKILL.md +1 -1
  75. package/src/tools/tech-design/.claude-plugin/plugin.json +16 -0
  76. package/src/tools/tech-design/TOOL.yaml +18 -0
  77. package/src/tools/tech-design/commands/tech-design.md +93 -0
  78. package/src/tools/tech-design/skills/droid-tech-design/SKILL.md +218 -0
  79. package/src/tools/tech-design/skills/droid-tech-design/references/draft.md +321 -0
  80. package/src/tools/tech-design/skills/droid-tech-design/references/gaps.md +328 -0
  81. package/src/tools/tech-design/skills/droid-tech-design/references/publish.md +409 -0
  82. package/src/tools/tech-design/skills/droid-tech-design/references/research-doc-template.md +129 -0
  83. package/src/tools/tech-design/skills/droid-tech-design/references/rollup-template.md +55 -0
  84. package/src/tools/tech-design/skills/droid-tech-design/references/start.md +353 -0
  85. package/src/tools/tech-design/skills/droid-tech-design/references/think.md +356 -0
  86. package/src/tools/tech-design/skills/droid-tech-design/references/thought-doc-template.md +72 -0
@@ -0,0 +1,409 @@
1
+ # Publishing to Codex
2
+
3
+ **Trigger:** `/tech-design publish` or user wants to create PR for review
4
+
5
+ **Goal:** Generate clean roll-up from thought doc, publish thought doc + roll-up to codex. Research doc stays in brain.
6
+
7
+ **Security Note:** Project names and all user input must be validated/sanitized before use in file paths, git commands, or PR content to prevent command injection and path traversal.
8
+
9
+ ## Procedure
10
+
11
+ ### 1. Validate Prerequisites
12
+
13
+ ```bash
14
+ # Thought doc must exist and be active
15
+ if [ ! -f "$thought_doc_path" ]; then
16
+ echo "Error: No active tech design found."
17
+ echo "Start one with: /tech-design start --from codex:{project}"
18
+ exit 1
19
+ fi
20
+
21
+ # Research doc should exist (not required but helpful)
22
+ if [ ! -f "$research_doc_path" ]; then
23
+ echo "⚠️ Warning: Research doc not found."
24
+ echo "This is unusual - research doc is typically created during /tech-design start"
25
+ fi
26
+
27
+ # Codex repo must be configured (read from codex skill config)
28
+ codex_repo=$(grep '^codex_repo:' ~/.droid/skills/codex/overrides.yaml | cut -d' ' -f2-)
29
+ if [ -z "$codex_repo" ]; then
30
+ echo "Error: Codex not configured."
31
+ echo "Set up with: /codex"
32
+ exit 1
33
+ fi
34
+
35
+ # Check git access
36
+ if ! git -C "$codex_repo" status &>/dev/null; then
37
+ echo "Error: Can't access codex repo at: $codex_repo"
38
+ exit 1
39
+ fi
40
+ ```
41
+
42
+ ### 2. Check Completeness
43
+
44
+ Run gap analysis and warn if critical sections missing:
45
+
46
+ ```bash
47
+ # Check critical sections
48
+ missing_critical=$(check_critical_sections "$thought_doc_path")
49
+
50
+ if [ -n "$missing_critical" ]; then
51
+ echo "⚠️ Warning: Critical sections are missing:"
52
+ echo "$missing_critical"
53
+ echo ""
54
+ echo "You can publish anyway, but reviewers may ask for these."
55
+ echo ""
56
+ echo "Continue publishing? (y/n)"
57
+ # Get user confirmation
58
+ fi
59
+ ```
60
+
61
+ ### 3. Extract Project Name
62
+
63
+ ```bash
64
+ # Get project name from thought doc path or metadata
65
+ # e.g., {brain_dir}/1-Projects/transaction-templates/tech-design-transaction-templates.md
66
+ # → transaction-templates
67
+
68
+ project=$(basename "$(dirname "$thought_doc_path")")
69
+
70
+ # Verify project exists in codex
71
+ if [ ! -d "$codex_repo/projects/$project" ]; then
72
+ echo "⚠️ Project not found in codex: $project"
73
+ echo ""
74
+ echo "Options:"
75
+ echo " 1. Create it: /codex new $project"
76
+ echo " 2. Specify different project name"
77
+ echo ""
78
+ echo "Which project should this go to?"
79
+ # Get user input
80
+ fi
81
+ ```
82
+
83
+ ### 4. Generate Roll-up
84
+
85
+ **Read thought doc and synthesize into roll-up template:**
86
+
87
+ ```bash
88
+ # Read template
89
+ rollup_template=$(cat references/rollup-template.md)
90
+
91
+ # Extract content from thought doc
92
+ background=$(extract_section "$thought_doc_path" "Background")
93
+ proposal=$(extract_section "$thought_doc_path" "Proposal")
94
+ scope=$(extract_section "$thought_doc_path" "Scope")
95
+ decisions=$(extract_section "$thought_doc_path" "Key Decisions")
96
+ risks=$(extract_section "$thought_doc_path" "Risks")
97
+ rollout=$(extract_section "$thought_doc_path" "Rollout")
98
+ implementation=$(extract_section "$thought_doc_path" "Implementation")
99
+
100
+ # Generate TL;DR (2-3 sentence summary)
101
+ # Use AI to synthesize from Background + Proposal
102
+ tldr=$(generate_tldr "$background" "$proposal")
103
+
104
+ # Generate Problem statement
105
+ # Extract from Background, focus on "what's broken/missing"
106
+ problem=$(extract_problem "$background")
107
+
108
+ # Generate Solution
109
+ # From Proposal, assuming decisions are accepted
110
+ solution=$(synthesize_solution "$proposal" "$decisions")
111
+
112
+ # Populate template
113
+ rollup=$(echo "$rollup_template" | \
114
+ sed "s/{Feature Name}/$project/g" | \
115
+ sed "s/{2-3 sentence summary}/$tldr/g" | \
116
+ sed "s/{What we're solving}/$problem/g")
117
+ # ... continue for all sections
118
+ ```
119
+
120
+ **Roll-up generation guidelines:**
121
+
122
+ - **TL;DR**: Concise, jargon-free, answers "what and why"
123
+ - **Problem**: Focus on current pain, not solution
124
+ - **Scope**: Clear in/out boundaries
125
+ - **Solution**: Assumes recommended decisions accepted, omits rejected alternatives
126
+ - **Key Decisions**: Show options with pros/cons, mark recommended vs rejected
127
+ - **Risks**: Table format, each risk with mitigation
128
+ - **Rollout**: Phases with risk mitigation per phase
129
+ - **Implementation**: High-level phases, not detailed tasks
130
+
131
+ ### 5. Create Git Branch
132
+
133
+ Use codex git scripts for safety:
134
+
135
+ ```bash
136
+ # Use codex skill's git-start-write script
137
+ droid config codex | droid exec droid-codex git-start-write \
138
+ --config - \
139
+ --branch "codex/tech-design-$project"
140
+ ```
141
+
142
+ ### 6. Write Files to Codex
143
+
144
+ ```bash
145
+ # Write roll-up
146
+ rollup_path="$codex_repo/projects/$project/TECH-DESIGN.md"
147
+ echo "$rollup" > "$rollup_path"
148
+
149
+ # Write thought doc to artifacts
150
+ artifacts_dir="$codex_repo/projects/$project/artifacts"
151
+ mkdir -p "$artifacts_dir"
152
+ cp "$thought_doc_path" "$artifacts_dir/thought-doc.md"
153
+
154
+ # Update frontmatter in both files
155
+ add_frontmatter "$rollup_path" "tech-design" "$project"
156
+ add_frontmatter "$artifacts_dir/thought-doc.md" "tech-design-thought" "$project"
157
+ ```
158
+
159
+ **Frontmatter for roll-up:**
160
+
161
+ ```yaml
162
+ ---
163
+ title: "[Tech Design] $project"
164
+ type: tech-design
165
+ status: draft
166
+ created: $(date +%Y-%m-%d)
167
+ updated: $(date +%Y-%m-%d)
168
+ confidence: medium
169
+ ---
170
+ ```
171
+
172
+ **Frontmatter for thought doc:**
173
+
174
+ ```yaml
175
+ ---
176
+ title: "[Tech Design Thought Doc] $project"
177
+ type: tech-design-thought
178
+ status: draft
179
+ created: $(date +%Y-%m-%d)
180
+ updated: $(date +%Y-%m-%d)
181
+ confidence: medium
182
+ note: "Working document with full context, exploration, and @mentions"
183
+ ---
184
+ ```
185
+
186
+ ### 7. Create PR
187
+
188
+ ```bash
189
+ # Commit message
190
+ commit_msg="Add tech design for $project
191
+
192
+ Roll-up: projects/$project/TECH-DESIGN.md
193
+ Thought doc: projects/$project/artifacts/thought-doc.md"
194
+
195
+ # PR title
196
+ pr_title="Tech Design: $project"
197
+
198
+ # PR body
199
+ pr_body="## Summary
200
+
201
+ Technical design for **$project**.
202
+
203
+ ## Documents
204
+
205
+ - **TECH-DESIGN.md**: Clean, reviewable roll-up (start here)
206
+ - **artifacts/thought-doc.md**: Full working document with exploration and context
207
+
208
+ ## Two-Document Approach
209
+
210
+ The roll-up synthesizes the thought doc into a clean, decision-focused format for reviewers.
211
+
212
+ The thought doc contains the full exploration, research findings, @mentions, and working notes.
213
+
214
+ Both are included for full transparency.
215
+
216
+ ## Review Guidance
217
+
218
+ **For quick review:**
219
+ - Read TECH-DESIGN.md only
220
+ - Use GitHub's suggested reviewers
221
+
222
+ **For deep review:**
223
+ - Read TECH-DESIGN.md first
224
+ - Reference thought-doc.md for context on decisions
225
+ - Comment on either file as appropriate
226
+
227
+ ## Next Steps
228
+
229
+ After approval:
230
+ - [ ] Create implementation tickets
231
+ - [ ] Add key decisions to DECISIONS.md
232
+ - [ ] Begin implementation"
233
+
234
+ # Use codex skill's git-finish-write script
235
+ droid config codex | droid exec droid-codex git-finish-write \
236
+ --config - \
237
+ --message "$commit_msg" \
238
+ --pr-title "$pr_title" \
239
+ --pr-body "$pr_body"
240
+ ```
241
+
242
+ ### 8. Output Success
243
+
244
+ ```bash
245
+ echo "✓ Tech design published!"
246
+ echo ""
247
+ echo "PR created: $pr_url"
248
+ echo ""
249
+ echo "Files in PR:"
250
+ echo " • projects/$project/TECH-DESIGN.md (reviewable roll-up)"
251
+ echo " • projects/$project/artifacts/thought-doc.md (full working doc)"
252
+ echo ""
253
+ echo "Next steps:"
254
+ echo " • Share PR with reviewers"
255
+ echo " • Address feedback with: /tech-design respond \"question\""
256
+ echo " • After approval: /codex decision to capture key decisions"
257
+ ```
258
+
259
+ ## Roll-up Generation Details
260
+
261
+ ### TL;DR Synthesis
262
+
263
+ **Extract key points:**
264
+
265
+ 1. What are we building? (1 sentence from Proposal)
266
+ 2. Why does it matter? (1 sentence from Background)
267
+ 3. Main approach? (1 sentence from Proposal)
268
+
269
+ **Example:**
270
+
271
+ ```
272
+ We're building reusable transaction templates that partners can customize for their specific EDI document types. This reduces setup time from weeks to minutes and enables self-service onboarding. Templates are versioned, validated, and managed through a new API.
273
+ ```
274
+
275
+ ### Problem Extraction
276
+
277
+ **From Background, focus on:**
278
+
279
+ - Current pain points
280
+ - What's broken or missing
281
+ - Impact if not solved
282
+
283
+ **Strip out:**
284
+
285
+ - Solution discussion (save for Solution section)
286
+ - Historical context (save for artifacts if needed)
287
+ - Excessive detail (roll-up is concise)
288
+
289
+ ### Solution Synthesis
290
+
291
+ **From Proposal, assuming decisions accepted:**
292
+
293
+ - Describe the approach
294
+ - Reference existing patterns
295
+ - Note key implementation details
296
+
297
+ **Omit:**
298
+
299
+ - Rejected alternatives (those go in Key Decisions as "(Rejected) Option B")
300
+ - Detailed implementation steps (those go in Implementation Phases)
301
+ - Exploratory questions (those stay in thought doc)
302
+
303
+ ### Key Decisions Formatting
304
+
305
+ **Transform from thought doc format:**
306
+
307
+ Thought doc might have:
308
+
309
+ ```markdown
310
+ ## Decision: Event vs Polling
311
+
312
+ We need to decide how status updates propagate.
313
+
314
+ **Option A: Events**
315
+
316
+ - Pros: Low latency, multiple consumers, fits existing pattern
317
+ - Cons: More complex, need exactly-once delivery
318
+
319
+ **Option B: Polling**
320
+
321
+ - Pros: Simpler, easier to debug
322
+ - Cons: Higher latency, more database load
323
+
324
+ **Recommendation:** Events, because we need <100ms latency and have multiple consumers.
325
+ ```
326
+
327
+ Roll-up format:
328
+
329
+ ```markdown
330
+ ### Status Update Propagation
331
+
332
+ **(Recommended) Option A: Event-Driven**
333
+ Use @nestjs/event-emitter to publish `transaction.status.changed` events.
334
+
335
+ - Pros: <100ms latency, supports multiple consumers (dashboard, webhooks, alerts), fits existing architecture
336
+ - Cons: Need exactly-once delivery guarantees, more complex error handling
337
+
338
+ **(Rejected) Option B: Polling**
339
+ Services poll the database for status changes every 5 seconds.
340
+
341
+ - Pros: Simpler implementation, easier debugging
342
+ - Cons: 5-second latency unacceptable for dashboard, increased DB load
343
+ ```
344
+
345
+ ## Error Handling
346
+
347
+ - **Thought doc not found:** Remind to run `/tech-design start` first
348
+ - **Critical sections missing:** Warn, get confirmation to proceed
349
+ - **Project not in codex:** Offer to create or specify different project
350
+ - **Git operations fail:** Use codex skill's error handling (auto-recover)
351
+ - **PR creation fails:** Show error, suggest manual PR creation
352
+ - **Roll-up generation fails:** Fallback to template with placeholders, note what needs manual editing
353
+
354
+ ## Example Output
355
+
356
+ ```
357
+ Analyzing thought doc...
358
+ ✓ All critical sections present
359
+ ✓ Project exists in codex: transaction-templates
360
+
361
+ Generating roll-up...
362
+ ✓ Synthesized TL;DR from Background + Proposal
363
+ ✓ Extracted Problem statement
364
+ ✓ Synthesized Solution (assuming recommended decisions)
365
+ ✓ Formatted 3 Key Decisions with recommendations
366
+ ✓ Generated Risk mitigation table
367
+ ✓ Formatted 3-phase rollout plan
368
+
369
+ Writing to codex...
370
+ ✓ Created: projects/transaction-templates/TECH-DESIGN.md
371
+ ✓ Created: projects/transaction-templates/artifacts/thought-doc.md
372
+
373
+ Creating PR...
374
+ ✓ Branch: codex/tech-design-transaction-templates
375
+ ✓ Commit: Add tech design for transaction-templates
376
+ ✓ PR: {git_repo_link}/pull/42
377
+
378
+ ✓ Tech design published!
379
+
380
+ PR created: {git_repo_link}/pull/42
381
+
382
+ Files in PR:
383
+ • projects/transaction-templates/TECH-DESIGN.md (reviewable roll-up)
384
+ • projects/transaction-templates/artifacts/thought-doc.md (full working doc)
385
+
386
+ Next steps:
387
+ • Share PR with reviewers
388
+ • Address feedback (v2 feature: /tech-design respond)
389
+ • After approval: /codex decision to capture key decisions
390
+ ```
391
+
392
+ ## Roll-up Quality Checklist
393
+
394
+ Before creating PR, verify roll-up:
395
+
396
+ - [ ] TL;DR is 2-3 sentences, jargon-free
397
+ - [ ] Problem is clear, focused on pain (not solution)
398
+ - [ ] Scope has clear in/out boundaries
399
+ - [ ] Solution assumes decisions accepted (no "maybe we'll...")
400
+ - [ ] Each decision shows 2+ options with pros/cons
401
+ - [ ] Recommended option clearly marked
402
+ - [ ] Rejected options explain why rejected
403
+ - [ ] Risks have concrete mitigations (not just "monitor closely")
404
+ - [ ] Rollout has phases with specific risk mitigation per phase
405
+ - [ ] Implementation phases are high-level milestones, not tasks
406
+ - [ ] No @mentions in roll-up (those stay in thought doc)
407
+ - [ ] No exploratory content (those stay in thought doc)
408
+
409
+ If any fail, note in output and offer to refine before PR.
@@ -0,0 +1,129 @@
1
+ # Research Doc Template
2
+
3
+ Used when creating research doc via `/brain research tech-design-{project}-research`.
4
+
5
+ ```markdown
6
+ # Research: {Project Name}
7
+
8
+ **Type:** research
9
+ **Status:** exploring
10
+ **Created:** {YYYY-MM-DD}
11
+ **PRD:** [[codex:projects/{project}/PRD]]
12
+
13
+ Research for tech design: {brief description}
14
+
15
+ ## Codex Context
16
+
17
+ **From /codex project {name}:**
18
+
19
+ ### Problem Statement
20
+
21
+ {What problem we're solving - from PRD}
22
+
23
+ ### Goals & Scope
24
+
25
+ {What's in scope, what's out of scope}
26
+
27
+ ### Key Requirements
28
+
29
+ {Critical requirements from PRD}
30
+
31
+ ### UI/UX Context (if applicable)
32
+
33
+ {Product design considerations from DESIGN.md}
34
+
35
+ ## Codebase Discoveries
36
+
37
+ ### Existing Patterns
38
+
39
+ {Architectural/design patterns discovered during exploration}
40
+
41
+ - Pattern: {name}
42
+ - Found in: {file paths}
43
+ - How it works: {brief explanation}
44
+ - Relevant for: {which part of the design}
45
+
46
+ ### Similar Implementations
47
+
48
+ {Features that do similar things}
49
+
50
+ - Feature: {name}
51
+ - Location: {file paths}
52
+ - What we can learn: {insights}
53
+
54
+ ### Integration Points
55
+
56
+ {Where this feature will connect to existing code}
57
+
58
+ - Module/Service: {name}
59
+ - Location: {file path}
60
+ - Integration approach: {how to connect}
61
+
62
+ ### Dependencies
63
+
64
+ {Libraries, packages, services needed}
65
+
66
+ - Dependency: {name}
67
+ - Status: {already available / need to add}
68
+ - Purpose: {why needed}
69
+ - Version: {if specific version required}
70
+
71
+ ### Technical Stack Notes
72
+
73
+ {Framework/technology-specific details discovered}
74
+
75
+ **Architecture:**
76
+ {e.g., layered, modular, microservices, monolith}
77
+
78
+ **Patterns:**
79
+ {e.g., dependency injection, event-driven, CQRS}
80
+
81
+ **Data Access:**
82
+ {e.g., ORM used, database type, schema patterns}
83
+
84
+ **API Style:**
85
+ {e.g., REST, GraphQL, gRPC}
86
+
87
+ **Testing:**
88
+ {e.g., test framework, patterns, coverage}
89
+
90
+ **Deployment:**
91
+ {e.g., CI/CD setup, environment config}
92
+
93
+ ## Key Findings
94
+
95
+ {Summary of what matters most for the design}
96
+
97
+ 1. {Most important discovery}
98
+ 2. {Second most important}
99
+ 3. {Third most important}
100
+
101
+ {Any blockers or critical decisions needed based on research}
102
+ ```
103
+
104
+ ## Variable Substitutions
105
+
106
+ | Variable | Example | Notes |
107
+ | --------------------- | ---------------------------------------------------- | --------------------------- |
108
+ | `{Project Name}` | "Transaction Templates" | Human-readable project name |
109
+ | `{YYYY-MM-DD}` | "2026-01-10" | Current date |
110
+ | `{project}` | "transaction-templates" | Codex project slug |
111
+ | `{brief description}` | "system for creating reusable transaction templates" | One-line summary |
112
+
113
+ ## Purpose
114
+
115
+ The research doc is the knowledge base for the tech design. It captures:
116
+
117
+ - **Codex context**: What the PRD says we should build
118
+ - **Codebase discoveries**: What patterns/infrastructure exist
119
+ - **Technical specifics**: Stack/framework details (language, framework, libraries, etc.)
120
+
121
+ This keeps the thought doc focused on design decisions rather than getting bogged down in discovered patterns. The thought doc references the research doc but doesn't duplicate it.
122
+
123
+ ## When to Update
124
+
125
+ - **On `/tech-design start`**: Initial creation with codex context + codebase deep dive
126
+ - **During `/tech-design draft`**: If additional patterns discovered, add to research doc
127
+ - **During `/tech-design think`**: If exploration uncovers new relevant context
128
+
129
+ The research doc is a living document throughout the design process.
@@ -0,0 +1,55 @@
1
+ # [Tech Design] {Feature Name}
2
+
3
+ ## TL;DR
4
+
5
+ {2-3 sentence summary}
6
+
7
+ ## Problem
8
+
9
+ {What we're solving}
10
+
11
+ ## Scope
12
+
13
+ **In:** {bullet list}
14
+ **Out:** {bullet list}
15
+
16
+ ## Solution
17
+
18
+ {What we're building - assumes accepted decisions}
19
+
20
+ ## Key Decisions
21
+
22
+ ### {Decision Topic}
23
+
24
+ **(Recommended) Option A:** {Decision}
25
+ {Description}
26
+
27
+ - Pros: ...
28
+ - Cons: ...
29
+
30
+ **(Rejected) Option B:** {Decision}
31
+ {Description}
32
+
33
+ - Pros: ...
34
+ - Cons: ...
35
+
36
+ ## Risks
37
+
38
+ | Risk | Mitigation |
39
+ | ---- | ---------- |
40
+
41
+ ## Rollout
42
+
43
+ | Phase | What | Risk Mitigation |
44
+ | ----- | ---- | --------------- |
45
+
46
+ ## Implementation Phases
47
+
48
+ | Phase | Deliverable |
49
+ | ----- | ----------- |
50
+
51
+ ## Approvals
52
+
53
+ - [ ] Tech Lead
54
+ - [ ] Product
55
+ - [ ] Security (if applicable)