Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(doctrine): separate origin from version labels [D3]

Corey Olson9113fd8ec286
diff --git a/src/doctrine.js b/src/doctrine.js
index c2d8ec48..1db0b275 100644
--- a/src/doctrine.js
+++ b/src/doctrine.js
@@ -11,8 +11,8 @@ export function standardDoctrine() {
const name = 'standard doctrine ' + STANDARD_VERSION;
return {
...parsed, name, exists: true, version: STANDARD_VERSION,
- sections: parsed.sections.map((section) => ({ ...section, origin: 'standard ' + STANDARD_VERSION })),
- rows: parsed.rows.map((row) => ({ ...row, origin: 'standard ' + STANDARD_VERSION, version: STANDARD_VERSION, reason: '', file: name })),
+ sections: parsed.sections.map((section) => ({ ...section, origin: 'standard' })),
+ rows: parsed.rows.map((row) => ({ ...row, origin: 'standard', version: STANDARD_VERSION, reason: '', file: name })),
};
}
@@ -66,6 +66,7 @@ export function doctrineText(doctrine) {
return doctrine.rows.map((row) => {
const state = row.status + (row.tier ? ', ' + row.tier : '');
const reason = row.reason && row.reason !== row.text ? ' Reason: ' + row.reason : '';
- return '- ' + row.id + ' (' + row.origin + ') [' + state + '] ' + row.text + reason;
+ const origin = row.origin === 'standard' ? 'standard ' + row.version : row.origin;
+ return '- ' + row.id + ' (' + origin + ') [' + state + '] ' + row.text + reason;
}).join('\n');
}
diff --git a/test/doctrine.test.js b/test/doctrine.test.js
index e6db7558..0b537748 100644
--- a/test/doctrine.test.js
+++ b/test/doctrine.test.js
@@ -31,7 +31,7 @@ test('standard version1 ships exactly the twelve RFC rules and is inherited with
assert.equal(merged.repoExists, false);
assert.deepEqual(merged.rows, standard.rows);
assert.deepEqual(lintSpec(merged), []);
- assert.ok(merged.rows.every((row) => row.origin === 'standard 1' && row.version === 1));
+ assert.ok(merged.rows.every((row) => row.origin === 'standard' && row.version === 1));
});
test('repo rules override and decline inherited rows with a reason, keeping source labels and legacy text [D2,D3,D4]', (t) => {