Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parity Extraction Runbook (opencode)

Reproducible procedure to extract the legacy hh-pegasus feature/parity inventory that fills the 04-parity-checklist.md screen tracker. Runs in opencode against the legacy repo using three committed subagents.

  • Agents live in hh-pegasus/.opencode/agent/ (PR hungryhub-team/hh-pegasus#3025): parity-mapper, integrations-surveyor, parity-critic.
  • Ground truth route list: hh-pegasus/.cutover/parity/_routes.txt (165 routes).
  • Agent JSON outputs land in hh-pegasus/.cutover/parity/*.json (gitignored scratch).

Why opencode subagents (not built-ins)

The mapping is read-only analysis, but each agent must write its own JSON file so 12 parallel runs collect cleanly without tangling in chat. opencode’s built-in Explore is read-only (can’t write), so we use custom subagents with write allowed (bash: deny, edit: false).

Prerequisites

cd <workspace>/hh-pegasus
git checkout master && git pull          # get the .opencode/agent/* files (PR #3025)
opencode                                 # restart so it discovers .opencode/agent/*.md

Confirm the agents are loaded (agent list / @ autocomplete should show parity-mapper, integrations-surveyor, parity-critic). If they don’t appear, opencode may read agent/ vs agents/ depending on version — move the files to the other spelling and restart.

Cluster partition (12)

#ClusterRoutes (globs under src/pages/[lang]/)
1Discovery & Searchindex, web-[city], mobile-[city], search/*, search-suggestion, restaurants/index, restaurants/search/*, restaurants/near-me, restaurants/top/*, tags*, top-brands/*
2Restaurant Detailrestaurants/[slug]/index(+[client]*), branch/[slug]/*, restaurants/group/[slug]/*, restaurants/bitelist/[slug]/*
3Package & View Menurestaurants/[slug]/package/[id]/{index,menu,view-menu}*, restaurants/[slug]/add-on/*, view-menu/*, openrice/*
4Booking flowrestaurants/[slug]/book/*, restaurants/[slug]/package/[id]/book/* (payment-expired, reservation-invalid), edit-booking/*
5Checkout / Payment / Confirmationcheckout/*, confirmation/*, [slug]/payment-{landing,success,failed}/*, restaurants/[slug]/payment-*, payment-failed, payment/qr/*, checkin/*
6Reviewsrestaurants/[slug]/reviews/*, review/[encryptedId]/*
7Vouchers & Gift cardsrestaurants/[slug]/voucher/*, voucher_group/*, voucher-group-transaction/*, hungry-hub-gift-card/*
8Profile — account coreprofile/index, profile-hybrid, profile/benefits/*, profile/tier/*, profile/edit/*, profile/history/*, profile/referral/*, profile/bitelist/*
9Profile — orders & walletprofile/booking-and-voucher/*, profile/vouchers/*, profile/offers-and-gift-card/*, profile/payment-methods/*
10Settingsprofile/settings/*
11Onboarding & Authon-boarding/*, survey + login/register (NOT routes — find in src/section, src/components, src/features/user)
12Promotions & Miscpromotions/*, careers/*, landing/[...encryptedId]/*, error pages (404,500,healthz), root index.astro

In the Build primary agent, paste this once. Build dispatches all 12 parity-mapper runs in parallel via the Task tool:

Dispatch the parity-mapper subagent once per cluster below, IN PARALLEL (one Task each).
Each writes its own .cutover/parity/<slug>.json. Do not summarize their output — just
confirm all files exist when done. Clusters (name → routes under src/pages/[lang]/):
1 Discovery & Search → index, web-[city], mobile-[city], search/*, search-suggestion, restaurants/index, restaurants/search/*, restaurants/near-me, restaurants/top/*, tags*, top-brands/*
2 Restaurant Detail → restaurants/[slug]/index(+[client]*), branch/[slug]/*, restaurants/group/[slug]/*, restaurants/bitelist/[slug]/*
3 Package & View Menu → restaurants/[slug]/package/[id]/{index,menu,view-menu}*, restaurants/[slug]/add-on/*, view-menu/*, openrice/*
4 Booking flow → restaurants/[slug]/book/*, restaurants/[slug]/package/[id]/book/* (payment-expired, reservation-invalid), edit-booking/*
5 Checkout/Payment/Confirmation → checkout/*, confirmation/*, [slug]/payment-{landing,success,failed}/*, restaurants/[slug]/payment-*, payment-failed, payment/qr/*, checkin/*
6 Reviews → restaurants/[slug]/reviews/*, review/[encryptedId]/*
7 Vouchers & Gift cards → restaurants/[slug]/voucher/*, voucher_group/*, voucher-group-transaction/*, hungry-hub-gift-card/*
8 Profile account core → profile/index, profile-hybrid, profile/benefits/*, profile/tier/*, profile/edit/*, profile/history/*, profile/referral/*, profile/bitelist/*
9 Profile orders & wallet → profile/booking-and-voucher/*, profile/vouchers/*, profile/offers-and-gift-card/*, profile/payment-methods/*
10 Settings → profile/settings/*
11 Onboarding & Auth → on-boarding/*, survey, + login/register (NOT routes; find in src/section, src/components, src/features/user)
12 Promotions & Misc → promotions/*, careers/*, landing/[...encryptedId]/*, 404/500/healthz, root index.astro

Navigate the parallel child sessions: ⟨Leader⟩+↓ enters the first child, → cycles children, ↑ returns to parent.

Run — option B: manual (one session per cluster)

@-mention the subagent with a tiny message; method lives in the agent’s system prompt:

@parity-mapper Cluster: "Checkout / Payment / Confirmation".
Routes: checkout/*, confirmation/*, [slug]/payment-{landing,success,failed}/*,
restaurants/[slug]/payment-*, payment-failed, payment/qr/*, checkin/*

Repeat for the other 11 (open separate sessions/tabs to parallelize).

Then

@integrations-surveyor go          # writes .cutover/parity/_integrations.json
@parity-critic go                  # writes .cutover/parity/_gaps.json (run LAST)

Collect & hand back

cd <workspace>/hh-pegasus
ls .cutover/parity/                 # expect 12 cluster JSONs + _integrations.json + _gaps.json
cat .cutover/parity/*.json          # or: zip -r parity.zip .cutover/parity

Share the raw JSON (not prose) back into the cutover thread. Synthesis step then:

  1. merges + dedupes into 04-parity-checklist.md,
  2. cross-maps each screen to GitHub issues + ClickUp subtasks in 08-issue-index.md,
  3. flags screens with zero migration coverage (the real gaps),
  4. PRs the updated checklist to main.

Notes

  • temperature: 0.1 + “unknown → null, never invent” keeps extraction faithful.
  • Re-run a single cluster anytime — it overwrites only its own <slug>.json.
  • Outputs are gitignored; nothing from a run pollutes the legacy repo.