Files
msd-core/tests/phase6-capability-docs.test.cjs
Jakub Zych a9a7a328e6 refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD
across contents and paths, upstream package/repo coordinates -> @golem15/msd-core
and golem15com/msd-core. Deep links into upstream history, sibling upstream
packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is.

Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line,
package/plugin identity, regenerated lockfile, install-tree fixtures, derived
registries and benchmark baseline; migration checksum baseline re-locked
(MSD keeps its own install state, so no install had applied the old sums);
sort-order and regex-escaped expectations in tests adjusted.
2026-10-06 01:47:40 +02:00

57 lines
2.1 KiB
JavaScript

// allow-test-rule: source-text-is-the-product
'use strict';
const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const ROOT = path.join(__dirname, '..');
const MANUAL_PATH = path.join(ROOT, 'docs', 'how-to', 'develop-a-capability.md');
const DOCS_README_PATH = path.join(ROOT, 'docs', 'README.md');
function readManual() {
return fs.readFileSync(MANUAL_PATH, 'utf8');
}
describe('ADR-857 phase 6 capability documentation', () => {
test('Capability developer manual exists', () => {
assert.ok(fs.existsSync(MANUAL_PATH), 'docs/how-to/develop-a-capability.md must exist');
});
test('docs index links the Capability developer manual', () => {
const readme = fs.readFileSync(DOCS_README_PATH, 'utf8');
assert.match(readme, /how-to\/develop-a-capability\.md/);
});
test('manual uses ADR-857 terminology and names plugin as packaging only', () => {
const manual = readManual();
assert.match(manual, /Capability/);
assert.match(manual, /ADR-857/);
assert.match(manual, /plugin is a packaging or host-runtime term/i);
});
test('manual documents the MSD 1.5 capability development loop', () => {
const manual = readManual();
assert.match(manual, /MSD 1\.5/);
assert.match(manual, /capabilities\/<id>\/capability\.json/);
assert.match(manual, /node scripts\/gen-capability-registry\.cjs --write/);
assert.match(manual, /node scripts\/gen-capability-registry\.cjs --check/);
});
test('manual documents plan:pre hook fragments and render-hooks verification', () => {
const manual = readManual();
assert.match(manual, /plan:pre/);
assert.match(manual, /fragment\.path/);
assert.match(manual, /fragment\.inline/);
assert.match(manual, /msd-tools loop render-hooks plan:pre/);
});
test('manual documents phase 6 planning capability cutovers', () => {
const manual = readManual();
assert.match(manual, /research/);
assert.match(manual, /ai-integration/);
assert.match(manual, /pattern-mapper/);
});
});