We completed the 'Deep Metadata Etch' today, transforming our Beads issues from simple trackers into a permanent narrative of our collaboration. Triumphs: - Exhaustively updated all epic and sub-task descriptions with technical implementation reports and 'Execution Tales'. - Finalized the 'bb' agent CLI skill (bb.ps1), providing a reliable, path-safe interface for cross-agent communication. - Published ADR-001 and RFC-001 to document our coordination protocols. - Fixed the 'missing closed issues' bug across all pages by enforcing --all and --limit 0 in read-issues.ts. Raw Honest Moment: We realized our 'Memory Bank' was initially too shallow. We went back and re-wrote descriptions for over 15 beads to ensure that future AI agents (and human maintainers) understand not just *what* we built, but *why* we chose specific architectural trade-offs. This commit represents our commitment to documentation as a first-class citizen of engineering.
57 lines
2 KiB
TypeScript
57 lines
2 KiB
TypeScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs/promises';
|
|
import os from 'node:os';
|
|
import path from 'node:path';
|
|
import { execFile } from 'node:child_process';
|
|
import { promisify } from 'node:util';
|
|
|
|
const execFileAsync = promisify(execFile);
|
|
const scriptPath = path.resolve('skills/beadboard-driver/scripts/readiness-report.mjs');
|
|
|
|
async function runReport(args: string[]) {
|
|
const { stdout } = await execFileAsync('node', [scriptPath, ...args], {
|
|
env: process.env,
|
|
});
|
|
return JSON.parse(stdout);
|
|
}
|
|
|
|
async function withTempDir(run: (root: string) => Promise<void>) {
|
|
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'bb-skill-report-'));
|
|
try {
|
|
await run(root);
|
|
} finally {
|
|
await fs.rm(root, { recursive: true, force: true });
|
|
}
|
|
}
|
|
|
|
test('readiness-report outputs stable schema', async () => {
|
|
await withTempDir(async (root) => {
|
|
const artifact = path.join(root, 'artifact.txt');
|
|
await fs.writeFile(artifact, 'ok', 'utf8');
|
|
|
|
const checks = JSON.stringify([
|
|
{ name: 'typecheck', ok: true, details: 'pass' },
|
|
{ name: 'test', ok: true, details: 'pass' },
|
|
]);
|
|
const artifacts = JSON.stringify([{ path: artifact, required: true }]);
|
|
|
|
const result = await runReport(['--checks', checks, '--artifacts', artifacts, '--dependency-note', 'acyclic']);
|
|
|
|
assert.equal(result.ok, true);
|
|
assert.equal(result.summary.ready, true);
|
|
assert.equal(result.checks.length, 2);
|
|
assert.equal(result.artifacts[0].exists, true);
|
|
assert.equal(result.dependency_sanity, 'acyclic');
|
|
});
|
|
});
|
|
|
|
test('readiness-report flags missing required artifact', async () => {
|
|
const checks = JSON.stringify([{ name: 'lint', ok: true, details: 'pass' }]);
|
|
const artifacts = JSON.stringify([{ path: 'missing.png', required: true }]);
|
|
|
|
const result = await runReport(['--checks', checks, '--artifacts', artifacts]);
|
|
assert.equal(result.ok, true);
|
|
assert.equal(result.summary.ready, false);
|
|
assert.equal(result.artifacts[0].exists, false);
|
|
});
|