@orderful/droid 0.24.0 → 0.25.1
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/.eslintrc.json +6 -4
- package/AGENTS.md +58 -0
- package/CHANGELOG.md +35 -0
- package/README.md +11 -6
- package/dist/bin/droid.js +384 -170
- package/dist/commands/config.d.ts +15 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/exec.d.ts +10 -0
- package/dist/commands/exec.d.ts.map +1 -0
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/index.js +171 -33
- package/dist/lib/migrations.d.ts.map +1 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/tools/codex/TOOL.yaml +1 -1
- package/dist/tools/codex/skills/droid-codex/SKILL.md +92 -72
- package/dist/tools/codex/skills/droid-codex/references/creating.md +13 -51
- package/dist/tools/codex/skills/droid-codex/references/decisions.md +15 -19
- package/dist/tools/codex/skills/droid-codex/references/topics.md +14 -12
- package/dist/tools/codex/skills/droid-codex/scripts/git-finish-write.d.ts +31 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-finish-write.d.ts.map +1 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-finish-write.ts +236 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-preamble.d.ts +20 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-preamble.d.ts.map +1 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-preamble.ts +156 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-scripts.test.ts +364 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-start-write.d.ts +23 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-start-write.d.ts.map +1 -0
- package/dist/tools/codex/skills/droid-codex/scripts/git-start-write.ts +172 -0
- package/package.json +1 -1
- package/src/bin/droid.ts +9 -0
- package/src/commands/config.ts +38 -4
- package/src/commands/exec.ts +96 -0
- package/src/commands/install.ts +1 -1
- package/src/commands/setup.ts +6 -6
- package/src/commands/tui.tsx +254 -175
- package/src/lib/migrations.ts +103 -10
- package/src/lib/quotes.ts +6 -6
- package/src/lib/skills.ts +168 -45
- package/src/tools/codex/TOOL.yaml +1 -1
- package/src/tools/codex/skills/droid-codex/SKILL.md +92 -72
- package/src/tools/codex/skills/droid-codex/references/creating.md +13 -51
- package/src/tools/codex/skills/droid-codex/references/decisions.md +15 -19
- package/src/tools/codex/skills/droid-codex/references/topics.md +14 -12
- package/src/tools/codex/skills/droid-codex/scripts/git-finish-write.ts +236 -0
- package/src/tools/codex/skills/droid-codex/scripts/git-preamble.ts +156 -0
- package/src/tools/codex/skills/droid-codex/scripts/git-scripts.test.ts +364 -0
- package/src/tools/codex/skills/droid-codex/scripts/git-start-write.ts +172 -0
package/.eslintrc.json
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
"node": true,
|
|
4
4
|
"es2022": true
|
|
5
5
|
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended"
|
|
8
|
-
],
|
|
6
|
+
"extends": ["eslint:recommended"],
|
|
9
7
|
"parser": "@typescript-eslint/parser",
|
|
10
8
|
"parserOptions": {
|
|
11
9
|
"ecmaVersion": "latest",
|
|
@@ -14,7 +12,11 @@
|
|
|
14
12
|
"plugins": ["@typescript-eslint"],
|
|
15
13
|
"rules": {
|
|
16
14
|
"no-unused-vars": "off",
|
|
17
|
-
"@typescript-eslint/no-unused-vars": [
|
|
15
|
+
"@typescript-eslint/no-unused-vars": [
|
|
16
|
+
"error",
|
|
17
|
+
{ "argsIgnorePattern": "^_" }
|
|
18
|
+
],
|
|
19
|
+
"quotes": ["error", "single", { "avoidEscape": true }]
|
|
18
20
|
},
|
|
19
21
|
"ignorePatterns": ["dist/", "node_modules/", "*.test.ts"]
|
|
20
22
|
}
|
package/AGENTS.md
CHANGED
|
@@ -73,3 +73,61 @@ Don't consolidate them. Using Ink for simple prompts would be overkill.
|
|
|
73
73
|
- Prefer `const` over `let`
|
|
74
74
|
- Use Canadian/British spelling (behaviour, colour, favourite)
|
|
75
75
|
- Use "allow list/deny list" not "whitelist/blacklist"
|
|
76
|
+
|
|
77
|
+
## Common Gotchas
|
|
78
|
+
|
|
79
|
+
Things that will bite you if you don't know:
|
|
80
|
+
|
|
81
|
+
| Gotcha | Why | What to do |
|
|
82
|
+
|--------|-----|------------|
|
|
83
|
+
| Single-line YAML descriptions | Claude Code's frontmatter parser doesn't handle multiline YAML (`>-`) | Use single-line quoted strings in frontmatter |
|
|
84
|
+
| Skill directories have `droid-` prefix | Workaround for Claude Code bug where directories matching command names block invocation | Name skill dirs `droid-{name}/`, commands stay as `{name}.md` |
|
|
85
|
+
| Bump tool version when skill content changes | Users won't get updates otherwise | Patch bump the tool's TOOL.yaml version |
|
|
86
|
+
| Config-first in commands | User overrides must take precedence | Always read `~/.droid/skills/{skill}/overrides.yaml` before using defaults |
|
|
87
|
+
| Changeset package name | npm package is scoped | Use `"@orderful/droid"` not `"droid"` in changesets |
|
|
88
|
+
|
|
89
|
+
## Testing
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
bun test src/ # Unit tests (lib/, commands/)
|
|
93
|
+
bun run test:tui # Ink component tests (Badge, TabBar, etc.)
|
|
94
|
+
bun run test:e2e # E2E with Playwright + ttyd (requires ttyd installed)
|
|
95
|
+
bun run screenshot # On-demand TUI screenshot for visual verification
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**When to run what:**
|
|
99
|
+
- Changed core logic (`lib/`) → `bun test src/`
|
|
100
|
+
- Changed TUI components → `bun run test:tui`
|
|
101
|
+
- Visual changes you want to verify → `bun run screenshot`
|
|
102
|
+
- E2E tests aren't in CI (ttyd not on runners) - use locally for visual feedback
|
|
103
|
+
|
|
104
|
+
## Adding a New Skill
|
|
105
|
+
|
|
106
|
+
1. Create directory: `src/tools/{tool}/skills/{skill}/`
|
|
107
|
+
2. Add `SKILL.md` with frontmatter:
|
|
108
|
+
```yaml
|
|
109
|
+
---
|
|
110
|
+
name: droid-{skill}
|
|
111
|
+
description: "{What it does}. Use when {scenarios}. User prompts like {examples}."
|
|
112
|
+
globs: []
|
|
113
|
+
alwaysApply: false
|
|
114
|
+
allowed-tools: [Read, Edit, Write, Glob, Grep, Bash, Task]
|
|
115
|
+
---
|
|
116
|
+
```
|
|
117
|
+
3. Add skill name to `TOOL.yaml` under `includes.skills`
|
|
118
|
+
4. Bump tool version in `TOOL.yaml`
|
|
119
|
+
5. Add changeset: `.changeset/{name}.md`
|
|
120
|
+
|
|
121
|
+
**Optional:** Add `references/` for context files, `scripts/` for deterministic CLI scripts.
|
|
122
|
+
|
|
123
|
+
## Key Architecture Decisions
|
|
124
|
+
|
|
125
|
+
Decisions that affect how you work:
|
|
126
|
+
|
|
127
|
+
| Decision | Rationale |
|
|
128
|
+
|----------|-----------|
|
|
129
|
+
| "Scripts" not "tools" for skill CLIs | Avoids terminology collision—droid "tools" are packages, skill "scripts" are executables |
|
|
130
|
+
| Parallel skills (`{skill}-next`) for risky refactors | Dogfood new implementation alongside original, swap when confident |
|
|
131
|
+
| Each .md owns its metadata | Single source of truth per artifact, contributors can bring existing skills as-is |
|
|
132
|
+
| Ink + Inquirer (not consolidated) | Ink for stateful TUI, Inquirer for simple prompts—right tool for each job |
|
|
133
|
+
| Collision detection over prefixing | Detect conflicts at install time rather than polluting command names with prefixes |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.25.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129](https://github.com/Orderful/droid/pull/129) [`d3264c4`](https://github.com/Orderful/droid/commit/d3264c493e1c243e812ab742103351888092ac79) Thanks [@frytyler](https://github.com/frytyler)! - fix(codex): add git preamble to Loading procedure
|
|
8
|
+
|
|
9
|
+
The "Loading an Entry" procedure wasn't running the git preamble before
|
|
10
|
+
reading files, causing potential stale data issues. Now explicitly calls
|
|
11
|
+
`git-preamble` as step 1 before reading the index.
|
|
12
|
+
|
|
13
|
+
## 0.25.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#123](https://github.com/Orderful/droid/pull/123) [`9e8bdff`](https://github.com/Orderful/droid/commit/9e8bdffccfb2e0ddbc02c1e9022a803f07f70240) Thanks [@frytyler](https://github.com/frytyler)! - Add deterministic git scripts to codex skill for bulletproof git hygiene
|
|
18
|
+
- `git-preamble.ts` - Ensure clean main + pull latest
|
|
19
|
+
- `git-start-write.ts` - Preamble + create branch
|
|
20
|
+
- `git-finish-write.ts` - Commit + PR + return to main
|
|
21
|
+
|
|
22
|
+
These scripts prevent PM-unfriendly git errors by making git operations deterministic and recoverable.
|
|
23
|
+
|
|
24
|
+
- [#94](https://github.com/Orderful/droid/pull/94) [`3ddd79d`](https://github.com/Orderful/droid/commit/3ddd79d77da9c0ef78d70165066e3a3464422795) Thanks [@frytyler](https://github.com/frytyler)! - Add `droid exec` command for running deterministic skill scripts
|
|
25
|
+
- New `droid exec <skill> <script> [args]` command
|
|
26
|
+
- New `droid config <skill>` outputs merged config as JSON for scripts
|
|
27
|
+
- Skills can include a `scripts/` directory with TypeScript/Python tools
|
|
28
|
+
- Scripts are copied during skill installation
|
|
29
|
+
|
|
30
|
+
- [#126](https://github.com/Orderful/droid/pull/126) [`e36d0ce`](https://github.com/Orderful/droid/commit/e36d0cee1b09313a454ce53f8daee0f2f427e670) Thanks [@frytyler](https://github.com/frytyler)! - Add platform sync migration to auto-detect installed tools. When switching between Claude Code and OpenCode, droid now automatically detects installed tools and syncs them to config.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- [#127](https://github.com/Orderful/droid/pull/127) [`316ac96`](https://github.com/Orderful/droid/commit/316ac96d7c89444a0506bbb392375e1fb155fd69) Thanks [@frytyler](https://github.com/frytyler)! - Fix agent installation bug where agents weren't copied during tool install/update. The code was filtering for directories but agents are .md files.
|
|
35
|
+
|
|
36
|
+
- [#126](https://github.com/Orderful/droid/pull/126) [`e36d0ce`](https://github.com/Orderful/droid/commit/e36d0cee1b09313a454ce53f8daee0f2f427e670) Thanks [@frytyler](https://github.com/frytyler)! - Fix platform switching collision detection. Allow tools to overwrite their own command files when reinstalling across platforms (Claude Code ↔ OpenCode).
|
|
37
|
+
|
|
3
38
|
## 0.24.0
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -46,6 +46,8 @@ Browse available tools, see what's installed, and manage everything from one pla
|
|
|
46
46
|
| **comments** | Inline `@droid`/`@user` conversations in any file | beta |
|
|
47
47
|
| **project** | Persistent project context across sessions | beta |
|
|
48
48
|
| **brain** | Collaborative scratch pad for planning & research | beta |
|
|
49
|
+
| **coach** | Learning-mode AI - scaffolds don't implement, questions don't fix | beta |
|
|
50
|
+
| **codex** | Shared organizational knowledge - PRDs, tech designs, patterns | beta |
|
|
49
51
|
| **code-review** | Multi-agent code review with specialized checkers | alpha |
|
|
50
52
|
|
|
51
53
|
### Comments
|
|
@@ -95,9 +97,9 @@ Config lives in `~/.droid/`:
|
|
|
95
97
|
```
|
|
96
98
|
~/.droid/
|
|
97
99
|
├── config.yaml # Global config
|
|
98
|
-
└──
|
|
99
|
-
└── {
|
|
100
|
-
└── overrides.yaml # Per-
|
|
100
|
+
└── skills/
|
|
101
|
+
└── {skill}/
|
|
102
|
+
└── overrides.yaml # Per-skill overrides
|
|
101
103
|
```
|
|
102
104
|
|
|
103
105
|
Tools install to your AI platform's location:
|
|
@@ -116,6 +118,7 @@ While the TUI is the primary interface, direct commands are available:
|
|
|
116
118
|
| `droid uninstall <tool>` | Remove a tool |
|
|
117
119
|
| `droid update` | Update droid and tools |
|
|
118
120
|
| `droid config` | View/edit config |
|
|
121
|
+
| `droid exec <skill> <script>` | Run a skill's deterministic script |
|
|
119
122
|
|
|
120
123
|
## Development
|
|
121
124
|
|
|
@@ -132,10 +135,12 @@ bun unlink
|
|
|
132
135
|
|
|
133
136
|
### Adding Tools
|
|
134
137
|
|
|
138
|
+
See [AGENTS.md](AGENTS.md) for detailed contributor guidance. Quick overview:
|
|
139
|
+
|
|
135
140
|
1. Create `src/tools/{name}/TOOL.yaml` (manifest)
|
|
136
|
-
2. Add skills in `src/tools/{name}/skills/{skill}/SKILL.
|
|
137
|
-
3. Add commands in `src/tools/{name}/commands
|
|
138
|
-
4. Add agents in `src/tools/{name}/agents/{agent}
|
|
141
|
+
2. Add skills in `src/tools/{name}/skills/{skill}/SKILL.md` (frontmatter + instructions)
|
|
142
|
+
3. Add commands in `src/tools/{name}/commands/{command}.md` (frontmatter + instructions)
|
|
143
|
+
4. Add agents in `src/tools/{name}/agents/{agent}.md` (frontmatter + instructions)
|
|
139
144
|
5. Submit a PR
|
|
140
145
|
|
|
141
146
|
## License
|