add-feature
Use when adding a new DevPulse KMP feature module, tab or top-level feature and wiring its build, DI and navigation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- add-feature
- description
- Use when adding a new DevPulse KMP feature module, tab or top-level feature and wiring its build, DI and navigation.
03 SKILL.md 正文
Add a feature
Read AGENTS.md, CONTEXT.md, settings.gradle.kts, Modules.kt and the current feature/settings build and DI entry points. Define the feature boundary, route, observable behavior and acceptance checks. Reuse installed dependencies and avoid unrelated module cleanup.
- Add a Modules.Feature constant in
buildSrc/src/main/kotlin/dev/shounakmulay/devpulse/buildsrc/constants/Modules.ktand include the module in settings.gradle.kts. - Use the current devpulse.kmp.library.compose convention plugin and inspect feature/settings/build.gradle.kts for target/source-set configuration. Enable only the host/device test targets actually needed; do not use assemble as a default verification task because it can invoke native/link tasks and tracked config generation.
- Use package and directory root
dev/shounakmulay/devpulse/feature/<name>. Add an annotated Koin module scanning that package and register it at the existing application composition root. - Follow
.agents/skills/add-screen/SKILL.mdfor initial screen/state/effect/event/ViewModel and typed navigation. Use current code, not legacy StateEffectViewModel templates. - Inspect current app-level entry-provider and tab registration before wiring the new feature. Add dependencies with Modules constants. Check tab selection/reselection, back behavior and restoration.
- Add behavioral tests where meaningful. The home module's empty event handler and example arithmetic tests are not production blueprints.
- Re-audit module dependencies, tasks and fingerprints in scripts/verification.json after changing build configuration. Follow
.agents/skills/verify-change/SKILL.md, runbash scripts/verify.sh --all --plan, then the relevant checks. Report native/device gaps honestly.
Complete only when build/DI/navigation registrations and user-visible behavior are verified to the stated scope. Do not add dependencies or disable checks merely to pass compilation.
Current app navigation ownership: DevPulseNavApp defines tabRoutes, DevPulseNavSuiteScaffold renders tab icons/reselection, and DevPulseNavDisplay composes feature entry providers. FeedFeatureEntries aggregates per-screen entries. Update the relevant owner instead of copying historical App.kt registration snippets. The current empty tab-icon contentDescription is not an accessibility blueprint.
For every new data operation, keep the error boundary in its use case: one-shot work returns Result<T>/Result<Unit> through the injected dispatcher-catching helper, and observation returns Flow<Result<T>> through flowCachingOnDefault. Repositories and all lower layers expose plain T/Unit/Flow<T>, propagate exceptions and never catch or wrap them. Handle the use-case Result in the screen/interactor; do not place technical exception recovery in a ViewModel. Follow implement-change for the exact helper names, injected dispatcher choice and nested-use-case rules.
04 同仓库更多 Skills
verify-change
Use when verifying DevPulse changes, choosing scoped Gradle checks, reviewing database or feed changes, or reporting platform verification gaps.
test-change
Use when adding or reviewing behavioral tests for DevPulse features, state/effects, use cases, network boundaries, paging, persistence or coroutine lifetimes.
plan-change
Use when planning a DevPulse feature, bug fix or refactor, clarifying ownership and edge cases, or deciding the implementation and acceptance checks.
navigation-3
Use when changing DevPulse Navigation3 routes, tab stacks, adaptive list/detail metadata or back behavior.
ktlint-fix
Use when explicitly asked to run the legacy ktlint workflow; first check whether formatting tasks actually exist.
implement-change
Use when implementing or refactoring existing DevPulse behavior across screens, state, use cases, repositories or shared utilities after establishing acceptance checks.