@orderful/droid 0.25.2 → 0.27.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.
Files changed (159) hide show
  1. package/.claude-plugin/marketplace.json +114 -0
  2. package/.github/workflows/ci.yml +20 -0
  3. package/AGENTS.md +75 -18
  4. package/CHANGELOG.md +73 -0
  5. package/README.md +30 -4
  6. package/dist/bin/droid.js +164 -75
  7. package/dist/index.js +68 -26
  8. package/dist/lib/migrations.d.ts +8 -0
  9. package/dist/lib/migrations.d.ts.map +1 -1
  10. package/dist/lib/skill-config.d.ts.map +1 -1
  11. package/dist/lib/skills.d.ts.map +1 -1
  12. package/dist/lib/tools.d.ts.map +1 -1
  13. package/dist/lib/types.d.ts +10 -2
  14. package/dist/lib/types.d.ts.map +1 -1
  15. package/dist/tools/README.md +1 -1
  16. package/dist/tools/brain/.claude-plugin/plugin.json +16 -0
  17. package/dist/tools/brain/TOOL.yaml +7 -5
  18. package/dist/tools/brain/commands/brain.md +17 -49
  19. package/dist/tools/brain/commands/scratchpad.md +13 -50
  20. package/{src/tools/brain/skills/droid-brain → dist/tools/brain/skills/brain}/SKILL.md +6 -6
  21. package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/SKILL.md +9 -9
  22. package/dist/tools/coach/.claude-plugin/plugin.json +16 -0
  23. package/dist/tools/coach/TOOL.yaml +4 -3
  24. package/dist/tools/coach/commands/coach.md +14 -54
  25. package/{src/tools/coach/skills/droid-coach → dist/tools/coach/skills/coach}/SKILL.md +5 -4
  26. package/dist/tools/code-review/.claude-plugin/plugin.json +16 -0
  27. package/dist/tools/code-review/TOOL.yaml +4 -3
  28. package/dist/tools/code-review/commands/code-review.md +18 -102
  29. package/dist/tools/code-review/skills/code-review/SKILL.md +154 -0
  30. package/dist/tools/codex/.claude-plugin/plugin.json +16 -0
  31. package/dist/tools/codex/TOOL.yaml +5 -4
  32. package/dist/tools/codex/commands/codex.md +18 -65
  33. package/dist/tools/codex/skills/{droid-codex → codex}/SKILL.md +64 -45
  34. package/{src/tools/codex/skills/droid-codex → dist/tools/codex/skills/codex}/references/loading.md +94 -55
  35. package/dist/tools/codex/skills/codex/scripts/git-finish-write.d.ts.map +1 -0
  36. package/dist/tools/codex/skills/codex/scripts/git-preamble.d.ts.map +1 -0
  37. package/dist/tools/codex/skills/codex/scripts/git-start-write.d.ts.map +1 -0
  38. package/dist/tools/comments/.claude-plugin/plugin.json +16 -0
  39. package/dist/tools/comments/TOOL.yaml +4 -3
  40. package/dist/tools/comments/commands/comments.md +12 -14
  41. package/{src/tools/comments/skills/droid-comments → dist/tools/comments/skills/comments}/SKILL.md +4 -2
  42. package/dist/tools/droid/.claude-plugin/plugin.json +15 -0
  43. package/dist/tools/droid/TOOL.yaml +1 -1
  44. package/dist/tools/droid/skills/droid/SKILL.md +1 -1
  45. package/dist/tools/project/.claude-plugin/plugin.json +16 -0
  46. package/dist/tools/project/TOOL.yaml +4 -3
  47. package/dist/tools/project/commands/project.md +12 -27
  48. package/dist/tools/project/skills/{droid-project → project}/SKILL.md +13 -12
  49. package/dist/tools/tech-design/.claude-plugin/plugin.json +16 -0
  50. package/dist/tools/tech-design/TOOL.yaml +19 -0
  51. package/dist/tools/tech-design/commands/tech-design.md +31 -0
  52. package/dist/tools/tech-design/skills/tech-design/SKILL.md +218 -0
  53. package/dist/tools/tech-design/skills/tech-design/references/draft.md +321 -0
  54. package/dist/tools/tech-design/skills/tech-design/references/gaps.md +328 -0
  55. package/dist/tools/tech-design/skills/tech-design/references/publish.md +409 -0
  56. package/dist/tools/tech-design/skills/tech-design/references/research-doc-template.md +129 -0
  57. package/dist/tools/tech-design/skills/tech-design/references/rollup-template.md +55 -0
  58. package/dist/tools/tech-design/skills/tech-design/references/start.md +353 -0
  59. package/dist/tools/tech-design/skills/tech-design/references/think.md +356 -0
  60. package/dist/tools/tech-design/skills/tech-design/references/thought-doc-template.md +72 -0
  61. package/package.json +3 -2
  62. package/scripts/build-plugins.ts +207 -0
  63. package/src/commands/tui/components/Badge.test.tsx +10 -4
  64. package/src/commands/tui.tsx +4 -4
  65. package/src/lib/migrations.ts +95 -4
  66. package/src/lib/skill-config.ts +95 -57
  67. package/src/lib/skills.test.ts +199 -74
  68. package/src/lib/skills.ts +57 -56
  69. package/src/lib/tools.ts +19 -12
  70. package/src/lib/types.ts +20 -5
  71. package/src/tools/README.md +1 -1
  72. package/src/tools/brain/.claude-plugin/plugin.json +16 -0
  73. package/src/tools/brain/TOOL.yaml +7 -5
  74. package/src/tools/brain/commands/brain.md +17 -49
  75. package/src/tools/brain/commands/scratchpad.md +13 -50
  76. package/{dist/tools/brain/skills/droid-brain → src/tools/brain/skills/brain}/SKILL.md +6 -6
  77. package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/SKILL.md +9 -9
  78. package/src/tools/coach/.claude-plugin/plugin.json +16 -0
  79. package/src/tools/coach/TOOL.yaml +4 -3
  80. package/src/tools/coach/commands/coach.md +14 -54
  81. package/{dist/tools/coach/skills/droid-coach → src/tools/coach/skills/coach}/SKILL.md +5 -4
  82. package/src/tools/code-review/.claude-plugin/plugin.json +16 -0
  83. package/src/tools/code-review/TOOL.yaml +4 -3
  84. package/src/tools/code-review/commands/code-review.md +18 -102
  85. package/src/tools/code-review/skills/code-review/SKILL.md +154 -0
  86. package/src/tools/codex/.claude-plugin/plugin.json +16 -0
  87. package/src/tools/codex/TOOL.yaml +5 -4
  88. package/src/tools/codex/commands/codex.md +18 -65
  89. package/src/tools/codex/skills/{droid-codex → codex}/SKILL.md +64 -45
  90. package/{dist/tools/codex/skills/droid-codex → src/tools/codex/skills/codex}/references/loading.md +94 -55
  91. package/src/tools/comments/.claude-plugin/plugin.json +16 -0
  92. package/src/tools/comments/TOOL.yaml +4 -3
  93. package/src/tools/comments/commands/comments.md +12 -14
  94. package/{dist/tools/comments/skills/droid-comments → src/tools/comments/skills/comments}/SKILL.md +4 -2
  95. package/src/tools/droid/.claude-plugin/plugin.json +15 -0
  96. package/src/tools/droid/TOOL.yaml +1 -1
  97. package/src/tools/droid/skills/droid/SKILL.md +1 -1
  98. package/src/tools/project/.claude-plugin/plugin.json +16 -0
  99. package/src/tools/project/TOOL.yaml +4 -3
  100. package/src/tools/project/commands/project.md +12 -27
  101. package/src/tools/project/skills/{droid-project → project}/SKILL.md +13 -12
  102. package/src/tools/tech-design/.claude-plugin/plugin.json +16 -0
  103. package/src/tools/tech-design/TOOL.yaml +19 -0
  104. package/src/tools/tech-design/commands/tech-design.md +31 -0
  105. package/src/tools/tech-design/skills/tech-design/SKILL.md +218 -0
  106. package/src/tools/tech-design/skills/tech-design/references/draft.md +321 -0
  107. package/src/tools/tech-design/skills/tech-design/references/gaps.md +328 -0
  108. package/src/tools/tech-design/skills/tech-design/references/publish.md +409 -0
  109. package/src/tools/tech-design/skills/tech-design/references/research-doc-template.md +129 -0
  110. package/src/tools/tech-design/skills/tech-design/references/rollup-template.md +55 -0
  111. package/src/tools/tech-design/skills/tech-design/references/start.md +353 -0
  112. package/src/tools/tech-design/skills/tech-design/references/think.md +356 -0
  113. package/src/tools/tech-design/skills/tech-design/references/thought-doc-template.md +72 -0
  114. package/dist/tools/code-review/skills/droid-code-review/SKILL.md +0 -55
  115. package/dist/tools/codex/skills/droid-codex/scripts/git-finish-write.d.ts.map +0 -1
  116. package/dist/tools/codex/skills/droid-codex/scripts/git-preamble.d.ts.map +0 -1
  117. package/dist/tools/codex/skills/droid-codex/scripts/git-start-write.d.ts.map +0 -1
  118. package/src/tools/code-review/skills/droid-code-review/SKILL.md +0 -55
  119. /package/dist/tools/brain/skills/{droid-brain → brain}/references/metadata.md +0 -0
  120. /package/dist/tools/brain/skills/{droid-brain → brain}/references/naming.md +0 -0
  121. /package/dist/tools/brain/skills/{droid-brain → brain}/references/templates.md +0 -0
  122. /package/dist/tools/brain/skills/{droid-brain → brain}/references/workflows.md +0 -0
  123. /package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/templates.md +0 -0
  124. /package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/workflows.md +0 -0
  125. /package/dist/tools/codex/skills/{droid-codex → codex}/references/creating.md +0 -0
  126. /package/dist/tools/codex/skills/{droid-codex → codex}/references/decisions.md +0 -0
  127. /package/dist/tools/codex/skills/{droid-codex → codex}/references/topics.md +0 -0
  128. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.d.ts +0 -0
  129. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.ts +0 -0
  130. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.d.ts +0 -0
  131. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.ts +0 -0
  132. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-scripts.test.ts +0 -0
  133. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.d.ts +0 -0
  134. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.ts +0 -0
  135. /package/dist/tools/project/skills/{droid-project → project}/references/changelog.md +0 -0
  136. /package/dist/tools/project/skills/{droid-project → project}/references/creating.md +0 -0
  137. /package/dist/tools/project/skills/{droid-project → project}/references/loading.md +0 -0
  138. /package/dist/tools/project/skills/{droid-project → project}/references/templates.md +0 -0
  139. /package/dist/tools/project/skills/{droid-project → project}/references/updating.md +0 -0
  140. /package/dist/tools/project/skills/{droid-project → project}/references/versioning.md +0 -0
  141. /package/src/tools/brain/skills/{droid-brain → brain}/references/metadata.md +0 -0
  142. /package/src/tools/brain/skills/{droid-brain → brain}/references/naming.md +0 -0
  143. /package/src/tools/brain/skills/{droid-brain → brain}/references/templates.md +0 -0
  144. /package/src/tools/brain/skills/{droid-brain → brain}/references/workflows.md +0 -0
  145. /package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/templates.md +0 -0
  146. /package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/workflows.md +0 -0
  147. /package/src/tools/codex/skills/{droid-codex → codex}/references/creating.md +0 -0
  148. /package/src/tools/codex/skills/{droid-codex → codex}/references/decisions.md +0 -0
  149. /package/src/tools/codex/skills/{droid-codex → codex}/references/topics.md +0 -0
  150. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.ts +0 -0
  151. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.ts +0 -0
  152. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-scripts.test.ts +0 -0
  153. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.ts +0 -0
  154. /package/src/tools/project/skills/{droid-project → project}/references/changelog.md +0 -0
  155. /package/src/tools/project/skills/{droid-project → project}/references/creating.md +0 -0
  156. /package/src/tools/project/skills/{droid-project → project}/references/loading.md +0 -0
  157. /package/src/tools/project/skills/{droid-project → project}/references/templates.md +0 -0
  158. /package/src/tools/project/skills/{droid-project → project}/references/updating.md +0 -0
  159. /package/src/tools/project/skills/{droid-project → project}/references/versioning.md +0 -0
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: code-review
3
+ description: "Comprehensive code review using specialized agents. Use when reviewing PRs, checking staged changes, or analysing code quality. User prompts like 'review this PR', 'check my changes', 'review before I commit'."
4
+ globs:
5
+ - "**/*"
6
+ alwaysApply: false
7
+ allowed-tools: [Read, Grep, Glob, Bash, Task]
8
+ ---
9
+
10
+ # Code Review Skill
11
+
12
+ Run comprehensive code reviews using specialized agents, each focused on a specific concern.
13
+
14
+ ## How It Works
15
+
16
+ The `/code-review` command orchestrates multiple specialized agents in parallel:
17
+
18
+ 1. **edi-standards-reviewer** - EDI patterns, partnership handling, billing concerns
19
+ 2. **test-coverage-analyzer** - Test completeness and edge cases
20
+ 3. **error-handling-reviewer** - Silent failures, missing error handling
21
+ 4. **type-reviewer** - TypeScript type design, interface contracts
22
+
23
+ Each agent returns issues with confidence scores (0-100). Issues below 80% confidence are filtered out to reduce noise.
24
+
25
+ ## Usage
26
+
27
+ ```bash
28
+ /code-review #123 # Review PR #123
29
+ /code-review staged # Review staged changes
30
+ /code-review branch # Review current branch vs main
31
+ /code-review path/to/file # Review specific file
32
+ ```
33
+
34
+ ## Output Format
35
+
36
+ Reviews are presented in prioritized categories:
37
+
38
+ 🔴 **Critical** - Security, data loss, billing errors
39
+ 🟠 **Important** - Bugs, missing tests, type issues
40
+ 🟡 **Suggestions** - Style, readability improvements
41
+
42
+ ## Post-Review Actions
43
+
44
+ After presenting findings, you can:
45
+
46
+ - Post the review as a PR comment
47
+ - Get suggested fixes for specific issues
48
+ - Check out the branch and fix critical issues
49
+
50
+ ## Domain-Aware Reviews
51
+
52
+ The EDI Standards Reviewer discovers project conventions by reading:
53
+
54
+ - `.claude/CLAUDE.md` or `CLAUDE.md` for team conventions
55
+ - `AGENTS.md` or `docs/` for architecture guidance
56
+
57
+ This lets it apply your project's specific patterns rather than generic rules.
58
+
59
+ ## Review Procedure
60
+
61
+ ### Step 0: Check for Brain Integration
62
+
63
+ **If the `brain` skill is installed** (check for `~/.claude/skills/brain/SKILL.md` or `~/.config/opencode/skills/brain/SKILL.md`):
64
+
65
+ Ask the user: **"Would you like the review results saved to a `/brain review` doc?"**
66
+
67
+ - If yes: Create a brain review doc at the start using `/brain review {PR title or branch name}`
68
+ - The final report will be written to the brain doc instead of just displayed
69
+ - This allows for async discussion via `@droid`/`@{user}` comments
70
+
71
+ If brain skill is not installed or user declines, proceed with normal terminal output.
72
+
73
+ ### Step 1: Determine Review Scope
74
+
75
+ Parse the argument to determine what to review:
76
+
77
+ **If argument starts with `#` or is a number (e.g., `#123` or `123`):**
78
+
79
+ - This is a PR number
80
+ - Fetch PR details: `gh pr view $PR_NUMBER --json title,body,baseRefName,headRefName,files`
81
+ - Get the diff: `gh pr diff $PR_NUMBER`
82
+ - Note the PR author and description for context
83
+
84
+ **If argument is `staged` or empty:**
85
+
86
+ - Review staged changes: `git diff --cached`
87
+
88
+ **If argument is `branch`:**
89
+
90
+ - Review current branch vs main: `git diff origin/main...HEAD`
91
+
92
+ **If argument is a file path:**
93
+
94
+ - Review specific file: `git diff HEAD -- $FILE_PATH`
95
+ - If no changes, review the entire file for issues
96
+
97
+ ### Step 2: Gather Context
98
+
99
+ For PR reviews, also fetch:
100
+
101
+ - PR description (may contain context about the change)
102
+ - Linked issues: `gh pr view $PR_NUMBER --json body` and parse for #issue refs
103
+ - Changed files list for targeted agent assignment
104
+
105
+ ### Step 3: Parallel Agent Reviews
106
+
107
+ Launch these agents in parallel using the Task tool with `run_in_background: true`:
108
+
109
+ 1. **edi-standards-reviewer**: EDI patterns, partnership handling, billing concerns
110
+ 2. **test-coverage-analyzer**: Test completeness and edge cases
111
+ 3. **error-handling-reviewer**: Silent failures, missing error handling
112
+ 4. **type-reviewer**: Type design, interface contracts
113
+
114
+ Pass each agent:
115
+
116
+ 1. The diff content
117
+ 2. The full file content for changed files (for context)
118
+ 3. PR description if available
119
+
120
+ Use TaskOutput to collect results from all agents.
121
+
122
+ ### Step 4: Confidence Filtering
123
+
124
+ Each agent returns issues with confidence scores (0-100).
125
+ Filter out issues with confidence < 80.
126
+
127
+ ### Step 5: Synthesize Report
128
+
129
+ Compile findings into a prioritized report:
130
+
131
+ **PR #123: "Add partnership billing events"** (if reviewing a PR)
132
+ _Author: @username_
133
+
134
+ **Critical** (security, data loss, billing errors)
135
+
136
+ - `file.ts:42` - Issue description
137
+
138
+ **Important** (bugs, missing tests, type issues)
139
+
140
+ - `file.ts:67` - Issue description
141
+
142
+ **Suggestions** (style, readability)
143
+
144
+ - `file.ts:89` - Issue description
145
+
146
+ **Summary**: X critical, Y important, Z suggestions across N files.
147
+
148
+ ### Step 6: Offer Actions (for PRs)
149
+
150
+ After presenting the report, offer:
151
+
152
+ - "Would you like me to post this as a PR comment?"
153
+ - "Should I suggest fixes for any of these issues?"
154
+ - "Want me to check out this branch and fix the critical issues?"
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "droid-codex",
3
+ "version": "0.1.6",
4
+ "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.",
5
+ "author": {
6
+ "name": "Orderful",
7
+ "url": "https://github.com/orderful"
8
+ },
9
+ "repository": "https://github.com/orderful/droid",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "droid",
13
+ "ai",
14
+ "codex"
15
+ ]
16
+ }
@@ -1,14 +1,15 @@
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.4
3
+ version: 0.1.6
4
4
  status: beta
5
5
 
6
6
  includes:
7
7
  skills:
8
- - name: droid-codex
8
+ - name: codex
9
9
  required: true
10
10
  commands:
11
- - codex
11
+ - name: codex
12
+ is_alias: false
12
13
  agents:
13
14
  - codex-document-processor
14
15
 
@@ -24,7 +25,7 @@ prerequisites:
24
25
  config_schema:
25
26
  codex_repo:
26
27
  type: string
27
- description: Path to local orderful-codex repository (required)
28
+ description: Path to local orderful-codex repository
28
29
  required: true
29
30
  default: "~/src/github.com/orderful-codex"
30
31
  freshness_days:
@@ -1,78 +1,31 @@
1
1
  ---
2
- description: Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics
2
+ name: codex
3
+ description: "Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics"
3
4
  argument-hint: "[projects | domains | proposals | patterns | topics | {name} | search {query} | new {type} {name} | decision {text}]"
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)
5
5
  ---
6
6
 
7
7
  # /codex
8
8
 
9
- Entry point for shared organizational knowledge. See the **codex skill** for full behaviour.
9
+ **User invoked:** `/codex $ARGUMENTS`
10
10
 
11
- > Context is AI's multiplier. This is Orderful's.
12
-
13
- ## Arguments
14
-
15
- $ARGUMENTS
16
-
17
- ## Prerequisites
18
-
19
- Before first use, verify:
20
-
21
- 1. **Repo cloned** at configured `codex_repo` path
22
- 2. **gh CLI** installed and authenticated
23
-
24
- ## Usage
25
-
26
- ```bash
27
- /codex # Show categories (5 total)
28
- /codex projects # List projects
29
- /codex domains # List domains
30
- /codex proposals # List proposals
31
- /codex patterns # List patterns
32
- /codex topics # List topics
33
- /codex {name} # Load entry (searches all categories)
34
- /codex search {query} # Search across everything
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
41
- /codex decision {text} # Append to active project's DECISIONS.md
42
- /codex snapshot {type} {file} {name} # Import PDF/markdown to codex
43
- /codex artifact {file} {project} # Add supporting artifact to project
44
- ```
45
-
46
- ## Configuration
47
-
48
- **ALWAYS read `~/.droid/skills/codex/overrides.yaml` first.**
49
-
50
- - `codex_repo` - Path to local orderful-codex repository (required)
51
- - `freshness_days` - Days before showing staleness warning (default: 30)
52
-
53
- ## Behaviour
54
-
55
- Refer to the codex skill for:
56
- - **Loading**: How to search, handle matches, check freshness, auto-generate CONTEXT.md
57
- - **Decisions**: How to append to active project's DECISIONS.md
58
- - **Creating**: How to scaffold new entries (projects, domains, proposals, patterns, topics)
59
-
60
- The skill's `references/` folder contains detailed procedures for each workflow.
11
+ **Your task:** Invoke the **codex skill** with these arguments.
61
12
 
62
13
  ## Examples
63
14
 
64
- ```bash
65
- # Load project context
66
- /codex transaction-templates
67
-
68
- # Search for webhook-related content
69
- /codex search webhook
15
+ - `/codex projects` → List all projects in the codex
16
+ - `/codex transaction-templates` → Load the transaction-templates entry
17
+ - `/codex search webhook` → Search for "webhook" across all codex content
18
+ - `/codex new project billing-v2` → Create new project scaffolding
19
+ - `/codex decision "Use PostgreSQL for audit log"` → Append decision to active project
70
20
 
71
- # Capture a decision during implementation
72
- /codex decision "Using UUIDv7 for IDs because it's sortable and includes timestamp"
21
+ ## Quick Reference
73
22
 
74
- # Create new entries
75
- /codex new domain partnerships
76
- /codex new proposal caching-layer
77
- /codex new topic organization-hierarchy
78
23
  ```
24
+ /codex # Show categories overview
25
+ /codex {name} # Load entry (searches all categories)
26
+ /codex search {query} # Search across everything
27
+ /codex new project {name} # Scaffold new project
28
+ /codex decision {text} # Append to active project's DECISIONS.md
29
+ ```
30
+
31
+ See the **codex skill** for complete documentation and procedures.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: droid-codex
2
+ name: codex
3
3
  description: "Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics. Use when loading project context ('load transaction-templates'), searching codex ('search webhook'), capturing decisions ('codex decision'), or adding explored topics ('add topic'). User prompts like 'check the codex', 'what's in the codex about X', 'load the PRD for Y'."
4
4
  globs:
5
5
  - "**/PRD.md"
@@ -7,7 +7,18 @@ globs:
7
7
  - "**/CONTEXT.md"
8
8
  - "**/DECISIONS.md"
9
9
  alwaysApply: false
10
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)
10
+ allowed-tools:
11
+ [
12
+ Read,
13
+ Write,
14
+ Edit,
15
+ Glob,
16
+ Grep,
17
+ Bash(gh:*),
18
+ Bash(git:*),
19
+ Bash(ls:*),
20
+ Bash(mkdir:*),
21
+ ]
11
22
  ---
12
23
 
13
24
  # Codex Skill
@@ -32,6 +43,7 @@ gh --version
32
43
  ```
33
44
 
34
45
  If prerequisites fail, guide user to fix:
46
+
35
47
  - Repo missing: `git clone git@github.com:orderful/orderful-codex.git {path}`
36
48
  - gh missing: `brew install gh && gh auth login`
37
49
 
@@ -43,16 +55,16 @@ If prerequisites fail, guide user to fix:
43
55
 
44
56
  The codex skill includes three git scripts. **Always use these instead of raw git commands.**
45
57
 
46
- | Script | Purpose | When to use |
47
- |--------|---------|-------------|
48
- | `git-preamble` | Ensure clean main + pull latest | Before ANY operation |
49
- | `git-start-write` | Preamble + create branch | Before write operations |
50
- | `git-finish-write` | Commit + PR + return to main | After write operations |
58
+ | Script | Purpose | When to use |
59
+ | ------------------ | ------------------------------- | ----------------------- |
60
+ | `git-preamble` | Ensure clean main + pull latest | Before ANY operation |
61
+ | `git-start-write` | Preamble + create branch | Before write operations |
62
+ | `git-finish-write` | Commit + PR + return to main | After write operations |
51
63
 
52
64
  ### Read Operations (search, load, list)
53
65
 
54
66
  ```bash
55
- droid config codex | droid exec droid-codex git-preamble --config -
67
+ droid config codex | droid exec codex git-preamble --config -
56
68
  # Then proceed with the read
57
69
  ```
58
70
 
@@ -60,12 +72,12 @@ droid config codex | droid exec droid-codex git-preamble --config -
60
72
 
61
73
  ```bash
62
74
  # 1. Start write (runs preamble + creates branch)
63
- droid config codex | droid exec droid-codex git-start-write --config - --branch codex/{action}-{name}
75
+ droid config codex | droid exec codex git-start-write --config - --branch codex/{action}-{name}
64
76
 
65
77
  # 2. Make your changes (write files)
66
78
 
67
79
  # 3. Finish write (commit + PR + return to main)
68
- droid config codex | droid exec droid-codex git-finish-write --config - \
80
+ droid config codex | droid exec codex git-finish-write --config - \
69
81
  --message "{commit message}" \
70
82
  --pr-title "{PR title}" \
71
83
  --pr-body "{PR description}"
@@ -76,11 +88,13 @@ The scripts return JSON with success/failure status. Check the result before pro
76
88
  ### Error Handling
77
89
 
78
90
  The scripts handle errors internally:
91
+
79
92
  - Silent recovery for transient issues
80
93
  - Clear error messages in JSON output
81
94
  - Automatic return to main even on partial failure
82
95
 
83
96
  If a script fails, check the JSON `error` field and report a user-friendly message:
97
+
84
98
  - "I hit a sync issue with the codex. Let me try again..."
85
99
  - Only escalate as last resort: "The codex repo needs manual attention."
86
100
 
@@ -134,44 +148,44 @@ fi
134
148
 
135
149
  **ALWAYS read `~/.droid/skills/codex/overrides.yaml` first.**
136
150
 
137
- | Setting | Default | Description |
138
- |---------|---------|-------------|
139
- | `codex_repo` | `~/src/github.com/orderful-codex` | Path to local codex repo |
140
- | `freshness_days` | `30` | Days before staleness warning |
151
+ | Setting | Default | Description |
152
+ | ---------------- | --------------------------------- | ----------------------------- |
153
+ | `codex_repo` | `~/src/github.com/orderful-codex` | Path to local codex repo |
154
+ | `freshness_days` | `30` | Days before staleness warning |
141
155
 
142
156
  ## Categories
143
157
 
144
158
  The codex has five categories:
145
159
 
146
- | Category | Path | Purpose |
147
- |----------|------|---------|
148
- | `projects` | `{codex_repo}/projects/` | Feature/project context (PRD, tech design, decisions) |
149
- | `domains` | `{codex_repo}/domains/` | Business domain knowledge - the "what" and "why" |
150
- | `proposals` | `{codex_repo}/proposals/` | Ideas and future direction - not yet committed |
151
- | `patterns` | `{codex_repo}/patterns/` | Cross-cutting technical patterns |
152
- | `topics` | `{codex_repo}/topics/` | Explored codebase areas with freshness tracking |
160
+ | Category | Path | Purpose |
161
+ | ----------- | ------------------------- | ----------------------------------------------------- |
162
+ | `projects` | `{codex_repo}/projects/` | Feature/project context (PRD, tech design, decisions) |
163
+ | `domains` | `{codex_repo}/domains/` | Business domain knowledge - the "what" and "why" |
164
+ | `proposals` | `{codex_repo}/proposals/` | Ideas and future direction - not yet committed |
165
+ | `patterns` | `{codex_repo}/patterns/` | Cross-cutting technical patterns |
166
+ | `topics` | `{codex_repo}/topics/` | Explored codebase areas with freshness tracking |
153
167
 
154
168
  ## Commands
155
169
 
156
- | Command | Action |
157
- |---------|--------|
158
- | `/codex` | Show categories overview |
159
- | `/codex projects` | List all projects |
160
- | `/codex domains` | List all domains |
161
- | `/codex proposals` | List all proposals |
162
- | `/codex patterns` | List all patterns |
163
- | `/codex topics` | List all topics |
164
- | `/codex {name}` | Load entry (searches all categories) |
165
- | `/codex search {query}` | Search across everything |
166
- | `/codex new {name}` | Scaffold new project (shorthand) |
167
- | `/codex new project {name}` | Scaffold new project from templates |
168
- | `/codex new domain {name}` | Scaffold new domain entry |
169
- | `/codex new proposal {name}` | Scaffold new proposal entry |
170
- | `/codex new pattern {name}` | Scaffold new pattern entry |
171
- | `/codex new topic {name}` | Scaffold new topic entry |
172
- | `/codex decision {text}` | Append to active project's DECISIONS.md |
173
- | `/codex snapshot {type} {file} {name}` | Import PDF/markdown to codex (uses agent) |
174
- | `/codex artifact {file} {project}` | Add supporting artifact to project (uses agent) |
170
+ | Command | Action |
171
+ | -------------------------------------- | ----------------------------------------------- |
172
+ | `/codex` | Show categories overview |
173
+ | `/codex projects` | List all projects |
174
+ | `/codex domains` | List all domains |
175
+ | `/codex proposals` | List all proposals |
176
+ | `/codex patterns` | List all patterns |
177
+ | `/codex topics` | List all topics |
178
+ | `/codex {name}` | Load entry (searches all categories) |
179
+ | `/codex search {query}` | Search across everything |
180
+ | `/codex new {name}` | Scaffold new project (shorthand) |
181
+ | `/codex new project {name}` | Scaffold new project from templates |
182
+ | `/codex new domain {name}` | Scaffold new domain entry |
183
+ | `/codex new proposal {name}` | Scaffold new proposal entry |
184
+ | `/codex new pattern {name}` | Scaffold new pattern entry |
185
+ | `/codex new topic {name}` | Scaffold new topic entry |
186
+ | `/codex decision {text}` | Append to active project's DECISIONS.md |
187
+ | `/codex snapshot {type} {file} {name}` | Import PDF/markdown to codex (uses agent) |
188
+ | `/codex artifact {file} {project}` | Add supporting artifact to project (uses agent) |
175
189
 
176
190
  ## Loading an Entry
177
191
 
@@ -181,7 +195,7 @@ The codex has five categories:
181
195
 
182
196
  1. **Run preamble first:**
183
197
  ```bash
184
- droid config codex | droid exec droid-codex git-preamble --config -
198
+ droid config codex | droid exec codex git-preamble --config -
185
199
  ```
186
200
  2. **Read `{codex_repo}/index.yaml`** - this contains all entry names and aliases for fast lookup
187
201
  3. Match `{name}` against index keys and aliases (case-insensitive, partial match)
@@ -199,10 +213,11 @@ The codex has five categories:
199
213
  **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
214
 
201
215
  **If no CONTEXT.md exists for a project:**
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}"
216
+
217
+ - Synthesise one from PRD.md + TECH-DESIGN.md + DECISIONS.md
218
+ - Create branch, commit CONTEXT.md, open PR
219
+ - Output the new CONTEXT.md with "need more detail?" options
220
+ - **OPTIONAL:** You may use a background agent (Task tool with `run_in_background: true`) to avoid blocking the user, but synchronous generation is fine too
206
221
 
207
222
  Full procedure: `references/loading.md`
208
223
 
@@ -225,6 +240,7 @@ codebase_paths:
225
240
  ```
226
241
 
227
242
  **Status values (unified across all categories):**
243
+
228
244
  - `draft` - Initial capture, not ready for consumption
229
245
  - `active` - Current, being used for implementation
230
246
  - `complete` - Project shipped, kept for reference
