Standard definitions for token metrics used across interflux and companion plugins.
From interfluxnpx claudepluginhub mistakeknot/interagency-marketplace --plugin interfluxFetches up-to-date library and framework documentation from Context7 for questions on APIs, usage, and code examples (e.g., React, Next.js, Prisma). Returns concise summaries.
Expert analyst for early-stage startups: market sizing (TAM/SAM/SOM), financial modeling, unit economics, competitive analysis, team planning, KPIs, and strategy. Delegate proactively for business planning queries.
Business analyst specializing in process analysis, stakeholder requirements gathering, gap identification, improvement opportunities, and actionable recommendations for operational efficiency and business value.
Standard definitions for token metrics used across interflux and companion plugins.
| Type | Field | Description |
|---|---|---|
| Input | input_tokens | Tokens sent to the model (prompt + system + tool results) |
| Output | output_tokens | Tokens generated by the model |
| Cache Read | cache_read_tokens | Previously cached input tokens reused (free for billing) |
| Cache Creation | cache_creation_tokens | New tokens added to cache this turn |
| Total | total_tokens | All tokens (input + output + cache_read + cache_creation) |
| Type | Formula | Use For |
|---|---|---|
| Billing tokens | input_tokens + output_tokens | Cost estimation, budget enforcement |
| Effective context | input_tokens + cache_read_tokens + cache_creation_tokens | Context window decisions |
Critical: Billing tokens and effective context can differ by 600x+ due to cache hits being free for billing but consuming context. Budget caps use billing tokens (what costs money). Context overflow checks use effective context (what fits in the window).
| Scope | Granularity | Source |
|---|---|---|
| Per-agent | Single Task dispatch | interstat agent_runs table |
| Per-invocation | All agents in one flux-drive run | interstat v_invocation_summary |
| Per-session | All tokens in a Claude Code session | Session JSONL |
| Per-sprint | All sessions in a Clavain sprint | Future: interbudget |
See config/flux-drive/budget.yaml for token budgets per review type, per-agent defaults, slicing multipliers, and enforcement mode.