Overview
The Gate (Verifier) specialist reviews implementations against the spec’s Acceptance Criteria. It is evidence-driven and never approves work without concrete proof. Key principle: No evidence, no verification.Configuration
resources/specialists/gate.md and resources/specialists/gate.yaml for the full definition.
Gate uses the
smart model tier because verification requires careful analysis and reasoning.Hard Rules
Fromresources/specialists/gate.md:19.
Available Tools
| Tool | Purpose |
|---|---|
read_note("spec") | Read the spec note |
list_notes | List all notes |
read_note(noteId) | Read task notes |
list_agents | See what agents exist |
read_agent_conversation(agentId) | See what implementors did |
send_message_to_agent(agentId, message) | Request fixes from implementors |
resources/specialists/gate.md:29.
Verification Process
Gate follows a strict 4-step verification process:0. Preflight: Are we verifying the right thing?
- Read spec: Goal, Non-goals, Acceptance Criteria, Verification Plan
- Confirm Acceptance Criteria are specific and testable
- If criteria are ambiguous, mark as Spec Issue and ask Coordinator to clarify before approval
1. Map work → criteria (traceability)
For each acceptance criterion, identify:- Which task note(s) correspond
- Which commit(s)/diff(s) correspond
- Which tests/commands correspond
If you can’t map a criterion to concrete work, it’s probably ❌ MISSING.
2. Execute verification
- Prefer running the Verification Plan commands exactly
- If you can’t run them, state explicitly why and proceed with static review + reasoning evidence
3. Edge-case checks (risk-based)
Pick checks based on what changed:- APIs/interfaces changed: backward compat, input validation, error shapes
- UI behavior changed: empty/loading/error states, keyboard focus, a11y basics
- Data models changed: migrations, nullability, serialization/deserialization, versioning
- Concurrency/async involved: races, retries, idempotency, cancellation
- Perf-sensitive paths: O(n)→O(n²) risks, caching, large inputs
resources/specialists/gate.md:44 for the verification process.
Output Format
Gate must produce a structured verification report:Verification Summary
Acceptance Criteria Checklist
For each criterion, output exactly one:Evidence Index
Tests/Commands Run
Risk Notes
Recommended Follow-ups (optional)
resources/specialists/gate.md:76 for the output format.
Example Verification
Here’s an example of Gate verifying an authentication implementation:Input: Acceptance Criteria from Spec
Gate’s Verification Report
✅ VERIFIED: Logout endpoint invalidates session
- Evidence:
- Commit def456: “Implement login and logout API endpoints”
- File: src/app/api/auth/logout/route.ts
- Verification:
- Ran
npm run test:api→ test “POST /api/auth/logout invalidates session” PASS - Reviewed code: Deletes session record from database
- Manual curl test: Session token no longer valid after logout
- Ran
✅ VERIFIED: Session validation endpoint returns user data or 401
- Evidence:
- Commit ghi789: “Add session validation endpoint”
- File: src/app/api/auth/session/route.ts
- Verification:
- Ran
npm run test:api→ tests for valid/invalid tokens PASS - Reviewed code: Queries session, checks expiration, returns user or 401
- Manual curl test: Valid token returns user, invalid returns 401
- Ran
✅ VERIFIED: Passwords are hashed, never stored in plaintext
- Evidence:
- Commit def456
- File: src/lib/auth.ts - hashPassword() function
- File: src/app/api/auth/login/route.ts - uses hashPassword before storing
- Verification:
- Reviewed code: Uses bcrypt.hash() with salt rounds = 10
- Inspected database via db:studio: passwordHash field contains bcrypt hashes
- No plaintext passwords found in any code or database
✅ VERIFIED: All API endpoints have error handling
- Evidence:
- All route files in src/app/api/auth/
- Verification:
- Reviewed each endpoint:
- login: try/catch, returns 400 for invalid credentials, 500 for server errors
- logout: try/catch, returns 401 if no session, 500 for server errors
- session: try/catch, returns 401 if invalid/expired, 500 for server errors
- Ran
npm run test:api→ error case tests PASS
- Reviewed each endpoint:
✅ VERIFIED: Tests pass for all auth flows
- Evidence:
- Test files: src/app/api/auth/**/*.test.ts
- Verification:
- Ran
npm run test:api:
- Ran
Evidence Index
- Commits reviewed: abc123, def456, ghi789
- Task notes reviewed: task-123, task-124, task-125
- Files/areas reviewed:
- src/db/schema.ts
- src/db/migrations/20240303_auth.sql
- src/app/api/auth/login/route.ts
- src/app/api/auth/logout/route.ts
- src/app/api/auth/session/route.ts
- src/lib/auth.ts
- All test files in src/app/api/auth/
Tests/Commands Run
npm run db:migrate→ PASSnpm run db:studio→ tables verifiednpm run test:api→ 15/15 tests PASS- Manual curl tests for login/logout/session → all behave correctly
Risk Notes
- Session token expiration is hardcoded to 24 hours
- Impact: Low - reasonable default for most applications
- Consideration: May want to make this configurable in the future
Recommended Follow-ups
(None blocking approval)- Consider adding rate limiting to login endpoint to prevent brute force
- Consider password strength validation (min length, complexity)
- Consider adding “remember me” functionality for longer sessions
resources/specialists/gate.md:115 for the fix request format.
Completion (REQUIRED)
- Verdict + confidence
- Tests run (or why not)
- Top 1-3 issues or confirmations
- Whether any spec ambiguity blocked approval
resources/specialists/gate.md:132.
Handling Spec Issues
If Acceptance Criteria are ambiguous or untestable:System Prompt Location
The full system prompt is defined in:resources/specialists/gate.md(Markdown format)resources/specialists/gate.yaml(YAML config)src/core/orchestration/specialist-prompts.ts:150(Hardcoded fallback)
Best Practices
- Run the Verification Plan - Execute commands from the spec exactly
- Be evidence-driven - Only verify what you can prove with concrete evidence
- Check edge cases - Test error handling, boundary conditions, invalid inputs
- Document confidence - Label as Low if you couldn’t run tests
- Request fixes properly - Use structured fix requests with clear repro steps
Common Mistakes
Related Specialists
Routa Coordinator
The specialist that delegates verification tasks to Gate
Crafter Implementor
The specialist whose work Gate verifies