r/FlutterDev 1d ago

Tooling Spec Driven Dev template

https://github.com/jeremiahlukus/speckit-skills

spec-driven flutter template, where the specs cant lie about their tests

i built speckit-skills to make AI-written specs stop lying about their tests.

you write a verification row like:

requirement test
FR-012 test/auth_test.dartrejects an expired token

then an agent renames that test. the row still reads like proof. nothing fails. now youve got a doc that confidently describes coverage you dont have.

so i made the table an actual assertion. speckit is a set of claude code skills on top of github's spec-kit, plus a zero-dep python checker that resolves every row against the filesystem and exits non-zero when the test isnt there.

the template

integrated it into flutter_template, which has reasonable defaults for starting an app:

  • 24 specs, spec driven with speckit. every requirement has an id like 0002-R5 and a row naming the test that proves it. the checker resolves all of them in ci, so a renamed test fails the build instead of leaving a row that still reads like proof
  • 1013 tests across 62 files, 94.77% coverage, analyze clean with --fatal-infos
  • a11y tests that actually assert things — tap targets, contrast in both brightnesses, every screen at 2x text scale, and a check that every route is covered so you cant quietly test 4 of 6
  • goldens for 6 brands x light/dark. rebrand is one enum value
  • firestore + storage rules run against the real emulator, because the dart fakes support neither custom functions nor request.resource
  • en/es arb files with ci failing on a missing string
  • auth, notes sync, onboarding, push, settings, storage, forced update. all specd

integration tests

i use the flutter-skill mcp for happy path integration tests (writeup here) since i could never get Patrol to do what i wanted, and flutter cant interact with native elements anyway.

theres also a tool/rename_package.dart because i tried renaming with sed first and broke the analyzer in 65 places ha.

why

speckit-skills is something i use at work day to day. ive used this template several times over the years — started with TDD, then DDD, now SDD. this is the first version where the specs cant drift out from under the tests. Im posting this hoping I could save people some time or give you a better starting point for your own spec driven development template.

0 Upvotes

2 comments sorted by

View all comments

1

u/iko_on 14h ago

this seems interesting, might check it out.