@@ -316,6 +332,7 @@ The main conversation handles: git branch, commit, PR creation, user interaction
316
332
  **Trigger:** `/codex artifact {file} {project}` or user wants to add supporting material to a project
317
333
 
318
334
  Artifacts are supplementary documents that support a project but aren't core document types (PRD, TECH-DESIGN, DECISIONS). Examples:
335
+
319
336
  - Customer interviews / transcripts
320
337
  - Research notes
321
338
  - Meeting summaries
@@ -409,6 +426,7 @@ The codex holds **shared** organizational knowledge. The `/project` skill holds
409
426
  ```
410
427
 
411
428
  When user runs `/project create --from codex:{name}`:
429
+
412
430
  1. Load the codex entry
413
431
  2. Extract key context for personal PROJECT.md
414
432
  3. Create project in user's projects_dir
@@ -418,6 +436,7 @@ When user runs `/project create --from codex:{name}`:
418
436
  **See "Git Hygiene (CRITICAL)" section above.** All codex changes go through PRs (main branch is protected).
419
437
 
420
438
  **Key points:**
439
+
421
440
  - Always run the preamble before any operation (ensures clean main + latest)
422
441
  - Write operations: branch → commit → PR → **return to main**
423
442
  - Safe changes (new files, decision appends) auto-merge via GitHub Action