architecture-harness 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/cli/check.mjs +50 -1
- package/src/cli/registry-history.mjs +53 -0
- package/src/cli/registry-history.test.mjs +88 -0
- package/src/config.mjs +38 -0
- package/src/descriptions.mjs +4 -0
- package/src/eslint/index.mjs +6 -0
- package/src/eslint/preset.mjs +23 -8
- package/src/eslint/preset.test.mjs +62 -0
- package/src/eslint/rules/ime-safe-key.mjs +179 -0
- package/src/eslint/rules/no-sql-raw.mjs +30 -0
- package/src/eslint/rules/registry-literal.mjs +66 -0
- package/src/eslint/rules.test.mjs +151 -0
- package/src/gates/migration-numbers.mjs +33 -0
- package/src/gates/migration-numbers.test.mjs +35 -0
- package/src/gates/registry-literal.mjs +137 -0
- package/src/gates/registry-literal.test.mjs +68 -0
- package/src/gates/registry-readers.mjs +24 -0
- package/src/gates/registry-readers.test.mjs +35 -0
- package/src/gates/sql-identifiers.mjs +28 -9
- package/src/gates/sql-identifiers.test.mjs +27 -0
- package/src/gates/threshold-ratchet.mjs +46 -0
- package/src/gates/threshold-ratchet.test.mjs +60 -0
- package/templates/quality-thresholds.json +3 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { checkRegistryLiteral } from "./registry-literal.mjs";
|
|
4
|
+
|
|
5
|
+
const thresholds = {
|
|
6
|
+
coverage: { value: 70, unit: "percent", comparator: "min", match: ["coverage threshold", "coverage on new code"] },
|
|
7
|
+
filelength: { value: 500, unit: "lines", comparator: "max", match: ["max-lines", "file length"] },
|
|
8
|
+
holdpress: { value: 500, unit: "ms", comparator: "max" },
|
|
9
|
+
};
|
|
10
|
+
const libraries = { node: { label: "Node.js", version: "24" }, drizzle: { label: "Drizzle ORM", version: "0.44" } };
|
|
11
|
+
const registries = { thresholds, libraries, exempt: ["docs/decisions/**"] };
|
|
12
|
+
const check = (contents, file = "docs/architecture.md") => checkRegistryLiteral([{ path: file, contents }], registries);
|
|
13
|
+
const rules = (contents) => check(contents).map((problem) => problem.rule);
|
|
14
|
+
|
|
15
|
+
test("a threshold stated as a number beside its phrase fails", () => {
|
|
16
|
+
const problems = check("Intro.\n\nThe coverage threshold of 70% holds on every package.");
|
|
17
|
+
assert.equal(problems.length, 1);
|
|
18
|
+
assert.equal(problems[0].rule, "threshold-literal");
|
|
19
|
+
assert.equal(problems[0].path, "docs/architecture.md:3");
|
|
20
|
+
assert.match(problems[0].detail, /\{\{q:coverage\}\}/);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("the token passes", () => {
|
|
24
|
+
assert.deepEqual(check("The coverage threshold of {{q:coverage}} holds."), []);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("another number near the phrase passes", () => {
|
|
28
|
+
assert.deepEqual(check("The coverage threshold rose twice in 2024, across 3 packages and 1700 files."), []);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("the number before the phrase, in a table row, fails", () => {
|
|
32
|
+
assert.deepEqual(rules("| 70% | coverage on new code |"), ["threshold-literal"]);
|
|
33
|
+
assert.deepEqual(rules("70 percent coverage on new code"), ["threshold-literal"]);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("a phrase that holds a hyphen matches as a whole word", () => {
|
|
37
|
+
assert.deepEqual(rules("`max-lines` stops at 500 lines."), ["threshold-literal"]);
|
|
38
|
+
assert.deepEqual(check("`max-lines-per-function` stops at 500."), []);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test("the unit of another entry keeps the number quiet, and no unit reports it", () => {
|
|
42
|
+
assert.deepEqual(check("The file length check runs in 500 ms."), []);
|
|
43
|
+
assert.deepEqual(rules("The file length is 500."), ["threshold-literal"]);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("a number is whole: an id, a date or a decimal holding the digits passes", () => {
|
|
47
|
+
assert.deepEqual(check("The coverage threshold is in ADR-0070, dated 2026-07-70, at 0.70 weight."), []);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("the window is six words, and a paragraph ends it", () => {
|
|
51
|
+
assert.deepEqual(rules("The coverage threshold is one that we hold at\n70% here."), ["threshold-literal"]);
|
|
52
|
+
assert.deepEqual(check("The coverage threshold is one that we all hold firmly at 70%."), []);
|
|
53
|
+
assert.deepEqual(check("The coverage threshold.\n\n70% of the files."), []);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("a library label beside a version number fails, and its token passes", () => {
|
|
57
|
+
const problems = check("The api runs on Node.js 24 and\nDrizzle ORM 0.44.");
|
|
58
|
+
assert.deepEqual(problems.map((problem) => [problem.rule, problem.path]), [
|
|
59
|
+
["version-literal", "docs/architecture.md:1"],
|
|
60
|
+
["version-literal", "docs/architecture.md:2"],
|
|
61
|
+
]);
|
|
62
|
+
assert.match(problems[0].detail, /\{\{ver:node\}\}/);
|
|
63
|
+
assert.deepEqual(check("The api runs on Node.js {{v:node}} and {{ver:drizzle}}."), []);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("an exempt file passes", () => {
|
|
67
|
+
assert.deepEqual(check("The coverage threshold of 70% on Node.js 24.", "docs/decisions/0001-coverage.md"), []);
|
|
68
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// A registry entry's reader list stays true: each reader exists, and each one names the entry.
|
|
2
|
+
|
|
3
|
+
import { escape } from "../eslint/options.mjs";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @param {{key: string, readers: string[]}[]} entries registry entries, from readerEntries()
|
|
7
|
+
* @param {Map<string, string|null>} sources reader path to its text, null when the file is absent
|
|
8
|
+
*/
|
|
9
|
+
export function checkRegistryReaders(entries, sources) {
|
|
10
|
+
const problems = [];
|
|
11
|
+
for (const { key, readers } of entries) {
|
|
12
|
+
// The key as a string or as the accessor's property: "holdpress" and gates.holdpress both hold it.
|
|
13
|
+
const named = new RegExp(`\\b${escape(key)}\\b`);
|
|
14
|
+
for (const reader of readers) {
|
|
15
|
+
const source = sources.get(reader) ?? null;
|
|
16
|
+
if (source === null) {
|
|
17
|
+
problems.push({ path: reader, rule: "missing-reader", detail: `registry entry '${key}' names this reader, and the file does not exist` });
|
|
18
|
+
} else if (!named.test(source)) {
|
|
19
|
+
problems.push({ path: reader, rule: "silent-reader", detail: `registry entry '${key}' names this reader, and the file never names '${key}'` });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return problems;
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { checkRegistryReaders } from "./registry-readers.mjs";
|
|
4
|
+
|
|
5
|
+
const READER = "frontend/src/platform/gesture-thresholds.ts";
|
|
6
|
+
const entries = [{ key: "holdpress", names: ["HOLD_\\w*MS"], readers: [READER] }];
|
|
7
|
+
|
|
8
|
+
test("a reader that reads the entry through the registry accessor passes", () => {
|
|
9
|
+
const sources = new Map([[READER, "export const HOLD_PRESS_MS = registry.gates.holdpress.value;"]]);
|
|
10
|
+
assert.deepEqual(checkRegistryReaders(entries, sources), []);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test("a reader that names the entry key as a string passes", () => {
|
|
14
|
+
const sources = new Map([[READER, 'export const HOLD_PRESS_MS = threshold("holdpress");']]);
|
|
15
|
+
assert.deepEqual(checkRegistryReaders(entries, sources), []);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("a missing reader fails the gate", () => {
|
|
19
|
+
const problems = checkRegistryReaders(entries, new Map([[READER, null]]));
|
|
20
|
+
assert.equal(problems.length, 1);
|
|
21
|
+
assert.equal(problems[0].rule, "missing-reader");
|
|
22
|
+
assert.equal(problems[0].path, READER);
|
|
23
|
+
assert.match(problems[0].detail, /holdpress/);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test("a reader that never names the entry key fails the gate", () => {
|
|
27
|
+
const sources = new Map([[READER, "export const HOLD_PRESS_MS = registry.gates.holdpressure.value;"]]);
|
|
28
|
+
const problems = checkRegistryReaders(entries, sources);
|
|
29
|
+
assert.equal(problems.length, 1);
|
|
30
|
+
assert.equal(problems[0].rule, "silent-reader");
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("an entry with no readers has nothing to check", () => {
|
|
34
|
+
assert.deepEqual(checkRegistryReaders([{ key: "dragslop", names: ["\\w*_PX"], readers: [] }], new Map()), []);
|
|
35
|
+
});
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
const CONSTRAINT_OPENER = new Set(["primary", "unique", "check", "constraint", "foreign", "exclude", "like"]);
|
|
12
12
|
const COLUMN_LINE = /^([a-z_][a-z0-9_]*)\s+\S/;
|
|
13
13
|
const CREATE_TABLE = /create table (?:if not exists )?(\w+)\s*\(/g;
|
|
14
|
-
const
|
|
14
|
+
const ALTER_TABLE = /\balter table (?:if exists )?(?:only )?(\w+)\s/g;
|
|
15
|
+
const ADD_COLUMN = /\badd column (?:if not exists )?([a-z_][a-z0-9_]*)\s/g;
|
|
16
|
+
// A statement ends at a semicolon outside a quoted string. A missed one must not hand a column to
|
|
17
|
+
// the table before it, so the next statement's opening word ends the slice too.
|
|
18
|
+
const STATEMENT_END = /;|\b(?:alter|create)\s+table\b/g;
|
|
15
19
|
const INDEX_NAME = /\bindex\("([a-z_]+)"\)/g;
|
|
16
20
|
// Columns are matched by shape — every column in this schema is snake_case.
|
|
17
21
|
const SNAKE = /\b([a-z][a-z0-9]*_[a-z0-9_]+)\b/g;
|
|
@@ -83,18 +87,33 @@ export function declaredColumns(sources) {
|
|
|
83
87
|
tables.set(match[1], columns);
|
|
84
88
|
match = CREATE_TABLE.exec(sql);
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
let added = ADD_COLUMN.exec(sql);
|
|
88
|
-
while (added !== null) {
|
|
89
|
-
const columns = tables.get(added[1]) ?? new Set();
|
|
90
|
-
columns.add(added[2]);
|
|
91
|
-
tables.set(added[1], columns);
|
|
92
|
-
added = ADD_COLUMN.exec(sql);
|
|
93
|
-
}
|
|
90
|
+
addedColumns(tables, sql);
|
|
94
91
|
}
|
|
95
92
|
return tables;
|
|
96
93
|
}
|
|
97
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Quoted strings and line comments declare nothing, and a semicolon inside one ends nothing. One pass
|
|
97
|
+
* reads them in order, so an apostrophe inside a comment opens no string.
|
|
98
|
+
*/
|
|
99
|
+
const blanked = (sql) => sql.replace(/--[^\n]*|'(?:[^']|'')*'/g, (found) => (found.startsWith("--") ? "" : "''"));
|
|
100
|
+
|
|
101
|
+
/** Every `add column` of each `alter table` statement, a comma list included. */
|
|
102
|
+
function addedColumns(tables, sql) {
|
|
103
|
+
const plain = blanked(sql);
|
|
104
|
+
ALTER_TABLE.lastIndex = 0;
|
|
105
|
+
for (let alter = ALTER_TABLE.exec(plain); alter !== null; alter = ALTER_TABLE.exec(plain)) {
|
|
106
|
+
const rest = plain.slice(alter.index + alter[0].length);
|
|
107
|
+
STATEMENT_END.lastIndex = 0;
|
|
108
|
+
const end = STATEMENT_END.exec(rest);
|
|
109
|
+
const added = [...(end === null ? rest : rest.slice(0, end.index)).matchAll(ADD_COLUMN)];
|
|
110
|
+
if (added.length === 0) continue;
|
|
111
|
+
const columns = tables.get(alter[1]) ?? new Set();
|
|
112
|
+
for (const [, column] of added) columns.add(column);
|
|
113
|
+
tables.set(alter[1], columns);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
98
117
|
/**
|
|
99
118
|
* Quoted literals are stripped first: a rank name inside a statement is a value,
|
|
100
119
|
* not a column.
|
|
@@ -24,6 +24,33 @@ test("a later expand migration adds its column to the same table", () => {
|
|
|
24
24
|
|
|
25
25
|
const resource = (sql) => `const SQL = \`${sql}\`;`;
|
|
26
26
|
|
|
27
|
+
test("every column of a comma list of add column is declared, and each is checked", () => {
|
|
28
|
+
const expand = `alter table projects
|
|
29
|
+
add column archived_at timestamptz,
|
|
30
|
+
add column if not exists site_code2 text default 'a;b',
|
|
31
|
+
add column owner_id uuid;`;
|
|
32
|
+
const tables = declaredColumns([ddl, expand]);
|
|
33
|
+
assert.deepEqual(
|
|
34
|
+
["archived_at", "site_code2", "owner_id"].filter((column) => !tables.get("projects").has(column)),
|
|
35
|
+
[],
|
|
36
|
+
);
|
|
37
|
+
const agreeing = resource("select owner_id, site_code2 from projects where tenant_id = $1");
|
|
38
|
+
assert.deepEqual(checkSqlIdentifiers(tables, [{ path: "r.ts", source: agreeing }]), []);
|
|
39
|
+
const unknown = resource("select owner_id, owner_name from projects where tenant_id = $1");
|
|
40
|
+
const problems = checkSqlIdentifiers(tables, [{ path: "r.ts", source: unknown }]);
|
|
41
|
+
assert.equal(problems.length, 1);
|
|
42
|
+
assert.match(problems[0].detail, /'owner_name'/);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("an add column belongs to its own alter table, never to the one before it", () => {
|
|
46
|
+
const tables = declaredColumns([
|
|
47
|
+
ddl,
|
|
48
|
+
"alter table projects enable row level security\ncreate table sites (id uuid);\n-- a site's name\nalter table sites add column site_name text;",
|
|
49
|
+
]);
|
|
50
|
+
assert.equal(tables.get("projects").has("site_name"), false);
|
|
51
|
+
assert.ok(tables.get("sites").has("site_name"));
|
|
52
|
+
});
|
|
53
|
+
|
|
27
54
|
test("an agreeing slice has no finding", () => {
|
|
28
55
|
const tables = declaredColumns([ddl]);
|
|
29
56
|
const source = resource("select id, tenant_id, code from projects where tenant_id = $1");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// A threshold only tightens, unless a decision says why it loosens. Every brief says "never lower a
|
|
2
|
+
// threshold", and a rule a gate checks holds under pressure where a sentence does not.
|
|
3
|
+
|
|
4
|
+
import { escape } from "../eslint/options.mjs";
|
|
5
|
+
|
|
6
|
+
function loosened(comparator, was, now) {
|
|
7
|
+
if (comparator === "max") return now > was;
|
|
8
|
+
if (comparator === "min") return now < was;
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {object} before the registry's `gates` at the merge base
|
|
14
|
+
* @param {object} after the registry's `gates` now
|
|
15
|
+
* @param {{path: string, text: string}[]} adrs the ADR files the diff changes, with their text
|
|
16
|
+
* @param {{registry: string}} options the registry path, as a problem names it
|
|
17
|
+
*/
|
|
18
|
+
export function checkThresholdRatchet(before, after, adrs, { registry }) {
|
|
19
|
+
const problems = [];
|
|
20
|
+
const citedByAdr = (key) => {
|
|
21
|
+
const named = new RegExp(`\\b${escape(key)}\\b`);
|
|
22
|
+
return adrs.some((adr) => named.test(adr.text));
|
|
23
|
+
};
|
|
24
|
+
for (const [key, entry] of Object.entries(after)) {
|
|
25
|
+
const was = before[key];
|
|
26
|
+
// The comparator in force before the change is the policy the change answers to.
|
|
27
|
+
if (typeof was?.value !== "number" || typeof entry?.value !== "number") continue;
|
|
28
|
+
if (!loosened(was.comparator, was.value, entry.value)) continue;
|
|
29
|
+
if (citedByAdr(key)) continue;
|
|
30
|
+
problems.push({
|
|
31
|
+
path: registry,
|
|
32
|
+
rule: "loosened-threshold",
|
|
33
|
+
detail: `'${key}' moves from ${was.value} to ${entry.value}, and a ${was.comparator} that moves this way loosens; a changed ADR must name '${key}'`,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// Dropping a limit is the widest loosening of all, so it answers to the same rule.
|
|
37
|
+
for (const [key, was] of Object.entries(before)) {
|
|
38
|
+
if (key in after || typeof was?.value !== "number" || citedByAdr(key)) continue;
|
|
39
|
+
problems.push({
|
|
40
|
+
path: registry,
|
|
41
|
+
rule: "removed-threshold",
|
|
42
|
+
detail: `'${key}' (${was.comparator} ${was.value}) is removed; a changed ADR must name '${key}'`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return problems;
|
|
46
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { checkThresholdRatchet } from "./threshold-ratchet.mjs";
|
|
4
|
+
|
|
5
|
+
const REGISTRY = "quality-thresholds.json";
|
|
6
|
+
const base = {
|
|
7
|
+
filelength: { value: 500, comparator: "max" },
|
|
8
|
+
coverage: { value: 70, comparator: "min" },
|
|
9
|
+
};
|
|
10
|
+
const moved = (key, value) => ({ ...base, [key]: { ...base[key], value } });
|
|
11
|
+
const check = (after, adrs = []) => checkThresholdRatchet(base, after, adrs, { registry: REGISTRY });
|
|
12
|
+
|
|
13
|
+
test("a max that rises fails", () => {
|
|
14
|
+
const problems = check(moved("filelength", 550));
|
|
15
|
+
assert.equal(problems.length, 1);
|
|
16
|
+
assert.equal(problems[0].rule, "loosened-threshold");
|
|
17
|
+
assert.equal(problems[0].path, REGISTRY);
|
|
18
|
+
assert.match(problems[0].detail, /filelength.*500.*550/);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test("a min that falls fails", () => {
|
|
22
|
+
assert.equal(check(moved("coverage", 60))[0].rule, "loosened-threshold");
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("a changed ADR whose text names the key lets the loosening through", () => {
|
|
26
|
+
const adrs = [{ path: "docs/decisions/0031-longer-files.md", text: "We raise `filelength` to 550." }];
|
|
27
|
+
assert.deepEqual(check(moved("filelength", 550), adrs), []);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("an ADR that names another key does not", () => {
|
|
31
|
+
const adrs = [{ path: "docs/decisions/0031-coverage.md", text: "The coverage floor and filelengths stay." }];
|
|
32
|
+
assert.equal(check(moved("filelength", 550), adrs).length, 1);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("a tightening passes", () => {
|
|
36
|
+
assert.deepEqual(check({ ...moved("filelength", 450), coverage: { value: 80, comparator: "min" } }), []);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("a new entry passes", () => {
|
|
40
|
+
assert.deepEqual(check({ ...base, nesting: { value: 9, comparator: "max" } }), []);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("a removed entry fails, because dropping a limit is the widest loosening", () => {
|
|
44
|
+
const { coverage, ...rest } = base;
|
|
45
|
+
const problems = check(rest);
|
|
46
|
+
assert.equal(problems.length, 1);
|
|
47
|
+
assert.equal(problems[0].rule, "removed-threshold");
|
|
48
|
+
assert.match(problems[0].detail, /coverage/);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test("a removed entry passes when a changed ADR names it", () => {
|
|
52
|
+
const { coverage, ...rest } = base;
|
|
53
|
+
const adrs = [{ path: "docs/decisions/0032-coverage.md", text: "We retire `coverage` in favour of mutation score." }];
|
|
54
|
+
assert.deepEqual(check(rest, adrs), []);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("the comparator in force at the base judges the change", () => {
|
|
58
|
+
const after = { ...base, filelength: { value: 550, comparator: "min" } };
|
|
59
|
+
assert.equal(check(after).length, 1);
|
|
60
|
+
});
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"note": "The one home for a number a quality gate enforces. Docs carry a token, never a figure; every eslint config, the coverage config and CI import this file rather than restating it. Loosening a threshold is one edit here, visible in one diff.",
|
|
3
3
|
"updated": "replace with the date you adopted this",
|
|
4
4
|
"policy": {
|
|
5
|
-
"loosening": "Raising a limit or lowering coverage needs the same review as a spec change: the diff on this file is the record. A per-file override belongs in the config that needs it, with a comment naming why, never here.",
|
|
6
|
-
"match": "A threshold has no distinctive spelling the way a version number does, so each gate lists the phrases a page or a config would use when stating it.
|
|
5
|
+
"loosening": "Raising a limit or lowering coverage needs the same review as a spec change: the diff on this file is the record. The threshold-ratchet gate of `qc check` fails a max that rises or a min that falls against the merge base, unless a changed ADR names the entry key. A per-file override belongs in the config that needs it, with a comment naming why, never here.",
|
|
6
|
+
"match": "A threshold has no distinctive spelling the way a version number does, so each gate lists the phrases a page or a config would use when stating it. The registry-literal gate of `qc check` reports the entry's own number within six words of one of them, in any doc outside the ADR log. Add a phrase when a new wording appears; the phrases are the whole reason the literal check can exist.",
|
|
7
|
+
"readers": "An entry that code reads can carry `names`, regular expressions for the identifiers that would restate it, each matched against the whole identifier and case-insensitive, and `readers`, the paths that may hold its number. qc/registry-literal reports a matching literal anywhere else, and the registry-readers gate fails a reader that is missing or never names the entry.",
|
|
7
8
|
"notThresholds": "A performance budget is not a quality gate. Latency, memory and render budgets live in docs/performance.md, because they are measured per surface rather than enforced repository-wide."
|
|
8
9
|
},
|
|
9
10
|
"gates": {
|