Commit cb3ded1f authored by Jan Reimes's avatar Jan Reimes
Browse files

chore(state): update export state and version in constitution

* Updated last export commit and time in export state JSON.
* Bumped version to 1.1.0 in constitution and added new Python standards section.
* Refined templates for implementation plans, tasks, and specifications.
parent fe35c2f5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
{
  "worktree_root": "D:/SVN/Projects/Standardization/tdoc-crawler",
  "last_export_commit": "6f74ac8299d4f1c43a7dcc82d39f69e492d5d247",
  "last_export_time": "2026-02-05T02:48:04.4458383+01:00",
  "jsonl_hash": "4805f8d70b5bb2aac48610ca5837e4449c04a11d9434b6d14a85dabab0e0db15"
  "last_export_commit": "fe35c2f505f7241ab9c9d3b9d1727ca176cb342c",
  "last_export_time": "2026-02-05T13:07:50.0801094+01:00",
  "jsonl_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
 No newline at end of file
+22 −8
Original line number Diff line number Diff line
<!--
Sync Impact Report:
- Version change: unversioned -> 1.0.0
- Modified principles: Placeholder Principle 1 -> I. Library-First Development; Placeholder Principle 2 ->
  II. CLI Text + JSON Interface; Placeholder Principle 3 -> III. Test-Driven Development (Non-Negotiable)
- Added sections: Implementation Gates; Development Workflow
- Removed sections: Core Principles item 4; Core Principles item 5
- Version change: 1.0.0 -> 1.1.0
- Modified principles: None
- Added sections: Core Principles item IV
- Removed sections: None
- Templates requiring updates:
  - UPDATED: .specify/templates/plan-template.md
  - UPDATED: .specify/templates/spec-template.md
@@ -34,6 +33,19 @@ user, and explicitly approved. The approved tests must be executed and verified
(red phase) before any implementation begins. Development must follow the
red-green-refactor cycle for each change.

### IV. Python Standards and Tooling

Python development must use `pyproject.toml` with `uv` for dependency and environment
management and `uv run` for command execution. Code must be PEP 8 compliant, fully type
annotated, and keep Ruff and Ty checks clean without suppressions unless explicitly
approved. Use Google-style docstrings for public modules, classes, and functions.
Use the `logging` module instead of `print` for diagnostics, use `pathlib` for file
system paths, and prefer `dataclasses` for data entries with `__rich_console__` for
console rendering. CLI interfaces must use Typer; only `typer.echo` is used for
user-facing output.
Rationale: these standards keep Python code predictable, testable, and maintainable
across the toolchain.

## Implementation Gates

- Gate 1: A standalone library interface exists and is planned before any application
@@ -41,11 +53,13 @@ red-green-refactor cycle for each change.
- Gate 2: The library CLI contract includes text input/output and JSON output support.
- Gate 3: Unit tests are written, user-approved, and verified failing before
  implementation begins.
- Gate 4: Python standards (type hints, logging, uv/pyproject, Ruff, Ty, pathlib,
  dataclasses, Typer CLI) are explicitly planned and enforced.

## Development Workflow

- Feature specs and plans must document the library boundary, CLI I/O contract, and TDD
  evidence.
- Feature specs and plans must document the library boundary, CLI I/O contract, TDD
  evidence, and Python standards compliance.
- Code reviews and CI checks must verify the gates above; exceptions require a
  constitution amendment.

@@ -58,4 +72,4 @@ red-green-refactor cycle for each change.
- Compliance is verified in specs, plans, task lists, and code reviews; non-compliant
  changes must be blocked or accompanied by an approved amendment.

**Version**: 1.0.0 | **Ratified**: 2026-02-05 | **Last Amended**: 2026-02-05
**Version**: 1.1.0 | **Ratified**: 2026-02-05 | **Last Amended**: 2026-02-05
+9 −7
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
- [ ] Library-first boundary documented (standalone library + integration points).
- [ ] CLI contract defined (text input/output + JSON mode).
- [ ] TDD evidence planned (tests written/approved + red phase before implementation).
- [ ] Python standards planned (type hints, logging, uv/pyproject, Ruff, Ty, pathlib,
  dataclasses where appropriate, Typer CLI).

## Library Boundary & CLI Contract

+11 −7
Original line number Diff line number Diff line
@@ -95,11 +95,15 @@
  output, and MUST provide a JSON output mode for structured data.
- **FR-008**: Unit tests MUST be written, user-approved, and verified failing before
  implementation begins.
- **FR-009**: Python implementations MUST use `pyproject.toml` with `uv`, include type
  hints and Google-style docstrings for public code, use `logging` instead of `print`,
  rely on `pathlib` for file paths, and keep Ruff and Ty checks clean without
  suppressions unless explicitly approved.

*Example of marking unclear requirements:*

- **FR-009**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
- **FR-010**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
- **FR-010**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
- **FR-011**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]

### Key Entities *(include if feature involves data)*

+6 −5
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ exempted by the feature specification and approved in the constitution.

- [ ] T001 Create project structure per implementation plan
- [ ] T002 Initialize [language] project with [framework] dependencies
- [ ] T003 [P] Configure linting and formatting tools
- [ ] T003 [P] Configure linting, formatting, and type checking (Ruff, Ty)

---

@@ -153,6 +153,7 @@ Examples of foundational tasks (adjust based on your project):

- [ ] TXXX [P] Documentation updates in docs/
- [ ] TXXX Code cleanup and refactoring
- [ ] TXXX [P] Run Ruff and Ty, fix lint/type errors
- [ ] TXXX Performance optimization across all stories
- [ ] TXXX [P] Additional unit tests (if requested) in tests/unit/
- [ ] TXXX Security hardening