Skip to content

ADR-0104: Engineering standards program

Field Value
Status Accepted
Date 2026-12-01
Deciders ConnectSoft Architecture Team (owner approval of 2026-12-01)
Supersedes -

Context

ConnectSoft engineering guidance is spread across four places that disagree with each other:

  1. ConnectSoft.Documentation has large pages, but several present outdated defaults (AutoMapper, MassTransit, Angular, .NET 8 and 9) and some contradict each other, for example on test naming and the coverage target.
  2. ConnectSoft.CompanyDocumentation holds the process standards (branching, workflow, testing, CI/CD, code ownership), which contradict the canonical pages.
  3. ConnectSoft.AI.AgentKit holds short standards for AI agents that are written by hand and drift from the documentation.
  4. Repository AGENTS.md files are copies of the BaseTemplate guide and have drifted from both the code and the documentation.

House rules that reviewers apply every day, and defect patterns learned from real incidents, exist in none of these places.

The build layer does not close the gap. The findings in the engineering standards findings register show that the shared .editorconfig is not parsed, several analyzers never load, and no pipeline fails on new warnings.

A code reviewer, human or AI, needs one set of rules that it can cite by ID.

Decision

1. One canonical source

  1. The engineering standards live in ConnectSoft.Documentation under Docs/engineering-standards/.
  2. The process standards move there from ConnectSoft.CompanyDocumentation. The original pages become short pointer pages.
  3. Every other copy is derived from the canonical pages and is never edited by hand. That covers the AgentKit standards, the review skills' checklists and the repository AGENTS.md blocks.

2. Rule IDs

  1. Every rule has a stable ID CS-<AREA>-NNN, for example CS-LOG-003. Every defect pattern has an ID CS-DP-<AREA>-NNN.
  2. The areas are:
Area Topic Area Topic
PRC Development process AUZ Authorization
GIT Branching and commits MSG Messaging
REV Code review ORL Orleans grains
DOD Definition of Done PER Persistence and migrations
NAM Naming API API contracts
STY Code style and file layout CFG Configuration and options
XML XML documentation UI Blazor UI
ASY Async and concurrency A11Y Accessibility, RTL, responsive layout
ERR Error handling TST Unit, integration and acceptance tests
VAL Validation E2E End-to-end tests
MAP Object mapping DEP Dependencies and licences
SVC Domain service shape TPL Templates and scaffolding
LOG Logging DOCS Documentation
MET Metrics SEC Security
TIM Date and time TRC Tracing
  1. IDs are never renumbered or reused. A retired rule keeps its ID with Status: retired and a pointer to its replacement.
  2. Each rule heading carries an explicit anchor equal to its lowercase ID, so links survive title changes.

3. Rule page template

A rule is written in this exact shape, so that a script can extract it:

### CS-LOG-003: Use source-generated logging in domain services { #cs-log-003 }

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

#### Why
#### Do
#### Don't
#### Example
#### How to check
  • Severity uses the code review scale: blocker, major, minor, nit.
  • Applies to lists repository families: service, library, api-client, blazor, template, docs, pipelines.
  • Enforced by names the mechanism: manual, an analyzer rule ID, a test or a pipeline gate. A rule that the build does not enforce names its findings-register row.
  • How to check is mandatory. A statement that cannot be checked is written as guidance text, not as a rule.

A defect pattern uses the same heading and metadata line, with the sections Symptom, Cause, Check, Test and Related rules.

4. Derived copies

  1. ConnectSoft.AI.AgentKit generates its standards from the canonical pages with a script. Each generated line carries the rule ID, the severity and a link to the source anchor. The script has a -Check mode that fails when the generated files differ from the source.
  2. Review skills cite rule IDs instead of restating rules. The AgentKit verification fails when a skill cites an ID that does not exist.
  3. Repository AGENTS.md files contain a generated block between markers, chosen by repository family, plus a hand-written repository section outside the markers.

5. Register, do not enforce

  1. The standards program changes documentation, agent guidance and AGENTS.md files only. It does not change .editorconfig files, analyzer references, build properties or pipeline gates.
  2. Enforcement defects are recorded in the findings register with target, actual state and evidence. A later enforcement phase picks them up after a separate decision.
  3. Turning on --strict for documentation builds is a documentation change, but it edits a shared pipeline step. It is approved separately and added as an opt-in parameter.

6. Content rules

  1. Standards are written in English.
  2. They contain no client names, client-specific identifiers, ticket numbers, dates of incidents or names of people. Examples use neutral domain types such as Order and Customer.
  3. Rules learned on a client project are generalized before they are added. Rules that only apply to one client stay in that client's repositories.

Alternatives considered

Option Outcome
Keep AgentKit as the source and publish it to the site Rejected. Engineers read the site; the agent copy must follow the human standard, not lead it.
Maintain human and agent rule sets separately Rejected. Two hand-maintained copies drift, which is the problem this record solves.
Fix the build layer in the same program Deferred. The fixes change warnings and gates across about 250 repositories and need their own decision. The findings register keeps them visible.
Copy .editorconfig and analyzer settings from BaseTemplate to every repository Deferred with the build layer.

Consequences

  • Reviewers and AI agents cite one ID for each finding, and a reader can follow the link to the reason and an example.
  • Pages in Docs/engineering-standards/ follow a strict format, checked by scripts/connectsoft-docs.ps1.
  • Some rules will say manual or name a findings-register row in Enforced by until the enforcement phase runs. The gap is visible rather than hidden.
  • CompanyDocumentation loses its engineering process pages and keeps pointers.
  • AgentKit standards and repository AGENTS.md blocks can no longer be edited by hand.