heartcode 0.1.63 → 0.1.95

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 CHANGED
@@ -22,56 +22,70 @@ has none, so there's nothing for anyone to poison.
22
22
  ## What it does differently
23
23
 
24
24
  **It keeps working when a model doesn't**
25
- - Give it a list of models, from any providers (free ones too). When one hits a rate limit, goes
25
+ 1. Give it a list of models, from any providers (free ones too). When one hits a rate limit, goes
26
26
  down or fails, the next one answers and the work goes on. A ↻ in the status bar shows it.
27
- - When a conversation gets too long for a model, it moves to one of your models with more room
27
+ 2. When a conversation gets too long for a model, it moves to one of your models with more room
28
28
  instead of summarizing things away.
29
- - When a model goes round in circles, another takes over. Only you stop it (Esc).
30
- - A model that shows it can't do the task (stuck, going round, or saying "done" while the work is
29
+ 3. When a model goes round in circles, another takes over. Only you stop it (Esc).
30
+ 4. A model that shows it can't do the task (stuck, going round, or saying "done" while the work is
31
31
  still broken) hands it to the best-ranked of your models it hasn't tried (LMArena's rankings),
32
32
  not just the next in your list. Your list still decides who starts, and who answers when one is
33
33
  down.
34
- - Models are told to say when they're stuck, and believed: first a different approach, then a
34
+ 5. It remembers how each model does in real work (tasks finished; handed over, reviews that said
35
+ no, broken replies). A model that keeps doing well comes first when HeartCode picks by ranking; one
36
+ that fails most of its work goes last and doesn't start a message while another can (*Settings →
37
+ Learn from each model's track record*; the Models list shows each one's record on hover).
38
+ 6. Models are told to say when they're stuck, and believed: first a different approach, then a
35
39
  second opinion from another of your models, then the next model takes over (not another version
36
40
  of the same one). The same happens when a model says "I can't" without trying its tools, or
37
41
  answers again without doing anything after being told it isn't done.
38
42
 
39
43
  **It works carefully**
40
- - It asks what you want before it builds, reads the current docs before it uses something, and
44
+ 1. It asks what you want before it builds, reads the current docs before it uses something, and
41
45
  makes a plan before it changes anything.
42
- - It runs and tests what it changed before it says "done", and another of your models checks the
46
+ 2. It runs and tests what it changed before it says "done", and another of your models checks the
43
47
  result against what you asked.
44
- - A web page or game it changed, HeartCode opens in a real browser itself before it accepts "done":
48
+ 3. A web page or game it changed, HeartCode opens in a real browser itself before it accepts "done":
45
49
  errors, a blank page or a canvas that draws nothing send it back to work, whatever the model's own
46
50
  checks said.
47
- - It writes the least code that works and changes only what the task needs.
51
+ 4. It writes the least code that works and changes only what the task needs.
48
52
 
49
53
  **It learns, per project**
50
- - Every web page it reads is saved in `.heartcode/research/`.
51
- - After a task, it saves what's worth knowing as notes (`.heartcode/memory/`) and deletes the junk
54
+ 1. Every web page it reads is saved in `.heartcode/research/`.
55
+ 2. After a task, it saves what's worth knowing as notes (`.heartcode/memory/`) and deletes the junk
52
56
  and throwaway files, in the background.
53
- - A mistake it fixes becomes a lesson it won't repeat. So does what blocked a task, or what got it
57
+ 3. A mistake it fixes becomes a lesson it won't repeat. So does what blocked a task, or what got it
54
58
  unstuck, so the next task like it starts knowing.
55
59
 
56
60
  **It gets good work out of small and local models**
