Skip to content

[GRV-28]: Publish llm-cost use-case and port reference docs#45

Merged
github-actions[bot] merged 1 commit into
mainfrom
symphony/grv-28-publish-llm-cost-use-case-and-port-reference-doc
Jun 5, 2026
Merged

[GRV-28]: Publish llm-cost use-case and port reference docs#45
github-actions[bot] merged 1 commit into
mainfrom
symphony/grv-28-publish-llm-cost-use-case-and-port-reference-doc

Conversation

@riddim-developer-bot

Copy link
Copy Markdown
Contributor

Summary

  • Adds a developer-facing Use cases and extension ports section to both llm-cost-attribution and llm-cost-estimation READMEs, with use-case → user-value → ports tables that mirror each package's catalog.
  • Includes synthetic, key-free library examples: an in-memory LinearEstimateSource, an in-memory EstimateTaggedUsageSource (and async-iterator variant), a flat-rate PricingTable, and a custom QuotaModel.
  • Adds a Ready vs. planned APIs subsection in each README — attribution has none planned today; estimation lists calibrate as deprecated alongside its replacement calibrateCoverage.

Closes GRV-28.

Acceptance criteria

  • Attribution README has a library-use section mapping major use cases (ForecastIssueCost, ForecastProjectCost, JoinCostWithFeature, ReadGitDiffs, CorrelateCostWithFeature) to user value and extension ports.
  • Estimation README has a library-use section mapping enrichment / forecasting use cases (EnrichUsageWithEstimate, ForecastIssueCost, ForecastProjectCost, CalibrateCoverage) to user value and extension ports.
  • Synthetic example using a custom in-memory usage source instead of filesystem transcripts (attribution: syntheticUsageRecords + async-iterator records() source; estimation: same syntheticUsageRecords fed through the re-exported forecaster).
  • Synthetic example injecting a custom PricingTable (flat-rate) and QuotaModel (SLO-fraction) in attribution; flat-rate PricingTable in estimation.
  • Synthetic example injecting a custom LinearEstimateSource (in-memory resolveEstimates) in estimation.
  • Planned / deprecated APIs separated from ready APIs and not shown in ready-use examples (attribution: no planned surface; estimation: calibrate listed as Deprecated).
  • Use-case and port names match docs/architecture/use-case-catalog.md and packages/llm-cost-estimation/docs/use-cases.md.
  • Attribution claim "no telemetry pipeline, no database, no API keys" preserved at the top of the README and reinforced in the Ready/planned subsection (custom-port workflows are opt-in).

Out of scope per the issue: no runtime behavior changes, no npm publishing or version bumps.

Test plan

  • npm test in packages/llm-cost-attribution — 200 / 200 pass; boundary check passes.
  • npm test in packages/llm-cost-estimation — 37 / 37 pass, including the leak-safety guard (no-org-data.test.mjs) which scans every committed file in the package and now sees the new README content.

🤖 Generated with Claude Code

Adds a developer-facing "Use cases and extension ports" section to both
package READMEs so library users can discover what each use case
provides and where their own ports plug in, without crossing into the
architecture catalogs. Examples are synthetic and key-free: a custom
in-memory usage source, a custom estimate source, a flat-rate
PricingTable, and a custom QuotaModel. Planned and deprecated APIs are
listed separately and excluded from the ready-use examples.
@github-actions github-actions Bot enabled auto-merge (squash) June 5, 2026 07:41
@github-actions github-actions Bot merged commit 8f9686d into main Jun 5, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants