ContractSpec Codebase
**Mission**: ContractSpec is the deterministic, spec-first compiler that keeps AI-written software coherent, safe, and regenerable.
ContractSpec Codebase
Mission: ContractSpec is the deterministic, spec-first compiler that keeps AI-written software coherent, safe, and regenerable.
Quick Reference
| Concern | Rule File | Key Points |
|---|---|---|
| Contracts | contracts-first.md | Spec before implementation |
| Mission & Context | contractspec-mission.md | Why we exist, who we serve |
| Architecture | package-architecture.md | libs → bundles → apps |
| Code Quality | code-quality-practices.md | Testing, naming, standards |
| File Organization | code-splitting.md | Max 250 lines, domain grouping |
| Type Safety | type-safety-dependencies.md | No any, latest deps |
| Frontend | frontend.md | Atomic design, state handling |
| Backend | backend.md | Hexagonal, DDD |
| Design System | design-system-usage.md | No raw HTML |
| AI Governance | ai-agent.md | Traceability, composability |
| Documentation | docs.md | DocBlocks first |
Core Principles
- Spec-First: Contracts define behavior before implementation
- Multi-Surface Consistency: One spec → API, DB, UI, events
- Safe Regeneration: Code can be regenerated without breaking invariants
- Standard Tech: TypeScript, Zod, no magic abstractions
- Incremental Adoption: Stabilize one module at a time
Code Style (Enforced)
- Language: TypeScript (strict mode)
- Formatting: 2 spaces, semicolons, double quotes, trailing commas
- Types: Explicit, no
any, proper type guards - Files: Max 250 lines (components: 150, utilities: 100)
Before You Code
- Read relevant rules for your change type
- Check existing patterns in the codebase
- Plan with DocBlocks if adding new features
- Run
/ai-auditto verify decisions
AI Agent Guidelines
When working with AI assistants:
- Rules are applied contextually based on file type
- Conflicts resolved by: Security > Compliance > Safety > Quality > UX > Performance
- All decisions should be traceable and reversible
- Use
/ai-auditto verify governance compliance
Commands Available
/commit- Create conventional commit/test- Run tests with analysis/lint- Check and fix lint issues/fix- Auto-fix common issues/explain- Understand code/refactor- Guided refactoring/review-pr- Code review/ai-audit- Governance check
Getting Help
- Check the specific rule file for detailed guidance
- Use
/explain <concept>for architecture questions - Run
/ai-auditto verify your approach
Related Documents
GOOBY - Closing Store Marketplace
A marketplace platform for discovering and purchasing inventory from closing retail stores, focused on the NY, NJ, CT, and PA areas.
Lua Code Obfuscator/Deobfuscator
This is a full-stack web application that provides Lua code obfuscation and deobfuscation services specifically designed for Roblox scripts. The application features a professional Monaco code editor with dual-pane interface, comprehensive obfuscation settings, and file upload/download functionality. Built with a modern React frontend and Node.js/Express backend.
GREEN NODE - Project Overview
Full-stack recycling platform connecting waste generators with verified collectors in Cochabamba, Bolivia.
ADN Systems DMR Peer Server
ADN Systems DMR Peer Server is a fork of FreeDMR, implementing a Digital Mobile Radio (DMR) network server. Launched in April 2024 by international amateur radio enthusiasts, it operates on an Open Bridge Protocol (OBP) fostering a decentralized network architecture. The system handles DMR voice and data communication, acting as a conference bridge/reflector that routes traffic between connected systems (repeaters, hotspots, peers) based on configurable bridge rules.