@dezkareid/osddt 1.11.13 → 1.11.14

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 (2) hide show
  1. package/dist/index.js +24 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -603,21 +603,13 @@ ${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. 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:
606
+ 4. Check for uncommitted changes inside the worktree:
615
607
 
616
608
  \`\`\`
617
609
  git -C <worktreePath> status --porcelain
618
610
  \`\`\`
619
611
 
620
- 7. If there are **uncommitted changes**:
612
+ 5. If there are **uncommitted changes**:
621
613
  1. Run \`git -C <worktreePath> diff\` to inspect them.
622
614
  2. Derive a concise commit message in **conventional commit** format (e.g. \`feat: add payment gateway integration\`) based on the diff.
623
615
  3. Present the proposed message to the user: _"Use this commit message, or provide your own?"_
@@ -627,12 +619,20 @@ ${npxCommand} worktree-info <feature-name>
627
619
  git -C <worktreePath> commit -m "<confirmed-message>"
628
620
  \`\`\`
629
621
 
630
- 8. Push the branch to remote (covers both first push and subsequent pushes):
622
+ 6. Push the branch to remote (covers both first push and subsequent pushes):
631
623
 
632
624
  \`\`\`
633
625
  git -C <worktreePath> push --set-upstream origin <branch>
634
626
  \`\`\`
635
627
 
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')}`,
@@ -1019,6 +1019,19 @@ async function runDone(featureName, cwd, worktree) {
1019
1019
  console.error(`Error: working-on/${featureName} does not exist.`);
1020
1020
  process.exit(1);
1021
1021
  }
1022
+ if (worktree && worktreePath && (await fs.pathExists(worktreePath))) {
1023
+ try {
1024
+ const status = execSync('git status --porcelain', { cwd: worktreePath, encoding: 'utf8', stdio: 'pipe' });
1025
+ if (status.trim().length > 0) {
1026
+ console.error('Error: Worktree has uncommitted changes. Commit or stash them before running osddt done.');
1027
+ process.exit(1);
1028
+ }
1029
+ }
1030
+ catch {
1031
+ console.error('Error: Could not verify worktree status. Ensure the worktree is a valid git repository and has no uncommitted changes before proceeding.');
1032
+ process.exit(1);
1033
+ }
1034
+ }
1022
1035
  await fs.ensureDir(path.dirname(dest));
1023
1036
  await fs.move(src, dest);
1024
1037
  console.log(`Moved: working-on/${featureName} → done/${destName}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dezkareid/osddt",
3
- "version": "1.11.13",
3
+ "version": "1.11.14",
4
4
  "description": "Package for Spec-Driven Development workflow",
5
5
  "keywords": [
6
6
  "spec-driven",