Current Task

INIT-007 — Router

Mandatory References (read before writing any code):

- AI.md (Sections 21–27 — operational rules)
- PROJECT.md
- WORKFLOW.md
- IMPLEMENTATION_ROADMAP.md
- Sprint 0 Execution Plan
- DBP
- ADR
- MIB — locate INIT-007 and read "Files Expected"
- TCS

Review the implementation of:

- INIT-001
- INIT-002
- INIT-005
- INIT-003
- INIT-004
- INIT-006

before making any changes.

Review the project memory:

.ai/memory/

to understand previous implementation decisions and architectural reasoning.

Requirements

Implement ONLY Task INIT-007.

Do NOT implement any part of INIT-008 or later tasks.

The Router implementation must follow the approved architecture and documentation exactly.

The Router must support only the capabilities defined in the MIB and Sprint 0 Execution Plan.

Do NOT introduce additional routing features.

Expected responsibilities include only those documented for INIT-007.

Rules

- Native PHP 7.4 only.
- Framework-agnostic implementation.
- PSR-4 compatible.
- Keep Router independent from Controllers.
- Keep Router independent from Middleware.
- Keep Router independent from Session.
- Keep Router independent from Database.
- No Dependency Injection container.
- No Reflection.
- No Attribute/Annotation routing.
- No Regex-heavy routing unless explicitly documented.
- No business logic.
- No authentication.
- No authorization.
- No request validation.

Create ONLY the files listed under INIT-007 "Files Expected".

If implementation requires files not listed in the documentation:

STOP.

Explain why.

Wait for approval.

If documentation conflicts are found:

STOP.

Explain the conflict.

Reference the conflicting documents.

Wait for approval.

Do NOT execute:

- git add
- git commit
- git push
- git tag
- git merge
- git checkout

Do NOT modify documentation.

Do NOT continue to INIT-008.

After implementation provide:

1. Implementation Summary
2. Files Created (verify against MIB)
3. Files Modified
4. Acceptance Criteria Verification
5. Definition of Done Checklist
6. Proposed Git Commit Message (do NOT execute)
7. Documentation Deviations (if any)

Implementation ends after INIT-007.

Wait for approval.