@kenkaiiii/ggcoder 5.74.3 → 5.75.1
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.
- package/README.md +1 -1
- package/assets/skills/bulletproof/SKILL.md +1 -1
- package/assets/skills/clarify/SKILL.md +1 -1
- package/assets/skills/code-review/SKILL.md +1 -1
- package/assets/skills/compliance-guard/SKILL.md +1 -1
- package/assets/skills/durable/SKILL.md +1 -1
- package/assets/skills/evidence-led-ui/SKILL.md +1 -1
- package/assets/skills/lean/SKILL.md +1 -1
- package/assets/skills/refactoring/SKILL.md +1 -1
- package/assets/skills/root-cause/SKILL.md +1 -1
- package/assets/skills/shared-language/SKILL.md +1 -1
- package/assets/skills/tdd/SKILL.md +1 -1
- package/dist/app-sidecar/app-settings.d.ts +65 -0
- package/dist/app-sidecar/app-settings.js +147 -0
- package/dist/app-sidecar/app-settings.js.map +1 -0
- package/dist/app-sidecar/attachments.d.ts +11 -0
- package/dist/app-sidecar/attachments.js +47 -0
- package/dist/app-sidecar/attachments.js.map +1 -0
- package/dist/app-sidecar/auth-routes.d.ts +3 -0
- package/dist/app-sidecar/auth-routes.js +290 -0
- package/dist/app-sidecar/auth-routes.js.map +1 -0
- package/dist/app-sidecar/autopilot-runner.d.ts +61 -0
- package/dist/app-sidecar/autopilot-runner.js +367 -0
- package/dist/app-sidecar/autopilot-runner.js.map +1 -0
- package/dist/app-sidecar/file-search.d.ts +15 -0
- package/dist/app-sidecar/file-search.js +103 -0
- package/dist/app-sidecar/file-search.js.map +1 -0
- package/dist/app-sidecar/hf-pull-manager.d.ts +20 -0
- package/dist/app-sidecar/hf-pull-manager.js +224 -0
- package/dist/app-sidecar/hf-pull-manager.js.map +1 -0
- package/dist/app-sidecar/history-routes.d.ts +3 -0
- package/dist/app-sidecar/history-routes.js +375 -0
- package/dist/app-sidecar/history-routes.js.map +1 -0
- package/dist/app-sidecar/history.d.ts +67 -0
- package/dist/app-sidecar/history.js +23 -0
- package/dist/app-sidecar/history.js.map +1 -0
- package/dist/app-sidecar/http.d.ts +5 -0
- package/dist/app-sidecar/http.js +27 -0
- package/dist/app-sidecar/http.js.map +1 -0
- package/dist/app-sidecar/integration-routes.d.ts +3 -0
- package/dist/app-sidecar/integration-routes.js +286 -0
- package/dist/app-sidecar/integration-routes.js.map +1 -0
- package/dist/app-sidecar/json-mode.d.ts +10 -0
- package/dist/app-sidecar/json-mode.js +73 -0
- package/dist/app-sidecar/json-mode.js.map +1 -0
- package/dist/app-sidecar/keep-awake.d.ts +4 -0
- package/dist/app-sidecar/keep-awake.js +5 -0
- package/dist/app-sidecar/keep-awake.js.map +1 -0
- package/dist/app-sidecar/ken-context.d.ts +20 -0
- package/dist/app-sidecar/ken-context.js +55 -0
- package/dist/app-sidecar/ken-context.js.map +1 -0
- package/dist/app-sidecar/mcp-routes.d.ts +3 -0
- package/dist/app-sidecar/mcp-routes.js +185 -0
- package/dist/app-sidecar/mcp-routes.js.map +1 -0
- package/dist/app-sidecar/mcp-rows.d.ts +31 -0
- package/dist/app-sidecar/mcp-rows.js +77 -0
- package/dist/app-sidecar/mcp-rows.js.map +1 -0
- package/dist/app-sidecar/progress-manager.d.ts +10 -0
- package/dist/app-sidecar/progress-manager.js +116 -0
- package/dist/app-sidecar/progress-manager.js.map +1 -0
- package/dist/app-sidecar/prompt-routes.d.ts +3 -0
- package/dist/app-sidecar/prompt-routes.js +354 -0
- package/dist/app-sidecar/prompt-routes.js.map +1 -0
- package/dist/app-sidecar/repo-polls.d.ts +15 -0
- package/dist/app-sidecar/repo-polls.js +25 -0
- package/dist/app-sidecar/repo-polls.js.map +1 -0
- package/dist/app-sidecar/route-context.d.ts +145 -0
- package/dist/app-sidecar/route-context.js +2 -0
- package/dist/app-sidecar/route-context.js.map +1 -0
- package/dist/app-sidecar/run-control-routes.d.ts +3 -0
- package/dist/app-sidecar/run-control-routes.js +430 -0
- package/dist/app-sidecar/run-control-routes.js.map +1 -0
- package/dist/app-sidecar/session-routes.d.ts +3 -0
- package/dist/app-sidecar/session-routes.js +115 -0
- package/dist/app-sidecar/session-routes.js.map +1 -0
- package/dist/app-sidecar/session-types.d.ts +39 -0
- package/dist/app-sidecar/session-types.js +5 -0
- package/dist/app-sidecar/session-types.js.map +1 -0
- package/dist/app-sidecar/task-routes.d.ts +3 -0
- package/dist/app-sidecar/task-routes.js +149 -0
- package/dist/app-sidecar/task-routes.js.map +1 -0
- package/dist/app-sidecar/usage.d.ts +19 -0
- package/dist/app-sidecar/usage.js +153 -0
- package/dist/app-sidecar/usage.js.map +1 -0
- package/dist/app-sidecar/workspace-routes.d.ts +3 -0
- package/dist/app-sidecar/workspace-routes.js +244 -0
- package/dist/app-sidecar/workspace-routes.js.map +1 -0
- package/dist/app-sidecar.js +467 -3775
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/acceptance-checks.js +3 -9
- package/dist/core/acceptance-checks.js.map +1 -1
- package/dist/core/agent-session/helpers.d.ts +26 -0
- package/dist/core/agent-session/helpers.js +47 -0
- package/dist/core/agent-session/helpers.js.map +1 -0
- package/dist/core/agent-session/mcp-tools.d.ts +68 -0
- package/dist/core/agent-session/mcp-tools.js +195 -0
- package/dist/core/agent-session/mcp-tools.js.map +1 -0
- package/dist/core/agent-session/run-loop-monitor.d.ts +63 -0
- package/dist/core/agent-session/run-loop-monitor.js +164 -0
- package/dist/core/agent-session/run-loop-monitor.js.map +1 -0
- package/dist/core/agent-session/transcript-markers.d.ts +57 -0
- package/dist/core/agent-session/transcript-markers.js +166 -0
- package/dist/core/agent-session/transcript-markers.js.map +1 -0
- package/dist/core/agent-session/verification-tracker.d.ts +46 -0
- package/dist/core/agent-session/verification-tracker.js +246 -0
- package/dist/core/agent-session/verification-tracker.js.map +1 -0
- package/dist/core/agent-session.d.ts +21 -87
- package/dist/core/agent-session.js +141 -712
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-providers.js +3 -3
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/bundled-agents.js +6 -6
- package/dist/core/bundled-agents.js.map +1 -1
- package/dist/core/checklist-git.d.ts +19 -0
- package/dist/core/checklist-git.js +54 -0
- package/dist/core/checklist-git.js.map +1 -0
- package/dist/core/checklist-items.d.ts +10 -1
- package/dist/core/checklist-items.js +22 -0
- package/dist/core/checklist-items.js.map +1 -1
- package/dist/core/checklist-prompt.d.ts +5 -1
- package/dist/core/checklist-prompt.js +16 -5
- package/dist/core/checklist-prompt.js.map +1 -1
- package/dist/core/checklist-snapshot.d.ts +5 -1
- package/dist/core/checklist-snapshot.js +19 -2
- package/dist/core/checklist-snapshot.js.map +1 -1
- package/dist/core/context-limits.js +1 -1
- package/dist/core/context-limits.js.map +1 -1
- package/dist/core/skills.js +6 -9
- package/dist/core/skills.js.map +1 -1
- package/dist/core/style-packs/index.js +2 -11
- package/dist/core/style-packs/index.js.map +1 -1
- package/dist/core/style-packs/packs.d.ts +3 -12
- package/dist/core/style-packs/packs.js +132 -173
- package/dist/core/style-packs/packs.js.map +1 -1
- package/dist/system-prompt.js +55 -78
- package/dist/system-prompt.js.map +1 -1
- package/dist/tools/ask-user.js +13 -74
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/bash.js +13 -78
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checklist.d.ts +2 -10
- package/dist/tools/checklist.js +7 -39
- package/dist/tools/checklist.js.map +1 -1
- package/dist/tools/code-nav.js +7 -29
- package/dist/tools/code-nav.js.map +1 -1
- package/dist/tools/edit.d.ts +3 -9
- package/dist/tools/edit.js +92 -65
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/enter-plan.js +2 -7
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/exit-plan.js +2 -3
- package/dist/tools/exit-plan.js.map +1 -1
- package/dist/tools/find.js +3 -4
- package/dist/tools/find.js.map +1 -1
- package/dist/tools/grep.js +6 -18
- package/dist/tools/grep.js.map +1 -1
- package/dist/tools/ls.js +3 -3
- package/dist/tools/ls.js.map +1 -1
- package/dist/tools/prompt-hints.js +34 -47
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read.js +8 -20
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/search-code.js +4 -12
- package/dist/tools/search-code.js.map +1 -1
- package/dist/tools/skill.js +13 -7
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/subagent-control.js +7 -22
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/subagent.js +4 -7
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/task-output.js +4 -15
- package/dist/tools/task-output.js.map +1 -1
- package/dist/tools/task-send.js +5 -17
- package/dist/tools/task-send.js.map +1 -1
- package/dist/tools/task-stop.js +2 -2
- package/dist/tools/task-stop.js.map +1 -1
- package/dist/tools/tool-search.js +2 -7
- package/dist/tools/tool-search.js.map +1 -1
- package/dist/tools/tool-tiers.d.ts +17 -4
- package/dist/tools/tool-tiers.js +38 -15
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/web-fetch.js +7 -33
- package/dist/tools/web-fetch.js.map +1 -1
- package/dist/tools/write.js +3 -4
- package/dist/tools/write.js.map +1 -1
- package/dist/ui/components/Footer.js +1 -2
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/utils/shared-poll.d.ts +37 -0
- package/dist/utils/shared-poll.js +104 -0
- package/dist/utils/shared-poll.js.map +1 -0
- package/package.json +7 -4
- package/dist/core/api-benchmark.d.ts +0 -63
- package/dist/core/api-benchmark.js +0 -381
- package/dist/core/api-benchmark.js.map +0 -1
- package/dist/core/bash-spawn-benchmark.d.ts +0 -1
- package/dist/core/bash-spawn-benchmark.js +0 -139
- package/dist/core/bash-spawn-benchmark.js.map +0 -1
- package/dist/core/cache-warm-benchmark.d.ts +0 -21
- package/dist/core/cache-warm-benchmark.js +0 -170
- package/dist/core/cache-warm-benchmark.js.map +0 -1
- package/dist/core/fast-apply-benchmark.d.ts +0 -25
- package/dist/core/fast-apply-benchmark.js +0 -284
- package/dist/core/fast-apply-benchmark.js.map +0 -1
- package/dist/core/hashline-edit-benchmark.d.ts +0 -88
- package/dist/core/hashline-edit-benchmark.js +0 -518
- package/dist/core/hashline-edit-benchmark.js.map +0 -1
- package/dist/core/semantic-search-benchmark.d.ts +0 -36
- package/dist/core/semantic-search-benchmark.js +0 -211
- package/dist/core/semantic-search-benchmark.js.map +0 -1
- package/dist/core/speed-benchmark.d.ts +0 -132
- package/dist/core/speed-benchmark.js +0 -410
- 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
|
|
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: "
|
|
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,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC5B,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE;YACb,KAAK,EAAE;gBACL,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,mBAAmB;gBAC1B,OAAO,EAAE,uCAAuC;gBAChD,IAAI,EAAE,EAAE;aACT;YACD,MAAM,EAAE;gBACN,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,aAAa;gBACpB,OAAO,EAAE,wCAAwC;gBACjD,IAAI,EAAE,EAAE;aACT;SACF;KACF;IACD;QACE,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,UAAU;QACjB,WAAW,
|
|
1
|
+
{"version":3,"file":"auth-providers.js","sourceRoot":"","sources":["../../src/core/auth-providers.ts"],"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AAI,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"}
|
|
@@ -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: "
|
|
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:
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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,
|
|
1
|
+
{"version":3,"file":"bundled-agents.js","sourceRoot":"","sources":["../../src/core/bundled-agents.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;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AAS;KAClB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oDAAoD;QACjE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC;QAC7E,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,aAAa;QAC3B,MAAM,EAAE,SAAS;KAClB;IACD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,4BAA4B;QACzC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,CAAC;QACvF,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,cAAc;QAC5B,MAAM,EAAE,SAAS;KAClB;IACD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,8BAA8B;QAC3C,KAAK,EAAE;YACL,MAAM;YACN,MAAM;YACN,MAAM;YACN,IAAI;YACJ,aAAa;YACb,MAAM;YACN,WAAW;YACX,YAAY;YACZ,UAAU;SACX;QACD,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,cAAc;QAC5B,MAAM,EAAE,SAAS;KAClB;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
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,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KAAK,CAAC;IAClE,IAAI,QAAQ,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACpD,OAAO,OAAO,CAAC,kBAAkB,IAAI,CAAC,QAAQ,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;
|
|
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;IACV,UAAU;CACF,CAAC;AAoBX,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,cAAc;QACrB,WAAW,EAAE,2EAA2E;QACxF,KAAK,EACH,4NAA4N;QAC9N,YAAY,EAAE,UAAU;KACzB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,gFAAgF;QAC7F,KAAK,EACH,iKAAiK;Q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AC1B,WAAW,EAAE,2DAA2D;QACxE,KAAK,EAAE,kEAAkE;QACzE,KAAK,EAAE,MAAM;KACd;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,+EAA+E;QAC5F,KAAK,EACH,kJAAkJ;KACrJ;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,UAAU;QACjB,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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
:
|
|
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
|
|
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;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAmB;IACpD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;QAC1B,CAAC,CAAC,cAAc,IAAI,CAAC,KAAK,6EAA6E;QACvG,CAAC,CAAC,IAAI,CAAC,KAAK;YACV,CAAC,CAAC,kDAAkD;YACpD,CAAC,CAAC,0CAA0C,CAAC;IACjD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK;QACtB,CAAC,CAAC,0BAA0B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC9E,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY;QACjC,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,EA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E,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACjD,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC;QAC/B,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC;QAC5B,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC;KACvC,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,OAAO,MAAM,CAAC;IAC9B,OAAO;QACL,EAAE,EAAE,IAAI;QACR,KAAK,EAAE;YACL,cAAc,EAAE,oBAAoB;YACpC,iBAAiB,EAAE,SAAS,CAAC,QAAQ;YACrC,KAAK,EAAE,aAAa,CAAC,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnE,MAAM,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACtC,OAAO;oBACL,GAAG,GAAG;oBACN,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI;oBAC1C,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,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 +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,
|
|
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,GAAG;IAC1B,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AE,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"}
|
package/dist/core/skills.js
CHANGED
|
@@ -152,8 +152,10 @@ export function renderSkillLines(skills, limits = CONTEXT_LIMITS) {
|
|
|
152
152
|
const dropped = [];
|
|
153
153
|
let used = 0;
|
|
154
154
|
for (const skill of skills) {
|
|
155
|
+
// Every bundled description opens "Use when/for …"; on a one-line-per-
|
|
156
|
+
// skill list that prefix is pure repetition, so the catalog drops it.
|
|
155
157
|
const description = skill.description
|
|
156
|
-
? clampToBytes(skill.description, limits.skillDescriptionBytes).text
|
|
158
|
+
? clampToBytes(skill.description.replace(/^Use (?:when|for) (\w)/, (_m, c) => c.toUpperCase()), limits.skillDescriptionBytes).text
|
|
157
159
|
: "";
|
|
158
160
|
const line = `- **${skill.name}**${description ? `: ${description}` : ""}`;
|
|
159
161
|
const bytes = Buffer.byteLength(line, "utf8") + 1; // + newline
|
|
@@ -178,14 +180,9 @@ export function formatSkillsForPrompt(skills, limits = CONTEXT_LIMITS) {
|
|
|
178
180
|
const list = lines.join("\n");
|
|
179
181
|
const overflow = dropped.length > 0 ? `\n\n_Skills omitted (catalog byte budget): ${dropped.join(", ")}_` : "";
|
|
180
182
|
return (`## Skills\n\n` +
|
|
181
|
-
`Before acting, compare the user's request with every skill description below. ` +
|
|
182
|
-
`
|
|
183
|
-
`
|
|
184
|
-
`Match the work, not the topic: a skill's subject matter appearing in the request is not a match when the actual change falls outside its scope. ` +
|
|
185
|
-
`Skip the skill when the task is routine, narrow, or already covered by existing patterns in the codebase \u2014 an unnecessary invocation costs context and slows the task. ` +
|
|
186
|
-
`Invoke at most one skill unless the task genuinely spans several, and do not re-invoke a skill whose instructions are already in this conversation. ` +
|
|
187
|
-
`Launch-readiness asks span every listed skill in scope, in order durable, bulletproof, compliance-guard, lean, evidence-led-ui: ` +
|
|
188
|
-
`one report-only child per skill in a single spawn_agent call; a failed child is reported as not checked, never as clean.\n\n` +
|
|
183
|
+
`Before acting, compare the user's request with every skill description below; when the work enters one's scope, load it with the **skill** tool first. ` +
|
|
184
|
+
`Match the work, not the topic; respect exclusions; skip skills for routine work; never reload one. ` +
|
|
185
|
+
`Launch-readiness asks: one report-only child per in-scope skill (durable, bulletproof, compliance-guard, lean, evidence-led-ui) in one spawn_agent call; a failed child is "not checked", never clean.\n\n` +
|
|
189
186
|
list +
|
|
190
187
|
overflow);
|
|
191
188
|
}
|
package/dist/core/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAsB,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,sEAAsE;IACtE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;IAClC,yDAAyD;IACzD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,qBAAqB,CAAC;CAChD,CAAC;AAEF;;;;GAIG;AACH,MAAM,kBAAkB,GAAG;IACzB,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;I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AC,IAAI,CAAC,CAAC;YACjB,IAAI,IAAI,KAAK,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAe,EACf,SAAwB,cAAc;IAEtC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,QAAQ,GACZ,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,8CAA8C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhG,OAAO,CACL,eAAe;QACf,yJAAyJ;QACzJ,qGAAqG;QACrG,4MAA4M;QAC5M,IAAI;QACJ,QAAQ,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -43,7 +43,7 @@ export function renderStylePacksSection(active, cwd) {
|
|
|
43
43
|
if (parts.length === 0)
|
|
44
44
|
return "";
|
|
45
45
|
return (`## Language Style Packs\n\n` +
|
|
46
|
-
`
|
|
46
|
+
`Defaults for new code in active languages.\n\n` +
|
|
47
47
|
`${AGENT_WRITTEN_CODE_PREAMBLE}\n\n` +
|
|
48
48
|
parts.join("\n\n"));
|
|
49
49
|
}
|
|
@@ -56,14 +56,5 @@ export function renderStylePacksSection(active, cwd) {
|
|
|
56
56
|
* Lives in the system prompt above the per-language packs so the model reads
|
|
57
57
|
* universal rules first, then specializes per language.
|
|
58
58
|
*/
|
|
59
|
-
const AGENT_WRITTEN_CODE_PREAMBLE =
|
|
60
|
-
|
|
61
|
-
Universal rules for agent-written code:
|
|
62
|
-
|
|
63
|
-
- **Observe boundaries.** Use structured logging at external I/O; include inputs, outcome, and elapsed time. Do not commit debug prints.
|
|
64
|
-
- **Deterministic output.** Sort observable map/set iteration; use stable IDs; inject clocks; canonicalize serialized data used for hashes, persistence, comparisons, or diffs.
|
|
65
|
-
- **Explicit state.** Avoid module-level mutables, global state containers, and implicit DI. Pass dependencies through signatures or constructors.
|
|
66
|
-
- **Locally verifiable.** Prefer small pure functions and shallow composition over deep indirection.
|
|
67
|
-
- **Behavioral tests.** Arrange-Act-Assert, no shared mutable fixtures, table-driven where natural, independent test order.
|
|
68
|
-
- **Validate at boundaries.** Validate untrusted input as it enters; inside, rely on validated types and use local error values for expected failures.`;
|
|
59
|
+
const AGENT_WRITTEN_CODE_PREAMBLE = `All code: deterministic output (sorted iteration, injected clocks); no module-level mutable state; no shared mutable test fixtures.`;
|
|
69
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/style-packs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAc,EAAE,GAAW;IAClD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACjE,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC,Y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,CAAC;QACvC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2CAA2C;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;AAC3B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAuB,EAAE,GAAW;IAC1E,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MAAM,GAAG,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,OAAO,CACL,6BAA6B;QAC7B,gDAAgD;QAChD,GAAG,2BAA2B,MAAM;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,2BAA2B,GAAG,qIAAqI,CAAC"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { LanguageId } from "../language-detector.js";
|
|
2
2
|
/**
|
|
3
3
|
* Per-language style packs injected into the system prompt when the detector
|
|
4
|
-
* sees the language is active
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 1. Apply the strictest reasonable subset of *idiomatic* style — nothing
|
|
8
|
-
* exotic the model has to think about. The agent already knows these
|
|
9
|
-
* patterns; the pack just narrows the choice space.
|
|
10
|
-
* 2. Optimize for low ambiguity, not for human readability. Bullet form.
|
|
11
|
-
* 3. Errors as values, schema at boundaries, mechanical formatting,
|
|
12
|
-
* one canonical way to do common tasks.
|
|
13
|
-
* 4. ~30-50 lines per pack. Anything longer is bloat in the system prompt.
|
|
14
|
-
* 5. Avoid triple backticks (template literal conflict). Use single
|
|
15
|
-
* backticks for inline tokens, escape with \\\` when needed.
|
|
4
|
+
* sees the language is active. Keep each pack ≤ ~350 chars: tooling default,
|
|
5
|
+
* the most bug-preventing rules, and what to avoid. No rationale or examples.
|
|
6
|
+
* Avoid triple backticks (template literal conflict).
|
|
16
7
|
*/
|
|
17
8
|
export declare const PACKS: Readonly<Record<LanguageId, string>>;
|