@kenkaiiii/ggcoder 5.74.2 → 5.75.0

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 (218) hide show
  1. package/README.md +1 -1
  2. package/assets/skills/bulletproof/SKILL.md +1 -1
  3. package/assets/skills/clarify/SKILL.md +1 -1
  4. package/assets/skills/code-review/SKILL.md +1 -1
  5. package/assets/skills/compliance-guard/SKILL.md +1 -1
  6. package/assets/skills/durable/SKILL.md +1 -1
  7. package/assets/skills/evidence-led-ui/SKILL.md +1 -1
  8. package/assets/skills/lean/SKILL.md +1 -1
  9. package/assets/skills/refactoring/SKILL.md +1 -1
  10. package/assets/skills/root-cause/SKILL.md +1 -1
  11. package/assets/skills/shared-language/SKILL.md +1 -1
  12. package/assets/skills/tdd/SKILL.md +1 -1
  13. package/dist/app-sidecar/app-settings.d.ts +65 -0
  14. package/dist/app-sidecar/app-settings.js +147 -0
  15. package/dist/app-sidecar/app-settings.js.map +1 -0
  16. package/dist/app-sidecar/attachments.d.ts +11 -0
  17. package/dist/app-sidecar/attachments.js +47 -0
  18. package/dist/app-sidecar/attachments.js.map +1 -0
  19. package/dist/app-sidecar/auth-routes.d.ts +3 -0
  20. package/dist/app-sidecar/auth-routes.js +290 -0
  21. package/dist/app-sidecar/auth-routes.js.map +1 -0
  22. package/dist/app-sidecar/autopilot-runner.d.ts +61 -0
  23. package/dist/app-sidecar/autopilot-runner.js +367 -0
  24. package/dist/app-sidecar/autopilot-runner.js.map +1 -0
  25. package/dist/app-sidecar/file-search.d.ts +15 -0
  26. package/dist/app-sidecar/file-search.js +103 -0
  27. package/dist/app-sidecar/file-search.js.map +1 -0
  28. package/dist/app-sidecar/hf-pull-manager.d.ts +20 -0
  29. package/dist/app-sidecar/hf-pull-manager.js +224 -0
  30. package/dist/app-sidecar/hf-pull-manager.js.map +1 -0
  31. package/dist/app-sidecar/history-routes.d.ts +3 -0
  32. package/dist/app-sidecar/history-routes.js +375 -0
  33. package/dist/app-sidecar/history-routes.js.map +1 -0
  34. package/dist/app-sidecar/history.d.ts +67 -0
  35. package/dist/app-sidecar/history.js +23 -0
  36. package/dist/app-sidecar/history.js.map +1 -0
  37. package/dist/app-sidecar/http.d.ts +5 -0
  38. package/dist/app-sidecar/http.js +27 -0
  39. package/dist/app-sidecar/http.js.map +1 -0
  40. package/dist/app-sidecar/integration-routes.d.ts +3 -0
  41. package/dist/app-sidecar/integration-routes.js +286 -0
  42. package/dist/app-sidecar/integration-routes.js.map +1 -0
  43. package/dist/app-sidecar/json-mode.d.ts +10 -0
  44. package/dist/app-sidecar/json-mode.js +73 -0
  45. package/dist/app-sidecar/json-mode.js.map +1 -0
  46. package/dist/app-sidecar/keep-awake.d.ts +4 -0
  47. package/dist/app-sidecar/keep-awake.js +5 -0
  48. package/dist/app-sidecar/keep-awake.js.map +1 -0
  49. package/dist/app-sidecar/ken-context.d.ts +20 -0
  50. package/dist/app-sidecar/ken-context.js +55 -0
  51. package/dist/app-sidecar/ken-context.js.map +1 -0
  52. package/dist/app-sidecar/mcp-routes.d.ts +3 -0
  53. package/dist/app-sidecar/mcp-routes.js +185 -0
  54. package/dist/app-sidecar/mcp-routes.js.map +1 -0
  55. package/dist/app-sidecar/mcp-rows.d.ts +31 -0
  56. package/dist/app-sidecar/mcp-rows.js +77 -0
  57. package/dist/app-sidecar/mcp-rows.js.map +1 -0
  58. package/dist/app-sidecar/progress-manager.d.ts +10 -0
  59. package/dist/app-sidecar/progress-manager.js +116 -0
  60. package/dist/app-sidecar/progress-manager.js.map +1 -0
  61. package/dist/app-sidecar/prompt-routes.d.ts +3 -0
  62. package/dist/app-sidecar/prompt-routes.js +354 -0
  63. package/dist/app-sidecar/prompt-routes.js.map +1 -0
  64. package/dist/app-sidecar/route-context.d.ts +145 -0
  65. package/dist/app-sidecar/route-context.js +2 -0
  66. package/dist/app-sidecar/route-context.js.map +1 -0
  67. package/dist/app-sidecar/run-control-routes.d.ts +3 -0
  68. package/dist/app-sidecar/run-control-routes.js +430 -0
  69. package/dist/app-sidecar/run-control-routes.js.map +1 -0
  70. package/dist/app-sidecar/session-routes.d.ts +3 -0
  71. package/dist/app-sidecar/session-routes.js +115 -0
  72. package/dist/app-sidecar/session-routes.js.map +1 -0
  73. package/dist/app-sidecar/session-types.d.ts +39 -0
  74. package/dist/app-sidecar/session-types.js +5 -0
  75. package/dist/app-sidecar/session-types.js.map +1 -0
  76. package/dist/app-sidecar/task-routes.d.ts +3 -0
  77. package/dist/app-sidecar/task-routes.js +149 -0
  78. package/dist/app-sidecar/task-routes.js.map +1 -0
  79. package/dist/app-sidecar/usage.d.ts +19 -0
  80. package/dist/app-sidecar/usage.js +153 -0
  81. package/dist/app-sidecar/usage.js.map +1 -0
  82. package/dist/app-sidecar/workspace-routes.d.ts +3 -0
  83. package/dist/app-sidecar/workspace-routes.js +244 -0
  84. package/dist/app-sidecar/workspace-routes.js.map +1 -0
  85. package/dist/app-sidecar.js +482 -3695
  86. package/dist/app-sidecar.js.map +1 -1
  87. package/dist/cli.js +2 -2
  88. package/dist/cli.js.map +1 -1
  89. package/dist/config.js +1 -1
  90. package/dist/core/acceptance-checks.js +3 -9
  91. package/dist/core/acceptance-checks.js.map +1 -1
  92. package/dist/core/agent-session/helpers.d.ts +26 -0
  93. package/dist/core/agent-session/helpers.js +47 -0
  94. package/dist/core/agent-session/helpers.js.map +1 -0
  95. package/dist/core/agent-session/mcp-tools.d.ts +68 -0
  96. package/dist/core/agent-session/mcp-tools.js +195 -0
  97. package/dist/core/agent-session/mcp-tools.js.map +1 -0
  98. package/dist/core/agent-session/run-loop-monitor.d.ts +63 -0
  99. package/dist/core/agent-session/run-loop-monitor.js +164 -0
  100. package/dist/core/agent-session/run-loop-monitor.js.map +1 -0
  101. package/dist/core/agent-session/transcript-markers.d.ts +57 -0
  102. package/dist/core/agent-session/transcript-markers.js +166 -0
  103. package/dist/core/agent-session/transcript-markers.js.map +1 -0
  104. package/dist/core/agent-session/verification-tracker.d.ts +46 -0
  105. package/dist/core/agent-session/verification-tracker.js +246 -0
  106. package/dist/core/agent-session/verification-tracker.js.map +1 -0
  107. package/dist/core/agent-session.d.ts +27 -87
  108. package/dist/core/agent-session.js +166 -709
  109. package/dist/core/agent-session.js.map +1 -1
  110. package/dist/core/auth-providers.js +3 -3
  111. package/dist/core/auth-providers.js.map +1 -1
  112. package/dist/core/autopilot-cycle.d.ts +6 -2
  113. package/dist/core/autopilot-cycle.js +1 -1
  114. package/dist/core/autopilot-cycle.js.map +1 -1
  115. package/dist/core/bundled-agents.js +6 -6
  116. package/dist/core/bundled-agents.js.map +1 -1
  117. package/dist/core/checklist-git.d.ts +19 -0
  118. package/dist/core/checklist-git.js +54 -0
  119. package/dist/core/checklist-git.js.map +1 -0
  120. package/dist/core/checklist-items.d.ts +10 -1
  121. package/dist/core/checklist-items.js +22 -0
  122. package/dist/core/checklist-items.js.map +1 -1
  123. package/dist/core/checklist-prompt.d.ts +5 -1
  124. package/dist/core/checklist-prompt.js +16 -5
  125. package/dist/core/checklist-prompt.js.map +1 -1
  126. package/dist/core/checklist-snapshot.d.ts +5 -1
  127. package/dist/core/checklist-snapshot.js +19 -2
  128. package/dist/core/checklist-snapshot.js.map +1 -1
  129. package/dist/core/context-limits.js +1 -1
  130. package/dist/core/context-limits.js.map +1 -1
  131. package/dist/core/plan-handoff.d.ts +30 -0
  132. package/dist/core/plan-handoff.js +10 -0
  133. package/dist/core/plan-handoff.js.map +1 -0
  134. package/dist/core/plan-submission-gate.d.ts +28 -0
  135. package/dist/core/plan-submission-gate.js +27 -0
  136. package/dist/core/plan-submission-gate.js.map +1 -0
  137. package/dist/core/skills.js +6 -9
  138. package/dist/core/skills.js.map +1 -1
  139. package/dist/core/style-packs/index.js +2 -11
  140. package/dist/core/style-packs/index.js.map +1 -1
  141. package/dist/core/style-packs/packs.d.ts +3 -12
  142. package/dist/core/style-packs/packs.js +132 -173
  143. package/dist/core/style-packs/packs.js.map +1 -1
  144. package/dist/system-prompt.js +55 -78
  145. package/dist/system-prompt.js.map +1 -1
  146. package/dist/tools/ask-user.js +13 -74
  147. package/dist/tools/ask-user.js.map +1 -1
  148. package/dist/tools/bash.js +13 -78
  149. package/dist/tools/bash.js.map +1 -1
  150. package/dist/tools/checklist.d.ts +2 -10
  151. package/dist/tools/checklist.js +7 -39
  152. package/dist/tools/checklist.js.map +1 -1
  153. package/dist/tools/code-nav.js +7 -29
  154. package/dist/tools/code-nav.js.map +1 -1
  155. package/dist/tools/edit.d.ts +3 -9
  156. package/dist/tools/edit.js +66 -65
  157. package/dist/tools/edit.js.map +1 -1
  158. package/dist/tools/enter-plan.js +2 -7
  159. package/dist/tools/enter-plan.js.map +1 -1
  160. package/dist/tools/exit-plan.js +2 -3
  161. package/dist/tools/exit-plan.js.map +1 -1
  162. package/dist/tools/find.js +3 -4
  163. package/dist/tools/find.js.map +1 -1
  164. package/dist/tools/grep.js +6 -18
  165. package/dist/tools/grep.js.map +1 -1
  166. package/dist/tools/ls.js +3 -3
  167. package/dist/tools/ls.js.map +1 -1
  168. package/dist/tools/prompt-hints.js +34 -47
  169. package/dist/tools/prompt-hints.js.map +1 -1
  170. package/dist/tools/read.js +8 -20
  171. package/dist/tools/read.js.map +1 -1
  172. package/dist/tools/search-code.js +4 -12
  173. package/dist/tools/search-code.js.map +1 -1
  174. package/dist/tools/skill.js +13 -7
  175. package/dist/tools/skill.js.map +1 -1
  176. package/dist/tools/subagent-control.js +7 -22
  177. package/dist/tools/subagent-control.js.map +1 -1
  178. package/dist/tools/subagent.js +4 -7
  179. package/dist/tools/subagent.js.map +1 -1
  180. package/dist/tools/task-output.js +4 -15
  181. package/dist/tools/task-output.js.map +1 -1
  182. package/dist/tools/task-send.js +5 -17
  183. package/dist/tools/task-send.js.map +1 -1
  184. package/dist/tools/task-stop.js +2 -2
  185. package/dist/tools/task-stop.js.map +1 -1
  186. package/dist/tools/tool-search.js +2 -7
  187. package/dist/tools/tool-search.js.map +1 -1
  188. package/dist/tools/tool-tiers.d.ts +17 -4
  189. package/dist/tools/tool-tiers.js +38 -15
  190. package/dist/tools/tool-tiers.js.map +1 -1
  191. package/dist/tools/web-fetch.js +7 -33
  192. package/dist/tools/web-fetch.js.map +1 -1
  193. package/dist/tools/write.js +3 -4
  194. package/dist/tools/write.js.map +1 -1
  195. package/dist/ui/components/Footer.js +1 -2
  196. package/dist/ui/components/Footer.js.map +1 -1
  197. package/package.json +7 -4
  198. package/dist/core/api-benchmark.d.ts +0 -63
  199. package/dist/core/api-benchmark.js +0 -381
  200. package/dist/core/api-benchmark.js.map +0 -1
  201. package/dist/core/bash-spawn-benchmark.d.ts +0 -1
  202. package/dist/core/bash-spawn-benchmark.js +0 -139
  203. package/dist/core/bash-spawn-benchmark.js.map +0 -1
  204. package/dist/core/cache-warm-benchmark.d.ts +0 -21
  205. package/dist/core/cache-warm-benchmark.js +0 -170
  206. package/dist/core/cache-warm-benchmark.js.map +0 -1
  207. package/dist/core/fast-apply-benchmark.d.ts +0 -25
  208. package/dist/core/fast-apply-benchmark.js +0 -284
  209. package/dist/core/fast-apply-benchmark.js.map +0 -1
  210. package/dist/core/hashline-edit-benchmark.d.ts +0 -88
  211. package/dist/core/hashline-edit-benchmark.js +0 -518
  212. package/dist/core/hashline-edit-benchmark.js.map +0 -1
  213. package/dist/core/semantic-search-benchmark.d.ts +0 -36
  214. package/dist/core/semantic-search-benchmark.js +0 -211
  215. package/dist/core/semantic-search-benchmark.js.map +0 -1
  216. package/dist/core/speed-benchmark.d.ts +0 -132
  217. package/dist/core/speed-benchmark.js +0 -410
  218. package/dist/core/speed-benchmark.js.map +0 -1
