Skip to content

Engineering standards

These pages are the ConnectSoft engineering standards. They are written for engineers who write and review code in ConnectSoft repositories and in services generated from ConnectSoft templates, and for the AI agents that assist them.

Every rule has a stable ID such as CS-LOG-001. A code review finding cites the ID, so the author can follow the link to the reason, an example and the way to check it. The program behind these pages, the ID scheme and the page format are decided in ADR-0104. Convention and stack choices come from ADR-0105 and ADR-0106.

How a rule is written

Each rule uses the same shape, so that people can scan it and tools can extract it:

### CS-LOG-001: Log with message templates { #cs-log-001 }

**Severity:** major · **Applies to:** service, library · **Enforced by:** analyzer CA2254 (target: ENF-004) · **Status:** active

#### Why
#### Do
#### Don't
#### Example
#### How to check
Field Values
Severity blocker: must be fixed before merge, because it causes a defect, a security issue or data loss. major: should be fixed before merge. minor: fix when touching the code. nit: optional.
Applies to Repository families: service, library, api-client, blazor, template, docs, pipelines. Every API client is a library, so a rule that applies to library also applies to api-client.
Enforced by manual (code review), an analyzer rule ID, a test, or a pipeline gate. When the build does not enforce the rule yet, the field names the row in the findings register, for example manual (target: ENF-004).
Status active, proposed or retired. A retired rule keeps its ID and points to its replacement.

Every rule has the Why, Do, Don't and How to check sections. Example is left out only when the rule has no code or file shape to show. A statement that cannot be checked is written as guidance text on the page, not as a rule.

A defect pattern (ID CS-DP-<AREA>-NNN) uses the same heading and metadata line, with the sections Symptom, Cause, Check, Test and Related rules.

How to apply the standards

  • New code follows every active rule.
  • Existing code is not rewritten only to follow a rule. When you change a file, bring the lines you touch into line with the standards.
  • Code review flags new or changed code that breaks a rule and cites the rule ID. Issues in untouched code are reported as pre-existing and do not block the change.
  • Exceptions are written next to the code with the rule ID and the reason, for example in a suppression justification or a code comment.

Sections

Section Pages Status
Process Development workflow, branching strategy, Git commit conventions, code review, Definition of Done, CI/CD, versioning and release, decision records Active
Code C# style and naming, file and type layout, XML documentation, async and concurrency, date and time, error handling, validation, object mapping, generated code Active
Service Domain service shape, logging, metrics, tracing, authorization, messaging and Orleans, persistence and migrations, API contracts, configuration and options Active
UI Blazor, micro-frontends, accessibility and RTL, responsive layout Active
Testing Testing standard, validator tests, end-to-end tests with Playwright, BDD with Reqnroll, test data and databases, architecture tests Active
Dependencies Dependency licensing, central package management Active
Documentation Documentation writing standard Active
Governance Security and compliance Active
Contributing Overview, templates, libraries, documentation Active
Repositories and templates AGENTS.md Planned
Defect patterns Overview, authorization, gateway, mapping and pipeline; Blazor UI, persistence, test quality, observability, messaging, build and dependencies, templates and documentation tooling are planned In progress

Company business policies (code ownership and IP, data residency, FinOps, support and SLA) are kept in the CompanyDocumentation site.

The rule index lists every rule ID with its title, severity and page.