microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
feat/1873-devcontainer

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

scripts/linting/rules/adr-consistency-rules.json

76lines · modecode

1{
2 "rules": [
3 {
4 "id": "ADR-CONSISTENCY-001",
5 "severity": "error",
6 "scope": "cross-region",
7 "check": "affected-components-mirror",
8 "message": "Frontmatter 'affected_components' and body '## Affected Components' bullet list must be set-equal. Frontmatter-only: {frontmatter_only}. Body-only: {body_only}. Re-derive the body section from the frontmatter array.",
9 "description": "Asserts the frontmatter affected_components array and the body Affected Components H2 bullet list are set-equal."
10 },
11 {
12 "id": "ADR-CONSISTENCY-002",
13 "severity": "error",
14 "scope": "frontmatter",
15 "check": "success-criteria-source-resolves",
16 "message": "success_criteria[{index}].source '{source}' is path-shaped but does not resolve to an existing file relative to the repository root. Update the path or replace it with a non-path citation.",
17 "description": "Every success_criteria[].source that looks like a repo-relative path must resolve to an existing file."
18 },
19 {
20 "id": "ADR-CONSISTENCY-003",
21 "severity": "error",
22 "scope": "body",
23 "check": "state-placeholder-resolved",
24 "message": "Body contains unresolved session-state references. Found: {tokens}. Govern must substitute every '{{state.<path>}}' placeholder before write, and any 'autonomyTier: full|partial|manual' narrative claim must match the resolved state value.",
25 "description": "Forbids unresolved {{state.*}} placeholders and ambiguous autonomyTier narrative claims in the rendered ADR body."
26 },
27 {
28 "id": "ADR-CONSISTENCY-004",
29 "severity": "error",
30 "scope": "body",
31 "check": "peer-planner-names",
32 "message": "Description and Decision Drivers must reference canonical peer-planner names only (Security Planner, RAI Planner, SSSC Planner, ADR Planner). Found non-canonical labels: {labels}. BRD, PRD, and RPI are upstream artifacts or workflows, not peer planners.",
33 "description": "Restricts peer-planner labels to the canonical PEER_PLANNERS set and flags BRD/PRD/RPI when used as peer-planner names."
34 },
35 {
36 "id": "ADR-CONSISTENCY-005",
37 "severity": "error",
38 "scope": "body",
39 "check": "drivers-matrix-cardinality",
40 "message": "Decision Drivers and Decision Outcome matrix must have a 1:1 mapping. Drivers without a matrix row: {drivers_only}. Matrix rows without a driver bullet: {matrix_only}.",
41 "description": "Enforces that every Decision Driver bullet has exactly one corresponding row in the Decision Outcome matrix and vice versa."
42 },
43 {
44 "id": "ADR-CONSISTENCY-006",
45 "severity": "error",
46 "scope": "body",
47 "check": "risks-consequences-pairing",
48 "message": "Every 'Bad consequences' risk-shaped bullet must have a paired row in '## Risks and Mitigations'. Unpaired risks: {unpaired}.",
49 "description": "Asserts that risk-shaped Bad consequences bullets are mirrored as rows in the Risks and Mitigations table."
50 },
51 {
52 "id": "ADR-CONSISTENCY-007",
53 "severity": "warn",
54 "scope": "body",
55 "check": "numeric-claim-generalized",
56 "message": "Specific numeric claim '{claim}' in {section} is unverified. Generalize the figure (e.g. 'a focused pytest suite') or cite a source that pins the value.",
57 "description": "Flags unverified specific numeric claims in Confirmation, Consequences, and More Information so authors generalize or cite them. Version strings such as 'v7.0' or '-Version 7.0' are excluded to avoid false positives on tooling and runtime version references."
58 },
59 {
60 "id": "ADR-CONSISTENCY-008",
61 "severity": "error",
62 "scope": "frontmatter",
63 "check": "driver-trigger-map-complete",
64 "message": "Every Decision Driver must appear as a key in decisionMetadata.driverToTriggerMap. Missing keys: {missing}. Decide phase must reconcile drivers with ASR triggers before exit.",
65 "description": "Requires decisionMetadata.driverToTriggerMap to cover every Decision Driver so the driver-to-trigger axis stays reconciled."
66 },
67 {
68 "id": "ADR-CONSISTENCY-009",
69 "severity": "error",
70 "scope": "cross-region",
71 "check": "affected-components-cited",
72 "message": "Every affected_components entry must be cited at least once in '## Context' or '## More Information'. Uncited entries: {uncited}.",
73 "description": "Coverage check that every affected_components entry is referenced in Context or More Information body sections."
74 }
75 ]
76}
77