zeus-architecture-contract

Documents Zeus wallet architecture invariants, boot sequence, store DI graph, and backend dispatch rules.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/aswin-dev-debug/Ai-Finance-analyzer --skill zeus-architecture-contract-aswin-dev-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zeus-architecture-contract
Source: https://github.com/aswin-dev-debug/Ai-Finance-analyzer/tree/main/lib/zeus-contrib/zeus/.claude/skills/zeus-architecture-contract
Command: npx skills add https://github.com/aswin-dev-debug/Ai-Finance-analyzer --skill zeus-architecture-contract-aswin-dev-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Prevents recurring crash classes in the Zeus Lightning wallet by codifying the load-bearing architectural invariants—boot/connection flow, MobX store composition, backend dispatch contract, and navigation rules—that break when violated. ## Core Features & Use Cases - Boot & Connection Contract: Explains where the app actually connects (views/Wallet/Wallet.tsx fetchData with fetchLock/connecting guards) and why parallel runs corrupt state. - Backend Dispatch Invariant: Documents the BackendUtils.call() returns-false rule, supports*() capability gating, and the EmbeddedLND/LndHub inheritance fallthrough hazard. - Known Weak Points Catalog: Lists verified open issues (dead dispatch, Fabric constraints, fetchLock leaks) with re-verification commands. - Use Case: Before adding a new backend method or store, load this skill to learn the two-touch rule, DI ordering constraints, and which sibling skill owns the detailed procedure. ## Quick Start Load this skill before modifying Zeus connection logic, stores, backend methods, or navigation code to understand the architectural invariants you must not violate.

Frequently Asked Questions about zeus-architecture-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new backend method in the Zeus wallet?

Add the method to the backend class and declare it in utils/BackendUtils.ts, since call() returns false synchronously for missing methods. Then audit whether EmbeddedLND and LndHub need overrides, because un-overridden methods fall through to LND's REST implementation.

How do I gate a feature per Lightning backend in Zeus?

Gate feature availability only through BackendUtils supports*() methods, never by comparing implementation strings. Reserve implementation branching for transport and lifecycle mechanics like connection setup in Wallet.tsx fetchData.

Why does Zeus crash with 'false.then is not a function'?

This happens when code awaits a dispatched backend method that does not exist on the active backend, because BackendUtils.call() returns false synchronously instead of throwing. Always check the matching supports*() flag before awaiting a dispatched call.

Where does the Zeus app actually connect to the node?

All connection logic lives in views/Wallet/Wallet.tsx fetchData, guarded by the fetchLock and connecting observables in SettingsStore. App.tsx only renders the navigator shell, and fetchData re-runs on every Wallet screen focus.

Can I use MobX 6 makeObservable in Zeus stores?

No. Zeus uses MobX 5.15.3 with legacy decorator syntax (@observable, @action) enabled by experimentalDecorators. Mixing MobX 6 idioms like makeObservable with decorator mode silently stops observation.

Why does Zeus navigation use popTo instead of navigate?

After the react-navigation 6 to 7 upgrade, calling navigate to an existing route can push a duplicate screen instead of popping back, corrupting the stack. Back-navigation must use navigation.popTo, as fixed in PR #2192.