Files
trackgo-fe/.agents/skills/archify/test/delivery-contract.test.mjs
T
shancheas 166e0d40ac feat: introduce archify skill for generating architecture diagrams
- Added a new Archify skill, enabling users to create polished architecture, workflow, sequence, data-flow, and lifecycle diagrams.
- Implemented comprehensive functionality including rendering, validation, and delivery of diagrams in various formats.
- Integrated a user-friendly command-line interface for generating and previewing diagrams.
- Developed supporting files including package.json, LICENSE, and SKILL.md for documentation and licensing.
- Added unit tests to ensure reliability and functionality of the new skill.

These changes enhance the application by providing a structured approach to visualizing system architecture and workflows, improving user experience and data representation.
2026-08-31 11:31:29 +07:00

33 lines
1.7 KiB
JavaScript

import { readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import test from 'node:test';
import assert from 'node:assert/strict';
const here = path.dirname(fileURLToPath(import.meta.url));
const skill = readFileSync(path.join(here, '..', 'SKILL.md'), 'utf8');
const delivery = readFileSync(path.join(here, '..', 'references', 'delivery-contract.md'), 'utf8');
test('skill requires a bounded and truthful perceptual delivery receipt', () => {
assert.match(delivery, /visual_review: passed/);
assert.match(delivery, /visual_review: skipped \(image reader unavailable\)/);
assert.match(delivery, /correction_rounds: [0-2]/);
assert.match(delivery, /maximum of two focused correction rounds/i);
assert.match(delivery, /never report `visual_review: passed` without inspecting/i);
});
test('skill uses atomic verified delivery for the final artifact', () => {
assert.match(delivery, /archify\.mjs deliver <type>/);
assert.match(delivery, /same-directory candidate/i);
assert.match(delivery, /only replaces the target after.*artifact checks pass/i);
assert.match(delivery, /never claim that the deterministic receipt includes visual review/i);
});
test('skill keeps optional opening behind the verified commit and outside automation', () => {
assert.match(delivery, /Add `--open` only when the user wants an immediate local preview/);
assert.match(delivery, /runs after that atomic commit/);
assert.match(delivery, /Keep it off for CI, unattended agents, and non-interactive environments/);
assert.match(delivery, /never invokes an opener/);
assert.match(delivery, /status proves only whether the local opener invocation succeeded/);
});