Skip to content

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

Closed

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

Activity

  1. blafourcade commented on Aug 21, 2026

    @blafourcade
    ContributorAuthor

    Shipped. The plugin measures on its own; aidd is required for nothing on this path.

    skills/00-init/scripts/telemetry-switch.js     1.6 KB   on | off
    skills/01-cost/scripts/telemetry-report.js   102.3 KB   read | report
    

    CommonJS .js, matching the hooks beside them — the plugin directory carries no package.json, so one module system across every executable file it ships.

    Where they live was not a preference. bin/ at the plugin root is dropped: installing a plugin translates its files into each tool's layout, and that translation carries skills, agents, commands, rules and hooks and nothing else. A script anywhere else is silently never installed.

    And it was not enough to move them. Every installed file was run through rewriteContent, which edits paths inside prose — measured, it changed the bundle by +6 bytes on Codex and −1 on Copilot, shipping a script that no longer parses. The translator now separates prose from artefact, on the native path and the flat one. The hook scripts were escaping that by luck.

    Two guards keep the two builds one contract: the plugin's script and the CLI answer byte-identical JSON for the same inputs, and the committed bundles are rebuilt and compared so a source change without a rebuild fails.

    Whole chain proven live with PATH reduced to node — install, on, session, read, report, off — and again through the full lifecycle in telemetry-lifecycle.e2e.test.ts.

  2. moved this from Ideation to Done in AIDD Roadmapon Aug 21, 2026
  3. added 2 commits that reference this issue on Aug 22, 2026
    4253a74
    2eabdda
  4. added a commit that references this issue on Sep 2, 2026
    627408f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions