atom-lite 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +27 -16
  3. package/dist/agent/loop.d.ts +10 -0
  4. package/dist/agent/loop.js +114 -1
  5. package/dist/agent/loop.js.map +1 -1
  6. package/dist/agent/turn-recorder.d.ts +4 -0
  7. package/dist/agent/turn-recorder.js +3 -0
  8. package/dist/agent/turn-recorder.js.map +1 -1
  9. package/dist/agent/types.d.ts +22 -0
  10. package/dist/cli/app.js +267 -45
  11. package/dist/cli/app.js.map +1 -1
  12. package/dist/cli/commands.js +183 -2
  13. package/dist/cli/commands.js.map +1 -1
  14. package/dist/cli/main.js +2 -1
  15. package/dist/cli/main.js.map +1 -1
  16. package/dist/cli/tool-box.js +3 -2
  17. package/dist/cli/tool-box.js.map +1 -1
  18. package/dist/config/defaults.js +1 -1
  19. package/dist/config/load.js +2 -2
  20. package/dist/config/load.js.map +1 -1
  21. package/dist/config/schema.d.ts +4 -0
  22. package/dist/config/schema.js +5 -1
  23. package/dist/config/schema.js.map +1 -1
  24. package/dist/context/budget.js +19 -1
  25. package/dist/context/budget.js.map +1 -1
  26. package/dist/eval/runner.d.ts +51 -0
  27. package/dist/eval/runner.js +230 -0
  28. package/dist/eval/runner.js.map +1 -0
  29. package/dist/mcp/client.js +2 -1
  30. package/dist/mcp/client.js.map +1 -1
  31. package/dist/providers/context-window.d.ts +4 -0
  32. package/dist/providers/context-window.js +54 -0
  33. package/dist/providers/context-window.js.map +1 -1
  34. package/dist/providers/factory.js +3 -0
  35. package/dist/providers/factory.js.map +1 -1
  36. package/dist/providers/gemini.d.ts +2 -0
  37. package/dist/providers/gemini.js +18 -11
  38. package/dist/providers/gemini.js.map +1 -1
  39. package/dist/providers/ollama.d.ts +3 -0
  40. package/dist/providers/ollama.js +9 -0
  41. package/dist/providers/ollama.js.map +1 -1
  42. package/dist/providers/openai-compatible.d.ts +2 -0
  43. package/dist/providers/openai-compatible.js +24 -3
  44. package/dist/providers/openai-compatible.js.map +1 -1
  45. package/dist/runtime/background-tasks.d.ts +23 -0
  46. package/dist/runtime/background-tasks.js +141 -0
  47. package/dist/runtime/background-tasks.js.map +1 -0
  48. package/dist/runtime/checkpoint-store.d.ts +64 -0
  49. package/dist/runtime/checkpoint-store.js +419 -0
  50. package/dist/runtime/checkpoint-store.js.map +1 -0
  51. package/dist/sessions/events.js +4 -5
  52. package/dist/sessions/events.js.map +1 -1
  53. package/dist/sessions/store.js +0 -16
  54. package/dist/sessions/store.js.map +1 -1
  55. package/dist/tools/bash.js +45 -9
  56. package/dist/tools/bash.js.map +1 -1
  57. package/dist/tools/edit.js +28 -8
  58. package/dist/tools/edit.js.map +1 -1
  59. package/dist/tools/index.d.ts +1 -0
  60. package/dist/tools/index.js +1 -0
  61. package/dist/tools/index.js.map +1 -1
  62. package/dist/tools/read.js +70 -9
  63. package/dist/tools/read.js.map +1 -1
  64. package/dist/tools/task.d.ts +2 -0
  65. package/dist/tools/task.js +55 -0
  66. package/dist/tools/task.js.map +1 -0
  67. package/dist/tools/types.d.ts +8 -1
  68. package/dist/tools/write.js +29 -8
  69. package/dist/tools/write.js.map +1 -1
  70. package/dist/types.d.ts +11 -0
  71. package/dist/types.js.map +1 -1
  72. package/dist/version.d.ts +1 -0
  73. package/dist/version.js +14 -0
  74. package/dist/version.js.map +1 -0
  75. package/package.json +3 -2
  76. package/skills/code-review/SKILL.md +75 -32
  77. package/skills/code-review/agents/openai.yaml +3 -0
  78. package/skills/pr/CREDITS.md +3 -0
  79. package/skills/pr/SKILL.md +170 -0
  80. package/skills/pr/agents/openai.yaml +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/tools/write.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,EAET,UAAU,GACX,MAAM,SAAS,CA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 };
