gsd-lite 0.5.12 → 0.5.13

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 (55) 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 +8 -2
  5. package/agents/debugger.md +0 -0
  6. package/agents/executor.md +8 -0
  7. package/agents/researcher.md +0 -0
  8. package/agents/reviewer.md +14 -0
  9. package/commands/doctor.md +0 -0
  10. package/commands/prd.md +0 -0
  11. package/commands/resume.md +0 -0
  12. package/commands/start.md +0 -0
  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-session-stop.cjs +0 -0
  20. package/hooks/gsd-statusline.cjs +0 -0
  21. package/hooks/hooks.json +0 -0
  22. package/hooks/lib/gsd-finder.cjs +0 -0
  23. package/install.js +0 -0
  24. package/launcher.js +0 -0
  25. package/package.json +1 -1
  26. package/references/anti-rationalization-full.md +0 -0
  27. package/references/evidence-spec.md +0 -0
  28. package/references/execution-loop.md +0 -0
  29. package/references/git-worktrees.md +0 -0
  30. package/references/questioning.md +0 -0
  31. package/references/review-classification.md +0 -0
  32. package/references/state-diagram.md +0 -0
  33. package/references/testing-patterns.md +0 -0
  34. package/src/schema.js +4 -0
  35. package/src/server.js +0 -0
  36. package/src/tools/orchestrator/debugger.js +0 -0
  37. package/src/tools/orchestrator/executor.js +0 -0
  38. package/src/tools/orchestrator/helpers.js +1 -0
  39. package/src/tools/orchestrator/index.js +0 -0
  40. package/src/tools/orchestrator/researcher.js +0 -0
  41. package/src/tools/orchestrator/resume.js +22 -1
  42. package/src/tools/orchestrator/reviewer.js +0 -0
  43. package/src/tools/state/constants.js +0 -0
  44. package/src/tools/state/crud.js +0 -0
  45. package/src/tools/state/index.js +0 -0
  46. package/src/tools/state/logic.js +18 -3
  47. package/src/tools/verify.js +0 -0
  48. package/src/utils.js +0 -0
  49. package/uninstall.js +0 -0
  50. package/workflows/debugging.md +0 -0
  51. package/workflows/deviation-rules.md +0 -0
  52. package/workflows/execution-flow.md +0 -0
  53. package/workflows/research.md +0 -0
  54. package/workflows/review-cycle.md +0 -0
  55. 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.12",
16
+ "version": "0.5.13",
17
17
  "keywords": [
18
18
  "orchestration",
19
19
  "mcp",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
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
@@ -26,6 +26,12 @@ GSD-Lite is an AI orchestration tool for [Claude Code](https://docs.anthropic.co
26
26
  - **Blocked task handling** — Blocked tasks are parked; execution continues with remaining tasks
27
27
  - **Rework propagation** — Critical review issues cascade invalidation to dependent tasks
28
28
 
29
+ ### Adaptive Review & Parallel Execution
30
+ - **Confidence-based review adjustment** — Executor self-assesses confidence (high/medium/low); orchestrator auto-adjusts review level accordingly
31
+ - **Impact analysis before review** — Reviewer runs impact analysis on multi-file changes to catch missed downstream effects
32
+ - **Parallel task scheduling** — Independent tasks within the same phase are identified for concurrent dispatch
33
+ - **Auto PR suggestion** — Phase/project completion prompts PR creation with evidence summary
34
+
29
35
  ### Context Protection
30
36
  - **Subagent isolation** — Each task runs in its own agent context, preventing cross-contamination
31
37
  - **StatusLine monitoring** — Real-time context health tracking via Claude Code StatusLine
@@ -243,7 +249,7 @@ gsd-lite/
243
249
  ├── references/ # 8 reference docs
244
250
  ├── hooks/ # Session lifecycle (StatusLine + PostToolUse + SessionStart + Stop + AutoUpdate)
245
251
  │ └── lib/ # Shared hook utilities (gsd-finder)
246
- ├── tests/ # 804 tests (unit + simulation + E2E)
252
+ ├── tests/ # 822 tests (unit + simulation + E2E)
247
253
  ├── cli.js # Install/uninstall CLI entry
248
254
  ├── install.js # Installation script
249
255
  └── uninstall.js # Uninstall script
@@ -252,7 +258,7 @@ gsd-lite/
252
258
  ## Testing
253
259
 
254
260
  ```bash
255
- npm test # Run all 804 tests
261
+ npm test # Run all 822 tests
256
262
  npm run test:coverage # Tests + coverage report (94%+ lines, 81%+ branches)
257
263
  npm run lint # Biome lint
258
264
  node --test tests/file.js # Run a single test file
File without changes
@@ -55,6 +55,7 @@ tools: Read, Write, Edit, Bash, Grep, Glob
55
55
  "decisions": ["[DECISION] use optimistic locking by version column"],
56
56
  "blockers": [],
57
57
  "contract_changed": true,
58
+ "confidence": "high",
58
59
  "evidence": [
59
60
  {"id": "ev:test:users-update", "scope": "task:2.3"},
60
61
  {"id": "ev:typecheck:phase-2", "scope": "task:2.3"}
@@ -67,6 +68,13 @@ tools: Read, Write, Edit, Bash, Grep, Glob
67
68
  - 改了共享类型定义 / 接口 → true
68
69
  - 只改了内部实现逻辑、不影响外部调用方 → false
69
70
  - 拿不准时 → true (安全优先)
71
+
72
+ `confidence` 判定指南 (用于审查级别自动调整):
73
+ - "high" — 测试全通过 + 改动明确 + 无意外复杂度
74
+ - "medium" — 测试通过但有不确定性 (边界条件、并发、外部依赖)
75
+ - "low" — 有已知风险/跳过的测试/不确定的副作用
76
+ - 拿不准时 → "medium"
77
+ - 编排器会根据 confidence 自动升/降审查级别
70
78
  </result_contract>
71
79
 
72
80
  <uncertainty_handling>
File without changes
@@ -58,12 +58,26 @@ L2 关键任务 → 单任务独立 review
58
58
  - 拿不准时 → 升一级处理
59
59
  </review_strategy>
60
60
 
61
+ <impact_analysis>
62
+ ## 审查前影响分析 (多文件变更时)
63
+
64
+ 当 `files_changed` 包含 3+ 文件,或涉及跨模块修改时:
65
+ 1. 使用 `code-graph-mcp impact <主要变更的函数/类名>` 分析影响范围
66
+ 2. 检查调用方是否都已被修改或兼容
67
+ 3. 将未覆盖的影响范围标注为 Critical issue
68
+
69
+ 这能发现 executor 遗漏的下游影响,是审查增值的关键步骤。
70
+ 单文件内部修改可跳过此步骤。
71
+ 如 `code-graph-mcp` 不可用,改用 Grep/Glob 手动追踪变更函数的调用方。
72
+ </impact_analysis>
73
+
61
74
  <stage_1_spec_review>
62
75
  检查代码是否符合任务规格:
63
76
  - 所有需求都实现了吗?
64
77
  - 有没有多余的实现 (YAGNI)?
65
78
  - 接口/API 是否符合计划?
66
79
  - 测试是否覆盖了需求中的每个场景?
80
+ - 影响分析发现的调用方是否都已适配?
67
81
  结果: ✅ 通过 / ❌ 列出不符合项 (附具体代码位置)
68
82
  </stage_1_spec_review>
69
83
 
File without changes
package/commands/prd.md CHANGED
File without changes
File without changes
package/commands/start.md CHANGED
File without changes
File without changes
package/commands/stop.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/hooks/hooks.json CHANGED
File without changes
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.12",
3
+ "version": "0.5.13",
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
@@ -586,6 +586,10 @@ export function validateExecutorResult(r) {
586
586
  if (r.outcome === 'checkpointed' && typeof r.checkpoint_commit !== 'string') {
587
587
  errors.push('checkpointed outcome requires checkpoint_commit');
588
588
  }
589
+ // confidence is optional; when present must be one of the valid values
590
+ if ('confidence' in r && !['high', 'medium', 'low'].includes(r.confidence)) {
591
+ errors.push('confidence must be "high", "medium", or "low"');
592
+ }
589
593
  return { valid: errors.length === 0, errors };
590
594
  }
591
595
 
package/src/server.js CHANGED
File without changes
File without changes
File without changes
@@ -23,6 +23,7 @@ const RESULT_CONTRACTS = {
23
23
  decisions: '{ id, title, rationale }[] — architectural decisions made',
24
24
  blockers: '{ description, type }[] — what blocked progress (when outcome="blocked")',
25
25
  contract_changed: 'boolean — true if external API/behavior contract changed',
26
+ confidence: '"high" | "medium" | "low" (optional) — executor self-assessed confidence; affects review level',
26
27
  evidence: '{ type, detail }[] — verification evidence (test results, lint, etc.)',
27
28
  },
28
29
  reviewer: {
File without changes
File without changes
@@ -118,7 +118,16 @@ async function resumeExecutingTask(state, basePath) {
118
118
  }],
119
119
  });
120
120
  if (persistError) return persistError;
121
- return buildExecutorDispatch(state, phase, task);
121
+ const dispatch = buildExecutorDispatch(state, phase, task);
122
+ // Expose parallel-available tasks so callers can dispatch multiple subagents
123
+ if (selection.parallel_available?.length > 0) {
124
+ dispatch.parallel_available = selection.parallel_available.map(t => ({
125
+ id: t.id,
126
+ name: t.name,
127
+ level: t.level || 'L1',
128
+ }));
129
+ }
130
+ return dispatch;
122
131
  }
123
132
 
124
133
  if (selection.mode === 'trigger_review') {
@@ -179,12 +188,20 @@ async function resumeExecutingTask(state, basePath) {
179
188
  });
180
189
  if (advanceError) return advanceError;
181
190
  }
191
+ // Check if this is the last phase — suggest PR creation
192
+ const isLastPhase = phase.id === state.total_phases;
182
193
  return {
183
194
  success: true,
184
195
  action: 'complete_phase',
185
196
  workflow_mode: 'executing_task',
186
197
  phase_id: phase.id,
187
198
  message: 'All tasks accepted and review passed; phase ready for completion',
199
+ ...(isLastPhase ? {
200
+ pr_suggestion: {
201
+ recommended: true,
202
+ message: 'All phases complete. Consider creating a PR with `gh pr create`.',
203
+ },
204
+ } : {}),
188
205
  };
189
206
  }
190
207
 
@@ -366,6 +383,10 @@ export async function resumeWorkflow({ basePath = process.cwd(), _depth = 0, unb
366
383
  completed_phases: (state.phases || []).filter((phase) => phase.lifecycle === 'accepted').length,
367
384
  total_phases: state.total_phases,
368
385
  message: 'Workflow already completed',
386
+ pr_suggestion: {
387
+ recommended: true,
388
+ message: 'Project complete. Consider creating a PR with `gh pr create` if not already done.',
389
+ },
369
390
  };
370
391
  case 'failed': {
371
392
  const failedPhases = [];
File without changes
File without changes
File without changes
File without changes
@@ -66,7 +66,10 @@ export function selectRunnableTask(phase, state, { maxRetry = DEFAULT_MAX_RETRY
66
66
  }
67
67
 
68
68
  if (runnableTasks.length > 0) {
69
- return { task: runnableTasks[0] };
69
+ return {
70
+ task: runnableTasks[0],
71
+ ...(runnableTasks.length > 1 ? { parallel_available: runnableTasks.slice(1) } : {}),
72
+ };
70
73
  }
71
74
 
72
75
  const awaitingReview = phase.todo.filter(t => t.lifecycle === 'checkpointed');
@@ -236,8 +239,9 @@ const SENSITIVE_KEYWORDS = /\b(auth|payment|security|public.?api|login|token|cre
236
239
 
237
240
  /**
238
241
  * Reclassify review level at runtime based on executor results.
239
- * Upgrades L1->L2 when contract_changed + sensitive keywords or [LEVEL-UP].
240
- * Never downgrades.
242
+ * Upgrades L1->L2 when: contract_changed + sensitive keywords, [LEVEL-UP], or low confidence.
243
+ * Downgrades L1->L0 when: confidence is high and no contract change.
244
+ * Never downgrades L2/L3.
241
245
  */
242
246
  export function reclassifyReviewLevel(task, executorResult) {
243
247
  const currentLevel = task.level || 'L1';
@@ -259,6 +263,17 @@ export function reclassifyReviewLevel(task, executorResult) {
259
263
  return 'L2';
260
264
  }
261
265
 
266
+ // Confidence-based adjustment: low confidence upgrades L1 → L2
267
+ if (executorResult.confidence === 'low' && currentLevel === 'L1') {
268
+ return 'L2';
269
+ }
270
+
271
+ // High confidence on non-sensitive L1 tasks → downgrade to L0 (self-review sufficient)
272
+ if (executorResult.confidence === 'high' && currentLevel === 'L1'
273
+ && !executorResult.contract_changed) {
274
+ return 'L0';
275
+ }
276
+
262
277
  return currentLevel;
263
278
  }
264
279
 
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