create-quiver 0.5.0 → 0.7.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 (69) hide show
  1. package/.github/workflows/ci.yml +7 -30
  2. package/AGENTS.md.template +41 -0
  3. package/CHANGELOG.md +5 -0
  4. package/README.md +53 -9
  5. package/README_FOR_AI.md +36 -14
  6. package/ROADMAP.md +78 -0
  7. package/docs/AI_CONTEXT.md.template +19 -25
  8. package/docs/AI_ONBOARDING_PROMPT.md.template +12 -0
  9. package/docs/CONTEXTO.md.template +4 -17
  10. package/docs/DECISIONS.md.template +18 -0
  11. package/docs/DEEP.md.template +34 -0
  12. package/docs/DOCUMENTATION_GUIDE.md.template +9 -7
  13. package/docs/GITFLOW_PR_GUIDE.md.template +7 -0
  14. package/docs/INDEX.md.template +9 -0
  15. package/docs/QUICK.md.template +27 -0
  16. package/docs/STANDARD.md.template +49 -0
  17. package/docs/STATUS.md.template +2 -2
  18. package/docs/SUPPORT_MATRIX.md.template +7 -4
  19. package/docs/TESTING_GUIDE_FOR_AI.md.template +4 -3
  20. package/docs/TROUBLESHOOTING.md.template +14 -0
  21. package/docs/WORKFLOW.md.template +19 -5
  22. package/package.json +3 -1
  23. package/package.template.json +13 -1
  24. package/scripts/cleanup-slice.sh +2 -172
  25. package/scripts/init-docs.sh +246 -44
  26. package/scripts/package-quiver.sh +5 -0
  27. package/scripts/start-slice.sh +3 -425
  28. package/specs/[project-name]/EVIDENCE_REPORT.md.template +3 -1
  29. package/specs/[project-name]/slices/slice-template/slice.json +2 -2
  30. package/specs/quiver-v11-existing-project-migration/EVIDENCE_REPORT.md +38 -0
  31. package/specs/quiver-v11-existing-project-migration/SPEC.md +59 -0
  32. package/specs/quiver-v11-existing-project-migration/STATUS.md +26 -0
  33. package/specs/quiver-v11-existing-project-migration/slices/slice-01-non-destructive-migrate-command/slice.json +73 -0
  34. package/specs/quiver-v11-existing-project-migration/slices/slice-02-version-metadata-doctor-upgrade-checks/slice.json +71 -0
  35. package/specs/quiver-v11-existing-project-migration/slices/slice-03-upgrade-docs-legacy-project-smokes/slice.json +78 -0
  36. package/specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md +30 -0
  37. package/specs/quiver-v12-cross-platform-native-runtime/SPEC.md +86 -0
  38. package/specs/quiver-v12-cross-platform-native-runtime/STATUS.md +29 -0
  39. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-01-cross-platform-support-contract/slice.json +69 -0
  40. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-02-node-init-docs-runtime/slice.json +76 -0
  41. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-03-node-migrate-analyze-doctor-flow/slice.json +74 -0
  42. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-04-node-slice-lifecycle-commands/slice.json +81 -0
  43. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-05-generated-project-scripts-and-migration/slice.json +78 -0
  44. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-06-cross-platform-ci-release-readiness/slice.json +74 -0
  45. package/specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md +28 -0
  46. package/specs/quiver-v13-token-efficient-ai-context/SPEC.md +68 -0
  47. package/specs/quiver-v13-token-efficient-ai-context/STATUS.md +26 -0
  48. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-01-token-efficient-ai-modes-guidance/slice.json +65 -0
  49. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-02-decision-log-context-checkpoint/slice.json +64 -0
  50. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-03-project-map-reading-order/slice.json +66 -0
  51. package/specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md +42 -0
  52. package/specs/quiver-v14-tiered-context-pack/SPEC.md +116 -0
  53. package/specs/quiver-v14-tiered-context-pack/STATUS.md +35 -0
  54. package/specs/quiver-v14-tiered-context-pack/slices/slice-01-tiered-context-pack/slice.json +77 -0
  55. package/specs/quiver-v14-tiered-context-pack/slices/slice-02-agents-md-router/slice.json +74 -0
  56. package/specs/quiver-v14-tiered-context-pack/slices/slice-03-active-slice-lifecycle/slice.json +74 -0
  57. package/specs/quiver-v14-tiered-context-pack/slices/slice-04-dedup-frontmatter/slice.json +83 -0
  58. package/specs/quiver-v14-tiered-context-pack/slices/slice-05-doctor-smokes-tiered-pack/slice.json +84 -0
  59. package/src/create-quiver/index.js +360 -40
  60. package/src/create-quiver/lib/analyze.js +9 -0
  61. package/src/create-quiver/lib/doctor.js +212 -0
  62. package/src/create-quiver/lib/git.js +154 -0
  63. package/src/create-quiver/lib/init-docs.js +616 -0
  64. package/src/create-quiver/lib/lifecycle.js +478 -0
  65. package/src/create-quiver/lib/paths.js +19 -0
  66. package/src/create-quiver/lib/readiness.js +300 -0
  67. package/src/create-quiver/lib/scope.js +5 -0
  68. package/src/create-quiver/lib/slice.js +194 -0
  69. package/src/create-quiver/lib/state.js +89 -0
