atomicreps 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -0
- package/dist/cli.js +2770 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# atomicreps
|
|
2
|
+
|
|
3
|
+
One short retrieval question about the thing you just built, inside Claude Code, Cursor, Codex or any MCP client.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx atomicreps the terminal surface: you, this session, topics, mutes, rate
|
|
7
|
+
npx atomicreps setup first-run wizard: areas, topics, how often, how hard
|
|
8
|
+
npx atomicreps login sign in from a browser with a typed code
|
|
9
|
+
npx atomicreps connect register the server with your editor
|
|
10
|
+
npx atomicreps mcp the stdio bridge (what the editor launches)
|
|
11
|
+
npx atomicreps doctor token, server ping, grammar, quiet clock, allowlist
|
|
12
|
+
npx atomicreps logout forget the token on this machine
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Add `--alpha` to any command to use the staging door. It keeps its own token and
|
|
16
|
+
cache, so both can be signed in at once.
|
|
17
|
+
|
|
18
|
+
## How it behaves
|
|
19
|
+
|
|
20
|
+
When the agent finishes a task it calls `rep` once with a few words for what
|
|
21
|
+
changed. The server ranks what the session touched, prefers the areas you chose,
|
|
22
|
+
and answers with one question or with nothing. The agent reproduces the block;
|
|
23
|
+
you reply with a letter, or ignore it.
|
|
24
|
+
|
|
25
|
+
Under the verdict, one line names up to three other things the session touched. A
|
|
26
|
+
number asks for one. "Never Swift" mutes a topic for good, "not this topic" rests
|
|
27
|
+
it for thirty days, "unmute Swift" lifts it. "How am I doing" prints your summary.
|
|
28
|
+
|
|
29
|
+
The server enforces the manners, not the agent: a minimum gap between pushed
|
|
30
|
+
reps, a daily cap, mute and off, a refusal for an answer typed within seconds of
|
|
31
|
+
the serve, and no answer key in any rep payload. Two ignored reps quiet the door
|
|
32
|
+
for the day. Every failure answers quiet rather than an error; `doctor` says why.
|
|
33
|
+
|
|
34
|
+
## How it fits together
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
flowchart LR
|
|
38
|
+
subgraph editor [Editor]
|
|
39
|
+
CC[Claude Code hook<br/>UserPromptSubmit]
|
|
40
|
+
MC[MCP client<br/>Claude Code, Cursor, Codex]
|
|
41
|
+
SL[Status line]
|
|
42
|
+
end
|
|
43
|
+
subgraph person [Person]
|
|
44
|
+
TUI[npx atomicreps<br/>setup, home, login, doctor]
|
|
45
|
+
end
|
|
46
|
+
subgraph pkg [atomicreps package]
|
|
47
|
+
HOOK[hook.ts<br/>decide: letter, digit, eligible<br/>perform: grade, take, push]
|
|
48
|
+
BRIDGE[mcp.ts Bridge<br/>legacy or modern era]
|
|
49
|
+
INFER[infer.ts + touch.ts<br/>git status, diff, heads<br/>x grammar = touched handles]
|
|
50
|
+
STORE[store.ts<br/>reps, status, topics, grammar]
|
|
51
|
+
CFG[config.ts<br/>token, quiet clock]
|
|
52
|
+
API[api.ts<br/>deadline, failure as a value]
|
|
53
|
+
end
|
|
54
|
+
DOOR[(Convex HTTP door<br/>/mcp/*)]
|
|
55
|
+
|
|
56
|
+
CC -->|stdin JSON| HOOK
|
|
57
|
+
MC -->|JSON-RPC over stdio| BRIDGE
|
|
58
|
+
TUI --> API
|
|
59
|
+
HOOK --> INFER
|
|
60
|
+
BRIDGE --> INFER
|
|
61
|
+
TUI --> INFER
|
|
62
|
+
HOOK --> API
|
|
63
|
+
BRIDGE -->|POST /mcp, bearer token| DOOR
|
|
64
|
+
API --> DOOR
|
|
65
|
+
HOOK --> STORE
|
|
66
|
+
BRIDGE --> STORE
|
|
67
|
+
TUI --> STORE
|
|
68
|
+
HOOK --> CFG
|
|
69
|
+
BRIDGE --> CFG
|
|
70
|
+
API --> CFG
|
|
71
|
+
SL --> STORE
|
|
72
|
+
SL --> CFG
|
|
73
|
+
DOOR -.->|rep, verdict, quiet| BRIDGE
|
|
74
|
+
DOOR -.->|rep, verdict, quiet| API
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Three entry points, one wire. The hook and the bridge both infer what the session
|
|
78
|
+
touched locally, send only handle names and small weights, and note what came
|
|
79
|
+
back so the status line and the next prompt can read it from disk.
|
|
80
|
+
|
|
81
|
+
## Tools
|
|
82
|
+
|
|
83
|
+
| tool | what it does |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| `rep({ touched?, ask?, topic?, kind?, exclude? })` | one question, one insight, or quiet; `ask` takes a handle from an offer |
|
|
86
|
+
| `answer({ pick, id? })` | the verdict, the why, and the offer line |
|
|
87
|
+
| `me({ show? })` | `summary`, `skills`, `reps`, `streak` or `mutes` |
|
|
88
|
+
| `settings({ intensity?, topics?, levels?, prefer?, mute?, muteMinutes?, days?, unmute?, dialog? })` | the rate, the pinned topics, the difficulty band, the preferred areas, mutes, the dialog |
|
|
89
|
+
|
|
90
|
+
Handles are `topic` or `topic.subskill` (`react.hooks_core`). Fifty sub-skill
|
|
91
|
+
slugs repeat across topics, so the topic is always part of the name.
|
|
92
|
+
|
|
93
|
+
`settings({ dialog: true })` asks for the letter in the host's native dialog
|
|
94
|
+
instead of the chat. It blocks the turn while open, so it is a setting, never the
|
|
95
|
+
default.
|
|
96
|
+
|
|
97
|
+
## The wire
|
|
98
|
+
|
|
99
|
+
`npx atomicreps mcp` is a bridge, not a second server: every JSON-RPC message
|
|
100
|
+
from the editor is forwarded to the door with your token, and the answer comes
|
|
101
|
+
back. The door speaks the 2026-07-28 revision (stateless, `server/discover`,
|
|
102
|
+
mirrored headers) and the older `initialize` handshake for clients still on it.
|
|
103
|
+
|
|
104
|
+
What leaves your machine on a `rep` call: the agent's words, package names from
|
|
105
|
+
the manifest, the file extensions and top-level folder names you touched, and
|
|
106
|
+
catalog handles with small weights. Never your code, never a file's contents,
|
|
107
|
+
never a prompt. `npx atomicreps setup` prints the exact payload for the repo you
|
|
108
|
+
are standing in, before you sign in.
|
|
109
|
+
|
|
110
|
+
The table that maps paths and diff words to handles is published by the server
|
|
111
|
+
and cached for a month.
|
|
112
|
+
|
|
113
|
+
## Login
|
|
114
|
+
|
|
115
|
+
`npx atomicreps` prints a code. You type it at atomicreps.com/connect while
|
|
116
|
+
signed in, so a forwarded link approves nothing. The token lands in
|
|
117
|
+
`~/.config/atomicreps/config.json` (mode 0600), prefixed `arep_` so secret
|
|
118
|
+
scanners find it, and can be revoked on your account page.
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
pnpm install --ignore-workspace
|
|
124
|
+
pnpm build # dist/cli.js, one file, no runtime dependencies
|
|
125
|
+
pnpm test
|
|
126
|
+
ATOMICREPS_API=https://<deployment>.convex.site node dist/cli.js doctor
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
MIT.
|