Skip to content

Emitter: dictionary.tokens.json #141

Description

@nathanacurtis

Summary

Add a dictionary.tokens.json workspace-level emitter to specs-cli that aggregates the token usage data across all component {component}.tokens.json files into a single cross-component usage map.

RFC

This emitter is specified in RFC 001: Component Dictionary — emitter group workspace, priority high, complexity low.

Union of token refs across all components with usage counts.

This is one of the workspace-level dictionary files that serves as a direct input for report and audit scripts — token-usage maps, naming-consistency audits, and token-impact analysis walk this contract rather than re-traversing the component YAML directory each time.

Source

This emitter depends on the per-component {component}.tokens.json emitter (#140) being implemented first. dictionary.tokens.json is the union of all component token files: each token path gets an aggregated usage count across all components, plus a per-component breakdown.

Acceptance criteria

  • Emitter registered under the workspace group
  • Aggregates token paths from all component contracts in the manifest
  • Each entry includes total usage count across all components
  • Each entry includes a per-component breakdown (component name -> count)
  • Output is deterministic (same set of contracts -> identical file)
  • Covered by integration tests against a multi-component fixture

Metadata

Metadata

Assignees

No one assigned

    Labels

    clispecs-cli and MCP server

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions