Section 4 · constitution.md
Consistency vs Flexibility
Balance organizational consistency with project-level flexibility — articulate clear guidelines your team and AI follow.
Organization (consistency)
Rules that apply across all projects — security, git workflow, naming standards.
- ·Never log PII
- ·All PRs require review
- ·Conventional commits
Project (flexibility)
Rules specific to this repo — stack choices, folder structure, commands.
- ·Next.js App Router
- ·npm run build to verify
- ·docs/ for course content
Governing rules
Project Constitution
Non-negotiable rules for implementation. Follow these on every task — Always Do, Ask First, Never Do.
Always Do
Follow naming
Use established naming conventions for variables, functions, files, and APIs.
Keep PRs small
Ship focused pull requests that are easy to review and map to a single task.
Ask First
Change schema
Discuss database or data-structure changes before implementing.
Refactor core modules
Get alignment before changing foundational or shared modules.
Never Do
Bypass auth checks
Never skip authentication or authorization — even in local or temporary code.
Log sensitive data
Never log passwords, tokens, PII, or secrets into system logs.
Apply the Constitution on every /implement run — Always Do by default, Ask First for high-impact changes, Never Do under any circumstance.
Three-Tier System
Safe defaults. AI proceeds without asking.
Significant changes. Human verification required before proceeding.
Hard bans. No exceptions — block immediately.
templates/constitution.md