@@ -0,0 +1,49 @@
1
+ # {{PROJECT_NAME}} Standard Context
2
+
3
+ **Date:** {{FECHA}}
4
+ **Status:** {{ESTADO}}
5
+
6
+ This is the default context pack for everyday AI work.
7
+
8
+ ## Reading Order
9
+
10
+ 1. `./QUICK.md`
11
+ 2. `docs/PROJECT_MAP.md`
12
+ 3. `docs/AI_CONTEXT.md`
13
+ 4. `docs/DECISIONS.md`
14
+ 5. `docs/CONTEXTO.md`
15
+ 6. `docs/WORKFLOW.md`
16
+
17
+ ## Conventions
18
+
19
+ - Use maps, metadata, and diffs before opening full source files.
20
+ - Keep scope inside the active slice.
21
+ - Make one commit per slice.
22
+ - Open one PR per spec.
23
+ - Record durable decisions in `docs/DECISIONS.md`.
24
+ - Treat `docs/PROJECT_MAP.md` as the single source of truth for stack, package manager, and command references.
25
+
26
+ ## Workflow Overview
27
+
28
+ - Onboarding starts from `docs/PROJECT_SCAN.json` and `docs/PROJECT_MAP.md`.
29
+ - Implementation starts from `specs/{{PROJECT_SLUG}}/slices/<slice-id>/slice.json`.
30
+ - Review starts from `git diff` and the slice scope.
31
+ - Debugging starts from the command, exit code, first relevant error, and stacktrace.
32
+
33
+ ## Testing Expectations
34
+
35
+ - Validate the active slice before merging.
36
+ - Prefer focused smoke tests over large manual walkthroughs.
37
+ - Preserve existing user-authored content during migration.
38
+ - Keep secret-safe paths and generated heavy folders out of the read path.
39
+
40
+ ## V13 Mode Guidance
41
+
42
+ - Onboarding: read maps and metadata first.
43
+ - Implementation: read `slice.json` and declared files first.
44
+ - Review: inspect `git diff` before full files.
45
+ - Debug: inspect the error signal before long logs.
46
+
47
+ ## Read Next
48
+
49
+ - `./DEEP.md`
@@ -1,7 +1,6 @@
1
1
  # {{PROJECT_NAME}} Status
2
2
 
3
- **Last updated:** {{FECHA}}
4
- **Next update:** {{FECHA_PROXIMA}}
3
+ This page tracks progress, blockers, and the current slice. Stack and command details live in `docs/PROJECT_MAP.md`.
5
4
 
6
5
  ## Overall Status
7
6
 
@@ -24,3 +23,4 @@
24
23
  ## Notes
25
24
 
26
25
  - Update this file after each completed slice.
26
+ - Keep stack and command changes in `docs/PROJECT_MAP.md`, not here.
@@ -9,9 +9,10 @@ Quiver is intentionally opinionated about the first-run environment. If your set
9
9
 
10
10
  | Area | Supported | Notes |
11
11
  |------|-----------|-------|
