@orderful/droid 0.25.1 → 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 CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 0.25.1
4
12
 
5
13
  ### Patch 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
3
+ version: 0.1.4
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -187,16 +187,22 @@ The codex has five categories:
187
187
  3. Match `{name}` against index keys and aliases (case-insensitive, partial match)
188
188
  4. If multiple matches → show list, let user pick
189
189
  5. If single match → load directly from the matched path
190
- 6. For projects with multiple files show file list, let user pick which to load
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)
191
194
  7. Check freshness (see below)
192
- 8. Output loaded content
195
+ 8. Output loaded content with "need more detail?" options
193
196
 
194
197
  **Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
195
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
+
196
201
  **If no CONTEXT.md exists for a project:**
197
- - Synthesise unified context from PRD.md + TECH-DESIGN.md + DECISIONS.md
198
- - Create branch, commit CONTEXT.md, open PR
199
- - Inform user: "I've created a CONTEXT.md summarising this project - PR #{number}"
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}"
200
206
 
201
207
  Full procedure: `references/loading.md`
202
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 # Optional, auto-generated
54
+ ├── CONTEXT.md # Auto-generated summary (progressive disclosure layer 1)
55
55
  └── DECISIONS.md
56
56
  ```
57
57
 
58
- **Procedure:**
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. Show file list to user:
70
+ 1. **List files** in project folder
71
+ 2. **Check for CONTEXT.md:**
72
+
73
+ **If CONTEXT.md exists:**
62
74
  ```
63
- Found transaction-templates with:
64
- - PRD.md (updated 2026-01-05)
65
- - TECH-DESIGN.md (updated 2026-01-03)
66
- - DECISIONS.md (updated 2026-01-07)
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
- Which files should I load? (or 'all' for everything)
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
- 3. Load selected file(s)
71
- 4. Set project as **active** for scoped operations
72
- 5. Check freshness (see below)
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
- 1. **Inform user:** "No CONTEXT.md found. I'll synthesise one from the available artifacts."
109
- 2. **Read all available files:** PRD.md, TECH-DESIGN.md, DECISIONS.md
110
- 3. **Generate unified summary:**
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. **Inform user:** "Created PR #{number} with auto-generated CONTEXT.md"
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
  {
2
2
  "name": "@orderful/droid",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "AI workflow toolkit for sharing skills, commands, and agents across the team",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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
3
+ version: 0.1.4
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -187,16 +187,22 @@ The codex has five categories:
187
187
  3. Match `{name}` against index keys and aliases (case-insensitive, partial match)
188
188
  4. If multiple matches → show list, let user pick
189
189
  5. If single match → load directly from the matched path
190
- 6. For projects with multiple files show file list, let user pick which to load
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)
191
194
  7. Check freshness (see below)
192
- 8. Output loaded content
195
+ 8. Output loaded content with "need more detail?" options
193
196
 
194
197
  **Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
195
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
+
196
201
  **If no CONTEXT.md exists for a project:**
197
- - Synthesise unified context from PRD.md + TECH-DESIGN.md + DECISIONS.md
198
- - Create branch, commit CONTEXT.md, open PR
199
- - Inform user: "I've created a CONTEXT.md summarising this project - PR #{number}"
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}"
200
206
 
201
207
  Full procedure: `references/loading.md`
202
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 # Optional, auto-generated
54
+ ├── CONTEXT.md # Auto-generated summary (progressive disclosure layer 1)
55
55
  └── DECISIONS.md
56
56
  ```
57
57
 
58
- **Procedure:**
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. Show file list to user:
70
+ 1. **List files** in project folder
71
+ 2. **Check for CONTEXT.md:**
72
+
73
+ **If CONTEXT.md exists:**
62
74
  ```
63
- Found transaction-templates with:
64
- - PRD.md (updated 2026-01-05)
65
- - TECH-DESIGN.md (updated 2026-01-03)
66
- - DECISIONS.md (updated 2026-01-07)
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
- Which files should I load? (or 'all' for everything)
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
- 3. Load selected file(s)
71
- 4. Set project as **active** for scoped operations
72
- 5. Check freshness (see below)
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
- 1. **Inform user:** "No CONTEXT.md found. I'll synthesise one from the available artifacts."
109
- 2. **Read all available files:** PRD.md, TECH-DESIGN.md, DECISIONS.md
110
- 3. **Generate unified summary:**
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. **Inform user:** "Created PR #{number} with auto-generated CONTEXT.md"
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