@orderful/droid 0.23.0 → 0.24.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.
- package/CHANGELOG.md +19 -0
- package/dist/tools/codex/TOOL.yaml +1 -1
- package/dist/tools/codex/agents/codex-document-processor.md +8 -4
- package/dist/tools/codex/commands/codex.md +18 -10
- package/dist/tools/codex/skills/droid-codex/SKILL.md +73 -16
- package/dist/tools/codex/skills/droid-codex/references/loading.md +49 -13
- package/package.json +1 -1
- package/src/tools/codex/TOOL.yaml +1 -1
- package/src/tools/codex/agents/codex-document-processor.md +8 -4
- package/src/tools/codex/commands/codex.md +18 -10
- package/src/tools/codex/skills/droid-codex/SKILL.md +73 -16
- package/src/tools/codex/skills/droid-codex/references/loading.md +49 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#118](https://github.com/Orderful/droid/pull/118) [`9a9b27c`](https://github.com/Orderful/droid/commit/9a9b27c439d7fdbfb246faa6121495d0249b007c) Thanks [@frytyler](https://github.com/frytyler)! - Add domains and proposals categories to codex
|
|
8
|
+
- Add `domains/` category for business domain knowledge (the "what" and "why")
|
|
9
|
+
- Add `proposals/` category for ideas and future direction (not yet committed)
|
|
10
|
+
- Unify creation commands under `/codex new`:
|
|
11
|
+
- `/codex new domain {name}`
|
|
12
|
+
- `/codex new proposal {name}`
|
|
13
|
+
- `/codex new topic {name}` (replaces `/codex add topic`)
|
|
14
|
+
- `/codex new pattern {name}`
|
|
15
|
+
- Add list commands: `/codex domains`, `/codex proposals`
|
|
16
|
+
- Update document processor agent to support domain and proposal types
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#121](https://github.com/Orderful/droid/pull/121) [`8895c54`](https://github.com/Orderful/droid/commit/8895c547aea2070e7e97749028baa6100e2c85c0) Thanks [@frytyler](https://github.com/frytyler)! - Update codex skill to use index.yaml for fast entry lookups instead of searching through all categories
|
|
21
|
+
|
|
3
22
|
## 0.23.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: codex
|
|
2
|
-
description: "Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or
|
|
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
3
|
version: 0.1.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ You are a document processor for the Orderful codex. Your job is to transform so
|
|
|
14
14
|
|
|
15
15
|
You will receive:
|
|
16
16
|
1. **File path** - The source document to process
|
|
17
|
-
2. **Document type** - One of: `prd`, `tech-design`, `topic`, `pattern`, `artifact`
|
|
17
|
+
2. **Document type** - One of: `prd`, `tech-design`, `topic`, `pattern`, `domain`, `proposal`, `artifact`
|
|
18
18
|
3. **Project/entry name** - Where this should be stored in the codex
|
|
19
19
|
4. **Codex repo path** - The local path to orderful-codex repository
|
|
20
20
|
5. **Artifact filename** (optional, for artifacts) - Name for the artifact file
|
|
@@ -23,7 +23,7 @@ You will receive:
|
|
|
23
23
|
|
|
24
24
|
Before processing, validate all inputs:
|
|
25
25
|
|
|
26
|
-
1. **Document type** - Must be one of: `prd`, `tech-design`, `topic`, `pattern`, `artifact`. Reject anything else.
|
|
26
|
+
1. **Document type** - Must be one of: `prd`, `tech-design`, `topic`, `pattern`, `domain`, `proposal`, `artifact`. Reject anything else.
|
|
27
27
|
2. **File path** - Must exist and be readable. Use Read tool to verify.
|
|
28
28
|
3. **Project/entry name** - Must be safe for filesystem paths:
|
|
29
29
|
- Only allow: alphanumeric, dashes, underscores
|
|
@@ -47,11 +47,11 @@ From the content, identify:
|
|
|
47
47
|
- **Codebase paths** (if tech-design) - Any code paths mentioned
|
|
48
48
|
- **Source** - Default based on type:
|
|
49
49
|
- PRD/tech-design: `confluence`
|
|
50
|
-
- Topic/pattern: `exploration`
|
|
50
|
+
- Topic/pattern/domain/proposal: `exploration`
|
|
51
51
|
- Artifact: infer from content (`interview`, `transcript`, `notes`, `meeting`, `research`, `spike`, `analysis`)
|
|
52
52
|
- **Status** - Default based on type:
|
|
53
53
|
- PRD/tech-design: `draft` (new imports start as drafts)
|
|
54
|
-
- Topic/pattern/artifact: `active`
|
|
54
|
+
- Topic/pattern/domain/proposal/artifact: `active`
|
|
55
55
|
|
|
56
56
|
### 3. Read and Apply Frontmatter Template
|
|
57
57
|
|
|
@@ -63,6 +63,8 @@ From the content, identify:
|
|
|
63
63
|
| `tech-design` | `{codex_repo}/templates/TECH-DESIGN.md` |
|
|
64
64
|
| `topic` | `{codex_repo}/templates/TOPIC.md` |
|
|
65
65
|
| `pattern` | `{codex_repo}/templates/PATTERN.md` |
|
|
66
|
+
| `domain` | `{codex_repo}/templates/DOMAIN.md` |
|
|
67
|
+
| `proposal` | `{codex_repo}/templates/PROPOSAL.md` |
|
|
66
68
|
| `artifact` | `{codex_repo}/templates/ARTIFACT.md` |
|
|
67
69
|
|
|
68
70
|
1. Read the appropriate template file
|
|
@@ -95,6 +97,8 @@ Write the processed markdown to the correct location:
|
|
|
95
97
|
| `tech-design` | `{codex_repo}/projects/{name}/TECH-DESIGN.md` |
|
|
96
98
|
| `topic` | `{codex_repo}/topics/{name}.md` |
|
|
97
99
|
| `pattern` | `{codex_repo}/patterns/{name}.md` |
|
|
100
|
+
| `domain` | `{codex_repo}/domains/{name}.md` |
|
|
101
|
+
| `proposal` | `{codex_repo}/proposals/{name}.md` |
|
|
98
102
|
| `artifact` | `{codex_repo}/projects/{name}/artifacts/{filename}.md` |
|
|
99
103
|
|
|
100
104
|
For artifacts, derive `{filename}` from the artifact filename input or the source file's name (slugified).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics
|
|
3
|
-
argument-hint: "[projects | patterns | topics | {name} | search {query} | new {name} | decision {text}
|
|
2
|
+
description: Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics
|
|
3
|
+
argument-hint: "[projects | domains | proposals | patterns | topics | {name} | search {query} | new {type} {name} | decision {text}]"
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -24,16 +24,23 @@ Before first use, verify:
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
/codex # Show categories (
|
|
27
|
+
/codex # Show categories (5 total)
|
|
28
28
|
/codex projects # List projects
|
|
29
|
+
/codex domains # List domains
|
|
30
|
+
/codex proposals # List proposals
|
|
29
31
|
/codex patterns # List patterns
|
|
30
32
|
/codex topics # List topics
|
|
31
33
|
/codex {name} # Load entry (searches all categories)
|
|
32
34
|
/codex search {query} # Search across everything
|
|
33
|
-
/codex new {name} # Scaffold new project
|
|
35
|
+
/codex new {name} # Scaffold new project (shorthand)
|
|
36
|
+
/codex new project {name} # Scaffold new project from templates
|
|
37
|
+
/codex new domain {name} # Scaffold new domain entry
|
|
38
|
+
/codex new proposal {name} # Scaffold new proposal entry
|
|
39
|
+
/codex new pattern {name} # Scaffold new pattern entry
|
|
40
|
+
/codex new topic {name} # Scaffold new topic entry
|
|
34
41
|
/codex decision {text} # Append to active project's DECISIONS.md
|
|
35
|
-
/codex snapshot {file} {name}
|
|
36
|
-
/codex
|
|
42
|
+
/codex snapshot {type} {file} {name} # Import PDF/markdown to codex
|
|
43
|
+
/codex artifact {file} {project} # Add supporting artifact to project
|
|
37
44
|
```
|
|
38
45
|
|
|
39
46
|
## Configuration
|
|
@@ -48,8 +55,7 @@ Before first use, verify:
|
|
|
48
55
|
Refer to the codex skill for:
|
|
49
56
|
- **Loading**: How to search, handle matches, check freshness, auto-generate CONTEXT.md
|
|
50
57
|
- **Decisions**: How to append to active project's DECISIONS.md
|
|
51
|
-
- **
|
|
52
|
-
- **Creating**: How to scaffold new projects from templates
|
|
58
|
+
- **Creating**: How to scaffold new entries (projects, domains, proposals, patterns, topics)
|
|
53
59
|
|
|
54
60
|
The skill's `references/` folder contains detailed procedures for each workflow.
|
|
55
61
|
|
|
@@ -65,6 +71,8 @@ The skill's `references/` folder contains detailed procedures for each workflow.
|
|
|
65
71
|
# Capture a decision during implementation
|
|
66
72
|
/codex decision "Using UUIDv7 for IDs because it's sortable and includes timestamp"
|
|
67
73
|
|
|
68
|
-
#
|
|
69
|
-
/codex
|
|
74
|
+
# Create new entries
|
|
75
|
+
/codex new domain partnerships
|
|
76
|
+
/codex new proposal caching-layer
|
|
77
|
+
/codex new topic organization-hierarchy
|
|
70
78
|
```
|
|
@@ -102,11 +102,13 @@ fi
|
|
|
102
102
|
|
|
103
103
|
## Categories
|
|
104
104
|
|
|
105
|
-
The codex has
|
|
105
|
+
The codex has five categories:
|
|
106
106
|
|
|
107
107
|
| Category | Path | Purpose |
|
|
108
108
|
|----------|------|---------|
|
|
109
109
|
| `projects` | `{codex_repo}/projects/` | Feature/project context (PRD, tech design, decisions) |
|
|
110
|
+
| `domains` | `{codex_repo}/domains/` | Business domain knowledge - the "what" and "why" |
|
|
111
|
+
| `proposals` | `{codex_repo}/proposals/` | Ideas and future direction - not yet committed |
|
|
110
112
|
| `patterns` | `{codex_repo}/patterns/` | Cross-cutting technical patterns |
|
|
111
113
|
| `topics` | `{codex_repo}/topics/` | Explored codebase areas with freshness tracking |
|
|
112
114
|
|
|
@@ -116,15 +118,21 @@ The codex has three categories:
|
|
|
116
118
|
|---------|--------|
|
|
117
119
|
| `/codex` | Show categories overview |
|
|
118
120
|
| `/codex projects` | List all projects |
|
|
121
|
+
| `/codex domains` | List all domains |
|
|
122
|
+
| `/codex proposals` | List all proposals |
|
|
119
123
|
| `/codex patterns` | List all patterns |
|
|
120
124
|
| `/codex topics` | List all topics |
|
|
121
125
|
| `/codex {name}` | Load entry (searches all categories) |
|
|
122
126
|
| `/codex search {query}` | Search across everything |
|
|
123
|
-
| `/codex new {name}` | Scaffold new project
|
|
127
|
+
| `/codex new {name}` | Scaffold new project (shorthand) |
|
|
128
|
+
| `/codex new project {name}` | Scaffold new project from templates |
|
|
129
|
+
| `/codex new domain {name}` | Scaffold new domain entry |
|
|
130
|
+
| `/codex new proposal {name}` | Scaffold new proposal entry |
|
|
131
|
+
| `/codex new pattern {name}` | Scaffold new pattern entry |
|
|
132
|
+
| `/codex new topic {name}` | Scaffold new topic entry |
|
|
124
133
|
| `/codex decision {text}` | Append to active project's DECISIONS.md |
|
|
125
134
|
| `/codex snapshot {type} {file} {name}` | Import PDF/markdown to codex (uses agent) |
|
|
126
135
|
| `/codex artifact {file} {project}` | Add supporting artifact to project (uses agent) |
|
|
127
|
-
| `/codex add topic {name}` | Add explored topic with freshness metadata |
|
|
128
136
|
|
|
129
137
|
## Loading an Entry
|
|
130
138
|
|
|
@@ -132,12 +140,15 @@ The codex has three categories:
|
|
|
132
140
|
|
|
133
141
|
**Procedure:**
|
|
134
142
|
|
|
135
|
-
1.
|
|
136
|
-
2.
|
|
137
|
-
3. If
|
|
138
|
-
4.
|
|
139
|
-
5.
|
|
140
|
-
6.
|
|
143
|
+
1. **Read `{codex_repo}/index.yaml`** - this contains all entry names and aliases for fast lookup
|
|
144
|
+
2. Match `{name}` against index keys and aliases (case-insensitive, partial match)
|
|
145
|
+
3. If multiple matches → show list, let user pick
|
|
146
|
+
4. If single match → load directly from the matched path
|
|
147
|
+
5. For projects with multiple files → show file list, let user pick which to load
|
|
148
|
+
6. Check freshness (see below)
|
|
149
|
+
7. Output loaded content
|
|
150
|
+
|
|
151
|
+
**Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
|
|
141
152
|
|
|
142
153
|
**If no CONTEXT.md exists for a project:**
|
|
143
154
|
- Synthesise unified context from PRD.md + TECH-DESIGN.md + DECISIONS.md
|
|
@@ -153,7 +164,7 @@ All codex files have frontmatter:
|
|
|
153
164
|
```yaml
|
|
154
165
|
---
|
|
155
166
|
title: Feature Name
|
|
156
|
-
type: prd | tech-design | context | decisions | pattern | topic
|
|
167
|
+
type: prd | tech-design | context | decisions | pattern | topic | domain | proposal
|
|
157
168
|
status: draft | active | complete | archived
|
|
158
169
|
created: 2026-01-07
|
|
159
170
|
updated: 2026-01-07
|
|
@@ -164,14 +175,12 @@ codebase_paths:
|
|
|
164
175
|
---
|
|
165
176
|
```
|
|
166
177
|
|
|
167
|
-
**Status values:**
|
|
178
|
+
**Status values (unified across all categories):**
|
|
168
179
|
- `draft` - Initial capture, not ready for consumption
|
|
169
180
|
- `active` - Current, being used for implementation
|
|
170
181
|
- `complete` - Project shipped, kept for reference
|
|
171
182
|
- `archived` - No longer relevant, kept for history
|
|
172
183
|
|
|
173
|
-
Note: Topics use `draft | active | archived` (no "complete"). Patterns use `active | archived` (no draft phase).
|
|
174
|
-
|
|
175
184
|
**When loading any file:**
|
|
176
185
|
|
|
177
186
|
1. Parse frontmatter for `updated` date
|
|
@@ -217,7 +226,7 @@ Full procedure: `references/decisions.md`
|
|
|
217
226
|
|
|
218
227
|
## Adding Topics
|
|
219
228
|
|
|
220
|
-
**Trigger:** `/codex
|
|
229
|
+
**Trigger:** `/codex new topic {name}` or user wants to save exploration
|
|
221
230
|
|
|
222
231
|
**Procedure:**
|
|
223
232
|
|
|
@@ -297,9 +306,22 @@ Artifacts are supplementary documents that support a project but aren't core doc
|
|
|
297
306
|
|
|
298
307
|
Artifacts get lighter frontmatter with `type: artifact` and source like `interview`, `transcript`, `notes`, `meeting`, `research`, `spike`, or `analysis`.
|
|
299
308
|
|
|
300
|
-
## Creating New
|
|
309
|
+
## Creating New Entries
|
|
310
|
+
|
|
311
|
+
The `/codex new` command scaffolds new entries from templates:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
/codex new {name} # Shorthand for new project
|
|
315
|
+
/codex new project {name} # Explicit project creation
|
|
316
|
+
/codex new domain {name} # New domain entry
|
|
317
|
+
/codex new proposal {name} # New proposal entry
|
|
318
|
+
/codex new pattern {name} # New pattern entry
|
|
319
|
+
/codex new topic {name} # New topic entry
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Projects
|
|
301
323
|
|
|
302
|
-
**Trigger:** `/codex new {name}` or
|
|
324
|
+
**Trigger:** `/codex new {name}` or `/codex new project {name}`
|
|
303
325
|
|
|
304
326
|
**Procedure:**
|
|
305
327
|
|
|
@@ -311,6 +333,41 @@ Artifacts get lighter frontmatter with `type: artifact` and source like `intervi
|
|
|
311
333
|
3. Fill in frontmatter with today's date
|
|
312
334
|
4. Create branch, commit, and open PR via `gh pr create`
|
|
313
335
|
|
|
336
|
+
### Domains
|
|
337
|
+
|
|
338
|
+
**Trigger:** `/codex new domain {name}`
|
|
339
|
+
|
|
340
|
+
**Procedure:**
|
|
341
|
+
|
|
342
|
+
1. Create `{codex_repo}/domains/{name}.md`
|
|
343
|
+
2. Use template from `{codex_repo}/templates/DOMAIN.md`
|
|
344
|
+
3. Fill in frontmatter with today's date
|
|
345
|
+
4. Guide user through sections: Overview, Key Concepts, Entities, Lifecycle/States, Integration Points, Related
|
|
346
|
+
5. Create branch, commit, and open PR via `gh pr create`
|
|
347
|
+
|
|
348
|
+
### Proposals
|
|
349
|
+
|
|
350
|
+
**Trigger:** `/codex new proposal {name}`
|
|
351
|
+
|
|
352
|
+
**Procedure:**
|
|
353
|
+
|
|
354
|
+
1. Create `{codex_repo}/proposals/{name}.md`
|
|
355
|
+
2. Use template from `{codex_repo}/templates/PROPOSAL.md`
|
|
356
|
+
3. Fill in frontmatter with today's date
|
|
357
|
+
4. Guide user through sections: Summary, Problem, Proposed Solution, Alternatives Considered, Open Questions, Next Steps
|
|
358
|
+
5. Create branch, commit, and open PR via `gh pr create`
|
|
359
|
+
|
|
360
|
+
### Patterns and Topics
|
|
361
|
+
|
|
362
|
+
**Trigger:** `/codex new pattern {name}` or `/codex new topic {name}`
|
|
363
|
+
|
|
364
|
+
**Procedure:**
|
|
365
|
+
|
|
366
|
+
1. Create file at `{codex_repo}/patterns/{name}.md` or `{codex_repo}/topics/{name}.md`
|
|
367
|
+
2. Use template from `{codex_repo}/templates/PATTERN.md` or `{codex_repo}/templates/TOPIC.md`
|
|
368
|
+
3. Fill in frontmatter with today's date
|
|
369
|
+
4. Create branch, commit, and open PR via `gh pr create`
|
|
370
|
+
|
|
314
371
|
Full procedure: `references/creating.md`
|
|
315
372
|
|
|
316
373
|
## Integration with /project
|
|
@@ -4,23 +4,44 @@ Detailed procedure for loading entries from the codex.
|
|
|
4
4
|
|
|
5
5
|
## Search and Match
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. **Search all categories** for `{name}`:
|
|
9
|
-
```bash
|
|
10
|
-
# Search projects
|
|
11
|
-
ls {codex_repo}/projects/ | grep -i {name}
|
|
12
|
-
|
|
13
|
-
# Search patterns
|
|
14
|
-
ls {codex_repo}/patterns/ | grep -i {name}
|
|
7
|
+
**IMPORTANT:** Use the index file for fast lookups. This avoids expensive file-by-file searching.
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
1. **Get codex repo path** from `~/.droid/skills/codex/overrides.yaml`
|
|
10
|
+
2. **Read the index file** at `{codex_repo}/index.yaml`:
|
|
11
|
+
```yaml
|
|
12
|
+
# index.yaml structure
|
|
13
|
+
projects:
|
|
14
|
+
partnership-automation:
|
|
15
|
+
title: "Partnership Automation & Sample Transaction Engine"
|
|
16
|
+
aliases: ["transaction-templates", "template-transactions"]
|
|
17
|
+
patterns:
|
|
18
|
+
jsdoc-config-directives:
|
|
19
|
+
title: "JSDoc @config Directives"
|
|
20
|
+
aliases: ["config-directives", "comment-directives"]
|
|
21
|
+
topics:
|
|
22
|
+
handlebars-template-security:
|
|
23
|
+
title: "Handlebars Template Security"
|
|
24
|
+
aliases: []
|
|
25
|
+
domains: {}
|
|
26
|
+
proposals: {}
|
|
18
27
|
```
|
|
19
|
-
3. **
|
|
20
|
-
-
|
|
21
|
-
-
|
|
28
|
+
3. **Match `{name}` against the index:**
|
|
29
|
+
- Check each entry's key (folder/file name)
|
|
30
|
+
- Check each entry's `aliases` array
|
|
31
|
+
- Match is case-insensitive and supports partial matching
|
|
32
|
+
- Example: "template transactions" matches `partnership-automation` via alias "template-transactions"
|
|
33
|
+
4. **Handle matches:**
|
|
34
|
+
- No matches → "No codex entry found for '{name}'. Did you mean one of these?" + suggest entries from index
|
|
35
|
+
- Single match → proceed to load from the matched category/path
|
|
22
36
|
- Multiple matches → show list with category, let user pick
|
|
23
37
|
|
|
38
|
+
**Fallback:** If `index.yaml` doesn't exist, fall back to directory scanning:
|
|
39
|
+
```bash
|
|
40
|
+
ls {codex_repo}/projects/ | grep -i {name}
|
|
41
|
+
ls {codex_repo}/domains/ | grep -i {name}
|
|
42
|
+
# ... etc
|
|
43
|
+
```
|
|
44
|
+
|
|
24
45
|
## Loading a Project
|
|
25
46
|
|
|
26
47
|
Projects are folders with multiple files:
|
|
@@ -50,6 +71,21 @@ projects/transaction-templates/
|
|
|
50
71
|
4. Set project as **active** for scoped operations
|
|
51
72
|
5. Check freshness (see below)
|
|
52
73
|
|
|
74
|
+
## Loading a Domain or Proposal
|
|
75
|
+
|
|
76
|
+
Domains and proposals are single files:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
domains/partnerships.md
|
|
80
|
+
proposals/caching-layer.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Procedure:**
|
|
84
|
+
|
|
85
|
+
1. Read the file
|
|
86
|
+
2. Check freshness
|
|
87
|
+
3. Output content
|
|
88
|
+
|
|
53
89
|
## Loading a Pattern or Topic
|
|
54
90
|
|
|
55
91
|
Patterns and topics are single files:
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: codex
|
|
2
|
-
description: "Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or
|
|
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
3
|
version: 0.1.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ You are a document processor for the Orderful codex. Your job is to transform so
|
|
|
14
14
|
|
|
15
15
|
You will receive:
|
|
16
16
|
1. **File path** - The source document to process
|
|
17
|
-
2. **Document type** - One of: `prd`, `tech-design`, `topic`, `pattern`, `artifact`
|
|
17
|
+
2. **Document type** - One of: `prd`, `tech-design`, `topic`, `pattern`, `domain`, `proposal`, `artifact`
|
|
18
18
|
3. **Project/entry name** - Where this should be stored in the codex
|
|
19
19
|
4. **Codex repo path** - The local path to orderful-codex repository
|
|
20
20
|
5. **Artifact filename** (optional, for artifacts) - Name for the artifact file
|
|
@@ -23,7 +23,7 @@ You will receive:
|
|
|
23
23
|
|
|
24
24
|
Before processing, validate all inputs:
|
|
25
25
|
|
|
26
|
-
1. **Document type** - Must be one of: `prd`, `tech-design`, `topic`, `pattern`, `artifact`. Reject anything else.
|
|
26
|
+
1. **Document type** - Must be one of: `prd`, `tech-design`, `topic`, `pattern`, `domain`, `proposal`, `artifact`. Reject anything else.
|
|
27
27
|
2. **File path** - Must exist and be readable. Use Read tool to verify.
|
|
28
28
|
3. **Project/entry name** - Must be safe for filesystem paths:
|
|
29
29
|
- Only allow: alphanumeric, dashes, underscores
|
|
@@ -47,11 +47,11 @@ From the content, identify:
|
|
|
47
47
|
- **Codebase paths** (if tech-design) - Any code paths mentioned
|
|
48
48
|
- **Source** - Default based on type:
|
|
49
49
|
- PRD/tech-design: `confluence`
|
|
50
|
-
- Topic/pattern: `exploration`
|
|
50
|
+
- Topic/pattern/domain/proposal: `exploration`
|
|
51
51
|
- Artifact: infer from content (`interview`, `transcript`, `notes`, `meeting`, `research`, `spike`, `analysis`)
|
|
52
52
|
- **Status** - Default based on type:
|
|
53
53
|
- PRD/tech-design: `draft` (new imports start as drafts)
|
|
54
|
-
- Topic/pattern/artifact: `active`
|
|
54
|
+
- Topic/pattern/domain/proposal/artifact: `active`
|
|
55
55
|
|
|
56
56
|
### 3. Read and Apply Frontmatter Template
|
|
57
57
|
|
|
@@ -63,6 +63,8 @@ From the content, identify:
|
|
|
63
63
|
| `tech-design` | `{codex_repo}/templates/TECH-DESIGN.md` |
|
|
64
64
|
| `topic` | `{codex_repo}/templates/TOPIC.md` |
|
|
65
65
|
| `pattern` | `{codex_repo}/templates/PATTERN.md` |
|
|
66
|
+
| `domain` | `{codex_repo}/templates/DOMAIN.md` |
|
|
67
|
+
| `proposal` | `{codex_repo}/templates/PROPOSAL.md` |
|
|
66
68
|
| `artifact` | `{codex_repo}/templates/ARTIFACT.md` |
|
|
67
69
|
|
|
68
70
|
1. Read the appropriate template file
|
|
@@ -95,6 +97,8 @@ Write the processed markdown to the correct location:
|
|
|
95
97
|
| `tech-design` | `{codex_repo}/projects/{name}/TECH-DESIGN.md` |
|
|
96
98
|
| `topic` | `{codex_repo}/topics/{name}.md` |
|
|
97
99
|
| `pattern` | `{codex_repo}/patterns/{name}.md` |
|
|
100
|
+
| `domain` | `{codex_repo}/domains/{name}.md` |
|
|
101
|
+
| `proposal` | `{codex_repo}/proposals/{name}.md` |
|
|
98
102
|
| `artifact` | `{codex_repo}/projects/{name}/artifacts/{filename}.md` |
|
|
99
103
|
|
|
100
104
|
For artifacts, derive `{filename}` from the artifact filename input or the source file's name (slugified).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics
|
|
3
|
-
argument-hint: "[projects | patterns | topics | {name} | search {query} | new {name} | decision {text}
|
|
2
|
+
description: Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics
|
|
3
|
+
argument-hint: "[projects | domains | proposals | patterns | topics | {name} | search {query} | new {type} {name} | decision {text}]"
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -24,16 +24,23 @@ Before first use, verify:
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
/codex # Show categories (
|
|
27
|
+
/codex # Show categories (5 total)
|
|
28
28
|
/codex projects # List projects
|
|
29
|
+
/codex domains # List domains
|
|
30
|
+
/codex proposals # List proposals
|
|
29
31
|
/codex patterns # List patterns
|
|
30
32
|
/codex topics # List topics
|
|
31
33
|
/codex {name} # Load entry (searches all categories)
|
|
32
34
|
/codex search {query} # Search across everything
|
|
33
|
-
/codex new {name} # Scaffold new project
|
|
35
|
+
/codex new {name} # Scaffold new project (shorthand)
|
|
36
|
+
/codex new project {name} # Scaffold new project from templates
|
|
37
|
+
/codex new domain {name} # Scaffold new domain entry
|
|
38
|
+
/codex new proposal {name} # Scaffold new proposal entry
|
|
39
|
+
/codex new pattern {name} # Scaffold new pattern entry
|
|
40
|
+
/codex new topic {name} # Scaffold new topic entry
|
|
34
41
|
/codex decision {text} # Append to active project's DECISIONS.md
|
|
35
|
-
/codex snapshot {file} {name}
|
|
36
|
-
/codex
|
|
42
|
+
/codex snapshot {type} {file} {name} # Import PDF/markdown to codex
|
|
43
|
+
/codex artifact {file} {project} # Add supporting artifact to project
|
|
37
44
|
```
|
|
38
45
|
|
|
39
46
|
## Configuration
|
|
@@ -48,8 +55,7 @@ Before first use, verify:
|
|
|
48
55
|
Refer to the codex skill for:
|
|
49
56
|
- **Loading**: How to search, handle matches, check freshness, auto-generate CONTEXT.md
|
|
50
57
|
- **Decisions**: How to append to active project's DECISIONS.md
|
|
51
|
-
- **
|
|
52
|
-
- **Creating**: How to scaffold new projects from templates
|
|
58
|
+
- **Creating**: How to scaffold new entries (projects, domains, proposals, patterns, topics)
|
|
53
59
|
|
|
54
60
|
The skill's `references/` folder contains detailed procedures for each workflow.
|
|
55
61
|
|
|
@@ -65,6 +71,8 @@ The skill's `references/` folder contains detailed procedures for each workflow.
|
|
|
65
71
|
# Capture a decision during implementation
|
|
66
72
|
/codex decision "Using UUIDv7 for IDs because it's sortable and includes timestamp"
|
|
67
73
|
|
|
68
|
-
#
|
|
69
|
-
/codex
|
|
74
|
+
# Create new entries
|
|
75
|
+
/codex new domain partnerships
|
|
76
|
+
/codex new proposal caching-layer
|
|
77
|
+
/codex new topic organization-hierarchy
|
|
70
78
|
```
|
|
@@ -102,11 +102,13 @@ fi
|
|
|
102
102
|
|
|
103
103
|
## Categories
|
|
104
104
|
|
|
105
|
-
The codex has
|
|
105
|
+
The codex has five categories:
|
|
106
106
|
|
|
107
107
|
| Category | Path | Purpose |
|
|
108
108
|
|----------|------|---------|
|
|
109
109
|
| `projects` | `{codex_repo}/projects/` | Feature/project context (PRD, tech design, decisions) |
|
|
110
|
+
| `domains` | `{codex_repo}/domains/` | Business domain knowledge - the "what" and "why" |
|
|
111
|
+
| `proposals` | `{codex_repo}/proposals/` | Ideas and future direction - not yet committed |
|
|
110
112
|
| `patterns` | `{codex_repo}/patterns/` | Cross-cutting technical patterns |
|
|
111
113
|
| `topics` | `{codex_repo}/topics/` | Explored codebase areas with freshness tracking |
|
|
112
114
|
|
|
@@ -116,15 +118,21 @@ The codex has three categories:
|
|
|
116
118
|
|---------|--------|
|
|
117
119
|
| `/codex` | Show categories overview |
|
|
118
120
|
| `/codex projects` | List all projects |
|
|
121
|
+
| `/codex domains` | List all domains |
|
|
122
|
+
| `/codex proposals` | List all proposals |
|
|
119
123
|
| `/codex patterns` | List all patterns |
|
|
120
124
|
| `/codex topics` | List all topics |
|
|
121
125
|
| `/codex {name}` | Load entry (searches all categories) |
|
|
122
126
|
| `/codex search {query}` | Search across everything |
|
|
123
|
-
| `/codex new {name}` | Scaffold new project
|
|
127
|
+
| `/codex new {name}` | Scaffold new project (shorthand) |
|
|
128
|
+
| `/codex new project {name}` | Scaffold new project from templates |
|
|
129
|
+
| `/codex new domain {name}` | Scaffold new domain entry |
|
|
130
|
+
| `/codex new proposal {name}` | Scaffold new proposal entry |
|
|
131
|
+
| `/codex new pattern {name}` | Scaffold new pattern entry |
|
|
132
|
+
| `/codex new topic {name}` | Scaffold new topic entry |
|
|
124
133
|
| `/codex decision {text}` | Append to active project's DECISIONS.md |
|
|
125
134
|
| `/codex snapshot {type} {file} {name}` | Import PDF/markdown to codex (uses agent) |
|
|
126
135
|
| `/codex artifact {file} {project}` | Add supporting artifact to project (uses agent) |
|
|
127
|
-
| `/codex add topic {name}` | Add explored topic with freshness metadata |
|
|
128
136
|
|
|
129
137
|
## Loading an Entry
|
|
130
138
|
|
|
@@ -132,12 +140,15 @@ The codex has three categories:
|
|
|
132
140
|
|
|
133
141
|
**Procedure:**
|
|
134
142
|
|
|
135
|
-
1.
|
|
136
|
-
2.
|
|
137
|
-
3. If
|
|
138
|
-
4.
|
|
139
|
-
5.
|
|
140
|
-
6.
|
|
143
|
+
1. **Read `{codex_repo}/index.yaml`** - this contains all entry names and aliases for fast lookup
|
|
144
|
+
2. Match `{name}` against index keys and aliases (case-insensitive, partial match)
|
|
145
|
+
3. If multiple matches → show list, let user pick
|
|
146
|
+
4. If single match → load directly from the matched path
|
|
147
|
+
5. For projects with multiple files → show file list, let user pick which to load
|
|
148
|
+
6. Check freshness (see below)
|
|
149
|
+
7. Output loaded content
|
|
150
|
+
|
|
151
|
+
**Why index?** Avoids expensive file-by-file searching. One read to find any entry by name or alias.
|
|
141
152
|
|
|
142
153
|
**If no CONTEXT.md exists for a project:**
|
|
143
154
|
- Synthesise unified context from PRD.md + TECH-DESIGN.md + DECISIONS.md
|
|
@@ -153,7 +164,7 @@ All codex files have frontmatter:
|
|
|
153
164
|
```yaml
|
|
154
165
|
---
|
|
155
166
|
title: Feature Name
|
|
156
|
-
type: prd | tech-design | context | decisions | pattern | topic
|
|
167
|
+
type: prd | tech-design | context | decisions | pattern | topic | domain | proposal
|
|
157
168
|
status: draft | active | complete | archived
|
|
158
169
|
created: 2026-01-07
|
|
159
170
|
updated: 2026-01-07
|
|
@@ -164,14 +175,12 @@ codebase_paths:
|
|
|
164
175
|
---
|
|
165
176
|
```
|
|
166
177
|
|
|
167
|
-
**Status values:**
|
|
178
|
+
**Status values (unified across all categories):**
|
|
168
179
|
- `draft` - Initial capture, not ready for consumption
|
|
169
180
|
- `active` - Current, being used for implementation
|
|
170
181
|
- `complete` - Project shipped, kept for reference
|
|
171
182
|
- `archived` - No longer relevant, kept for history
|
|
172
183
|
|
|
173
|
-
Note: Topics use `draft | active | archived` (no "complete"). Patterns use `active | archived` (no draft phase).
|
|
174
|
-
|
|
175
184
|
**When loading any file:**
|
|
176
185
|
|
|
177
186
|
1. Parse frontmatter for `updated` date
|
|
@@ -217,7 +226,7 @@ Full procedure: `references/decisions.md`
|
|
|
217
226
|
|
|
218
227
|
## Adding Topics
|
|
219
228
|
|
|
220
|
-
**Trigger:** `/codex
|
|
229
|
+
**Trigger:** `/codex new topic {name}` or user wants to save exploration
|
|
221
230
|
|
|
222
231
|
**Procedure:**
|
|
223
232
|
|
|
@@ -297,9 +306,22 @@ Artifacts are supplementary documents that support a project but aren't core doc
|
|
|
297
306
|
|
|
298
307
|
Artifacts get lighter frontmatter with `type: artifact` and source like `interview`, `transcript`, `notes`, `meeting`, `research`, `spike`, or `analysis`.
|
|
299
308
|
|
|
300
|
-
## Creating New
|
|
309
|
+
## Creating New Entries
|
|
310
|
+
|
|
311
|
+
The `/codex new` command scaffolds new entries from templates:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
/codex new {name} # Shorthand for new project
|
|
315
|
+
/codex new project {name} # Explicit project creation
|
|
316
|
+
/codex new domain {name} # New domain entry
|
|
317
|
+
/codex new proposal {name} # New proposal entry
|
|
318
|
+
/codex new pattern {name} # New pattern entry
|
|
319
|
+
/codex new topic {name} # New topic entry
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Projects
|
|
301
323
|
|
|
302
|
-
**Trigger:** `/codex new {name}` or
|
|
324
|
+
**Trigger:** `/codex new {name}` or `/codex new project {name}`
|
|
303
325
|
|
|
304
326
|
**Procedure:**
|
|
305
327
|
|
|
@@ -311,6 +333,41 @@ Artifacts get lighter frontmatter with `type: artifact` and source like `intervi
|
|
|
311
333
|
3. Fill in frontmatter with today's date
|
|
312
334
|
4. Create branch, commit, and open PR via `gh pr create`
|
|
313
335
|
|
|
336
|
+
### Domains
|
|
337
|
+
|
|
338
|
+
**Trigger:** `/codex new domain {name}`
|
|
339
|
+
|
|
340
|
+
**Procedure:**
|
|
341
|
+
|
|
342
|
+
1. Create `{codex_repo}/domains/{name}.md`
|
|
343
|
+
2. Use template from `{codex_repo}/templates/DOMAIN.md`
|
|
344
|
+
3. Fill in frontmatter with today's date
|
|
345
|
+
4. Guide user through sections: Overview, Key Concepts, Entities, Lifecycle/States, Integration Points, Related
|
|
346
|
+
5. Create branch, commit, and open PR via `gh pr create`
|
|
347
|
+
|
|
348
|
+
### Proposals
|
|
349
|
+
|
|
350
|
+
**Trigger:** `/codex new proposal {name}`
|
|
351
|
+
|
|
352
|
+
**Procedure:**
|
|
353
|
+
|
|
354
|
+
1. Create `{codex_repo}/proposals/{name}.md`
|
|
355
|
+
2. Use template from `{codex_repo}/templates/PROPOSAL.md`
|
|
356
|
+
3. Fill in frontmatter with today's date
|
|
357
|
+
4. Guide user through sections: Summary, Problem, Proposed Solution, Alternatives Considered, Open Questions, Next Steps
|
|
358
|
+
5. Create branch, commit, and open PR via `gh pr create`
|
|
359
|
+
|
|
360
|
+
### Patterns and Topics
|
|
361
|
+
|
|
362
|
+
**Trigger:** `/codex new pattern {name}` or `/codex new topic {name}`
|
|
363
|
+
|
|
364
|
+
**Procedure:**
|
|
365
|
+
|
|
366
|
+
1. Create file at `{codex_repo}/patterns/{name}.md` or `{codex_repo}/topics/{name}.md`
|
|
367
|
+
2. Use template from `{codex_repo}/templates/PATTERN.md` or `{codex_repo}/templates/TOPIC.md`
|
|
368
|
+
3. Fill in frontmatter with today's date
|
|
369
|
+
4. Create branch, commit, and open PR via `gh pr create`
|
|
370
|
+
|
|
314
371
|
Full procedure: `references/creating.md`
|
|
315
372
|
|
|
316
373
|
## Integration with /project
|
|
@@ -4,23 +4,44 @@ Detailed procedure for loading entries from the codex.
|
|
|
4
4
|
|
|
5
5
|
## Search and Match
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. **Search all categories** for `{name}`:
|
|
9
|
-
```bash
|
|
10
|
-
# Search projects
|
|
11
|
-
ls {codex_repo}/projects/ | grep -i {name}
|
|
12
|
-
|
|
13
|
-
# Search patterns
|
|
14
|
-
ls {codex_repo}/patterns/ | grep -i {name}
|
|
7
|
+
**IMPORTANT:** Use the index file for fast lookups. This avoids expensive file-by-file searching.
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
1. **Get codex repo path** from `~/.droid/skills/codex/overrides.yaml`
|
|
10
|
+
2. **Read the index file** at `{codex_repo}/index.yaml`:
|
|
11
|
+
```yaml
|
|
12
|
+
# index.yaml structure
|
|
13
|
+
projects:
|
|
14
|
+
partnership-automation:
|
|
15
|
+
title: "Partnership Automation & Sample Transaction Engine"
|
|
16
|
+
aliases: ["transaction-templates", "template-transactions"]
|
|
17
|
+
patterns:
|
|
18
|
+
jsdoc-config-directives:
|
|
19
|
+
title: "JSDoc @config Directives"
|
|
20
|
+
aliases: ["config-directives", "comment-directives"]
|
|
21
|
+
topics:
|
|
22
|
+
handlebars-template-security:
|
|
23
|
+
title: "Handlebars Template Security"
|
|
24
|
+
aliases: []
|
|
25
|
+
domains: {}
|
|
26
|
+
proposals: {}
|
|
18
27
|
```
|
|
19
|
-
3. **
|
|
20
|
-
-
|
|
21
|
-
-
|
|
28
|
+
3. **Match `{name}` against the index:**
|
|
29
|
+
- Check each entry's key (folder/file name)
|
|
30
|
+
- Check each entry's `aliases` array
|
|
31
|
+
- Match is case-insensitive and supports partial matching
|
|
32
|
+
- Example: "template transactions" matches `partnership-automation` via alias "template-transactions"
|
|
33
|
+
4. **Handle matches:**
|
|
34
|
+
- No matches → "No codex entry found for '{name}'. Did you mean one of these?" + suggest entries from index
|
|
35
|
+
- Single match → proceed to load from the matched category/path
|
|
22
36
|
- Multiple matches → show list with category, let user pick
|
|
23
37
|
|
|
38
|
+
**Fallback:** If `index.yaml` doesn't exist, fall back to directory scanning:
|
|
39
|
+
```bash
|
|
40
|
+
ls {codex_repo}/projects/ | grep -i {name}
|
|
41
|
+
ls {codex_repo}/domains/ | grep -i {name}
|
|
42
|
+
# ... etc
|
|
43
|
+
```
|
|
44
|
+
|
|
24
45
|
## Loading a Project
|
|
25
46
|
|
|
26
47
|
Projects are folders with multiple files:
|
|
@@ -50,6 +71,21 @@ projects/transaction-templates/
|
|
|
50
71
|
4. Set project as **active** for scoped operations
|
|
51
72
|
5. Check freshness (see below)
|
|
52
73
|
|
|
74
|
+
## Loading a Domain or Proposal
|
|
75
|
+
|
|
76
|
+
Domains and proposals are single files:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
domains/partnerships.md
|
|
80
|
+
proposals/caching-layer.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Procedure:**
|
|
84
|
+
|
|
85
|
+
1. Read the file
|
|
86
|
+
2. Check freshness
|
|
87
|
+
3. Output content
|
|
88
|
+
|
|
53
89
|
## Loading a Pattern or Topic
|
|
54
90
|
|
|
55
91
|
Patterns and topics are single files:
|