Skip to content

docs(product): ship a failure-injection Worker demo and a focused public README #114

Open

Description

@stackbilt-admin

Priority

P1 · impact H · effort M · risk L; no runtime API changes required for initial mock demo.

Problem / evidence

README.md:5 starts with a long feature inventory; README.md:40 mixes process.env and env.AI in one quickstart. Canonical gateway details appear at line 67 before provider setup, streaming at line 552, and API reference at line 800. The README is 902 lines. The tracked tree has no runnable examples directory/docs site. CONTRIBUTING.md:24 leads guidelines with preserving an internal extraction. .agent-memory/status.json:2, .agent-memory/watermarks.json:2 and issue-corpus contain tracked operational artifacts; .charter/config.json:2 is real workflow policy, so do not blindly delete it. CLAUDE.md:7 has useful semver/dependency rules worth preserving in public contributor guidance.

[INFERRED] These reduce outside contributors' confidence and first-call conversion. Confirm with five developers unfamiliar with Stackbilt and observe install-to-working-call without coaching.

Positioning

“Fetch-native failover and tenant spend policies for edge apps—embedded in your Worker, with no gateway service to operate.”

Position policy ownership, testability and portable deployment. Do not claim unique fallbacks/budgets: Cloudflare AI Gateway already offers dynamic routes with quota and fallback nodes and spend limits.

Killer demo

Add examples/worker-resilience-lab with wrangler config, generated binding types, .dev.vars.example, README and a deterministic fetch-only mock provider mode that runs without vendor keys. Provide Node and Workers entry points.

One screen: stream an answer, force primary 503/429, watch traffic degrade/fail over/recover, run parallel tenant requests into a small budget, see one tenant stop while another works. Show route/attempt timeline and reported-vs-estimated cost. Add a slow-stream/cancel toggle to prove cleanup. After streaming/quota fixes land, promote the demo with a 30–45 second recording. Optional live mode uses consumer keys and verified model IDs.

Above-the-fold README

  1. Outcome-led sentence and 3 benefits.
  2. One runtime-specific copy/paste quickstart via fromEnv; install command.
  3. GIF/demo link and one failure timeline.
  4. “Use this when” vs raw SDK / hosted gateway comparison.
  5. Honest guarantees: fallback before emission, local vs durable state, estimated vs known spend.
  6. Links to guides; move canonical contract, catalog, caching and reference into docs/.
    Use repo Markdown first; a docs website can wait until there is enough traffic to justify maintenance.

Public repo cleanup

Remove tracked archive/retry transcripts and generated issue-corpus from the current tree; gitignore regenerated copies. Preserve intentionally useful charter policies and document them in CONTRIBUTING, or move them to .github if clearer. Rewrite the product-specific image-service deprecation in neutral library terms. Do not rewrite git history in this issue. Reconcile already implemented open #95/#90 and partial #85; existing sourcemap #94 remains separate. Verify #77 workflow status rather than assuming the old report is still current.

Acceptance and growth

  • Fresh clone has a credential-free runnable demo and separate complete Workers/Node quickstarts.
  • Five unfamiliar developers reach first success in under five minutes (measured, not assumed).
  • README fits a landing page; reference guides remain linked and searchable.
  • No tracked agent memory/archive files; intentional policy files are explained.
  • Launch in Cloudflare Developers Discord/forum, Show HN, and the Vercel AI SDK community with a working adapter.
  • Measure demo starts, successful deploys and real issue reports; stars are a secondary signal.

Five bounded good-first-issue candidates: standalone Node quickstart; API guide extraction; fixture provenance manifest; export an already implemented public config type; sourcemap embedding under #94. Provide acceptance criteria and small fixtures for each.
Semver: docs/examples/chore only.

Activity

  1. added
    enhancement
    on Oct 11, 2026
  2. stackbilt-admin commented on Oct 13, 2026

    @stackbilt-admin
    MemberAuthor

    Local implementation checkpoint — 2026-10-12

    This work is uncommitted/unpushed on main, based on 8a9eda6c058d63f0ec08332f6a408aaf409232cf, and is not merged or released. Keep this issue open pending review/integration. The local handoff is docs/maintenance/issue-sweep.md; it will travel with the code.

    Public contract documentation was updated alongside the correctness work: managed streaming, cancellation/accounting limitations, client-local/shared state, retry precedence, canonical identity, client preflight, diagnostic executability, cache-layer policy, soft budgets/KV limitations, and API reference tables.

    A resume checkpoint with issue-by-issue completed/remaining scope, exact environment/validation, files, release implications and next priorities is in docs/maintenance/issue-sweep.md, linked from README, CONTRIBUTING and CLAUDE.md. Historical June issue corpus and archive-upload metadata are preserved rather than overwritten.

    Not implemented: failure-injection Worker demo, reference-manual extraction/focused landing README, novice-user validation or broader tracked-artifact cleanup. These doc additions are not completion of the product/demo issue.

    Validation for the combined local sweep: 605 tests pass across 27 files, TypeScript typecheck passes, Worker-targeted bundle/import smoke passes. Packed entrypoint exports/client methods and all 33 JavaScript sourcemaps were checked on Windows with Node 24.19.0/npm 11.17.0. No live/billable providers or workerd execution; this does not prove minimum Node-version compatibility.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions