Files
geek-calc/.specify/memory/constitution.md
snowprint 54f427ea21
Some checks failed
Deploy to GitHub Pages / build-and-deploy (push) Has been cancelled
init geek calc
2025-10-04 10:53:41 +08:00

3.0 KiB

Geek Calculator Constitution

Core Principles

Maintainability

All code MUST be maintainable with clear, readable structure; Code MUST include documentation for complex algorithms; Refactoring MUST be performed when code complexity exceeds team standards.

Zero Dependencies

Application MUST be built with native HTML/CSS/JavaScript only; No external libraries or frameworks permitted; All functionality MUST be implemented with vanilla web technologies.

Performance

Total application resources MUST be under 50KB; All operations MUST complete within 100ms; Application MUST load and respond immediately without lag.

Testable Design

All functionality MUST be covered by automated tests; Tests MUST be written before implementation (TDD approach); All code paths MUST be verifiable through automated test suites.

Offline Capability

Application MUST function completely offline using service workers; All core calculator operations MUST be available without network connection; Data and state MUST persist across offline sessions.

Keyboard Accessibility

Full functionality MUST be accessible through keyboard controls only; All interactive elements MUST follow standard keyboard navigation patterns; Application MUST comply with WCAG accessibility standards.

Technical Constraints

Must use HTML5, CSS3, and ECMAScript 6+ standards; Must work in all modern browsers; Must be responsive across device sizes; Total bundle size MUST remain under 50KB; No external APIs or services allowed.

Review and Quality Process

Code reviews require verification of bundle size <50KB; All functionality must work offline during review; Accessibility must be verified with keyboard-only navigation; All new features require test coverage before merging.

Governance

All development MUST comply with constitutional principles; Changes to principles require new constitution version; Code reviews MUST verify constitutional compliance; All team members are responsible for upholding these principles.

Version: 2.0.0 | Ratified: 2025-01-01 | Last Amended: 2025-10-03