12
- | Operating systems | macOS and Linux | Windows is not supported in this workflow. |
13
- | Git | Git 2.40+ | Must support worktrees and standard branch refs. |
14
- | Node.js | Node 22.x LTS | Used for date handling and JSON validation. |
12
+ | Operating systems | macOS, Linux, and Windows | Windows native support is verified only when the cross-platform CI matrix is green. |
13
+ | Shells | Terminal, bash-compatible shells, PowerShell, and CMD | Bash is a legacy compatibility path, not a required runtime dependency. |
14
+ | Git | Git 2.40+ | Must support worktrees and standard branch refs on every supported OS. |
15
+ | Node.js | Node 22.x LTS | Required on every supported OS. |
15
16
  | Base branches | `develop` or `main` | Local base branches are preferred; `origin` is optional. |
16
17
  | Worktree state | Clean worktree | Slice execution and PR checks expect no unrelated local changes. |
17
18
  | Path handling | Canonical filesystem paths | Use the physical path to the repo and slice files, not a symlinked alias. |
@@ -26,6 +27,8 @@ Quiver is intentionally opinionated about the first-run environment. If your set
26
27
 
27
28
  ## What This Means
28
29
 
29
- - You can bootstrap a slice on macOS or Linux without changing the scripts.
30
+ - You can bootstrap and run Quiver on macOS, Linux, and Windows native shells once the runtime slices land and the CI matrix is green.
31
+ - Windows native usage should target PowerShell or CMD instead of Bash.
32
+ - Quiver should not auto-install Bash, Git Bash, MSYS2, or WSL.
30
33
  - You do not need a remote to begin work if a local base branch already exists.
31
34
  - If the environment is outside the matrix, fix the machine first instead of working around the scripts.
@@ -31,9 +31,10 @@
31
31
 
32
32
  ## Evidence
33
33
 
34
- - Logs
35
- - Screenshots
36
- - Diff output
34
+ - Prefer summarized command evidence over pasted long logs.
35
+ - Capture the command, exit code, first relevant error, and stacktrace when available.
36
+ - Record the log path or artifact path instead of dumping full logs inline.
37
+ - Use screenshots or diff output only when they are the smallest useful proof.
37
38
 
38
39
  ## If Something Fails
39
40
 
@@ -68,3 +68,17 @@ Use this guide when a first-run bootstrap or gate check fails. The recovery path
68
68
  1. Commit or stash unrelated changes first.
69
69
  2. Re-run the gate from the slice branch.
70
70
  3. Make sure the PR body lives in `pr.md` beside the slice.
71
+
72
+ ## Windows Shell Fallback
73
+
74
+ ### Symptom
75
+
76
+ - You are on Windows and the cross-platform runtime is not yet verified by CI
77
+ - A command expects a Bash-compatible shell before the cross-platform port is complete
78
+
79
+ ### Recovery
80
+
81
+ 1. Prefer PowerShell or CMD once the native runtime slices and CI matrix are complete.
82
+ 2. If you are using an intermediate build and need a temporary bridge, use WSL2 or Git Bash manually.
83
+ 3. Do not expect Quiver to install Bash, WSL, or MSYS2 for you.
84
+ 4. Re-run the command after the cross-platform support slices are merged and the CI matrix is green.
@@ -17,6 +17,15 @@ This document is the canonical implementation workflow for the project.
17
17
  - The troubleshooting guide explains the first-run recovery paths for common bootstrap failures.
18
18
  - The AI onboarding prompt generated after analysis is the handoff for agents that need project context before editing.
19
19
 
20
+ ## Mode-Aware Context Selection
21
+
22
+ - **Onboarding:** read `PROJECT_SCAN.json`, `PROJECT_MAP.md`, `AI_CONTEXT.md`, and `AI_ONBOARDING_PROMPT.md` before source files.
23
+ - **Implementation:** read `docs/ai/ACTIVE_SLICE.md` first when it exists; otherwise read `slice.json`, declared files, nearby tests, and only then adjacent source.
24
+ - **Review:** read `git diff` and the slice scope before opening full files.
25
+ - **Debug:** read the command, exit code, first relevant error, stacktrace, and nearest changed code before long logs.
26
+
27
+ Use maps, metadata, diffs, and summaries first. Open full files only when the smaller context is not enough.
28
+
20
29
  ## Planning
21
30
 
22
31
  1. Triage the request.
@@ -25,22 +34,27 @@ This document is the canonical implementation workflow for the project.
25
34
  4. Mark each slice `ready` before execution.
26
35
  5. Open and merge the documentation PR before running the first slice bootstrap.
27
36
  6. Read the AI context pack, support matrix, and troubleshooting guide before the first slice if the environment is new or uncertain.
28
- 7. If the project was analyzed, read `AI_ONBOARDING_PROMPT.md` before making documentation updates.
37
+ 7. If the project already existed before this Quiver version, run `migrate` before `analyze`.
38
+ 8. If the project was analyzed, read `AI_ONBOARDING_PROMPT.md` before making documentation updates.
39
+ 9. Prefer the generated `quiver:*` npm scripts for repeatable project workflows once the package has been initialized or migrated.
29
40
 
30
41
  ## Execution
31
42
 
32
- 1. Bootstrap the slice with `start-slice.sh`.
43
+ 1. Bootstrap the slice with `npx create-quiver start-slice <slice.json>` or `npm run quiver:start-slice -- <slice.json>`.
33
44
  - The bootstrap step should work with canonical paths and a local base branch when `origin` is absent.
34
- - Draft slices require `--allow-draft`; otherwise `start-slice.sh` exits before execution.
45
+ - Draft slices require `--allow-draft`; otherwise `npx create-quiver start-slice` exits before execution.
46
+ - Legacy Bash wrappers remain available for compatibility, but generated projects should prefer the Node CLI and `quiver:*` npm scripts.
47
+ - `start-slice` generates `docs/ai/ACTIVE_SLICE.md` and `WORKTREE_CONTEXT.md`; use the active slice brief as the source of truth for execution.
35
48
  2. Implement only what the slice declares.
36
49
  3. Make one commit for that slice.
37
- 4. Validate with `check-slice-readiness.sh`.
50
+ 4. Validate with `npx create-quiver check-slice <slice.json>` or `npm run quiver:check-slice -- <slice.json>`.
38
51
  5. Write evidence.
39
52
  6. Repeat for the next slice until the spec is complete.
40
- 7. Open one PR for the spec and use `check-pr-readiness.sh` as the pre-merge gate.
53
+ 7. Open one PR for the spec and use `npx create-quiver check-pr <slice.json>` or `npm run quiver:check-pr -- <slice.json>` as the pre-merge gate.
41
54
 
42
55
  ## Support Contract
43
56
 
57
+ - `docs/PROJECT_MAP.md` is the source of truth for stack, package manager, and commands.
44
58
  - Support Matrix (`SUPPORT_MATRIX.md`) documents what is supported.
45
59
  - AI Context Pack (`AI_CONTEXT.md`) gives the agent-first project snapshot.
46
60
  - Troubleshooting (`TROUBLESHOOTING.md`) documents how to recover when the first run fails.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quiver",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "Quiver CLI for scaffolding projects from the packaged template",
6
6
  "license": "MIT",
@@ -12,8 +12,10 @@
12
12
  "check:pr": "bash tools/scripts/check-pr-readiness.sh",
13
13
  "start:slice": "bash tools/scripts/start-slice.sh",
14
14
  "cleanup:slice": "bash tools/scripts/cleanup-slice.sh",
15
+ "migrate": "bash tools/scripts/migrate-project.sh",
15
16
  "package:quiver": "bash scripts/package-quiver.sh",
16
17
  "smoke:create-quiver": "bash scripts/ci/smoke-create-quiver.sh",
18
+ "smoke:tiered-pack": "bash scripts/ci/smoke-tiered-pack.sh",
17
19
  "release:quiver": "bash scripts/release-quiver.sh"
18
20
  }
19
21
  }
@@ -2,9 +2,21 @@
2
2
  "name": "quiver-docs-template",
3
3
  "private": true,
