@orderful/droid 0.32.0 → 0.33.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/marketplace.json +21 -8
- package/CHANGELOG.md +56 -0
- package/README.md +24 -0
- package/dist/tools/brain/.claude-plugin/plugin.json +1 -1
- package/dist/tools/brain/TOOL.yaml +1 -1
- package/dist/tools/brain/skills/brain/SKILL.md +6 -4
- package/dist/tools/brain/skills/brain/references/workflows.md +17 -12
- package/dist/tools/coach/.claude-plugin/plugin.json +1 -1
- package/dist/tools/coach/TOOL.yaml +1 -1
- package/dist/tools/coach/skills/coach/SKILL.md +2 -1
- package/dist/tools/code-review/.claude-plugin/plugin.json +1 -1
- package/dist/tools/code-review/TOOL.yaml +1 -1
- package/dist/tools/code-review/skills/code-review/SKILL.md +1 -1
- package/dist/tools/codex/.claude-plugin/plugin.json +1 -1
- package/dist/tools/codex/TOOL.yaml +1 -1
- package/dist/tools/codex/skills/codex/SKILL.md +1 -1
- package/dist/tools/codex/skills/codex/references/loading.md +1 -1
- package/dist/tools/comments/.claude-plugin/plugin.json +1 -1
- package/dist/tools/comments/TOOL.yaml +1 -1
- package/dist/tools/comments/skills/comments/SKILL.md +9 -7
- package/dist/tools/plan/.claude-plugin/plugin.json +16 -0
- package/dist/tools/plan/TOOL.yaml +18 -0
- package/dist/tools/plan/commands/plan.md +33 -0
- package/dist/tools/plan/skills/plan/SKILL.md +103 -0
- package/dist/tools/plan/skills/plan/references/templates.md +176 -0
- package/dist/tools/plan/skills/plan/references/workflows.md +299 -0
- package/dist/tools/plan/skills/plan/references/xml-conversion.md +123 -0
- package/dist/tools/project/.claude-plugin/plugin.json +1 -1
- package/dist/tools/project/TOOL.yaml +3 -2
- package/dist/tools/project/skills/project/SKILL.md +10 -12
- package/dist/tools/project/skills/project/references/creating.md +5 -5
- package/dist/tools/project/skills/project/references/loading.md +4 -4
- package/dist/tools/tech-design/.claude-plugin/plugin.json +1 -1
- package/dist/tools/tech-design/TOOL.yaml +1 -1
- package/dist/tools/tech-design/skills/tech-design/SKILL.md +3 -3
- package/dist/tools/tech-design/skills/tech-design/references/publish.md +1 -1
- package/dist/tools/tech-design/skills/tech-design/references/start.md +2 -2
- package/dist/tools/wrapup/.claude-plugin/plugin.json +1 -1
- package/dist/tools/wrapup/TOOL.yaml +1 -1
- package/dist/tools/wrapup/skills/wrapup/SKILL.md +4 -2
- package/dist/tools/wrapup/skills/wrapup/references/subagent-prompts.md +19 -11
- package/package.json +1 -1
- package/src/tools/brain/.claude-plugin/plugin.json +1 -1
- package/src/tools/brain/TOOL.yaml +1 -1
- package/src/tools/brain/skills/brain/SKILL.md +6 -4
- package/src/tools/brain/skills/brain/references/workflows.md +17 -12
- package/src/tools/coach/.claude-plugin/plugin.json +1 -1
- package/src/tools/coach/TOOL.yaml +1 -1
- package/src/tools/coach/skills/coach/SKILL.md +2 -1
- package/src/tools/code-review/.claude-plugin/plugin.json +1 -1
- package/src/tools/code-review/TOOL.yaml +1 -1
- package/src/tools/code-review/skills/code-review/SKILL.md +1 -1
- package/src/tools/codex/.claude-plugin/plugin.json +1 -1
- package/src/tools/codex/TOOL.yaml +1 -1
- package/src/tools/codex/skills/codex/SKILL.md +1 -1
- package/src/tools/codex/skills/codex/references/loading.md +1 -1
- package/src/tools/comments/.claude-plugin/plugin.json +1 -1
- package/src/tools/comments/TOOL.yaml +1 -1
- package/src/tools/comments/skills/comments/SKILL.md +9 -7
- package/src/tools/plan/.claude-plugin/plugin.json +16 -0
- package/src/tools/plan/TOOL.yaml +18 -0
- package/src/tools/plan/commands/plan.md +33 -0
- package/src/tools/plan/skills/plan/SKILL.md +103 -0
- package/src/tools/plan/skills/plan/references/templates.md +176 -0
- package/src/tools/plan/skills/plan/references/workflows.md +299 -0
- package/src/tools/plan/skills/plan/references/xml-conversion.md +123 -0
- package/src/tools/project/.claude-plugin/plugin.json +1 -1
- package/src/tools/project/TOOL.yaml +3 -2
- package/src/tools/project/skills/project/SKILL.md +10 -12
- package/src/tools/project/skills/project/references/creating.md +5 -5
- package/src/tools/project/skills/project/references/loading.md +4 -4
- package/src/tools/tech-design/.claude-plugin/plugin.json +1 -1
- package/src/tools/tech-design/TOOL.yaml +1 -1
- package/src/tools/tech-design/skills/tech-design/SKILL.md +3 -3
- package/src/tools/tech-design/skills/tech-design/references/publish.md +1 -1
- package/src/tools/tech-design/skills/tech-design/references/start.md +2 -2
- package/src/tools/wrapup/.claude-plugin/plugin.json +1 -1
- package/src/tools/wrapup/TOOL.yaml +1 -1
- package/src/tools/wrapup/skills/wrapup/SKILL.md +4 -2
- package/src/tools/wrapup/skills/wrapup/references/subagent-prompts.md +19 -11
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Plan Doc Template
|
|
2
|
+
|
|
3
|
+
## Full Template
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# Plan: {topic}
|
|
7
|
+
|
|
8
|
+
**Status:** draft | in-progress | ready | done
|
|
9
|
+
**Created:** {date}
|
|
10
|
+
**Updated:** {date}
|
|
11
|
+
**Project:** {from /project if active, else omit}
|
|
12
|
+
**Ticket:** {if provided}
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Context
|
|
17
|
+
|
|
18
|
+
{What we're planning and why. Loaded from /project, /codex, or user input.}
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Locked-In Decisions
|
|
23
|
+
|
|
24
|
+
| Decision | Choice | Rationale |
|
|
25
|
+
|----------|--------|-----------|
|
|
26
|
+
| | | |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Tasks
|
|
31
|
+
|
|
32
|
+
### Task 1: {name}
|
|
33
|
+
|
|
34
|
+
**Files:** {paths to create/modify}
|
|
35
|
+
|
|
36
|
+
**Context:**
|
|
37
|
+
{Detailed context - patterns to follow, edge cases, dependencies}
|
|
38
|
+
|
|
39
|
+
**Verify:** `{command to check success}`
|
|
40
|
+
|
|
41
|
+
**Done:** {Human-readable success criteria}
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Task 2: {name}
|
|
46
|
+
|
|
47
|
+
**Files:** ...
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Discussion Log
|
|
52
|
+
|
|
53
|
+
### Open: {topic}
|
|
54
|
+
> @droid - {user's question or comment}
|
|
55
|
+
|
|
56
|
+
### Resolved: {topic} ({date})
|
|
57
|
+
> @droid - {original question}
|
|
58
|
+
> @{user} - {response}
|
|
59
|
+
> **Resolved:** {one-line summary - also add to Locked-In table}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Section Reference
|
|
63
|
+
|
|
64
|
+
### Status
|
|
65
|
+
|
|
66
|
+
| Value | Meaning |
|
|
67
|
+
|-------|---------|
|
|
68
|
+
| `draft` | Still exploring, gathering context |
|
|
69
|
+
| `in-progress` | Actively iterating on tasks and decisions |
|
|
70
|
+
| `ready` | All discussions resolved, ready to implement |
|
|
71
|
+
| `done` | Implementation complete |
|
|
72
|
+
|
|
73
|
+
### Context Section
|
|
74
|
+
|
|
75
|
+
**Purpose:** Ground the plan in why this work matters and what's already known.
|
|
76
|
+
|
|
77
|
+
**Good:**
|
|
78
|
+
```markdown
|
|
79
|
+
## Context
|
|
80
|
+
|
|
81
|
+
We need to add rate limiting to the API to prevent abuse. Current state:
|
|
82
|
+
- No rate limiting exists
|
|
83
|
+
- We've seen 3 incidents of API abuse in the last month
|
|
84
|
+
- Team decided on token bucket algorithm (see ADR-042)
|
|
85
|
+
|
|
86
|
+
Related codex entries: [rate-limiting-patterns], [api-security-guidelines]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Weak:**
|
|
90
|
+
```markdown
|
|
91
|
+
## Context
|
|
92
|
+
|
|
93
|
+
Add rate limiting.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Locked-In Decisions Table
|
|
97
|
+
|
|
98
|
+
**Purpose:** Capture decisions that are no longer up for debate. These graduate from the Discussion Log when resolved.
|
|
99
|
+
|
|
100
|
+
**Good:**
|
|
101
|
+
```markdown
|
|
102
|
+
| Decision | Choice | Rationale |
|
|
103
|
+
|----------|--------|-----------|
|
|
104
|
+
| Algorithm | Token bucket | Allows bursting, industry standard |
|
|
105
|
+
| Storage | Redis | Already in stack, handles distributed state |
|
|
106
|
+
| Limit | 100 req/min | Based on current usage patterns + 2x headroom |
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Task Semantic Sections
|
|
110
|
+
|
|
111
|
+
Each task uses semantic markdown sections:
|
|
112
|
+
|
|
113
|
+
| Section | Purpose | Example |
|
|
114
|
+
|---------|---------|---------|
|
|
115
|
+
| `**Files:**` | What to create/modify | `src/middleware/rateLimit.ts`, `src/config/limits.ts` |
|
|
116
|
+
| `**Context:**` | How to do it | "Follow existing middleware pattern in `auth.ts`" |
|
|
117
|
+
| `**Verify:**` | Command to check | `bun test src/middleware/rateLimit.test.ts` |
|
|
118
|
+
| `**Done:**` | Success criteria | "Rate limit returns 429 after 100 requests" |
|
|
119
|
+
|
|
120
|
+
**Good task:**
|
|
121
|
+
```markdown
|
|
122
|
+
### Task 1: Create rate limit middleware
|
|
123
|
+
|
|
124
|
+
**Files:** `src/middleware/rateLimit.ts`, `src/middleware/rateLimit.test.ts`
|
|
125
|
+
|
|
126
|
+
**Context:**
|
|
127
|
+
Follow pattern from `src/middleware/auth.ts`. Use Redis client from `src/lib/redis.ts`.
|
|
128
|
+
Token bucket with 100 tokens, refill 1/second. Return 429 with `Retry-After` header.
|
|
129
|
+
|
|
130
|
+
**Verify:** `bun test src/middleware/rateLimit.test.ts`
|
|
131
|
+
|
|
132
|
+
**Done:** Middleware exports `rateLimit()` function, tests pass including 429 case
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Weak task:**
|
|
136
|
+
```markdown
|
|
137
|
+
### Task 1: Add rate limiting
|
|
138
|
+
|
|
139
|
+
**Files:** TBD
|
|
140
|
+
|
|
141
|
+
**Context:** Add rate limiting to the API
|
|
142
|
+
|
|
143
|
+
**Verify:** Test it
|
|
144
|
+
|
|
145
|
+
**Done:** Works
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Discussion Log
|
|
149
|
+
|
|
150
|
+
**Purpose:** Async back-and-forth between user and AI. Resolved discussions graduate to Locked-In Decisions.
|
|
151
|
+
|
|
152
|
+
**Open discussion:**
|
|
153
|
+
```markdown
|
|
154
|
+
### Open: Redis vs in-memory storage
|
|
155
|
+
> @droid - Should we use Redis or in-memory for rate limit counters? Redis adds complexity but works across instances.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Resolved discussion:**
|
|
159
|
+
```markdown
|
|
160
|
+
### Resolved: Redis vs in-memory storage (2026-01-18)
|
|
161
|
+
> @droid - Should we use Redis or in-memory for rate limit counters?
|
|
162
|
+
> @{user} - Redis. We run 3 API instances, need shared state.
|
|
163
|
+
> **Resolved:** Use Redis for distributed rate limit state.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## File Naming
|
|
167
|
+
|
|
168
|
+
Plans are named `plan-{topic}.md` with kebab-case topic:
|
|
169
|
+
|
|
170
|
+
- `plan-rate-limiting.md`
|
|
171
|
+
- `plan-auth-refactor.md`
|
|
172
|
+
- `plan-tdt-1953-templates.md` (ticket-based)
|
|
173
|
+
|
|
174
|
+
## Location
|
|
175
|
+
|
|
176
|
+
Plans live in `{brain_dir}/{inbox_dir}/plans/` or `{projects_dir}/{project}/plans/` if project-nested.
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# Workflow Reference
|
|
2
|
+
|
|
3
|
+
Detailed command flows for the plan skill.
|
|
4
|
+
|
|
5
|
+
## `/plan new {topic}`
|
|
6
|
+
|
|
7
|
+
### Step 1: Read Configuration
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
droid config brain # → brain_dir, inbox_dir
|
|
11
|
+
droid config comments # → user_mention
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
If brain not configured, ask user for `brain_dir` location.
|
|
15
|
+
|
|
16
|
+
### Step 2: Determine Location
|
|
17
|
+
|
|
18
|
+
Check if `/project` is active (check `{projects_dir}/{project}/PROJECT.md` exists):
|
|
19
|
+
|
|
20
|
+
**If project active:**
|
|
21
|
+
```
|
|
22
|
+
Offer choice via AskUserQuestion:
|
|
23
|
+
- "Project folder" → {projects_dir}/{project}/plans/plan-{topic}.md
|
|
24
|
+
- "Inbox" → {brain_dir}/{inbox_dir}/plans/plan-{topic}.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**If no project:**
|
|
28
|
+
```
|
|
29
|
+
Use: {brain_dir}/{inbox_dir}/plans/plan-{topic}.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 3: Check for Existing Plan
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Check if plan already exists
|
|
36
|
+
ls {determined_path}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If exists, ask:
|
|
40
|
+
- "Open existing plan"
|
|
41
|
+
- "Create new with different name"
|
|
42
|
+
|
|
43
|
+
### Step 4: Offer Context Loading
|
|
44
|
+
|
|
45
|
+
**If `/project` active:**
|
|
46
|
+
```
|
|
47
|
+
"Include project context in the plan?"
|
|
48
|
+
- Yes → Read {projects_dir}/{project}/PROJECT.md, extract relevant sections
|
|
49
|
+
- No → Skip
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Search `/codex` for relevant entries:**
|
|
53
|
+
|
|
54
|
+
Use `/codex search {topic}` to find related entries.
|
|
55
|
+
|
|
56
|
+
If matches found:
|
|
57
|
+
```
|
|
58
|
+
"Found codex entries related to '{topic}': [entry1], [entry2]. Include?"
|
|
59
|
+
- Yes → Read and include summaries
|
|
60
|
+
- No → Skip
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 5: Ask Clarifying Questions
|
|
64
|
+
|
|
65
|
+
Use AskUserQuestion with these prompts:
|
|
66
|
+
|
|
67
|
+
1. **Goal:** "What's the goal of this work?"
|
|
68
|
+
2. **Scope:** "What's the scope?" (options: "This PR", "This ticket", "Small feature")
|
|
69
|
+
3. **Constraints:** "Any constraints or decisions already made?"
|
|
70
|
+
|
|
71
|
+
### Step 6: Generate Plan
|
|
72
|
+
|
|
73
|
+
Create plan file from template (see `templates.md`) with:
|
|
74
|
+
- Topic from command
|
|
75
|
+
- Date from system
|
|
76
|
+
- Project from active project (if any)
|
|
77
|
+
- Context from gathered information
|
|
78
|
+
|
|
79
|
+
### Step 7: Set Active
|
|
80
|
+
|
|
81
|
+
Store active plan path for session (in-memory or temp file).
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## `/plan search {topic}`
|
|
86
|
+
|
|
87
|
+
### Step 1: Search for Plans
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Find all plan files
|
|
91
|
+
find {brain_dir} -name "plan-*.md" -type f
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 2: Fuzzy Match
|
|
95
|
+
|
|
96
|
+
Match topic against file names and content. Rank by:
|
|
97
|
+
1. Exact name match (`plan-{topic}.md`)
|
|
98
|
+
2. Partial name match (`plan-*{topic}*.md`)
|
|
99
|
+
3. Content match (topic appears in file)
|
|
100
|
+
|
|
101
|
+
### Step 3: Handle Multiple Matches
|
|
102
|
+
|
|
103
|
+
If multiple matches, use AskUserQuestion:
|
|
104
|
+
```
|
|
105
|
+
"Found multiple plans matching '{topic}':"
|
|
106
|
+
- plan-auth-refactor.md (ready)
|
|
107
|
+
- plan-auth-migration.md (draft)
|
|
108
|
+
- plan-oauth-integration.md (done)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 4: Display Summary
|
|
112
|
+
|
|
113
|
+
Read selected plan and show:
|
|
114
|
+
```markdown
|
|
115
|
+
**Plan:** {title}
|
|
116
|
+
**Status:** {status}
|
|
117
|
+
**Tasks:** {count} ({completed} done)
|
|
118
|
+
**Open discussions:** {count}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Step 5: Set Active
|
|
122
|
+
|
|
123
|
+
Store as active plan for session.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## `/plan check`
|
|
128
|
+
|
|
129
|
+
### Step 1: Load Active Plan
|
|
130
|
+
|
|
131
|
+
If no active plan, prompt to search for one.
|
|
132
|
+
|
|
133
|
+
### Step 2: Find Comments
|
|
134
|
+
|
|
135
|
+
Search for `> @droid` lines (user comments addressed to AI):
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
grep -n "> @droid" {plan_path}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Step 3: Address Each Comment
|
|
142
|
+
|
|
143
|
+
For each comment:
|
|
144
|
+
|
|
145
|
+
1. **Read context** - surrounding lines, section it's in
|
|
146
|
+
2. **Respond** - add response below with `> @{user_mention}`
|
|
147
|
+
3. **Ask resolution** - "Is this resolved?"
|
|
148
|
+
|
|
149
|
+
### Step 4: Graduation Pattern
|
|
150
|
+
|
|
151
|
+
When a discussion is resolved:
|
|
152
|
+
|
|
153
|
+
1. Mark as resolved in Discussion Log:
|
|
154
|
+
```markdown
|
|
155
|
+
### Resolved: {topic} ({date})
|
|
156
|
+
> @droid - {original question}
|
|
157
|
+
> @{user} - {response}
|
|
158
|
+
> **Resolved:** {one-line summary}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
2. Add to Locked-In Decisions table:
|
|
162
|
+
```markdown
|
|
163
|
+
| {decision} | {choice} | {rationale from discussion} |
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
3. Move from "Open:" to "Resolved:" header
|
|
167
|
+
|
|
168
|
+
### Step 5: Update Doc
|
|
169
|
+
|
|
170
|
+
Write changes back to plan file.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## `/plan ready`
|
|
175
|
+
|
|
176
|
+
### Step 1: Load Active Plan
|
|
177
|
+
|
|
178
|
+
If no active plan, prompt to search for one.
|
|
179
|
+
|
|
180
|
+
### Step 2: Check Unresolved Discussions
|
|
181
|
+
|
|
182
|
+
Search for `### Open:` sections:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
grep -c "### Open:" {plan_path}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
If any found, warn:
|
|
189
|
+
```
|
|
190
|
+
"Found {n} unresolved discussions. Mark as ready anyway?"
|
|
191
|
+
- "Resolve first" → List open discussions
|
|
192
|
+
- "Mark ready anyway" → Continue
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Step 3: Validate Required Sections
|
|
196
|
+
|
|
197
|
+
Check for:
|
|
198
|
+
- `## Context` section with content
|
|
199
|
+
- At least one `### Task` section
|
|
200
|
+
|
|
201
|
+
If missing, warn and list what's needed.
|
|
202
|
+
|
|
203
|
+
### Step 4: Update Status
|
|
204
|
+
|
|
205
|
+
Change `**Status:** draft` or `**Status:** in-progress` to `**Status:** ready`
|
|
206
|
+
|
|
207
|
+
### Step 5: Offer Distribution
|
|
208
|
+
|
|
209
|
+
Ask via AskUserQuestion:
|
|
210
|
+
```
|
|
211
|
+
"Plan is ready. What next?"
|
|
212
|
+
- "Keep in brain" → Done
|
|
213
|
+
- "Copy to PR description" → Generate PR-friendly format with <details> wrapper
|
|
214
|
+
- "Link in project file" → Add reference to {projects_dir}/{project}/PROJECT.md
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## `/plan implement`
|
|
220
|
+
|
|
221
|
+
### Step 1: Load Plan
|
|
222
|
+
|
|
223
|
+
If no active plan, prompt to search for one.
|
|
224
|
+
|
|
225
|
+
Check status - warn if not `ready`:
|
|
226
|
+
```
|
|
227
|
+
"This plan is still '{status}'. Implement anyway?"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Step 2: Parse Tasks
|
|
231
|
+
|
|
232
|
+
Find all `### Task N:` sections. For each, extract:
|
|
233
|
+
- **Name** from header
|
|
234
|
+
- **Files** from `**Files:**` line
|
|
235
|
+
- **Context** from `**Context:**` section
|
|
236
|
+
- **Verify** from `**Verify:**` line
|
|
237
|
+
- **Done** from `**Done:**` line
|
|
238
|
+
|
|
239
|
+
### Step 3: Optional XML Conversion
|
|
240
|
+
|
|
241
|
+
For complex multi-task plans, offer:
|
|
242
|
+
```
|
|
243
|
+
"Convert to XML for AI efficiency?"
|
|
244
|
+
- "Yes" → Convert (see xml-conversion.md)
|
|
245
|
+
- "No" → Use markdown as-is
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Step 4: Execute Tasks
|
|
249
|
+
|
|
250
|
+
For each task in order:
|
|
251
|
+
|
|
252
|
+
1. **Announce:** "Starting Task {n}: {name}"
|
|
253
|
+
2. **Load context:** Read files mentioned in `**Files:**`
|
|
254
|
+
3. **Execute:** Create/modify files per task description
|
|
255
|
+
4. **Verify:** Run `**Verify:**` command
|
|
256
|
+
5. **Check:** Validate against `**Done:**` criteria
|
|
257
|
+
6. **Mark complete:** Update plan doc
|
|
258
|
+
|
|
259
|
+
If verification fails:
|
|
260
|
+
```
|
|
261
|
+
"Task {n} verification failed: {output}. What next?"
|
|
262
|
+
- "Fix and retry"
|
|
263
|
+
- "Skip this task"
|
|
264
|
+
- "Stop implementation"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Step 5: Update Status
|
|
268
|
+
|
|
269
|
+
When all tasks complete, change `**Status:** ready` to `**Status:** done`
|
|
270
|
+
|
|
271
|
+
Add completion note:
|
|
272
|
+
```markdown
|
|
273
|
+
**Completed:** {date}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Discussion Graduation Flow
|
|
279
|
+
|
|
280
|
+
The pattern for moving discussions to decisions:
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
1. User leaves comment:
|
|
284
|
+
> @droid - Should we use Redis or Postgres?
|
|
285
|
+
|
|
286
|
+
2. AI responds:
|
|
287
|
+
> @{user} - Redis for this use case because {reasons}
|
|
288
|
+
|
|
289
|
+
3. User confirms resolution (via /plan check):
|
|
290
|
+
> **Resolved:** Use Redis for rate limit state
|
|
291
|
+
|
|
292
|
+
4. Entry added to Locked-In Decisions:
|
|
293
|
+
| Storage | Redis | Better for distributed counters |
|
|
294
|
+
|
|
295
|
+
5. Discussion header changes:
|
|
296
|
+
### Resolved: Storage choice (2026-01-18)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
This creates an audit trail while keeping decisions accessible in the table.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# XML Conversion Reference
|
|
2
|
+
|
|
3
|
+
How `/plan implement` converts semantic markdown to XML for AI efficiency.
|
|
4
|
+
|
|
5
|
+
## Why XML?
|
|
6
|
+
|
|
7
|
+
XML provides:
|
|
8
|
+
- **Clear boundaries** - AI can parse task start/end unambiguously
|
|
9
|
+
- **Structured extraction** - Files, verify commands, done criteria are explicit
|
|
10
|
+
- **Reduced ambiguity** - No guessing where one section ends and another begins
|
|
11
|
+
|
|
12
|
+
Use XML conversion for:
|
|
13
|
+
- Complex plans with 5+ tasks
|
|
14
|
+
- Plans with detailed context sections
|
|
15
|
+
- Multi-file implementations where precision matters
|
|
16
|
+
|
|
17
|
+
Skip XML conversion for:
|
|
18
|
+
- Simple 2-3 task plans
|
|
19
|
+
- Plans where you want to iterate interactively
|
|
20
|
+
|
|
21
|
+
## Mapping
|
|
22
|
+
|
|
23
|
+
| Markdown | XML |
|
|
24
|
+
|----------|-----|
|
|
25
|
+
| `### Task N: {name}` | `<task name="{name}">` |
|
|
26
|
+
| `**Files:** {paths}` | `<files>{paths}</files>` |
|
|
27
|
+
| `**Context:**` section | `<context>...</context>` |
|
|
28
|
+
| `**Verify:** {cmd}` | `<verify>{cmd}</verify>` |
|
|
29
|
+
| `**Done:** {criteria}` | `<done>{criteria}</done>` |
|
|
30
|
+
|
|
31
|
+
## Example Conversion
|
|
32
|
+
|
|
33
|
+
### Markdown Input
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
### Task 1: Create rate limit middleware
|
|
37
|
+
|
|
38
|
+
**Files:** `src/middleware/rateLimit.ts`, `src/middleware/rateLimit.test.ts`
|
|
39
|
+
|
|
40
|
+
**Context:**
|
|
41
|
+
Follow pattern from `src/middleware/auth.ts`. Use Redis client from `src/lib/redis.ts`.
|
|
42
|
+
Token bucket with 100 tokens, refill 1/second. Return 429 with `Retry-After` header.
|
|
43
|
+
|
|
44
|
+
**Verify:** `bun test src/middleware/rateLimit.test.ts`
|
|
45
|
+
|
|
46
|
+
**Done:** Middleware exports `rateLimit()` function, tests pass including 429 case
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Task 2: Add middleware to API routes
|
|
51
|
+
|
|
52
|
+
**Files:** `src/routes/api.ts`
|
|
53
|
+
|
|
54
|
+
**Context:**
|
|
55
|
+
Import rateLimit from middleware. Apply to all /api/* routes.
|
|
56
|
+
Add before auth middleware in chain.
|
|
57
|
+
|
|
58
|
+
**Verify:** `curl -I localhost:3000/api/health` (check for rate limit headers)
|
|
59
|
+
|
|
60
|
+
**Done:** Rate limit headers present on API responses
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### XML Output
|
|
64
|
+
|
|
65
|
+
```xml
|
|
66
|
+
<plan>
|
|
67
|
+
<task name="Create rate limit middleware">
|
|
68
|
+
<files>src/middleware/rateLimit.ts, src/middleware/rateLimit.test.ts</files>
|
|
69
|
+
<context>
|
|
70
|
+
Follow pattern from `src/middleware/auth.ts`. Use Redis client from `src/lib/redis.ts`.
|
|
71
|
+
Token bucket with 100 tokens, refill 1/second. Return 429 with `Retry-After` header.
|
|
72
|
+
</context>
|
|
73
|
+
<verify>bun test src/middleware/rateLimit.test.ts</verify>
|
|
74
|
+
<done>Middleware exports `rateLimit()` function, tests pass including 429 case</done>
|
|
75
|
+
</task>
|
|
76
|
+
|
|
77
|
+
<task name="Add middleware to API routes">
|
|
78
|
+
<files>src/routes/api.ts</files>
|
|
79
|
+
<context>
|
|
80
|
+
Import rateLimit from middleware. Apply to all /api/* routes.
|
|
81
|
+
Add before auth middleware in chain.
|
|
82
|
+
</context>
|
|
83
|
+
<verify>curl -I localhost:3000/api/health</verify>
|
|
84
|
+
<done>Rate limit headers present on API responses</done>
|
|
85
|
+
</task>
|
|
86
|
+
</plan>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Conversion Algorithm
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
1. Find all ### Task headers
|
|
93
|
+
2. For each task:
|
|
94
|
+
a. Extract name from header (after "Task N: ")
|
|
95
|
+
b. Find **Files:** line, extract paths (strip backticks)
|
|
96
|
+
c. Find **Context:** section, capture until next ** or ---
|
|
97
|
+
d. Find **Verify:** line, extract command (strip backticks)
|
|
98
|
+
e. Find **Done:** line, extract criteria
|
|
99
|
+
3. Wrap in <plan> root element
|
|
100
|
+
4. Output XML
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## When to Offer Conversion
|
|
104
|
+
|
|
105
|
+
During `/plan implement`, check task count:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
if (taskCount >= 5) {
|
|
109
|
+
// Offer XML conversion
|
|
110
|
+
"This plan has {n} tasks. Convert to XML for cleaner execution?"
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For smaller plans, skip the prompt and use markdown directly.
|
|
115
|
+
|
|
116
|
+
## Preserving the Original
|
|
117
|
+
|
|
118
|
+
XML conversion is for execution only. The original markdown plan stays unchanged in the brain - it's the source of truth for humans.
|
|
119
|
+
|
|
120
|
+
The XML is:
|
|
121
|
+
- Generated on-the-fly during `/plan implement`
|
|
122
|
+
- Not persisted anywhere
|
|
123
|
+
- Used only for the current implementation session
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-project",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Manage project context files for persistent AI memory across sessions. Load, update, or create project context before working on multi-session features.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: project
|
|
2
2
|
description: "Manage project context files for persistent AI memory across sessions. Load, update, or create project context before working on multi-session features."
|
|
3
|
-
version: 0.3.
|
|
3
|
+
version: 0.3.3
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -17,7 +17,8 @@ dependencies: []
|
|
|
17
17
|
config_schema:
|
|
18
18
|
projects_dir:
|
|
19
19
|
type: string
|
|
20
|
-
description: Path to projects directory (
|
|
20
|
+
description: Path to projects directory (required - no default)
|
|
21
|
+
required: true
|
|
21
22
|
preset:
|
|
22
23
|
type: select
|
|
23
24
|
description: Output format for templates
|
|
@@ -26,20 +26,18 @@ Chat history disappears. Projects persist.
|
|
|
26
26
|
|
|
27
27
|
## Configuration
|
|
28
28
|
|
|
29
|
-
**IMPORTANT:**
|
|
29
|
+
**IMPORTANT:** Run `droid config project` first to get the merged configuration.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
| Setting | Default | Description |
|
|
32
|
+
| -------------- | ------------ | -------------------------------------------------- |
|
|
33
|
+
| `projects_dir` | **required** | Where projects are stored (must be configured) |
|
|
34
|
+
| `preset` | `markdown` | Output format: `markdown` or `obsidian` |
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Default `projects_dir` by AI tool (only if overrides.yaml is missing or lacks `projects_dir`):
|
|
40
|
-
|
|
41
|
-
- **claude-code**: `~/.claude/projects`
|
|
42
|
-
- **opencode**: `~/.config/opencode/projects`
|
|
36
|
+
If `projects_dir` is not configured, inform the user they need to set it up:
|
|
37
|
+
```bash
|
|
38
|
+
mkdir -p ~/.droid/skills/project
|
|
39
|
+
echo "projects_dir: /path/to/projects" >> ~/.droid/skills/project/overrides.yaml
|
|
40
|
+
```
|
|
43
41
|
|
|
44
42
|
## Commands
|
|
45
43
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
## Procedure
|
|
6
6
|
|
|
7
7
|
1. **Read config first**
|
|
8
|
-
-
|
|
9
|
-
- Use `projects_dir` if configured,
|
|
8
|
+
- Run `droid config project` and parse the JSON output
|
|
9
|
+
- Use `projects_dir` (required - if not configured, inform user to set it up)
|
|
10
10
|
- Use `preset` if configured (markdown or obsidian)
|
|
11
11
|
|
|
12
12
|
2. **Get project name**
|
|
@@ -42,7 +42,7 @@ User: /project create billing refactor
|
|
|
42
42
|
|
|
43
43
|
Claude: Creating new project...
|
|
44
44
|
|
|
45
|
-
Created:
|
|
45
|
+
Created: {projects_dir}/billing-refactor/
|
|
46
46
|
├── PROJECT.md
|
|
47
47
|
└── CHANGELOG.md
|
|
48
48
|
|
|
@@ -77,7 +77,7 @@ Bridge shared organizational knowledge (codex) to personal working memory (proje
|
|
|
77
77
|
- If `{name} --from codex:{codex-name}` → use custom project name
|
|
78
78
|
|
|
79
79
|
2. **Load codex entry**
|
|
80
|
-
-
|
|
80
|
+
- Run `droid config codex` and get `codex_repo` from the JSON output
|
|
81
81
|
- Sync: `git -C {codex_repo} pull --rebase --quiet`
|
|
82
82
|
- Locate `{codex_repo}/projects/{name}/`
|
|
83
83
|
- If not found → error with suggestions from available projects
|
|
@@ -111,7 +111,7 @@ Bridge shared organizational knowledge (codex) to personal working memory (proje
|
|
|
111
111
|
```
|
|
112
112
|
Created project "Transaction Templates" seeded from codex.
|
|
113
113
|
|
|
114
|
-
📁
|
|
114
|
+
📁 {projects_dir}/transaction-templates/
|
|
115
115
|
├── PROJECT.md (seeded with codex context)
|
|
116
116
|
└── CHANGELOG.md
|
|
117
117
|
|