create-claude-workspace 1.1.87 → 1.1.89

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ladislav Brodecký
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -150,71 +150,19 @@ git pull --rebase origin HEAD
150
150
  ```
151
151
  If no remote, skip this step.
152
152
 
153
- ### 8. Check git log and structure
154
- - `git log --oneline -10`
155
- - Scan current file structure
156
-
157
- ### 9. Detect PLAN.md changes
158
- If `PLAN.md` exists in the project root, check whether it changed since the last session. This runs AFTER git sync (step 6) to avoid commit conflicts with remote changes.
159
-
160
- 1. Read PLAN.md content
161
- 2. Read MEMORY.md `PLAN_MD_Hash` value (if present)
162
- 3. Compute a hash of PLAN.md content: take first 8 chars of hex SHA-256 (`node -e "const c=require('crypto');process.stdout.write(c.createHash('sha256').update(require('fs').readFileSync('PLAN.md','utf-8')).digest('hex').slice(0,8))"`)
163
- 4. If hash matches → skip (no changes). If `PLAN_MD_Hash` is absent (first run) → treat as "changed" to seed the state.
164
- 5. If changed — read PLAN.md and diff against current project state. Delegate updates based on WHICH sections changed:
165
-
166
- | Changed section | Action |
167
- |---|---|
168
- | **Product Vision** (Target users, Core problem, MVP features, Non-goals) | Delegate to `product-owner`: "PLAN.md Product Vision was updated. Read the new PLAN.md and current PRODUCT.md. Update PRODUCT.md to reflect the new vision. Output what changed." |
169
- | **Technical Decisions** (Framework, Backend, Database, Deployment, CI/CD, Testing) | Delegate to `technical-planner`: "PLAN.md Technical Decisions were updated. Read new PLAN.md, current CLAUDE.md, and TODO.md. Update TODO.md tasks if the tech stack changed (e.g., framework switch may invalidate existing tasks). Update CLAUDE.md Tech Stack section to match." If only Deployment/CI/CD changed, also delegate to `deployment-engineer`: "PLAN.md deployment config changed. Update CI/CD pipeline config to match new settings." |
170
- | **Workflow** (Mode, Branch strategy, Auto-push, Auto-merge, Review required) | Update CLAUDE.md `Workflow:` field directly. If mode changed from solo→team or team→solo, log in MEMORY.md Notes. |
171
- | **Constraints** (Max lines per file, Coverage threshold, Forbidden patterns) | Update CLAUDE.md constraints section directly (Code Quality & Linting, coverage thresholds). |
172
- | **Project Info** (Name, Description, Framework, Package manager, Monorepo) | Delegate to `technical-planner`: "PLAN.md Project Info changed. Update CLAUDE.md header and Tech Stack to match." |
173
- | **Access & Credentials** | Validate new credentials (run auth checks). Log status in MEMORY.md Session Config. Do NOT store credential values. |
174
- | **Initial State / Runtime** | Read values but do NOT delegate — these are consumed by `autonomous.mjs`, not agents. |
175
-
176
- 6. After all delegations complete, update MEMORY.md: set `PLAN_MD_Hash: [new-hash]`
177
- 7. If any files were modified (CLAUDE.md, PRODUCT.md, TODO.md), commit: `git add CLAUDE.md PRODUCT.md TODO.md MEMORY.md && git commit -m "chore: propagate PLAN.md changes to project files"`
178
- 8. Push if remote exists: `git push origin HEAD`
179
- 9. Skip this entire step if PLAN.md does not exist.
180
-
181
- **How to detect which sections changed** (without storing the old file):
182
- - Compare PLAN.md values against current project files:
183
- - `Product Vision` → compare MVP features list against PRODUCT.md features
184
- - `Technical Decisions` → compare framework/backend/database against CLAUDE.md Tech Stack
185
- - `Workflow` → compare mode against CLAUDE.md `Workflow:` field
186
- - `Constraints` → compare coverage threshold against CLAUDE.md code quality section
187
- - If a PLAN.md value differs from the corresponding project file value, that section "changed"
188
-
189
- ### 10. Retroactive git integration sync
190
- - **Trigger condition**: remote exists (`git remote -v | grep origin`) AND TODO.md exists with tasks BUT no `<!-- #N -->` markers found in TODO.md AND CLI is available (`gh --version` or `glab --version`) AND auth is valid (`gh auth status` or `glab auth status`)
191
- - This means work was done locally without git integration (token was missing or platform wasn't set up), and now it's available
192
- - Delegate to `devops-integrator` agent:
193
- "Run retroactive sync (Operation 9). TODO.md has tasks completed locally without git integration.
194
- Create milestones for all phases, create issues for all tasks, and sync their status:
195
- - `[x]` tasks → create issue with `status::done` label (already completed locally)
196
- - `[~]` tasks → create issue with `status::skipped` label
197
- - `[ ]` tasks → create issue with `status::todo` label
198
- Add `<!-- #N -->` markers to TODO.md for all created issues.
199
- This is a one-time sync — subsequent iterations will use normal git integration."
200
- - After sync, commit the updated TODO.md: `git add TODO.md && git commit -m "chore: sync TODO.md with git platform issues"`
201
- - Push if remote exists: `git push origin HEAD`
202
- - Log in MEMORY.md Notes: "Retroactive git sync completed — [N] issues created, [M] marked as done"
203
- - Skip if any trigger condition is not met (no remote, no TODO.md, markers already present, CLI missing, auth invalid)
204
-
205
- ### 11. Kit auto-upgrade (check npm + migrate project)
206
- Automatically check for newer `create-claude-workspace` versions, update kit files, analyze changes, and create migration tasks for the target project.
153
+ ### 8. Kit auto-upgrade (check npm + migrate project)
154
+ Automatically check for newer `create-claude-workspace` versions, update kit files, analyze changes, and create migration tasks for the target project. Runs early (before PLAN.md detection and other checks) so that agents, profiles, and templates are up-to-date before any delegation.
207
155
 
208
- #### 11a. Check npm registry for latest version
156
+ #### 8a. Check npm registry for latest version
209
157
  ```bash
210
158
  CURRENT=$(cat .claude/.kit-version 2>/dev/null || echo "0.0.0")
211
159
  LATEST=$(npm view create-claude-workspace version 2>/dev/null || echo "")
212
160
  ```
213
- - If `LATEST` is empty (network failure, npm unavailable) → skip entire step 11
214
- - If `LATEST` equals `CURRENT` → skip (already up to date)
215
- - If `LATEST` is newer than `CURRENT` → proceed to 11b
161
+ - If `LATEST` is empty (network failure, npm unavailable) → skip npm upgrade, but still proceed to 8c (local diff check)
162
+ - If `LATEST` is newer than `CURRENT` → proceed to 8b (npm upgrade)
163
+ - If `LATEST` equals `CURRENT` → skip 8b, proceed to 8c (local diff check — files may have been updated manually via `--update` or edited by hand)
216
164
 
217
- #### 11b. Update kit files
165
+ #### 8b. Update kit files (only if newer version on npm)
218
166
  ```bash
219
167
  # Run update using the project's package runner
220
168
  {PKG_RUNNER} create-claude-workspace@latest --update
@@ -222,12 +170,13 @@ LATEST=$(npm view create-claude-workspace version 2>/dev/null || echo "")
222
170
  - This overwrites `.claude/` files (agents, profiles, templates, docker, router, .kit-version) with the latest version
223
171
  - Project-specific files (CLAUDE.md, PRODUCT.md, TODO.md, MEMORY.md) are NOT touched by the update command
224
172
 
225
- #### 11c. Capture and analyze diff
173
+ #### 8c. Capture and analyze diff (ALWAYS runs)
174
+ Check for uncommitted changes in `.claude/` — these may come from 8b (npm upgrade) OR from manual `--update` / hand edits between sessions:
226
175
  ```bash
227
176
  # Capture what changed in .claude/
228
177
  git diff .claude/
229
178
  ```
230
- - If diff is empty (update ran but nothing changed) → skip to 11e
179
+ - If diff is empty (no changes in .claude/) → skip to 8e
231
180
  - Categorize changes:
232
181
  - **Template changes** (`.claude/templates/claude-md.md`) → new conventions, patterns, rules for project CLAUDE.md
233
182
  - **Profile changes** (`.claude/profiles/*.md`) → new frontend patterns, review checklists
@@ -235,10 +184,10 @@ git diff .claude/
235
184
  - **Docker changes** (`.claude/docker/*`) → updated container config
236
185
  - **Router changes** (`.claude/CLAUDE.md`) → updated routing instructions
237
186
 
238
- #### 11d. Create migration tasks (if project changes needed)
187
+ #### 8d. Create migration tasks (if project changes needed)
239
188
  Only if template or profile changes affect the target project — delegate to `technical-planner`:
240
189
 
241
- "The `create-claude-workspace` kit was upgraded from v{CURRENT} to v{LATEST}. Below is the diff of changed files. Analyze what changed and determine if the TARGET PROJECT needs migration or refactoring tasks.
190
+ "The `create-claude-workspace` kit files were updated (v{CURRENT} v{LATEST}, or manual update). Below is the diff of changed files. Analyze what changed and determine if the TARGET PROJECT needs migration or refactoring tasks.
242
191
 
243
192
  **The diff:**
244
193
  ```
@@ -263,11 +212,11 @@ Only if template or profile changes affect the target project — delegate to `t
263
212
 
264
213
  Read the current TODO.md and MEMORY.md for context on the project's current phase and tech stack."
265
214
 
266
- - If planner returns `MIGRATION: NONE` → no tasks created, proceed to 11e
215
+ - If planner returns `MIGRATION: NONE` → no tasks created, proceed to 8e
267
216
  - If planner creates tasks → if git integration active, delegate to `devops-integrator` to create issues for the new migration tasks
268
217
  - Log in MEMORY.md Notes: "Kit upgraded v{CURRENT} → v{LATEST}: [N migration tasks created / no project migration needed]"
269
218
 
270
- #### 11e. Commit update + refresh CLAUDE.md
219
+ #### 8e. Commit update + refresh CLAUDE.md
271
220
  1. Run `/revise-claude-md` to reconcile the project's CLAUDE.md with new conventions from the updated template (`.claude/templates/claude-md.md`). If `/revise-claude-md` is unavailable, manually compare CLAUDE.md against the template and update sections with new content. Do NOT overwrite project-specific content (project name, tech stack choices, deployment config).
272
221
  2. Update MEMORY.md: set `Kit_Version: [value from .claude/.kit-version]`
273
222
  3. Commit all changes:
@@ -277,15 +226,67 @@ Read the current TODO.md and MEMORY.md for context on the project's current phas
277
226
  ```
278
227
  4. Push if remote exists: `git push origin HEAD`
279
228
 
280
- #### 11f. Migration task priority
281
- - After step 11 completes, if migration tasks were created in TODO.md, they become the **next tasks to pick** in STEP 1 (before any regular development tasks in the current phase)
229
+ #### 8f. Migration task priority
230
+ - After step 8 completes, if migration tasks were created in TODO.md, they become the **next tasks to pick** in STEP 1 (before any regular development tasks in the current phase), subject to the crash-recovery exception in STEP 1 (if `Current Worktree` is set, the in-progress task is finished first)
282
231
  - This ensures the project stays aligned with kit conventions before new features are built on outdated patterns
283
232
  - Migration tasks follow the normal development cycle (STEP 1-12) — they get architect plans, tests, review, just like any other task
284
233
 
285
234
  #### Skip conditions
286
- - `.claude/.kit-version` does not exist → skip entire step 11
287
- - `npm view` fails (network, npm not installed) → skip, log in MEMORY.md Notes: "Kit version check skipped npm registry unreachable"
288
- - Current version equals latest → skip (up to date)
235
+ - `.claude/.kit-version` does not exist → skip entire step 8
236
+ - `npm view` fails (network, npm not installed) → skip npm upgrade (8b), but still check local diff (8c)
237
+ - No uncommitted changes in `.claude/` AND version is current → skip (nothing to do)
238
+
239
+ ### 9. Check git log and structure
240
+ - `git log --oneline -10`
241
+ - Scan current file structure
242
+
243
+ ### 10. Detect PLAN.md changes
244
+ If `PLAN.md` exists in the project root, check whether it changed since the last session. This runs AFTER git sync (step 7) to avoid commit conflicts with remote changes.
245
+
246
+ 1. Read PLAN.md content
247
+ 2. Read MEMORY.md `PLAN_MD_Hash` value (if present)
248
+ 3. Compute a hash of PLAN.md content: take first 8 chars of hex SHA-256 (`node -e "const c=require('crypto');process.stdout.write(c.createHash('sha256').update(require('fs').readFileSync('PLAN.md','utf-8')).digest('hex').slice(0,8))"`)
249
+ 4. If hash matches → skip (no changes). If `PLAN_MD_Hash` is absent (first run) → treat as "changed" to seed the state.
250
+ 5. If changed — read PLAN.md and diff against current project state. Delegate updates based on WHICH sections changed:
251
+
252
+ | Changed section | Action |
253
+ |---|---|
254
+ | **Product Vision** (Target users, Core problem, MVP features, Non-goals) | Delegate to `product-owner`: "PLAN.md Product Vision was updated. Read the new PLAN.md and current PRODUCT.md. Update PRODUCT.md to reflect the new vision. Output what changed." |
255
+ | **Technical Decisions** (Framework, Backend, Database, Deployment, CI/CD, Testing) | Delegate to `technical-planner`: "PLAN.md Technical Decisions were updated. Read new PLAN.md, current CLAUDE.md, and TODO.md. Update TODO.md tasks if the tech stack changed (e.g., framework switch may invalidate existing tasks). Update CLAUDE.md Tech Stack section to match." If only Deployment/CI/CD changed, also delegate to `deployment-engineer`: "PLAN.md deployment config changed. Update CI/CD pipeline config to match new settings." |
256
+ | **Workflow** (Mode, Branch strategy, Auto-push, Auto-merge, Review required) | Update CLAUDE.md `Workflow:` field directly. If mode changed from solo→team or team→solo, log in MEMORY.md Notes. |
257
+ | **Constraints** (Max lines per file, Coverage threshold, Forbidden patterns) | Update CLAUDE.md constraints section directly (Code Quality & Linting, coverage thresholds). |
258
+ | **Project Info** (Name, Description, Framework, Package manager, Monorepo) | Delegate to `technical-planner`: "PLAN.md Project Info changed. Update CLAUDE.md header and Tech Stack to match." |
259
+ | **Access & Credentials** | Validate new credentials (run auth checks). Log status in MEMORY.md Session Config. Do NOT store credential values. |
260
+ | **Initial State / Runtime** | Read values but do NOT delegate — these are consumed by `autonomous.mjs`, not agents. |
261
+
262
+ 6. After all delegations complete, update MEMORY.md: set `PLAN_MD_Hash: [new-hash]`
263
+ 7. If any files were modified (CLAUDE.md, PRODUCT.md, TODO.md), commit: `git add CLAUDE.md PRODUCT.md TODO.md MEMORY.md && git commit -m "chore: propagate PLAN.md changes to project files"`
264
+ 8. Push if remote exists: `git push origin HEAD`
265
+ 9. Skip this entire step if PLAN.md does not exist.
266
+
267
+ **How to detect which sections changed** (without storing the old file):
268
+ - Compare PLAN.md values against current project files:
269
+ - `Product Vision` → compare MVP features list against PRODUCT.md features
270
+ - `Technical Decisions` → compare framework/backend/database against CLAUDE.md Tech Stack
271
+ - `Workflow` → compare mode against CLAUDE.md `Workflow:` field
272
+ - `Constraints` → compare coverage threshold against CLAUDE.md code quality section
273
+ - If a PLAN.md value differs from the corresponding project file value, that section "changed"
274
+
275
+ ### 11. Retroactive git integration sync
276
+ - **Trigger condition**: remote exists (`git remote -v | grep origin`) AND TODO.md exists with tasks BUT no `<!-- #N -->` markers found in TODO.md AND CLI is available (`gh --version` or `glab --version`) AND auth is valid (`gh auth status` or `glab auth status`)
277
+ - This means work was done locally without git integration (token was missing or platform wasn't set up), and now it's available
278
+ - Delegate to `devops-integrator` agent:
279
+ "Run retroactive sync (Operation 9). TODO.md has tasks completed locally without git integration.
280
+ Create milestones for all phases, create issues for all tasks, and sync their status:
281
+ - `[x]` tasks → create issue with `status::done` label (already completed locally)
282
+ - `[~]` tasks → create issue with `status::skipped` label
283
+ - `[ ]` tasks → create issue with `status::todo` label
284
+ Add `<!-- #N -->` markers to TODO.md for all created issues.
285
+ This is a one-time sync — subsequent iterations will use normal git integration."
286
+ - After sync, commit the updated TODO.md: `git add TODO.md && git commit -m "chore: sync TODO.md with git platform issues"`
287
+ - Push if remote exists: `git push origin HEAD`
288
+ - Log in MEMORY.md Notes: "Retroactive git sync completed — [N] issues created, [M] marked as done"
289
+ - Skip if any trigger condition is not met (no remote, no TODO.md, markers already present, CLI missing, auth invalid)
289
290
 
290
291
  ### 12. Ingest external issues (if git integration active)
291
292
  - **Only run at phase transitions** — not every invocation
@@ -321,7 +322,7 @@ To determine if a task is frontend, backend, or fullstack, use this heuristic:
321
322
  - Read MEMORY.md, find next incomplete item and current phase
322
323
  - Update MEMORY.md: set `Current Step: 1 — PICK`
323
324
  - Cross-reference with TODO.md — find the first unchecked `- [ ]` task in the current phase
324
- - **Kit-upgrade tasks first**: if any `- [ ]` tasks in the current phase have `Kit-Upgrade:` tag, pick those before any regular tasks (regardless of position in the phase)
325
+ - **Kit-upgrade tasks first**: if any `- [ ]` tasks in the current phase have `Kit-Upgrade:` tag, pick those before any regular tasks (regardless of position in the phase). **Exception**: if `Current Worktree` is set in MEMORY.md (in-progress task from a previous session), finish that task first — kit-upgrade will be picked in the next clean invocation. Never remove an in-progress worktree to make room for a kit-upgrade task.
325
326
  - Skip tasks marked as `- [~]` (skipped/blocked)
326
327
  - **If no `[ ]` tasks remain in the current phase**: advance to the next phase. Update MEMORY.md `Current Phase` to the next phase heading from TODO.md. Then look for the first `- [ ]` task in that new phase. This IS a phase transition — the phase transition check below will trigger for the first task. If no `[ ]` tasks remain in ANY phase, go to the final completion sequence in STEP 12.
327
328
  - **Dependency check**: verify ALL tasks listed in "Depends on" are checked `[x]` in TODO.md. If any dependency is incomplete, skip this task and pick the next one without unmet dependencies.
@@ -29,8 +29,8 @@ RUN GLAB_VER=$(curl -fsSL "https://gitlab.com/api/v4/projects/34675721/releases/
29
29
  -o /tmp/glab.deb && \
30
30
  dpkg -i /tmp/glab.deb && rm /tmp/glab.deb
31
31
 
32
- # Install bun (system-wide so non-root claude user can access it)
33
- RUN BUN_INSTALL=/usr/local curl -fsSL https://bun.sh/install | bash
32
+ # Install bun (system-wide via npm — reliable PATH, works for non-root claude user)
33
+ RUN npm install -g bun
34
34
 
35
35
  # Install Claude Code natively as the claude user
36
36
  RUN gosu claude bash -c 'curl -fsSL https://claude.ai/install.sh | bash'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.87",
3
+ "version": "1.1.89",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {