# Drafting Conventions — READ FIRST (peach-android remaining-gaps fan-out) You are a **drafting subagent**. Hard rules: - Write files **only** under `app/drafts//` (create that folder). Everything outside `app/drafts/` is **READ-ONLY** — do not edit, create, move, or delete it. - **Never** run `koh`, `git`, or `gradle` (no build / assembleDebug / lintDebug / tests). **Never** run `rm` (use `trash` if ever needed — but you delete nothing). The orchestrator owns all builds, wiring, koh saves. - Produce **compilable, drop-in Kotlin** matching existing conventions, plus an `INTEGRATION.md` telling the orchestrator exactly how to wire it: destination paths, nav routes to add, new ViewModel/Repository/model APIs needed (full signatures + reference snippet), and insertion points quoted with a few lines of surrounding source as anchors. - The brief's pseudocode uses names that **do not all exist**. Adapt to reality below. - Return a **terse** summary only (files written, new APIs the orchestrator must add, risks/assumptions). Do **not** paste full code into your reply — it's on disk. ## Verified codebase facts - Package root `com.peachpasswords`; screens in `com.peachpasswords.ui.`. - **Entry model** `vault/VaultEntry.kt`: `type` is `String?` = "login"|"note"|"card" (null == login). Helpers: `isLogin() isNote() isCard() isBreach() hasTOTP() hasPasskey() domainKey()`. **There is no `EntryType` enum** — use the string + helpers. Card fields already present: `cardholderName cardNumber expMonth expYear cvc cardNickname cardNetwork`. Also present: `additionalUrls: List?`, `tags: List?`, `passwordHistory: List?`, `notes`. - **Colors** `ui/theme/PeachColors.kt` (object): `T0 T1 T2 T3 T4` (= spec t0..t3/t4), `Breach BreachBg BreachBorder` (= spec "breach color"), `HealthOk` (= spec "health"), `S1 S2 S3` (= spec s1/s2/s3), `SurfaceElevated = 0xE0131109` (the glass-panel bg the spec calls `Color(0xE0131109)`), `Bg`. **Runtime accent**: `val accent = LocalPeachAccent.current` (`import com.peachpasswords.ui.theme.LocalPeachAccent`). Never hardcode hex. - **Type** `ui/theme/PeachType.kt` (object): families `Display` (= Cormorant), `Mono` (= IBM Plex Mono), `Body` (= Inter), `Script` (= PeachScript watermark). Named styles incl. `bodyMono labelMono tinyMono body hint onboardingHeadline lockHeadline createHeadline entryNameHero entryNameList sortPill recoveryWord totpCode totpCountdown`. Build a local `TextStyle(fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontSize = 44.sp)` etc. when no named style fits. **Never** use `MaterialTheme.typography`. - **No `PeachField` composable exists.** For text inputs use `BasicTextField` with the underline style in `ui/vault/EntryEditScreen.kt` (private `Field` / `PasswordField` composables — read and mirror them). **No `OutlinedTextField`.** - **Background**: screens use the `ShellBackground` composable (see `ImportScreen.kt`, `TrashScreen.kt`, `ExportScreen.kt` for the wrapper pattern). Check whether a `RuneBackground` exists (`grep -rn RuneBackground app/src/main`); if absent, note it in INTEGRATION.md as a TODO and omit it rather than inventing one. - **Nav**: routes in `ui/PeachNav.kt` (sealed class `PeachNav(val route: String)` — add a `data object`/`data class`). Wired in `ui/PeachAppNavHost.kt` via `composable(PeachNav.X.route){ ... }`, using `val nav: (PeachNav)->Unit` and `val back: ()->Unit`. **Do not edit these files** — specify the exact additions in INTEGRATION.md. - **DI/VM**: `@HiltViewModel` + `hiltViewModel()`; inject `VaultRepository` (`vault/VaultRepository.kt`) and `@ApplicationContext Context` when needed (see `ImportViewModel`/`ExportViewModel`). New repo/VM methods → describe in INTEGRATION.md with signature + reference impl; don't edit the real repo. - Match sibling screens for SAF, clipboard, FLAG_SECURE, haptics (`haptics/PeachHaptics.kt`) patterns. Read before drafting. ## Shared-file discipline Several items target the **same** existing files (EntryEditScreen, EntryDetailScreen, VaultListScreen, SettingsScreen/SettingsCardBodies). You only draft — never edit them — but to make merging clean: draft **self-contained composables/helpers** in your `app/drafts//` folder and, in INTEGRATION.md, give the **precise insertion anchor** (quote ~3 lines of the real file where your block goes) plus any new imports. Do not reproduce the whole target file.