Skip to content

feat(framework): the plugin measures on its own, with no CLI installed #691

Description

@blafourcade

As someone who installed the aidd-telemetry plugin
I want it to measure and report by itself
So that knowing what my work cost does not require installing and keeping a second tool

Why

#690 shipped one output contract a skill can consume. Every route to it goes through aidd, which means the plugin alone measures nothing it can read back. That is a dependency nobody asked for on the path where the framework is already installed.

The hook has been self-contained from the start — zero-dependency CommonJS the framework build copies verbatim, running under plain node. Reading and reporting can be too.

Measured, before proposing it

A telemetry-only entry point, bundled with every dependency inlined:

100.8 KB
imports: fs  fs/promises  os  path  readline  child_process

Node builtins only. Run from a directory with no node_modules anywhere, against captured fixtures, it read a Codex session, joined the run journal and printed the journal-interval attribution — and the same figures through --json.

The full CLI bundle is 485 KB plus its node_modules (react, ink, simple-git, @inquirer/prompts, ajv). None of that serves this path: no UI to render, no git to drive, and two subcommands do not need a parser.

The split this settles

The plugin carries the measurement. The CLI becomes the route outward.

  • The plugin: the hook that journals, the reader that joins, the report that answers, and the skill that asks. Installed through the host tool's own plugin mechanism. Needs nothing else.
  • The CLI: telemetry on/off/receive, and whatever carries these figures to a service outside the machine.

Acceptance

  • The plugin ships a single self-contained file. Installing the plugin is the whole installation.
  • aidd is not required to enable measurement, to read it, or to report it. Proven by an end-to-end run with no aidd on the path at all.
  • Turning measurement on needs no second tool. The switch is a file, and something in the plugin writes it.
  • The bundled file and the CLI produce the same object for the same inputs. Asserted, not assumed — two implementations of one contract is the failure this whole layer exists to prevent.
  • The committed bundle cannot drift from its source: a check fails when it is stale.
  • The skill calls the bundled file, follows the framework's own skill conventions, and computes nothing itself.
  • Claude Code works end to end: install, enable, work, report. That is the bar for this ticket.

Out of scope

Relations

Field Value
parent #631
depends_on #690
related #680, #681, #676

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions