Architecture Standards
Architecture Standards turn the Documents workspace into a reviewed source of
truth for engineering standards, Architecture Decision Records (ADRs), and
Requests for Change (RFCs). The module keeps the human-facing discussion and
the machine-readable enforcement contract together: teams write standards in
Markdown, add structured standard_item blocks where automation is needed, and
let Qarion generate reviewable artifacts for repositories and delivery
pipelines.
Use this module when you need to:
- Publish standards that should guide implementation and review.
- Record ADRs that explain significant architectural decisions.
- Run RFCs before changing a standard, architecture, or delivery practice.
- Generate or roll out configuration artifacts such as linter, pre-commit, CI/CD, or repository policy files.
- Track standards history, exceptions, and Git-backed diffs in one place.
Workspace Model
Each space has an Architecture Standards workspace with seeded sections for:
- Standards - current engineering, data, platform, and architecture rules.
- ADRs - accepted decisions and their context.
- RFCs - open or closed proposals that collect discussion before a decision.
Standards pages use the same authoring lifecycle as regular Documents pages: draft, comment, submit, review, publish, and revise. Published pages are the current source of truth. Draft pages remain visible as in-progress work until they are submitted and published.
Revision history is retained for every page. When generated artifacts, validation results, or exceptions point back to a standard, they include source page and revision metadata so reviewers can understand exactly which standard produced the output.
Standard Items
Standard items are the core automation unit. They are small YAML blocks embedded
inside a human-readable standards page. The surrounding Markdown should explain
the rationale, examples, and operating guidance. The standard_item block
captures the structured contract that Qarion can search, retrieve, validate, and
compile into artifacts.
kind: standard_item
id: python.ruff-tooling
title: Python projects use Ruff with Python 3.11 defaults
statement: Python code must use Ruff for formatting, linting, import sorting, and Python 3.11 compatibility.
severity: error
applies_to: ["python", "pyproject.toml"]
tags: ["python", "ruff", "formatting", "linting"]
rule:
type: pyproject.ruff
line_length: 88
indent_width: 4
target_version: py311
artifact_targets: ["ruff", "pyproject", "pre-commit"]
examples:
compliant:
- "tool.ruff.line-length = 88"
Standard Item Fields
| Field | Purpose |
|---|---|
kind | Must be standard_item. |
id | Stable item identifier, for example python.ruff-tooling. |
title | Short human-readable name. |
statement | The rule or expectation to apply. |
severity | info, warning, or error. Legacy labels such as high normalize to the closest supported severity. |
applies_to | Technologies, paths, file types, or components in scope. |
tags | Search and grouping labels. |
rule | Structured rule details used by validation or artifact generation. |
artifact_targets | Target artifact families such as ruff, eslint, pre-commit, github-actions, or helm. |
examples | Optional examples grouped by label. |
Keep IDs stable after publication. If a standard is replaced, publish a new revision or a new item and explain the migration path in the page.
Constraint Validation
Use standard_constraint blocks when a standard should validate a repository
configuration file. Validation currently supports pyproject.toml,
frontend/eslint.config.js, .pre-commit-config.yaml, and Makefile.
kind: standard_constraint
target: pyproject.toml
path: tool.ruff.line-length
operator: equals
value: 88
severity: error
description: Python formatting should use the repository Ruff line length.
Validation results include whether the check passed, the actual value, the expected value, whether the target file exists, and the source page revision that produced the constraint.
RFCs and Polls
RFCs are proposal documents. They do not approve a change by themselves. Once an RFC is accepted, the accepted change should be reflected in a published Standard or ADR.
For RFCs that require a vote, describe the voting rules directly in the RFC body before the poll. For example:
## Voting rules
- Voting window: 5 business days.
- Eligible voters: platform architecture team and service owners.
- Passing threshold: at least 60% approve and no unresolved security objection.
- Tie breaker: the architecture owner decides after recording rationale.
```poll
id: POLL_ID
```
Polls can be single-choice or multi-choice, can inherit page access, and can grant direct view, vote, or edit permissions to users and teams. Editors can close polls manually and inspect voter breakdowns when poll permissions allow it.
Diagrams
Architecture Standards pages support both Mermaid and editable Draw.io diagrams. Use Mermaid for lightweight diagrams that should stay close to the Markdown source:
Use Draw.io diagrams when the diagram needs richer visual editing. Attach or insert the Draw.io diagram from the document editor, then keep the surrounding text clear enough that reviewers can understand the decision without opening the diagram editor.
Standards Artifacts
Architecture Standards can generate configuration artifacts from published standards:
- Deterministic artifacts come from
standard_artifactblocks embedded in a standards page. - AI previews draft artifacts from
standard_itemblocks and page context. - Deterministic validation checks run before users apply AI proposals.
- Applied artifacts are stored as page attachments and can also be written to a managed standards artifact repository.
- Rollout preview and apply actions compare managed artifacts against selected repositories and can create provider merge requests.
Review generated artifacts before applying them, especially when they affect linting, pre-commit, CI/CD, repository policy, deployment, or security files.
Git and Repository Rollout
Qarion does not need to replace your operational Git provider. Existing GitHub, GitLab, Bitbucket, Azure DevOps, or other deployment repositories can remain the source for builds and releases.
Use the managed standards artifact repository as a governance and review surface:
- Generate or preview artifacts from a standards page.
- Review the proposed files and validation checks.
- Preview the managed repository diff.
- Roll out selected artifacts to target repositories.
- Review and merge provider merge requests when supported.
This keeps architecture governance linked to source standards while still working with the delivery process your engineering teams already use.
Exceptions
When a repository, component, path, or asset cannot comply with a standards item, file an exception from the standards inventory. Exceptions capture:
- Scope, such as paths, assets, or components.
- Reason and business justification.
- Optional expiry date.
- Review decision and reviewer notes.
- Source page and revision metadata.
Exception statuses are pending, approved, rejected, cancelled,
revoked, and expired. Active exceptions remain linked to the standard item
and are marked stale if the source standard revision changes.
Recommended Workflow
- Draft an RFC when the team needs discussion before changing architecture or delivery practice.
- Add diagrams, examples, and poll voting rules when they help reviewers decide.
- Publish an ADR when the decision is accepted.
- Update or create the Standard with one or more
standard_itemblocks. - Preview AI or deterministic artifacts from the standard.
- Review validation checks and save only the artifacts you want.
- Preview repository diffs and roll out through merge requests.
- File exceptions for scoped non-compliance and review them before expiry.
Related Documentation
- Documents and Wiki - Author, review, and publish pages
- Content Templates - Manage reusable page templates
- Global Search - Find published standards pages
- Comments & Discussions - Discuss standards changes in context
- Architecture Standards API - Developer endpoints for standards, exceptions, artifacts, and rollout