create-claude-workspace 1.1.111 → 1.1.113

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.
@@ -123,7 +123,9 @@ If MEMORY.md indicates "Project complete" (Current Phase contains "PROJECT COMPL
123
123
  7. **Do NOT delete** the `Done` section or `Release History` — previous work is preserved
124
124
  - Then continue with the normal health check (step 2+). The new tasks will be picked up in STEP 1.
125
125
 
126
- **If no new tasks found** (TODO.md has no `[ ]` and no external issues ingested) → project is truly complete, end session.
126
+ **If no new tasks found** (TODO.md has no `[ ]` and no external issues ingested):
127
+ - Run `git status --short` — if there are uncommitted/untracked source files (excluding `.env`, `node_modules/`, `.claude/autonomous-state.json`), the project is NOT complete. These files need to be reviewed and committed. Create a task: `- [ ] **Review uncommitted files** — [count] uncommitted files found after completion, review and commit or discard (Complexity: S, Type: fullstack)` and continue development.
128
+ - If working tree is clean → project is truly complete, end session.
127
129
 
128
130
  ### 2. Resolve app names and package manager
129
131
  - Read CLAUDE.md — find app name(s) and package manager from the Architecture/Tech Stack section
@@ -183,6 +185,11 @@ Before doing anything, check for unexpected state from user intervention or prev
183
185
  - Check if there's an open MR/PR for it → if merged, delete branch and switch to main
184
186
  - If not merged: create a worktree from this branch (`git worktree add .worktrees/{branch} {branch}`), switch project root back to main (`git checkout main 2>/dev/null || git checkout master`), and resume from the worktree
185
187
  - Check if TODO.md or MEMORY.md were manually edited (compare git diff) → accept changes, adjust plan
188
+ - **Uncommitted source files**: Run `git status --short` on the project root. If there are untracked or modified files OTHER than MEMORY.md/TODO.md (which are handled above):
189
+ - These may be leftover implementation files from a crashed session that never got committed.
190
+ - List them in a log message. Do NOT delete or discard them.
191
+ - If `Current Task` is set in MEMORY.md, these files likely belong to that task — they should be committed as part of resuming the task.
192
+ - If no `Current Task` is set, these are orphaned changes. Create a new task to review and commit them: add `- [ ] **Review uncommitted files** — [count] uncommitted files found in working tree, review and commit or discard (Complexity: S, Type: fullstack)` at the top of the current phase in TODO.md.
186
193
 
187
194
  ### 6. Check required files exist
188
195
  Resolve in THIS order (each depends on the previous):
@@ -417,14 +424,22 @@ To determine if a task is frontend, backend, or fullstack, use this heuristic:
417
424
  - If product-owner recommends changes -> delegate to `technical-planner` to update TODO.md
418
425
  - CLAUDE.md refresh: attempt `/revise-claude-md` skill. If the skill is not available, manually read CLAUDE.md, append any new patterns/conventions discovered during the completed phase under `## Project-Specific Details`, and commit the update.
419
426
  - **Release**: if git integration active, delegate to `devops-integrator`: "Phase [N-1] is complete. Create a minor release with changelog from conventional commits since last tag. Close the milestone for Phase [N-1]."
420
- - **npm Publish** (if CLAUDE.md has `Distribution: npm`): after the release tag is created, check if the CI pipeline will handle publishing (MEMORY.md `NPM_CI_AUTH: configured` + CI publish job exists in `.github/workflows/` or `.gitlab-ci.yml`). If CI handles it, do nothing — the tag triggers the pipeline. If no CI publish job yet (first release, or no CI configured), publish directly:
421
- 1. Read CLAUDE.md for registry and access level
422
- 2. **Pre-flight**: `npm whoami --registry [REGISTRY_URL]`if 401/403, log error to MEMORY.md and skip publish (do not crash)
423
- 3. **Version bump**: update library `package.json` version to match the release tag (e.g., tag `v1.1.0` version `1.1.0`). Use `nx release version [VERSION] --skip-publish` if available, otherwise update `package.json` directly. Commit the version bump: `git add [lib]/package.json && git commit -m "chore: bump [LIB] to [VERSION]"`, then re-tag if needed.
424
- 4. Build publishable libraries: `nx build [LIB] --configuration=production`
425
- 5. Publish: `npm publish dist/libs/[LIB] --access [public/restricted]`
426
- 6. If this is the **first publish** (npm returns 404/not-found before publish): log in MEMORY.md Notes: "First npm publish done locally for [LIB]. User should configure Trusted Publishing on npmjs.com for future CI publishes."
427
- 7. **NEVER** echo, log, or write the npm token value it is read from `~/.npmrc` automatically
427
+ - **npm Publish** (if CLAUDE.md has `Distribution: npm`): after the release tag is created, check if the CI pipeline will handle publishing (MEMORY.md `NPM_CI_AUTH: configured` + CI publish job exists in `.github/workflows/` or `.gitlab-ci.yml`).
428
+ - **If CI publish job exists**: the tag push triggers the pipeline. **You MUST watch the pipeline to completion:**
429
+ 1. Poll CI status for the tag pipeline (same approach as STEP 9b `gh run list --branch [tag]` / `glab ci list --branch [tag]`).
430
+ 2. **If pipeline succeeds**: verify the package was actually published `npm view [PACKAGE]@[VERSION] version`. If it returns the expected version, publish is confirmed. Log in MEMORY.md Notes.
431
+ 3. **If pipeline fails**: fetch logs, diagnose the failure. Common causes: missing CI secret (`NPM_TOKEN`/`NODE_AUTH_TOKEN`), wrong registry URL, build failure.
432
+ - **Fixable in CI config** (e.g., missing secret, wrong config): delegate to `deployment-engineer` to fix. Re-trigger pipeline. Max 2 fix attempts.
433
+ - **Not fixable in CI** (e.g., registry auth issues, npm outage): fall back to direct publish (steps below).
434
+ 4. **Do NOT assume "CI handles it" and move on.** An unverified publish is a silent failure.
435
+ - **If no CI publish job** (first release, or no CI configured), publish directly:
436
+ 1. Read CLAUDE.md for registry and access level
437
+ 2. **Pre-flight**: `npm whoami --registry [REGISTRY_URL]` — if 401/403, log error to MEMORY.md and skip publish (do not crash)
438
+ 3. **Version bump**: update library `package.json` version to match the release tag (e.g., tag `v1.1.0` → version `1.1.0`). Use `nx release version [VERSION] --skip-publish` if available, otherwise update `package.json` directly. Commit the version bump: `git add [lib]/package.json && git commit -m "chore: bump [LIB] to [VERSION]"`, then re-tag if needed.
439
+ 4. Build publishable libraries: `nx build [LIB] --configuration=production`
440
+ 5. Publish: `npm publish dist/libs/[LIB] --access [public/restricted]`
441
+ 6. If this is the **first publish** (npm returns 404/not-found before publish): log in MEMORY.md Notes: "First npm publish done locally for [LIB]. User should configure Trusted Publishing on npmjs.com for future CI publishes."
442
+ 7. **NEVER** echo, log, or write the npm token value — it is read from `~/.npmrc` automatically
428
443
  - Update MEMORY.md (on main): set `Current Task: [task title]`
429
444
  - **Create worktree** (see §Git Worktree Workflow):
430
445
  - If git integration is active (TODO.md has `<!-- #N -->` markers):
@@ -783,7 +798,9 @@ To determine if a task is frontend, backend, or fullstack, use this heuristic:
783
798
  - One task per invocation — after post-merge, end session. The external loop will start the next invocation.
784
799
  - **CRITICAL: ZERO commits after merge.** MEMORY.md and TODO.md are already on main (they came from the merge). Do NOT `git add`, do NOT `git commit`, do NOT create `chore:` commits. If you see tracking files as "modified" after merge, that is IMPOSSIBLE if STEP 9 was done correctly — investigate, do NOT blindly commit.
785
800
  - **If no `[ ]` tasks remain in current phase AND zero `[~]` exist** (all completed) -> phase transition (handled at start of STEP 1)
786
- - **If no `[ ]` tasks remain in ALL phases AND zero `[~]` exist** (everything completed) -> final completion sequence:
801
+ - **If no `[ ]` tasks remain in ALL phases AND zero `[~]` exist** (everything completed):
802
+ - **Pre-completion check**: Run `git status --short` — if there are uncommitted/untracked source files (excluding `.env`, `node_modules/`, `.claude/autonomous-state.json`), do NOT enter completion sequence. These files represent unfinished work. Create a task to review and commit them, then continue STEP 1.
803
+ - If working tree is clean → final completion sequence:
787
804
  1. Delegate to `product-owner` agent:
788
805
  "This is a PHASE RE-EVALUATION (final). All tasks in TODO.md are complete. Read PRODUCT.md, TODO.md, MEMORY.md, and scan the current codebase.
789
806
  Evaluate: is the product complete and ready for release, or are there additional features/improvements needed?
@@ -795,7 +812,7 @@ To determine if a task is frontend, backend, or fullstack, use this heuristic:
795
812
  - Update MEMORY.md with "Project complete" status
796
813
  - Final CLAUDE.md refresh (attempt `/revise-claude-md`, fallback to manual update)
797
814
  - **Final release**: if git integration active, delegate to `devops-integrator`: "Project is complete. Create a stable release (v1.0.0 if first stable, or next major/minor). Include full changelog. Close all remaining milestones."
798
- - **npm Publish** (if CLAUDE.md has `Distribution: npm`): same logic as phase transition publish — let CI handle it if configured, otherwise publish directly. For the final release, verify the published version matches the release tag.
815
+ - **npm Publish** (if CLAUDE.md has `Distribution: npm`): same logic as phase transition publish — watch CI pipeline to completion if configured, fall back to direct publish on failure. For the final release, verify the published version matches the release tag: `npm view [PACKAGE]@[VERSION] version`.
799
816
  - End loop
800
817
 
801
818
  ## MEMORY.md Template
@@ -823,7 +840,7 @@ For critical production bugs (outside normal TODO.md flow):
823
840
  - Copy MEMORY.md into worktree. MEMORY.md: add note under "Notes": `Hotfix: [description] ([date])`, set `Current Task` to `(none)`, `Current Step` to `(none)`, `Current Worktree` to `(none)`
824
841
  - Do NOT update TODO.md checkboxes unless the fix corresponds to an existing task
825
842
  7. Post-merge: follow STEP 10 logic (merge to main from project root, clean up worktree + branch). No additional commits.
826
- 8. **Patch release**: if git integration active, delegate to `devops-integrator`: "Hotfix merged. Create a patch release with changelog."
843
+ 8. **Patch release**: if git integration active, delegate to `devops-integrator`: "Hotfix merged. Create a patch release with changelog." If CLAUDE.md has `Distribution: npm`, follow the same publish verification logic as phase transition (watch CI pipeline, verify `npm view`, fall back to direct publish on failure).
827
844
 
828
845
  **Skipped steps:** STEP 4 (tests — unless the bug reveals missing test coverage), STEP 5 (visual verification).
829
846
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.111",
3
+ "version": "1.1.113",
4
4
  "author": "",
5
5
  "repository": {
6
6
  "type": "git",