Current Task

CORE-004

Implement ONLY the task defined as CORE-004 in the Master Implementation Backlog v1.1.

This is the final implementation task of Sprint 1.

The Sprint 0 framework and Sprint 1 governance are frozen.

Follow all approved governance and execution methodology.

---

Mandatory Reading

Before making any code changes, review:

- AI.md v1.1
- AI_DEVELOPMENT_SYSTEM.md v1.0
- SPRINT1_EXECUTION_GUIDE.md
- MASTER_IMPLEMENTATION_BACKLOG_v1.1
- DBP_v1.1
- PROJECT.md
- WORKFLOW.md

Review prerequisite implementation memories:

- 20_core001.md
- 21_core002.md
- 22_core003.md

Review prerequisite implementation responses only if additional implementation detail is required.

---

Repository Review

Review the current repository.

Review every dependency required by CORE-004.

Verify:

- CORE-001 approved and committed.
- CORE-002 approved and committed.
- CORE-003 approved and committed.

Review all related Sprint 0 kernel components before implementation.

---

Scope

Implement ONLY CORE-004.

Create ONLY the files listed under CORE-004 "Files Expected".

Modify ONLY files explicitly required by CORE-004.

Do NOT implement Sprint 2 functionality.

Do NOT modify frozen Sprint 0 architecture.

Do NOT modify governance.

Do NOT redesign existing middleware, routing, session, or asset pipeline.

Maintain full backward compatibility with Sprint 0.

---

Rules

Follow:

- AI.md
- AI_DEVELOPMENT_SYSTEM.md
- SPRINT1_EXECUTION_GUIDE.md

"Files Expected" defines implementation scope.

If implementation requires additional files not listed in the documentation:

STOP.

Explain why.

Wait for approval.

If documentation conflicts are discovered:

STOP.

Reference the conflicting documents.

Wait for approval.

---

Quality Requirements

The implementation must:

- Preserve the Sprint 0 framework unchanged.
- Preserve all existing middleware behaviour unless explicitly required.
- Maintain PHP 7.4 compatibility.
- Remain PSR-4 compliant.
- Avoid business logic.
- Avoid authentication and authorization unless explicitly within CORE-004 scope.
- Avoid introducing technical debt.

---

Do NOT execute

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

---

Required Output

Provide only:

1. Implementation Summary

2. Files Created
(verify against Files Expected)

3. Files Modified

4. Acceptance Criteria Verification

5. Definition of Done Checklist

6. Proposed Git Commit Message
(do NOT execute)

7. Documentation Deviations

8. Dependency Verification

Confirm that:

- CORE-001 dependency remains satisfied.
- CORE-002 dependency remains satisfied.
- CORE-003 dependency remains satisfied.
- Sprint 0 framework remains frozen.
- Sprint 1 governance remains unchanged.

Implementation ends after CORE-004.

Do NOT begin Sprint 2.

Wait for Human Approver approval.