@zhuan-ai/zhuanspec 2.10.0 → 2.11.2

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.
@@ -1,7 +1,6 @@
1
1
  import { execSync } from 'child_process';
2
2
  import { readdirSync, existsSync, realpathSync } from 'fs';
3
3
  import path from 'path';
4
- import { select, input } from '@inquirer/prompts';
5
4
  /**
6
5
  * Git repository detector utilities for finding git repos in a directory hierarchy
7
6
  */
@@ -246,6 +245,7 @@ export class GitRepoDetector {
246
245
  * }
247
246
  */
248
247
  export async function promptForGitRepoOrSkip() {
248
+ const { select, input } = await import('@inquirer/prompts');
249
249
  const action = await select({
250
250
  message: 'No git repository detected. What would you like to do?',
251
251
  choices: [
@@ -83,6 +83,7 @@ export async function setPhase(changeDir, phase) {
83
83
  taskCount: 0,
84
84
  completedTaskCount: 0,
85
85
  }],
86
+ proposalChanges: [],
86
87
  stats: { tokenUsageTotal: 0, contextLoad: 0, durationMs: { propose: 0, apply: 0, review: 0, archive: 0 } },
87
88
  };
88
89
  }
@@ -117,6 +118,7 @@ export async function setPhase(changeDir, phase) {
117
118
  taskCount: 0,
118
119
  completedTaskCount: 0,
119
120
  }],
121
+ proposalChanges: [],
120
122
  stats: { tokenUsageTotal: 0, contextLoad: 0, durationMs: { propose: 0, apply: 0, review: 0, archive: 0 } },
121
123
  };
122
124
  }
@@ -208,7 +210,12 @@ export async function getCurrentPhase(changeDir) {
208
210
  if (await FileSystemUtils.fileExists(proposalPath)) {
209
211
  return 'propose';
210
212
  }
211
- // 4. Check for design.md without .tech-design (could be techDesign or propose)
213
+ // 4. Check for techDesign/ directory
214
+ const techDesignDir = path.join(changeDir, 'techDesign');
215
+ if (await FileSystemUtils.directoryExists(techDesignDir)) {
216
+ return 'techDesign';
217
+ }
218
+ // 4b. Check for design.md without .tech-design (could be techDesign or propose)
212
219
  const designPath = path.join(changeDir, 'design.md');
213
220
  if (await FileSystemUtils.fileExists(designPath)) {
214
221
  // If design.md exists but no proposal.md, likely techDesign
@@ -221,6 +228,12 @@ export async function getCurrentPhase(changeDir) {
221
228
  * Check if a directory is a techDesign change (can be reused by proposal)
222
229
  */
223
230
  export async function isTechDesignChange(changeDir) {
231
+ // Check new techDesign/ directory structure first
232
+ const techDesignDir = path.join(changeDir, 'techDesign');
233
+ if (await FileSystemUtils.directoryExists(techDesignDir)) {
234
+ return true;
235
+ }
236
+ // Backward compat: check old .tech-design marker file
224
237
  const techDesignMarker = path.join(changeDir, '.tech-design');
225
238
  if (await FileSystemUtils.fileExists(techDesignMarker)) {
226
239
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhuan-ai/zhuanspec",
3
- "version": "2.10.0",
3
+ "version": "2.11.2",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "zhuanspec",
@@ -39,6 +39,26 @@
39
39
  "!dist/**/__tests__",
40
40
  "!dist/**/*.map"
41
41
  ],
42
+ "scripts": {
43
+ "lint": "eslint src/",
44
+ "build": "node build.js",
45
+ "dev": "tsc --watch",
46
+ "dev:cli": "pnpm build && node bin/zhuanspec.js",
47
+ "test": "vitest run",
48
+ "test:watch": "vitest",
49
+ "test:ui": "vitest --ui",
50
+ "test:coverage": "vitest --coverage",
51
+ "test:postinstall": "node scripts/postinstall.js",
52
+ "prepare": "npm run build",
53
+ "prepublishOnly": "npm run build",
54
+ "postinstall": "node scripts/postinstall.js",
55
+ "check:pack-version": "node scripts/pack-version-check.mjs",
56
+ "diagnose:cursor": "node scripts/diagnose-cursor-commands.js",
57
+ "release": "pnpm run release:ci",
58
+ "release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
59
+ "release:local": "pnpm exec changeset version && pnpm run check:pack-version && pnpm exec changeset publish",
60
+ "changeset": "changeset"
61
+ },
42
62
  "engines": {
43
63
  "node": ">=20.19.0"
44
64
  },
@@ -60,23 +80,5 @@
60
80
  "ora": "^8.2.0",
61
81
  "yaml": "^2.8.2",
62
82
  "zod": "^4.0.17"
63
- },
64
- "scripts": {
65
- "lint": "eslint src/",
66
- "build": "node build.js",
67
- "dev": "tsc --watch",
68
- "dev:cli": "pnpm build && node bin/zhuanspec.js",
69
- "test": "vitest run",
70
- "test:watch": "vitest",
71
- "test:ui": "vitest --ui",
72
- "test:coverage": "vitest --coverage",
73
- "test:postinstall": "node scripts/postinstall.js",
74
- "postinstall": "node scripts/postinstall.js",
75
- "check:pack-version": "node scripts/pack-version-check.mjs",
76
- "diagnose:cursor": "node scripts/diagnose-cursor-commands.js",
77
- "release": "pnpm run release:ci",
78
- "release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
79
- "release:local": "pnpm exec changeset version && pnpm run check:pack-version && pnpm exec changeset publish",
80
- "changeset": "changeset"
81
83
  }
82
- }
84
+ }