Generic Constructor-Pattern agent kit for Claude Code. Zero personal data, fully English, MIT-licensed. Contents: - 34 reusable blocks (baseline, rules, stack/deploy/domain/api/scraper) - 14 cross-project agent manifests (code/ml/infra/researcher/critic/...) - 6 portable skills (/new-agent, /research, /test-gen, /debug-deep, /pr-review, /refactor) - Rust assembler (single binary, ~500 KB) - 3 hooks (auto-reassemble, pre-commit validate, no-hand-edit) - install.sh (idempotent, cargo-builds on first run) - MIT LICENSE All 6 sanity greps pass: 0 Russian text, 0 specific project names, 0 incident numbers, 0 user paths, 0 hardcoded IPs, 0 API keys. cargo check + assemble --validate: both pass on 14 manifests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
1.5 KiB
Markdown
30 lines
1.5 KiB
Markdown
# STACK — Flutter + Riverpod + Clean Architecture
|
|
|
|
Use for cross-platform mobile UI (iOS + Android from one codebase).
|
|
|
|
**State:** Riverpod (`flutter_riverpod` ≥ 2.x) — NOT Provider, NOT GetX, NOT Bloc by default. Narrow providers (one responsibility each), `autoDispose` unless state is genuinely session-wide.
|
|
|
|
**Layout — Feature-First + Clean Architecture:**
|
|
```
|
|
lib/
|
|
core/ shared utils, error handling, network, Result type
|
|
features/
|
|
<feature>/
|
|
data/ DTOs, repositories impl, API clients
|
|
domain/ entities, use cases, repository interfaces
|
|
presentation/widgets, screens, providers
|
|
```
|
|
`features/<A>` CANNOT import `features/<B>` directly — cross-feature goes through `core/` or a use case.
|
|
|
|
**Pre-commit gate (MANDATORY):**
|
|
```
|
|
flutter analyze # zero warnings
|
|
flutter test # all green
|
|
```
|
|
Both must pass. No commit without both. `pubspec.lock` is committed to git.
|
|
|
|
**Merge-base gotcha:** when merging multiple API timelines of different lengths (e.g. 15-day + 16-day feeds), use the LONGER timeline as base — otherwise day N+1 silently drops. Merge logic lives in exactly ONE use case (Single Source of Truth).
|
|
|
|
**Secrets:** `--dart-define=KEY=value` at build, or `.env` loaded at startup via `flutter_dotenv`. NEVER literal in `lib/`. `.env` in `.gitignore`.
|
|
|
|
**Forbidden:** Provider + Riverpod mixed, cross-feature imports, committing `build/` or `.env`, file > 200 LOC / function > 30 LOC, merge logic duplicated across screens.
|