@@ -13,7 +13,7 @@ export const AUTH_PROVIDERS = [
13
13
  {
14
14
  value: "anthropic",
15
15
  label: "Anthropic",
16
- description: "Claude Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 4.5",
16
+ description: "Claude Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5",
17
17
  methods: ["oauth"],
18
18
  },
19
19
  {
@@ -52,7 +52,7 @@ export const AUTH_PROVIDERS = [
52
52
  {
53
53
  value: "moonshot",
54
54
  label: "Moonshot",
55
- description: "Kimi K3, K2.8 Preview (Kimi sign-in), K2.7 Code · OAuth or API key",
55
+ description: "Kimi K3, K2.8 Preview (Kimi sign-in), K2.7 Code, K2.7 Code HighSpeed · OAuth or API key",
56
56
  methods: ["oauth", "apikey"],
57
57
  apiKeyLabel: "Moonshot",
58
58
  methodDetails: {
@@ -128,7 +128,7 @@ export const AUTH_PROVIDERS = [
128
128
  {
129
129
  value: "huggingface",
130
130
  label: "Hugging Face",
131
- description: "Qwen3 Coder 480B, GPT-OSS 120B",
131
+ description: "Kimi K2.7 Code, DeepSeek V4.1 Flash, GPT-OSS 120B",
132
132
  methods: ["apikey"],
133
133
  apiKeyLabel: "Hugging Face",
134
134
  },
@@ -1 +1 @@
1
- {"version":3,"file":"auth-providers.js","sourceRoot":"","sources":["../../src/core/auth-providers.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAE1E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA+D1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAuB;IAChD;QACE,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,mDAAmD;QAChE,OAAO,EAAE,CAAC,OAAO,CAAC;KACnB;IACD;QACE,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,CAAC,OAAO,CAAC;KACnB;IACD;QACE,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,2FAA2F;QAC7F,OAAO,EAAE,CAAC,OAAO,CAAC;KACnB;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,6BAA6B;QAC1C,OAAO,EAAE,CA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AU,mBAAmB,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,CAAC;QAC9C,4EAA4E;QAC5E,6EAA6E;QAC7E,oEAAoE;QACpE,IAAI,QAAQ;YAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;QACrC,OAAO,MAAM,KAAK,OAAO;YACvB,CAAC,CAAC;gBACE,MAAM;gBACN,KAAK,EAAE,gBAAgB,IAAI,CAAC,KAAK,EAAE;gBACnC,OAAO,EAAE,6CAA6C;gBACtD,IAAI,EAAE,EAAE;aACT;YACH,CAAC,CAAC;gBACE,MAAM;gBACN,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,UAAU;gBAClD,OAAO,EAAE,+CAA+C;gBACxD,IAAI,EAAE,EAAE;aACT,CAAC;IACR,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,QAAQ,IAAI,CAAC,UAAU,eAAe,IAAI,CAAC,WAAW,mDAAmD,CAAC;AACnH,CAAC"}
@@ -98,8 +98,12 @@ export interface AutopilotCycleDeps {
98
98
  acceptPlan: (reason?: string) => Promise<boolean>;
99
99
  /** Run the "plan approved — implement it now" prompt on the fresh session. */
100
100
  runImplement: () => Promise<void>;
101
- /** Feed a PROMPT verdict's body to GG Coder as an injected run. */
102
- runPrompt: (body: string) => Promise<void>;
101
+ /** Feed a PROMPT verdict's body to GG Coder as an injected run.
102
+ * `planRevision` marks a plan-feedback run: the host puts the session back
103
+ * in read-only plan mode first, so revising can't start editing code. */
104
+ runPrompt: (body: string, opts?: {
105
+ planRevision?: boolean;
106
+ }) => Promise<void>;
103
107
  /** Called BEFORE runPrompt: record the injected body (digest labeling) and
104
108
  * broadcast the autopilot_prompted marker. */
105
109
  onInjected: (body: string, round: number) => void;
@@ -105,7 +105,7 @@ export async function driveAutopilotCycle(deps) {
105
105
  // the run actually did.
106
106
  const body = buildPlanRevisionPrompt(verdict.body);
107
107
  deps.onInjected(body, round);
108
- await deps.runPrompt(body);
108
+ await deps.runPrompt(body, { planRevision: true });
109
109
  continue;
110
110
  }
111
111
  // Only an explicit approval can authorize implementation of a plan.
@@ -1 +1 @@
1
- {"version":3,"file":"autopilot-cycle.js","sourceRoot":"","sources":["../../src/core/autopilot-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,wBAAwB,EAAyB,MAAM,wBAAwB,CAAC;AAEzF;;;qCAGqC;AACrC,MAAM,CAAC,MAAM,8BAA8B,GACzC,iKAAiK,CAAC;AAEpK;;;;;;;;;;uBAUuB;AACvB,MAAM,CAAC,MAAM,4BAA4B,GACvC,8EAA8E;IAC9E,yDAAyD;IACzD,gFAAgF;IAChF,gFAAgF;IAChF,aAAa;IACb,iFAAiF;IACjF,sDAAsD;IACtD,iFAAiF;IACjF,2EAA2E;IAC3E,oEAAoE;IACpE,mBAAmB,CAAC;AAEtB;;;uEAGuE;AACvE,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,GAAG,4BAA4B,OAAO,IAAI,EAAE,CAAC;AACtD,CAAC;AAED;;gEAEgE;AAChE,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO,CACL,wEAAwE;QACxE,GAAG,QAAQ,MAAM;QACjB,+EAA+E,CAChF,CAAC;AACJ,CAAC;AA+CD;;;;;;;;;;;GAWG;AACH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AE,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5E,CAAC"}
@@ -191,7 +191,7 @@ Be rigorous. The cost of a false positive is the user's trust in the entire repo
191
191
  export const BUNDLED_AGENTS = [
192
192
  {
193
193
  name: "bee",
194
- description: "Use for a self-contained implementation task on the current branch: write a module, fix a bug, run a migration, make a failing test pass. Edits files and runs commands. Use `worker` instead when the change needs its own git branch and a PR; use `owl` when nothing should be modified.",
194
+ description: "Implements a self-contained change in place.",
195
195
  tools: ["read", "write", "edit", "bash", "find", "grep", "code_search", "ls", "source_path"],
196
196
  model: "inherit",
197
197
  systemPrompt: BEE_PROMPT,
@@ -199,7 +199,7 @@ export const BUNDLED_AGENTS = [
199
199
  },
200
200
  {
201
201
  name: "owl",
202
- description: 'Use for read-only questions about THIS repository: "where is X implemented", "what calls Y", "how does module Z fit together", tracing a data flow or mapping a directory. Never edits and never uses the web.',
202
+ description: "Read-only questions about this repo.",
203
203
  tools: ["read", "grep", "find", "ls", "code_search", "source_path"],
204
204
  model: "inherit",
205
205
  // Conventions and style rules don't change where a symbol is defined, and
@@ -210,7 +210,7 @@ export const BUNDLED_AGENTS = [
210
210
  },
211
211
  {
212
212
  name: "researcher",
213
- description: "Use when an answer needs sources outside this repo: a dependency's real behavior, an API contract, framework internals, version/changelog differences, or current best practice. Reads installed package source, official docs, and public code. Use `owl` when the repo alone can settle it.",
213
+ description: "Research needing docs or dependency source outside the repo.",
214
214
  tools: [
215
215
  "read",
216
216
  "grep",
@@ -228,7 +228,7 @@ export const BUNDLED_AGENTS = [
228
228
  },
229
229
  {
230
230
  name: "worker",
231
- description: "Use to land one scoped change in isolation: it creates a `batch/*` git branch, implements, self-reviews, tests and commits there, then returns to the original branch. It pushes and opens a PR only when the task says the user explicitly asked for that. Use for parallel fan-out of independent units of work. Use `bee` for in-place edits with no branch.",
231
+ description: "Lands one change on its own branch and commits it.",
232
232
  tools: ["read", "write", "edit", "bash", "find", "grep", "code_search", "ls"],
233
233
  model: "inherit",
234
234
  systemPrompt: WORKER_PROMPT,
@@ -236,7 +236,7 @@ export const BUNDLED_AGENTS = [
236
236
  },
237
237
  {
238
238
  name: "auditor",
239
- description: "Use for a defensive security review of code or a diff: traces untrusted input to dangerous sinks and reports exploitable findings with concrete vulnerability scenarios, CWE, and fixes. Read-only.",
239
+ description: "Read-only security review.",
240
240
  tools: ["read", "grep", "find", "ls", "code_search", "bash", "web_fetch", "web_search"],
241
241
  model: "inherit",
242
242
  systemPrompt: AUDITOR_PROMPT,
@@ -244,7 +244,7 @@ export const BUNDLED_AGENTS = [
244
244
  },
245
245
  {
246
246
  name: "skeptic",
247
- description: "Use to triage security findings before reporting them: re-verifies each claimed source→sink path in the code and returns CONFIRMED / DROP / DOWNGRADE with the reason. Pair it with `auditor` output. Read-only.",
247
+ description: "Verifies `auditor` findings.",
248
248
  tools: [
249
249
  "read",
250
250
  "grep",
@@ -1 +1 @@
1
- {"version":3,"file":"bundled-agents.js","sourceRoot":"","sources":["../../src/core/bundled-agents.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;8DAgB2C,CAAC;AAE/D,MAAM,UAAU,GAAG;;;;;;;;;;;;;8GAa2F,CAAC;AAE/G,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;+EAcqD,CAAC;AAEhF,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EA8CqD,CAAC;AAE5E,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iHAyC0F,CAAC;AAElH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFAsC6D,CAAC;AAErF,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C;QACE,IAAI,EAAE,KAAK;QACX,WAAW,EACT,6RAA6R;QAC/R,KAA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 export interface GitState {
2
+ readonly commit: string | null;
3
+ readonly uncommittedChanges: boolean;
4
+ }
5
+ /**
6
+ * Short HEAD commit and whether the work tree differs from it. The record file
7
+ * itself is ignored, since earlier records always leave it modified. Outside a
8
+ * repo (or before the first commit) the commit is null.
9
+ */
10
+ export declare function readGitState(cwd: string, signal?: AbortSignal): Promise<GitState>;
11
+ /**
12
+ * Whether the project has visibly moved on since a record was written: a
13
+ * different HEAD, or local edits on a tree that was clean when checked. Edits
14
+ * on top of an already-dirty tree can't be told apart, so this can miss
15
+ * changes but never invents one. Unknown live state means "not changed".
16
+ */
17
+ export declare function changedSinceCheck(recorded: {
18
+ readonly checkedAt: string | null;
19
+ } & GitState, current: GitState | null): boolean;
@@ -0,0 +1,54 @@
1
+ // Git state for the project health checklist: stamped onto each record by the
2
+ // `checklist` tool, and compared against the live tree by the snapshot so
3
+ // findings from an older tree aren't shown as current.
4
+ import { CHECKLIST_FILE } from "./checklist-items.js";
5
+ import { runBackgroundGit } from "../utils/git.js";
6
+ /**
7
+ * Short HEAD commit and whether the work tree differs from it. The record file
8
+ * itself is ignored, since earlier records always leave it modified. Outside a
9
+ * repo (or before the first commit) the commit is null.
10
+ */
11
+ export async function readGitState(cwd, signal) {
12
+ let commit = null;
13
+ try {
14
+ const { stdout } = await runBackgroundGit(["rev-parse", "--short", "HEAD"], {
15
+ cwd,
16
+ timeoutMs: 5000,
17
+ ...(signal ? { signal } : {}),
18
+ });
19
+ commit = stdout.trim() || null;
20
+ }
21
+ catch (error) {
22
+ if (signal?.aborted)
23
+ throw error;
24
+ // An unborn repository can still have uncommitted files. Inspect status
25
+ // even when it has no HEAD yet.
26
+ }
27
+ try {
28
+ const { stdout } = await runBackgroundGit(["status", "--porcelain=v1", "--untracked-files=normal"], { cwd, timeoutMs: 10000, maxBuffer: 16 * 1024 * 1024, ...(signal ? { signal } : {}) });
29
+ const changed = stdout
30
+ .split(/\r?\n/)
31
+ .filter((line) => line.length > 3)
32
+ .some((line) => line.slice(3).replace(/^"|"$/g, "") !== CHECKLIST_FILE);
33
+ return { commit, uncommittedChanges: changed };
34
+ }
35
+ catch (error) {
36
+ if (signal?.aborted || commit !== null)
37
+ throw error;
38
+ return { commit, uncommittedChanges: false };
39
+ }
40
+ }
41
+ /**
42
+ * Whether the project has visibly moved on since a record was written: a
43
+ * different HEAD, or local edits on a tree that was clean when checked. Edits
44
+ * on top of an already-dirty tree can't be told apart, so this can miss
45
+ * changes but never invents one. Unknown live state means "not changed".
46
+ */
47
+ export function changedSinceCheck(recorded, current) {
48
+ if (recorded.checkedAt === null || current === null)
49
+ return false;
50
+ if (recorded.commit !== current.commit)
51
+ return true;
52
+ return current.uncommittedChanges && !recorded.uncommittedChanges;
53
+ }
54
+ //# sourceMappingURL=checklist-git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-git.js","sourceRoot":"","sources":["../../src/core/checklist-git.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,0EAA0E;AAC1E,uDAAuD;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOnD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,MAAoB;IAClE,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;YAC1E,GAAG;YACH,SAAS,EAAE,IAAI;YACf,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,CAAC,CAAC;QACH,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,OAAO;Y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AAQ,CAAC,kBAAkB,CAAC;AACpE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  export declare const CHECKLIST_STALE_DAYS = 30;
3
3
  /** The record lives at the project root (not under `.gg/`, which many projects ignore). */
4
4
  export declare const CHECKLIST_FILE = ".gg-checklist.json";
5
- export declare const CHECKLIST_GROUPS: readonly ["Foundations", "Source control", "Code quality", "Design & UX", "Safety", "Performance", "Shipping"];
5
+ export declare const CHECKLIST_GROUPS: readonly ["Foundations", "Source control", "Code quality", "Design & UX", "Safety", "Performance", "Shipping", "Handover"];
6
6
  export type ChecklistGroup = (typeof CHECKLIST_GROUPS)[number];
7
7
  export interface ChecklistItem {
8
8
  readonly id: string;
@@ -16,6 +16,8 @@ export interface ChecklistItem {
16
16
  readonly skill?: string;
17
17
  /** Built-in setup command that fixes most gaps, when one exists. */
18
18
  readonly setupCommand?: string;
19
+ /** Detailed review lenses for items no bundled skill covers; rendered into the run prompt only. */
20
+ readonly guide?: readonly string[];
19
21
  }
20
22
  /** In recommended run order. */
21
23
  export declare const CHECKLIST_ITEMS: readonly [{
@@ -174,6 +176,13 @@ export declare const CHECKLIST_ITEMS: readonly [{
174
176
  readonly title: "Error reporting";
175
177
  readonly description: "I use this to check that I'll hear about crashes and know where to look.";
176
178
  readonly check: "Crashes and errors are reported somewhere the team sees them, logs can be found, and services have health checks where relevant. Not applicable for code with no running deployment.";
179
+ }, {
180
+ readonly id: "senior-review";
181
+ readonly group: "Handover";
182
+ readonly title: "Don't embarrass me";
183
+ readonly description: "I use this so an experienced developer taking over the project thinks a pro built it.";
184
+ readonly check: "Review the whole project the way an experienced developer taking it over would, find the tells of inexperienced or unreviewed AI-generated work, and rank them by how quickly that developer would notice and how much credibility each costs.";
185
+ readonly guide: readonly ["**First five minutes.** Read what a newcomer sees first: the root listing, README, package metadata and `git log --oneline -30`. Tells: committed junk (`.DS_Store`, build output, `node_modules`, logs, `.env`, archives, stray screenshots, `*.bak`, `old/`, `copy`/`final`/`v2` files); AI leftovers in the root (planning, summary or \"fixes\" notes, chat dumps); a README that is still the framework template, or padded with emoji, hype and features the code doesn't have; placeholder metadata (`my-app`, `vite-project`, empty description, version `0.0.0`); more than one lockfile or package manager; commit messages like \"fix\", \"update\", \"wip\" or \"asdf\".", "**AI and prototype leftovers in code.** Comments that narrate obvious code or talk to the user (\"Here we…\", \"Updated to fix…\", \"NEW:\", \"You can now…\"); emoji in logs or comments; TODO or \"implement later\" stubs on live paths; placeholder or mock data shipped as real (lorem ipsum, \"John Doe\", fake responses, fake loading delays); commented-out blocks; stray debug prints.", "**One way of doing each thing.** Two libraries for one job (two HTTP clients, date libraries, UI kits or state libraries); several styling approaches mixed; languages mixed without reason (for example JS beside TS); parallel versions of a file or helper (`utils2`, `ButtonNew`, the same formatter written twice); inconsistent naming of files, folders and functions.", "**Structure.** God files and components that do everything; a flat or arbitrary folder layout; business logic inside UI components or route handlers. Also the opposite tell: abstraction for its own sake (factories, managers or interfaces with one implementation, unused config layers).", "**Silenced tools.** `any`, `as any`, `@ts-ignore`, `@ts-nocheck`, blanket lint disables, strict mode turned off, non-null assertions used to quiet errors, or the language's equivalents.", "**Defensive noise.** try/catch around everything that logs and carries on, fallbacks like `|| []` and optional chaining everywhere hiding real bugs, `alert()` or raw error dumps shown to users, catch blocks that swallow errors.", "**Stack fluency.** Fighting the framework instead of following its conventions (for example React effects for derived state, fetching without cleanup, index keys; hand-rolled routing, auth or validation the stack already provides); deprecated APIs or majors far behind; reinventing the standard library; a dependency added for a one-liner.", "**Hard-coded values.** localhost URLs, ports, endpoints, magic numbers, IDs and settings baked into code instead of config or environment.", "**Credibility killers.** Note these, but leave the full audit to their own checklist item and name it: secret keys in client code or Git (Secrets kept out), authorisation only in the frontend (Security audit), no tests or tests that assert nothing (Tests), a build, lint or type check that fails (Lint, format & type checks).", "**Honesty.** The README, comments and docs describe what the code really does, the setup steps work, and nothing claims features, tests or coverage that don't exist.", "**Judging.** Flag only what an experienced developer would broadly agree is a rookie tell, not taste; a pattern used consistently by the project's own conventions is not a finding. Agent instruction files (AGENTS.md, CLAUDE.md, `.gg/`, editor rules) are normal practice; flag them only when stale, contradictory or full of junk. In a large project, sample each area and name what you sampled under `Scope:`.", "**Reporting.** Order findings by how fast a reviewer would spot them and how much credibility they cost, first-five-minute tells first. For each, say what the reviewer would conclude and the fix. Briefly name what already looks professional so the user knows what to keep. Never suggest rewriting published Git history; for weak commit messages, suggest a convention going forward."];
177
186
  }];
178
187
  export type ChecklistId = (typeof CHECKLIST_ITEMS)[number]["id"];
179
188
  export declare const CHECKLIST_IDS: [ChecklistId, ...ChecklistId[]];
@@ -13,6 +13,7 @@ export const CHECKLIST_GROUPS = [
13
13
  "Safety",
14
14
  "Performance",
15
15
  "Shipping",
16
+ "Handover",
16
17
  ];
17
18
  /** In recommended run order. */
18
19
  export const CHECKLIST_ITEMS = [
@@ -195,6 +196,27 @@ export const CHECKLIST_ITEMS = [
195
196
  description: "I use this to check that I'll hear about crashes and know where to look.",
196
197
  check: "Crashes and errors are reported somewhere the team sees them, logs can be found, and services have health checks where relevant. Not applicable for code with no running deployment.",
197
198
  },
199
+ {
200
+ id: "senior-review",
201
+ group: "Handover",
202
+ title: "Don't embarrass me",
203
+ description: "I use this so an experienced developer taking over the project thinks a pro built it.",
204
+ check: "Review the whole project the way an experienced developer taking it over would, find the tells of inexperienced or unreviewed AI-generated work, and rank them by how quickly that developer would notice and how much credibility each costs.",
205
+ guide: [
206
+ '**First five minutes.** Read what a newcomer sees first: the root listing, README, package metadata and `git log --oneline -30`. Tells: committed junk (`.DS_Store`, build output, `node_modules`, logs, `.env`, archives, stray screenshots, `*.bak`, `old/`, `copy`/`final`/`v2` files); AI leftovers in the root (planning, summary or "fixes" notes, chat dumps); a README that is still the framework template, or padded with emoji, hype and features the code doesn\'t have; placeholder metadata (`my-app`, `vite-project`, empty description, version `0.0.0`); more than one lockfile or package manager; commit messages like "fix", "update", "wip" or "asdf".',
207
+ '**AI and prototype leftovers in code.** Comments that narrate obvious code or talk to the user ("Here we…", "Updated to fix…", "NEW:", "You can now…"); emoji in logs or comments; TODO or "implement later" stubs on live paths; placeholder or mock data shipped as real (lorem ipsum, "John Doe", fake responses, fake loading delays); commented-out blocks; stray debug prints.',
208
+ "**One way of doing each thing.** Two libraries for one job (two HTTP clients, date libraries, UI kits or state libraries); several styling approaches mixed; languages mixed without reason (for example JS beside TS); parallel versions of a file or helper (`utils2`, `ButtonNew`, the same formatter written twice); inconsistent naming of files, folders and functions.",
209
+ "**Structure.** God files and components that do everything; a flat or arbitrary folder layout; business logic inside UI components or route handlers. Also the opposite tell: abstraction for its own sake (factories, managers or interfaces with one implementation, unused config layers).",
210
+ "**Silenced tools.** `any`, `as any`, `@ts-ignore`, `@ts-nocheck`, blanket lint disables, strict mode turned off, non-null assertions used to quiet errors, or the language's equivalents.",
211
+ "**Defensive noise.** try/catch around everything that logs and carries on, fallbacks like `|| []` and optional chaining everywhere hiding real bugs, `alert()` or raw error dumps shown to users, catch blocks that swallow errors.",
212
+ "**Stack fluency.** Fighting the framework instead of following its conventions (for example React effects for derived state, fetching without cleanup, index keys; hand-rolled routing, auth or validation the stack already provides); deprecated APIs or majors far behind; reinventing the standard library; a dependency added for a one-liner.",
213
+ "**Hard-coded values.** localhost URLs, ports, endpoints, magic numbers, IDs and settings baked into code instead of config or environment.",
214
+ "**Credibility killers.** Note these, but leave the full audit to their own checklist item and name it: secret keys in client code or Git (Secrets kept out), authorisation only in the frontend (Security audit), no tests or tests that assert nothing (Tests), a build, lint or type check that fails (Lint, format & type checks).",
215
+ "**Honesty.** The README, comments and docs describe what the code really does, the setup steps work, and nothing claims features, tests or coverage that don't exist.",
216
+ "**Judging.** Flag only what an experienced developer would broadly agree is a rookie tell, not taste; a pattern used consistently by the project's own conventions is not a finding. Agent instruction files (AGENTS.md, CLAUDE.md, `.gg/`, editor rules) are normal practice; flag them only when stale, contradictory or full of junk. In a large project, sample each area and name what you sampled under `Scope:`.",
217
+ "**Reporting.** Order findings by how fast a reviewer would spot them and how much credibility they cost, first-five-minute tells first. For each, say what the reviewer would conclude and the fix. Briefly name what already looks professional so the user knows what to keep. Never suggest rewriting published Git history; for weak commit messages, suggest a convention going forward.",
218
+ ],
219
+ },
198
220
  ];
199
221
  export const CHECKLIST_IDS = CHECKLIST_ITEMS.map((item) => item.id);
200
222
  const ITEMS_BY_ID = new Map(CHECKLIST_ITEMS.map((item) => [item.id, item]));
@@ -1 +1 @@
1
- {"version":3,"file":"checklist-items.js","sourceRoot":"","sources":["../../src/core/checklist-items.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,wDAAwD;AAExD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,QAAQ;IACR,aAAa;IACb,UAAU;CACF,CAAC;AAkBX,gCAAgC;AAChC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,+FAA+F;QACjG,KAAK,EACH,oKAAoK;QACtK,YAAY,EAAE,MAAM;KACrB;IACD;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,4EAA4E;QACzF,KAAK,EACH,8IAA8I;KACjJ;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qEAAqE;QAClF,KAAK,EACH,8KAA8K;QAChL,KAAK,EAAE,iBAAiB;KACzB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,c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B,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,0EAA0E;QACvF,KAAK,EACH,sLAAsL;KACzL;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,uFAAuF;QACzF,KAAK,EACH,gPAAgP;QAClP,KAAK,EAAE;YACL,6oBAA6oB;YAC7oB,sXAAsX;YACtX,+WAA+W;YAC/W,+RAA+R;YAC/R,2LAA2L;YAC3L,qOAAqO;YACrO,qVAAqV;YACrV,4IAA4I;YAC5I,uUAAuU;YACvU,uKAAuK;YACvK,yZAAyZ;YACzZ,+XAA+X;SAChY;KACF;CAC0C,CAAC;AAI9C,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAGjE,CAAC;AAEF,MAAM,WAAW,GAAuC,IAAI,GAAG,CAC7D,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAC/C,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,OAAO,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,3 +1,7 @@
1
1
  import { type ChecklistItem } from "./checklist-items.js";
2
- /** Instructions for checking one checklist item, report-only, recorded through the `checklist` tool. */
2
+ /**
3
+ * Instructions for checking one checklist item, recorded through the `checklist`
4
+ * tool. The check itself is report-only; fixes happen only after the user picks
5
+ * one, and end with the item re-recorded so fixed findings don't linger.
6
+ */
3
7
  export declare function checklistRunPrompt(item: ChecklistItem): string;
@@ -1,11 +1,20 @@
1
1
  // The prompt the app's Checklist screen sends when the user checks one item.
2
2
  // Generated from the item definition so it can't drift from the list.
3
3
  import { CHECKLIST_FILE, CHECKLIST_STALE_DAYS } from "./checklist-items.js";
4
- /** Instructions for checking one checklist item, report-only, recorded through the `checklist` tool. */
4
+ /**
5
+ * Instructions for checking one checklist item, recorded through the `checklist`
6
+ * tool. The check itself is report-only; fixes happen only after the user picks
7
+ * one, and end with the item re-recorded so fixed findings don't linger.
8
+ */
5
9
  export function checklistRunPrompt(item) {
6
10
  const skillStep = item.skill
7
11
  ? `Load the \`${item.skill}\` skill with the \`skill\` tool and follow its method in report-only mode.`
8
- : "No skill applies; use your own judgment.";
12
+ : item.guide
13
+ ? "No skill applies; follow the review guide above."
14
+ : "No skill applies; use your own judgment.";
15
+ const guide = item.guide
16
+ ? `\n\n## Review guide\n\n${item.guide.map((line) => `- ${line}`).join("\n")}`
17
+ : "";
9
18
  const setupNote = item.setupCommand
10
19
  ? ` Say that \`/${item.setupCommand}\` would fix most gaps.`
11
20
  : "";
@@ -13,13 +22,13 @@ export function checklistRunPrompt(item) {
13
22
 
14
23
  Check this project for one item of its health checklist and report in plain words. Results are stored in \`${CHECKLIST_FILE}\` at the project root and become due again after ${CHECKLIST_STALE_DAYS} days.
15
24
 
16
- **Check and report only. Do not edit, create, delete, install or commit any project file. Only the \`checklist\` tool writes the record.**
25
+ **Check and report only. Do not edit, create, delete, install or commit any project file. Only the \`checklist\` tool writes the record.** This holds until the user picks a fix in step 8.
17
26
 
18
27
  ## The item
19
28
 
20
29
  - id: \`${item.id}\`
21
30
  - group: ${item.group}
22
- - what to check: ${item.check}
31
+ - what to check: ${item.check}${guide}
23
32
 
24
33
  ## Steps
25
34
 
@@ -29,6 +38,8 @@ Check this project for one item of its health checklist and report in plain word
29
38
  4. ${skillStep}
30
39
  5. Inspect the code and config, and run the project's real checks where relevant (lint, typecheck, tests, audits). Don't guess what a command would print: run it. Configuration being present is not a passing check. Do not run fix/write flags or checks that would alter project files.
31
40
  6. Report in plain words: a bold verdict limited to the reviewed scope, then each finding with file:line, severity and a suggested fix.${setupNote} State what you checked and what you did not check. Never describe a project as safe or fully covered merely because this review found no issues.
32
- 7. Call \`checklist\` with \`action: "record"\`, \`id: "${item.id}"\`, \`result\` (\`pass\`, \`issues\` or \`not-applicable\`), a one-line \`summary\`, the \`findings\` (required for \`issues\`, empty for \`pass\`) and \`evidence\`: the commands you ran with their outcome, the files you read, and the skill you loaded. Include one evidence line beginning \`Scope:\` and another beginning \`Not checked:\` describing exclusions or missing access. Loading a skill alone is not review evidence. Keep any limited scope explicit in the summary; a narrow check must not claim to resolve unrelated findings from an earlier review. The tool stamps the date and commit itself.`;
41
+ 7. Call \`checklist\` with \`action: "record"\`, \`id: "${item.id}"\`, \`result\` (\`pass\`, \`issues\` or \`not-applicable\`), a one-line \`summary\`, the \`findings\` (required for \`issues\`, empty for \`pass\`) and \`evidence\`: the commands you ran with their outcome, the files you read, and the skill you loaded. Include one evidence line beginning \`Scope:\` and another beginning \`Not checked:\` describing exclusions or missing access. Loading a skill alone is not review evidence. Keep any limited scope explicit in the summary; a narrow check must not claim to resolve unrelated findings from an earlier review. The tool stamps the date and commit itself.
42
+ 8. If you recorded \`issues\` and the \`ask_user\` tool is available, end by asking what to fix with \`ask_user\`, never a question in prose. Write options for these findings and this item, each a complete action in plain words: for example "Fix all N findings" (mark it \`recommended\` when the fixes are safe), a narrower option such as fixing only the high-severity findings or one named area, and "Leave as is". Offer an option only if you could carry it out now. Skip the question for \`pass\` or \`not-applicable\`.
43
+ 9. If the user picks a fix, make it, then run the relevant checks. Re-check every finding recorded in step 7, and call \`checklist\` \`record\` for \`${item.id}\` again: \`pass\` only when every finding is fixed and verified, otherwise \`issues\` listing what remains. Use evidence from the re-check, not the original review. If they leave it as is, keep the record unchanged.`;
33
44
  }
34
45
  //# sourceMappingURL=checklist-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checklist-prompt.js","sourceRoot":"","sources":["../../src/core/checklist-prompt.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,sEAAsE;AAEtE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAsB,MAAM,sBAAsB,CAAC;AAEhG,wGAA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,CAAC,CAAC,gBAAgB,IAAI,CAAC,YAAY,yBAAyB;QAC5D,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,gBAAgB,IAAI,CAAC,KAAK;;6GAE0E,cAAc,qDAAqD,oBAAoB;;;;;;UAM1L,IAAI,CAAC,EAAE;WACN,IAAI,CAAC,KAAK;mBACF,IAAI,CAAC,KAAK,GAAG,KAAK;;;;;;;KAOhC,SAAS;;yIAE2H,SAAS;0DACxF,IAAI,CAAC,EAAE;;wJAEuF,IAAI,CAAC,EAAE,0NAA0N,CAAC;AAC1X,CAAC"}
@@ -1,13 +1,17 @@
1
1
  import { type ChecklistDetection } from "./checklist-detection.js";
2
+ import { type GitState } from "./checklist-git.js";
2
3
  import { type ChecklistRow, type Result } from "./checklist-store.js";
3
4
  export interface ChecklistSnapshotRow extends ChecklistRow {
4
5
  readonly detection: ChecklistDetection | null;
5
6
  readonly runPrompt: string | null;
7
+ /** The project's commit or working tree changed after this result was recorded. */
8
+ readonly changedSinceCheck: boolean;
6
9
  }
7
10
  export interface ChecklistSnapshot {
8
11
  readonly staleAfterDays: number;
9
12
  readonly detectionWarnings: readonly string[];
10
13
  readonly items: readonly ChecklistSnapshotRow[];
11
14
  }
15
+ export type ReadGitState = (cwd: string, signal?: AbortSignal) => Promise<GitState>;
12
16
  /** Read-only snapshot shared by the app and the agent tool. */
13
- export declare function readChecklistSnapshot(cwd: string, now: Date, signal?: AbortSignal): Promise<Result<ChecklistSnapshot>>;
17
+ export declare function readChecklistSnapshot(cwd: string, now: Date, signal?: AbortSignal, gitState?: ReadGitState): Promise<Result<ChecklistSnapshot>>;
@@ -1,12 +1,28 @@
1
1
  import { CHECKLIST_ITEMS, CHECKLIST_STALE_DAYS, getChecklistItem } from "./checklist-items.js";
2
2
  import { detectChecklist } from "./checklist-detection.js";
3
+ import { changedSinceCheck, readGitState } from "./checklist-git.js";
3
4
  import { checklistRunPrompt } from "./checklist-prompt.js";
4
5
  import { checklistView, readChecklist } from "./checklist-store.js";
6
+ import { log } from "./logger.js";
7
+ async function currentGitState(cwd, gitState, signal) {
8
+ try {
9
+ return await gitState(cwd, signal);
10
+ }
11
+ catch (error) {
12
+ if (!signal?.aborted) {
13
+ log("WARN", "checklist", "Could not read Git state for the snapshot", {
14
+ error: String(error),
15
+ });
16
+ }
17
+ return null;
18
+ }
19
+ }
5
20
  /** Read-only snapshot shared by the app and the agent tool. */
6
- export async function readChecklistSnapshot(cwd, now, signal) {
7
- const [record, detection] = await Promise.all([
21
+ export async function readChecklistSnapshot(cwd, now, signal, gitState = readGitState) {
22
+ const [record, detection, git] = await Promise.all([
8
23
  readChecklist(cwd, now, signal),
9
24
  detectChecklist(cwd, signal),
25
+ currentGitState(cwd, gitState, signal),
10
26
  ]);
11
27
  if (!record.ok)
12
28
  return record;
@@ -21,6 +37,7 @@ export async function readChecklistSnapshot(cwd, now, signal) {
21
37
  ...row,
22
38
  detection: detection.items[row.id] ?? null,
23
39
  runPrompt: item ? checklistRunPrompt(item) : null,
40
+ changedSinceCheck: changedSinceCheck(row, git),
24
41
  };
25
42
  }),
26
43
  },
@@ -1 +1 @@
1
- {"version":3,"file":"checklist-snapshot.js","sourceRoot":"","sources":["../../src/core/checklist-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAA2B,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAkC,MAAM,sBAAsB,CAAC;AAYpG,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAW,EACX,GAAS,EACT,MAAoB;IAEpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5C,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,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,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;oBACjD,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC;iBAC/C,CAAC;YACJ,CAAC,CAAC;SACH;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export const CONTEXT_LIMITS = {
2
- skillDescriptionBytes: 1024,
2
+ skillDescriptionBytes: 240,
3
3
  skillCatalogBytes: 16 * 1024,
4
4
  mcpToolDescriptionBytes: 1024,
5
5
  mcpToolSchemaBytes: 64 * 1024,
@@ -1 +1 @@
1
- {"version":3,"file":"context-limits.js","sourceRoot":"","sources":["../../src/core/context-limits.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,qBAAqB,EAAE,IAAI;IAC3B,iBAAiB,EAAE,EAAE,GAAG,IAAI;IAC5B,uBAAuB,EAAE,IAAI;IAC7B,kBAAkB,EAAE,EAAE,GAAG,IAAI;IAC7B,mBAAmB,EAAE,EAAE,GAAG,IAAI;IAC9B,wBAAwB,EAAE,IAAI,GAAG,IAAI;CACtC,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,SAAkC;IACrE,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,SAAS,EAAE,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACzC,YAAqC,EACrC,YAAqC;IAErC,OAAO,oBAAoB,CAAC,EAAE,GAAG,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;AACpE,CAAC;AAQD,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,QAAgB;IACzD,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,IAAI,aAAa,IAAI,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,aA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EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;AACpE,CAAC;AAQD,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,QAAgB;IACzD,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,IAAI,aAAa,IAAI,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAChF,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1D,IAAI,QAAQ,IAAI,aAAa;QAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACnF,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,GAAG,GAAG,QAAQ,GAAG,aAAa,CAAC;IACnC,8EAA8E;IAC9E,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI;QAAE,GAAG,EAAE,CAAC;IACpD,OAAO;QACL,IAAI,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,EAAE;QAC3D,SAAS,EAAE,IAAI;QACf,aAAa;KACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * When to hand a submitted plan to the human (the Accept / Feedback / Reject
3
+ * box).
4
+ *
5
+ * The box must open only once nothing else will act on the plan: the run that
6
+ * submitted it has fully settled (an Accept during the run's tail is refused
7
+ * with 409), no new run is starting, and no autopilot cycle (Ken) is still
8
+ * deciding. Every way Ken can stop without approving — handing the plan back,
9
+ * a failed review, the round cap, a Stop, a skipped cycle — leaves the plan
10
+ * pending, so this one check covers them all. Offers are once per plan
11
+ * generation so repeated settle points don't re-open a box the user just
12
+ * closed.
13
+ */
14
+ export interface PendingPlanOfferInput {
15
+ /** Path of the plan waiting for a decision, or null when none is. */
16
+ planPath: string | null;
17
+ /** Plan generation of the pending plan (bumps on every submit/clear). */
18
+ generation: number;
19
+ /** Generation last offered to the human; -1 when none has been. */
20
+ offeredGeneration: number;
21
+ /** A build run is in flight. */
22
+ running: boolean;
23
+ /** A run has been claimed and is about to start. */
24
+ starting: boolean;
25
+ /** An autopilot cycle (Ken review / injected run) is still active. */
26
+ autopilotActive: boolean;
27
+ /** Messages waiting to drain as the next turn; they supersede the plan. */
28
+ queued: number;
29
+ }
30
+ export declare function shouldOfferPendingPlan(input: Readonly<PendingPlanOfferInput>): boolean;
@@ -0,0 +1,10 @@
1
+ export function shouldOfferPendingPlan(input) {
2
+ if (input.planPath === null)
3
+ return false;
4
+ if (input.generation === input.offeredGeneration)
5
+ return false;
6
+ if (input.running || input.starting || input.autopilotActive)
7
+ return false;
8
+ return input.queued === 0;
9
+ }
10
+ //# sourceMappingURL=plan-handoff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-handoff.js","sourceRoot":"","sources":["../../src/core/plan-handoff.ts"],"names":[],"mappings":"AA8BA,MAAM,UAAU,sBAAsB,CAAC,KAAsC;IAC3E,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,iBAAiB;QAAE,OAAO,KAAK,CAAC;IAC/D,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IAC3E,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Completion gate for desktop plan mode.
3
+ *
4
+ * A run that stops while still in plan mode, without calling exit_plan, leaves
5
+ * nothing for anyone to review: no approval box, and autopilot Ken can only
6
+ * report that GG Coder is "still drafting". This happens when the agent writes
7
+ * the plan into chat instead of submitting it, or when exit_plan rejects the
8
+ * plan (e.g. no numbered `## Steps`) and the agent stops instead of fixing it.
9
+ *
10
+ * When the run is about to stop in that state, the session injects one hidden
11
+ * reminder so the agent submits in the same run. One per run: a rejected
12
+ * exit_plan already returns its own fix-it error mid-run, so a model that
13
+ * still stops after the reminder won't be talked round by a second one.
14
+ */
15
+ export declare const MAX_PLAN_SUBMISSION_NUDGES = 1;
16
+ export declare const PLAN_SUBMISSION_NUDGE: string;
17
+ export interface PlanSubmissionGateInput {
18
+ /** The host opted in (desktop sidecar; not the CLI or ACP, where the user
19
+ * drives plan mode directly). */
20
+ enabled: boolean;
21
+ /** The session is still in plan mode as the run is about to stop. */
22
+ planMode: boolean;
23
+ /** The run was cancelled. */
24
+ aborted: boolean;
25
+ /** Reminders already injected this run. */
26
+ nudgesThisRun: number;
27
+ }
28
+ export declare function shouldNudgePlanSubmission(input: Readonly<PlanSubmissionGateInput>): boolean;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Completion gate for desktop plan mode.
3
+ *
4
+ * A run that stops while still in plan mode, without calling exit_plan, leaves
5
+ * nothing for anyone to review: no approval box, and autopilot Ken can only
6
+ * report that GG Coder is "still drafting". This happens when the agent writes
7
+ * the plan into chat instead of submitting it, or when exit_plan rejects the
8
+ * plan (e.g. no numbered `## Steps`) and the agent stops instead of fixing it.
9
+ *
10
+ * When the run is about to stop in that state, the session injects one hidden
11
+ * reminder so the agent submits in the same run. One per run: a rejected
12
+ * exit_plan already returns its own fix-it error mid-run, so a model that
13
+ * still stops after the reminder won't be talked round by a second one.
14
+ */
15
+ export const MAX_PLAN_SUBMISSION_NUDGES = 1;
16
+ export const PLAN_SUBMISSION_NUDGE = "You are still in plan mode and haven't submitted a plan, so nobody can review it. " +
17
+ "Write the plan to .gg/plans/<name>.md (a '## Steps' heading followed by a numbered list) " +
18
+ "and call exit_plan with that path now. If exit_plan rejected the plan, fix what it named " +
19
+ "and call it again. If you can't finish the plan without the user's input, ask with " +
20
+ "ask_user instead of ending your turn.";
21
+ export function shouldNudgePlanSubmission(input) {
22
+ return (input.enabled &&
23
+ input.planMode &&
24
+ !input.aborted &&
25
+ input.nudgesThisRun < MAX_PLAN_SUBMISSION_NUDGES);
26
+ }
27
+ //# sourceMappingURL=plan-submission-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-submission-gate.js","sourceRoot":"","sources":["../../src/core/plan-submission-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,qBAAqB,GAChC,oFAAoF;IACpF,2FAA2F;IAC3F,2FAA2F;IAC3F,qFAAqF;IACrF,uCAAuC,CAAC;AAc1C,MAAM,UAAU,yBAAyB,CAAC,KAAwC;IAChF,OAAO,CACL,KAAK,CAAC,OAAO;QACb,KAAK,CAAC,QAAQ;QACd,CAAC,KAAK,CAAC,OAAO;QACd,KAAK,CAAC,aAAa,GAAG,0BAA0B,CACjD,CAAC;AACJ,CAAC"}