_CONVENTIONS.md
Drafting Conventions — READ FIRST (peach-android remaining-gaps fan-out)
You are a drafting subagent. Hard rules:
- Write files only under
app/drafts/<ITEM>/(create that folder). Everything outsideapp/drafts/is READ-ONLY — do not edit, create, move, or delete it. - Never run
koh,git, orgradle(no build / assembleDebug / lintDebug / tests). Never runrm(usetrashif 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.mdtelling 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 incom.peachpasswords.ui.<area>. - Entry model
vault/VaultEntry.kt:typeisString?= "login"|"note"|"card" (null == login). Helpers:isLogin() isNote() isCard() isBreach() hasTOTP() hasPasskey() domainKey(). There is noEntryTypeenum — use the string + helpers. Card fields already present:cardholderName cardNumber expMonth expYear cvc cardNickname cardNetwork. Also present:additionalUrls: List<String>?,tags: List<String>?,passwordHistory: List<PasswordHistoryItem>?,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 callsColor(0xE0131109)),Bg. Runtime accent:val accent = LocalPeachAccent.current(import com.peachpasswords.ui.theme.LocalPeachAccent). Never hardcode hex. - Type
ui/theme/PeachType.kt(object): familiesDisplay(= 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 localTextStyle(fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontSize = 44.sp)etc. when no named style fits. Never useMaterialTheme.typography. - No
PeachFieldcomposable exists. For text inputs useBasicTextFieldwith the underline style inui/vault/EntryEditScreen.kt(privateField/PasswordFieldcomposables — read and mirror them). NoOutlinedTextField. - Background: screens use the
ShellBackgroundcomposable (seeImportScreen.kt,TrashScreen.kt,ExportScreen.ktfor the wrapper pattern). Check whether aRuneBackgroundexists (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 classPeachNav(val route: String)— add adata object/data class). Wired inui/PeachAppNavHost.ktviacomposable(PeachNav.X.route){ ... }, usingval nav: (PeachNav)->Unitandval back: ()->Unit. Do not edit these files — specify the exact additions in INTEGRATION.md. - DI/VM:
@HiltViewModel+hiltViewModel(); injectVaultRepository(vault/VaultRepository.kt) and@ApplicationContext Contextwhen needed (seeImportViewModel/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/<ITEM>/ 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.