gsd-lite 0.5.2 → 0.5.3

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.
Files changed (44) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.mcp.json +0 -0
  4. package/README.md +0 -0
  5. package/agents/debugger.md +0 -0
  6. package/agents/executor.md +0 -0
  7. package/agents/researcher.md +0 -0
  8. package/agents/reviewer.md +0 -0
  9. package/commands/doctor.md +2 -2
  10. package/commands/prd.md +0 -0
  11. package/commands/resume.md +0 -0
  12. package/commands/start.md +1 -1
  13. package/commands/status.md +0 -0
  14. package/commands/stop.md +0 -0
  15. package/hooks/context-monitor.js +0 -0
  16. package/hooks/gsd-auto-update.cjs +0 -0
  17. package/hooks/gsd-context-monitor.cjs +0 -0
  18. package/hooks/gsd-session-init.cjs +0 -0
  19. package/hooks/gsd-statusline.cjs +3 -2
  20. package/hooks/hooks.json +0 -0
  21. package/install.js +0 -0
  22. package/launcher.js +0 -0
  23. package/package.json +1 -1
  24. package/references/anti-rationalization-full.md +0 -0
  25. package/references/evidence-spec.md +0 -0
  26. package/references/execution-loop.md +0 -0
  27. package/references/git-worktrees.md +0 -0
  28. package/references/questioning.md +0 -0
  29. package/references/review-classification.md +0 -0
  30. package/references/state-diagram.md +0 -0
  31. package/references/testing-patterns.md +0 -0
  32. package/src/schema.js +27 -0
  33. package/src/server.js +20 -8
  34. package/src/tools/orchestrator.js +0 -0
  35. package/src/tools/state.js +0 -0
  36. package/src/tools/verify.js +0 -0
  37. package/src/utils.js +0 -0
  38. package/uninstall.js +0 -0
  39. package/workflows/debugging.md +0 -0
  40. package/workflows/deviation-rules.md +0 -0
  41. package/workflows/execution-flow.md +0 -0
  42. package/workflows/research.md +0 -0
  43. package/workflows/review-cycle.md +0 -0
  44. package/workflows/tdd-cycle.md +0 -0
@@ -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.2",
16
+ "version": "0.5.3",
17
17
  "keywords": [
18
18
  "orchestration",
19
19
  "mcp",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "author": {
6
6
  "name": "sdsrss",
package/.mcp.json CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -19,7 +19,7 @@ Check if `.gsd/state.json` exists:
19
19
 
20
20
  ## STEP 2: MCP Server Health
21
21
 
22
- Call the `gsd health` MCP tool:
22
+ Call the `health` MCP tool:
23
23
  - If returns `status: "ok"`: record PASS with server version
24
24
  - If returns error or unreachable: record FAIL with error message
25
25
  - Note: if MCP server is not available at all (tool not found), record FAIL "MCP server not registered"
@@ -51,7 +51,7 @@ Check if `.gsd/.state-lock` exists:
51
51
 
52
52
  Check for update-related information:
53
53
  - Read `~/.claude/gsd/package.json` for installed version
54
- - Compare with the version from `gsd health` tool response
54
+ - Compare with the version from `health` tool response
55
55
  - If versions match: record PASS with version number
56
56
  - If mismatch: record WARN "Version mismatch: installed={x}, server={y}"
57
57
  - If `~/.claude/gsd/.update-pending` exists: record INFO "Update pending, will apply on next session"
package/commands/prd.md CHANGED
File without changes
File without changes
package/commands/start.md CHANGED
@@ -12,7 +12,7 @@ argument-hint: Optional feature or project description
12
12
 
13
13
  ## STEP 0 — 已有项目检测
14
14
 
15
- 调用 `gsd health` 工具。如果返回 state_exists=true:
15
+ 调用 `health` 工具(MCP tool 名称: health)。如果返回 state_exists=true:
16
16
  - 告知用户: "检测到进行中的 GSD 项目。"
17
17
  - 提供选项:
18
18
  - (a) 恢复执行 → 转到 `/gsd:resume`
File without changes
package/commands/stop.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -60,10 +60,11 @@ process.stdin.on('end', () => {
60
60
 
61
61
  // Context window display (USED percentage scaled to usable context)
62
62
  // Claude Code reserves ~16.5% for autocompact buffer (configurable via env)
63
- const AUTO_COMPACT_BUFFER_PCT = Number(process.env.GSD_AUTOCOMPACT_BUFFER) || 16.5;
63
+ const AUTO_COMPACT_BUFFER_PCT = Math.min(99, Math.max(0, Number(process.env.GSD_AUTOCOMPACT_BUFFER) || 16.5));
64
64
  let ctx = '';
65
65
  if (remaining != null) {
66
- const usableRemaining = Math.max(0, ((remaining - AUTO_COMPACT_BUFFER_PCT) / (100 - AUTO_COMPACT_BUFFER_PCT)) * 100);
66
+ const divisor = 100 - AUTO_COMPACT_BUFFER_PCT;
67
+ const usableRemaining = divisor > 0 ? Math.max(0, ((remaining - AUTO_COMPACT_BUFFER_PCT) / divisor) * 100) : 0;
67
68
  const used = Math.max(0, Math.min(100, Math.round(100 - usableRemaining)));
68
69
 
69
70
  // Write bridge file for context-monitor PostToolUse hook (skip if remaining unchanged)
package/hooks/hooks.json CHANGED
File without changes
package/install.js CHANGED
File without changes
package/launcher.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-lite",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "type": "module",
6
6
  "bin": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/schema.js CHANGED
@@ -688,6 +688,33 @@ export function createInitialState({ project, phases }) {
688
688
  }
689
689
  }
690
690
 
691
+ // Validate requires references: must be structured objects with valid targets
692
+ for (const [pi, p] of phases.entries()) {
693
+ for (const [ti, t] of (p.tasks || []).entries()) {
694
+ const taskId = `${pi + 1}.${t.index ?? (ti + 1)}`;
695
+ for (const dep of (t.requires || [])) {
696
+ if (typeof dep === 'string') {
697
+ return { error: true, message: `Task ${taskId}: requires entry "${dep}" must be an object {kind: "task"|"phase", id: "..."}, not a string` };
698
+ }
699
+ if (!isPlainObject(dep) || !dep.kind || !dep.id) {
700
+ return { error: true, message: `Task ${taskId}: requires entries must be objects with kind ("task"|"phase") and id` };
701
+ }
702
+ if (!['task', 'phase'].includes(dep.kind)) {
703
+ return { error: true, message: `Task ${taskId}: requires entry kind must be "task" or "phase" (got "${dep.kind}")` };
704
+ }
705
+ if (dep.kind === 'task' && !seenIds.has(String(dep.id))) {
706
+ return { error: true, message: `Task ${taskId}: requires references non-existent task "${dep.id}" (valid IDs: ${[...seenIds].join(', ')})` };
707
+ }
708
+ if (dep.kind === 'phase') {
709
+ const phaseId = Number(dep.id);
710
+ if (!Number.isFinite(phaseId) || phaseId < 1 || phaseId > phases.length) {
711
+ return { error: true, message: `Task ${taskId}: requires references non-existent phase "${dep.id}" (valid: 1-${phases.length})` };
712
+ }
713
+ }
714
+ }
715
+ }
716
+ }
717
+
691
718
  // M-7: Detect circular dependencies within each phase (Kahn's algorithm)
692
719
  for (const [pi, p] of phases.entries()) {
693
720
  const tasks = p.tasks || [];
package/src/server.js CHANGED
@@ -52,7 +52,7 @@ const TOOLS = [
52
52
  name: { type: 'string', description: 'Task name (required)' },
53
53
  index: { type: 'number', description: 'Task index within phase (default: auto)' },
54
54
  level: { type: 'string', description: 'Complexity level: L0/L1/L2/L3 (default: L1)' },
55
- requires: { type: 'array', description: 'Dependency list (default: [])' },
55
+ requires: { type: 'array', description: 'Dependencies: [{kind: "task"|"phase", id: "1.1", gate?: "checkpoint"|"accepted"|"phase_complete"}] (default: [])' },
56
56
  review_required: { type: 'boolean', description: 'Whether review is needed (default: true)' },
57
57
  verification_required: { type: 'boolean', description: 'Whether verification is needed (default: true)' },
58
58
  },
@@ -105,7 +105,7 @@ const TOOLS = [
105
105
  phase_id: { type: 'number', description: 'Phase number to complete' },
106
106
  verification: {
107
107
  type: 'object',
108
- description: 'Optional precomputed verification result object with lint/typecheck/test exit codes',
108
+ description: 'Optional precomputed verification: {lint: {exit_code: number}, typecheck: {exit_code: number}, test: {exit_code: number}} — all three keys required, exit_code 0 = passed',
109
109
  },
110
110
  run_verify: {
111
111
  type: 'boolean',
@@ -133,7 +133,10 @@ const TOOLS = [
133
133
  inputSchema: {
134
134
  type: 'object',
135
135
  properties: {
136
- result: { type: 'object', description: 'Executor result payload' },
136
+ result: {
137
+ type: 'object',
138
+ description: 'Executor result: {task_id: string, outcome: "checkpointed"|"blocked"|"failed", summary: string, checkpoint_commit: string|null, files_changed: string[], decisions: string[], blockers: object[], contract_changed: boolean, evidence: object[]}',
139
+ },
137
140
  },
138
141
  required: ['result'],
139
142
  },
@@ -144,7 +147,10 @@ const TOOLS = [
144
147
  inputSchema: {
145
148
  type: 'object',
146
149
  properties: {
147
- result: { type: 'object', description: 'Debugger result payload' },
150
+ result: {
151
+ type: 'object',
152
+ description: 'Debugger result: {task_id: string, outcome: "root_cause_found"|"fix_suggested"|"failed", root_cause: string, evidence: object[], hypothesis_tested: [{hypothesis: string, result: "confirmed"|"rejected", evidence: string}], fix_direction: string, fix_attempts: integer, blockers: object[], architecture_concern: boolean}',
153
+ },
148
154
  },
149
155
  required: ['result'],
150
156
  },
@@ -155,9 +161,12 @@ const TOOLS = [
155
161
  inputSchema: {
156
162
  type: 'object',
157
163
  properties: {
158
- result: { type: 'object', description: 'Researcher result payload' },
159
- decision_index: { type: 'object', description: 'Decision index keyed by decision id' },
160
- artifacts: { type: 'object', description: 'Markdown artifact contents keyed by file name' },
164
+ result: {
165
+ type: 'object',
166
+ description: 'Researcher result: {decision_ids: string[], volatility: "low"|"medium"|"high", expires_at: ISO8601 string, sources: [{id: string, type: string, ref: string}]}',
167
+ },
168
+ decision_index: { type: 'object', description: 'Decision index keyed by decision id, each value: {summary: string, source?: string, expires_at?: ISO8601}' },
169
+ artifacts: { type: 'object', description: 'Markdown contents keyed by filename: {STACK.md, ARCHITECTURE.md, PITFALLS.md, SUMMARY.md}' },
161
170
  },
162
171
  required: ['result', 'decision_index', 'artifacts'],
163
172
  },
@@ -168,7 +177,10 @@ const TOOLS = [
168
177
  inputSchema: {
169
178
  type: 'object',
170
179
  properties: {
171
- result: { type: 'object', description: 'Reviewer result payload' },
180
+ result: {
181
+ type: 'object',
182
+ description: 'Reviewer result: {scope: "task"|"phase", scope_id: string|number, review_level: "L2"|"L1-batch", spec_passed: boolean, quality_passed: boolean, critical_issues: object[], important_issues: object[], minor_issues: object[], accepted_tasks: string[], rework_tasks: string[], evidence: object[]}',
183
+ },
172
184
  },
173
185
  required: ['result'],
174
186
  },
File without changes
File without changes
File without changes
package/src/utils.js CHANGED
File without changes
package/uninstall.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes