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¶
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.