schema: spec-driven

context: |
  Tech stack: Flutter/Dart app for Android+iOS.
  Architecture: Provider/ChangeNotifier with Spanish domain folders: estado, modelos, pantallas, servicios, widgets.
  Testing: flutter_test via `flutter test`; Strict TDD enabled.
  Style: flutter_lints via analysis_options.yaml; use flutter analyze and dart format.
  Constraint: never run flutter build after changes.

strict_tdd: true

testing:
  strict_tdd: true
  detected: 2026-04-27
  test_runner:
    framework: flutter_test
    command: flutter test
  layers:
    unit:
      available: true
      tool: flutter_test
    integration:
      available: false
      tool: null
    e2e:
      available: false
      tool: null
  coverage:
    available: true
    command: flutter test --coverage
  quality_tools:
    linter:
      available: true
      command: flutter analyze
    type_checker:
      available: true
      command: flutter analyze
    formatter:
      available: true
      command: dart format .

rules:
  proposal:
    - Include rollback plan for risky changes
    - Identify affected modules/packages
  specs:
    - Use Given/When/Then format for scenarios
    - Use RFC 2119 keywords
  design:
    - Include architecture decisions with rationale
  tasks:
    - Group tasks by phase
    - Use hierarchical numbering
    - Keep tasks small enough to complete in one session
  apply:
    - Follow existing code patterns and conventions
    - Strict TDD Mode is active
    - Never run flutter build
  verify:
    - Run tests if possible
    - Compare implementation against every spec scenario
    - Never run flutter build
  archive:
    - Persist final state to Engram and openspec
