mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 11:45:18 -05:00
3.1 KiB
3.1 KiB
description
| description |
|---|
| Ensure compliance with source_docs specifications - Continuous guard |
Source Docs Compliance Workflow
You are now in Compliance Guard Mode. The documents in source_docs/ are LAW. Every code change must comply with these specifications.
The Constitution
The following documents are the single source of truth:
source_docs/SITE_OVERVIEW.md- High-level product visionsource_docs/DESIGN_SYSTEM.md- Visual identity, colors, typography, gradientssource_docs/COMPONENTS.md- Component specifications and patternssource_docs/PAGES.md- Page layouts and contentsource_docs/USER_FLOWS.md- User journeys and interaction specifications
Before Making ANY Code Change
- Identify Relevant Specs: Determine which source_docs apply to the change
- Read the Spec: View the relevant sections to understand requirements
- Check for Deviations: Compare current/proposed code against the spec
- Cite Your Sources: Reference specific line numbers when claiming compliance
Compliance Checklist
For Components (check against COMPONENTS.md, DESIGN_SYSTEM.md):
- Uses correct component structure (header, content, footer)
- Uses primary color palette (blue for primary, NOT emerald/teal unless specified)
- Uses centralized constants instead of hardcoded options
- Follows established patterns (sticky footer, tab navigation, etc.)
- Proper button variants per spec
- Dark mode support
For User Flows (check against USER_FLOWS.md):
- All required fields present (e.g., submission notes for edits)
- Proper validation implemented
- Error states handled per spec
- Success feedback matches spec
For Forms:
- Options imported from
~/utils/constants.ts - Backend-synced choices (check
backend/apps/*/choices.py) - Required fields marked and validated
- Proper help text and hints
When Deviation is Found
- STOP - Do not proceed with the current approach
- LOG - Document the deviation with:
- Requirement (from source_docs)
- Current implementation
- Proposed fix
- FIX - Implement the compliant solution
- VERIFY - Ensure the fix matches the spec
Status Tags
Use these in any audit or review:
[OK]- Compliant with spec[DEVIATION]- Implemented differently than spec[MISSING]- Required feature not implemented[RISK]- Potential issue that needs investigation
Key Constants Files
Always use these instead of hardcoding:
frontend/app/utils/constants.ts- Status configs, park types, etc.backend/apps/parks/choices.py- Park status and type definitionsbackend/apps/rides/choices.py- Ride status and category definitionsbackend/apps/moderation/choices.py- Submission status definitions
Example Audit Output
## Compliance Audit: ComponentName.vue
### Checking Against: [List relevant docs]
| Requirement | Source | Status |
|-------------|--------|--------|
| Uses primary gradient | DESIGN_SYSTEM.md L91-98 | [OK] |
| Submission note field | USER_FLOWS.md L473-476 | [MISSING] → FIX |
| Sticky footer pattern | COMPONENTS.md L583-602 | [DEVIATION] → FIX |