|
1 | | -# [PROJECT_NAME] Constitution |
2 | | -<!-- Example: Spec Constitution, TaskFlow Constitution, etc. --> |
| 1 | +# FieldWorks (FLEx) Constitution |
| 2 | +<!-- |
| 3 | +Sync Impact Report |
| 4 | +- Version change: n/a → 1.0.0 |
| 5 | +- Modified principles: n/a (initial adoption) |
| 6 | +- Added sections: Core Principles; Additional Constraints; Development Workflow & Quality Gates; Governance |
| 7 | +- Removed sections: none |
| 8 | +- Templates requiring updates: |
| 9 | + - ✅ .specify/templates/plan-template.md (Constitution Check gates aligned) |
| 10 | + - ✅ .specify/templates/spec-template.md (edge cases/reminders aligned) |
| 11 | + - ✅ .specify/templates/tasks-template.md (task guidance aligned) |
| 12 | + - ⚠ .specify/templates/commands/*.md (no command templates found in repo; none updated) |
| 13 | +- Deferred TODOs: |
| 14 | + - TODO(RATIFICATION_DATE): Original adoption date not known; update when confirmed. |
| 15 | +--> |
3 | 16 |
|
4 | 17 | ## Core Principles |
5 | 18 |
|
6 | | -### [PRINCIPLE_1_NAME] |
7 | | -<!-- Example: I. Library-First --> |
8 | | -[PRINCIPLE_1_DESCRIPTION] |
9 | | -<!-- Example: Every feature starts as a standalone library; Libraries must be self-contained, independently testable, documented; Clear purpose required - no organizational-only libraries --> |
| 19 | +### I. Data Integrity and Backward Compatibility |
| 20 | +FieldWorks MUST preserve user data across versions. All schema/data changes MUST include |
| 21 | +safe, tested migrations with rollback/backup guidance. Any change that risks data loss |
| 22 | +MUST be explicitly flagged, reviewed, and accompanied by a mitigation plan. |
10 | 23 |
|
11 | | -### [PRINCIPLE_2_NAME] |
12 | | -<!-- Example: II. CLI Interface --> |
13 | | -[PRINCIPLE_2_DESCRIPTION] |
14 | | -<!-- Example: Every library exposes functionality via CLI; Text in/out protocol: stdin/args → stdout, errors → stderr; Support JSON + human-readable formats --> |
| 24 | +### II. Test and Review Discipline (Non‑Negotiable) |
| 25 | +Changes that affect core data, text rendering/layout, installers, or public contracts |
| 26 | +MUST include automated tests (unit and/or integration) and pass code review. Red‑Green‑ |
| 27 | +Refactor is encouraged; PRs MUST state test coverage for risk areas and link to failing |
| 28 | +tests when fixing defects. |
15 | 29 |
|
16 | | -### [PRINCIPLE_3_NAME] |
17 | | -<!-- Example: III. Test-First (NON-NEGOTIABLE) --> |
18 | | -[PRINCIPLE_3_DESCRIPTION] |
19 | | -<!-- Example: TDD mandatory: Tests written → User approved → Tests fail → Then implement; Red-Green-Refactor cycle strictly enforced --> |
| 30 | +### III. Internationalization and Script Correctness |
| 31 | +The system MUST handle complex scripts and multilingual data correctly. Rendering and |
| 32 | +text processing MUST maintain correctness for non‑Latin scripts and use established |
| 33 | +libraries (e.g., ICU/Graphite) where applicable. Regressions in script handling are |
| 34 | +release‑blocking. |
20 | 35 |
|
21 | | -### [PRINCIPLE_4_NAME] |
22 | | -<!-- Example: IV. Integration Testing --> |
23 | | -[PRINCIPLE_4_DESCRIPTION] |
24 | | -<!-- Example: Focus areas requiring integration tests: New library contract tests, Contract changes, Inter-service communication, Shared schemas --> |
| 36 | +### IV. User‑Centered Stability and Performance |
| 37 | +Windows is the primary supported platform. Releases MUST prioritize stability, predictable |
| 38 | +workflows, and sensible performance on typical field hardware, including offline use. |
| 39 | +Feature flags or staged rollouts SHOULD be used for risky changes. |
25 | 40 |
|
26 | | -### [PRINCIPLE_5_NAME] |
27 | | -<!-- Example: V. Observability, VI. Versioning & Breaking Changes, VII. Simplicity --> |
28 | | -[PRINCIPLE_5_DESCRIPTION] |
29 | | -<!-- Example: Text I/O ensures debuggability; Structured logging required; Or: MAJOR.MINOR.BUILD format; Or: Start simple, YAGNI principles --> |
| 41 | +### V. Licensing and Open Collaboration |
| 42 | +The codebase is licensed under GNU LGPL 2.1 or later. All contributions MUST comply with |
| 43 | +license requirements and third‑party license obligations. Development occurs openly on |
| 44 | +GitHub following documented coding standards and review practices. |
30 | 45 |
|
31 | | -## [SECTION_2_NAME] |
32 | | -<!-- Example: Additional Constraints, Security Requirements, Performance Standards, etc. --> |
| 46 | +## Additional Constraints |
33 | 47 |
|
34 | | -[SECTION_2_CONTENT] |
35 | | -<!-- Example: Technology stack requirements, compliance standards, deployment policies, etc. --> |
| 48 | +- Platform scope: Currently only Windows builds are supported. Build and packaging guidance MUST be documented when platforms or toolchains change. |
| 49 | +- Data migrations: Every schema or model change MUST include a migration plan, backup expectations, and tested upgrade paths. |
| 50 | +- Accessibility and localization: New UI elements SHOULD be accessible and localizable; string resources MUST be externalized where feasible. |
36 | 51 |
|
37 | | -## [SECTION_3_NAME] |
38 | | -<!-- Example: Development Workflow, Review Process, Quality Gates, etc. --> |
| 52 | +## Development Workflow & Quality Gates |
39 | 53 |
|
40 | | -[SECTION_3_CONTENT] |
41 | | -<!-- Example: Code review requirements, testing gates, deployment approval process, etc. --> |
| 54 | +- All PRs MUST include: a brief risk assessment, test evidence (new/updated tests or |
| 55 | + rationale when tests are not applicable), and notes on data impact. |
| 56 | +- Changes affecting rendering, migrations, or installers MUST include integration tests |
| 57 | + or scripted validation steps. |
| 58 | +- “Constitution Check” gates in feature plans MUST confirm: data migration coverage, |
| 59 | + i18n/script correctness validation, test coverage for risk areas, and licensing |
| 60 | + compliance for new dependencies. |
42 | 61 |
|
43 | 62 | ## Governance |
44 | | -<!-- Example: Constitution supersedes all other practices; Amendments require documentation, approval, migration plan --> |
45 | 63 |
|
46 | | -[GOVERNANCE_RULES] |
47 | | -<!-- Example: All PRs/reviews must verify compliance; Complexity must be justified; Use [GUIDANCE_FILE] for runtime development guidance --> |
| 64 | +This Constitution guides FieldWorks development practices and supersedes conflicting |
| 65 | +guidance elsewhere. Amendments are proposed via GitHub pull request with: |
48 | 66 |
|
49 | | -**Version**: [CONSTITUTION_VERSION] | **Ratified**: [RATIFICATION_DATE] | **Last Amended**: [LAST_AMENDED_DATE] |
50 | | -<!-- Example: Version: 2.1.1 | Ratified: 2025-06-13 | Last Amended: 2025-07-16 --> |
| 67 | +1. A summary of the change and rationale. |
| 68 | +2. Version bump per semantic rules below. |
| 69 | +3. A migration/communication plan when altering principles or gates. |
| 70 | + |
| 71 | +Constitution Versioning: |
| 72 | +- MAJOR: Backward‑incompatible governance changes (e.g., remove/redefine principles). |
| 73 | +- MINOR: Add a new principle/section or materially expand guidance. |
| 74 | +- PATCH: Clarifications and non‑semantic refinements. |
| 75 | + |
| 76 | +Compliance Review: |
| 77 | +- Reviewers MUST verify “Constitution Check” gates are satisfied before approval. |
| 78 | +- CI SHOULD enforce lint/test gates and block if required evidence is missing. |
| 79 | + |
| 80 | +**Version**: 1.0.0 | **Ratified**: TODO(RATIFICATION_DATE) | **Last Amended**: 2025-10-28 |
0 commit comments