worclaude 2.2.3 → 2.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worclaude",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "CLI tool that scaffolds a comprehensive Claude Code workflow into any project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,17 +2,13 @@ import path from 'node:path';
2
2
  import { execSync } from 'node:child_process';
3
3
  import inquirer from 'inquirer';
4
4
  import ora from 'ora';
5
- import {
6
- computeFileHashes,
7
- requireWorkflowMeta,
8
- writeWorkflowMeta,
9
- getPackageVersion,
10
- } from '../core/config.js';
5
+ import { requireWorkflowMeta, writeWorkflowMeta, getPackageVersion } from '../core/config.js';
11
6
  import { createBackup } from '../core/backup.js';
12
7
  import { categorizeFiles } from '../core/file-categorizer.js';
13
8
  import { buildSettingsJson, mergeSettingsPermissionsAndHooks } from '../core/merger.js';
14
9
  import { readTemplate, updateGitignore } from '../core/scaffolder.js';
15
10
  import { writeFile, fileExists } from '../utils/file.js';
11
+ import { hashFile } from '../utils/hash.js';
16
12
  import { getLatestNpmVersion } from '../utils/npm.js';
17
13
  import * as display from '../utils/display.js';
18
14
  import { semverLessThan, migrateSkillFormat, patchAgentDescriptions } from '../core/migration.js';
@@ -240,8 +236,24 @@ export async function upgradeCommand() {
240
236
  // Ensure sessions directory exists for session persistence
241
237
  await writeFile(path.join(projectRoot, '.claude', 'sessions', '.gitkeep'), '');
242
238
 
243
- // Recompute file hashes
244
- const fileHashes = await computeFileHashes(projectRoot);
239
+ // Partial hash update — rehash ONLY files we just wrote. User-customized
240
+ // ("modified") files and conflict-sidecar'd files keep their original
241
+ // stored hash so their "install state" baseline is preserved across
242
+ // upgrades. Otherwise the next template change would silently overwrite
243
+ // the customization via the autoUpdate path.
244
+ const fileHashes = { ...meta.fileHashes };
245
+ for (const { key } of categories.autoUpdate) {
246
+ const filePath = path.join(projectRoot, '.claude', ...key.split('/'));
247
+ fileHashes[key] = await hashFile(filePath);
248
+ }
249
+ for (const { key } of categories.newFiles) {
250
+ const filePath = path.join(projectRoot, '.claude', ...key.split('/'));
251
+ fileHashes[key] = await hashFile(filePath);
252
+ }
253
+ for (const { key } of categories.deleted) {
254
+ delete fileHashes[key];
255
+ }
256
+ // modified, conflict, unchanged, userAdded: stored hash deliberately left alone
245
257
 
246
258
  // Ensure .gitignore has worclaude entries
247
259
  await updateGitignore(projectRoot);
@@ -33,6 +33,11 @@ files (see git-conventions.md for the canonical list).
33
33
 
34
34
  ## Notes for Next Session
35
35
  - {anything the next session should know}
36
+
37
+ ## Workflow Observability
38
+ - **Agents invoked:** {ALL agents used this session — explicit @agent calls AND agents invoked implicitly by commands like /verify, /review-plan, /refactor-clean. Write "none" if no agents were used.}
39
+ - **Commands used:** {all slash commands run earlier in this session, e.g. /start, /verify, /refactor-clean. Do NOT include the current /commit-push-pr or /end that is writing this summary. Write "none" if no other commands were used.}
40
+ - **Verification result:** {if /verify was run: passed/failed with brief summary; otherwise "not run".}
36
41
  ```
37
42
  - Keep it concise — this is for machine consumption at session start,
38
43
  not a detailed report
@@ -28,6 +28,9 @@ If you are working in a git worktree (not the main checkout):
28
28
  - Filename: YYYY-MM-DD-HHMM-{short-branch-name}.md
29
29
  - Same format as /commit-push-pr session summaries
30
30
  - Mark the task as "IN PROGRESS" since /end means work is unfinished
31
+ - Fill in the ## Workflow Observability section: list agents invoked and
32
+ slash commands used so far (excluding the current /end). Verification
33
+ result is "not run" unless /verify was executed earlier in the session.
31
34
  4. git add -A
32
35
  5. git commit -m "wip: handoff for [task description]"
33
36
  Use exactly this message format — no trailers or Co-Authored-By lines.