Feature Development Workflow
Scope: long-form version of the 8-step feature-implementation workflow summarized in SKILL.md, with a worked example and explicit handling for projects that don't match a "default" modern-Android blueprint.
The workflow is the same regardless of the project's architecture or UI toolkit. What changes is what you find in step 1-2 — never substitute an assumed blueprint (Compose + MVVM + Hilt + Room) for what step 1-2 actually reveal.
The 8 steps
1. Inspect relevant project files
Read the files the request actually touches, and the files immediately around them: the containing module's other classes, its build.gradle(.kts), and at least one sibling feature if one exists. Don't start writing code from a mental template before you've read real code in this repo.
2. Understand existing conventions and architecture
Identify, from what you just read (not from assumption): the UI toolkit (Compose / XML Views / mixed), the architecture pattern if any (MVVM/MVI/MVP/none), the DI mechanism if any (Hilt/Koin/manual/none), the async primitives in use (coroutines/Flow, RxJava, callbacks), the testing conventions (test library, naming pattern, fixture/fake style), and the module boundary this feature belongs in.
3. Identify requirements and edge cases
From the request plus what step 1-2 revealed: what's the happy path, what are the explicit edge cases the user mentioned, and what implicit edge cases does this kind of change usually have (empty state, loading state, error/offline state, rotation/process death, empty list vs. populated list, permission-denied state if relevant). Don't invent requirements the user didn't ask for, but don't ignore edge cases a reasonable implementation of the stated request would need to handle.
4. Propose a minimal implementation plan
List the files you'll add/change and roughly what changes in each, scoped strictly to the request. If the request is ambiguous in a way that meaningfully changes the implementation (e.g. "add a search feature" — local-only filter vs. a new network endpoint), surface that ambiguity rather than guessing silently.
5. Implement only the requested scope
Match the existing conventions found in step 2 exactly — same state-modeling style, same layering depth, same DI pattern, same naming conventions. Don't refactor unrelated code, don't introduce a new library/pattern alongside an existing equivalent, don't add abstraction for a hypothetical future requirement.
6. Add tests matching existing conventions
Use whatever test library/style the project already uses (don't introduce a second testing framework). At minimum: unit tests for new business logic/state transformations, and — if the project has instrumented/Compose UI tests for comparable features — one for the new UI surface too. Cover the edge cases identified in step 3, not just the happy path.
7. Run the relevant validation commands
Actually run the build, the relevant test target, and lint/static analysis if configured — and report the real output. If you can't run something (no device/emulator available, sandboxed environment, etc.), say so explicitly rather than claiming it passed.
8. Report
State: which files changed and why, what you verified by actually running it vs. what's unverified, any risks or follow-ups the change surfaces (e.g. "this reuses an existing repository method that doesn't currently handle a 404 — out of scope here, but worth a follow-up"), and anything left undone relative to the original request.
Worked example
Request: "Add a retry button to the error state on the profile screen."
- Inspect: read the profile screen's composable/fragment, its ViewModel (or presenter), and its existing error-state handling if any.
- Understand: this project uses Compose + a
ViewModelexposingStateFlow<ProfileUiState>whereProfileUiStateis a sealed class withLoading/Success/Errorbranches; tests use JUnit4 + Turbine for Flow assertions. - Requirements/edge cases: retry should re-trigger the same load call that failed; a rapid double-tap on retry shouldn't fire two concurrent loads; the button should probably show a loading indicator while retrying rather than silently sitting there.
- Plan: add a
Retryaction to the ViewModel's existing action-handling entry point (matching how other actions are already wired, not inventing a new dispatch mechanism); reuse the existingloadProfile()private function; add aRetryButtoncomposable call inside the existingErrorbranch's composable. - Implement: wire it through matching the existing single-entry-point action pattern; guard against duplicate in-flight loads the same way the project's initial load already does (if it does — if it doesn't, that's worth flagging, not silently fixing as a scope-expanding "improvement" unless trivial and directly adjacent).
- Test: add a test asserting that dispatching
Retryfrom theErrorstate transitions throughLoadingtoSuccess/Erroragain, using the project's existing Turbine-based test pattern. - Validate: run the module's unit tests and the Compose UI test for the profile screen if one exists; run lint.
- Report: "Added
Retryaction + button; reused existingloadProfile(); added one ViewModel test. Did not add a UI test because this screen has no existing Compose UI test file to extend — flagging that as a gap, not adding a new test harness pattern unilaterally."
Edge cases: when the project doesn't match a "default" blueprint
- XML Views only, no Compose: step 2/5 should identify and reuse the existing
Fragment/Activity+ViewBindingpattern; don't introduceComposeViewinterop unless asked. Error/retry UI goes throughView.setOnClickListener/visibility toggling matching existing patterns, not a composable. - No dependency injection framework: constructor-inject manually or follow whatever manual wiring (a service locator, manual factory) the project already uses — don't introduce Hilt/Koin to solve a DI need in one feature while the rest of the app has none.
- Multi-module project: check which module the feature belongs in and what that module is allowed to depend on (
apivs.implementation, and any enforced module-visibility rules) before adding a new cross-module dependency; a feature module reaching directly into another feature's internals is usually a boundary violation even if it compiles. - Different architecture entirely (MVP, no formal pattern, legacy God-Activity): don't impose MVVM/UDF as a "fix" for an unrelated, small change — match the file's existing shape. If the existing pattern is actively making the requested change hard or risky, say so as a flagged observation in the report (step 8), not as a silent, unrequested refactor bundled into the change.
Sources
- Android app architecture guidance — developer.android.com (for what a "default" modern blueprint looks like, used only as a reference point for recognizing deviations, not a mandate).
- Workflow shape was cross-checked against the general structure of
arslan555/claude-android-feature-skill's router + step recipe (its documented token-usage model — router ~3.6K tokens, full generation ~25-32K tokens — directly informed this skill's own progressive-disclosure design) andrinkuniks/android-claude-skill's generation/audit split (structure/coverage referenced, no text copied — seedocs/SOURCE_MAPPING.md).