@aistastudio/myc 0.1.1 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +69 -22
  2. package/dist/myc.js +1012 -319
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -11,6 +11,12 @@ machines through plain git.
11
11
  Design docs live in `docs/design/` (start with `00-brief.md`); the measurements
12
12
  quoted below are reproducible from `bench/` and `scripts/`.
13
13
 
14
+ **Site: <https://aistastudio.github.io/myc/>** — the same measurements as charts,
15
+ in English and Russian, with the command that reproduces each number printed
16
+ next to it. Source in `site/`; `bun run site/build.ts` re-checks every figure
17
+ against the measurement artefacts in this repository and refuses to build on a
18
+ mismatch.
19
+
14
20
  ## Requires Bun — this is not fine print
15
21
 
16
22
  The runtime is bound to `bun:sqlite` (SQLite and `sqlite-vec` ship inside Bun,
@@ -25,7 +31,7 @@ Once published, installation is one command — the package is built and verifie
25
31
  from a tarball today, but nothing has been pushed to the registry yet:
26
32
 
27
33
  ```bash
28
- bun add @aistastudio/myc # 3.16 MB, 9 files, no models pulled at install
34
+ bun install -g @aistastudio/myc # 3.17 MB, 10 files, no models pulled at install
29
35
  bunx myc --version
30
36
  ```
31
37
 
@@ -63,15 +69,15 @@ Full command list: `./dist/myc --help`.
63
69
 
64
70
  **Speed is a constraint, not an optimisation.** Every hot path has a budget
65
71
  enforced in CI; a p95 regression over 15% fails the build. Measured on 100 000
66
- nodes (`bun run scripts/bench-latency.ts`):
72
+ nodes, 2026-09-07, darwin-arm64-14 (`bun run scripts/bench-latency.ts`):
67
73
 
68
74
  | operation | p99 | budget |
69
75
  |---|---|---|
70
- | `prime` (session context) | 0.70 ms | 30 ms |
71
- | read | 0.011 ms | 3 ms |
72
- | search | 9.1 ms | 25 ms |
73
- | write | 0.5 ms | 5 ms |
74
- | cold start | 24 ms | 60 ms |
76
+ | `prime` (session context) | 0.755 ms | 30 ms |
77
+ | read | 0.012 ms | 3 ms |
78
+ | search | 10.354 ms | 25 ms |
79
+ | write | 0.460 ms | 5 ms |
80
+ | cold start | 23.820 ms | 60 ms |
75
81
 
76
82
  **Ranking is measured, not asserted.** Two labelled corpora with graded
77
83
  relevance, each containing a *control group that gets worse* when the feature
@@ -83,9 +89,38 @@ works — so a gain cannot be manufactured by shaping the corpus:
83
89
 
84
90
  **Caching that cannot go stale silently.** Result, embedding and hydration
85
91
  caches are invalidated by `MAX(oplog.seq)` read *from the database*, so a write
86
- by another process invalidates them too. A cache hit is 162–198× cheaper than a
87
- miss (≈25 000× for embeddings) and the ranking is bit-identical: same MRR to
88
- three decimals, zero rank differences.
92
+ by another process invalidates them too. A cache hit is two orders of magnitude
93
+ cheaper than a miss 252× in the run of 2026-09-07, ≈27 000× for embeddings;
94
+ the ratio is wall-clock and moves with the machine. The ranking does not: same
95
+ MRR to three decimals, zero rank differences.
96
+
97
+ **Memory survives context compaction.** `myc wire` installs a pre-compact hook,
98
+ so the moment before an agent's context is squeezed the session episode is
99
+ written to disk — raw, `L0`, `acl private`, secrets masked — and a rescue
100
+ packet is printed back into the context that survives. Distillation is queued,
101
+ never done on the write path. The episode is on disk before anything else is
102
+ attempted, so exceeding the hook's timeout costs the summary, not the record:
103
+
104
+ ```
105
+ $ myc absorb-session --reason manual --transcript … --agent claude
106
+ # myc: контекст сжимается — вот что нельзя потерять
107
+ эпизод sess-5jh8je4g050m сохранён (265 Б)
108
+ ДАЛЬШЕ myc show sess-5jh8je4g050m · myc ready --claim
109
+ ```
110
+
111
+ **Memory is separated by session, and the separation is visible.** Every note
112
+ carries a reach: `session` (this conversation) or `project` (everyone). The
113
+ automatic context packet — `prime` — only carries the current session's notes;
114
+ another agent's session does not leak into yours. An explicit `myc recall`
115
+ still finds them, because hiding knowledge is not the same as scoping it, and
116
+ marks each row for what it is: `ses` own session, `ses*` someone else's, `prj`
117
+ project-wide.
118
+
119
+ ```
120
+ $ MYC_SESSION_ID=s1 myc recall "ретраи" $ MYC_SESSION_ID=s2 myc recall "ретраи"
121
+ 1.30 … ses сессионное: ретраи… 1.30 … ses* сессионное: ретраи…
122
+ 1.10 … ses* в сессии один: ретраи… 1.10 … ses* в сессии один: ретраи…
123
+ ```
89
124
 
90
125
  **Memory has three independent axes**, and the surface says what it hid:
91
126
  tier (project vs personal), session reach, repository reach. `prime` prints
@@ -103,9 +138,12 @@ the first machine's priority and the second's tags. Nothing is lost to
103
138
  last-writer-wins over whole records.
104
139
 
105
140
  **Migration from beads is real, not a demo.** A working project imported in
106
- 684 ms: 796 tasks, 972 dependencies, 265 notes, 41 memories — with unknown
141
+ 889 ms: 796 tasks, 972 dependencies, 265 notes, 41 memories — with unknown
107
142
  issue types carried over verbatim and named, and out-of-range priorities
108
- clamped and named, instead of one odd row aborting the import.
143
+ clamped and named, instead of one odd row aborting the import. On that same
144
+ graph `myc ready` offers 195 tasks and `bd ready` offers 144: beads inherits
145
+ blockers down the parent chain and myc does not yet, so beads is right about
146
+ those 51 (open bug `memory-atcm254ry6c7`).
109
147
 
110
148
  **Guards are proved by mutation.** Every refusal and every invariant is
111
149
  accompanied by a mutation that removes it; a guard whose removal breaks no test
@@ -114,24 +152,32 @@ is treated as absent.
114
152
  ## Roadmap
115
153
 
116
154
  Numbers are closed/total subtasks per milestone (`myc show <epic-id>`), as of
117
- 2026-09-07. Done and not-done are shown the same way on purpose.
155
+ 2026-09-08. Done and not-done are shown the same way on purpose. Totals grow
156
+ when work uncovers work: M0 went 33 → 39 because measuring it found four real
157
+ defects, not because the plan changed.
118
158
 
119
159
  | milestone | status |
120
160
  |---|---|
121
- | **M0** core and tasks | 30 / 33 |
161
+ | **M0** core and tasks | 35 / 39 |
122
162
  | **M0.5** self-hosting (myc developed through myc) | **4 / 4 — closed** |
123
- | **M1** memory | 20 / 23 |
124
- | **M2** semantics | 15 / 19 |
125
- | **M7** human interface (board, cards, threads, routing panel) | 11 / 13 |
126
- | **M3** code intelligence | 0 / 7 |
127
- | **M4** team: `myc serve`, ACL, network sync, Postgres, containers | 0 / 11 |
163
+ | **M1** memory | 21 / 23 |
164
+ | **M2** semantics | 17 / 20 |
165
+ | **M7** human interface (board, cards, threads, routing panel) | 13 / 14 |
166
+ | **M3** code intelligence | 5 / 9 |
167
+ | **M4** team: `myc serve`, ACL, network sync, Postgres, containers | 3 / 14 |
128
168
  | **M5** swarm self-learning: routing by cost and outcome | 0 / 12 |
129
169
  | **M6** distillation | 0 / 7 |
130
170
 
131
171
  What that means in practice: **today myc is a single-user local tool over files
132
- in git.** There is no server, no ACL, no team mode, and no code↔knowledge
133
- anchors yet. Those are designed (`docs/design/03…`, `04…`, `05…`) and tracked,
134
- not implemented.
172
+ in git.** There is no server, no ACL and no team mode. Those are designed
173
+ (`docs/design/03…`, `04…`, `05…`) and tracked, not implemented.
174
+
175
+ Code↔knowledge anchors now work: `myc task "…" --anchor src/file.ts:10-20`
176
+ binds a task to a span, and the anchor follows the code as it moves. The
177
+ binding is language-agnostic — it was verified on Python as well as
178
+ TypeScript. What is *not* there yet is symbol-level understanding: parsing
179
+ functions and classes covers `ts/tsx/js/jsx` only, and the symbol index is
180
+ built but not yet wired to any command (tracked, not hidden).
135
181
 
136
182
  ## Syncing between machines
137
183
 
@@ -154,3 +200,4 @@ sqlite-vec) is permissive too.
154
200
  ---
155
201
 
156
202
  Russian version of this document: [`docs/README.ru.md`](docs/README.ru.md).
203
+ Both languages, with charts: <https://aistastudio.github.io/myc/>.