@orderful/droid 0.25.0 → 0.25.2
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/CHANGELOG.md +18 -0
- package/dist/tools/codex/TOOL.yaml +1 -1
- package/dist/tools/codex/skills/droid-codex/SKILL.md +20 -10
- package/dist/tools/codex/skills/droid-codex/references/loading.md +71 -17
- package/package.json +1 -1
- package/src/tools/codex/TOOL.yaml +1 -1
- package/src/tools/codex/skills/droid-codex/SKILL.md +20 -10
- package/src/tools/codex/skills/droid-codex/references/loading.md +71 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.25.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#132](https://github.com/Orderful/droid/pull/132) [`b4ad140`](https://github.com/Orderful/droid/commit/b4ad1406308f38db58d6a0706c3b0252eed60c2a) Thanks [@frytyler](https://github.com/frytyler)! - codex: add progressive disclosure pattern for project loading
|
|
8
|
+
|
|
9
|
+
CONTEXT.md is now the first layer loaded automatically for projects. Full PRD/TECH-DESIGN/DECISIONS files are only loaded when deeper detail is explicitly needed. This avoids loading 30KB+ of docs for simple context questions.
|
|
10
|
+
|
|
11
|
+
## 0.25.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#129](https://github.com/Orderful/droid/pull/129) [`d3264c4`](https://github.com/Orderful/droid/commit/d3264c493e1c243e812ab742103351888092ac79) Thanks [@frytyler](https://github.com/frytyler)! - fix(codex): add git preamble to Loading procedure
|
|
16
|
+
|
|
17
|
+
The "Loading an Entry" procedure wasn't running the git preamble before
|
|
18
|
+
reading files, causing potential stale data issues. Now explicitly calls
|
|
19
|
+
`git-preamble` as step 1 before reading the index.
|
|
20
|
+
|
|
3
21
|
## 0.25.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: codex
|
|
2
2
|
description: "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or creating new entries."
|
|
3
|
-
version: 0.1.
|
|
3
|
+
version: 0.1.4
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -179,20 +179,30 @@ The codex has five categories:
|
|
|
179
179
|
|
|
180
180
|
**Procedure:**
|
|
181
181
|
|
|
182
|
-
1. **
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
1. **Run preamble first:**
|
|
183
|
+
```bash
|
|
184
|
+
droid config codex | droid exec droid-codex git-preamble --config -
|
|
185
|
+
```
|
|
186
|
+
2. **Read `{codex_repo}/index.yaml`** - this contains all entry names and aliases for fast lookup
|
|
187
|
+
3. Match `{name}` against index keys and aliases (case-insensitive, partial match)
|
|
188
|
+
4. If multiple matches → show list, let user pick
|
|
189
|
+
5. If single match → load directly from the matched path
|
|
190
|
+
6. **For projects → use progressive disclosure:**
|
|
191
|
+
- If CONTEXT.md exists → load it automatically (layer 1)
|
|
192
|
+
- Offer deeper files only if user needs more detail
|
|
193
|
+
- If no CONTEXT.md → synthesise one first (see below)
|
|
194
|
+
7. Check freshness (see below)
|
|
195
|
+
8. Output loaded content with "need more detail?" options
|
|
189
196
|
|
|
190
197
|
**Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
|
|
191
198
|
|
|
199
|
+
**Progressive disclosure:** CONTEXT.md is the first layer - a synthesised summary (~2KB) that handles most queries. Only load full PRD/TECH-DESIGN/DECISIONS files when deeper detail is explicitly needed. This avoids loading 30KB+ of docs for simple context questions.
|
|
200
|
+
|
|
192
201
|
**If no CONTEXT.md exists for a project:**
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
202
|
+
- Spawn background agent to synthesise (non-blocking)
|
|
203
|
+
- Immediately ask user which file to load - don't make them wait
|
|
204
|
+
- Background agent: reads PRD.md + TECH-DESIGN.md + DECISIONS.md, synthesises, creates PR
|
|
205
|
+
- Notify user when complete: "CONTEXT.md ready - PR #{number}"
|
|
196
206
|
|
|
197
207
|
Full procedure: `references/loading.md`
|
|
198
208
|
|
|
@@ -51,25 +51,47 @@ projects/transaction-templates/
|
|
|
51
51
|
├── PRD.md
|
|
52
52
|
├── TECH-DESIGN.md
|
|
53
53
|
├── DESIGN.md # Optional
|
|
54
|
-
├── CONTEXT.md #
|
|
54
|
+
├── CONTEXT.md # Auto-generated summary (progressive disclosure layer 1)
|
|
55
55
|
└── DECISIONS.md
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### Progressive Disclosure
|
|
59
|
+
|
|
60
|
+
CONTEXT.md is the **first layer** - a synthesised summary that's enough for most queries. Only load full documents when deeper detail is needed.
|
|
61
|
+
|
|
62
|
+
| Layer | What | When to use |
|
|
63
|
+
|-------|------|-------------|
|
|
64
|
+
| 1 | CONTEXT.md (~2KB) | General questions, getting oriented, "what is this project?" |
|
|
65
|
+
| 2 | Specific file | Deep dives - "show me the full technical architecture" |
|
|
66
|
+
| 3 | All files | Comprehensive review, major updates, onboarding |
|
|
67
|
+
|
|
68
|
+
### Procedure
|
|
59
69
|
|
|
60
|
-
1. List files in project folder
|
|
61
|
-
2.
|
|
70
|
+
1. **List files** in project folder
|
|
71
|
+
2. **Check for CONTEXT.md:**
|
|
72
|
+
|
|
73
|
+
**If CONTEXT.md exists:**
|
|
62
74
|
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
📂 Loading transaction-templates
|
|
76
|
+
|
|
77
|
+
CONTEXT.md available (updated 2026-01-05, ~2KB)
|
|
78
|
+
→ Loading summary for general context...
|
|
79
|
+
|
|
80
|
+
[CONTEXT.md content]
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
---
|
|
83
|
+
Need more detail? Available files:
|
|
84
|
+
- PRD.md - Full requirements and goals
|
|
85
|
+
- TECH-DESIGN.md - Architecture and implementation
|
|
86
|
+
- DECISIONS.md - Decision log
|
|
69
87
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
Load CONTEXT.md automatically. Only load additional files if user asks.
|
|
89
|
+
|
|
90
|
+
**If no CONTEXT.md:**
|
|
91
|
+
→ Trigger auto-generation (see below)
|
|
92
|
+
|
|
93
|
+
3. **Set project as active** for scoped operations
|
|
94
|
+
4. **Check freshness** (see below)
|
|
73
95
|
|
|
74
96
|
## Loading a Domain or Proposal
|
|
75
97
|
|
|
@@ -103,11 +125,38 @@ topics/organization-hierarchy.md
|
|
|
103
125
|
|
|
104
126
|
## Auto-Generating CONTEXT.md
|
|
105
127
|
|
|
106
|
-
If loading a project and no CONTEXT.md exists
|
|
128
|
+
If loading a project and no CONTEXT.md exists, generate it **asynchronously** so the user isn't blocked.
|
|
129
|
+
|
|
130
|
+
**User sees:**
|
|
131
|
+
```
|
|
132
|
+
📂 Loading transaction-templates
|
|
133
|
+
|
|
134
|
+
No CONTEXT.md found - I'll generate one in the background.
|
|
135
|
+
Meanwhile, which file do you want to load?
|
|
107
136
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
Available files:
|
|
138
|
+
- PRD.md - Full requirements and goals
|
|
139
|
+
- TECH-DESIGN.md - Architecture and implementation
|
|
140
|
+
- DECISIONS.md - Decision log
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Procedure:**
|
|
144
|
+
|
|
145
|
+
1. **Spawn background agent** to synthesize CONTEXT.md (non-blocking):
|
|
146
|
+
```
|
|
147
|
+
Use Task tool with subagent_type: "general-purpose" and run_in_background: true
|
|
148
|
+
Prompt: "Generate CONTEXT.md for {project} from PRD.md, TECH-DESIGN.md, DECISIONS.md. Create branch, commit, open PR."
|
|
149
|
+
```
|
|
150
|
+
2. **Immediately ask user** which file to load (don't wait for synthesis)
|
|
151
|
+
3. **Load selected file** and continue working
|
|
152
|
+
4. **When background agent completes**, inform user: "CONTEXT.md ready - PR #{number}"
|
|
153
|
+
|
|
154
|
+
### Background Agent Task
|
|
155
|
+
|
|
156
|
+
The background agent should:
|
|
157
|
+
|
|
158
|
+
1. **Read all available files:** PRD.md, TECH-DESIGN.md, DECISIONS.md
|
|
159
|
+
2. **Generate unified summary:**
|
|
111
160
|
```markdown
|
|
112
161
|
---
|
|
113
162
|
title: {Project Name}
|
|
@@ -147,7 +196,12 @@ If loading a project and no CONTEXT.md exists:
|
|
|
147
196
|
git push -u origin auto/context-{project-name}
|
|
148
197
|
gh pr create --title "Auto-generated CONTEXT.md for {project}" --body "Synthesised from PRD, TECH-DESIGN, and DECISIONS."
|
|
149
198
|
```
|
|
150
|
-
5. **
|
|
199
|
+
5. **Return result** (background agent outputs to task output file):
|
|
200
|
+
```
|
|
201
|
+
✅ CONTEXT.md synthesised and PR #{number} created for {project}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The main conversation will be notified when the background task completes.
|
|
151
205
|
|
|
152
206
|
## Freshness Checking
|
|
153
207
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: codex
|
|
2
2
|
description: "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or creating new entries."
|
|
3
|
-
version: 0.1.
|
|
3
|
+
version: 0.1.4
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -179,20 +179,30 @@ The codex has five categories:
|
|
|
179
179
|
|
|
180
180
|
**Procedure:**
|
|
181
181
|
|
|
182
|
-
1. **
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
1. **Run preamble first:**
|
|
183
|
+
```bash
|
|
184
|
+
droid config codex | droid exec droid-codex git-preamble --config -
|
|
185
|
+
```
|
|
186
|
+
2. **Read `{codex_repo}/index.yaml`** - this contains all entry names and aliases for fast lookup
|
|
187
|
+
3. Match `{name}` against index keys and aliases (case-insensitive, partial match)
|
|
188
|
+
4. If multiple matches → show list, let user pick
|
|
189
|
+
5. If single match → load directly from the matched path
|
|
190
|
+
6. **For projects → use progressive disclosure:**
|
|
191
|
+
- If CONTEXT.md exists → load it automatically (layer 1)
|
|
192
|
+
- Offer deeper files only if user needs more detail
|
|
193
|
+
- If no CONTEXT.md → synthesise one first (see below)
|
|
194
|
+
7. Check freshness (see below)
|
|
195
|
+
8. Output loaded content with "need more detail?" options
|
|
189
196
|
|
|
190
197
|
**Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
|
|
191
198
|
|
|
199
|
+
**Progressive disclosure:** CONTEXT.md is the first layer - a synthesised summary (~2KB) that handles most queries. Only load full PRD/TECH-DESIGN/DECISIONS files when deeper detail is explicitly needed. This avoids loading 30KB+ of docs for simple context questions.
|
|
200
|
+
|
|
192
201
|
**If no CONTEXT.md exists for a project:**
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
202
|
+
- Spawn background agent to synthesise (non-blocking)
|
|
203
|
+
- Immediately ask user which file to load - don't make them wait
|
|
204
|
+
- Background agent: reads PRD.md + TECH-DESIGN.md + DECISIONS.md, synthesises, creates PR
|
|
205
|
+
- Notify user when complete: "CONTEXT.md ready - PR #{number}"
|
|
196
206
|
|
|
197
207
|
Full procedure: `references/loading.md`
|
|
198
208
|
|
|
@@ -51,25 +51,47 @@ projects/transaction-templates/
|
|
|
51
51
|
├── PRD.md
|
|
52
52
|
├── TECH-DESIGN.md
|
|
53
53
|
├── DESIGN.md # Optional
|
|
54
|
-
├── CONTEXT.md #
|
|
54
|
+
├── CONTEXT.md # Auto-generated summary (progressive disclosure layer 1)
|
|
55
55
|
└── DECISIONS.md
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### Progressive Disclosure
|
|
59
|
+
|
|
60
|
+
CONTEXT.md is the **first layer** - a synthesised summary that's enough for most queries. Only load full documents when deeper detail is needed.
|
|
61
|
+
|
|
62
|
+
| Layer | What | When to use |
|
|
63
|
+
|-------|------|-------------|
|
|
64
|
+
| 1 | CONTEXT.md (~2KB) | General questions, getting oriented, "what is this project?" |
|
|
65
|
+
| 2 | Specific file | Deep dives - "show me the full technical architecture" |
|
|
66
|
+
| 3 | All files | Comprehensive review, major updates, onboarding |
|
|
67
|
+
|
|
68
|
+
### Procedure
|
|
59
69
|
|
|
60
|
-
1. List files in project folder
|
|
61
|
-
2.
|
|
70
|
+
1. **List files** in project folder
|
|
71
|
+
2. **Check for CONTEXT.md:**
|
|
72
|
+
|
|
73
|
+
**If CONTEXT.md exists:**
|
|
62
74
|
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
📂 Loading transaction-templates
|
|
76
|
+
|
|
77
|
+
CONTEXT.md available (updated 2026-01-05, ~2KB)
|
|
78
|
+
→ Loading summary for general context...
|
|
79
|
+
|
|
80
|
+
[CONTEXT.md content]
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
---
|
|
83
|
+
Need more detail? Available files:
|
|
84
|
+
- PRD.md - Full requirements and goals
|
|
85
|
+
- TECH-DESIGN.md - Architecture and implementation
|
|
86
|
+
- DECISIONS.md - Decision log
|
|
69
87
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
Load CONTEXT.md automatically. Only load additional files if user asks.
|
|
89
|
+
|
|
90
|
+
**If no CONTEXT.md:**
|
|
91
|
+
→ Trigger auto-generation (see below)
|
|
92
|
+
|
|
93
|
+
3. **Set project as active** for scoped operations
|
|
94
|
+
4. **Check freshness** (see below)
|
|
73
95
|
|
|
74
96
|
## Loading a Domain or Proposal
|
|
75
97
|
|
|
@@ -103,11 +125,38 @@ topics/organization-hierarchy.md
|
|
|
103
125
|
|
|
104
126
|
## Auto-Generating CONTEXT.md
|
|
105
127
|
|
|
106
|
-
If loading a project and no CONTEXT.md exists
|
|
128
|
+
If loading a project and no CONTEXT.md exists, generate it **asynchronously** so the user isn't blocked.
|
|
129
|
+
|
|
130
|
+
**User sees:**
|
|
131
|
+
```
|
|
132
|
+
📂 Loading transaction-templates
|
|
133
|
+
|
|
134
|
+
No CONTEXT.md found - I'll generate one in the background.
|
|
135
|
+
Meanwhile, which file do you want to load?
|
|
107
136
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
Available files:
|
|
138
|
+
- PRD.md - Full requirements and goals
|
|
139
|
+
- TECH-DESIGN.md - Architecture and implementation
|
|
140
|
+
- DECISIONS.md - Decision log
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Procedure:**
|
|
144
|
+
|
|
145
|
+
1. **Spawn background agent** to synthesize CONTEXT.md (non-blocking):
|
|
146
|
+
```
|
|
147
|
+
Use Task tool with subagent_type: "general-purpose" and run_in_background: true
|
|
148
|
+
Prompt: "Generate CONTEXT.md for {project} from PRD.md, TECH-DESIGN.md, DECISIONS.md. Create branch, commit, open PR."
|
|
149
|
+
```
|
|
150
|
+
2. **Immediately ask user** which file to load (don't wait for synthesis)
|
|
151
|
+
3. **Load selected file** and continue working
|
|
152
|
+
4. **When background agent completes**, inform user: "CONTEXT.md ready - PR #{number}"
|
|
153
|
+
|
|
154
|
+
### Background Agent Task
|
|
155
|
+
|
|
156
|
+
The background agent should:
|
|
157
|
+
|
|
158
|
+
1. **Read all available files:** PRD.md, TECH-DESIGN.md, DECISIONS.md
|
|
159
|
+
2. **Generate unified summary:**
|
|
111
160
|
```markdown
|
|
112
161
|
---
|
|
113
162
|
title: {Project Name}
|
|
@@ -147,7 +196,12 @@ If loading a project and no CONTEXT.md exists:
|
|
|
147
196
|
git push -u origin auto/context-{project-name}
|
|
148
197
|
gh pr create --title "Auto-generated CONTEXT.md for {project}" --body "Synthesised from PRD, TECH-DESIGN, and DECISIONS."
|
|
149
198
|
```
|
|
150
|
-
5. **
|
|
199
|
+
5. **Return result** (background agent outputs to task output file):
|
|
200
|
+
```
|
|
201
|
+
✅ CONTEXT.md synthesised and PR #{number} created for {project}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The main conversation will be notified when the background task completes.
|
|
151
205
|
|
|
152
206
|
## Freshness Checking
|
|
153
207
|
|