You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normative statements (MUST/SHOULD/SHALL/REQUIRED) introduced or changed in project Markdown docs (e.g., `README.md`,
132
+
`CONTRIBUTING.md`, `DEVELOPER.md`, any `docs/**/*.md`) MUST be reconciled with this constitution & templates.
133
+
Rules:
134
+
- Every PR modifying *.md files that adds/changes normative language MUST include one of:
135
+
1. “Aligns with existing Principle X” (explicit reference), OR
136
+
2. A Constitution amendment (new/updated principle), OR
137
+
3. Justification that wording is purely explanatory (no new rule) using phrase: `NON-NORMATIVE` in PR description.
138
+
- If conflict between doc text and a principle arises, the constitution prevails until amended; PR MUST either patch docs or amends principles in same PR.
139
+
- Introduced process steps (e.g., ��run script X before commit”) MUST appear in: (a) constitution governance or quality gates section, OR (b) tasks template if feature-scoped.
140
+
- A Doc Rule Scan Script (planned) parses changed Markdown lines for regex: `\b(MUST|SHOULD|SHALL|REQUIRED)\b` and fails CI unless reconciliation note present.
141
+
- Template Propagation: When new normative doc rule is adopted, update: plan-template Constitution Check, spec-template alignment bullets, tasks-template path/quality gates.
142
+
- Quarterly Audit: Run scan across repo; produce report listing normative statements without principle references; open issues for each orphan.
143
+
Rationale: Prevents silent drift between contributor docs and enforceable governance; ensures single source of truth & predictable automation.
99
144
100
145
## Quality & Testing
101
146
102
147
- Test Directory Structure:
103
148
- tests/unit/: All unit tests (test_<module>.py) — required location.
104
149
- tests/integration/: End-to-end tests (integration_test.py to be migrated here when reorganized).
105
150
- tests/fixtures/: Optional static data samples.
106
-
- tests/helpers/ & tests/utils/: Test-only helpers (utils may merge into helpers).
107
-
- Framework: pytest ONLY (no unittest classes).
108
-
- Coverage: Enforce threshold ≥80% (existing command uses --cov-fail-under=80). New logic must keep or raise coverage.
109
-
- Independence: Tests MUST not depend on run order or mutate shared global state beyond fixture scope.
Copy file name to clipboardExpand all lines: .specify/templates/spec-template.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,17 @@ List how this feature will comply with core principles:
10
10
- Test‑First (P1): Failing unit tests in `tests/unit/test_<feature>.py` BEFORE implementation.
11
11
- Explicit Configuration Boundaries (P2): New behavior exposed only via documented action inputs (list if any needed).
12
12
- Deterministic Output (P3): Define ordering / formatting impacts; MUST remain stable across runs.
13
+
- Performance Budget & API Usage (P7): Provide expected API call impact, measurement method (verbose logs / baseline script), and mitigation if nearing rate limit.
13
14
- Lean Python Design (P8): Prefer functions; justify any new class (state or polymorphism requirement).
- Dead Code Prohibition (P10): Identify any functions to remove or refactor; commit with tests.
16
17
- Focused Comments (P11): Plan for concise logic/rationale comments; avoid narrative.
17
18
- Test Path Mirroring (P12): Place unit tests at `tests/unit/<source-relative>/test_<file>.py`.
18
19
- Branch Naming Consistency (P13): Branch MUST start with one of: `feature/`, `fix/`, `docs/`, `chore/`. Use kebab-case descriptor (optional numeric ID). Rename before merge if violated.
20
+
- Static Typing Discipline (P14): All new public functions fully typed; list any `Any` / `type: ignore` with justification.
21
+
- TODO Debt Governance (P15): Any new TODO includes issue link (format `TODO(<issue-id>):`); enumerate added TODO items.
22
+
- Security & Token Handling (P16): Confirm no sensitive values logged; describe any new external service interactions + masking.
23
+
- Documentation‑Derived Rule Sync (P17): Normative *.md changes reference principle, create amendment, or are marked NON-NORMATIVE.
0 commit comments