@dezkareid/osddt 1.11.11 → 1.11.13
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/AGENTS.md +41 -9
- package/README.md +60 -12
- package/dist/index.js +13 -14
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -112,7 +112,7 @@ osddt/
|
|
|
112
112
|
│ │ └── gemini.ts # Formats COMMAND_DEFINITIONS as TOML (.gemini/commands/osddt.<name>.toml)
|
|
113
113
|
│ └── utils/
|
|
114
114
|
│ ├── prompt.ts # Inquirer prompts: askAgents() (checkbox), askRepoType() (select), askWorktreeUrl() (input)
|
|
115
|
-
│ └── worktree.ts # Shared worktree helpers: git version check, not-a-worktree check, writable check,
|
|
115
|
+
│ └── worktree.ts # Shared worktree helpers: git version check, not-a-worktree check, writable check, worktree listing
|
|
116
116
|
├── dist/ # Compiled output (single ESM bundle, gitignored)
|
|
117
117
|
├── rollup.config.js # Bundles src/index.ts → dist/index.js (ESM, shebang injected)
|
|
118
118
|
├── tsconfig.json # TypeScript config
|
|
@@ -159,8 +159,8 @@ The selected agents are saved in `.osddtrc` alongside `repoType`. When `osddt up
|
|
|
159
159
|
| `npx @dezkareid/osddt meta-info` | External | Output current branch and date as JSON |
|
|
160
160
|
| `osddt done <feature-name> --dir <project-path>` | Local dev | Move `working-on/<feature>` to `done/<feature>` |
|
|
161
161
|
| `npx @dezkareid/osddt done <feature-name> --dir <project-path>` | External | Move `working-on/<feature>` to `done/<feature>` |
|
|
162
|
-
| `osddt done <feature-name> --dir <project-path> --worktree` | Local dev | Archive feature
|
|
163
|
-
| `npx @dezkareid/osddt done <feature-name> --dir <project-path> --worktree` | External | Archive feature
|
|
162
|
+
| `osddt done <feature-name> --dir <project-path> --worktree` | Local dev | Archive feature and remove the git worktree |
|
|
163
|
+
| `npx @dezkareid/osddt done <feature-name> --dir <project-path> --worktree` | External | Archive feature and remove the git worktree |
|
|
164
164
|
| `osddt update` | Local dev | Regenerate agent command files from the existing `.osddtrc` |
|
|
165
165
|
| `npx @dezkareid/osddt update` | External | Regenerate agent command files from the existing `.osddtrc` |
|
|
166
166
|
| `osddt start-worktree <feature-name>` | Local dev | Create a git worktree for a feature and scaffold working-on/ |
|
|
@@ -179,7 +179,7 @@ The selected agents are saved in `.osddtrc` alongside `repoType`. When `osddt up
|
|
|
179
179
|
| `--worktree-repository <url>` | any git URL | Enable worktree workflow; saves URL as `"worktree-repository"` in `.osddtrc` |
|
|
180
180
|
| `-d, --dir <directory>` | any path | Target directory (defaults to current working directory) |
|
|
181
181
|
|
|
182
|
-
All flags are optional. Providing neither runs the fully interactive mode. When `--worktree-repository` is provided, environment checks run and
|
|
182
|
+
All flags are optional. Providing neither runs the fully interactive mode. When `--worktree-repository` is provided, a bare clone is created at `.bare/`, the default branch is checked out as a linked worktree, environment checks run, and all config is written to `.osddtrc`.
|
|
183
183
|
|
|
184
184
|
### Command Templates
|
|
185
185
|
|
|
@@ -268,10 +268,37 @@ Enable worktree mode once during setup by providing the repository URL:
|
|
|
268
268
|
npx @dezkareid/osddt setup --agents claude --repo-type single --worktree-repository https://github.com/org/repo.git
|
|
269
269
|
```
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
This clones a bare repository into `.bare/`, checks out the default branch as a linked worktree at `.bare/main/`, and writes all config to `.osddtrc`. The resulting layout:
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
project/ ← your working directory (contains .osddtrc)
|
|
275
|
+
└── .bare/
|
|
276
|
+
├── main/ ← default branch checked out as a linked worktree
|
|
277
|
+
└── add-payment-gateway/ ← created by /osddt.start
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
From that point on, `/osddt.start` automatically uses the worktree workflow — no further configuration needed:
|
|
281
|
+
|
|
282
|
+
**Single repo:**
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
/osddt.start add-payment-gateway
|
|
286
|
+
# → creates .bare/add-payment-gateway/, checks out feat/add-payment-gateway
|
|
287
|
+
# → scaffolds .bare/add-payment-gateway/working-on/add-payment-gateway/
|
|
288
|
+
/osddt.spec
|
|
289
|
+
/osddt.plan use Stripe SDK, REST endpoints
|
|
290
|
+
/osddt.tasks
|
|
291
|
+
/osddt.implement
|
|
292
|
+
/osddt.done
|
|
293
|
+
# → archives working-on/, removes .bare/add-payment-gateway/
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Monorepo (prompts for package path on first run):**
|
|
272
297
|
|
|
273
298
|
```
|
|
274
299
|
/osddt.start add-payment-gateway
|
|
300
|
+
# → prompts: "Package path (e.g. apps/my-app):" → enter apps/payments
|
|
301
|
+
# → scaffolds .bare/add-payment-gateway/apps/payments/working-on/add-payment-gateway/
|
|
275
302
|
/osddt.spec
|
|
276
303
|
/osddt.plan use Stripe SDK, REST endpoints
|
|
277
304
|
/osddt.tasks
|
|
@@ -279,12 +306,17 @@ From that point on, `/osddt.start` automatically uses the worktree workflow:
|
|
|
279
306
|
/osddt.done
|
|
280
307
|
```
|
|
281
308
|
|
|
282
|
-
|
|
309
|
+
Worktrees are tracked by git itself (`git worktree list`). `osddt.continue` and `osddt.done` call `npx @dezkareid/osddt worktree-info <feature-name>` at runtime to resolve paths — no separate state file is required. When `osddt.done` runs, it archives the planning folder **and** removes the worktree automatically.
|
|
283
310
|
|
|
284
|
-
You can customise the
|
|
311
|
+
You can customise the base directory where feature worktrees are created via `worktreeBase` in `.osddtrc` (defaults to the `bare-path`):
|
|
285
312
|
|
|
286
313
|
```json
|
|
287
|
-
{
|
|
314
|
+
{
|
|
315
|
+
"repoType": "single",
|
|
316
|
+
"worktree-repository": "https://github.com/org/repo.git",
|
|
317
|
+
"bare-path": "/path/to/project/.bare",
|
|
318
|
+
"worktreeBase": "/Users/me/worktrees"
|
|
319
|
+
}
|
|
288
320
|
```
|
|
289
321
|
|
|
290
322
|
---
|
|
@@ -353,7 +385,7 @@ You can customise the worktree base directory via `worktreeBase` in `.osddtrc`:
|
|
|
353
385
|
2. Lists all folders under `working-on/`. If there is only one, uses it automatically; if there are multiple, asks the user to pick one.
|
|
354
386
|
3. Confirms all tasks in `osddt.tasks.md` are checked off (`- [x]`).
|
|
355
387
|
4. Runs `npx @dezkareid/osddt worktree-info <feature-name>` to check if this is a worktree feature.
|
|
356
|
-
- If found: runs `npx @dezkareid/osddt done <feature-name> --dir <project-path> --worktree` (archives folder, removes worktree
|
|
388
|
+
- If found: runs `npx @dezkareid/osddt done <feature-name> --dir <project-path> --worktree` (archives folder, removes worktree via `git worktree remove`).
|
|
357
389
|
- If not found: runs `npx @dezkareid/osddt done <feature-name> --dir <project-path>` (existing behaviour).
|
|
358
390
|
|
|
359
391
|
Note: the `osddt done` CLI command does **not** read `.osddtrc` — project path resolution is the agent's responsibility, handled in step 1 above.
|
package/README.md
CHANGED
|
@@ -10,10 +10,10 @@ Other spec driven development tool but for monorepo
|
|
|
10
10
|
| `@dezkareid/osddt setup --worktree-repository <url>` | Setup with worktree workflow enabled |
|
|
11
11
|
| `@dezkareid/osddt meta-info` | Output current branch and date as JSON |
|
|
12
12
|
| `@dezkareid/osddt done <feature-name> --dir <project-path>` | Move `working-on/<feature>` to `done/<feature>` |
|
|
13
|
-
| `@dezkareid/osddt done <feature-name> --dir <project-path> --worktree` | Archive feature
|
|
13
|
+
| `@dezkareid/osddt done <feature-name> --dir <project-path> --worktree` | Archive feature and remove the git worktree |
|
|
14
14
|
| `@dezkareid/osddt update` | Regenerate agent command files from the existing `.osddtrc` |
|
|
15
15
|
| `@dezkareid/osddt start-worktree <feature-name>` | Create a git worktree for a feature and scaffold working-on/ |
|
|
16
|
-
| `@dezkareid/osddt start-worktree <feature-name> --dir <package-path>` | Same, specifying the package
|
|
16
|
+
| `@dezkareid/osddt start-worktree <feature-name> --dir <package-path>` | Same, specifying the package subdirectory in a monorepo |
|
|
17
17
|
| `@dezkareid/osddt worktree-info <feature-name>` | Look up worktree paths for a feature (JSON output) |
|
|
18
18
|
|
|
19
19
|
### `osddt setup` options
|
|
@@ -25,7 +25,7 @@ Other spec driven development tool but for monorepo
|
|
|
25
25
|
| `--worktree-repository <url>` | any git URL | Enable worktree workflow and save the repository URL |
|
|
26
26
|
| `-d, --dir <directory>` | any path | Target directory (defaults to current working directory) |
|
|
27
27
|
|
|
28
|
-
All flags are optional. Providing neither runs the fully interactive mode. Providing `--agents` and `--repo-type` together skips all standard prompts. Adding `--worktree-repository`
|
|
28
|
+
All flags are optional. Providing neither runs the fully interactive mode. Providing `--agents` and `--repo-type` together skips all standard prompts. Adding `--worktree-repository` clones a bare repository, sets up the default branch worktree, runs environment checks, and writes all worktree config to `.osddtrc`.
|
|
29
29
|
|
|
30
30
|
The selected agents and config are saved in `.osddtrc` so that `osddt update` can regenerate the correct files without prompting.
|
|
31
31
|
|
|
@@ -33,8 +33,15 @@ The selected agents and config are saved in `.osddtrc` so that `osddt update` ca
|
|
|
33
33
|
// Standard mode
|
|
34
34
|
{ "repoType": "single", "agents": ["claude"] }
|
|
35
35
|
|
|
36
|
-
// Worktree mode —
|
|
37
|
-
{
|
|
36
|
+
// Worktree mode — written automatically by osddt setup --worktree-repository
|
|
37
|
+
{
|
|
38
|
+
"repoType": "monorepo",
|
|
39
|
+
"agents": ["claude"],
|
|
40
|
+
"worktree-repository": "https://github.com/org/repo.git",
|
|
41
|
+
"bare-path": "/path/to/project/.bare",
|
|
42
|
+
"packageManager": "pnpm",
|
|
43
|
+
"mainBranch": "main"
|
|
44
|
+
}
|
|
38
45
|
```
|
|
39
46
|
|
|
40
47
|
```bash
|
|
@@ -43,6 +50,9 @@ npx @dezkareid/osddt setup
|
|
|
43
50
|
|
|
44
51
|
# Non-interactive (CI-friendly)
|
|
45
52
|
npx @dezkareid/osddt setup --agents claude,gemini --repo-type single
|
|
53
|
+
|
|
54
|
+
# Enable worktree workflow
|
|
55
|
+
npx @dezkareid/osddt setup --agents claude --repo-type monorepo --worktree-repository https://github.com/org/repo.git
|
|
46
56
|
```
|
|
47
57
|
|
|
48
58
|
## Command Templates
|
|
@@ -122,38 +132,76 @@ flowchart LR
|
|
|
122
132
|
|
|
123
133
|
#### Parallel feature workflow (git worktree)
|
|
124
134
|
|
|
125
|
-
Enable worktree mode by providing the repository URL
|
|
135
|
+
Enable worktree mode once during setup by providing the repository URL:
|
|
126
136
|
|
|
127
137
|
```bash
|
|
128
138
|
npx @dezkareid/osddt setup --agents claude --repo-type single --worktree-repository https://github.com/org/repo.git
|
|
129
139
|
```
|
|
130
140
|
|
|
131
|
-
This
|
|
141
|
+
This clones a bare repository into `.bare/`, checks out the default branch as a linked worktree at `.bare/main/`, runs environment checks, and writes all config to `.osddtrc`. From that point on, `/osddt.start` automatically uses the worktree workflow — no further configuration needed.
|
|
142
|
+
|
|
143
|
+
**Resulting directory structure after setup:**
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
project/ ← your working directory (contains .osddtrc, CLAUDE.md, GEMINI.md)
|
|
147
|
+
└── .bare/
|
|
148
|
+
├── main/ ← default branch checked out as a linked worktree
|
|
149
|
+
├── add-payment-gateway/ ← feature worktree created by /osddt.start
|
|
150
|
+
└── fix-login-bug/ ← another feature worktree
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
For a **monorepo**, `working-on/` lives inside the package subdirectory within the worktree:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
.bare/add-payment-gateway/
|
|
157
|
+
├── apps/
|
|
158
|
+
│ └── my-app/
|
|
159
|
+
│ └── working-on/
|
|
160
|
+
│ └── add-payment-gateway/ ← spec, plan, tasks live here
|
|
161
|
+
└── packages/
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Example workflow (single repo):**
|
|
132
165
|
|
|
133
166
|
```
|
|
134
167
|
/osddt.start add-payment-gateway
|
|
168
|
+
# → creates .bare/add-payment-gateway/, checks out feat/add-payment-gateway
|
|
169
|
+
# → scaffolds .bare/add-payment-gateway/working-on/add-payment-gateway/
|
|
170
|
+
|
|
135
171
|
/osddt.spec
|
|
136
172
|
/osddt.plan use Stripe SDK, REST endpoints
|
|
137
173
|
/osddt.tasks
|
|
138
174
|
/osddt.implement
|
|
139
175
|
/osddt.done
|
|
176
|
+
# → archives working-on/, removes the worktree from .bare/
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Example workflow (monorepo — prompts for package path):**
|
|
180
|
+
|
|
140
181
|
```
|
|
182
|
+
/osddt.start add-payment-gateway
|
|
183
|
+
# → prompts: "Package path (e.g. apps/my-app):" → enter apps/payments
|
|
184
|
+
# → creates .bare/add-payment-gateway/apps/payments/working-on/add-payment-gateway/
|
|
141
185
|
|
|
142
|
-
|
|
186
|
+
/osddt.spec
|
|
187
|
+
/osddt.plan use Stripe SDK, REST endpoints
|
|
188
|
+
/osddt.tasks
|
|
189
|
+
/osddt.implement
|
|
190
|
+
/osddt.done
|
|
191
|
+
```
|
|
143
192
|
|
|
144
|
-
You can customise the
|
|
193
|
+
You can customise the base directory where feature worktrees are created by adding `worktreeBase` to `.osddtrc` (defaults to the `bare-path`):
|
|
145
194
|
|
|
146
195
|
```json
|
|
147
196
|
{
|
|
148
197
|
"repoType": "single",
|
|
149
198
|
"worktree-repository": "https://github.com/org/repo.git",
|
|
199
|
+
"bare-path": "/path/to/project/.bare",
|
|
150
200
|
"worktreeBase": "/Users/me/worktrees"
|
|
151
201
|
}
|
|
152
202
|
```
|
|
153
203
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
> **Migration note**: If you previously used `osddt setup-worktree` or `/osddt.start-worktree`, those commands have been removed. Re-run `osddt setup --worktree-repository <url>` to configure the new unified workflow. Manually delete any `osddt.start-worktree.*` files from your agent command directories — `osddt update` will not regenerate them.
|
|
204
|
+
Worktrees are tracked by git itself (`git worktree list`). `osddt.continue` and `osddt.done` call `npx @dezkareid/osddt worktree-info <feature-name>` at runtime to resolve the correct paths — no separate state file is required.
|
|
157
205
|
|
|
158
206
|
#### Resuming after closing a session
|
|
159
207
|
|
package/dist/index.js
CHANGED
|
@@ -603,13 +603,21 @@ ${npxCommand} worktree-info <feature-name>
|
|
|
603
603
|
|
|
604
604
|
**If it exits with code 0 (worktree feature):** parse the JSON to get \`worktreePath\` and \`branch\`, derive \`<project-path>\` from \`workingDir\`, then continue below.
|
|
605
605
|
|
|
606
|
-
4.
|
|
606
|
+
4. Run the done command with the \`--worktree\` flag:
|
|
607
|
+
\`\`\`
|
|
608
|
+
${npxCommand} done <feature-name> --dir <project-path> --worktree
|
|
609
|
+
\`\`\`
|
|
610
|
+
|
|
611
|
+
5. The command will automatically prefix the destination folder name with today's date in \`YYYY-MM-DD\` format.
|
|
612
|
+
For example, \`working-on/feature-a\` will be moved to \`done/YYYY-MM-DD-feature-a\`.
|
|
613
|
+
|
|
614
|
+
6. Check for uncommitted changes inside the worktree:
|
|
607
615
|
|
|
608
616
|
\`\`\`
|
|
609
617
|
git -C <worktreePath> status --porcelain
|
|
610
618
|
\`\`\`
|
|
611
619
|
|
|
612
|
-
|
|
620
|
+
7. If there are **uncommitted changes**:
|
|
613
621
|
1. Run \`git -C <worktreePath> diff\` to inspect them.
|
|
614
622
|
2. Derive a concise commit message in **conventional commit** format (e.g. \`feat: add payment gateway integration\`) based on the diff.
|
|
615
623
|
3. Present the proposed message to the user: _"Use this commit message, or provide your own?"_
|
|
@@ -619,20 +627,12 @@ ${npxCommand} worktree-info <feature-name>
|
|
|
619
627
|
git -C <worktreePath> commit -m "<confirmed-message>"
|
|
620
628
|
\`\`\`
|
|
621
629
|
|
|
622
|
-
|
|
630
|
+
8. Push the branch to remote (covers both first push and subsequent pushes):
|
|
623
631
|
|
|
624
632
|
\`\`\`
|
|
625
633
|
git -C <worktreePath> push --set-upstream origin <branch>
|
|
626
634
|
\`\`\`
|
|
627
635
|
|
|
628
|
-
7. Run the done command with the \`--worktree\` flag:
|
|
629
|
-
\`\`\`
|
|
630
|
-
${npxCommand} done <feature-name> --dir <project-path> --worktree
|
|
631
|
-
\`\`\`
|
|
632
|
-
|
|
633
|
-
8. The command will automatically prefix the destination folder name with today's date in \`YYYY-MM-DD\` format.
|
|
634
|
-
For example, \`working-on/feature-a\` will be moved to \`done/YYYY-MM-DD-feature-a\`.
|
|
635
|
-
|
|
636
636
|
9. Report the result of the command, including the full destination path
|
|
637
637
|
|
|
638
638
|
${getCustomContextStep(npxCommand, 'done')}`,
|
|
@@ -1012,10 +1012,9 @@ function todayPrefix() {
|
|
|
1012
1012
|
async function runDone(featureName, cwd, worktree) {
|
|
1013
1013
|
const barePath = worktree ? await resolveBarePath(process.cwd()) : undefined;
|
|
1014
1014
|
const worktreePath = worktree ? findWorktreeByFeature(barePath, featureName) : undefined;
|
|
1015
|
-
const
|
|
1016
|
-
const src = path.join(projectDir, 'working-on', featureName);
|
|
1015
|
+
const src = path.join(cwd, 'working-on', featureName);
|
|
1017
1016
|
const destName = `${todayPrefix()}-${featureName}`;
|
|
1018
|
-
const dest = path.join(
|
|
1017
|
+
const dest = path.join(cwd, 'done', destName);
|
|
1019
1018
|
if (!(await fs.pathExists(src))) {
|
|
1020
1019
|
console.error(`Error: working-on/${featureName} does not exist.`);
|
|
1021
1020
|
process.exit(1);
|