1
5
  export type ContentPart = {
2
6
  type: "text";
3
7
  text: string;
8
+ } | {
9
+ type: "image";
10
+ data: string;
11
+ mime: string;
4
12
  };
5
13
  export type Message = {
6
14
  role: "system";
@@ -18,6 +26,9 @@ export type Message = {
18
26
  toolCallId: string;
19
27
  name: string;
20
28
  content: string;
29
+ images?: ImagePart[];
30
+ isError?: boolean;
31
+ diff?: string[];
21
32
  };
22
33
  export interface ToolCall {
23
34
  id: string;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AA+E/E,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,MAAM;IAC1B,aAAa,EAAE,OAAO;CACvB,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAsF/E,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,MAAM;IAC1B,aAAa,EAAE,OAAO;CACvB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const VERSION: string;
@@ -0,0 +1,14 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { fileURLToPath } from "node:url";
3
+ import { dirname, join } from "node:path";
4
+ let version = "0.0.0";
5
+ try {
6
+ const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf8"));
7
+ if (typeof pkg?.version === "string")
8
+ version = pkg.version;
9
+ }
10
+ catch {
11
+ // Keep fallback.
12
+ }
13
+ export const VERSION = version;
14
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,IAAI,OAAO,GAAG,OAAO,CAAC;AACtB,IAAI,CAAC;IACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAC1F,CAAC;IACF,IAAI,OAAO,GAAG,EAAE,OAAO,KAAK,QAAQ;QAAE,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAC9D,CAAC;AAAC,MAAM,CAAC;IACP,iBAAiB;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom-lite",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Local-first, model-agnostic coding agent for the terminal",
5
5
  "keywords": [
6
6
  "ai",
@@ -58,7 +58,8 @@
58
58
  "format": "prettier --write .",
59
59
  "format:check": "prettier --check .",
60
60
  "prepack": "npm run build",
61
- "prepublishOnly": "npm run typecheck && npm test"
61
+ "prepublishOnly": "npm run typecheck && npm test",
62
+ "eval": "npm run build && node scripts/eval.mjs"
62
63
  },
63
64
  "engines": {
64
65
  "node": ">=22.19"
@@ -1,46 +1,89 @@
1
1
  ---
2
2
  name: code-review
3
- description: >
4
- Review code changes against repository standards and the originating spec.
5
- Use for "review this PR", "review the diff", "code review", or before merging.
3
+ description: "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\"."
6
4
  ---
7
5
 
8
- # Code Review
6
+ Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
9
7
 
10
- Two-axis review of a change. Run both axes and report them separately.
8
+ - **Standards**: does the code conform to this repo's documented coding standards?
9
+ - **Spec**: does the code faithfully implement the originating issue / spec?
11
10
 
12
- ## Axes
11
+ Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window.
13
12
 
14
- 1. **Standards** — does the code follow this repo's documented conventions?
15
- Sources: `AGENTS.md`, `CONTRIBUTING.md`, `docs/adr/*`, TypeScript strict mode,
16
- NodeNext ESM, named exports, no new runtime deps without discussion.
17
- Also apply the smell baseline: mysterious name, duplicated code, feature envy,
18
- data clumps, primitive obsession, repeated switches, shotgun surgery,
19
- divergent change, speculative generality, message chains, middle man,
20
- refused bequest. A documented repo standard always overrides a smell.
21
-
22
- 2. **Spec** — does the code implement what the issue/spec asked for?
23
- Find the spec under `.scratch/<feature>/spec.md` or the referenced issue.
13
+ The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
24
14
 
25
15
  ## Process
26
16
 
27
- 1. Pin the fixed point: `git diff <base>...HEAD` (three-dot). List commits.
28
- 2. Identify standards sources and the spec source.
29
- 3. For each file/hunk, report:
30
- - Standards: hard violations (cite file + rule) and judgement-call smells.
31
- - Spec: missing/partial requirements, scope creep, wrong-looking implementations.
32
- Quote the spec line for each spec finding.
33
- 4. Aggregate under `## Standards` and `## Spec` headings. Do not merge axes.
17
+ ### 1. Pin the fixed point
18
+
19
+ Whatever the user said is the fixed point (a commit SHA, branch name, tag, `main`, `HEAD~5`, etc.). If they didn't specify one, ask for it.
20
+
21
+ Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`.
22
+
23
+ Before going further, confirm the fixed point resolves (`git rev-parse <fixed-point>`) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents.
24
+
25
+ ### 2. Identify the spec source
26
+
27
+ Look for the originating spec, in this order:
28
+
29
+ 1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.), fetched via the workflow in the tracker doc.
30
+ 2. A path the user passed as an argument.
31
+ 3. A spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature.
32
+ 4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
33
+
34
+ ### 3. Identify the standards sources
35
+
36
+ Search the repo for every file that documents how code should be written. When `CODING_STANDARDS.md` or `CONTRIBUTING.md` exists, it must be on the list.
37
+
38
+ On top of whatever the repo documents, the Standards axis always carries the **smell baseline** below: a fixed set of Fowler code smells (_Refactoring_, ch.3) that applies even when a repo documents nothing. Two rules bind it:
39
+
40
+ - **The repo overrides.** A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
41
+ - **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation. Like any standard here, skip anything tooling already enforces.
42
+
43
+ Each smell reads *what it is* → *how to fix*; match it against the diff:
44
+
45
+ - **Mysterious Name**: a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
46
+ - **Duplicated Code**: the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
47
+ - **Feature Envy**: a method that reaches into another object's data more than its own. → move the method onto the data it envies.
48
+ - **Data Clumps**: the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
49
+ - **Primitive Obsession**: a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
50
+ - **Repeated Switches**: the same `switch`/`if`-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
51
+ - **Shotgun Surgery**: one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
52
+ - **Divergent Change**: one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
53
+ - **Speculative Generality**: abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
54
+ - **Message Chains**: long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
55
+ - **Middle Man**: a class or function that mostly just delegates onward. → cut it, call the real target direct.
56
+ - **Refused Bequest**: a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
57
+
58
+ ### 4. Spawn both sub-agents in parallel
59
+
60
+ Issue both sub-agent calls together, in the foreground, and aggregate the reports they return.
61
+
62
+ **Standards sub-agent prompt** should include:
63
+
64
+ - The full diff command and commit list.
65
+ - The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full (the sub-agent has no other access to it).
66
+ - The brief: "Report, per file/hunk where relevant, (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls: documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."
67
+
68
+ **Spec sub-agent prompt** should include:
69
+
70
+ - The diff command and commit list.
71
+ - The path or fetched contents of the spec.
72
+ - The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
73
+
74
+ If the spec is missing, skip the Spec sub-agent and note this in the final report.
75
+
76
+ ### 5. Aggregate
77
+
78
+ Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings, because the two axes are deliberately separate (see _Why two axes_).
79
+
80
+ End with a one-line summary: total findings per axis, and the worst issue _within each axis_ (if any). Don't pick a single winner across axes: that's the reranking the separation exists to prevent.
34
81
 
35
- ## Output format
82
+ ## Why two axes
36
83
 
37
- - `## Standards` — findings per file/hunk, hard vs judgement.
38
- - `## Spec` — findings keyed to spec lines.
39
- - One-line summary per axis: count + worst issue.
84
+ A change can pass one axis and fail the other:
40
85
 
41
- ## Rules
86
+ - Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
87
+ - Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
42
88
 
43
- - Skip anything tooling enforces (tsc, tests, lint).
44
- - Smells are judgement calls, never hard violations.
45
- - Report facts, not opinions; cite paths and lines.
46
- - Small, reviewable findings are preferred over exhaustive nitpicks.
89
+ Reporting them separately stops one axis from masking the other.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Code Review"
3
+ short_description: "Review a diff on standards and spec"
@@ -0,0 +1,3 @@
1
+ # Credits
2
+
3
+ The **Summary** section's menu of visuals (pseudocode, call trees, component trees, file trees, Mermaid, diffs) and its placement guidance come from [Dex Horthy](https://github.com/dexhorthy)'s [`show-me`](https://github.com/humanlayer/humanlayer) skill, reproduced almost word for word and aimed at a diff instead of a live conversation. `pr` does not depend on `show-me` as a skill (it isn't part of this repo, and a hard dependency would break standalone installs), so the content is copied in rather than pointed at; this file is the attribution a dependency would otherwise have carried.
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: pr
3
+ description: "Use when writing a PR body."
4
+ metadata:
5
+ credits:
6
+ skill: show-me
7
+ author: Dex Horthy
8
+ organisation: Humanlayer
9
+ url: "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md"
10
+ ---
11
+
12
+ Use this template for writing the PR body:
13
+
14
+ ```markdown
15
+ ## Summary
16
+
17
+ <diagram, diff-sketch, or tree>
18
+
19
+ ## Evidence
20
+
21
+ - **Before:** <screenshot/output/failing test run>
22
+ **After:** <screenshot/output/passing test run>
23
+
24
+ ## Merge Danger
25
+
26
+ **Door:** <one-way or two-way>
27
+
28
+ <optional: description>
29
+
30
+ **Blast Radius:** <one-word description>
31
+
32
+ <optional: potential ramifications of merge>
33
+ ```
34
+
35
+ ## Sections
36
+
37
+ Skip all preambles and keep prose brief. Use the user's domain language from `GLOSSARY.md`.
38
+
39
+ ### Summary
40
+
41
+ Pick the smallest view that makes the key point clear.
42
+
43
+ - Show logic or an algorithm as pseudocode:
44
+
45
+ ```text
46
+ on(save)
47
+ if content is unchanged
48
+ return cached result
49
+ write new content
50
+ return fresh result
51
+ ```
52
+
53
+ - Show runtime control flow as a call tree:
54
+
55
+ ```text
56
+ submitForm
57
+ createSession
58
+ persistPrompt
59
+ launchAgent
60
+ navigateToSession
61
+ ```
62
+
63
+ - Show UI structure as a component tree, including state and module boundaries that matter:
64
+
65
+ ```text
66
+ <SessionPage> (apps/example/src/routes/session.tsx)
67
+ useSessionEvents()
68
+ <SessionToolbar>
69
+ <RunSkillButton> (packages/ui)
70
+ ```
71
+
72
+ - Show file responsibility or a broad refactor as a shallow file tree:
73
+
74
+ ```text
75
+ src/
76
+ ├── commands/ # parses user actions
77
+ ├── sessions/ # owns session state
78
+ └── transport/ # sends API requests
79
+ ```
80
+
81
+ - Show component interaction, control flow, or data flow with Mermaid:
82
+
83
+ ```mermaid
84
+ sequenceDiagram
85
+ participant User
86
+ participant UI
87
+ participant Daemon
88
+ User->>UI: choose command
89
+ UI->>Daemon: send expanded prompt
90
+ Daemon-->>UI: stream result
91
+ ```
92
+
93
+ - Use `diff` when the point is what changes and the surrounding shape already exists. Match the diff shape to the topic.
94
+
95
+ For a component change:
96
+
97
+ ```diff
98
+ <SessionPage>
99
+ useSessionEvents()
100
+ <SessionToolbar>
101
+ + <RunSkillButton />
102
+ <SessionTimeline>
103
+ + <SkillResultCard />
104
+ ```
105
+
106
+ For a file-layout change:
107
+
108
+ ```diff
109
+ src/
110
+ ├── commands/
111
+ +│ └── show-me.ts # expands the slash command
112
+ ├── sessions/
113
+ -└── transport.ts
114
+ +└── transport/
115
+ + ├── client.ts
116
+ + └── stream.ts
117
+ ```
118
+
119
+ For a call-tree or call-stack change:
120
+
121
+ ```diff
122
+ submitForm
123
+ createSession
124
+ persistPrompt
125
+ + expandSkillMention
126
+ launchAgent
127
+ - navigateToSession
128
+ + navigateToSession
129
+ + subscribeToEvents
130
+ ```
131
+
132
+ For a state or control-flow change:
133
+
134
+ ```diff
135
+ on(save)
136
+ - write content
137
+ + if content is unchanged
138
+ + return cached result
139
+ + write new content
140
+ + invalidate cache
141
+ ```
142
+
143
+ - Show the whole block when most of it is new, when omitted context would hide ownership or order, or when the user needs a copyable target shape:
144
+
145
+ ```ts
146
+ function expandSkill(command: string): string {
147
+ const skillName = command.slice(1);
148
+ return `use the ${skillName} skill`;
149
+ }
150
+ ```
151
+
152
+ #### Guidance
153
+
154
+ Place each visual next to the short text it supports. Keep only the calls, files, props, states, and boundaries needed to answer the user's current question or the options to resolve the current discussion point.
155
+
156
+ You may use one of these, you may use several, it is unlikely you will use all of them. Use your judgement and don't overwhelm the user.
157
+
158
+ ### Evidence
159
+
160
+ Concrete evidence that the change works. Show a before and after.
161
+
162
+ Screenshots are S-tier - when the environment is set up for it and the change is visual.
163
+
164
+ Execution-based evidence is A-tier. Test results, console output. Show the exact test that now fails and passes, using pseudocode.
165
+
166
+ ### Merge Danger
167
+
168
+ Describe whether it's a one-way or two-way door. You can walk back through two-way doors, but not one-way doors. A PR that is cheap to roll back is lower risk. Changes that involve destructive actions or hard-to-reverse decisions are one-way doors.
169
+
170
+ The blast radius is the potential impact or scope of the changes introduced by this PR. Consider all possibilities. Examples are layout shift, breakages for consumers, mobile responsiveness, etc.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "PR"
3
+ short_description: "Write a PR body that's fast to review"