vivraDocumentationV1How voting works

Build pack: building Vivra with Claude Code

The other parts of this GitBook explain what to build. This section explains how to have Claude Code build it, ticket by ticket, with completion criteria verified by commands.

All pages in this edition are in English. The build instructions, conventions, and tickets retain their original technical identifiers. Product rules remain authoritative. The setup examples below preserve the original source repository layout; this GitBook stores those pages in content/.

What the pack contains#

PagePurpose
CLAUDE.mdFile to place at the code repository root: context, fixed stack, commands, non-negotiable rules.
ConventionsFolder structure, naming, errors, tests, security, PR format.
M0 · FoundationsMonorepo, database, chain, API, workers.
M1 · Project analysisOn-chain reads for a submitted token, target, safety, recovery score, back-office.
M2 · AgentsLLM client, runner, tools, orchestrator, approval queue, six agents.
M3 · On-chain and moneyBuybackBurner contract, Buyback Bot, treasury, ledger, Pons CTO tracking.
M4 · ProductEmail sign-in, cycles and voting, dapp, landing, automated posts.
M5 · LaunchAlerts, full-cycle fork rehearsal, launch checklist.

Each ticket follows the same format:

  • Goal: the outcome in one sentence.
  • Depends on: tickets to finish first.
  • Read first: specification pages to read before coding.
  • Build: files to create or edit.
  • Steps: ordered steps with exact interfaces.
  • Done when: checklist, with every item verifiable by a command or test.
  • Out of scope: work excluded from the ticket.

One-time setup#

  1. Create the private vivra code repository and clone the two repositories side by side:
    bash
    mkdir vivra-workspace && cd vivra-workspace
    git clone [email protected]:sonnyHQ/vivra-doc.git
    git clone [email protected]:<org>/vivra.git
  2. Copy CLAUDE.template.md to vivra/CLAUDE.md and commit it.
  3. Create vivra/.env from .env.example (ticket T00), using the keys from Appendix F. Never commit it.
  4. Start Claude Code in vivra/: claude.

Workflow for each ticket#

  1. Open a Claude Code session in vivra/ and provide this prompt, changing the ticket number:

    text
    Implement ticket T14 from ../vivra-doc/build-m1.md.
    Read the ticket and every page listed in "Read first" before writing code.
    Start by writing your plan (files, functions, tests). Then implement it,
    run the "Done when" checks, and open a PR named "T14: <title>" with the checklist ticked.
    If anything in the spec is unclear or contradictory, stop and ask me.
  2. Review the plan before implementation; this is the earliest opportunity to catch mistakes.

  3. When implementation finishes, rerun pnpm lint && pnpm typecheck && pnpm test and the ticket's checks yourself.

  4. Review the PR, merge, then move to the next ticket.

Working rules:

  • One ticket per session. A fresh session for each ticket keeps context clear.
  • Order matters. Tickets in a milestone often depend on earlier ones (the Depends on field).
  • Tickets marked 🔒 affect money or keys. Require line-by-line human review and testnet checks before merging.
  • Tickets marked ⚠️ Pons depend on an unconfirmed ABI or Pons response (open questions). The implementation must stop at those points and ask.

Milestones and exit gates#

MilestoneTicketsExit gate
M0T00–T04pnpm dev starts everything locally, migrations work, CI passes
M1T10–T16a submitted testnet address produces a full analysis in under 10 min
M2T20–T29a complete simulated operation on a testnet token, every output in the approval queue
M3T30–T3323 slices executed and burned on testnet, ledger exact to the wei
M4T40–T44complete testnet cycle: publication, email voting, closing, operation created
M5T50–T52a full mainnet-fork cycle rehearsal without a blocking incident
↑ ↓ to navigate · Enter to openVIVRA DOCS