@orderful/droid 0.19.0 → 0.20.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 +13 -0
- package/dist/tools/codex/TOOL.yaml +32 -0
- package/dist/tools/codex/commands/codex.md +70 -0
- package/dist/tools/codex/skills/droid-codex/SKILL.md +266 -0
- package/dist/tools/codex/skills/droid-codex/references/creating.md +150 -0
- package/dist/tools/codex/skills/droid-codex/references/decisions.md +128 -0
- package/dist/tools/codex/skills/droid-codex/references/loading.md +163 -0
- package/dist/tools/codex/skills/droid-codex/references/topics.md +213 -0
- package/dist/tools/droid/skills/droid/SKILL.md +8 -0
- package/package.json +1 -1
- package/src/tools/codex/TOOL.yaml +32 -0
- package/src/tools/codex/commands/codex.md +70 -0
- package/src/tools/codex/skills/droid-codex/SKILL.md +266 -0
- package/src/tools/codex/skills/droid-codex/references/creating.md +150 -0
- package/src/tools/codex/skills/droid-codex/references/decisions.md +128 -0
- package/src/tools/codex/skills/droid-codex/references/loading.md +163 -0
- package/src/tools/codex/skills/droid-codex/references/topics.md +213 -0
- package/src/tools/droid/skills/droid/SKILL.md +8 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Adding Topics
|
|
2
|
+
|
|
3
|
+
Detailed procedure for capturing explored codebase areas as institutional knowledge.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- After a deep exploration of a codebase area
|
|
8
|
+
- User asks to save/capture exploration
|
|
9
|
+
- `/codex add topic {name}` command
|
|
10
|
+
- Converting ad-hoc research into persistent knowledge
|
|
11
|
+
|
|
12
|
+
## The Value
|
|
13
|
+
|
|
14
|
+
Topics turn ephemeral exploration into institutional memory:
|
|
15
|
+
- Next time someone needs to understand this area, context is ready
|
|
16
|
+
- AI can load it instantly instead of re-exploring
|
|
17
|
+
- Freshness tracking ensures it stays current
|
|
18
|
+
|
|
19
|
+
## Procedure
|
|
20
|
+
|
|
21
|
+
### 1. Determine Topic Name
|
|
22
|
+
|
|
23
|
+
From user input or infer from exploration:
|
|
24
|
+
- Use kebab-case: `organization-hierarchy`, `webhook-processing`
|
|
25
|
+
- Be specific but concise
|
|
26
|
+
|
|
27
|
+
### 2. Gather Content
|
|
28
|
+
|
|
29
|
+
From the current conversation/exploration, extract:
|
|
30
|
+
- **Overview:** What is this area of the codebase?
|
|
31
|
+
- **Key Concepts:** Important terms, patterns, relationships
|
|
32
|
+
- **Architecture:** How components fit together
|
|
33
|
+
- **Key Files:** Important files and their purposes
|
|
34
|
+
- **Common Patterns:** Recurring patterns in this area
|
|
35
|
+
- **Gotchas:** Things to watch out for
|
|
36
|
+
|
|
37
|
+
### 3. Determine Metadata
|
|
38
|
+
|
|
39
|
+
Ask user or infer:
|
|
40
|
+
- **Confidence:** How thorough was the exploration?
|
|
41
|
+
- `high` - Comprehensive, covered most aspects
|
|
42
|
+
- `medium` - Good coverage but may have gaps
|
|
43
|
+
- `low` - Quick exploration, definitely incomplete
|
|
44
|
+
- **Codebase paths:** Which directories/files were explored?
|
|
45
|
+
|
|
46
|
+
### 4. Read Template
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cat {codex_repo}/templates/TOPIC.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 5. Create Topic File
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Create the file
|
|
56
|
+
touch {codex_repo}/topics/{name}.md
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Fill in content:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
title: {Topic Title}
|
|
64
|
+
type: topic
|
|
65
|
+
created: {today}
|
|
66
|
+
updated: {today}
|
|
67
|
+
confidence: {high|medium|low}
|
|
68
|
+
source: exploration
|
|
69
|
+
codebase_paths:
|
|
70
|
+
- {path/explored/1}
|
|
71
|
+
- {path/explored/2}
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# {Topic Title}
|
|
75
|
+
|
|
76
|
+
## Overview
|
|
77
|
+
|
|
78
|
+
{Brief description of this area of the codebase}
|
|
79
|
+
|
|
80
|
+
## Key Concepts
|
|
81
|
+
|
|
82
|
+
### {Concept 1}
|
|
83
|
+
|
|
84
|
+
{Explanation}
|
|
85
|
+
|
|
86
|
+
### {Concept 2}
|
|
87
|
+
|
|
88
|
+
{Explanation}
|
|
89
|
+
|
|
90
|
+
## Architecture
|
|
91
|
+
|
|
92
|
+
{How components fit together}
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
{Diagram or structure if helpful}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Key Files
|
|
99
|
+
|
|
100
|
+
| File | Purpose |
|
|
101
|
+
|------|---------|
|
|
102
|
+
| `{path/to/file}` | {What it does} |
|
|
103
|
+
|
|
104
|
+
## Common Patterns
|
|
105
|
+
|
|
106
|
+
{Patterns used in this area}
|
|
107
|
+
|
|
108
|
+
## Gotchas
|
|
109
|
+
|
|
110
|
+
- {Thing to watch out for}
|
|
111
|
+
- {Another gotcha}
|
|
112
|
+
|
|
113
|
+
## Related
|
|
114
|
+
|
|
115
|
+
- {Links to related topics, PRDs, or external docs}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 6. Create Branch and PR
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cd {codex_repo}
|
|
122
|
+
git checkout -b codex/topic-{name}
|
|
123
|
+
git add topics/{name}.md
|
|
124
|
+
git commit -F - <<EOF
|
|
125
|
+
topic: add {name}
|
|
126
|
+
EOF
|
|
127
|
+
git push -u origin codex/topic-{name}
|
|
128
|
+
gh pr create --title "Topic: {name}" --body "New topic from codebase exploration"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 7. Confirm to User
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
✅ Added topic: {name}
|
|
135
|
+
|
|
136
|
+
📚 {codex_repo}/topics/{name}.md
|
|
137
|
+
Confidence: {confidence}
|
|
138
|
+
Paths covered: {codebase_paths}
|
|
139
|
+
|
|
140
|
+
PR: {pr_url}
|
|
141
|
+
(Auto-merges for new files)
|
|
142
|
+
|
|
143
|
+
Next time someone asks about {topic}, I can load this context instantly.
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Example
|
|
147
|
+
|
|
148
|
+
**User:** (after exploring organization hierarchy) `/codex add topic organization-hierarchy`
|
|
149
|
+
|
|
150
|
+
**Result:**
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
---
|
|
154
|
+
title: Organization Hierarchy
|
|
155
|
+
type: topic
|
|
156
|
+
created: 2026-01-07
|
|
157
|
+
updated: 2026-01-07
|
|
158
|
+
confidence: high
|
|
159
|
+
source: exploration
|
|
160
|
+
codebase_paths:
|
|
161
|
+
- apps/platform-api/src/modules/organization/
|
|
162
|
+
- libs/shared/src/types/organization.ts
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
# Organization Hierarchy
|
|
166
|
+
|
|
167
|
+
## Overview
|
|
168
|
+
|
|
169
|
+
Orderful's multi-tenant organization structure with parent-child relationships, enabling enterprise customers to manage multiple business units under a single account.
|
|
170
|
+
|
|
171
|
+
## Key Concepts
|
|
172
|
+
|
|
173
|
+
### Organization
|
|
174
|
+
|
|
175
|
+
The top-level entity. Has settings, billing, users.
|
|
176
|
+
|
|
177
|
+
### Child Organizations
|
|
178
|
+
|
|
179
|
+
Organizations can have children, creating a hierarchy. Children inherit some settings from parents.
|
|
180
|
+
|
|
181
|
+
### Organization Context
|
|
182
|
+
|
|
183
|
+
Request-scoped context determining which org's data to access.
|
|
184
|
+
|
|
185
|
+
## Architecture
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Organization (parent)
|
|
189
|
+
├── Organization (child 1)
|
|
190
|
+
│ └── Organization (grandchild)
|
|
191
|
+
└── Organization (child 2)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Key Files
|
|
195
|
+
|
|
196
|
+
| File | Purpose |
|
|
197
|
+
|------|---------|
|
|
198
|
+
| `organization.entity.ts` | TypeORM entity with parent/child relations |
|
|
199
|
+
| `organization.service.ts` | Business logic for org operations |
|
|
200
|
+
| `organization-context.middleware.ts` | Sets org context from request |
|
|
201
|
+
|
|
202
|
+
## Common Patterns
|
|
203
|
+
|
|
204
|
+
- Always check org context before data access
|
|
205
|
+
- Use `organizationId` foreign key on tenant-scoped entities
|
|
206
|
+
- Hierarchy queries use recursive CTEs
|
|
207
|
+
|
|
208
|
+
## Gotchas
|
|
209
|
+
|
|
210
|
+
- Child orgs don't automatically inherit all parent settings
|
|
211
|
+
- Deleting a parent doesn't cascade to children (soft delete)
|
|
212
|
+
- API keys are scoped to single org, not hierarchy
|
|
213
|
+
```
|
|
@@ -147,6 +147,7 @@ for f in $(npm root -g)/@orderful/droid/dist/tools/*/TOOL.yaml; do echo "---"; c
|
|
|
147
147
|
| **brain** | Collaborative scratchpad for planning and research |
|
|
148
148
|
| **coach** | Learning-mode AI - scaffolds don't implement, questions don't fix |
|
|
149
149
|
| **code-review** | Code review with specialized agents and confidence scoring |
|
|
150
|
+
| **codex** | Shared organizational knowledge - PRDs, tech designs, patterns, topics |
|
|
150
151
|
| **comments** | Inline conversations using @droid/@user markers |
|
|
151
152
|
| **project** | Project context for persistent AI memory across sessions |
|
|
152
153
|
|
|
@@ -170,6 +171,12 @@ Comprehensive code review using specialized agents. Reviews PRs, staged changes,
|
|
|
170
171
|
**Commands:** `/code-review`
|
|
171
172
|
**Agents:** edi-standards-reviewer, error-handling-reviewer, test-coverage-analyzer, type-reviewer
|
|
172
173
|
|
|
174
|
+
#### codex
|
|
175
|
+
Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics. Load project context, search across the codex, capture decisions during implementation.
|
|
176
|
+
|
|
177
|
+
**Commands:** `/codex`, `/codex projects`, `/codex search`, `/codex decision`, `/codex add topic`
|
|
178
|
+
**Requires:** gh CLI, orderful-codex repo cloned locally
|
|
179
|
+
|
|
173
180
|
#### comments
|
|
174
181
|
Enable inline conversations using @droid/@user markers. Tag @droid to ask the AI, AI responds with @{your-name}. Ideal for code review notes and async collaboration.
|
|
175
182
|
|
|
@@ -215,6 +222,7 @@ Run `droid` to see all available tools or install new ones.
|
|
|
215
222
|
| brain | Planning and research scratchpad with `/brain` commands |
|
|
216
223
|
| coach | Learning-mode AI that asks questions instead of giving answers |
|
|
217
224
|
| code-review | PR review with specialized agents |
|
|
225
|
+
| codex | Shared knowledge - PRDs, tech designs, patterns, topics |
|
|
218
226
|
| comments | Inline @droid/@user conversations in any file |
|
|
219
227
|
| project | Persistent project context across sessions |
|
|
220
228
|
|