archymedes-cli 2.0.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.
package/I18N.md ADDED
@@ -0,0 +1,46 @@
1
+ # Internationalization
2
+
3
+ Archymedes CLI localizes its control surfaces into **16 languages**, chosen for global reach with
4
+ deliberate weight on the Americas and Asia:
5
+
6
+ `en` English · `es` Español · `pt` Português · `fr` Français · `de` Deutsch · `ru` Русский ·
7
+ `ar` العربية · `tr` Türkçe · `zh` 中文 · `ja` 日本語 · `ko` 한국어 · `hi` हिन्दी · `bn` বাংলা ·
8
+ `ur` اردو · `id` Bahasa Indonesia · `vi` Tiếng Việt
9
+
10
+ Select one with `archymedes --language <code>`, `ARCHYMEDES_LANGUAGE=<code>`, or from `/settings`.
11
+ An unset language falls back to the host locale (`LANG`), then to English. A locale variant
12
+ (`pt-BR`, `zh_CN`) resolves to its base.
13
+
14
+ ## What is translated
15
+
16
+ `src/i18n.ts` is the catalog. Every language has:
17
+
18
+ - **Control labels** (`LABELS`) — the words on the prompt tagline, the settings menu, `/keys`.
19
+ - **Slash-command descriptions** (`COMMANDS`) — the right-hand column of `/help`'s in-session list.
20
+ - **Keyboard-shortcut descriptions** (`TRANSLATED_KEYBOARD_IDS`) — keyed by shortcut id, not row.
21
+ - **Core messages** (`MESSAGES`, via `t()`) — the `--help` page's section headers and tagline, the
22
+ mode labels on the prompt, the first-run "not configured" line, and the connectivity doctor's
23
+ header and verdicts.
24
+
25
+ A key a language has not translated renders its English source — never an empty string. This is
26
+ enforced by `i18n.test.ts`.
27
+
28
+ ## What is not translated yet
29
+
30
+ These stay English and are the next tranche of work:
31
+
32
+ - The **dense flag-reference rows** in `--help` (`archymedes --json "task"`, `--sandbox-minutes N`,
33
+ …). The section headers around them are localized; the one-line descriptions are not.
34
+ - The **`/guide`** topic prose (`src/guide.ts`) — 17 multi-paragraph topics.
35
+ - `/settings` **field labels** beyond the menu chrome.
36
+ - Low-frequency **runtime status, approval, and error** strings scattered through `src/archymedes.ts`.
37
+ - **Defender / security** long-form copy.
38
+
39
+ ## Adding a language or a key
40
+
41
+ 1. Add the code + display name to `CONTROL_LANGUAGES`.
42
+ 2. Fill `LABELS`, `COMMANDS`, `TRANSLATED_KEYBOARD_IDS`, and the `MESSAGES` entries for it.
43
+ 3. `bun run test` — `i18n.test.ts` fails until every language has label + command + shortcut cover.
44
+
45
+ The six most recently added languages (`ja ko de id vi tr`) were machine-translated and are pending
46
+ native review.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,12 @@
1
+ Archymedes CLI
2
+ Copyright 2026 Archymedes CLI contributors
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ Portions of this software are derived from the Nova CLI ("Circuit-Nova"),
7
+ Copyright 2026 Circuit-Nova, originally licensed under the MIT License. Those
8
+ portions remain available from their origin under the MIT License; the combined
9
+ work and all subsequent changes are distributed under the Apache License, 2.0.
10
+
11
+ Bundled and dependent third-party components retain their own licenses; see each
12
+ package's metadata for details.
package/README.md ADDED
@@ -0,0 +1,309 @@
1
+ # archymedes
2
+
3
+ A coding agent that runs in your terminal — against your working tree, or inside an isolated remote sandbox when the work shouldn't touch your machine.
4
+
5
+ ```bash
6
+ npm install -g archymedes-cli
7
+ archymedes "fix the failing test in src/parser.ts"
8
+ ```
9
+
10
+ ## What it does
11
+
12
+ Archymedes reads, searches, edits and runs commands in a real project, then reports what actually happened. It guards effectful work according to the selected mode, snapshots the workspace so you can undo a turn, and tells you what each request cost.
13
+
14
+ ```
15
+ archymedes Interactive session
16
+ archymedes "add a health check" One request, then exit
17
+ archymedes --plan Read and reason only — the write tools aren't loaded
18
+ archymedes --auto Auto-apply ordinary edits; sensitive actions still ask
19
+ archymedes --defender Security review — find and fix real issues; every change still asks
20
+ archymedes --allow-sensitive Approve a flagged task preflight; tool guards remain active
21
+ archymedes --sandbox Work in a remote sandbox; your files are never touched
22
+ archymedes --resume Continue the last session
23
+ archymedes history Browse past sessions without starting a model
24
+ archymedes history search "text" Search indexed snapshot and journal evidence
25
+ archymedes history status Show native-index or portable-fallback status
26
+ archymedes --providers Show which model providers are configured
27
+ archymedes --location EG Use the country's local currency (locale-detected by default)
28
+ archymedes --currency EGP Override with any supported ISO currency
29
+ archymedes --budget 500 Approve and enforce a session spend cap in that currency
30
+ archymedes --estimate "task" Forecast input/output tokens and cost without calling a model
31
+ archymedes settings Configure keys, URLs, models, pricing, language and voice
32
+ archymedes --language ar Localize controls (also: en zh hi es fr bn pt ru ur)
33
+ archymedes acp Speak the Agent Client Protocol on stdio, for an editor
34
+ archymedes update Check and install the latest published CLI
35
+ archymedes update --check Check without changing the installed version
36
+ ```
37
+
38
+ With a CircuitNotion key, Archymedes defaults to `circuit-2-turbo`. `/models refresh` asks configured
39
+ providers for their current catalog; ordinary `/models` uses the cache so opening a menu does not
40
+ wait on the network. Slash commands belong inside an interactive session. Passing one as a one-shot
41
+ objective is rejected before model contact, preventing an invocation mistake from becoming a paid
42
+ prompt.
43
+
44
+ In a session: `/mode` shows the current permission posture, `/mode plan|build|auto|defender` switches it, and `/plan` `/build` `/auto` `/defender` remain quick shortcuts. Defender mode turns Archymedes into a security reviewer — the full tool set to actually run a scanner (including a built-in `scan_secrets` that matches likely credentials by pattern and always masks what it finds) and propose a fix, gated exactly like build so nothing is ever auto-approved. It works from a bundled, OWASP-2025-aligned set of playbooks: access control, security misconfiguration, software supply chain & CI/CD integrity, injection, client-side & browser security, auth/session handling, API security, SSRF, secrets, dependency risk, cryptography misuse, IaC/container hardening, exceptional-condition handling, business logic & race conditions, fuzzing and invariant-based testing, logging/monitoring/deterrence, and LLM/AI application security. `/undo` reverts the last turn, `/cost` shows the breakdown — totals, a table of every turn's tokens, tools, seconds and spend, and the shape of it as charts — `/pull` copies sandbox work back to disk, `/settings` opens configuration, `/voice` records a prompt, and `/keys` shows keyboard controls.
45
+
46
+ ## Setup
47
+
48
+ Archymedes needs one model provider. It uses the one you last switched to, or the first one configured, unless `--provider` says otherwise.
49
+
50
+ The easiest interactive setup is:
51
+
52
+ ```bash
53
+ archymedes settings
54
+ ```
55
+
56
+ The menu is navigable with the arrow keys — Up/Down, PageUp/PageDown, Home/End — and Enter opens the highlighted setting. Values with a knowable set of answers (location, language, display currency, default provider) are picked from a list rather than typed, so choosing Rwanda does not require knowing it is `RW`, and each country shows the currency it selects. Typing letters filters a long list. Every row is still numbered and a typed number still jumps to it, which is the path that works with a screen reader; piped and scripted runs keep the plain numbered menu.
57
+
58
+ Settings use the native per-user config directory on Windows, macOS, and Linux. Secret values are masked in the menu and the file is written with user-only permissions where the operating system supports POSIX modes. Environment variables always override saved settings, which keeps CI and one-off shell configuration predictable.
59
+
60
+ ```bash
61
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, or CIRCUITNOTION_API_KEY
62
+ archymedes --providers # shows exactly what's set and what's missing
63
+ ```
64
+
65
+ Anthropic models are priced in this build, so costs are reported without further setup. For any other model, set its published rate — otherwise Archymedes reports `cost unknown` rather than inventing a number:
66
+
67
+ ```bash
68
+ export MODEL_INPUT_PER_MILLION=1.5 # per million tokens, in MODEL_PRICE_CURRENCY (default USD)
69
+ export MODEL_OUTPUT_PER_MILLION=6
70
+ export ARCHYMEDES_COUNTRY=RW # optional; otherwise LANG/LC_MONETARY is used
71
+ export ARCHYMEDES_CURRENCY=RWF # optional manual override; any supported ISO currency
72
+ # Both are also in `archymedes settings`, where changing your location takes effect immediately
73
+ export ARCHYMEDES_FX_RWF_PER_USD=1320 # required to show USD-priced models in RWF
74
+ # Generic offline/manual pair: ARCHYMEDES_FX_FROM=USD ARCHYMEDES_FX_TO=EGP ARCHYMEDES_FX_RATE=48.5
75
+ ```
76
+
77
+ Remote sandboxes additionally need `E2B_API_KEY`.
78
+
79
+ Optional web search uses Exa. Add `EXA_API_KEY` through `archymedes settings` or your environment; `/providers` then reports `Exa search · web_search enabled`, and the agent receives a bounded highlights-only `web_search` tool. `EXA_BASE_URL` supports an Exa-compatible gateway without changing the tool contract.
80
+
81
+ ## Updating Archymedes
82
+
83
+ Archymedes updates its global installation automatically by default in an interactive terminal. Once a day at startup it checks the public registry, pins the exact version it found, and installs it through npm, pnpm, Yarn, or Bun without another acceptance prompt. The running session remains on its starting version until restart. Piped/headless runs and CI never check or install. Use `/update check` for notification-only behavior or `/update off` to disable checks:
84
+
85
+ ```bash
86
+ archymedes update
87
+ archymedes --update
88
+ archymedes update --check
89
+ archymedes update --yes
90
+ archymedes update --package-manager pnpm
91
+ archymedes --version
92
+ ```
93
+
94
+ Manual `archymedes update` still asks before installing; use `--yes` for an explicitly unattended manual update. Set `ARCHYMEDES_UPDATE_PACKAGE_MANAGER` to choose a persistent package-manager override.
95
+
96
+ ## How it behaves
97
+
98
+ **Plan mode cannot write.** The write and command tools are not offered to the model at all — it's a capability boundary, not an instruction.
99
+
100
+ **Approvals start with a consequence-based safety preflight.** Before estimation or model contact, build and auto modes detect credential disclosure or high-impact credential lifecycle changes, destructive data operations, production releases, financial transactions, private-data export, external publication, or weakened access controls. Interactive runs ask whether to continue; unattended runs fail closed unless the operator explicitly passes `--allow-sensitive`. Merely reading a project-local `.env`, inspecting a project-owned environment variable, or configuring a local token the user intentionally supplied is ordinary development work and does not trip this task-level gate.
101
+
102
+ **Auto approval is guarded.** Auto mode skips prompts only for ordinary workspace-local edits and commands. It inspects the exact proposed command, file path, and new content first. Local secret reads such as `cat .env` may run, but credential-file writes, secret-like new content, likely credential transmission, production configuration, destructive or privileged commands, deploys, package publication, pushes, and network mutations still require a separate tool approval. Archymedes may use a pasted secret for the task the user named, but is instructed not to repeat it in prose, logs, summaries, examples, commits, or unrelated files, and never to send it to an unnamed external destination. `--allow-sensitive` acknowledges the task preflight; it never bypasses these operation-level gates. Build mode continues to ask for every effectful call. Decisions use `[y]es / [n]o / [a]lways / [d]eny always` and are remembered only for the exact action.
103
+
104
+ **Locally, an approved command runs as you.** This is the part worth being plain about: on your own machine there is no sandbox around `run_command`. Once you approve it, it has exactly the authority your shell has — it can read and write files outside the project and reach the network. Archymedes narrows *what gets proposed* (plan mode cannot run commands at all, a small set are refused outright, and auto mode still stops for anything sensitive), and Archymedes contains the process *tree* on Linux so a cancelled or timed-out command cannot leave background processes behind. Neither of those is a security boundary. The approval prompt is the boundary, which is why it shows the exact command and why a tool that did not ship with Archymedes always says where it came from. When you need a real one, `--sandbox` and `--sandbox docker` put the work inside a container.
105
+
106
+ **Spending is bounded before work starts.** `--budget N` is expressed in the selected local currency. In an interactive session Archymedes confirms that cap before starting a sandbox or calling a model; in a one-shot command the explicit flag is the approval. If the required FX rate is unavailable, Archymedes refuses to pretend it can enforce a converted cap.
107
+
108
+ **Switching models is a menu, not a lookup.** `/model` opens a picker: arrow to a model and press Enter, with each one's price beside it and the cursor starting on the one in use. Press `t` and the same models become a table — input and output price in columns of their own, `←`/`→` to aim at a column and `s` to order by it, so "which of these is cheapest" is a keystroke rather than a read-through. Each row keeps the number `/model <n>` takes, so sorting never renumbers anything; `Esc` returns to the menu, and Enter switches from either view. Providers you have no key for are rows you can select, and selecting one opens settings — so a missing key is something you fix from where you noticed it. Typed forms skip the menu entirely: `/model opus` matches on any part of a model id and says which candidates it meant if the name is ambiguous. The transcript carries across the switch, and your choice is remembered for the next launch.
109
+
110
+ **Large output leaves the conversation instead of being cut off.** A tool result too big for the transcript is written to `.archymedes/artifacts/`, and the model receives the beginning, the end, and the path. The end is the half that matters — a failing test says what failed on its last line — and the rest stays reachable through `read_file` with an offset, so nothing is lost to make room. Artifacts are content-addressed, so the same output repeated three times is one file.
111
+
112
+ **Compaction happens at a boundary, and cannot quietly drop the rules.** Past 70% of the context window Archymedes summarizes as soon as the work reaches a clean stopping point; past 90% it summarizes regardless. A summary is lossy by design, so the governing facts are never left inside one: the permission mode, the original request, every action you approved or refused, and the plan's open items are re-derived from live state at each compaction and restated verbatim above the summary. A constraint that survives only as a sentence in a summary is a constraint that stops existing a few compactions later.
113
+
114
+ **Undo is real.** Each turn snapshots the workspace into a private git index. `/undo` reverts modified files *and* removes files the agent created, without touching your staged changes.
115
+
116
+ **Verification is required.** An agent that changes files and then declares success without running anything is reported as `needs_verification`, not `completed`.
117
+
118
+ Passing targeted tests finish a focused change. Archymedes does not automatically pay another model
119
+ round to demand new property tests and an assembled-app smoke test after every small fix; when no
120
+ verification ran, it asks once for the smallest relevant existing check. If a model names a tool
121
+ the current mode does not expose, the runtime returns that fact once so Plan mode can recover with
122
+ a useful answer, then fails closed if the model repeats it.
123
+
124
+ **Paying happens on the provider's page, never in the terminal.** `/pay 5000` tops up your Archymedes credit: Archymedes creates a checkout, shows the link, a short code and a reference, and waits. Your card, PIN and mobile-money confirmation are entered on Circuit Pay's own page — Archymedes never sees them and never asks. Nothing is created until you answer the confirmation, amounts are whole RWF (a decimal is refused, not rounded), and every attempt carries an idempotency key so a retried request cannot become a second charge. Ctrl+C stops waiting without cancelling the payment; if it is still unconfirmed, Archymedes says so and keeps the reference for `/pay status <ref>` rather than calling it failed. `/pay` on its own shows the gateway balance. If that endpoint is unavailable, `/balance 5000` stores the balance the user sees in their account and bypasses the endpoint; Archymedes labels it as locally estimated and subtracts measured token costs after every completed turn. `/balance clear` returns to the endpoint. Both sources power the low/critical alerts and pre-turn affordability check, but only an endpoint reading is called confirmed. Archymedes never tops up automatically.
125
+
126
+ **Costs are honest.** Sub-cent amounts display as `$0.0034` rather than `$0.00`, converted amounts name the daily rate and its date, and an unpriced model says so instead of showing zero. Automatic conversion uses the keyless daily [exchange-api](https://github.com/fawazahmed0/exchange-api) endpoints with their fallback host; set `ARCHYMEDES_FX_OFFLINE=true` to disable lookup.
127
+
128
+ **Estimates are token-based.** Before a turn, Archymedes counts the actual system prompt, conversation history, objective, and tool schemas, then forecasts cumulative input growth across the expected agent loop. `archymedes --estimate "task"` performs that preflight without starting a sandbox or calling a model. Provider-reported usage remains the final accounting truth.
129
+
130
+ ## Memory and recall
131
+
132
+ Archymedes keeps durable memory in plain markdown you can inspect, commit, edit, or delete: project knowledge lives in `.archymedes/memory.md`; personal preferences live beside your Archymedes settings. `# we use bun, not npm` records a project fact. `/memory` shows both stores and their budgets.
133
+
134
+ Memory is deliberately smaller than history. Core facts marked with `--core` are always recalled; everything else is selected locally for the current request by matching repository names, commands, files, and domain terms. Already-recalled entries are not sent again in the same thread. This keeps prompt cost bounded without an embedding service or sending memory to another provider.
135
+
136
+ ```text
137
+ /memory add --kind convention we use bun, not npm
138
+ /memory add --core --user --kind preference keep explanations concise
139
+ /memory replace use bun => use bun 1.3 and never npm
140
+ /memory recall package scripts
141
+ /memory forget 2
142
+ ```
143
+
144
+ Kinds are `preference`, `convention`, `decision`, `lesson`, and `fact`. Memory writes reject invisible formatting and instruction-shaped injection content. A unique text fragment can replace an entry, avoiding fragile row numbers when correcting knowledge. `/history search <text>` uses the local native SQLite + FTS5 index when its platform package is installed, returning ranked snapshot or journal evidence with context. It falls back automatically to verified session JSON when the native engine is unavailable. `/history status` shows which path is active. This is the larger episodic layer for details that do not deserve permanent prompt space.
145
+
146
+ `/history resume` opens a searchable conversation chooser and works across processes. The saved
147
+ permission mode returns with the transcript, while an explicit startup flag such as
148
+ `archymedes --auto --resume …` deliberately overrides it. Archymedes's verification nudges are internal: they
149
+ are neither counted as user turns nor indexed as things you said.
150
+
151
+ Defender mode has a second, security-only memory layer. `query_defensive_brain` searches Archymedes's
152
+ native Rust + SQLite FTS5 index and returns only a few reviewed records with confidence, review and
153
+ expiry dates, and primary-source provenance. The reviewed corpus covers red teaming, vulnerability
154
+ assessment and safe impact validation, application/cloud security testing, detection-evasion gap
155
+ investigation, malware reverse engineering, cryptographic research, and threat intelligence.
156
+ Existing `read_playbook` checklists remain the portable fallback when the native sidecar is absent.
157
+ Web/Exa refreshes are quarantined candidates and never become active knowledge automatically.
158
+
159
+ ## Reliability evidence
160
+
161
+ Archymedes's scheduled end-to-end suite runs build, debug, scoped search, Defender review, and
162
+ cross-process resume journeys. It independently validates the result and scores completion,
163
+ verification, valid tools, token economy, estimate calibration, scope, and state. The repository's
164
+ `reliability/` directory contains the raw report and animated spectator UI. False success and
165
+ silent permission escalation impose hard score caps.
166
+
167
+ ## Voice, language and keyboard input
168
+
169
+ Run `/voice` to record from the default microphone, or `/voice path/to/audio.wav` to transcribe an existing file. The transcript is shown and can be edited or cancelled before it becomes a prompt. Voice transcription uses `OPENAI_API_KEY`, `gpt-4o-mini-transcribe` by default, and an OpenAI-compatible `/audio/transcriptions` endpoint. Set `VOICE_TRANSCRIPTION_URL` or `VOICE_MODEL` in `archymedes settings` when needed.
170
+
171
+ Microphone recording uses `ffmpeg` because it provides one maintained capture path across operating systems. Install it with your normal package manager and set `VOICE_INPUT_DEVICE` if the default device is not correct. Archymedes uses PulseAudio on Linux, AVFoundation on macOS, and DirectShow on Windows; `ARCHYMEDES_FFMPEG_PATH` can point to a non-standard executable.
172
+
173
+ Controls are available in English, Mandarin Chinese, Hindi, Spanish, French, Arabic, Bengali, Portuguese, Russian, and Urdu. Choose one in `archymedes settings`, set `ARCHYMEDES_LANGUAGE`, or pass `--language`. Stable slash-command names remain unchanged for scripts and muscle memory; `/help` and `/keys` localize their descriptions.
174
+
175
+ Prompt history is persisted per user, deduplicated, and filters likely credentials. Tab completes commands, `@path` completes project files, arrow keys search history, Home/End navigate, Alt-Backspace/Ctrl-U delete, Ctrl-L redraws, and Ctrl-C interrupts the active turn.
176
+
177
+ ### Suggestions as you type
178
+
179
+ Typing `/` opens a list above the input bar, narrowing with every letter and showing what each command does — plus the key that also runs it, so the list teaches its own shortcuts. Up and Down move through it and Enter takes a row; keep typing and it keeps narrowing; press Return and the command runs. It is never modal: every keystroke still reaches the line editor, so `/model haiku` types straight through the list that is offering `/model`. Greyed-out ghost text completes the rest of the name inline, and `→` accepts it.
180
+
181
+ The list draws upward, into the rows directly above the bar. That is not a style choice — readline redraws its own line by erasing everything below it, so the rows above the bar are the only ones a list can occupy and survive a keystroke.
182
+
183
+ ### Keys
184
+
185
+ The commands people reach for most are on Ctrl:
186
+
187
+ | | | | |
188
+ |---|---|---|---|
189
+ | `Ctrl+A` auto mode | `Ctrl+W` wander | `Ctrl+S` settings | `Ctrl+G` palette |
190
+
191
+ Every command with a shortcut also has an Alt mnemonic, which is the fuller set:
192
+
193
+ | | | | |
194
+ |---|---|---|---|
195
+ | `Alt+W` wander | `Alt+M` model | `Alt+A` auto mode | `Alt+P` plan mode |
196
+ | `Alt+D` diff | `Alt+U` undo | `Alt+C` cost | `Alt+O` tools |
197
+ | `Alt+H` help | `Alt+T` new tab | `Alt+←` `Alt+→` tabs | `Alt+B` detach |
198
+
199
+ **Tabs hold several pieces of work; the one in front is the one that runs.** Each tab keeps its own
200
+ conversation, model, mode, cost and location, and switching away pauses that piece of work rather
201
+ than leaving it running — a terminal transcript has one bottom, and two agents printing into it at
202
+ once would interleave into something neither of them said. When you want work that keeps going while
203
+ you do something else, that is `/detach`, `/jobs` and `/watch`: a detached job survives the terminal
204
+ closing and streams into the session without taking the prompt. (Archymedes's desktop window is the other
205
+ way round — it has a transcript per tab, so its tabs do run at the same time.)
206
+
207
+ The function keys still work for the commands that had them (`F1` help, `F2` mode, `F3` model, `F4` wander, `F6` jobs, `F8` diff, `F9` todos) — several routes to the same command, so a terminal that swallows one does not cost you the feature. That redundancy is the reason there is a Ctrl layer at all: Alt is the modifier terminals are worst at delivering (tmux eats it by default, and macOS Terminal sends Option as a composition modifier unless you have found the "Use Option as Meta key" checkbox), so the most-used commands get a route that does not depend on it.
208
+
209
+ Three of those Ctrl chords were readline line-editing keys, and taking them is not free. Each function moved to a key readline already handles natively, and `/keys` prints the move beside the chord that took it:
210
+
211
+ | Was | Now | Still available as |
212
+ |---|---|---|
213
+ | `Ctrl+A` move to start of line | `/auto` | `Home` |
214
+ | `Ctrl+W` delete the previous word | `/wander` | `Alt+Backspace` |
215
+ | `Ctrl+S` XOFF flow control | `/settings` | — (raw mode disables flow control, so this key was inert) |
216
+
217
+ A line-editing key can only be taken when its function has somewhere else to live, which is why `Ctrl+U` (delete to start of line) and `Ctrl+K` (delete to end) stay refused — nothing else does their job. `Ctrl+C`, `Ctrl+D`, Tab and Enter can never be rebound at all.
218
+
219
+ There is no `Ctrl+M`. It is byte `0x0D`, which is exactly what Return sends, so no terminal can tell the two apart — binding it would fire the shortcut on every message you send. The same is true of `Ctrl+I` (Tab) and `Ctrl+J`. `/model` is on `Alt+M` and `F3`; asking for `ctrl+m` in your configuration reports this rather than failing silently.
220
+
221
+ Bare letters are not shortcuts, for a reason worth knowing: this prompt is where you type your request, so a bare `w` for wander would cost you every message beginning with "write".
222
+
223
+ `Ctrl+G` opens the command palette, which searches every command by name *or* by what it does — typing `revert` finds `/undo`, and letters that are not adjacent still match, so `wndr` finds `/wander`. Arrow keys, `Ctrl+P`/`Ctrl+N`, PageUp/PageDown and Home/End all move through it.
224
+
225
+ `/keys` shows the live table, including anything your terminal is unlikely to deliver. To rebind, set `ARCHYMEDES_KEYS` (or the key-bindings entry in `archymedes settings`) to a comma-separated list like `/diff=alt+x, /wander=off`. An override replaces that command's default keys rather than adding to them.
226
+
227
+ ## Sandbox mode
228
+
229
+ `--sandbox` runs everything in a disposable E2B container. Files exist only there; `--upload` seeds it with a copy of your project, and `/pull` brings results back.
230
+
231
+ ```bash
232
+ archymedes --sandbox --upload "try upgrading to the new API and run the tests"
233
+ ```
234
+
235
+ The sandbox executes commands as argv against an allowlist rather than through a shell, so pipes and redirection are unavailable there — Archymedes says so rather than failing obscurely.
236
+
237
+ `--sandbox docker` uses a local Docker container instead of a remote one, for keeping work off your working tree without sending it to a third party. Pick the image with `--docker-image` or `DOCKER_CODING_IMAGE`.
238
+
239
+ ## Extending Archymedes: skills, hooks, plugins and MCP
240
+
241
+ Everything here lives under `.archymedes/` in your project, so it travels with the repository and works the same in a local, Docker or E2B session. `/tools` lists whatever is currently loaded and where each piece came from.
242
+
243
+ **Skills** are commands you name and describe, in `.archymedes/skills/<name>/skill.json`:
244
+
245
+ ```json
246
+ {
247
+ "name": "coverage",
248
+ "description": "Reports test coverage for a package.",
249
+ "command": "npm run coverage -- --scope {{package}}",
250
+ "inputSchema": {
251
+ "type": "object",
252
+ "properties": { "package": { "type": "string" } },
253
+ "required": ["package"],
254
+ "additionalProperties": false
255
+ }
256
+ }
257
+ ```
258
+
259
+ `{{package}}` is filled in with the model's argument, quoted for the shell that will run it — arguments are never pasted into the command raw.
260
+
261
+ **Hooks** are scripts that see every tool call, in `.archymedes/hooks/pre-tool-use/` and `.archymedes/hooks/post-tool-use/`. They run in filename order and receive the call as base64 JSON in `ARCHYMEDES_HOOK_EVENT_B64`. A pre-tool-use hook that exits non-zero blocks the call and its stderr becomes the reason the model is given; a post-tool-use hook can only warn, since the work has already happened.
262
+
263
+ **MCP servers** go in `.archymedes/mcp.json` as `{ "servers": [{ "id": "…", "command": "…", "args": [], "env": {} }] }`. Archymedes speaks stdio JSON-RPC to them and offers their tools alongside its own.
264
+
265
+ **Plugins** bundle all three under `.archymedes/plugins/<name>/`, with a `plugin.json` naming any MCP servers plus optional `skills/` and `hooks/` directories in the same formats.
266
+
267
+ Every tool that does not ship with Archymedes is approval-gated on every call regardless of mode, and the approval prompt names where it came from — a tool called `deploy` from an MCP server never looks like one of Archymedes's own.
268
+
269
+ On Windows, hook scripts need an extension `cmd.exe` can execute (`.cmd` or `.bat`, or a `.ps1` invoked through one); a `.sh` file will not run without a POSIX shell installed. Skill commands and hook invocations are quoted for `cmd.exe` automatically when the session is local — a sandbox session is always quoted for Linux, since that is what the container runs.
270
+
271
+ ## Editors: the Agent Client Protocol
272
+
273
+ `archymedes acp` runs the same agent over stdio in [ACP](https://agentclientprotocol.com), the protocol Zed and JetBrains use to host an agent, so an editor can drive a Archymedes session without a bespoke integration. Streaming replies arrive as `session/update` notifications, every tool call is announced and updated, and an approval becomes a `session/request_permission` request the editor answers — the same four decisions the terminal offers, with the same rule that anything other than an explicit allow is a refusal.
274
+
275
+ ```jsonc
276
+ // what an editor sends, one JSON-RPC message per line
277
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{}}}
278
+ {"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"/path/to/project"}}
279
+ {"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"…","prompt":[{"type":"text","text":"fix the failing test"}]}}
280
+ ```
281
+
282
+ `session/load` resumes a stored session, and `session/set_mode` switches between `plan`, `build`, `auto` and `defender` — rebuilding the session under the new capability set, exactly as `/mode` does in the terminal, because plan mode is a mode in which the write tools are not loaded rather than one where they are discouraged. While `archymedes acp` is running, stdout carries only protocol messages; diagnostics go to stderr.
283
+
284
+ ## Requirements
285
+
286
+ Node 22.5 or newer on Windows, macOS, or Linux. `git` enables checkpoints (Archymedes degrades to no-undo without it). `ffmpeg` is optional and needed only for direct microphone recording; existing audio files can still be transcribed without it.
287
+
288
+ Apache-2.0 licensed.
289
+
290
+
291
+ ## The Archymedes terminal
292
+
293
+ The default `archymedes` theme uses bronze instruments, limestone text and olive accents.
294
+ The opening instrument, composer, turn status line, result cards and workspace share the active palette. Startup is
295
+ static and uses a compact identity on short or narrow terminals, leaving room for the conversation.
296
+ Light terminals automatically use `parchment`; `blueprint`, `chalkboard` and `high-contrast` remain
297
+ available through `/theme list`. Use `archymedes --theme blueprint` to keep the previous palette.
298
+ `NO_COLOR` and `--ascii` retain plain output and compatible glyphs.
299
+
300
+ Result cards distinguish failed checks, interrupted work and verification still needed. Changed
301
+ files include `/diff` and `/undo` as the next review actions. A green result requires completed work
302
+ and passing checks recorded by the runtime.
303
+
304
+ ## Release validation
305
+
306
+ From the repository root, run `bun run release:check`. This tests and builds the packages, inspects
307
+ the CLI archive, installs that exact archive in a temporary consumer, and verifies Node startup and
308
+ TUI dependency resolution. The reviewed archive and SHA256 checksum are written to `artifacts/`.
309
+ See [the release assessment](https://github.com/chrisnkuno/archymedes-cli/blob/main/docs/RELEASE_ASSESSMENT.md) for scope and remaining release proof.