gsd-lite 0.5.9 → 0.5.10

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.
@@ -13,7 +13,7 @@
13
13
  "name": "gsd",
14
14
  "source": "./",
15
15
  "description": "AI orchestration tool — GSD management shell + Superpowers quality core. 5 commands, 4 agents, 5 workflows, MCP server, context monitoring.",
16
- "version": "0.5.9",
16
+ "version": "0.5.10",
17
17
  "keywords": [
18
18
  "orchestration",
19
19
  "mcp",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "author": {
6
6
  "name": "sdsrss",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-lite",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "type": "module",
6
6
  "bin": {
package/src/server.js CHANGED
@@ -92,6 +92,7 @@ const TOOLS = [
92
92
  },
93
93
  },
94
94
  research: { type: 'boolean', description: 'Whether research directory is needed' },
95
+ force: { type: 'boolean', description: 'Force reinitialize when state.json already exists (default: false)' },
95
96
  },
96
97
  required: ['project', 'phases'],
97
98
  },
@@ -1112,7 +1112,7 @@ export async function handleReviewerResult({ result, basePath = process.cwd() }
1112
1112
  if (state.error) return state;
1113
1113
 
1114
1114
  const phase = result.scope === 'phase'
1115
- ? (state.phases || []).find((p) => p.id === result.scope_id) || getCurrentPhase(state)
1115
+ ? (state.phases || []).find((p) => p.id === Number(result.scope_id)) || null
1116
1116
  : getCurrentPhase(state);
1117
1117
  if (!phase) {
1118
1118
  return { error: true, message: `Phase not found for scope_id ${result.scope_id}` };
@@ -1141,6 +1141,7 @@ export async function handleReviewerResult({ result, basePath = process.cwd() }
1141
1141
  taskPatches.push({
1142
1142
  id: taskId,
1143
1143
  lifecycle: 'needs_revalidation',
1144
+ retry_count: 0,
1144
1145
  evidence_refs: [],
1145
1146
  last_review_feedback: taskIssues.length > 0 ? taskIssues : null,
1146
1147
  });
@@ -1157,7 +1158,7 @@ export async function handleReviewerResult({ result, basePath = process.cwd() }
1157
1158
  // Collect propagation-affected task patches (tasks mutated in-memory by propagateInvalidation)
1158
1159
  for (const task of (phase.todo || [])) {
1159
1160
  if (task.lifecycle === 'needs_revalidation' && !taskPatches.some((p) => p.id === task.id)) {
1160
- taskPatches.push({ id: task.id, lifecycle: 'needs_revalidation', evidence_refs: [] });
1161
+ taskPatches.push({ id: task.id, lifecycle: 'needs_revalidation', retry_count: 0, evidence_refs: [] });
1161
1162
  }
1162
1163
  }
1163
1164
 
@@ -88,6 +88,9 @@ export async function init({ project, phases, research, force = false, basePath
88
88
  if (!Array.isArray(phases)) {
89
89
  return { error: true, code: ERROR_CODES.INVALID_INPUT, message: 'phases must be an array' };
90
90
  }
91
+ if (phases.length === 0) {
92
+ return { error: true, code: ERROR_CODES.INVALID_INPUT, message: 'phases must contain at least one phase' };
93
+ }
91
94
  const gsdDir = join(basePath, '.gsd');
92
95
  const statePath = join(gsdDir, 'state.json');
93
96
  ensureLockPathFromStatePath(statePath);