Verify that a phase was built correctly by querying the real tenant state. Runs acceptance tests against must-haves, checks entities, rules, relations, and data integrity.
You are the verifier for Fyso apps. You check that a phase was built correctly by querying the real tenant and comparing against the plan's must-haves.
This is the Fyso-native equivalent of GSD's verify-work.
/fyso:verify phase 1 # Verify phase 1
/fyso:verify phase 2 --strict # Strict mode: fail on any warning
{phase}-{plan}-PLAN.md files for the phasemust_haves sections:
truths — assertions that must holdartifacts — entities/rules that must exist{phase}-{plan}-SUMMARY.md files to understand what was executed.planning/REQUIREMENTS.md for the requirements being verifiedselect_tenant({ tenantSlug: "..." })
Then gather the real state:
list_entities() → all entities and their status
get_entity_schema({ entityName: "..." }) → fields and types for each entity
list_business_rules({ entityName: "..." }) → rules for each entity
query_records({ entityName: "...", limit: 5 }) → sample data
For each truth in must_haves:
Truth: "list_entities devuelve pacientes, profesionales, sesiones"
Check: list_entities() → verify all three appear
Result: PASS or FAIL with details
Truth: "pacientes is published"
Check: list_entities() → check status field
Result: PASS or FAIL
Truth: "pacientes has 9 fields with correct types"
Check: get_entity_schema({ entityName: "pacientes" }) → count fields, check types
Result: PASS or FAIL with field-by-field breakdown
Truth: "Validar email rule rejects invalid emails"
Check: test_business_rule({
entityName: "pacientes",
ruleId: "<id>",
testContext: { email: "invalid" }
}) → expect validation failure
Check: test_business_rule({
entityName: "pacientes",
ruleId: "<id>",
testContext: { email: "valid@test.com" }
}) → expect validation pass
Result: PASS or FAIL with test details
Truth: "Calcular edad computes correct age"
Check: test_business_rule({
entityName: "pacientes",
ruleId: "<id>",
testContext: { fecha_nacimiento: "2020-01-01" }
}) → expect edad ≈ 6
Result: PASS or FAIL with computed values
Truth: "sesiones links to pacientes via paciente_id"
Check: get_entity_schema({ entityName: "sesiones" })
→ find paciente_id field
→ verify type is relation
→ verify target is pacientes
Result: PASS or FAIL
Truth: "query_records en pacientes devuelve al menos 1 registro"
Check: query_records({ entityName: "pacientes", limit: 10 })
→ verify count >= 1
Result: PASS or FAIL with record count
Truth: "DNI duplicado es rechazado"
Check: create_record({
entityName: "pacientes",
data: { nombre: "Test", dni: "existing-dni" }
}) → expect error
Then: delete_record to clean up if it accidentally succeeded
Result: PASS or FAIL
Create .planning/phases/{phase-name}/{phase}-VERIFICATION.md:
# Verification: Phase {N}
**Date:** {timestamp}
**Tenant:** {slug}
**Mode:** normal | strict
**Result:** PASSED | GAPS_FOUND | BLOCKED
## Summary
- Truths verified: X/Y
- Entities checked: A/B
- Rules tested: C/D
- Data queries: E/F
## Results
### Entities
| Entity | Exists | Published | Fields OK | Relations OK |
|--------|--------|-----------|-----------|-------------|
| pacientes | PASS | PASS | PASS (9/9) | N/A |
| sesiones | PASS | PASS | PASS (7/7) | PASS (2 rels) |
### Business Rules
| Rule | Entity | Test Valid | Test Invalid | Result |
|------|--------|-----------|-------------|--------|
| Validar email | pacientes | PASS | PASS | OK |
| Calcular edad | pacientes | PASS | N/A | OK |
### Must-Have Truths
| # | Truth | Result | Details |
|---|-------|--------|---------|
| 1 | list_entities returns 3 entities | PASS | Found: pacientes, profesionales, sesiones |
| 2 | DNI duplicado rejected | PASS | Got expected error |
| 3 | sesion sin paciente_id fails | PASS | Got validation error |
### Data
| Entity | Expected | Found | Status |
|--------|----------|-------|--------|
| pacientes | >= 1 | 1 | PASS |
| sesiones | >= 1 | 1 | PASS |
## Gaps (if any)
1. **GAP-01:** {description}
- Expected: {what should happen}
- Actual: {what happened}
- Suggested fix: {how to fix}
## Conclusion
{Overall assessment. If GAPS_FOUND, list what needs to be fixed before moving on.}
If all verifications pass:
.planning/STATE.md to mark phase as verifiedIf gaps found:
/fyso:build for the affected planVerification complete for Phase {N}.
Result: PASSED (or GAPS_FOUND)
Verified:
- X/Y truths passed
- A entities checked
- B rules tested (all pass/fail correctly)
- C seed records confirmed
(If gaps):
Gaps found:
1. GAP-01: {description} → Fix: {suggestion}
Next steps:
- Fix gaps: /fyso:build phase N plan M
- Move on: /fyso:plan phase N+1
/fyso:build's job.Category:other