v0.17.0 — atom usage telemetry (P2a)
Atom usage telemetry (P2a) — the measurable foundation for keeping the PKB high-signal. Ships the instrumentation; the approver rubric + quarterly audit playbook (P2b) are deferred until real telemetry accumulates, so the rubric isn't written in a vacuum.
Added
- Atom telemetry sidecar (
packages/cli/src/gateway/atom-telemetry.ts) —~/.pmk/gateway/atom-telemetry.jsonis the authoritative per-atom counter store (reuseCount, lastRetrievedAt, questionedCount, lastQuestionedAt). Bumps are synchronous (race-free under the daemon's parallel turns), crash-safe (temp-file + rename), and failure-isolated (telemetry can never break a turn/reaction). Dedupe ledger is bounded. - Citation linkage on
turn.processed— optionalatomIds/channelId/threadTs/replyTs, so a later 👎 or escalation maps back to the atoms a reply cited. Atom.mdfiles are never touched (BM25 mtime index never invalidated). pmk gateway atoms telemetry [--json]— joins the sidecar with the approved corpus; lists reuse/questioned/age per atom, weakest-first, flagging dead-weight (never reused) and load-bearing (high reuse, no questions). Separate fromgateway auditby design.
Instrumentation
- Reuse bumped at LLM success (never on a failed turn).
- Questioned bumped from a 👎 (
-1/thumbsdown) on a cited reply (xreserved for pending-atom approval-reject) and from an escalation in a turn that injected atoms — both deduped against Slack retries / re-reactions.
Verification
@pmk/cli446 → 459 tests, 100% pass. Built via brainstorm → spec → plan → subagent-driven TDD (two-stage review caught aquestionedKeysgrowth bound and athumbsdown-rejects-pending-atom regression). Verified live on the host daemon: a cited DM bumpedreuseCountto 1 and surfaced inatoms telemetrywith the age column.
Deferred (P2b)
Approver rubric ADR + quarterly atom audit playbook (gated on accumulated telemetry); questionedKeys pruning; telemetry-as-ranking-input.
Full details: changelog.