57
- - Models that can't call tools are guided one simple question at a time.
58
- - What each model can do comes from [models.dev](https://models.dev), so nothing is wasted
61
+ 1. Models that can't call tools are guided one simple question at a time.
62
+ 2. What each model can do comes from [models.dev](https://models.dev), so nothing is wasted
59
63
  finding out.
60
- - It sends only what's needed, and never sends `max_tokens`, so no reply is cut short.
64
+ 3. It sends only what's needed, and never sends `max_tokens`, so no reply is cut short.
65
+ 4. A short system prompt: who it is, where, and seven core rules. The fuller guidance for each kind
66
+ of work (finding its way, changing code, proving it works, research, parts on other models) comes
67
+ once, when the model starts that kind of work. Your other models: the first five are named, the
68
+ rest are a tool call away.
61
69
 
62
70
  **And the rest you'd expect**
63
- - **Set up in a web page** (`/settings`), not by editing config files.
64
- - **Skills, MCP servers and hooks** in Claude Code's formats; `/import` brings yours over.
65
- - **Tabs** (`Alt+T`) and git worktrees, for work kept apart.
66
- - **Servers in the background**: the model starts a dev server and keeps working. `Alt+B` shows
71
+ 1. **Set up in a web page** (`/settings`), not by editing config files.
72
+ 2. **Skills, MCP servers and hooks** in Claude Code's formats; `/import` brings yours over.
73
+ 3. **Tabs** (`Alt+T`) and git worktrees, for work kept apart.
74
+ 4. **Servers in the background**: the model starts a dev server and keeps working. `Alt+B` shows
67
75
  the running ones' logs live (`A`: the stopped ones too).
68
- - **Telegram messages** when a task finishes, fails or waits for you.
69
- - **Logs** of exactly what you choose (seven kinds, all off by default), readable on the settings page.
70
- - **`heart -p`** runs one task without the screen, for other tools and AI agents, like `claude -p`
71
- (see [SKILL.md](SKILL.md)).
72
- - **`heartcode page index.html`** checks a web page in a real browser (errors, blank page, faint
76
+ 5. **Notifications** when a task finishes, fails or waits for you: a sound (HeartCode's own heartbeat), a
77
+ desktop notification and/or a Telegram message. Asked once at the first start; `/notifications`
78
+ changes it any time (or `/settings` → Notifications, each event on its own).
79
+ 6. **"Done" said, not guessed**: when the model changed or ran something, it says it's finished (and
80
+ what it checked) before it answers; one that stops without saying so is asked whether every part
81
+ is done and checked. In the terminal, not in `heart -p`.
82
+ 7. **Logs** of exactly what you choose (seven kinds, all off by default), readable on the settings page.
83
+ 8. **`heart -p`** runs one task without the screen, for other tools and AI agents, like `claude -p`
84
+ (see [SKILL.md](SKILL.md)). A program can add its own instructions (`--append-system-prompt`) or
85
+ replace HeartCode's entirely (`--system-prompt`), and choose the run's logs (`--logs`).
86
+ 9. **`heartcode page index.html`** checks a web page in a real browser (errors, blank page, faint
73
87
  text, missing icons) and saves desktop and phone screenshots.
74
- - **`/context`** shows what fills the context window. `/update` installs a newer version.
88
+ 10. **`/context`** shows what fills the context window. `/update` installs a newer version.
75
89
 
76
90
  ## What happens when you ask it to make something
77
91
 
@@ -121,9 +135,9 @@ heart
121
135
 
122
136
  ### 3. Open the settings page
123
137
 
124
- Type `/settings`. The page opens in your browser. Its link also works from another device on your
125
- network (handy when HeartCode runs on a server over SSH). Only that link works: it has a secret
126
- key. A running HeartCode picks up your changes right away.
138
+ Type `/settings`. The page opens in your browser. It's served to this machine only; when HeartCode
139
+ runs over SSH, its link uses the address you reached the server at, so it opens on your own
140
+ computer. Only that link works: it has a secret key. A running HeartCode picks up your changes right away.
127
141
 
128
142
  <img width="1920" height="1083" alt="Image" src="https://github.com/user-attachments/assets/b51c5884-1da3-4fc9-9a0c-de119d8bb15e" />
129
143
 
@@ -132,6 +146,10 @@ key. A running HeartCode picks up your changes right away.
132
146
  On **Models → Providers**:
133
147
 
134
148
  1. **+ Add a provider**: its name, base URL and API key. A preset fills in the URL.
149
+ Coding CLIs on this machine (Claude Code, Codex, opencode, Junie, Kilo Code, Cline, GitHub
150
+ Copilot, Cursor, Qwen Code and more): **+ Add CLIs**, tick the ones you want, **Add**. One that
151
+ isn't installed installs from there; no key, each uses its own sign-in. Its models are listed and tested like any provider's, and a message
152
+ answered by one is worked on by that CLI with its own tools, its steps shown in HeartCode.
135
153
  2. **Pick models.** I take all of them: tick the box at the top (*select every model shown*), then
136
154
  **Add N to the list**. Or click a model to add just that one.
137
155
  3. Do the same for every provider you have.
@@ -145,7 +163,8 @@ apps and vision. The rankings become columns you can sort by (step 9).
145
163
  ### 6. Test all
146
164
 
147
165
  Click **Test all**. It sends each model a short message and shows in the *Works?* column which ones
148
- answer, and how fast.
166
+ answer, and how fast. The providers are tested side by side, one model at a time from each: models
167
+ named "auto" first, then those named "free", then the rest, each A to Z.
149
168
 
150
169
  Why: most providers have free and paid models side by side, and not every model they list works
151
170
  for your key. The test shows which ones really answer for you. (A paid model charges for its few
@@ -191,15 +210,16 @@ Go back to the terminal. While the settings page is on, HeartCode shows a dialog
191
210
 
192
211
  Ask it to read, change, run and fix things in your project, like any coding agent.
193
212
 
194
- - `/` shows every command; `heart --help` lists the rest.
195
- - `Shift+Tab` changes what it may do without asking.
196
- - `Esc` twice stops it; `Esc` also closes a dialog.
197
- - While it works, `Enter` queues a message. `Esc` (or `↑`) takes queued messages back into the box
198
- to change or drop, without stopping the work.
199
- - `Shift+Enter` (or `Option+Enter`) adds a new line. `Alt+O` shows all of the model's thinking (two lines
200
- of it show otherwise), `Alt+L` the whole plan (three of its steps show while it works). The same
201
- call made again and again shows once, with a count (×4).
202
- - While it works, commands that don't change the conversation (`/help`, `/cost`, `/diff`,
213
+ 1. `/` shows every command; `heart --help` lists the rest.
214
+ 2. `Shift+Tab` changes what it may do without asking.
215
+ 3. `Esc` twice (or `Ctrl+C` twice) stops it; `Esc` also closes a dialog.
216
+ 4. While it works, `Enter` queues a message; `↑` takes the last one back into the box to change or
217
+ drop, without stopping the work.
218
+ 5. `Shift+Enter` (or `Option+Enter`) adds a new line. The model's thinking shows in full in the
219
+ conversation, as it comes. `Alt+L` shows the whole plan (one line of it shows while it works). Each step is one
220
+ line that says how it went (✓ worked, ✗ failed), and reads or searches in a row are one entry. The
221
+ same call made again and again shows once, with a count (×4).
222
+ 6. While it works, commands that don't change the conversation (`/help`, `/cost`, `/diff`,
203
223
  `/settings`…) run at once; the ones that do (`/compact`, `/rewind`…) wait until it's done.
204
224
 
205
225
  <img width="972" height="611" alt="Image" src="https://github.com/user-attachments/assets/dcf9488a-7cee-4a24-8e3e-c86876d379c9" />
@@ -208,24 +228,26 @@ Ask it to read, change, run and fix things in your project, like any coding agen
208
228
 
209
229
  What's in the sidebar:
210
230
 
211
- - **Models**: *List* (the models HeartCode uses, in order) and *Providers* (where they come from).
212
- - **General**: what it may do without asking, colors, thinking effort, voice input, web search,
213
- and the *Status bar* (drag and drop what it shows). **Notifications**: Telegram.
214
- - **Skills**, **MCP servers** and **System prompt**: what HeartCode can do and what it's told.
215
- - **Advanced**: *Logs* and *Files* (the rest of the settings, as files).
231
+ 1. **Models**: *List* (the models HeartCode uses, in order) and *Providers* (where they come from).
232
+ 2. **General**: what it may do without asking, colors, thinking effort, voice input, web search,
233
+ and the *Status bar* (drag and drop what it shows). **Notifications**: a sound, a desktop notification, Telegram.
234
+ 3. **Skills**, **MCP servers** and **System prompt**: what HeartCode can do and what it's told.
235
+ 4. **Advanced**: *Logs* and *Files* (the rest of the settings, as files).
216
236
 
217
237
  On **Models → List**, also:
218
238
 
219
- - **Drag rows** to fine-tune the order. **Clear sort** puts the list back in its own order; **Clear
239
+ 1. **Drag rows** to fine-tune the order. **Clear sort** puts the list back in its own order; **Clear
220
240
  all** turns off the filters too.
221
- - **Filter** by name, provider, test result, context, abilities or free.
222
- - **Helpers**: the models #1 can hand parts of a task to. In the *Helper* column, switch a model on
241
+ 2. **Filter** by name, provider, test result, context, abilities or free.
242
+ 3. **Helpers**: the models #1 can hand parts of a task to. In the *Helper* column, switch a model on
223
243
  and pick what it's good at: **UI & visuals**, **Code & logic**, **Big & hard**, **Quick & cheap**
224
- (hover an icon to see what it covers). **Suggest helpers** proposes them from the models that
225
- passed **Test all** and the rankings; or set *Helpers* (at the top) to **Automatic**. *Used*:
226
- which helper #1 takes first: **by score** (the default: best placed in LMArena's rankings first),
227
- in your order, or by your provider ranking.
228
- - A model *not found* in models.dev: **Retry** looks it up again, or **Set up** tells HeartCode what
244
+ (hover an icon to see what it covers). *Helpers* (at the top): **Automatic** picks them and their
245
+ jobs for you (again after **Update model info** or **Test all**), and a job goes to the fastest
246
+ helper that's good at it (from its test); if it can't do it, the best-ranked of the others takes
247
+ over. **My picks**: yours; **Update model info** also marks helpers, from the rankings and the tests
248
+ (added to yours: what you picked stays; a model whose test failed isn't marked). A job goes to the
249
+ best-ranked helper good at it.
250
+ 4. A model *not found* in models.dev: **Retry** looks it up again, or **Set up** tells HeartCode what
229
251
  it can do.
230
252
 
231
253
  ### Recommended: let it see what it builds
@@ -238,37 +260,38 @@ them, especially for anything with a screen.
238
260
  AI-made interfaces often look generic, crowded or broken. This skill gives the model a method
239
261
  (understand the job, break the design down, take every size and color from one system, check it)
240
262
  plus a theme, a starter page and guides for common components, in shadcn/ui's look.
241
- - Install: **Skills** → paste `p32929/p32929_design_skill` in *Install a skill* → **Install**.
263
+ 1. Install: **Skills** → paste `p32929/p32929_design_skill` in *Install a skill* → **Install**.
242
264
  Or type `/install_skill p32929/p32929_design_skill` in HeartCode.
243
- - The model loads it when a task is about how something looks. To have it in every message, set
265
+ 2. The model loads it when a task is about how something looks. To have it in every message, set
244
266
  *Who uses it* to *Always on*.
245
267
 
246
268
  **Chrome DevTools MCP**: so it can check web pages in a real browser.
247
269
  The model opens what it built in Chrome, clicks through it, reads the console errors and takes
248
270
  screenshots, instead of guessing whether it works.
249
- - Install: **MCP servers** → **+ Add a server** → paste `npx -y chrome-devtools-mcp@latest --isolated`
271
+ 1. Install: **MCP servers** → **+ Add a server** → paste `npx -y chrome-devtools-mcp@latest --isolated`
250
272
  → **Add server**. Its name (*chrome-devtools*) comes from the command.
251
- - `--isolated` gives it a fresh browser profile each time, so it never touches your own Chrome.
273
+ 2. `--isolated` gives it a fresh browser profile each time, so it never touches your own Chrome.
252
274
  Add `--headless` with the *+ flag* box to hide the window; untick a flag to turn it off.
253
- - Needs Google Chrome installed.
275
+ 3. Needs Google Chrome installed.
254
276
 
255
277
  **Computer use MCP**: so it can use apps outside the browser.
256
278
  Screenshots, mouse, keyboard and apps on your computer: for testing a desktop app or a game, or
257
279
  anything a browser can't reach.
258
- - Install: **+ Add a server** → paste `npx -y @zavora-ai/computer-use-mcp@latest` → **Add server**.
280
+ 1. Install: **+ Add a server** → paste `npx -y @zavora-ai/computer-use-mcp@latest` → **Add server**.
259
281
  Its name is *computer-use*.
260
- - On macOS, give your terminal app **Accessibility** and **Screen Recording** access (System
282
+ 2. On macOS, give your terminal app **Accessibility** and **Screen Recording** access (System
261
283
  Settings → Privacy & Security), and install the Xcode command line tools
262
284
  (`xcode-select --install`).
263
- - It can click anything on your screen. Switch it off in the list when you don't need it.
285
+ 3. It can click anything on your screen. Switch it off in the list when you don't need it.
264
286
 
265
287
  For screenshots to be useful, one of your models must be able to see images. If #1 can't, it
266
288
  hands the looking to the first of your models that can.
267
289
 
268
290
  **Also useful:**
269
- - **Notifications**: a Telegram message when a task finishes, fails or waits for you. Make a bot with
291
+ 1. **Notifications**: a sound and/or a desktop notification on this computer, or a Telegram message,
292
+ when a task finishes, fails or waits for you (each event on its own; *Try it* plays it). For Telegram, make a bot with
270
293
  [@BotFather](https://t.me/BotFather), paste its token, press Start in the bot; HeartCode finds your chat.
271
- - **Advanced → Logs**: switch on only the kinds you need and read them there (by run, searched,
294
+ 2. **Advanced → Logs**: switch on only the kinds you need and read them there (by run, searched,
272
295
  live). Logs older than 3 days are deleted.
273
296
 
274
297
  ## Thanks
@@ -286,3 +309,13 @@ short) come from Karpathy's guidelines, Grill Me, Superpowers, Ponytail and Cave
286
309
  ## License
287
310
 
288
311
  [MIT](LICENSE)
312
+
313
+ ## Contributing
314
+
315
+ Contributions are very welcome, thank you! Before you start on a pull request, please open an issue and tell me what you would like to add or change. That way we can agree on it first, and your time is not wasted on something that might not fit. Thanks for helping make HeartCode better.
316
+
317
+ ## You might also like
318
+
319
+ <a href="https://openstore.pfay.workers.dev/cards/p32929?n=4&amp;repo=HeartCode"><picture><source media="(prefers-color-scheme: dark)" srcset="https://openstore.pfay.workers.dev/cards/p32929.svg?n=4&amp;repo=HeartCode&amp;theme=dark"><img src="https://openstore.pfay.workers.dev/cards/p32929.svg?n=4&amp;repo=HeartCode&amp;theme=light" width="100%" alt="More apps by p32929 on OpenStore"></picture></a>
320
+
321
+ <p><a href="https://p32929.github.io/share/?repo=HeartCode"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-share-dark.svg"><img src="https://p32929.github.io/readme/footer-share-light.svg" width="50%" align="top" alt="Share this project with your friends in one click"></picture></a><a href="https://p32929.github.io/support/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-support-dark.svg"><img src="https://p32929.github.io/readme/footer-support-light.svg" width="50%" align="top" alt="If you like my work and want to support me, feel free to support"></picture></a><br><a href="https://openstore.pfay.workers.dev/add"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-join-dark.svg"><img src="https://p32929.github.io/readme/footer-join-light.svg" width="100%" align="top" alt="Put your own apps on OpenStore: free, your listing lives in your own repo"></picture></a></p>
package/SKILL.md CHANGED
@@ -16,7 +16,7 @@ heart --version # installed? (else: node /path/to/heart_cli/bin/heart.j
16
16
  heart providers # the providers set up, and their URLs (keys are masked)
17
17
  heart models # what -m takes, one per line: "auto" first, then the user's models (provider/model), #1 first
18
18
  heart models --json # the same, as JSON
19
- heart models --all # every provider's models (slower: asks each provider); with --json, beside the list
19
+ heart models --all # every switched-on provider's models (slower: asks each provider); with --json, beside the list
20
20
  ```
21
21
 
22
22
  `heart models` prints one id per line, nothing else (like `opencode models`):
@@ -50,10 +50,11 @@ With `--json`:
50
50
  No model set up yet: `models` is empty (and `heart -p` fails with "no model set up").
51
51
  `heart models [--all] <filter>` keeps only the ids that contain `<filter>`.
52
52
 
53
- `providers` (only with `--all`): every provider's models. `list: false`: the user switched that
54
- provider's list off, and `models` are the ones they added by name. `off: true`: the user switched
55
- the provider off; `auto` skips its models (they aren't in `models`), but `-m provider/model` still runs one. A provider that can't be
56
- reached has an `error` (in text: a line on stderr) and is skipped; the command still exits `0`.
53
+ `providers` (only with `--all`): every switched-on provider's models. `list: false`: the user
54
+ switched that provider's list off, and `models` are the ones they added by name. A provider the
55
+ user switched off isn't there at all, and `auto` skips its models, but `-m provider/model` still
56
+ runs one. A provider that can't be reached has an `error` (in text: a line on stderr) and is
57
+ skipped; the command still exits `0`.
57
58
 
58
59
  **Which model to pass:**
59
60
 
@@ -79,6 +80,13 @@ list moves on to a model with a smaller window, it's summarized for that model b
79
80
  Each request is fitted to the model it goes to: one that can't see gets a note in place of each
80
81
  image, one that can't call tools gets the tool calls as text.
81
82
 
83
+ **Track record:** HeartCode remembers how each model does in real work (`~/.heart/records.json`:
84
+ tasks finished, handovers, reviews that said no, broken replies), unless the user turned it off on
85
+ the settings page. With `auto`, the next model after a failure is picked by the rankings moved by
86
+ that record, and a #1 that failed most of its recent work doesn't start the run while another model
87
+ can (the `init` line's `model` says which one did). A run's record counts for the next ones (`--temp`:
88
+ not kept).
89
+
82
90
  `--provider <name>` and `-u <url>` (a server for this run) also mean one model, alone.
83
91
 
84
92
  `heartcode page <file|url>` checks a web page in a headless browser (errors, a blank page, a click
@@ -124,7 +132,7 @@ goes to stderr. Logs never go to stdout.
124
132
  ## Continue the same conversation
125
133
 
126
134
  Every run is saved as a session in the project's `.heartcode/sessions/` (and logged, for the kinds of logs the user
127
- switched on), as when the user works in HeartCode; `--temp` keeps nothing. Pass the `session_id`
135
+ switched on, or the ones `--logs` names), as when the user works in HeartCode; `--temp` keeps nothing. Pass the `session_id`
128
136
  from the last result:
129
137
 
130
138
  ```sh
@@ -148,6 +156,7 @@ can't switch the model you chose.
148
156
  | Everything (edits and commands) | `--permission-mode all` (the default unless the user set another) |
149
157
  | Changes kept apart from the user's files | `--worktree=<name>` (in a git repo): it works in `.heartcode/worktrees/<name>` on the branch `heartcode/<name>`; kept if anything changed (merge it from there), removed if nothing did |
150
158
  | A cap on how long it works | `--max-turns 30` (model steps), `--max-retries 3` (a failing provider) |
159
+ | No logs, or only some | `--logs none`, or e.g. `--logs errors,requests` (the user's settings stay as they are) |
151
160
  | Nothing kept: no session, logs, settings or notes in `~/.heart`, nothing in the project's `.heartcode/` | `--temp` (a throwaway copy, shared by the `--temp` runs going on at once, deleted after the last; the project's notes and research are read, and what the run adds goes with the copy) With `--worktree` too, the worktree itself is made in the project's `.heartcode/worktrees/` (git needs it in the repository) |
152
161
 
153
162
  Tool names: HeartCode's own (`read_file`, `edit_file`, `write_file`, `run_command`, `search`,
@@ -175,13 +184,17 @@ work, in a slower guided mode.
175
184
  The model in use knows the user's other models and works with them through its `agent` tool.
176
185
  When the user picked helpers (on *Your models*: a switch per model and what it's good at: UI &
177
186
  visuals, Code & logic, Big & hard, Quick & cheap), it knows only those, and a job goes to the
178
- helper good at it (no model named: the first helper, in the user's order or by their provider
179
- ranking, as they chose); else it knows all of them, in the user's order, with what each can do. It
187
+ helper good at it (no model named: the best-ranked helper good at it; with helpers picked
188
+ automatically, the fastest in its test that's good at the job, and the best-ranked of the others if
189
+ it fails); else it knows all of them, best-ranked first. For each model it's told what it can do (context, tools, images,
190
+ thinking), its places in LMArena's rankings, how fast it answered its test, its price and its track
191
+ record in HeartCode, and picks with that. It
180
192
  asks a model that can for what it
181
193
  can't do itself (a model that can't see asks one that can about a screenshot: "which tiles show a
182
194
  chair?"), several at once when there are many images or parts, and a helper that fails is handed to
183
- the next capable model in the user's order (with helpers picked: the next helper, then the model in
184
- use) until one does the job. A helper works until its job is done (no step
195
+ the best-ranked capable model not tried yet (rankings and track record; with helpers picked: the
196
+ next helper, then the model in use) until one does the job; the next one is told what the one before it found, did and changed,
197
+ and goes on from there. A helper works until its job is done (no step
185
198
  limit; `--max-turns` applies to it too). Their tokens are in `usage`, and each model's in
186
199
  `modelUsage`.
187
200
 
@@ -202,15 +215,17 @@ HEART_API_KEY=… heart -u https://api.groq.com/openai/v1 -m openai/gpt-oss-120b
202
215
  ```
203
216
 
204
217
  A model server on this machine (Ollama on :11434, LM Studio on :1234, llama.cpp on :8080) is
205
- found on its own while no provider is set up yet. The user can also set everything up in a browser: `heart settings` (its link has
206
- the machine's network address, so it opens from another device too, for HeartCode on a server), where
207
- **Test all** under *Your models* sends each model a short message to show it really answers, and how fast. A run that fails with a wrong key or an unknown model: ask the user to test it there.
218
+ found on its own while no provider is set up yet. The user can also set everything up in a browser: `heart settings` (served to this machine
219
+ only; over SSH its link has the address you reached the server at, so it opens on your computer), where
220
+ **Test all** under *Models → List* sends each model a short message to show it really answers, and how fast. A run that fails with a wrong key or an unknown model: ask the user to test it there.
208
221
 
209
222
  ## More context for the task
210
223
 
211
224
  | Flag | |
212
225
  |---|---|
213
226
  | `--append-system-prompt "<text>"` | your instructions for this run, at the end of the system prompt. HeartCode's own part then says less (no role of its own, no "stay in the project folder", no way of finishing of its own) and tells the model to follow yours where they differ; its `manage` tool is left out (its memory still works: `--no-memory` turns that off) |
227
+ | `--system-prompt "<text>"` / `--system-prompt-file <file>` | instead of HeartCode's system prompt: the model is only what yours says. HeartCode's own workflow is off too (plan before editing, the "not done" checks, the browser check, reviews, handovers, memory and lessons): an answer is the answer. Its tools, permissions and model fallback stay. With `--append-system-prompt` as well, that text follows yours |
228
+ | `--logs <kinds>` | this run's logs, whatever the user's settings say: `none`, `all`, or some of `tools`, `models`, `agent`, `errors`, `conversation`, `debug`, `requests` (comma-separated). Logs go to files under `~/.heart/logs` (or `HEART_LOGS`), never stdout. `HEART_LOG=<file>` puts every text log in one file |
214
229
  | `--mcp-config <file or JSON>` | more MCP servers (repeatable); `--strict-mcp-config`: only those. The model sees every server's tools by name, one line each, and gets a tool's arguments when it uses it (a call that doesn't fit them comes back with what's wrong, not run). What a server says about using its tools comes once, with the first result of one of them |
215
230
  | `--skills-dir <folder>` | more skills (repeatable) |
216
231
  | `--no-memory` | nothing read or kept: no memory notes, no web pages saved in the project, no wrap-up at the end (see "What a run leaves") |
@@ -234,13 +249,26 @@ server, a watcher) takes `background: true`. The `background` tool reads a comma
234
249
  (after waiting up to `wait` seconds for it), lists them and stops one. Whatever is still running is
235
250
  stopped when HeartCode exits.
236
251
 
252
+ All of this section is HeartCode's own workflow. With `--system-prompt` none of it runs (no
253
+ plan-first, no checks or review, no handovers for being stuck, no notes, research or wrap-up): the
254
+ model's first answer without tool calls is the answer, and your program does its own checking.
255
+
237
256
  Before a task that changed files ends, another of the user's models (the same one when only one is
238
257
  used) reviews the work against the request in a request of its own; a NO sends it back to fix.
239
258
  The first file change of each message waits for the model's plan (its todo list): without one it
240
259
  isn't made, once (the model is told to write the plan first). Changing files and
241
- then saying it's done without running anything since sends it back to check. Nothing stops a
242
- task but `--max-turns`, `--max-retries` or an interrupt: a model going round in circles hands the
243
- work to the next model in the list. These requests are in `usage` and `modelUsage` too.
260
+ then saying it's done without running anything since sends it back to check. A web page or game it
261
+ changed, HeartCode opens in a headless browser itself before it accepts "done" (as `heartcode page`
262
+ does): errors, a blank page or a canvas that draws nothing send it back. A plan of several steps is
263
+ worked on by several helpers at once where steps stand alone (headless: nobody is asked). Nothing stops a
264
+ task but `--max-turns`, `--max-retries` or an interrupt: a model going round in circles (the same
265
+ step three times with nothing changed, also with other steps in between) hands the work to the next
266
+ model in the list. The model can't write HeartCode's own files in `.heartcode/` (`sessions`,
267
+ `outputs`, `worktrees`, `models.json`), and its file lists leave them out.
268
+
269
+ Only in the terminal, not with `-p`: the model's `done` tool (it says it's finished; one that stops
270
+ without saying so is asked again) and notifications (a sound, a desktop notification, Telegram).
271
+ Your program decides when a `-p` run's work is done, and tells the user itself. These requests are in `usage` and `modelUsage` too.
244
272
 
245
273
  ## Long tasks: a stream of events
246
274
 
@@ -294,7 +322,7 @@ a program that doesn't know a subtype can skip it, as for Claude Code):
294
322
 
295
323
  | `subtype` | Fields | When |
296
324
  |---|---|---|
297
- | `status` | `status`, `model` | what it's doing now, as the screen's spinner says it ("thinking", "waiting for …", "preparing read_file README.md", a running command's latest output line, read once a second); sent when it changes. A helper's: its model |
325
+ | `status` | `status`, `model` | what it's doing now, as the screen's spinner says it ("thinking", "waiting for …", "reading README.md…", a running command's latest output line, read once a second); sent when it changes. A helper's: its model |
298
326
  | `todos` | `todos`: `[{ content, status, why?, by? }]` | the whole plan, each time it changes; `status` is `pending`, `in_progress`, `completed` or `stuck` (`why`: the model's reason); `by`: the model a step was handed to |
299
327
  | `stuck` | `step`, `why`, `count`, `model` | the model says it's stuck on a step (`count` this message): the 1st time it's told to change approach, the 2nd another model gives a second opinion, the 3rd the next model takes over (a `warning` says so) |
300
328
  | `helper` | `tool_use_id`, `label`, `model`, `status` | a helper at work: `starting`, then what it's doing, then `done`. `tool_use_id` is its `agent` call (several parts of a plan run at once can share one); `label` its job |
@@ -312,3 +340,8 @@ requests (their `retry` lines can come after the `result`). Their tokens are in
312
340
  - Don't run `heart` without `-p` from an agent: it's a full-screen app and waits for a person.
313
341
  - Don't put API keys on the command line where other processes can see them; use `HEART_API_KEY`.
314
342
  - Don't run `heart settings` unless the user asked: it starts a web page and runs until stopped.
343
+ - Don't use `--system-prompt` only to add instructions or a role: use `--append-system-prompt`, which
344
+ keeps HeartCode's checks (plan, tests, review). Replace it only when your program brings its own
345
+ workflow and checks the work itself.
346
+ - Don't parse logs for results: read `result` (JSON) or the stream. Logs are files, for people
347
+ debugging, and may be off (`--logs none`).