GEstimator

Project development rules

These rules apply to the whole repository. Start with the documentation index, then read the development workflow and current architecture before structural changes. The index routes database, backend, frontend, MCP, feature and testing work to their current contracts. Migration notes are historical context, not API rules. Changes under modern/ also follow its AGENTS.md.

Responsibilities and modularity

Data safety and behavior

Code comments

This repository follows the more explanatory comment style of FreeCAD-HVAC.

Formatting

Format files changed by the task; do not reformat unrelated files. Use UTF-8, spaces, LF newlines and a final newline, as set in .editorconfig.

Python

Use the checked-in pyproject.toml, matching FreeCAD-HVAC:

line-length = 120

[format]
skip-magic-trailing-comma = true

[lint]
select = ["E302", "E303", "I"]

[lint.isort]
split-on-trailing-comma = false

Run Ruff’s selected lint fixes and formatter on changed Python files, then check both. Preview is enabled for E302/E303. Use four-space indentation and keep imports grouped; do not compress compound statements onto one line. New or substantially rewritten error handlers catch expected exceptions; broad catches are reserved for rollback/cleanup or protocol boundaries and must re-raise or report the error. Never add bare except: handlers.

Rust

Use stable rustfmt with modern/src-tauri/rustfmt.toml: 120-column target, four spaces, edition 2021. Use normal blocks rather than compressed statements. Propagate recoverable errors with Result; avoid new unwrap/expect in request handling. Run cargo fmt, tests and Clippy for native changes. Document ownership, platform-specific workarounds and process/thread cleanup with short comments.

TypeScript, Vue, HTML, CSS and JSON

Use the pinned Prettier and modern/.prettierrc.json: 120-column target, two spaces, double quotes, semicolons and trailing commas where supported. Use the Vue/HTML parser’s whitespace rules; do not manually wrap meaningful inline text. Keep template markup readable, semantic and accessible. Use logical CSS properties and existing tokens; shared tokens belong in theme.css, shared styles in style.css, and isolated component styles may be scoped. Avoid appending duplicate selectors to override an earlier rule when that rule can be edited directly. Keep cascade order intact during CSS refactors.

Checks and audit follow-through

Documentation maintenance

Do not change these rules without explicit user instruction. An uncovered case is a reason to flag it, not to silently expand the rules.