Files
amare/openspec/changes/setup-foundation/specs/quality-gates/spec.md
Manoel Freitas 236a7d3ea9 feat: Fase 0 — Fundação (setup-foundation) (#1)
* docs(openspec): propose setup-foundation change

Add OpenSpec change for SPEC Phase 0 — Foundation with proposal,
design, capability specs, and implementation tasks. Populate
openspec/config.yaml with project context and artifact rules.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: bootstrap Laravel 13 foundation (Fase 0)

Implement OpenSpec change setup-foundation: Laravel 13 + Filament 5
admin panel, Livewire 4 public site shell, PostgreSQL via Compose,
design tokens, role-based auth, quality gates (Pint/Larastan/Pest),
FrankenPHP Dockerfile, and GitHub Actions CI with five blocking jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): use valid APP_KEY for encryption in tests

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 22:05:25 -03:00

1.7 KiB

ADDED Requirements

Requirement: Standardized Composer test scripts exist

The system SHALL expose Composer scripts equivalent to test:unit, test:feature, test:browser, test, and quality with the composition defined in SPEC §13.9.

Scenario: Developer runs full quality gate locally

  • WHEN a developer runs composer quality
  • THEN the command executes static analysis, audits, and the applicable test suites

Requirement: Architecture tests enforce domain boundaries

The system SHALL include Pest architecture tests that verify App\Domain uses strict types and does not depend on App\Filament or App\Livewire.

Scenario: Domain layer violates boundary

  • WHEN code in App\Domain imports from App\Filament or App\Livewire
  • THEN the architecture test suite MUST fail

Requirement: CI pipeline blocks merge on five jobs

The system SHALL run a CI pipeline with blocking jobs named static, unit, feature, browser, and container as defined in SPEC §14.1.

Scenario: Static analysis fails on pull request

  • WHEN a pull request introduces a Pint, PHPStan/Larastan, or Composer audit failure
  • THEN the static job MUST fail and block merge

Scenario: Feature tests use PostgreSQL

  • WHEN the feature CI job runs integration tests
  • THEN the job MUST use PostgreSQL and MUST NOT substitute SQLite

Requirement: Browser tests run against FrankenPHP-served application

The system SHALL execute browser tests using Pest Browser/Playwright against an application served by FrankenPHP in CI.

Scenario: Browser job validates served application

  • WHEN the browser CI job runs
  • THEN tests execute against the built application artifact or equivalent production-like image