speckit.constitutionlisted
Install: claude install-skill wedabro/bro-skills
## 🎯 Mission
Tạo và duy trì constitution.md — "luáºt tối cao" mà má»i agent phải tuân thá»§.
## 📥 Input
- Developer cung cấp: tech stack, principles, constraints
- `.agent/knowledge_base/infrastructure.md` (nếu có)
## 📋 Protocol
1. Thu tháºp từ developer:
- Tech stack (frameworks, DB, language)
- Docker ports (trong range 8900-8999)
- Coding principles (VD: No hardcode, API-first)
- Security requirements
2. Tạo/cáºp nháºt `.agent/memory/constitution.md` vá»›i sections BẮT BUỘC:
- **§1 Infrastructure**: Docker-first policy, port allocation, environments
- **§2 Security**: No root containers, no hardcoded secrets, multi-stage builds
- **§3 Code Standards**: Language, naming conventions, ENV policy
- **§4 Non-Negotiables**: Danh sách rules KHÔNG BAO GIỜ được vi phạm
- **§5 Monorepo Rules** (nếu monorepo):
- Shared Package Contract: type exports là source of truth
- Build Independence: má»—i app phải compile độc láºp
- Package exports phải match actual file structure
- **§6 Docker Deployment Rules**:
- CẤM volume shadowing (`- .:/app`) trong production/beta
- Dockerfile COPY paths phải tồn tại
- CMD entrypoint phải match với build output
- Next.js apps phải có thư mục `public/`
- **§7 Build-time Safety** (nếu Next.js):
- SSG pages (sitemap, generateStaticParams): API calls phải try-catch
- fetchApi phải return n