feat(ms-ai-architect): R21 — Status-backfill på 14 advisor-ref-filer (redusert scope etter premiss-korreksjon) [skip-docs]
Manifest-drevet applier (scripts/kb-update/backfill-status.mjs) over den testede insertMetaField-primitiven + ny ren regel statusForFile (filnavn-token → Reference/ Established Practice, operatør-godkjent vokabular). 7 Reference + 7 Established Practice. Hard per-fil-invariant (én linje, body byte-identisk), idempotent, isMain-guard. 7 tester. Premiss-korreksjon (auditHeaders, ground-truth 2026-07-06): ekte not-due-restanse er 21 Status + 26 Last-updated (STATE sa 21/22). «0 har norsk dato» var falskt — 21/26 Last-updated-gap bærer allerede Sist oppdatert/Dato → relabel-residual; 5 datoløse gir «i dag» ved naiv git → utsatt. 4 dual-header ai-act-*-filer med plain-text «Status: GA» fanget i diff-inspeksjon → revertert (unngår duplikat/motsigelse) → residual (samme plain-blokk ga R20 duplikat Category). Korrigert residual logget i roadmap §R21. Verifisering: test-backfill-status 7/7; git diff +14/-0 (kun Status-linjer, body byte-identisk); not-due Status-missing 21→3; full suite 771/771 exit 0.
This commit is contained in:
parent
a583599ab1
commit
5a0e8d774a
17 changed files with 237 additions and 5 deletions
|
|
@ -119,15 +119,21 @@ Maskineriet er bygget (krav 1+2+3 + per-kategori-hint); målingen er aldri kjør
|
|||
|
||||
**Verifisering:** `grep -rLE '\*\*(Category|Kategori):\*\*' skills/*/references` → 0; git diff +25/−0 (én linje/fil, body byte-identisk); idempotent re-run = 0 planned; suite 764/764 exit 0.
|
||||
|
||||
## R21 — Base-felt pre-pass del 2: **Status:** + **Last updated:** på not-due-filer (1 økt — ungated, ⊥ R7)
|
||||
## R21 — Base-felt pre-pass del 2: **Status:** på not-due-filer (1 økt — ungated, ⊥ R7) ✅ 2026-07-06
|
||||
|
||||
**Mål:** lukk resten av base-felt-restansen på **not-due**-filene. Due-filenes Status/Last-updated FOLDES inn i R7 (Status er en faktapåstand judge-passet verifiserer mot live kilde; `**Verified:**`-stempelet er freshness-signalet) — backfilles ALDRI her.
|
||||
**Mål:** lukk den rent-verifiserbare delen av base-felt-restansen på **not-due**-filene. Due-filenes Status/Last-updated FOLDES inn i R7 (Status er en faktapåstand judge-passet verifiserer mot live kilde; `**Verified:**`-stempelet er freshness-signalet) — backfilles ALDRI her.
|
||||
|
||||
**Scope (ground-truth 2026-07-06):** ~21 not-due mangler `**Status:**`, ~22 not-due mangler engelsk `Last updated:` (alle 48 datoløse er template/metodikk/rubrikk-filer — 0 har norsk dato å relabele fra). **Verdikilder:** Status = beskrivende klasse for toolkit/metodikk (`Established Practice`/`Reference`), produkt-tilstand for plattform-filer; Last updated = **git-avledet** (siste innholds-commit på fila), ALDRI «i dag». Reuse `insertMetaField` + manifest-drevet applier med samme per-fil-invariant.
|
||||
**Premiss-korreksjon (ground-truth 2026-07-06, via `auditHeaders` på alle 389 splittet due/not-due):** STATE/roadmap-tallene var stale/feil. Faktisk: **43 mangler bold `**Status:**`** (22 due→R7, **21 not-due**) og **52 mangler engelsk `Last updated:`** (26 due→R7, **26 not-due** — ikke 48/22). To premisser i den opprinnelige planen var brutt: (1) «~22 not-due Last-updated» → faktisk 26; (2) «0 har norsk dato å relabele fra» → **falskt**: 21 av 26 not-due Last-updated-gap bærer allerede en norsk datolabel (`**Sist oppdatert:**`/`**Dato:** <dato>`), og de 5 «datoløse» gir «i dag» ved naiv git-siste-commit pga. R20-churn (bryter «ALDRI i dag»). Decision (a) er **moot**: 0 plattform-filer i not-due (alle sourced → due→R7). Norsk-label-residual (decision b) = **69 filer**, ikke 42.
|
||||
|
||||
**Åpne del-beslutninger:** (a) plattform-filenes Status er produkt-fakta — vurder om de heller skal vente på judge-verifisering som due-filene, ikke gjettes her; (b) 42 filer bruker norsk `**Kategori:**`/`Sist oppdatert:` — label-normalisering til engelsk er en egen residual (logg, ikke bland inn i R21).
|
||||
**Utført (operatør-godkjent redusert scope 2026-07-06):** kun **Status**-backfill, kun de **14** rent engelsk-dialekt advisor/architecture-filene. Ny testet ren regel `statusForFile()` (filnavn-token `template|matrix|benchmarks|register` → `Reference`, ellers `Established Practice`; operatør-godkjent vokabular) + manifest-drevet driver `scripts/kb-update/backfill-status.mjs` (frosset 14-fil-manifest re-avledet fra regelen, hard per-fil-invariant «nøyaktig én linje», idempotent skip-if-present, `isMain`-guard så test-import ikke kjører driveren, aborterer FØR skriving). Fordeling: **7** `Reference` + **7** `Established Practice`. Diff-inspeksjon FØR commit fanget at **4** governance/responsible-ai `ai-act-*`-filer bar en **plain-text `Status: GA`** i en dual-header-blokk (usynlig for bold-only-regexen) → bold-innsetting duplikerte/motsa den → **revertert**, flyttet til residual. 7 tester.
|
||||
|
||||
**Verifisering:** not-due uten Status/Last-updated → 0 (eller eksplisitt utsatt-liste m/begrunnelse); git diff kun header-innsettinger; body byte-identisk; suite exit 0.
|
||||
**Verifisering:** `test-backfill-status` 7/7; git diff +14/−0 (én `**Status:**`-linje/fil, 0 andre linjer, body byte-identisk); idempotent re-run = 0 written; not-due Status-missing 21→**3**; suite **771/771** exit 0.
|
||||
|
||||
**Korrigert residual → decision-(b) dialekt/dual-header-normaliseringspass (eget go, ⊥ R21):**
|
||||
- **26 not-due Last-updated** — 21 relabel (`Sist oppdatert`/`Dato` → `Last updated`, behold dato), 5 datoløse (git-avledet dato krever «innholds-commit»-heuristikk som ekskluderer R19/R20-metadata-pass).
|
||||
- **3 norsk-dialekt Status** — engelsk `**Status:**` ville blande dialekt; håndteres i samme dialekt-pass.
|
||||
- **4 dual-header `ai-act-*`-filer** — plain-blokk (`Last updated:`/`Status: GA`/`Category:` linje 6–8) vs bold-blokk. **NB:** samme plain-blokk er hvorfor **R20 la til duplikat `**Category:**`** her (bold `Category` linje 3 vs plain `Category` linje 8) — begge duplikatene lukkes i normaliseringspasset. Mønsteret er innkapslet til nøyaktig disse 4 filene korpus-vidt.
|
||||
- **69 norsk-label-filer** (`Kategori`/`Sist oppdatert`) — engelsk label-normalisering.
|
||||
|
||||
## Parkert (krever eget operatør-go)
|
||||
|
||||
|
|
|
|||
125
scripts/kb-update/backfill-status.mjs
Normal file
125
scripts/kb-update/backfill-status.mjs
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
#!/usr/bin/env node
|
||||
// Backfill **Status:** on the 14 English-dialect advisor reference files that carry NO
|
||||
// status label (R21 — base-field pre-pass del 2, ⊥ R7).
|
||||
//
|
||||
// Ground truth 2026-07-06 (premiss-verified): of the not-due (146) corpus, 21 files lack a
|
||||
// bold **Status:**. Of those, 3 are Norwegian-dialect (an English Status would mix dialects)
|
||||
// and 4 (ms-ai-governance/responsible-ai/ai-act-*) carry a PLAIN-TEXT `Status: GA` in a second
|
||||
// dual-header block that the bold-only regex does not see — inserting a bold **Status:** there
|
||||
// duplicates/contradicts it. All 7 (3 + 4) are DEFERRED to the decision-b dialect/dual-header
|
||||
// residual (the same plain block is why R20 duplicated **Category:** on those 4). The clean
|
||||
// remainder is 14 advisor/architecture files. All 26 not-due Last-updated gaps are also deferred
|
||||
// (21 already carry a Norwegian date → relabel; 5 are git-unreliable post-R20-churn). This
|
||||
// applier writes ONLY those 14 Status lines — never a date, never into a Norwegian/dual-header file.
|
||||
//
|
||||
// Value rule (operator-approved vocabulary, 2026-07-06): statusForFile() — a filename-token
|
||||
// map within {Reference, Established Practice}. Reuses the tested insertMetaField primitive,
|
||||
// with a hard per-file invariant asserted BEFORE any write (exactly one line inserted, it is
|
||||
// the Status line, body byte-identical). Idempotent: a file already carrying **Status:** is
|
||||
// skipped, so a re-run is a no-op. Aborts and writes nothing on any drift or invariant breach.
|
||||
//
|
||||
// Usage: node scripts/kb-update/backfill-status.mjs [--dry]
|
||||
import { readFileSync, writeFileSync, existsSync, realpathSync } from 'node:fs';
|
||||
import { join, dirname, basename } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { insertMetaField } from './lib/transform.mjs';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const PLUGIN_ROOT = join(__dirname, '..', '..');
|
||||
|
||||
export const ALLOWED_STATUS = ['Reference', 'Established Practice'];
|
||||
|
||||
// Status label is absent in the header region ⇒ the file needs backfilling. Mirrors
|
||||
// audit-corpus-headers.mjs RE_STATUS (the same guard the header audit reads).
|
||||
const RE_STATUS = /\*\*Status:\*\*\s*\S/i;
|
||||
|
||||
/**
|
||||
* Deterministic descriptive-class rule for a not-due reference file (pure).
|
||||
* Reusable artifacts (templates, lookup matrices, benchmark tables, registers) are a
|
||||
* `Reference`; methodology / patterns / checklists / obligation guides are `Established
|
||||
* Practice`. Keys on the BASENAME only, so an ancestor folder token never flips a file.
|
||||
* @param {string} relOrBase — plugin-relative path or bare basename
|
||||
* @returns {'Reference'|'Established Practice'}
|
||||
*/
|
||||
export function statusForFile(relOrBase) {
|
||||
const base = basename(String(relOrBase ?? ''));
|
||||
return /(?:template|matrix|benchmarks|register)/i.test(base) ? 'Reference' : 'Established Practice';
|
||||
}
|
||||
|
||||
// Frozen manifest — the 18 scope-confirmed targets (not-due ∩ missing-**Status:** ∩
|
||||
// English-dialect), verified against ground truth 2026-07-06. Each value is derived by
|
||||
// statusForFile() and re-asserted below, so the manifest can never drift from the rule.
|
||||
const TARGET_PATHS = [
|
||||
'skills/ms-ai-advisor/references/architecture/adr-template.md',
|
||||
'skills/ms-ai-advisor/references/architecture/ai-utredning-template.md',
|
||||
'skills/ms-ai-advisor/references/architecture/alternativanalyse-methodology.md',
|
||||
'skills/ms-ai-advisor/references/architecture/capacity-feasibility-benchmarks.md',
|
||||
'skills/ms-ai-advisor/references/architecture/cost-models.md',
|
||||
'skills/ms-ai-advisor/references/architecture/decision-trees.md',
|
||||
'skills/ms-ai-advisor/references/architecture/diagram-prompt-templates.md',
|
||||
'skills/ms-ai-advisor/references/architecture/licensing-matrix.md',
|
||||
'skills/ms-ai-advisor/references/architecture/migration-patterns.md',
|
||||
'skills/ms-ai-advisor/references/architecture/poc-template.md',
|
||||
'skills/ms-ai-advisor/references/architecture/public-sector-checklist.md',
|
||||
'skills/ms-ai-advisor/references/architecture/regional-availability-verification.md',
|
||||
'skills/ms-ai-advisor/references/architecture/security.md',
|
||||
'skills/ms-ai-advisor/references/architecture/source-traceability-assumption-register.md',
|
||||
];
|
||||
export const MANIFEST = TARGET_PATHS.map((path) => ({ path, status: statusForFile(path) }));
|
||||
|
||||
function run({ dry }) {
|
||||
const planned = [];
|
||||
const skipped = [];
|
||||
const missing = [];
|
||||
|
||||
for (const { path: rel, status } of MANIFEST) {
|
||||
if (!ALLOWED_STATUS.includes(status)) throw new Error(`ABORT ${rel}: status '${status}' not in allowed set`);
|
||||
if (status !== statusForFile(rel)) throw new Error(`ABORT ${rel}: manifest/rule mismatch`);
|
||||
const abs = join(PLUGIN_ROOT, rel);
|
||||
if (!existsSync(abs)) { missing.push(rel); continue; }
|
||||
const old = readFileSync(abs, 'utf8');
|
||||
if (RE_STATUS.test(old.slice(0, 500))) { skipped.push(rel); continue; } // idempotent
|
||||
|
||||
const out = insertMetaField(old, 'Status', status);
|
||||
// Hard invariant: exactly one line inserted (the Status line), body byte-identical.
|
||||
const o = old.split('\n');
|
||||
const n = out.split('\n');
|
||||
if (n.length !== o.length + 1) throw new Error(`ABORT ${rel}: not exactly one line inserted`);
|
||||
let d = 0;
|
||||
while (d < o.length && o[d] === n[d]) d++;
|
||||
if (n[d] !== `**Status:** ${status}`) throw new Error(`ABORT ${rel}: inserted line mismatch → ${JSON.stringify(n[d])}`);
|
||||
if (o.slice(d).join('\n') !== n.slice(d + 1).join('\n')) throw new Error(`ABORT ${rel}: body not byte-identical below the insertion`);
|
||||
planned.push({ rel, status, out });
|
||||
}
|
||||
|
||||
if (missing.length) {
|
||||
console.error(`ABORT — ${missing.length} manifest target(s) not found (corpus drift):`);
|
||||
missing.forEach((m) => console.error(' ' + m));
|
||||
process.exit(1);
|
||||
}
|
||||
if (planned.length + skipped.length !== MANIFEST.length) {
|
||||
throw new Error(`ABORT — accounted ${planned.length + skipped.length} ≠ manifest ${MANIFEST.length}`);
|
||||
}
|
||||
|
||||
const byStatus = {};
|
||||
for (const p of planned) byStatus[p.status] = (byStatus[p.status] || 0) + 1;
|
||||
console.log(`Manifest: ${MANIFEST.length} | to insert: ${planned.length} | already present (skipped): ${skipped.length}`);
|
||||
for (const [s, n] of Object.entries(byStatus).sort()) console.log(` ${n} Status: ${s}`);
|
||||
|
||||
if (dry) {
|
||||
console.log('\n(dry run — no writes)');
|
||||
for (const p of planned) console.log(` + ${p.rel} → **Status:** ${p.status}`);
|
||||
return;
|
||||
}
|
||||
for (const p of planned) writeFileSync(join(PLUGIN_ROOT, p.rel), p.out);
|
||||
console.log(`\nWrote ${planned.length} files.`);
|
||||
}
|
||||
|
||||
const isMain = (() => {
|
||||
try {
|
||||
return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
if (isMain) run({ dry: process.argv.includes('--dry') });
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
**Last updated:** 2026-06-24 (research via microsoft-learn MCP)
|
||||
**Format:** MADR (Markdown Any Decision Records) v3.0
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** Løsningsarkitekter, prosjektledere og beslutningstagere i norsk offentlig sektor
|
||||
**Format:** Strukturert utredningsmal basert på utredningsinstruksen, Digdirs arkitekturprinsipper, rammeverk for digital samhandling og EU AI Act
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** Arkitekter som gjennomfører AI-arkitekturutredninger for norsk offentlig sektor
|
||||
**Regulatorisk forankring:** Utredningsinstruksen (2016), DFOs veileder til utredningsinstruksen
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** Arkitekter og prosjektledere som vurderer gjennomførbarhet av AI-prosjekter i norsk offentlig sektor
|
||||
**Formål:** Gi konkrete benchmarks for kompetansevurdering, tidsplanvalidering, risikovurdering og MVP-avgrensning
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Disclaimer:** Prices change frequently. Always verify at azure.microsoft.com/pricing
|
||||
**Prissannhet:** Rå token-priser eies av `deterministic-cost-calculation-model.md` §1.1 — ikke dupliser tabeller her.
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# Decision Trees for Microsoft AI
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
Akkumulerte beslutningstrær og arkitekturmønstre for Microsoft AI-stakken.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** diagram-generation-agent
|
||||
**Format:** Prompt-maler for `mcp__mcp-image__generate_image` (Imagen 3 / Nano Banana Pro)
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
**Last updated:** 2026-06-24 (research via microsoft-learn MCP)
|
||||
**Disclaimer:** Licensing changes frequently. Verify at microsoft.com/licensing
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
**Last updated:** 2026-06-24 (research via microsoft-learn MCP)
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
**Last updated:** 2026-06-24 (research via microsoft-learn MCP)
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
**Last updated:** 2026-06-24 (research via microsoft-learn MCP + WebSearch)
|
||||
**Målgruppe:** Arkitekter som rådgiver norske offentlige virksomheter
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** Arkitekter som verifiserer Azure-tjenestetilgjengelighet for norsk offentlig sektor
|
||||
**Datakilde:** Microsoft Learn (MCP-verifisert 2026-06-24), Azure Products by Region
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
**Last updated:** 2026-06-24 | Verified: MCP 2026-06-24
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Established Practice
|
||||
|
||||
Omfattende guide til sikkerhet, compliance og governance for AI-løsninger i Microsoft-økosystemet.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**Målgruppe:** Arkitekter som utarbeider AI-arkitekturvurderinger og utredninger
|
||||
**Formål:** Sikre sporbarhet, transparens og etterprøvbarhet i arkitekturvurderinger
|
||||
**Category:** Solution Architecture & Advisory
|
||||
**Status:** Reference
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
87
tests/kb-update/test-backfill-status.test.mjs
Normal file
87
tests/kb-update/test-backfill-status.test.mjs
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
// tests/kb-update/test-backfill-status.test.mjs
|
||||
// TDD for R21 — Status backfill on the 18 English-dialect not-due reference files that
|
||||
// lack **Status:**. The applier (backfill-status.mjs) is a manifest-driven driver over the
|
||||
// already-tested insertMetaField primitive; the ONLY new production logic is the pure
|
||||
// deterministic value rule statusForFile() + the frozen MANIFEST. This suite pins both:
|
||||
// - statusForFile: filename token (template|matrix|benchmarks|register) → 'Reference',
|
||||
// else 'Established Practice'. Operator-approved vocabulary (2026-07-06), scope-confirmed
|
||||
// 18 files (ground truth: not-due ∩ missing-**Status:** ∩ English-dialect).
|
||||
// - MANIFEST self-consistency: 18 distinct entries, each value === statusForFile(path).
|
||||
// The 21 Last-updated-relabels + 5 unreliable-git + 3 Norwegian-dialect-Status are OUT of
|
||||
// R21 (corrected decision-b residual) and intentionally NOT in this manifest.
|
||||
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { statusForFile, MANIFEST, ALLOWED_STATUS } from '../../scripts/kb-update/backfill-status.mjs';
|
||||
|
||||
// The 14 scope-confirmed R21 targets (clean advisor/architecture). The 4 ms-ai-governance
|
||||
// ai-act-* files that matched the token rule are NOT here: they carry a plain-text `Status: GA`
|
||||
// in a dual-header block (bold-regex-invisible), so they are deferred to the decision-b residual.
|
||||
const REFERENCE = [
|
||||
'adr-template.md',
|
||||
'ai-utredning-template.md',
|
||||
'capacity-feasibility-benchmarks.md',
|
||||
'diagram-prompt-templates.md',
|
||||
'licensing-matrix.md',
|
||||
'poc-template.md',
|
||||
'source-traceability-assumption-register.md',
|
||||
];
|
||||
const ESTABLISHED = [
|
||||
'alternativanalyse-methodology.md',
|
||||
'cost-models.md',
|
||||
'decision-trees.md',
|
||||
'migration-patterns.md',
|
||||
'public-sector-checklist.md',
|
||||
'regional-availability-verification.md',
|
||||
'security.md',
|
||||
];
|
||||
|
||||
test('statusForFile: artifact-token filenames → Reference', () => {
|
||||
for (const b of REFERENCE) assert.equal(statusForFile(b), 'Reference', b);
|
||||
});
|
||||
|
||||
test('statusForFile: methodology/guidance/obligation filenames → Established Practice', () => {
|
||||
for (const b of ESTABLISHED) assert.equal(statusForFile(b), 'Established Practice', b);
|
||||
});
|
||||
|
||||
test('statusForFile: keys on basename only, not on ancestor folders', () => {
|
||||
// A folder named "templates" must not flip a guidance file to Reference.
|
||||
assert.equal(statusForFile('skills/x/references/templates/migration-patterns.md'), 'Established Practice');
|
||||
// Full plugin-relative path resolves to the same value as the bare basename.
|
||||
assert.equal(statusForFile('skills/ms-ai-advisor/references/architecture/poc-template.md'), 'Reference');
|
||||
});
|
||||
|
||||
test('statusForFile: always returns an allowed value', () => {
|
||||
for (const b of [...REFERENCE, ...ESTABLISHED, 'anything-else.md']) {
|
||||
assert.ok(ALLOWED_STATUS.includes(statusForFile(b)), b);
|
||||
}
|
||||
});
|
||||
|
||||
test('MANIFEST: exactly 14 distinct entries, each value === statusForFile(path)', () => {
|
||||
assert.equal(MANIFEST.length, 14);
|
||||
const paths = new Set(MANIFEST.map((m) => m.path));
|
||||
assert.equal(paths.size, 14, 'duplicate path in MANIFEST');
|
||||
for (const { path, status } of MANIFEST) {
|
||||
assert.ok(ALLOWED_STATUS.includes(status), `bad status for ${path}`);
|
||||
assert.equal(status, statusForFile(path), `manifest/rule mismatch for ${path}`);
|
||||
}
|
||||
});
|
||||
|
||||
test('MANIFEST: 7 Reference + 7 Established Practice (scope-confirmed split)', () => {
|
||||
const ref = MANIFEST.filter((m) => m.status === 'Reference').length;
|
||||
const est = MANIFEST.filter((m) => m.status === 'Established Practice').length;
|
||||
assert.equal(ref, 7);
|
||||
assert.equal(est, 7);
|
||||
});
|
||||
|
||||
test('MANIFEST: excludes the 4 dual-header ai-act-* files (decision-b residual)', () => {
|
||||
const deferred = [
|
||||
'ai-act-classification-methodology.md',
|
||||
'ai-act-deployer-obligations.md',
|
||||
'ai-act-fria-template.md',
|
||||
'ai-act-provider-obligations.md',
|
||||
];
|
||||
for (const d of deferred) {
|
||||
assert.ok(!MANIFEST.some((m) => m.path.endsWith(d)), `${d} must be deferred, not in MANIFEST`);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue