[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DM06RDARN3WFFJWE5R65H6":3,"skill-same:01M7DM06RDARN3WFFJWE5R65H6":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7DM06RDARN3WFFJWE5R65H6","scaffold",null,"Phase 4 of App in a Box. Generates the app from the interview and design answers. It creates the Expo app, overlays the template (auth, API client, analytics, monitoring, UI primitives, guards), generates tokens, writes the backend and migrations, adapts the core-loop screen and data model to the brief, and makes the first commit. It needs no cloud accounts. Also use it to re-render the latest template into an existing app (`render.py --force` keeps the brief, tokens and appbox.yaml).","foxinthehenhouse\u002Fapp-in-a-box","foxinthehenhouse","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F144333692?v=4","01M7DKXRK1CCGY9F45FYGWVD29","Kyle Fox","01M7DKXRKNG8A1ADJFXVH15RXT",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Fskills\u002Fscaffold\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: scaffold\ndescription: Phase 4 of App in a Box. Generates the app from the interview and design answers. It creates the Expo app, overlays the template (auth, API client, analytics, monitoring, UI primitives, guards), generates tokens, writes the backend and migrations, adapts the core-loop screen and data model to the brief, and makes the first commit. It needs no cloud accounts. Also use it to re-render the latest template into an existing app (`render.py --force` keeps the brief, tokens and appbox.yaml).\n---\n\n# Phase 4: Scaffold\n\n`$KIT` is the plugin root: `${CLAUDE_PLUGIN_ROOT}` in Claude Code, two levels above\nthis file in Codex, or `\u003Cclone>\u002Fplugins\u002Fapp-in-a-box` otherwise.\n\nEverything here runs locally. No secrets are needed yet. Read `appbox.yaml` and\n`docs\u002Fproduct\u002FBRIEF.md` first.\n\n## 0. Decisions due now\n\nThe scaffold is when the name and the integrations start costing something to change.\nRead `design\u002Fbrief.json` → `decisions` and ask, in one structured round, every\n`deferred` entry with `ask_at: scaffold`, which always covers:\n- **Name + bundle ID** (interview question 16), unless shape already settled it: the\n  working title becomes the name or gets replaced now, because the bundle ID is\n  permanent once the app is in a store.\n- **Integrations the v1 features imply**, and only those: payments for a paid v1\n  feature (`recipe-payments`), reminders that need push credentials (`recipe-push`),\n  Apple and Google sign-in (`recipe-social-auth`), an AI feature (`recipe-ai-feature`).\n  Say what each one costs and whether it's built now or ticketed for after the scaffold.\n- The services and hosting defaults shape stated, in one line (\"PostHog, Sentry,\n  Railway, GitHub Issues, as assumed; say if not\"), not as questions.\n\nWrite the answers to `appbox.yaml` (`app.*`, `stack.*`) and flip each entry to `asked`\n(or `default` if they kept the assumption).\n\n## 1. Expo app first (versions come from Expo, not from this kit)\n\nCreate it **before** `git init`, with stdin closed: in a dogfood run,\n`create-expo-app` inside an already-initialised repo wrote every file and then hung\n(it waits on a finishing step that never returns). If it still hangs after\n`App.tsx` and `package.json` exist, kill it: the project is complete.\n\n```\nnpx --yes create-expo-app@latest mobile --template blank-typescript --no-install \u003C\u002Fdev\u002Fnull\n```\n\nThe Expo template ships its own `mobile\u002FAGENTS.md` (routes in `src\u002Fapp\u002F`, which this\nkit doesn't use) and `mobile\u002F.claude\u002Fsettings.json` (enables Expo's official Claude\nplugin, but only when an agent starts inside `mobile\u002F`). The renderer replaces the\nAGENTS.md with the kit's (which keeps Expo's \"read the versioned docs\" rule); remove\nthe nested settings so the repo has ONE harness:\n\n```\nrm -rf mobile\u002F.claude\n```\n\n```\ncd mobile && rm -f App.tsx index.ts && npm install --no-audit --no-fund \u003C\u002Fdev\u002Fnull\n```\n\nThen install everything the template uses, with one script (it is the single list,\nshared with `scripts\u002Fdemo.sh` and the kit selftest, so they can't drift):\n\n```\n\"$KIT\u002Fscripts\u002Fmobile-deps.sh\" mobile\n```\n\nIt runs `npx expo install` (so every version matches the SDK) for: `react-dom` +\n`react-native-web` (web target; `react-dom` must be in the FIRST install or npm later\npicks a newer React than the SDK pins and every install fails with ERESOLVE),\n`expo-router` + `react-native-screens` + `react-native-safe-area-context`,\n`react-native-reanimated` 4 + `react-native-worklets` + `react-native-gesture-handler`,\n`expo-haptics`, `expo-symbols`, `@expo\u002Fui` (native segmented control), `expo-image`, `expo-splash-screen`, `expo-system-ui`, `expo-font` + `expo-asset` (its loader needs it),\n`@shopify\u002Fflash-list`, Supabase, PostHog, Sentry and friends, plus the v1.0 production\nset: TanStack Query + its AsyncStorage persister + NetInfo (offline), `expo-notifications`\n(push), `expo-updates` (OTA), `expo-clipboard` \u002F `expo-sharing` \u002F `expo-file-system`\n(error references, data export), `react-hook-form` + `zod` (forms), `i18next` +\n`react-i18next` + `expo-localization` (i18n); then the dev tools (`eslint-config-expo`,\n`jest-expo`, `@testing-library\u002Freact-native`). It sets `main`, the `gates` \u002F `lint` \u002F\n`typecheck` \u002F `test` \u002F `web` \u002F `demo` \u002F `check-strings` scripts, and jest's `preset`,\nthe worklets `resolver` (without it any test that imports a component crashes under\nReanimated 4) and `setupFiles` (`jest.setup.ts`: NetInfo + AsyncStorage mocks). If Expo's API is blocked by a proxy it retries with\n`EXPO_OFFLINE=1` (the SDK's bundled version map); npm itself still needs the registry.\n\n### What the template gives you (so you build on it, not around it)\n\n- **Native tabs** (`app\u002F(app)\u002F_layout.tsx`, `expo-router\u002Funstable-native-tabs`): Liquid\n  Glass on iOS 26, Material 3 on Android, a tab list on web. Icons are SF Symbols\n  (`sf`) + Material Symbols (`md`). Keep 2 to 4 tabs.\n- **Sheets are routes** (`presentation: \"formSheet\"`), registered once on the root\n  Stack in `app\u002F_layout.tsx`. `app\u002Fedit-name.tsx` is the pattern to copy.\n- **Light + dark** from `design\u002Ftokens.json`, following the OS with a user override\n  (Settings → Appearance). A single-palette (v1) token file locks to its mode.\n- **Component library** in `components\u002Fui\u002F` and a dev-only `\u002Fgallery` of all of it. Every\n  prototype block has one (SCREENS.md names the exact call): `StatCard`, `Media`\n  (expo-image), a native `SegmentedControl` (@expo\u002Fui), `ProgressBar`, `EmptyState`...\n  SCREENS.md's Platform and Motion tables say which native piece and which\n  `lib\u002Fmotion.ts` call reproduce each thing the founder clicked.\n- **Demo mode**: `EXPO_PUBLIC_DEMO=1` (in `mobile\u002F.env`, or `npm run demo`) swaps in the\n  in-memory fake in `lib\u002Fdemo.ts`. Use it to click through the app before phase 5.\n- **Production capabilities, built in** (each with jest tests; see `mobile\u002FAGENTS.md`):\n  account deletion (Settings → Delete account), \"Download my data\" (`GET\n  \u002Fapi\u002Fv1\u002Fme\u002Fexport`, share sheet), request ids on every call with a copyable error\n  reference, offline-first data (`lib\u002Fquery.ts`, optimistic edits that queue offline,\n  `OfflineBanner`), the push client (`lib\u002Fpush.ts`, Settings toggle, no-op until a device\n  build with an EAS projectId), deep links through one resolver (`lib\u002Flinks.ts`,\n  `app\u002F+native-intent.tsx`; universal links via `node scripts\u002Fset-app-domain.js`), OTA\n  updates (`runtimeVersion` fingerprint policy, a channel per eas.json profile,\n  `UpdateBanner`), react-hook-form + zod forms (`FormField`), and i18n (every string in\n  `locales\u002Fen.ts`, `check-hardcoded-strings.js` in the gates, an `en-XA` pseudo-locale\n  test). Still recipes: social sign-in, payments, PowerSync, AI features, image uploads\n  (`recipe-uploads`), search (`recipe-search`), and the push **credentials** (`recipe-push`).\n\n## 2. Repo\n\n```\ngit init -b main\n```\n\n(Skip it if `.git` exists.) Everything in this phase lands in one bootstrap commit on\n`main`. That's the only commit ever made on `main` directly.\n\n## 3. Overlay the template\n\nFrom the repo root, with the values from `appbox.yaml`:\n\n```\npython3 \"$KIT\u002Fscripts\u002Frender.py\" --target . --name \"\u003Cname>\" --slug \u003Cslug> --bundle-id \u003Cbundle_id> --owner \u003Cowner_handle> --one-liner \"\u003Cone_liner>\" --force\n```\n\n`--force` is correct here\nbecause it replaces the create-expo-app defaults (`app.json`, `tsconfig.json`).\nThe renderer also themes `app.json` from the tokens (splash background per mode,\n`userInterfaceStyle`) and draws a placeholder icon, adaptive icon, splash mark and\nfavicon into `mobile\u002Fassets\u002Fbrand\u002F` (the app's initial in `onAccent` on `accent`).\nDrop a real 1024px `design\u002Ficon.png` and re-render to use your own.\n`design\u002Ftokens.json`, `appbox.yaml`, `BRIEF.md`, `privacy\u002Fdata-map.yaml` and the root\n`README.md` are protected and never overwritten (the renderer only refreshes the map's\n`packs` line and regenerates the privacy answers from it). The README is rendered once with a small \"Built with App in a\nBox\" badge; it's the owner's to keep or delete. The renderer also generates `mobile\u002Flib\u002Ftokens.ts` and the\nClaude\u002FCodex adapters (`.claude\u002Fskills`, `.codex\u002F*`).\n\n## 4. Make it *their* app (the part that needs judgement)\n\nThe template is a correct skeleton. Now shape it to the brief **and to the frozen\nprototype**: `docs\u002Fproduct\u002FSCREENS.md` (from phase 2) lists every v1 screen, the layout\nthe founder chose, which kit component each block maps to, the navigation and the\nstates. Build those screens, in that layout, with those words (the chosen tone's copy\ngoes into `locales\u002Fen.ts`). If a block has no kit component, compose it from\n`components\u002Fui` rather than inventing a new style. The founder already approved this;\nthe app should feel like the prototype they clicked, not a reinterpretation of it.\nFeatures marked out of v1 in SCREENS.md stay out. **No SCREENS.md** (a project that\nfinished design before the prototype existed): run phase 2's freeze if\n`design\u002Fprototype.json` exists; otherwise build from BRIEF.md → \"Screens (v1)\" and say\nonce that re-running the prototype phase would let them click it first.\n\n1. **Data model.** Add one migration per BRIEF table, named\n   `supabase\u002Fmigrations\u002F\u003CUTC timestamp>_\u003Cname>.sql`, following\n   `.agents\u002Frules\u002Fdb-migrations.md` (RLS, `user_id` FK, rollback comment). If\n   `sensitive_data` includes financial data, money is integer minor units. Declare\n   every new column in `privacy\u002Fdata-map.yaml` (category, purpose, retention;\n   `.agents\u002Frules\u002Fprivacy-data-map.md`), and the new analytics props and permissions\n   from steps 3-4 too, then run `python3 scripts\u002Fcheck_data_map.py --write`: it\n   regenerates the store answers and the policy draft, and CI fails until the map is\n   complete. The renderer already set the map's `packs` from the risk screen\n   (`design\u002Fbrief.json` → `risk.categories`; `baseline` when there is none).\n2. **Backend.** One router + service per core-loop resource, scoped by `user.id`,\n   with `Wire` response models and tests. Copy the pattern in `routers\u002Fme.py` and\n   `tests\u002Ftest_me.py`, including the filter-honouring fake.\n3. **Mobile.** Replace the empty state in `app\u002F(app)\u002Findex.tsx` with the core-loop\n   screen, built from `components\u002Fui` (skeleton while loading, `EmptyState`, toast on\n   save, `Celebration` on the loop's payoff), with a `*Wire` type + adapter in\n   `lib\u002Fapi.ts`, analytics helpers for the core action (success + failure), and honest\n   empty\u002Ferror states. Add each new endpoint to `ROUTES` in `lib\u002Fdemo.ts` with seeded\n   data from the brief, so demo mode keeps working. Add one `NativeTabs.Trigger` per tab\n   in SCREENS.md → Navigation, and the matching `TabTrigger` in `app\u002F(app)\u002F_layout.web.tsx`\n   (web's bottom bar: keep the two in step). Every other screen is a pushed route, every sheet a\n   formSheet route. Take each icon's `sf` \u002F `md` names from SCREENS.md → Icons, and use\n   `FlashList` for any list that can outgrow a screen.\n   **Fonts:** for each family in `design\u002Ftokens.json` → `font` that isn't built in,\n   install its `@expo-google-fonts\u002F*` package and register every weight the type roles\n   use as `\u003CFamily>_\u003Cweight>` in `lib\u002Ffonts.ts` (the file's header shows how). An\n   unloaded face silently falls back to the system font, so\n   `lib\u002F__tests__\u002Ffonts.test.ts` fails, naming the missing keys, until they're all there.\n4. **Analytics.** Add the 5 north-star events from the brief as typed helpers, each\n   with a real call site.\n5. **Domain rules.** For each `sensitive_data` entry, copy\n   `.agents\u002Frules\u002Foptional\u002F\u003Cdomain>.md` up to `.agents\u002Frules\u002F` and add a row to the\n   path-rules table in `AGENTS.md`. Once `privacy\u002Fdata-map.yaml` lists the guardrail\n   `packs`, run `python3 scripts\u002Fcheck_guardrails.py --write` (the app's copy of the\n   packs, `mobile\u002Flib\u002Fpacks.ts`) and then `python3 scripts\u002Fcheck_guardrails.py`, which\n   must be clean (`docs\u002Fprivacy\u002FGUARDRAILS.md` says what each pack enforces).\n6. **Draft AGENTS.md from the brief.** It's the file every future agent reads\n   first, so write it from `BRIEF.md`, `SCREENS.md` and `VALIDATION.md`, not from memory:\n   - `appbox:product`: who it's for, their problem in their words, the core loop,\n     the positioning line (BRIEF → Positioning), the north-star metric and the top\n     riskiest assumption (VALIDATION.md). At most 10 lines.\n   - `appbox:critical-rules` (2–4 domain rules from the brief), `appbox:ai-fence`,\n     `appbox:voice`, `appbox:domain-rules`.\n   - **Stack line:** drop PostHog \u002F Sentry from it if `stack.analytics` \u002F\n     `stack.errors` is `none`, and say \"(declined: no-op until enabled)\".\n   - **`## Where things live`:** one row per core-loop resource you added in steps\n     1–3 (its screens, router, service, tables). Keep the template's rows.\n   Delete each marker comment once it's filled. Then **show the owner the Product\n   section and the map and ask (structured): \"Does this describe your app? Anything\n   wrong or missing?\"** Apply edits before committing. From here on the harness lint\n   keeps it honest: `tests\u002Fharness\u002Ftest_agents_md_current.py` fails CI on any\n   unfilled marker (once `progress.scaffold` is done) or any screen, router, service\n   or table missing from the map, so every feature PR updates it.\n7. **AI (only if `ai.enabled`).** Add `backend\u002Fservices\u002F\u003Cname>_service.py` as the\n   only module that calls the model API, register `ANTHROPIC_API_KEY` (or the\n   provider's key) in `FEATURE_CONFIG`, and state the fence in AGENTS.md rule 8.\n   Then let that one module through the import-linter fence: in `pyproject.toml`'s\n   forbidden contract set `ignore_imports = [\"backend.services.\u003Cname>_service -> anthropic\"]`\n   (`lint-imports` fails any other module that imports the SDK).\n\n### Match check (the prototype is the spec; prove the app matches it)\n\nThe founder approved a prototype, not a description of one. Before the bootstrap\ncommit, check the built app against `docs\u002Fproduct\u002FSCREENS.md` screen by screen:\n\n1. Run `cd mobile && npm run demo` and open every screen SCREENS.md lists (tabs,\n   pushed routes, sheets).\n2. For each screen, confirm: the same blocks in the same order as its chosen layout;\n   the chosen tone's copy, word for word, from `locales\u002Fen.ts`; exactly one primary\n   action; the empty state SCREENS.md gives it; icons by the `sf` \u002F `md` names in its\n   Icons table; features marked out of v1 absent.\n3. Hand `design-critic` (`$KIT\u002Fagents\u002Fdesign-critic.md`; in Codex do its job inline)\n   the screenshots or the rendered component tree of each screen together with\n   SCREENS.md, once. It returns PASS or FAIL with at most 7 fixes.\n4. Fix every item before the bootstrap commit. Don't commit a FAIL and \"fix it in\n   phase 8\": the scaffold is the one moment the whole app is in view at once.\n5. List the screens you checked in the bootstrap commit body (`Match check: home,\n   add-item (sheet), history, settings`), so the record says what was verified.\n\nNo `npm run demo` (web target broken on this machine)? Say so, check against the\ncomponent tree and the test renders instead, and name that in the commit body.\n\n## 5. Verify locally\n\n```\nscripts\u002Fdev-venv.sh python -m pytest -q\n```\n\n```\ncd mobile && npm run gates\n```\n\nBoth must be green. Then regenerate the Accessibility Nutrition Labels, now that\nSCREENS.md lists the common tasks and each screen has its flow:\n`python3 scripts\u002Fa11y_labels.py` (CI's `--check` fails on a stale\n`docs\u002Fproduct\u002FACCESSIBILITY.md`; it claims only what the checks prove). Then boot the app with no accounts: `cd mobile && npm run demo`\n(or `EXPO_PUBLIC_DEMO=1 npx expo start --web`); any email and any 6-digit code sign\nyou in. Without demo mode and before phase 5, sign-in renders but sending a code\nfails, which is expected. Never put `EXPO_PUBLIC_DEMO` in `eas.json`: the env guard\nfails the gates if you do.\n\n## 6. Bootstrap commit\n\nTurn the hooks on **first**, so the pre-commit's `.env` and secret-key checks see the\nbiggest commit this repo will ever get. `APPBOX_BOOTSTRAP=1` only lifts the\n\"no commits on `main`\" rule for this one commit; the other checks still run.\n\n```\ngit config core.hooksPath .githooks\n```\n\n```\ngit add -A && APPBOX_BOOTSTRAP=1 git commit -m \"chore: scaffold \u003Cname> with App in a Box\"\n```\n\nIf the hook refuses the commit, it found a staged `.env` or a key-shaped string: fix\nthat (unstage, move the value to `.env`), never bypass the hook. From here\non the git hooks refuse commits on `main`, staged `.env` files and key-shaped\nstrings, and run the gates before every push, whichever agent is driving. Everything\nuntil the first PR is committed on a setup branch:\n\n```\ngit switch -c chore\u002Fappbox-setup\n```\n\nSet `progress.scaffold: done` and commit it there.\n","# Phase 4: Scaffold\n\n`$KIT` is the plugin root: `${CLAUDE_PLUGIN_ROOT}` in Claude Code, two levels above\nthis file in Codex, or `\u003Cclone>\u002Fplugins\u002Fapp-in-a-box` otherwise.\n\nEverything here runs locally. No secrets are needed yet. Read `appbox.yaml` and\n`docs\u002Fproduct\u002FBRIEF.md` first.\n\n## 0. Decisions due now\n\nThe scaffold is when the name and the integrations start costing something to change.\nRead `design\u002Fbrief.json` → `decisions` and ask, in one structured round, every\n`deferred` entry with `ask_at: scaffold`, which always covers:\n- **Name + bundle ID** (interview question 16), unless shape already settled it: the\n  working title becomes the name or gets replaced now, because the bundle ID is\n  permanent once the app is in a store.\n- **Integrations the v1 features imply**, and only those: payments for a paid v1\n  feature (`recipe-payments`), reminders that need push credentials (`recipe-push`),\n  Apple and Google sign-in (`recipe-social-auth`), an AI feature (`recipe-ai-feature`).\n  Say what each one costs and whether it's built now or ticketed for after the scaffold.\n- The services and hosting defaults shape stated, in one line (\"PostHog, Sentry,\n  Railway, GitHub Issues, as assumed; say if not\"), not as questions.\n\nWrite the answers to `appbox.yaml` (`app.*`, `stack.*`) and flip each entry to `asked`\n(or `default` if they kept the assumption).\n\n## 1. Expo app first (versions come from Expo, not from this kit)\n\nCreate it **before** `git init`, with stdin closed: in a dogfood run,\n`create-expo-app` inside an already-initialised repo wrote every file and then hung\n(it waits on a finishing step that never returns). If it still hangs after\n`App.tsx` and `package.json` exist, kill it: the project is complete.\n\n```\nnpx --yes create-expo-app@latest mobile --template blank-typescript --no-install \u003C\u002Fdev\u002Fnull\n```\n\nThe Expo template ships its own `mobile\u002FAGENTS.md` (routes in `src\u002Fapp\u002F`, which this\nkit doesn't use) and `mobile\u002F.claude\u002Fsettings.json` (enables Expo's official Claude\nplugin, but only when an agent starts inside `mobile\u002F`). The renderer replaces the\nAGENTS.md with the kit's (which keeps Expo's \"read the versioned docs\" rule); remove\nthe nested settings so the repo has ONE harness:\n\n```\nrm -rf mobile\u002F.claude\n```\n\n```\ncd mobile && rm -f App.tsx index.ts && npm install --no-audit --no-fund \u003C\u002Fdev\u002Fnull\n```\n\nThen install everything the template uses, with one script (it is the single list,\nshared with `scripts\u002Fdemo.sh` and the kit selftest, so they can't drift):\n\n```\n\"$KIT\u002Fscripts\u002Fmobile-deps.sh\" mobile\n```\n\nIt runs `npx expo install` (so every version matches the SDK) for: `react-dom` +\n`react-native-web` (web target; `react-dom` must be in the FIRST install or npm later\npicks a newer React than the SDK pins and every install fails with ERESOLVE),\n`expo-router` + `react-native-screens` + `react-native-safe-area-context`,\n`react-native-reanimated` 4 + `react-native-worklets` + `react-native-gesture-handler`,\n`expo-haptics`, `expo-symbols`, `@expo\u002Fui` (native segmented control), `expo-image`, `expo-splash-screen`, `expo-system-ui`, `expo-font` + `expo-asset` (its loader needs it),\n`@shopify\u002Fflash-list`, Supabase, PostHog, Sentry and friends, plus the v1.0 production\nset: TanStack Query + its AsyncStorage persister + NetInfo (offline), `expo-notifications`\n(push), `expo-updates` (OTA), `expo-clipboard` \u002F `expo-sharing` \u002F `expo-file-system`\n(error references, data export), `react-hook-form` + `zod` (forms), `i18next` +\n`react-i18next` + `expo-localization` (i18n); then the dev tools (`eslint-config-expo`,\n`jest-expo`, `@testing-library\u002Freact-native`). It sets `main`, the `gates` \u002F `lint` \u002F\n`typecheck` \u002F `test` \u002F `web` \u002F `demo` \u002F `check-strings` scripts, and jest's `preset`,\nthe worklets `resolver` (without it any test that imports a component crashes under\nReanimated 4) and `setupFiles` (`jest.setup.ts`: NetInfo + AsyncStorage mocks). If Expo's API is blocked by a proxy it retries with\n`EXPO_OFFLINE=1` (the SDK's bundled version map); npm itself still needs the registry.\n\n### What the template gives you (so you build on it, not around it)\n\n- **Native tabs** (`app\u002F(app)\u002F_layout.tsx`, `expo-router\u002Funstable-native-tabs`): Liquid\n  Glass on iOS 26, Material 3 on Android, a tab list on web. Icons are SF Symbols\n  (`sf`) + Material Symbols (`md`). Keep 2 to 4 tabs.\n- **Sheets are routes** (`presentation: \"formSheet\"`), registered once on the root\n  Stack in `app\u002F_layout.tsx`. `app\u002Fedit-name.tsx` is the pattern to copy.\n- **Light + dark** from `design\u002Ftokens.json`, following the OS with a user override\n  (Settings → Appearance). A single-palette (v1) token file locks to its mode.\n- **Component library** in `components\u002Fui\u002F` and a dev-only `\u002Fgallery` of all of it. Every\n  prototype block has one (SCREENS.md names the exact call): `StatCard`, `Media`\n  (expo-image), a native `SegmentedControl` (@expo\u002Fui), `ProgressBar`, `EmptyState`...\n  SCREENS.md's Platform and Motion tables say which native piece and which\n  `lib\u002Fmotion.ts` call reproduce each thing the founder clicked.\n- **Demo mode**: `EXPO_PUBLIC_DEMO=1` (in `mobile\u002F.env`, or `npm run demo`) swaps in the\n  in-memory fake in `lib\u002Fdemo.ts`. Use it to click through the app before phase 5.\n- **Production capabilities, built in** (each with jest tests; see `mobile\u002FAGENTS.md`):\n  account deletion (Settings → Delete account), \"Download my data\" (`GET\n  \u002Fapi\u002Fv1\u002Fme\u002Fexport`, share sheet), request ids on every call with a copyable error\n  reference, offline-first data (`lib\u002Fquery.ts`, optimistic edits that queue offline,\n  `OfflineBanner`), the push client (`lib\u002Fpush.ts`, Settings toggle, no-op until a device\n  build with an EAS projectId), deep links through one resolver (`lib\u002Flinks.ts`,\n  `app\u002F+native-intent.tsx`; universal links via `node scripts\u002Fset-app-domain.js`), OTA\n  updates (`runtimeVersion` fingerprint policy, a channel per eas.json profile,\n  `UpdateBanner`), react-hook-form + zod forms (`FormField`), and i18n (every string in\n  `locales\u002Fen.ts`, `check-hardcoded-strings.js` in the gates, an `en-XA` pseudo-locale\n  test). Still recipes: social sign-in, payments, PowerSync, AI features, image uploads\n  (`recipe-uploads`), search (`recipe-search`), and the push **credentials** (`recipe-push`).\n\n## 2. Repo\n\n```\ngit init -b main\n```\n\n(Skip it if `.git` exists.) Everything in this phase lands in one bootstrap commit on\n`main`. That's the only commit ever made on `main` directly.\n\n## 3. Overlay the template\n\nFrom the repo root, with the values from `appbox.yaml`:\n\n```\npython3 \"$KIT\u002Fscripts\u002Frender.py\" --target . --name \"\u003Cname>\" --slug \u003Cslug> --bundle-id \u003Cbundle_id> --owner \u003Cowner_handle> --one-liner \"\u003Cone_liner>\" --force\n```\n\n`--force` is correct here\nbecause it replaces the create-expo-app defaults (`app.json`, `tsconfig.json`).\nThe renderer also themes `app.json` from the tokens (splash background per mode,\n`userInterfaceStyle`) and draws a placeholder icon, adaptive icon, splash mark and\nfavicon into `mobile\u002Fassets\u002Fbrand\u002F` (the app's initial in `onAccent` on `accent`).\nDrop a real 1024px `design\u002Ficon.png` and re-render to use your own.\n`design\u002Ftokens.json`, `appbox.yaml`, `BRIEF.md`, `privacy\u002Fdata-map.yaml` and the root\n`README.md` are protected and never overwritten (the renderer only refreshes the map's\n`packs` line and regenerates the privacy answers from it). The README is rendered once with a small \"Built with App in a\nBox\" badge; it's the owner's to keep or delete. The renderer also generates `mobile\u002Flib\u002Ftokens.ts` and the\nClaude\u002FCodex adapters (`.claude\u002Fskills`, `.codex\u002F*`).\n\n## 4. Make it *their* app (the part that needs judgement)\n\nThe template is a correct skeleton. Now shape it to the brief **and to the frozen\nprototype**: `docs\u002Fproduct\u002FSCREENS.md` (from phase 2) lists every v1 screen, the layout\nthe founder chose, which kit component each block maps to, the navigation and the\nstates. Build those screens, in that layout, with those words (the chosen tone's copy\ngoes into `locales\u002Fen.ts`). If a block has no kit component, compose it from\n`components\u002Fui` rather than inventing a new style. The founder already approved this;\nthe app should feel like the prototype they clicked, not a reinterpretation of it.\nFeatures marked out of v1 in SCREENS.md stay out. **No SCREENS.md** (a project that\nfinished design before the prototype existed): run phase 2's freeze if\n`design\u002Fprototype.json` exists; otherwise build from BRIEF.md → \"Screens (v1)\" and say\nonce that re-running the prototype phase would let them click it first.\n\n1. **Data model.** Add one migration per BRIEF table, named\n   `supabase\u002Fmigrations\u002F\u003CUTC timestamp>_\u003Cname>.sql`, following\n   `.agents\u002Frules\u002Fdb-migrations.md` (RLS, `user_id` FK, rollback comment). If\n   `sensitive_data` includes financial data, money is integer minor units. Declare\n   every new column in `privacy\u002Fdata-map.yaml` (category, purpose, retention;\n   `.agents\u002Frules\u002Fprivacy-data-map.md`), and the new analytics props and permissions\n   from steps 3-4 too, then run `python3 scripts\u002Fcheck_data_map.py --write`: it\n   regenerates the store answers and the policy draft, and CI fails until the map is\n   complete. The renderer already set the map's `packs` from the risk screen\n   (`design\u002Fbrief.json` → `risk.categories`; `baseline` when there is none).\n2. **Backend.** One router + service per core-loop resource, scoped by `user.id`,\n   with `Wire` response models and tests. Copy the pattern in `routers\u002Fme.py` and\n   `tests\u002Ftest_me.py`, including the filter-honouring fake.\n3. **Mobile.** Replace the empty state in `app\u002F(app)\u002Findex.tsx` with the core-loop\n   screen, built from `components\u002Fui` (skeleton while loading, `EmptyState`, toast on\n   save, `Celebration` on the loop's payoff), with a `*Wire` type + adapter in\n   `lib\u002Fapi.ts`, analytics helpers for the core action (success + failure), and honest\n   empty\u002Ferror states. Add each new endpoint to `ROUTES` in `lib\u002Fdemo.ts` with seeded\n   data from the brief, so demo mode keeps working. Add one `NativeTabs.Trigger` per tab\n   in SCREENS.md → Navigation, and the matching `TabTrigger` in `app\u002F(app)\u002F_layout.web.tsx`\n   (web's bottom bar: keep the two in step). Every other screen is a pushed route, every sheet a\n   formSheet route. Take each icon's `sf` \u002F `md` names from SCREENS.md → Icons, and use\n   `FlashList` for any list that can outgrow a screen.\n   **Fonts:** for each family in `design\u002Ftokens.json` → `font` that isn't built in,\n   install its `@expo-google-fonts\u002F*` package and register every weight the type roles\n   use as `\u003CFamily>_\u003Cweight>` in `lib\u002Ffonts.ts` (the file's header shows how). An\n   unloaded face silently falls back to the system font, so\n   `lib\u002F__tests__\u002Ffonts.test.ts` fails, naming the missing keys, until they're all there.\n4. **Analytics.** Add the 5 north-star events from the brief as typed helpers, each\n   with a real call site.\n5. **Domain rules.** For each `sensitive_data` entry, copy\n   `.agents\u002Frules\u002Foptional\u002F\u003Cdomain>.md` up to `.agents\u002Frules\u002F` and add a row to the\n   path-rules table in `AGENTS.md`. Once `privacy\u002Fdata-map.yaml` lists the guardrail\n   `packs`, run `python3 scripts\u002Fcheck_guardrails.py --write` (the app's copy of the\n   packs, `mobile\u002Flib\u002Fpacks.ts`) and then `python3 scripts\u002Fcheck_guardrails.py`, which\n   must be clean (`docs\u002Fprivacy\u002FGUARDRAILS.md` says what each pack enforces).\n6. **Draft AGENTS.md from the brief.** It's the file every future agent reads\n   first, so write it from `BRIEF.md`, `SCREENS.md` and `VALIDATION.md`, not from memory:\n   - `appbox:product`: who it's for, their problem in their words, the core loop,\n     the positioning line (BRIEF → Positioning), the north-star metric and the top\n     riskiest assumption (VALIDATION.md). At most 10 lines.\n   - `appbox:critical-rules` (2–4 domain rules from the brief), `appbox:ai-fence`,\n     `appbox:voice`, `appbox:domain-rules`.\n   - **Stack line:** drop PostHog \u002F Sentry from it if `stack.analytics` \u002F\n     `stack.errors` is `none`, and say \"(declined: no-op until enabled)\".\n   - **`## Where things live`:** one row per core-loop resource you added in steps\n     1–3 (its screens, router, service, tables). Keep the template's rows.\n   Delete each marker comment once it's filled. Then **show the owner the Product\n   section and the map and ask (structured): \"Does this describe your app? Anything\n   wrong or missing?\"** Apply edits before committing. From here on the harness lint\n   keeps it honest: `tests\u002Fharness\u002Ftest_agents_md_current.py` fails CI on any\n   unfilled marker (once `progress.scaffold` is done) or any screen, router, service\n   or table missing from the map, so every feature PR updates it.\n7. **AI (only if `ai.enabled`).** Add `backend\u002Fservices\u002F\u003Cname>_service.py` as the\n   only module that calls the model API, register `ANTHROPIC_API_KEY` (or the\n   provider's key) in `FEATURE_CONFIG`, and state the fence in AGENTS.md rule 8.\n   Then let that one module through the import-linter fence: in `pyproject.toml`'s\n   forbidden contract set `ignore_imports = [\"backend.services.\u003Cname>_service -> anthropic\"]`\n   (`lint-imports` fails any other module that imports the SDK).\n\n### Match check (the prototype is the spec; prove the app matches it)\n\nThe founder approved a prototype, not a description of one. Before the bootstrap\ncommit, check the built app against `docs\u002Fproduct\u002FSCREENS.md` screen by screen:\n\n1. Run `cd mobile && npm run demo` and open every screen SCREENS.md lists (tabs,\n   pushed routes, sheets).\n2. For each screen, confirm: the same blocks in the same order as its chosen layout;\n   the chosen tone's copy, word for word, from `locales\u002Fen.ts`; exactly one primary\n   action; the empty state SCREENS.md gives it; icons by the `sf` \u002F `md` names in its\n   Icons table; features marked out of v1 absent.\n3. Hand `design-critic` (`$KIT\u002Fagents\u002Fdesign-critic.md`; in Codex do its job inline)\n   the screenshots or the rendered component tree of each screen together with\n   SCREENS.md, once. It returns PASS or FAIL with at most 7 fixes.\n4. Fix every item before the bootstrap commit. Don't commit a FAIL and \"fix it in\n   phase 8\": the scaffold is the one moment the whole app is in view at once.\n5. List the screens you checked in the bootstrap commit body (`Match check: home,\n   add-item (sheet), history, settings`), so the record says what was verified.\n\nNo `npm run demo` (web target broken on this machine)? Say so, check against the\ncomponent tree and the test renders instead, and name that in the commit body.\n\n## 5. Verify locally\n\n```\nscripts\u002Fdev-venv.sh python -m pytest -q\n```\n\n```\ncd mobile && npm run gates\n```\n\nBoth must be green. Then regenerate the Accessibility Nutrition Labels, now that\nSCREENS.md lists the common tasks and each screen has its flow:\n`python3 scripts\u002Fa11y_labels.py` (CI's `--check` fails on a stale\n`docs\u002Fproduct\u002FACCESSIBILITY.md`; it claims only what the checks prove). Then boot the app with no accounts: `cd mobile && npm run demo`\n(or `EXPO_PUBLIC_DEMO=1 npx expo start --web`); any email and any 6-digit code sign\nyou in. Without demo mode and before phase 5, sign-in renders but sending a code\nfails, which is expected. Never put `EXPO_PUBLIC_DEMO` in `eas.json`: the env guard\nfails the gates if you do.\n\n## 6. Bootstrap commit\n\nTurn the hooks on **first**, so the pre-commit's `.env` and secret-key checks see the\nbiggest commit this repo will ever get. `APPBOX_BOOTSTRAP=1` only lifts the\n\"no commits on `main`\" rule for this one commit; the other checks still run.\n\n```\ngit config core.hooksPath .githooks\n```\n\n```\ngit add -A && APPBOX_BOOTSTRAP=1 git commit -m \"chore: scaffold \u003Cname> with App in a Box\"\n```\n\nIf the hook refuses the commit, it found a staged `.env` or a key-shaped string: fix\nthat (unstage, move the value to `.env`), never bypass the hook. From here\non the git hooks refuse commits on `main`, staged `.env` files and key-shaped\nstrings, and run the gates before every push, whichever agent is driving. Everything\nuntil the first PR is committed on a setup branch:\n\n```\ngit switch -c chore\u002Fappbox-setup\n```\n\nSet `progress.scaffold: done` and commit it there.\n",{"name":5,"description":7},"main","82b5819f074e18b5d31db7a122e1f0ae5f5abbf7","plugins\u002Fapp-in-a-box\u002Fskills\u002Fscaffold","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse","Not a developer","2026-10-06 17:24:46",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add foxinthehenhouse\u002Fapp-in-a-box --skill scaffold",{"tool":37,"command":38},"bunx","bunx skills add foxinthehenhouse\u002Fapp-in-a-box --skill scaffold",{"tool":40,"command":41},"pnpm","pnpm dlx skills add foxinthehenhouse\u002Fapp-in-a-box --skill scaffold","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Fskills\u002Fscaffold\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7DM2EPAFBTFNV5EW5GHKD5Q","ship","Release checklist for getting a build to testers or the stores. Runs the risk gate first (refuses while a risk item is open) and walks the owner through the compliance checklist. Covers the version bump, EAS build and submit, OTA updates and when they're safe, changelog, store listing, privacy nutrition label \u002F data safety form, the Accessibility Nutrition Labels, and the account-deletion requirement. Guidance-level; it never handles signing secrets. Use when asked to ship, release, submit to TestFlight \u002F App Store \u002F Play, or push an OTA update.","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Fship\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7DM2AGRJ822B3C8NQCDK3JG","routines","Put the project's recurring rituals on a schedule, with the owner's consent. Weekly north-star report, monthly market watch, dependency triage, Supabase advisor sweep, reflect and harness-optimize. Uses Claude Code Routines (cloud cron) where they fit, and documents the Codex \u002F local cron equivalent. Use when asked to automate, schedule or \"keep the project moving on its own\", or after setup finishes.","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Froutines\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7DM27C3K1Y7FM0NZSBRSVEN","reflect","Consolidate what recent sessions learned into the project's long-term memory (.agents\u002Fmemory). Use at the end of a substantial session, after a correction from the user, after a painful debugging session, when the session-start healthcheck says reflect is overdue or a pending-reflection seed is waiting, or when MEMORY.md exceeds its budget.","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Freflect\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7DM2146TCNYXVVS2QXF08GS","pr-review","Review a pull request on the owner's behalf and fix what's safe to fix. Runs the deterministic gates first, then correctness\u002Fsecurity, design-system, accessibility and analytics review passes, verifies each blocking finding, applies safe fixes, re-checks, and ends with a plain-English verdict. Use when a PR is opened, when asked to review a PR, a branch or a pasted diff, or before merging anything.","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Fpr-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7DM1X6QP3QAT47ET852S0P8","north-star-report","Weekly product-analytics and reliability readout. Pulls the funnel of the brief's 5 north-star events from PostHog, finds the biggest drop-offs and errors, checks each SLO in docs\u002Fslo.yaml against its error budget, compares with last week, and proposes (then, with a yes, files) tickets that target them. Use weekly, when the session-start line says it's overdue, when the backlog is empty, or when asked \"how is the app doing?\".","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Fnorth-star-report\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7DM1QX8F3D95JSTEHC0P9QA","next","Decide the single next best thing to work on, with two alternates. Reads setup progress, work in progress, open PRs and failing CI, the backlog (GitHub Issues or Linear), overdue harness rituals, product decisions parked until now, and north-star analytics if PostHog is connected. Use when someone asks \"what next?\", \"what should I work on?\", at the start of a session, or after a PR merges.","https:\u002F\u002Fgithub.com\u002Ffoxinthehenhouse\u002Fapp-in-a-box\u002Fblob\u002Fmain\u002Fplugins\u002Fapp-in-a-box\u002Ftemplate\u002F.agents\u002Fskills\u002Fnext\u002FSKILL.md",[],[]]