@prestyj/cli 5.29.1 → 5.30.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 +11 -12
- 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/compliance-guard/references/us.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 +3 -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-error.d.ts +21 -0
- package/dist/app-error.js +39 -0
- package/dist/app-error.js.map +1 -0
- package/dist/app-sidecar/app-settings.d.ts +63 -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 +62 -0
- package/dist/app-sidecar/autopilot-runner.js +376 -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/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/nolan-context.d.ts +20 -0
- package/dist/app-sidecar/nolan-context.js +55 -0
- package/dist/app-sidecar/nolan-context.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 +355 -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 +437 -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 +232 -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 +374 -0
- package/dist/app-sidecar/workspace-routes.js.map +1 -0
- package/dist/app-sidecar.js +518 -3978
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +6 -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 +250 -0
- package/dist/core/agent-session/verification-tracker.js.map +1 -0
- package/dist/core/agent-session.d.ts +29 -89
- package/dist/core/agent-session.js +167 -705
- 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/autopilot-cycle.d.ts +6 -2
- package/dist/core/autopilot-cycle.js +1 -1
- package/dist/core/autopilot-cycle.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-detection.d.ts +11 -0
- package/dist/core/checklist-detection.js +238 -0
- package/dist/core/checklist-detection.js.map +1 -0
- 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 +189 -0
- package/dist/core/checklist-items.js +226 -0
- package/dist/core/checklist-items.js.map +1 -0
- package/dist/core/checklist-prompt.d.ts +7 -0
- package/dist/core/checklist-prompt.js +45 -0
- package/dist/core/checklist-prompt.js.map +1 -0
- package/dist/core/checklist-snapshot.d.ts +17 -0
- package/dist/core/checklist-snapshot.js +46 -0
- package/dist/core/checklist-snapshot.js.map +1 -0
- package/dist/core/checklist-store.d.ts +59 -0
- package/dist/core/checklist-store.js +242 -0
- package/dist/core/checklist-store.js.map +1 -0
- package/dist/core/context-limits.js +1 -1
- package/dist/core/context-limits.js.map +1 -1
- package/dist/core/lsp/client.d.ts +4 -0
- package/dist/core/lsp/client.js +71 -3
- package/dist/core/lsp/client.js.map +1 -1
- package/dist/core/lsp/manager.d.ts +1 -0
- package/dist/core/lsp/manager.js +9 -3
- package/dist/core/lsp/manager.js.map +1 -1
- package/dist/core/lsp/project-root.d.ts +9 -0
- package/dist/core/lsp/project-root.js +75 -0
- package/dist/core/lsp/project-root.js.map +1 -0
- package/dist/core/lsp/reference-project.d.ts +6 -0
- package/dist/core/lsp/reference-project.js +110 -0
- package/dist/core/lsp/reference-project.js.map +1 -0
- package/dist/core/lsp/servers.js +1 -0
- package/dist/core/lsp/servers.js.map +1 -1
- package/dist/core/plan-handoff.d.ts +30 -0
- package/dist/core/plan-handoff.js +10 -0
- package/dist/core/plan-handoff.js.map +1 -0
- package/dist/core/plan-submission-gate.d.ts +28 -0
- package/dist/core/plan-submission-gate.js +27 -0
- package/dist/core/plan-submission-gate.js.map +1 -0
- package/dist/core/prompt-commands.js +95 -0
- package/dist/core/prompt-commands.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/core/subagent-manager.d.ts +2 -1
- package/dist/core/subagent-manager.js +8 -5
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/verification-evidence.d.ts +8 -0
- package/dist/core/verification-evidence.js +27 -5
- package/dist/core/verification-evidence.js.map +1 -1
- package/dist/modes/acp-mode.d.ts +2 -1
- package/dist/modes/acp-mode.js +4 -1
- package/dist/modes/acp-mode.js.map +1 -1
- package/dist/modes/subagent-worker-mode.d.ts +2 -0
- package/dist/modes/subagent-worker-mode.js +1 -3
- package/dist/modes/subagent-worker-mode.js.map +1 -1
- package/dist/system-prompt.js +52 -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.d.ts +4 -1
- package/dist/tools/bash.js +46 -81
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checklist.d.ts +48 -0
- package/dist/tools/checklist.js +146 -0
- package/dist/tools/checklist.js.map +1 -0
- package/dist/tools/code-nav.d.ts +1 -1
- package/dist/tools/code-nav.js +9 -30
- 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.d.ts +2 -2
- package/dist/tools/exit-plan.js +9 -4
- 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/index.d.ts +5 -3
- package/dist/tools/index.js +5 -1
- package/dist/tools/index.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 +35 -46
- 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-shared.d.ts +6 -8
- package/dist/tools/subagent-shared.js +17 -11
- package/dist/tools/subagent-shared.js.map +1 -1
- package/dist/tools/subagent.d.ts +2 -1
- package/dist/tools/subagent.js +7 -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/tasks.d.ts +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 +21 -4
- package/dist/tools/tool-tiers.js +45 -17
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/verification-review.d.ts +2 -0
- package/dist/tools/verification-review.js +41 -0
- package/dist/tools/verification-review.js.map +1 -0
- 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/App.js +1 -0
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/Footer.js +1 -2
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/hooks/useModeState.js +15 -0
- package/dist/ui/hooks/useModeState.js.map +1 -1
- package/dist/ui/tool-line-summary.js +11 -1
- package/dist/ui/tool-line-summary.js.map +1 -1
- package/dist/ui/transcript/tool-presentation.js +1 -1
- package/dist/ui/transcript/tool-presentation.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 +8 -5
- 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
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/** Days after which a recorded check comes back as due. */
|
|
2
|
+
export declare const CHECKLIST_STALE_DAYS = 30;
|
|
3
|
+
/** The record lives at the project root (not under `.ezcoder/`, which many projects ignore). */
|
|
4
|
+
export declare const CHECKLIST_FILE = ".ez-checklist.json";
|
|
5
|
+
export declare const CHECKLIST_GROUPS: readonly ["Foundations", "Source control", "Code quality", "Design & UX", "Safety", "Performance", "Shipping", "Handover"];
|
|
6
|
+
export type ChecklistGroup = (typeof CHECKLIST_GROUPS)[number];
|
|
7
|
+
export interface ChecklistItem {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly group: ChecklistGroup;
|
|
10
|
+
readonly title: string;
|
|
11
|
+
/** A short, first-person purpose hint shown as the item's tooltip. */
|
|
12
|
+
readonly description: string;
|
|
13
|
+
/** What the agent should inspect, written as instructions. */
|
|
14
|
+
readonly check: string;
|
|
15
|
+
/** Bundled skill to load before checking, when one fits. */
|
|
16
|
+
readonly skill?: string;
|
|
17
|
+
/** Built-in setup command that fixes most gaps, when one exists. */
|
|
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[];
|
|
21
|
+
}
|
|
22
|
+
/** In recommended run order. */
|
|
23
|
+
export declare const CHECKLIST_ITEMS: readonly [{
|
|
24
|
+
readonly id: "agent-setup";
|
|
25
|
+
readonly group: "Foundations";
|
|
26
|
+
readonly title: "Agent setup";
|
|
27
|
+
readonly description: "I start here so the agent knows the project. /init can create or update project instructions.";
|
|
28
|
+
readonly check: "A context file (AGENTS.md or CLAUDE.md) exists, its commands and architecture notes match the code today, and the project has the skills its recurring work needs.";
|
|
29
|
+
readonly setupCommand: "init";
|
|
30
|
+
}, {
|
|
31
|
+
readonly id: "docs";
|
|
32
|
+
readonly group: "Foundations";
|
|
33
|
+
readonly title: "README & setup docs";
|
|
34
|
+
readonly description: "I check this so someone new can get the project running without asking me.";
|
|
35
|
+
readonly check: "The README says what the project is and how to install, run and test it; an example env file lists required settings; a licence file exists.";
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: "naming";
|
|
38
|
+
readonly group: "Foundations";
|
|
39
|
+
readonly title: "Shared vocabulary";
|
|
40
|
+
readonly description: "I use this to keep names consistent and big decisions written down.";
|
|
41
|
+
readonly check: "Each domain concept has one name across code and docs, a glossary (CONTEXT.md or similar) exists for non-trivial domains, and hard-to-reverse decisions are recorded (ADRs).";
|
|
42
|
+
readonly skill: "shared-language";
|
|
43
|
+
}, {
|
|
44
|
+
readonly id: "git-github";
|
|
45
|
+
readonly group: "Source control";
|
|
46
|
+
readonly title: "Git & GitHub";
|
|
47
|
+
readonly description: "I use this to check the repo setup, ignore rules and protection for main.";
|
|
48
|
+
readonly check: "The project is a Git repo with a GitHub remote, .gitignore covers build output and local files, the main branch is protected (ruleset or branch protection, via `gh` when available), and no large binaries are committed.";
|
|
49
|
+
readonly setupCommand: "setup-ci";
|
|
50
|
+
}, {
|
|
51
|
+
readonly id: "secrets";
|
|
52
|
+
readonly group: "Source control";
|
|
53
|
+
readonly title: "Secrets kept out";
|
|
54
|
+
readonly description: "I check this for keys and passwords that slipped into the code or Git history.";
|
|
55
|
+
readonly check: "No API keys, tokens, passwords or private keys in tracked files or Git history; env files are ignored; secrets are read from the environment or a secret store.";
|
|
56
|
+
readonly skill: "bulletproof";
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "quality-tools";
|
|
59
|
+
readonly group: "Code quality";
|
|
60
|
+
readonly title: "Lint, format & type checks";
|
|
61
|
+
readonly description: "I use this to catch formatting, lint and type errors before they pile up.";
|
|
62
|
+
readonly check: "A linter, formatter and type checker (where the language has one) are configured, have scripts to run them, and pass when run now.";
|
|
63
|
+
}, {
|
|
64
|
+
readonly id: "tests";
|
|
65
|
+
readonly group: "Code quality";
|
|
66
|
+
readonly title: "Tests";
|
|
67
|
+
readonly description: "I use this to check that tests pass and cover the parts that really matter.";
|
|
68
|
+
readonly check: "A test suite exists, runs green now, and covers the critical paths with real code paths rather than mocks alone.";
|
|
69
|
+
readonly skill: "tdd";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "ci";
|
|
72
|
+
readonly group: "Code quality";
|
|
73
|
+
readonly title: "CI";
|
|
74
|
+
readonly description: "I use this to check that every pull request gets built and tested automatically.";
|
|
75
|
+
readonly check: "CI runs build, lint and tests on every pull request and push to main, and the workflows are hardened (pinned actions, least-privilege permissions, no untrusted input in run steps).";
|
|
76
|
+
readonly setupCommand: "setup-ci";
|
|
77
|
+
}, {
|
|
78
|
+
readonly id: "commit-gate";
|
|
79
|
+
readonly group: "Code quality";
|
|
80
|
+
readonly title: "Commit checks";
|
|
81
|
+
readonly description: "I use this to check that /commit runs checks and a review before saving a commit.";
|
|
82
|
+
readonly check: "A project /commit command exists that runs the project's checks and a review before committing.";
|
|
83
|
+
readonly setupCommand: "setup-commit";
|
|
84
|
+
}, {
|
|
85
|
+
readonly id: "code-health";
|
|
86
|
+
readonly group: "Code quality";
|
|
87
|
+
readonly title: "Code health";
|
|
88
|
+
readonly description: "I use this to spot dead code, repetition and files that are getting hard to work with.";
|
|
89
|
+
readonly check: "Look for duplicated logic, dead code, unused exports and very large files or functions that are hard to change safely.";
|
|
90
|
+
readonly skill: "refactoring";
|
|
91
|
+
}, {
|
|
92
|
+
readonly id: "errors-logging";
|
|
93
|
+
readonly group: "Code quality";
|
|
94
|
+
readonly title: "Errors & logging";
|
|
95
|
+
readonly description: "I use this to catch swallowed errors, confusing messages and leftover debug logs.";
|
|
96
|
+
readonly check: "Errors are handled at I/O boundaries with clear user-facing messages, nothing swallows errors silently, and there are no stray debug prints in shipped code.";
|
|
97
|
+
}, {
|
|
98
|
+
readonly id: "dependencies";
|
|
99
|
+
readonly group: "Code quality";
|
|
100
|
+
readonly title: "Dependencies";
|
|
101
|
+
readonly description: "I check this for risky, unused or abandoned packages.";
|
|
102
|
+
readonly check: "A lockfile is committed, the package manager's audit reports no known vulnerabilities, and there are no unused or abandoned packages.";
|
|
103
|
+
readonly skill: "bulletproof";
|
|
104
|
+
}, {
|
|
105
|
+
readonly id: "design-system";
|
|
106
|
+
readonly group: "Design & UX";
|
|
107
|
+
readonly title: "Design system";
|
|
108
|
+
readonly description: "I use this to check that colours, spacing and components come from one shared place.";
|
|
109
|
+
readonly check: "Colour, type, spacing and radius tokens are defined in one place and shared components exist for repeated UI. Not applicable without a UI.";
|
|
110
|
+
readonly skill: "evidence-led-ui";
|
|
111
|
+
}, {
|
|
112
|
+
readonly id: "styling-consistency";
|
|
113
|
+
readonly group: "Design & UX";
|
|
114
|
+
readonly title: "Consistent styling";
|
|
115
|
+
readonly description: "I use this to catch one-off styles that don't match the rest of the app.";
|
|
116
|
+
readonly check: "Find hard-coded colours and sizes and one-off styles where shared tokens or components already exist. Not applicable without a UI.";
|
|
117
|
+
readonly skill: "evidence-led-ui";
|
|
118
|
+
}, {
|
|
119
|
+
readonly id: "motion-consistency";
|
|
120
|
+
readonly group: "Design & UX";
|
|
121
|
+
readonly title: "Consistent animation";
|
|
122
|
+
readonly description: "I use this to keep animations consistent and check they respect reduced motion.";
|
|
123
|
+
readonly check: "Animations use shared durations and easings, and reduced-motion preferences are respected. Not applicable without a UI.";
|
|
124
|
+
readonly skill: "evidence-led-ui";
|
|
125
|
+
}, {
|
|
126
|
+
readonly id: "accessibility";
|
|
127
|
+
readonly group: "Design & UX";
|
|
128
|
+
readonly title: "Accessibility";
|
|
129
|
+
readonly description: "I use this to catch things that make the app hard to read or use without a mouse.";
|
|
130
|
+
readonly check: "Text contrast is sufficient, everything works by keyboard with visible focus, and controls and images have labels or alt text. Not applicable without a UI.";
|
|
131
|
+
readonly skill: "evidence-led-ui";
|
|
132
|
+
}, {
|
|
133
|
+
readonly id: "ui-states";
|
|
134
|
+
readonly group: "Design & UX";
|
|
135
|
+
readonly title: "Loading, empty & error states";
|
|
136
|
+
readonly description: "I check what people see while loading, when there's nothing to show or when things break.";
|
|
137
|
+
readonly check: "Every screen handles loading, empty and error states, and layouts survive small screens and long text. Not applicable without a UI.";
|
|
138
|
+
readonly skill: "evidence-led-ui";
|
|
139
|
+
}, {
|
|
140
|
+
readonly id: "security";
|
|
141
|
+
readonly group: "Safety";
|
|
142
|
+
readonly title: "Security audit";
|
|
143
|
+
readonly description: "I use this to look for security holes before shipping.";
|
|
144
|
+
readonly check: "Run a full security audit of the project following the skill.";
|
|
145
|
+
readonly skill: "bulletproof";
|
|
146
|
+
}, {
|
|
147
|
+
readonly id: "data-safety";
|
|
148
|
+
readonly group: "Safety";
|
|
149
|
+
readonly title: "Data safety";
|
|
150
|
+
readonly description: "I use this to check backups and catch changes that could lose someone's data.";
|
|
151
|
+
readonly check: "Migrations are reversible or guarded, backups exist for real data, and destructive operations are confirmed and recoverable. Not applicable without stored data.";
|
|
152
|
+
readonly skill: "durable";
|
|
153
|
+
}, {
|
|
154
|
+
readonly id: "compliance";
|
|
155
|
+
readonly group: "Safety";
|
|
156
|
+
readonly title: "Compliance";
|
|
157
|
+
readonly description: "I check this for gaps around privacy, cookies, payments and licences.";
|
|
158
|
+
readonly check: "Privacy policy and terms exist where users or personal data are involved, cookies and payments follow the rules, and dependency licences are compatible.";
|
|
159
|
+
readonly skill: "compliance-guard";
|
|
160
|
+
}, {
|
|
161
|
+
readonly id: "performance";
|
|
162
|
+
readonly group: "Performance";
|
|
163
|
+
readonly title: "Performance audit";
|
|
164
|
+
readonly description: "I use this to catch slow spots and things wasting memory.";
|
|
165
|
+
readonly check: "Run a full performance audit of the project following the skill.";
|
|
166
|
+
readonly skill: "lean";
|
|
167
|
+
}, {
|
|
168
|
+
readonly id: "build-release";
|
|
169
|
+
readonly group: "Shipping";
|
|
170
|
+
readonly title: "Build & release";
|
|
171
|
+
readonly description: "I use this to check that a fresh copy builds and the release steps are clear.";
|
|
172
|
+
readonly check: "The project builds from a clean clone with documented steps, versions are tracked, a changelog exists, and releases are documented or automated.";
|
|
173
|
+
}, {
|
|
174
|
+
readonly id: "monitoring";
|
|
175
|
+
readonly group: "Shipping";
|
|
176
|
+
readonly title: "Error reporting";
|
|
177
|
+
readonly description: "I use this to check that I'll hear about crashes and know where to look.";
|
|
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, `.ezcoder/`, 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."];
|
|
186
|
+
}];
|
|
187
|
+
export type ChecklistId = (typeof CHECKLIST_ITEMS)[number]["id"];
|
|
188
|
+
export declare const CHECKLIST_IDS: [ChecklistId, ...ChecklistId[]];
|
|
189
|
+
export declare function getChecklistItem(id: string): ChecklistItem | undefined;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// The built-in project health checklist: one definition list shared by the
|
|
2
|
+
// `checklist` tool, the run prompt (`checklist-prompt.ts`) and the app's
|
|
3
|
+
// Checklist screen, so the three can never drift apart.
|
|
4
|
+
/** Days after which a recorded check comes back as due. */
|
|
5
|
+
export const CHECKLIST_STALE_DAYS = 30;
|
|
6
|
+
/** The record lives at the project root (not under `.ezcoder/`, which many projects ignore). */
|
|
7
|
+
export const CHECKLIST_FILE = ".ez-checklist.json";
|
|
8
|
+
export const CHECKLIST_GROUPS = [
|
|
9
|
+
"Foundations",
|
|
10
|
+
"Source control",
|
|
11
|
+
"Code quality",
|
|
12
|
+
"Design & UX",
|
|
13
|
+
"Safety",
|
|
14
|
+
"Performance",
|
|
15
|
+
"Shipping",
|
|
16
|
+
"Handover",
|
|
17
|
+
];
|
|
18
|
+
/** In recommended run order. */
|
|
19
|
+
export const CHECKLIST_ITEMS = [
|
|
20
|
+
{
|
|
21
|
+
id: "agent-setup",
|
|
22
|
+
group: "Foundations",
|
|
23
|
+
title: "Agent setup",
|
|
24
|
+
description: "I start here so the agent knows the project. /init can create or update project instructions.",
|
|
25
|
+
check: "A context file (AGENTS.md or CLAUDE.md) exists, its commands and architecture notes match the code today, and the project has the skills its recurring work needs.",
|
|
26
|
+
setupCommand: "init",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "docs",
|
|
30
|
+
group: "Foundations",
|
|
31
|
+
title: "README & setup docs",
|
|
32
|
+
description: "I check this so someone new can get the project running without asking me.",
|
|
33
|
+
check: "The README says what the project is and how to install, run and test it; an example env file lists required settings; a licence file exists.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "naming",
|
|
37
|
+
group: "Foundations",
|
|
38
|
+
title: "Shared vocabulary",
|
|
39
|
+
description: "I use this to keep names consistent and big decisions written down.",
|
|
40
|
+
check: "Each domain concept has one name across code and docs, a glossary (CONTEXT.md or similar) exists for non-trivial domains, and hard-to-reverse decisions are recorded (ADRs).",
|
|
41
|
+
skill: "shared-language",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "git-github",
|
|
45
|
+
group: "Source control",
|
|
46
|
+
title: "Git & GitHub",
|
|
47
|
+
description: "I use this to check the repo setup, ignore rules and protection for main.",
|
|
48
|
+
check: "The project is a Git repo with a GitHub remote, .gitignore covers build output and local files, the main branch is protected (ruleset or branch protection, via `gh` when available), and no large binaries are committed.",
|
|
49
|
+
setupCommand: "setup-ci",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "secrets",
|
|
53
|
+
group: "Source control",
|
|
54
|
+
title: "Secrets kept out",
|
|
55
|
+
description: "I check this for keys and passwords that slipped into the code or Git history.",
|
|
56
|
+
check: "No API keys, tokens, passwords or private keys in tracked files or Git history; env files are ignored; secrets are read from the environment or a secret store.",
|
|
57
|
+
skill: "bulletproof",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "quality-tools",
|
|
61
|
+
group: "Code quality",
|
|
62
|
+
title: "Lint, format & type checks",
|
|
63
|
+
description: "I use this to catch formatting, lint and type errors before they pile up.",
|
|
64
|
+
check: "A linter, formatter and type checker (where the language has one) are configured, have scripts to run them, and pass when run now.",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "tests",
|
|
68
|
+
group: "Code quality",
|
|
69
|
+
title: "Tests",
|
|
70
|
+
description: "I use this to check that tests pass and cover the parts that really matter.",
|
|
71
|
+
check: "A test suite exists, runs green now, and covers the critical paths with real code paths rather than mocks alone.",
|
|
72
|
+
skill: "tdd",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "ci",
|
|
76
|
+
group: "Code quality",
|
|
77
|
+
title: "CI",
|
|
78
|
+
description: "I use this to check that every pull request gets built and tested automatically.",
|
|
79
|
+
check: "CI runs build, lint and tests on every pull request and push to main, and the workflows are hardened (pinned actions, least-privilege permissions, no untrusted input in run steps).",
|
|
80
|
+
setupCommand: "setup-ci",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "commit-gate",
|
|
84
|
+
group: "Code quality",
|
|
85
|
+
title: "Commit checks",
|
|
86
|
+
description: "I use this to check that /commit runs checks and a review before saving a commit.",
|
|
87
|
+
check: "A project /commit command exists that runs the project's checks and a review before committing.",
|
|
88
|
+
setupCommand: "setup-commit",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "code-health",
|
|
92
|
+
group: "Code quality",
|
|
93
|
+
title: "Code health",
|
|
94
|
+
description: "I use this to spot dead code, repetition and files that are getting hard to work with.",
|
|
95
|
+
check: "Look for duplicated logic, dead code, unused exports and very large files or functions that are hard to change safely.",
|
|
96
|
+
skill: "refactoring",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "errors-logging",
|
|
100
|
+
group: "Code quality",
|
|
101
|
+
title: "Errors & logging",
|
|
102
|
+
description: "I use this to catch swallowed errors, confusing messages and leftover debug logs.",
|
|
103
|
+
check: "Errors are handled at I/O boundaries with clear user-facing messages, nothing swallows errors silently, and there are no stray debug prints in shipped code.",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "dependencies",
|
|
107
|
+
group: "Code quality",
|
|
108
|
+
title: "Dependencies",
|
|
109
|
+
description: "I check this for risky, unused or abandoned packages.",
|
|
110
|
+
check: "A lockfile is committed, the package manager's audit reports no known vulnerabilities, and there are no unused or abandoned packages.",
|
|
111
|
+
skill: "bulletproof",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "design-system",
|
|
115
|
+
group: "Design & UX",
|
|
116
|
+
title: "Design system",
|
|
117
|
+
description: "I use this to check that colours, spacing and components come from one shared place.",
|
|
118
|
+
check: "Colour, type, spacing and radius tokens are defined in one place and shared components exist for repeated UI. Not applicable without a UI.",
|
|
119
|
+
skill: "evidence-led-ui",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "styling-consistency",
|
|
123
|
+
group: "Design & UX",
|
|
124
|
+
title: "Consistent styling",
|
|
125
|
+
description: "I use this to catch one-off styles that don't match the rest of the app.",
|
|
126
|
+
check: "Find hard-coded colours and sizes and one-off styles where shared tokens or components already exist. Not applicable without a UI.",
|
|
127
|
+
skill: "evidence-led-ui",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "motion-consistency",
|
|
131
|
+
group: "Design & UX",
|
|
132
|
+
title: "Consistent animation",
|
|
133
|
+
description: "I use this to keep animations consistent and check they respect reduced motion.",
|
|
134
|
+
check: "Animations use shared durations and easings, and reduced-motion preferences are respected. Not applicable without a UI.",
|
|
135
|
+
skill: "evidence-led-ui",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "accessibility",
|
|
139
|
+
group: "Design & UX",
|
|
140
|
+
title: "Accessibility",
|
|
141
|
+
description: "I use this to catch things that make the app hard to read or use without a mouse.",
|
|
142
|
+
check: "Text contrast is sufficient, everything works by keyboard with visible focus, and controls and images have labels or alt text. Not applicable without a UI.",
|
|
143
|
+
skill: "evidence-led-ui",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "ui-states",
|
|
147
|
+
group: "Design & UX",
|
|
148
|
+
title: "Loading, empty & error states",
|
|
149
|
+
description: "I check what people see while loading, when there's nothing to show or when things break.",
|
|
150
|
+
check: "Every screen handles loading, empty and error states, and layouts survive small screens and long text. Not applicable without a UI.",
|
|
151
|
+
skill: "evidence-led-ui",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: "security",
|
|
155
|
+
group: "Safety",
|
|
156
|
+
title: "Security audit",
|
|
157
|
+
description: "I use this to look for security holes before shipping.",
|
|
158
|
+
check: "Run a full security audit of the project following the skill.",
|
|
159
|
+
skill: "bulletproof",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "data-safety",
|
|
163
|
+
group: "Safety",
|
|
164
|
+
title: "Data safety",
|
|
165
|
+
description: "I use this to check backups and catch changes that could lose someone's data.",
|
|
166
|
+
check: "Migrations are reversible or guarded, backups exist for real data, and destructive operations are confirmed and recoverable. Not applicable without stored data.",
|
|
167
|
+
skill: "durable",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "compliance",
|
|
171
|
+
group: "Safety",
|
|
172
|
+
title: "Compliance",
|
|
173
|
+
description: "I check this for gaps around privacy, cookies, payments and licences.",
|
|
174
|
+
check: "Privacy policy and terms exist where users or personal data are involved, cookies and payments follow the rules, and dependency licences are compatible.",
|
|
175
|
+
skill: "compliance-guard",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "performance",
|
|
179
|
+
group: "Performance",
|
|
180
|
+
title: "Performance audit",
|
|
181
|
+
description: "I use this to catch slow spots and things wasting memory.",
|
|
182
|
+
check: "Run a full performance audit of the project following the skill.",
|
|
183
|
+
skill: "lean",
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "build-release",
|
|
187
|
+
group: "Shipping",
|
|
188
|
+
title: "Build & release",
|
|
189
|
+
description: "I use this to check that a fresh copy builds and the release steps are clear.",
|
|
190
|
+
check: "The project builds from a clean clone with documented steps, versions are tracked, a changelog exists, and releases are documented or automated.",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "monitoring",
|
|
194
|
+
group: "Shipping",
|
|
195
|
+
title: "Error reporting",
|
|
196
|
+
description: "I use this to check that I'll hear about crashes and know where to look.",
|
|
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.",
|
|
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, `.ezcoder/`, 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
|
+
},
|
|
220
|
+
];
|
|
221
|
+
export const CHECKLIST_IDS = CHECKLIST_ITEMS.map((item) => item.id);
|
|
222
|
+
const ITEMS_BY_ID = new Map(CHECKLIST_ITEMS.map((item) => [item.id, item]));
|
|
223
|
+
export function getChecklistItem(id) {
|
|
224
|
+
return ITEMS_BY_ID.get(id);
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=checklist-items.js.map
|
|
@@ -0,0 +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,gGAAgG;AAChG,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;QA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;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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ChecklistItem } from "./checklist-items.js";
|
|
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
|
+
*/
|
|
7
|
+
export declare function checklistRunPrompt(item: ChecklistItem): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// The prompt the app's Checklist screen sends when the user checks one item.
|
|
2
|
+
// Generated from the item definition so it can't drift from the list.
|
|
3
|
+
import { CHECKLIST_FILE, CHECKLIST_STALE_DAYS } from "./checklist-items.js";
|
|
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
|
+
*/
|
|
9
|
+
export function checklistRunPrompt(item) {
|
|
10
|
+
const skillStep = item.skill
|
|
11
|
+
? `Load the \`${item.skill}\` skill with the \`skill\` tool and follow its method in report-only mode.`
|
|
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
|
+
: "";
|
|
18
|
+
const setupNote = item.setupCommand
|
|
19
|
+
? ` Say that \`/${item.setupCommand}\` would fix most gaps.`
|
|
20
|
+
: "";
|
|
21
|
+
return `# Checklist: ${item.title}
|
|
22
|
+
|
|
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.
|
|
24
|
+
|
|
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.
|
|
26
|
+
|
|
27
|
+
## The item
|
|
28
|
+
|
|
29
|
+
- id: \`${item.id}\`
|
|
30
|
+
- group: ${item.group}
|
|
31
|
+
- what to check: ${item.check}${guide}
|
|
32
|
+
|
|
33
|
+
## Steps
|
|
34
|
+
|
|
35
|
+
1. The \`checklist\` tool is loaded on demand. Call \`tool_search\` with the query "checklist" first.
|
|
36
|
+
2. Profile the project briefly: what it is, its stack, whether it has a UI, a deployment, user data.
|
|
37
|
+
3. Decide whether the item applies. If it clearly doesn't (for example design items for a project with no UI), record \`not-applicable\` with a one-line reason and stop.
|
|
38
|
+
4. ${skillStep}
|
|
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.
|
|
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.
|
|
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.`;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=checklist-prompt.js.map
|
|
@@ -0,0 +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;;;;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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ChecklistDetection } from "./checklist-detection.js";
|
|
2
|
+
import { type GitState } from "./checklist-git.js";
|
|
3
|
+
import { type ChecklistRow, type Result } from "./checklist-store.js";
|
|
4
|
+
export interface ChecklistSnapshotRow extends ChecklistRow {
|
|
5
|
+
readonly detection: ChecklistDetection | null;
|
|
6
|
+
readonly runPrompt: string | null;
|
|
7
|
+
/** The project's commit or working tree changed after this result was recorded. */
|
|
8
|
+
readonly changedSinceCheck: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ChecklistSnapshot {
|
|
11
|
+
readonly staleAfterDays: number;
|
|
12
|
+
readonly detectionWarnings: readonly string[];
|
|
13
|
+
readonly items: readonly ChecklistSnapshotRow[];
|
|
14
|
+
}
|
|
15
|
+
export type ReadGitState = (cwd: string, signal?: AbortSignal) => Promise<GitState>;
|
|
16
|
+
/** Read-only snapshot shared by the app and the agent tool. */
|
|
17
|
+
export declare function readChecklistSnapshot(cwd: string, now: Date, signal?: AbortSignal, gitState?: ReadGitState): Promise<Result<ChecklistSnapshot>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CHECKLIST_ITEMS, CHECKLIST_STALE_DAYS, getChecklistItem } from "./checklist-items.js";
|
|
2
|
+
import { detectChecklist } from "./checklist-detection.js";
|
|
3
|
+
import { changedSinceCheck, readGitState } from "./checklist-git.js";
|
|
4
|
+
import { checklistRunPrompt } from "./checklist-prompt.js";
|
|
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
|
+
}
|
|
20
|
+
/** Read-only snapshot shared by the app and the agent tool. */
|
|
21
|
+
export async function readChecklistSnapshot(cwd, now, signal, gitState = readGitState) {
|
|
22
|
+
const [record, detection, git] = await Promise.all([
|
|
23
|
+
readChecklist(cwd, now, signal),
|
|
24
|
+
detectChecklist(cwd, signal),
|
|
25
|
+
currentGitState(cwd, gitState, signal),
|
|
26
|
+
]);
|
|
27
|
+
if (!record.ok)
|
|
28
|
+
return record;
|
|
29
|
+
return {
|
|
30
|
+
ok: true,
|
|
31
|
+
value: {
|
|
32
|
+
staleAfterDays: CHECKLIST_STALE_DAYS,
|
|
33
|
+
detectionWarnings: detection.warnings,
|
|
34
|
+
items: checklistView(CHECKLIST_ITEMS, record.value, now).map((row) => {
|
|
35
|
+
const item = getChecklistItem(row.id);
|
|
36
|
+
return {
|
|
37
|
+
...row,
|
|
38
|
+
detection: detection.items[row.id] ?? null,
|
|
39
|
+
runPrompt: item ? checklistRunPrompt(item) : null,
|
|
40
|
+
changedSinceCheck: changedSinceCheck(row, git),
|
|
41
|
+
};
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=checklist-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AC,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"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ChecklistItem } from "./checklist-items.js";
|
|
2
|
+
export declare const CHECKLIST_RESULTS: readonly ["pass", "issues", "not-applicable"];
|
|
3
|
+
export type ChecklistResult = (typeof CHECKLIST_RESULTS)[number];
|
|
4
|
+
export type ChecklistStatus = "not-run" | "not-applicable" | "due" | "passed" | "needs-work";
|
|
5
|
+
export declare const SUMMARY_MAX = 300;
|
|
6
|
+
export declare const FINDING_MAX = 300;
|
|
7
|
+
export declare const EVIDENCE_MAX = 200;
|
|
8
|
+
export declare const LIST_MAX = 10;
|
|
9
|
+
export interface ChecklistEntry {
|
|
10
|
+
readonly checkedAt: string;
|
|
11
|
+
readonly commit: string | null;
|
|
12
|
+
readonly uncommittedChanges: boolean;
|
|
13
|
+
readonly result: ChecklistResult;
|
|
14
|
+
readonly summary: string;
|
|
15
|
+
readonly findings: readonly string[];
|
|
16
|
+
readonly evidence: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export interface ChecklistRecord {
|
|
19
|
+
readonly version: 1;
|
|
20
|
+
readonly items: Readonly<Record<string, ChecklistEntry>>;
|
|
21
|
+
}
|
|
22
|
+
export type Result<T, E = string> = {
|
|
23
|
+
ok: true;
|
|
24
|
+
value: T;
|
|
25
|
+
} | {
|
|
26
|
+
ok: false;
|
|
27
|
+
error: E;
|
|
28
|
+
};
|
|
29
|
+
export declare function checklistPath(cwd: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Read and validate the record. A missing file is an empty record; a file that
|
|
32
|
+
* is not valid JSON (or not a version-1 record) is an error, so a write never
|
|
33
|
+
* silently replaces a teammate's data. Invalid entries are dropped, not fatal.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readChecklist(cwd: string, now: Date, signal?: AbortSignal): Promise<Result<ChecklistRecord>>;
|
|
36
|
+
/** Canonical JSON: ids sorted, fixed key order, 2-space indent, trailing newline. */
|
|
37
|
+
export declare function serializeChecklist(record: ChecklistRecord): string;
|
|
38
|
+
/** Lock the whole read/merge/write transaction, then replace the record atomically. */
|
|
39
|
+
export declare function writeChecklistEntry(cwd: string, id: string, entry: ChecklistEntry, now: Date, signal?: AbortSignal): Promise<Result<ChecklistRecord>>;
|
|
40
|
+
export declare function checklistStatus(entry: ChecklistEntry | undefined, now: Date): ChecklistStatus;
|
|
41
|
+
export interface ChecklistRow {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly group: ChecklistItem["group"];
|
|
44
|
+
readonly title: string;
|
|
45
|
+
readonly description: string;
|
|
46
|
+
readonly check: string;
|
|
47
|
+
readonly skill: string | null;
|
|
48
|
+
readonly setupCommand: string | null;
|
|
49
|
+
readonly status: ChecklistStatus;
|
|
50
|
+
readonly checkedAt: string | null;
|
|
51
|
+
readonly commit: string | null;
|
|
52
|
+
readonly uncommittedChanges: boolean;
|
|
53
|
+
readonly result: ChecklistResult | null;
|
|
54
|
+
readonly summary: string | null;
|
|
55
|
+
readonly findings: readonly string[];
|
|
56
|
+
readonly evidence: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/** Every item in list order, joined with its recorded entry and current status. */
|
|
59
|
+
export declare function checklistView(items: readonly ChecklistItem[], record: ChecklistRecord, now: Date): ChecklistRow[];
|