diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md index a4670ff..1bbd268 100644 --- a/.specify/memory/constitution.md +++ b/.specify/memory/constitution.md @@ -1,50 +1,53 @@ -# [PROJECT_NAME] Constitution - + + +# Export Telegram Group Members Constitution ## Core Principles -### [PRINCIPLE_1_NAME] - -[PRINCIPLE_1_DESCRIPTION] - +### I. Code Clarity First +Every line of code must be immediately understandable by a Python developer familiar with the language. Functions should do one thing well with descriptive names. Complex logic must be broken down into smaller, self-documenting pieces. No clever tricks or obscure language features. -### [PRINCIPLE_2_NAME] - -[PRINCIPLE_2_DESCRIPTION] - +### II. Minimal Dependencies +Only use external libraries when absolutely necessary. Prefer built-in Python modules and simple solutions. Each dependency must justify its existence by solving a problem that would be more complex to implement directly. The project must remain easy to set up with minimal installation steps. -### [PRINCIPLE_3_NAME] - -[PRINCIPLE_3_DESCRIPTION] - +### III. Straightforward Control Flow +Code execution path must be obvious and linear. Avoid deep nesting, complex callbacks, or convoluted state machines. Use early returns and guard clauses to maintain readability. The main execution flow should be readable from top to bottom like a simple story. -### [PRINCIPLE_4_NAME] - -[PRINCIPLE_4_DESCRIPTION] - +### IV. Explicit Over Implicit +All configurations, constants, and behavior must be clearly visible in the code. No magic numbers, hidden defaults, or implicit conversions. Environment variables and configuration files must be documented with examples. Error conditions must be handled explicitly with clear messages. -### [PRINCIPLE_5_NAME] - -[PRINCIPLE_5_DESCRIPTION] - +### V. Human-Readable Output +Both code output and user interfaces prioritize human understanding. CSV exports use clear headers, log messages describe what's happening in plain language, error messages explain what went wrong and what to do next. Progress indicators show meaningful status updates. -## [SECTION_2_NAME] - +## Code Standards -[SECTION_2_CONTENT] - +**Maximum Function Length**: 30 lines +**Maximum Nesting Depth**: 3 levels +**Variable Names**: Full words, no abbreviations unless universally understood +**Comments**: Only explain "why", never "what" +**File Organization**: One clear purpose per file, logical grouping by functionality -## [SECTION_3_NAME] - +## Development Workflow -[SECTION_3_CONTENT] - +**Code Review**: All changes must be reviewed for clarity and simplicity +**Testing**: Write tests for complex logic, keep them simple and focused +**Documentation**: Update README with any configuration or usage changes +**Refactoring**: Regularly simplify complex areas, never add complexity ## Governance - -[GOVERNANCE_RULES] - +This constitution supersedes all other practices and guidelines. Amendments require updating this document with clear reasoning for changes. All code reviews must verify compliance with these principles. When in doubt, choose the simpler, more readable approach. -**Version**: [CONSTITUTION_VERSION] | **Ratified**: [RATIFICATION_DATE] | **Last Amended**: [LAST_AMENDED_DATE] - +**Version**: 1.0.0 | **Ratified**: 2025-12-06 | **Last Amended**: 2025-12-06 \ No newline at end of file diff --git a/.specify/templates/plan-template.md b/.specify/templates/plan-template.md index 6a8bfc6..9cc65d8 100644 --- a/.specify/templates/plan-template.md +++ b/.specify/templates/plan-template.md @@ -31,7 +31,11 @@ *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.* -[Gates determined based on constitution file] +- [ ] **Code Clarity**: Functions under 30 lines, nesting under 3 levels, descriptive names +- [ ] **Minimal Dependencies**: Only essential libraries, justify each dependency +- [ ] **Straightforward Flow**: Linear execution path, minimal nesting, early returns +- [ ] **Explicit Configuration**: No magic numbers, clear environment variables +- [ ] **Human-Readable Output**: Clear progress indicators, meaningful error messages ## Project Structure