4
4
  "scripts": {
5
+ "quiver:migrate": "npx create-quiver migrate",
6
+ "quiver:analyze": "npx create-quiver analyze",
7
+ "quiver:doctor": "npx create-quiver doctor",
8
+ "quiver:start-slice": "npx create-quiver start-slice",
9
+ "quiver:check-slice": "npx create-quiver check-slice",
10
+ "quiver:check-pr": "npx create-quiver check-pr",
11
+ "quiver:cleanup-slice": "npx create-quiver cleanup-slice",
12
+ "quiver:check-scope": "npx create-quiver check-scope",
13
+ "quiver:refresh-active-slices": "npx create-quiver refresh-active-slices",
5
14
  "check:slice": "bash tools/scripts/check-slice-readiness.sh",
6
15
  "check:pr": "bash tools/scripts/check-pr-readiness.sh",
7
16
  "start:slice": "bash tools/scripts/start-slice.sh",
8
- "cleanup:slice": "bash tools/scripts/cleanup-slice.sh"
17
+ "cleanup:slice": "bash tools/scripts/cleanup-slice.sh",
18
+ "check:scope": "bash tools/scripts/check-scope.sh",
19
+ "refresh:active-slices": "bash tools/scripts/refresh-active-slices.sh",
20
+ "migrate": "bash tools/scripts/migrate-project.sh"
9
21
  }
10
22
  }
@@ -2,176 +2,6 @@
2
2
 
3
3
  set -euo pipefail
4
4
 
5
- usage() {
6
- cat <<'EOF'
7
- Uso:
8
- bash tools/scripts/cleanup-slice.sh <ruta-al-slice.json> [--close-baseline] [--discard] [--force] [--dry-run]
9
-
10
- Politica:
11
- - slice-00: queda congelado por default; no se elimina salvo --close-baseline
12
- - slice-01+: se elimina despues de merge/rechazo/reemplazo segun la politica del repo
13
-
14
- Opciones:
15
- --close-baseline Permite cerrar y eliminar un slice-00 congelado
16
- --discard Permite cerrar un slice no mergeado (descartado/reemplazado)
17
- --force Fuerza git worktree remove --force y git branch -D
18
- --dry-run Solo informa que haria, no ejecuta cambios
19
- EOF
20
- }
21
-
22
- fail() {
23
- echo "FAIL: $1" >&2
24
- exit 1
25
- }
26
-
27
- pass() {
28
- echo "PASS: $1"
29
- }
30
-
31
- close_baseline="false"
32
- discard="false"
33
- force_delete="false"
34
- dry_run="false"
35
- slice_input=""
36
-
37
- while [[ $# -gt 0 ]]; do
38
- case "$1" in
39
- -h|--help)
40
- usage
41
- exit 0
42
- ;;
43
- --close-baseline)
44
- close_baseline="true"
45
- ;;
46
- --discard)
47
- discard="true"
48
- ;;
49
- --force)
50
- force_delete="true"
51
- ;;
52
- --dry-run)
53
- dry_run="true"
54
- ;;
55
- -*)
56
- fail "Opcion desconocida: $1"
57
- ;;
58
- *)
59
- if [[ -n "$slice_input" ]]; then
60
- fail "Solo se acepta un slice por ejecucion."
61
- fi
62
- slice_input="$1"
63
- ;;
64
- esac
65
- shift
66
- done
67
-
68
- [[ -n "$slice_input" ]] || {
69
- usage
70
- exit 1
71
- }
72
-
73
- command -v git >/dev/null 2>&1 || fail "git no esta disponible en PATH."
74
- command -v node >/dev/null 2>&1 || fail "node no esta disponible en PATH."
75
-
76
5
  repo_root="$(git rev-parse --show-toplevel)"
