Skip to content

v0.17.0 — atom usage telemetry (P2a)

Choose a tag to compare

@hanfour hanfour released this 30 May 01:34
· 83 commits to main since this release

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.json is 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 — optional atomIds / channelId / threadTs / replyTs, so a later 👎 or escalation maps back to the atoms a reply cited. Atom .md files 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 from gateway audit by design.

Instrumentation

  • Reuse bumped at LLM success (never on a failed turn).
  • Questioned bumped from a 👎 (-1/thumbsdown) on a cited reply (x reserved for pending-atom approval-reject) and from an escalation in a turn that injected atoms — both deduped against Slack retries / re-reactions.

Verification

  • @pmk/cli 446 → 459 tests, 100% pass. Built via brainstorm → spec → plan → subagent-driven TDD (two-stage review caught a questionedKeys growth bound and a thumbsdown-rejects-pending-atom regression). Verified live on the host daemon: a cited DM bumped reuseCount to 1 and surfaced in atoms telemetry with 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.