@orderful/droid 0.38.0 → 0.39.1
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/.claude-plugin/plugin.json +2 -0
- package/CHANGELOG.md +16 -0
- package/README.md +17 -0
- package/dist/bin/droid.js +136 -3
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/lib/secrets.d.ts +7 -0
- package/dist/lib/secrets.d.ts.map +1 -0
- package/dist/tools/status-update/.claude-plugin/plugin.json +22 -0
- package/dist/tools/status-update/TOOL.yaml +21 -0
- package/dist/tools/status-update/commands/status-update.md +27 -0
- package/dist/tools/status-update/skills/status-update/SKILL.md +253 -0
- package/dist/tools/status-update/skills/status-update/references/formatting.md +203 -0
- package/dist/tools/tech-design/skills/tech-design/SKILL.md +47 -10
- package/dist/tools/tech-design/skills/tech-design/references/draft.md +8 -0
- package/dist/tools/tech-design/skills/tech-design/references/publish.md +164 -48
- package/dist/tools/tech-design/skills/tech-design/references/summary-template.md +94 -0
- package/package.json +1 -1
- package/src/bin/droid.ts +19 -0
- package/src/commands/auth.ts +150 -0
- package/src/lib/secrets.ts +12 -0
- package/src/tools/status-update/.claude-plugin/plugin.json +22 -0
- package/src/tools/status-update/TOOL.yaml +21 -0
- package/src/tools/status-update/commands/status-update.md +27 -0
- package/src/tools/status-update/skills/status-update/SKILL.md +253 -0
- package/src/tools/status-update/skills/status-update/references/formatting.md +203 -0
- package/src/tools/tech-design/skills/tech-design/SKILL.md +47 -10
- package/src/tools/tech-design/skills/tech-design/references/draft.md +8 -0
- package/src/tools/tech-design/skills/tech-design/references/publish.md +164 -48
- package/src/tools/tech-design/skills/tech-design/references/summary-template.md +94 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Formatting Reference
|
|
2
|
+
|
|
3
|
+
Detailed formatting rules for status updates.
|
|
4
|
+
|
|
5
|
+
## Status Emoji
|
|
6
|
+
|
|
7
|
+
| Status | Emoji | Display Text |
|
|
8
|
+
|--------|-------|--------------|
|
|
9
|
+
| `on_track` | `:large_green_circle:` | On track |
|
|
10
|
+
| `at_risk` | `:large_yellow_circle:` | At risk |
|
|
11
|
+
| `blocked` | `:red_circle:` | Blocked |
|
|
12
|
+
|
|
13
|
+
## Phase Checklist
|
|
14
|
+
|
|
15
|
+
### Phases in Order
|
|
16
|
+
|
|
17
|
+
1. `discovery` - Research and requirements gathering
|
|
18
|
+
2. `post_discovery_feedback` - Incorporating discovery feedback
|
|
19
|
+
3. `design` - Prototype and design work
|
|
20
|
+
4. `post_design_feedback` - Incorporating design feedback
|
|
21
|
+
5. `prd` - Writing PRD
|
|
22
|
+
6. `tech_design` - Writing Tech Design
|
|
23
|
+
7. `development` - Active implementation
|
|
24
|
+
8. `qa` - QA & Testing
|
|
25
|
+
9. `release` - Released to production
|
|
26
|
+
|
|
27
|
+
### Phase Emoji
|
|
28
|
+
|
|
29
|
+
| State | Emoji |
|
|
30
|
+
|-------|-------|
|
|
31
|
+
| completed | `:check:` |
|
|
32
|
+
| current | `:work-in-progress-sign:` |
|
|
33
|
+
| upcoming | `:waiting-to-start:` |
|
|
34
|
+
|
|
35
|
+
### Collapsed Groups
|
|
36
|
+
|
|
37
|
+
When all phases in a group are completed or upcoming (not current), collapse them:
|
|
38
|
+
|
|
39
|
+
| Group | Phases | Collapsed Name |
|
|
40
|
+
|-------|--------|----------------|
|
|
41
|
+
| 1 | discovery, post_discovery_feedback | "Discovery & Post-Discovery Feedback" |
|
|
42
|
+
| 2 | design, post_design_feedback | "Prototype, Design & Post-Design Feedback" |
|
|
43
|
+
| 3 | prd, tech_design | "PRD & Tech Design" |
|
|
44
|
+
| 4 | development | "Development" |
|
|
45
|
+
| 5 | qa, release | "QA → Release" |
|
|
46
|
+
|
|
47
|
+
### Display Rules
|
|
48
|
+
|
|
49
|
+
1. **Completed phases** - Collapse into groups, show with `:check:`
|
|
50
|
+
2. **Current phase** - Show on its own line with `:work-in-progress-sign:` and **bold**
|
|
51
|
+
3. **Upcoming phases** - Collapse into chain with `→`, show with `:waiting-to-start:`
|
|
52
|
+
|
|
53
|
+
### Examples
|
|
54
|
+
|
|
55
|
+
**Current = `development`:**
|
|
56
|
+
```
|
|
57
|
+
*Where we're at*
|
|
58
|
+
:check: Discovery & Post-Discovery Feedback
|
|
59
|
+
:check: Prototype, Design & Post-Design Feedback
|
|
60
|
+
:check: PRD & Tech Design
|
|
61
|
+
:work-in-progress-sign: *Development*
|
|
62
|
+
:waiting-to-start: QA → Release
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Current = `prd`:**
|
|
66
|
+
```
|
|
67
|
+
*Where we're at*
|
|
68
|
+
:check: Discovery & Post-Discovery Feedback
|
|
69
|
+
:check: Prototype, Design & Post-Design Feedback
|
|
70
|
+
:work-in-progress-sign: *PRD*
|
|
71
|
+
:waiting-to-start: Tech Design → Development → QA → Release
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Current = `post_discovery_feedback`:**
|
|
75
|
+
```
|
|
76
|
+
*Where we're at*
|
|
77
|
+
:check: Discovery
|
|
78
|
+
:work-in-progress-sign: *Post-Discovery Feedback*
|
|
79
|
+
:waiting-to-start: Prototype, Design & Post-Design Feedback → PRD & Tech Design → Development → QA → Release
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Current = `design`:**
|
|
83
|
+
```
|
|
84
|
+
*Where we're at*
|
|
85
|
+
:check: Discovery & Post-Discovery Feedback
|
|
86
|
+
:work-in-progress-sign: *Prototype/Design*
|
|
87
|
+
:waiting-to-start: Post-Design Feedback → PRD & Tech Design → Development → QA → Release
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Links Footer
|
|
91
|
+
|
|
92
|
+
Only include links that are configured in project metadata:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
:link: <{prd_url}|PRD> · <{tech_design_url}|Tech Design> · <{figma_url}|Figma>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Omit any link that isn't set. If no links configured, omit the entire footer.
|
|
99
|
+
|
|
100
|
+
## Full Message Template
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
*Status:* {status_emoji} *{status_text}*
|
|
104
|
+
|
|
105
|
+
*Where we're at*
|
|
106
|
+
{phase_checklist}
|
|
107
|
+
|
|
108
|
+
*In flight this week*
|
|
109
|
+
• {bullet 1}
|
|
110
|
+
• {bullet 2}
|
|
111
|
+
|
|
112
|
+
*Up next*
|
|
113
|
+
• {bullet 1}
|
|
114
|
+
• {bullet 2}
|
|
115
|
+
|
|
116
|
+
{links_footer}
|
|
117
|
+
|
|
118
|
+
Posted with help from :droid:{ & :codex: if used}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Crosspost Template (Summary Version)
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
*{project_title}*
|
|
125
|
+
|
|
126
|
+
{status_line}
|
|
127
|
+
{current_phase_only - e.g., ":work-in-progress-sign: *Development*"}
|
|
128
|
+
|
|
129
|
+
{in_flight_section}
|
|
130
|
+
|
|
131
|
+
:link: <{message_url}|View full update>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Example Full Output
|
|
135
|
+
|
|
136
|
+
**Example 1: Development phase, on track**
|
|
137
|
+
```
|
|
138
|
+
*Status:* :large_green_circle: *On track*
|
|
139
|
+
|
|
140
|
+
*Where we're at*
|
|
141
|
+
:check: Discovery & Post-Discovery Feedback
|
|
142
|
+
:check: Prototype, Design & Post-Design Feedback
|
|
143
|
+
:check: PRD & Tech Design
|
|
144
|
+
:work-in-progress-sign: *Development*
|
|
145
|
+
:waiting-to-start: QA → Release
|
|
146
|
+
|
|
147
|
+
*In flight this week*
|
|
148
|
+
• Implementing scenario template API
|
|
149
|
+
• Adding copy endpoint for templates
|
|
150
|
+
|
|
151
|
+
*Up next*
|
|
152
|
+
• Fan-out orchestration design
|
|
153
|
+
• Integration tests
|
|
154
|
+
|
|
155
|
+
:link: <url|PRD> · <url|Tech Design> · <url|Figma>
|
|
156
|
+
|
|
157
|
+
Posted with help from :droid: & :codex:
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Example 2: PRD phase, at risk**
|
|
161
|
+
```
|
|
162
|
+
*Status:* :large_yellow_circle: *At risk*
|
|
163
|
+
|
|
164
|
+
*Where we're at*
|
|
165
|
+
:check: Discovery & Post-Discovery Feedback
|
|
166
|
+
:check: Prototype, Design & Post-Design Feedback
|
|
167
|
+
:work-in-progress-sign: *PRD*
|
|
168
|
+
:waiting-to-start: Tech Design → Development → QA → Release
|
|
169
|
+
|
|
170
|
+
*In flight this week*
|
|
171
|
+
• Finalising requirements with stakeholders
|
|
172
|
+
• Waiting on legal review for data handling
|
|
173
|
+
|
|
174
|
+
*Up next*
|
|
175
|
+
• Tech design kickoff
|
|
176
|
+
|
|
177
|
+
:link: <url|PRD>
|
|
178
|
+
|
|
179
|
+
Posted with help from :droid: & :codex:
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Example 3: No Slack, printed to terminal**
|
|
183
|
+
```
|
|
184
|
+
Status: On track
|
|
185
|
+
|
|
186
|
+
Where we're at
|
|
187
|
+
✓ Discovery & Post-Discovery Feedback
|
|
188
|
+
✓ Prototype, Design & Post-Design Feedback
|
|
189
|
+
→ Development
|
|
190
|
+
○ QA → Release
|
|
191
|
+
|
|
192
|
+
In flight this week
|
|
193
|
+
• Building the feature
|
|
194
|
+
• Writing tests
|
|
195
|
+
|
|
196
|
+
Up next
|
|
197
|
+
• Code review
|
|
198
|
+
• QA handoff
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
Tip: To post this to Slack, add slack.channel to your project's CONTEXT.md
|
|
202
|
+
and set SLACK_USER_TOKEN in your environment.
|
|
203
|
+
```
|
|
@@ -47,15 +47,16 @@ Tech-design has no configuration of its own. It delegates to:
|
|
|
47
47
|
|
|
48
48
|
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Four-Document Approach
|
|
51
51
|
|
|
52
|
-
| Document | Created When | Purpose
|
|
53
|
-
| --------------- | ------------ |
|
|
54
|
-
| **Research** | `/start` | Deep dive: codex project + codebase discoveries
|
|
55
|
-
| **Thought doc** | `/start` | Design iteration: decisions, @mentions, drafts
|
|
56
|
-
| **
|
|
52
|
+
| Document | Created When | Purpose | Location | Audience | Length |
|
|
53
|
+
| --------------- | ------------ | -------------------------------------------------------- | ------------------------------------------------ | -------------- | ------- |
|
|
54
|
+
| **Research** | `/start` | Deep dive: codex project + codebase discoveries | `{brain_dir}/{inbox?}/tech-designs/{name}/` | Author + AI | Varies |
|
|
55
|
+
| **Thought doc** | `/start` | Design iteration: decisions, @mentions, drafts | `{brain_dir}/{inbox?}/tech-designs/{name}/` | Author + AI | ~2500L |
|
|
56
|
+
| **Summary** | `/publish` | Condensed presentation doc: problem/solution/key points | `{codex_repo}/projects/{name}/SUMMARY.md` | Presentations | ~235L |
|
|
57
|
+
| **Tech Design** | `/publish` | Complete technical design: all decisions/details | `{codex_repo}/projects/{name}/TECH-DESIGN.md` | Reviewers | ~1000L |
|
|
57
58
|
|
|
58
|
-
**Why
|
|
59
|
+
**Why four documents?**
|
|
59
60
|
|
|
60
61
|
1. **Research doc** = Persistent memory of codebase exploration
|
|
61
62
|
- Project-specific patterns discovered
|
|
@@ -84,9 +85,20 @@ Tech-design has no configuration of its own. It delegates to:
|
|
|
84
85
|
- Decision-focused, no exploration noise
|
|
85
86
|
- Ready for PR review
|
|
86
87
|
|
|
87
|
-
**
|
|
88
|
+
3. **Summary** = Presentation artifact
|
|
89
|
+
- Condensed overview (~235 lines vs ~1000 for full design)
|
|
90
|
+
- Problem, solution, key decisions, timeline, metrics
|
|
91
|
+
- Links to full tech design for details
|
|
92
|
+
- For executives, presentations, status updates
|
|
88
93
|
|
|
89
|
-
|
|
94
|
+
4. **Tech Design** = Complete technical specification
|
|
95
|
+
- Full details, all sections, complete specifications
|
|
96
|
+
- Decision rationales with options considered
|
|
97
|
+
- Ready for implementation
|
|
98
|
+
|
|
99
|
+
**Philosophy:** Research captures "what exists", thought doc explores "what we'll build", summary presents "the highlights", tech design specifies "what we decided in full".
|
|
100
|
+
|
|
101
|
+
Summary, tech design, and thought doc are published to codex. Research doc stays in brain as project-specific knowledge base.
|
|
90
102
|
|
|
91
103
|
## Commands
|
|
92
104
|
|
|
@@ -181,6 +193,27 @@ Commands are explicit entry points, but most usage will be natural conversation.
|
|
|
181
193
|
|
|
182
194
|
**Full procedure:** See `references/publish.md` for draft/ready workflows, roll-up generation, git workflow, and examples.
|
|
183
195
|
|
|
196
|
+
## Writing Style
|
|
197
|
+
|
|
198
|
+
**Follow discussions closely** - When iterating on content with the user, follow the conversation tightly. Don't inflate or add more than discussed. If the user agrees to add something, write that specific thing. If unsure whether to add more detail, write less and let the user prompt for more.
|
|
199
|
+
|
|
200
|
+
**Minimal code snippets** - Avoid solutioning in tech designs. The rollup should focus on:
|
|
201
|
+
- **What** needs to be built (requirements, data structures, flows)
|
|
202
|
+
- **Why** design decisions were made (rationale, tradeoffs)
|
|
203
|
+
- **NOT How** to implement it (code examples, specific function names, implementation details)
|
|
204
|
+
|
|
205
|
+
Code snippets should be replaced with:
|
|
206
|
+
- Schema definitions (data structures only)
|
|
207
|
+
- Flow diagrams (conceptual, not code)
|
|
208
|
+
- Prose descriptions of behaviour
|
|
209
|
+
- Decision rationales
|
|
210
|
+
|
|
211
|
+
This prevents confusion and allows engineers implementation flexibility.
|
|
212
|
+
|
|
213
|
+
**Example from user feedback:**
|
|
214
|
+
|
|
215
|
+
> "I want very minimal code snippet to avoid solutioning in the tech design and should focus on what needs to be built, requirements and structures. The design decisions that were made. And so we to avoid showing implementation. This also leaves the implementor the person that's going to implement whatever is being decided here. Give them the freedom to choose how they want to implement it."
|
|
216
|
+
|
|
184
217
|
## Active Doc Tracking
|
|
185
218
|
|
|
186
219
|
Leverage brain's active doc tracking:
|
|
@@ -206,7 +239,11 @@ Leverage brain's active doc tracking:
|
|
|
206
239
|
|
|
207
240
|
Use `/gaps` to surface what's missing. Don't overwhelm at the start.
|
|
208
241
|
|
|
209
|
-
**
|
|
242
|
+
**Thought doc can contain code for clarity** during design discussions, but these should be removed when generating the summary and tech design.
|
|
243
|
+
|
|
244
|
+
**Summary:** Presentation-ready highlights (~235 lines) - problem, solution, key decisions, timeline. Links to full design for details.
|
|
245
|
+
|
|
246
|
+
**Tech Design:** Complete specification (~1000 lines) - all decisions, rationales, specifications. Minimal/no code snippets.
|
|
210
247
|
|
|
211
248
|
## Related Skills
|
|
212
249
|
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
**Security Note:** All user-provided inputs must be validated before use in shell commands. File paths and search patterns should be sanitized to prevent command injection.
|
|
8
8
|
|
|
9
|
+
## Writing Style for Drafting
|
|
10
|
+
|
|
11
|
+
**Conciseness over completeness** - When drafting, err on the side of writing less rather than more. It's easier for the user to ask "can you expand on X?" than to trim down over-written content.
|
|
12
|
+
|
|
13
|
+
**Minimal code snippets** - In the thought doc, code snippets are acceptable for design discussion clarity. However, remind yourself that these will need to be removed or replaced with schema definitions / flow diagrams / prose when generating the summary and tech design.
|
|
14
|
+
|
|
15
|
+
**Follow the discussion** - If the user asks you to draft a section, draft that section based on research doc findings. Don't add adjacent sections or expand scope beyond what was requested.
|
|
16
|
+
|
|
9
17
|
## Procedure
|
|
10
18
|
|
|
11
19
|
### 1. Determine Scope
|
|
@@ -99,6 +99,28 @@ fi
|
|
|
99
99
|
- Ready: Run completeness checks (warn if issues, allow proceed)
|
|
100
100
|
- PR status: Draft PR vs regular PR
|
|
101
101
|
|
|
102
|
+
**CRITICAL - Git Branch Safety:**
|
|
103
|
+
|
|
104
|
+
Before ANY git operations, you MUST ensure you are on the correct branch. **Never assume the local branch is correct** — the user may have been reviewing other tech designs, PRs, or doing other work that left them on a different branch.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd "$codex_repo"
|
|
108
|
+
|
|
109
|
+
if [ -n "$existing_pr" ]; then
|
|
110
|
+
# Updating existing PR — checkout its branch
|
|
111
|
+
pr_branch=$(gh pr view "$existing_pr" --repo "$codex_repo" --json headRefName --jq '.headRefName')
|
|
112
|
+
git fetch origin "$pr_branch"
|
|
113
|
+
git checkout "$pr_branch"
|
|
114
|
+
git pull origin "$pr_branch"
|
|
115
|
+
else
|
|
116
|
+
# First publish — create branch from default branch
|
|
117
|
+
default_branch=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
|
|
118
|
+
git checkout "$default_branch"
|
|
119
|
+
git pull origin "$default_branch"
|
|
120
|
+
git checkout -b "tech-design/$project"
|
|
121
|
+
fi
|
|
122
|
+
```
|
|
123
|
+
|
|
102
124
|
**Steps:**
|
|
103
125
|
|
|
104
126
|
1. **Completeness checks (Ready only):**
|
|
@@ -130,10 +152,30 @@ fi
|
|
|
130
152
|
```
|
|
131
153
|
Include research doc in tech-design/ folder? (helps reviewers/LLMs understand context)
|
|
132
154
|
- Yes: Copy research.md
|
|
133
|
-
- No: Only
|
|
155
|
+
- No: Only summary, tech design, and thought-doc
|
|
134
156
|
```
|
|
135
157
|
|
|
136
|
-
3. **Generate
|
|
158
|
+
3. **Generate summary from thought-doc:**
|
|
159
|
+
|
|
160
|
+
Read the template from `references/summary-template.md` and populate it by synthesizing key points from thought-doc.md.
|
|
161
|
+
|
|
162
|
+
**Summary generation logic (~235 lines target):**
|
|
163
|
+
|
|
164
|
+
- **Quick Overview**: 2-3 sentences at top
|
|
165
|
+
- **The Problem**: 2-3 paragraphs from Background - current pain, impact, who's affected
|
|
166
|
+
- **The Solution**: Core concept (1-2 paragraphs), simple flow diagram, key components (3-5 bullet points)
|
|
167
|
+
- **Scope**: In/Out with checkmarks (✅/❌)
|
|
168
|
+
- **Key Design Decisions**: Top 3-5 decisions with brief rationale (not full options/pros/cons)
|
|
169
|
+
- **Implementation Timeline**: Brief phase overview with status
|
|
170
|
+
- **Success Metrics**: MVP criteria + long-term impact
|
|
171
|
+
- **Risks & Mitigations**: Table format
|
|
172
|
+
- **For More Details**: Links to TECH-DESIGN.md and artifacts
|
|
173
|
+
|
|
174
|
+
**Target length**: ~235 lines (presentation-ready)
|
|
175
|
+
|
|
176
|
+
See "Summary Generation Details" below for detailed examples.
|
|
177
|
+
|
|
178
|
+
4. **Generate tech design from thought-doc:**
|
|
137
179
|
|
|
138
180
|
Read the template from `references/rollup-template.md` and populate it by extracting sections from thought-doc.md.
|
|
139
181
|
|
|
@@ -151,46 +193,62 @@ fi
|
|
|
151
193
|
implementation=$(extract_section "$thought_doc_path" "Implementation")
|
|
152
194
|
```
|
|
153
195
|
|
|
154
|
-
**
|
|
196
|
+
**Tech design generation logic (~1000 lines target):**
|
|
155
197
|
|
|
156
198
|
- **TL;DR**: Synthesize 2-3 sentences from Background + Proposal
|
|
157
199
|
- **Problem**: Extract from Background, focus on current pain
|
|
158
200
|
- **Solution**: From Proposal, assuming recommended decisions accepted
|
|
159
201
|
- **Scope**: Extract Scope section or infer from Proposal
|
|
160
202
|
- **Key Decisions**: Transform from thought doc format:
|
|
161
|
-
- Show options with pros/cons
|
|
203
|
+
- Show ALL options with full pros/cons
|
|
162
204
|
- Mark recommended vs rejected
|
|
163
205
|
- Format: `(Recommended) Option A:` and `(Rejected) Option B:`
|
|
164
206
|
- **Risks**: Extract Risks section, ensure mitigations present
|
|
165
207
|
- **Rollout**: Extract Rollout section, phases with risk mitigation
|
|
166
208
|
- **Implementation**: High-level phases from Implementation section
|
|
167
|
-
- **
|
|
209
|
+
- **Minimal code snippets**: Remove or replace code with schema definitions, flow diagrams, prose
|
|
210
|
+
- **Preserve visual elements**: Mermaid diagrams, tables (non-code) from sections
|
|
168
211
|
|
|
169
|
-
See "
|
|
212
|
+
See "Tech Design Generation Details" below for detailed examples.
|
|
170
213
|
|
|
171
|
-
|
|
214
|
+
5. **Copy files to codex:**
|
|
172
215
|
```bash
|
|
173
|
-
# Write
|
|
174
|
-
|
|
175
|
-
echo "$
|
|
216
|
+
# Write summary
|
|
217
|
+
summary_path="$codex_repo/projects/$project/SUMMARY.md"
|
|
218
|
+
echo "$summary_content" > "$summary_path"
|
|
219
|
+
|
|
220
|
+
# Write tech design
|
|
221
|
+
tech_design_path="$codex_repo/projects/$project/TECH-DESIGN.md"
|
|
222
|
+
echo "$tech_design_content" > "$tech_design_path"
|
|
176
223
|
|
|
177
|
-
# Create/update
|
|
178
|
-
mkdir -p "$codex_repo/projects/$project/
|
|
179
|
-
cp "$thought_doc_path" "$codex_repo/projects/$project/
|
|
224
|
+
# Create/update artifacts folder
|
|
225
|
+
mkdir -p "$codex_repo/projects/$project/artifacts"
|
|
226
|
+
cp "$thought_doc_path" "$codex_repo/projects/$project/artifacts/thought-doc.md"
|
|
180
227
|
|
|
181
228
|
if [ "$include_research" = "yes" ]; then
|
|
182
|
-
cp "$research_doc_path" "$codex_repo/projects/$project/
|
|
229
|
+
cp "$research_doc_path" "$codex_repo/projects/$project/artifacts/research.md"
|
|
183
230
|
fi
|
|
184
231
|
|
|
185
232
|
# Copy diagrams and additional files
|
|
186
233
|
for file in "$design_folder"/*.{png,jpg,svg,pdf} 2>/dev/null; do
|
|
187
|
-
[ -f "$file" ] && cp "$file" "$codex_repo/projects/$project/
|
|
234
|
+
[ -f "$file" ] && cp "$file" "$codex_repo/projects/$project/artifacts/"
|
|
188
235
|
done
|
|
189
236
|
```
|
|
190
237
|
|
|
191
|
-
|
|
238
|
+
6. **Add frontmatter:**
|
|
192
239
|
|
|
193
|
-
**
|
|
240
|
+
**Summary frontmatter:**
|
|
241
|
+
```yaml
|
|
242
|
+
---
|
|
243
|
+
title: "[Summary] $project"
|
|
244
|
+
type: artifact
|
|
245
|
+
status: $(if draft: "draft", if ready: "ready")
|
|
246
|
+
created: $(date +%Y-%m-%d)
|
|
247
|
+
updated: $(date +%Y-%m-%d)
|
|
248
|
+
---
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Tech design frontmatter:**
|
|
194
252
|
```yaml
|
|
195
253
|
---
|
|
196
254
|
title: "[Tech Design] $project"
|
|
@@ -205,8 +263,8 @@ fi
|
|
|
205
263
|
**Thought doc frontmatter:**
|
|
206
264
|
```yaml
|
|
207
265
|
---
|
|
208
|
-
title: "[
|
|
209
|
-
type:
|
|
266
|
+
title: "[Thought Doc] $project"
|
|
267
|
+
type: artifact
|
|
210
268
|
status: $(if draft: "draft", if ready: "ready")
|
|
211
269
|
created: $(date +%Y-%m-%d)
|
|
212
270
|
updated: $(date +%Y-%m-%d)
|
|
@@ -214,21 +272,31 @@ fi
|
|
|
214
272
|
---
|
|
215
273
|
```
|
|
216
274
|
|
|
217
|
-
|
|
275
|
+
7. **Confirm branch before push:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
279
|
+
echo "About to push to branch: $current_branch"
|
|
280
|
+
echo "Is this correct? (y/n)"
|
|
281
|
+
# Wait for user confirmation
|
|
282
|
+
# If no, abort with clear message
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
8. **Create or update branch and PR:**
|
|
218
286
|
|
|
219
287
|
**If first publish (no existing PR):**
|
|
220
288
|
```bash
|
|
221
|
-
|
|
222
|
-
git checkout -b "tech-design/$project"
|
|
289
|
+
# Branch already created in step 4
|
|
223
290
|
git add "projects/$project"
|
|
224
291
|
git commit -m "$(if draft: "Draft tech design" else "Tech design") for $project
|
|
225
292
|
|
|
226
293
|
$(if draft: "Sharing work-in-progress for early feedback." else: "Complete technical design ready for review.")
|
|
227
294
|
|
|
228
295
|
Files:
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
|
|
296
|
+
- SUMMARY.md - Presentation-ready highlights (~235 lines)
|
|
297
|
+
- TECH-DESIGN.md - Complete technical design (~1000 lines)
|
|
298
|
+
- artifacts/thought-doc.md - Full working document (~2500 lines)
|
|
299
|
+
$([ "$include_research" = "yes" ] && echo "- artifacts/research.md - Context and research")
|
|
232
300
|
"
|
|
233
301
|
|
|
234
302
|
git push -u origin "tech-design/$project"
|
|
@@ -244,28 +312,37 @@ $(if draft: "🚧 **Work-in-progress** - sharing for early feedback." else: "Tec
|
|
|
244
312
|
|
|
245
313
|
## Documents
|
|
246
314
|
|
|
247
|
-
- **
|
|
248
|
-
- **
|
|
249
|
-
|
|
315
|
+
- **SUMMARY.md**: Presentation-ready highlights (~235 lines) - problem, solution, key decisions, timeline
|
|
316
|
+
- **TECH-DESIGN.md**: Complete technical design (~1000 lines) - full details for implementors
|
|
317
|
+
- **artifacts/thought-doc.md**: Working document (~2500 lines) - exploration, @mentions, iteration
|
|
318
|
+
$([ "$include_research" = "yes" ] && echo "- **artifacts/research.md**: Codebase discoveries and research")
|
|
319
|
+
|
|
320
|
+
## Four-Document Approach
|
|
250
321
|
|
|
251
|
-
|
|
322
|
+
The summary provides presentation-ready highlights for executives and status updates.
|
|
252
323
|
|
|
253
|
-
The
|
|
324
|
+
The tech design is the complete specification synthesized from the thought doc - all decisions, rationales, details.
|
|
254
325
|
|
|
255
326
|
The thought doc contains the full exploration, research findings, @mentions, and working notes.
|
|
256
327
|
|
|
257
|
-
|
|
328
|
+
All documents are included for full transparency.
|
|
258
329
|
|
|
259
330
|
## Review Guidance
|
|
260
331
|
|
|
332
|
+
**For presentations / status updates:**
|
|
333
|
+
- Read SUMMARY.md only (~235 lines)
|
|
334
|
+
- Enough context for executive discussions
|
|
335
|
+
|
|
261
336
|
**For quick review:**
|
|
262
|
-
- Read
|
|
337
|
+
- Read SUMMARY.md for overview
|
|
338
|
+
- Read TECH-DESIGN.md for complete details (~1000 lines)
|
|
263
339
|
- Comment on high-level approach and decisions
|
|
264
340
|
|
|
265
341
|
**For deep review:**
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
342
|
+
- Start with SUMMARY.md
|
|
343
|
+
- Read TECH-DESIGN.md fully
|
|
344
|
+
- Reference artifacts/thought-doc.md for context on decisions
|
|
345
|
+
- Check artifacts/research.md to understand codebase discoveries
|
|
269
346
|
|
|
270
347
|
## Next Steps
|
|
271
348
|
|
|
@@ -302,7 +379,7 @@ EOF
|
|
|
302
379
|
fi
|
|
303
380
|
```
|
|
304
381
|
|
|
305
|
-
|
|
382
|
+
9. **Output:**
|
|
306
383
|
```
|
|
307
384
|
✓ Tech design published!
|
|
308
385
|
|
|
@@ -310,9 +387,10 @@ EOF
|
|
|
310
387
|
$(if changed_to_ready: "✓ Marked PR as ready for review")
|
|
311
388
|
|
|
312
389
|
Files in PR:
|
|
313
|
-
• projects/$project/
|
|
314
|
-
• projects/$project/
|
|
315
|
-
|
|
390
|
+
• projects/$project/SUMMARY.md (presentation highlights ~235 lines)
|
|
391
|
+
• projects/$project/TECH-DESIGN.md (complete design ~1000 lines)
|
|
392
|
+
• projects/$project/artifacts/thought-doc.md (working document ~2500 lines)
|
|
393
|
+
$([ "$include_research" = "yes" ] && echo " • projects/$project/artifacts/research.md (context and research)")
|
|
316
394
|
|
|
317
395
|
Next steps:
|
|
318
396
|
• $(if draft: "Share PR with teammates for early feedback" else: "Share PR with reviewers")
|
|
@@ -321,7 +399,7 @@ EOF
|
|
|
321
399
|
• $(if draft: "When ready: change publish type to 'Ready' to mark PR ready for formal review")
|
|
322
400
|
```
|
|
323
401
|
|
|
324
|
-
###
|
|
402
|
+
### 10. Never Delete Brain Files
|
|
325
403
|
|
|
326
404
|
**CRITICAL:** Brain folder is the working copy. Codex is the published copy.
|
|
327
405
|
|
|
@@ -333,7 +411,35 @@ EOF
|
|
|
333
411
|
# User can continue iterating and republish
|
|
334
412
|
```
|
|
335
413
|
|
|
336
|
-
##
|
|
414
|
+
## Summary Generation Details
|
|
415
|
+
|
|
416
|
+
**Target:** ~235 lines, presentation-ready
|
|
417
|
+
|
|
418
|
+
**Template:** `references/summary-template.md`
|
|
419
|
+
|
|
420
|
+
**Key sections:**
|
|
421
|
+
|
|
422
|
+
1. **Quick Overview**: 2-3 sentences at very top
|
|
423
|
+
2. **The Problem**: 2-3 paragraphs - current pain, impact, who's affected
|
|
424
|
+
3. **The Solution**: Core concept (1-2 paragraphs), simple flow, 3-5 key components
|
|
425
|
+
4. **Scope**: In/Out lists with ✅/❌
|
|
426
|
+
5. **Key Design Decisions**: Top 3-5 decisions with brief "Why:" rationale (not full pros/cons)
|
|
427
|
+
6. **Implementation Timeline**: Brief phase overview with status
|
|
428
|
+
7. **Success Metrics**: MVP criteria + long-term impact
|
|
429
|
+
8. **Risks & Mitigations**: Table format
|
|
430
|
+
9. **For More Details**: Links to TECH-DESIGN.md and artifacts
|
|
431
|
+
|
|
432
|
+
**Condensation strategy:**
|
|
433
|
+
- Extract highlights, not everything
|
|
434
|
+
- Focus on business value and decisions made
|
|
435
|
+
- Remove technical implementation details
|
|
436
|
+
- Link to full design for complete specs
|
|
437
|
+
|
|
438
|
+
## Tech Design Generation Details
|
|
439
|
+
|
|
440
|
+
**Target:** ~1000 lines, complete specification
|
|
441
|
+
|
|
442
|
+
**Template:** `references/rollup-template.md`
|
|
337
443
|
|
|
338
444
|
### TL;DR Synthesis
|
|
339
445
|
|
|
@@ -429,9 +535,18 @@ Services poll the database for status changes every 5 seconds.
|
|
|
429
535
|
- **Roll-up generation fails:** Fallback to template with placeholders, note what needs manual editing
|
|
430
536
|
- **No changes to commit:** "No changes detected. Update files in brain folder first."
|
|
431
537
|
|
|
432
|
-
##
|
|
538
|
+
## Quality Checklist (Ready Publish Only)
|
|
539
|
+
|
|
540
|
+
Before creating PR, verify summary and tech design:
|
|
541
|
+
|
|
542
|
+
**Summary (~235 lines):**
|
|
543
|
+
- [ ] Quick Overview is 2-3 sentences, business-focused
|
|
544
|
+
- [ ] Problem section is 2-3 paragraphs (not pages)
|
|
545
|
+
- [ ] Solution has simple flow diagram
|
|
546
|
+
- [ ] Key Decisions shows top 3-5 only with brief rationale
|
|
547
|
+
- [ ] Links to TECH-DESIGN.md for full details
|
|
433
548
|
|
|
434
|
-
|
|
549
|
+
**Tech Design (~1000 lines):**
|
|
435
550
|
|
|
436
551
|
- [ ] TL;DR is 2-3 sentences, jargon-free
|
|
437
552
|
- [ ] Problem is clear, focused on pain (not solution)
|
|
@@ -453,14 +568,15 @@ If any fail, note in output and offer to refine before PR.
|
|
|
453
568
|
**Published structure (same for both draft and ready):**
|
|
454
569
|
```
|
|
455
570
|
projects/{name}/
|
|
456
|
-
├──
|
|
457
|
-
|
|
458
|
-
|
|
571
|
+
├── SUMMARY.md (presentation highlights ~235 lines - always generated)
|
|
572
|
+
├── TECH-DESIGN.md (complete design ~1000 lines - always generated)
|
|
573
|
+
└── artifacts/
|
|
574
|
+
├── thought-doc.md (working document ~2500 lines)
|
|
459
575
|
└── research.md (optional - if user chose to include)
|
|
460
576
|
```
|
|
461
577
|
|
|
462
578
|
**Key points:**
|
|
463
|
-
-
|
|
579
|
+
- Summary and tech design are always generated (build artifacts from thought-doc)
|
|
464
580
|
- Draft vs Ready is indicated by GitHub PR status only
|
|
465
581
|
- File structure is consistent regardless of draft/ready status
|
|
466
|
-
-
|
|
582
|
+
- artifacts/ contains working documents and supporting materials
|