77
-
78
- [[ -f "$slice_input" ]] || fail "No existe el slice '$slice_input'."
79
-
80
- slice_abs="$(cd "$(dirname "$slice_input")" && pwd)/$(basename "$slice_input")"
81
-
82
- slice_meta=()
83
- while IFS= read -r line; do
84
- slice_meta+=("$line")
85
- done < <(node - "$slice_abs" "$repo_root" <<'NODE'
86
- const fs = require('fs');
87
- const path = require('path');
88
-
89
- const [slicePath, repoRoot] = process.argv.slice(2);
90
- const json = JSON.parse(fs.readFileSync(slicePath, 'utf8'));
91
-
92
- const branchName = String(json.git?.branch_name || '').trim();
93
- const sliceId = String(json.slice_id || '').trim();
94
- const isBaseline = sliceId.startsWith('slice-00');
95
- const repoName = path.basename(repoRoot);
96
- const repoParent = path.dirname(repoRoot);
97
- const worktreesRoot = process.env.SLICE_WORKTREES_DIR || path.join(repoParent, '.worktrees', repoName);
98
- const safeBranchName = branchName.replace(/[^A-Za-z0-9._-]/g, '-');
99
- const worktreePath = path.join(worktreesRoot, safeBranchName);
100
-
101
- console.log(branchName);
102
- console.log(sliceId);
103
- console.log(isBaseline ? 'true' : 'false');
104
- console.log(worktreePath);
105
- NODE
106
- )
107
-
108
- [[ ${#slice_meta[@]} -eq 4 ]] || fail "No se pudo leer la metadata de cleanup del slice."
109
-
110
- branch_name="${slice_meta[0]}"
111
- slice_id="${slice_meta[1]}"
112
- is_baseline="${slice_meta[2]}"
113
- worktree_path="${slice_meta[3]}"
114
-
115
- [[ -n "$branch_name" ]] || fail "Falta git.branch_name en el slice."
116
-
117
- if [[ "$is_baseline" == "true" && "$close_baseline" != "true" ]]; then
118
- echo "INFO: '$slice_id' es baseline. El worktree queda congelado por default."
119
- echo "INFO: Usa --close-baseline solo cuando la primera ola del spec ya este estable o mergeada."
120
- exit 0
121
- fi
122
-
123
- current_branch="$(git branch --show-current)"
124
-
125
- if [[ "$discard" != "true" ]]; then
126
- [[ "$current_branch" == "develop" ]] || fail "El cleanup normal debe correrse desde develop. Rama actual: $current_branch"
127
- [[ -z "$(git status --porcelain)" ]] || fail "El checkout actual no esta limpio. Limpialo antes del cleanup."
128
-
129
- git fetch origin develop >/dev/null 2>&1 || true
130
-
131
- local_develop_sha="$(git rev-parse HEAD)"
132
- remote_develop_sha="$(git rev-parse origin/develop)"
133
- [[ "$local_develop_sha" == "$remote_develop_sha" ]] || fail "develop local no esta actualizado. Ejecuta git pull --ff-only antes del cleanup."
134
-
135
- if git show-ref --verify --quiet "refs/heads/$branch_name"; then
136
- git merge-base --is-ancestor "$branch_name" "origin/develop" || fail "La rama '$branch_name' no esta mergeada en origin/develop. Usa --discard si el slice se descarta."
137
- fi
138
- fi
139
-
140
- worktree_exists="false"
141
- branch_exists="false"
142
-
143
- [[ -d "$worktree_path" ]] && worktree_exists="true"
144
- git show-ref --verify --quiet "refs/heads/$branch_name" && branch_exists="true"
145
-
146
- [[ "$worktree_exists" == "true" || "$branch_exists" == "true" ]] || fail "No existe worktree ni rama local para '$slice_id'."
147
-
148
- remove_worktree_cmd=(git worktree remove "$worktree_path")
149
- remove_branch_cmd=(git branch -d "$branch_name")
150
-
151
- if [[ "$force_delete" == "true" || "$discard" == "true" ]]; then
152
- remove_worktree_cmd=(git worktree remove --force "$worktree_path")
153
- remove_branch_cmd=(git branch -D "$branch_name")
154
- fi
155
-
156
- if [[ "$dry_run" == "true" ]]; then
157
- echo "DRY RUN: slice=$slice_id branch=$branch_name"
158
- [[ "$worktree_exists" == "true" ]] && echo "DRY RUN: ${remove_worktree_cmd[*]}"
159
- [[ "$branch_exists" == "true" ]] && echo "DRY RUN: ${remove_branch_cmd[*]}"
160
- exit 0
161
- fi
162
-
163
- if [[ "$worktree_exists" == "true" ]]; then
164
- "${remove_worktree_cmd[@]}"
165
- pass "Worktree eliminado: $worktree_path"
166
- fi
167
-
168
- if [[ "$branch_exists" == "true" ]]; then
169
- "${remove_branch_cmd[@]}"
170
- pass "Rama local eliminada: $branch_name"
171
- fi
172
-
173
- if [[ -x "$repo_root/tools/scripts/refresh-active-slices.sh" ]]; then
174
- "$repo_root/tools/scripts/refresh-active-slices.sh" >/dev/null 2>&1 || true
175
- fi
176
-
177
- pass "Cleanup finalizado para '$slice_id'."
6
+ cd "$repo_root"
7
+ exec npx create-quiver cleanup-slice "$@"