Skip to content

plan to refactor agicash workspace for agicash-cli#962

Draft
orveth wants to merge 1 commit intomasterfrom
sdk-extraction-plan
Draft

plan to refactor agicash workspace for agicash-cli#962
orveth wants to merge 1 commit intomasterfrom
sdk-extraction-plan

Conversation

@orveth
Copy link
Copy Markdown

@orveth orveth commented Mar 27, 2026

Summary

Adds the full SDK extraction plan for refactoring agicash into a bun workspace with an @agicash/sdk package.

What the plan covers:

  • 8 phases, each shipping as one independently-verifiable PR:

    • Phase 0: Bun workspace skeleton (packages/sdk/)
    • Phase 1: Core abstractions (KeyProvider, Cache, Config interfaces)
    • Phase 2: Move app/lib/ portable modules (money, cashu, bolt11, spark, etc.)
    • Phase 3: Move database types and JSON model schemas
    • Phase 4: Move app/features/shared/ portable code
    • Phase 5: Move feature domain logic (accounts, send, receive, transactions, contacts, user, wallet)
    • Phase 6: Web app barrel files and hook wrappers
    • Phase 7: Remove re-export shims, finalize all imports to @agicash/sdk
  • 5 audited critical issues with fixes (from 2026-03-27 review):

    1. Cache interface gap — setQueryData() / invalidateQueries() missing from Cache type
    2. getFeatureFlag in portable code — needs migration to AgicashConfig.featureFlags
    3. No missing files (confirmed all paths exist)
    4. Module-level import.meta.env in cashu.ts — needs lazy function call
    5. 8 open PRs overlap with SDK move targets — Phases 0-1 are safe to ship now; Phases 2+ must wait for offers stack and other PRs to merge
  • Architecture: web app stays at root, packages/sdk/ is the only new directory, no monorepo tooling beyond bun workspaces

  • Principles: move files don't rewrite them, shims then cleanup, no new abstractions except at real boundaries

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Mar 27, 2026 10:05pm

Request Review

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 27, 2026

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@orveth orveth assigned gudnuf and orveth and unassigned orveth and gudnuf Mar 27, 2026
@gudnuf gudnuf changed the title docs: SDK extraction plan plan to agicash workspace for agicash-cli Mar 28, 2026
@gudnuf gudnuf changed the title plan to agicash workspace for agicash-cli plan to refactor agicash workspace for agicash-cli Mar 28, 2026
@orveth orveth added the plan Plan or spec document label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan Plan or spec document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants