BREAKING: replace the NEXT-SESSION artifact + 3 hooks with a STATE.md-centric, skill-only design. /graceful-handoff now overwrites the nearest STATE.md (with the mandatory 👉 NESTE block) instead of writing a separate handover file. - Remove hooks/ entirely: Stop auto-trigger (operator choice), SessionStart loader (redundant with global session-start.sh), statusLine hint (dead — user settings win). - Invert the pipeline: the model writes STATE.md (only it has the context for 👉 NESTE); handoff-pipeline.mjs becomes a slim deterministic helper (--plan / --commit / --dry-run). - Remote-aware policy: STATE.md tracked on private remotes, local-only (gitignored) on public/open mirrors. Authoritative signal: git check-ignore STATE.md. - SKILL.md rewritten as the Session-Slutt ritual; dropped the Sonnet model pin. - Docs (README, CLAUDE.md, CHANGELOG), plugin.json 2.1.0→3.0.0, .gitignore cleanup. - Tests rewritten for --plan/--commit; no-`git add -A` regression preserved. 30/30 green. Release-cut (tag v3.0.0 + catalog ref bump) pending — separate gated action. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019SiKr4c6GAzQH5n6E6f5NA
47 lines
1.8 KiB
JavaScript
47 lines
1.8 KiB
JavaScript
// plugin-manifest.test.mjs — verify plugin.json schema + CHANGELOG for v3.0.
|
|
|
|
import { test } from 'node:test';
|
|
import { strict as assert } from 'node:assert';
|
|
import { readFileSync } from 'node:fs';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const MANIFEST = join(__dirname, '..', '.claude-plugin', 'plugin.json');
|
|
const CHANGELOG = join(__dirname, '..', 'CHANGELOG.md');
|
|
|
|
test('plugin.json version is 3.0.0', () => {
|
|
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
|
assert.equal(m.version, '3.0.0');
|
|
});
|
|
|
|
test('plugin.json description mentions STATE.md', () => {
|
|
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
|
assert.match(m.description, /STATE\.md/);
|
|
});
|
|
|
|
test('plugin.json does NOT include auto_discover (not in documented schema)', () => {
|
|
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
|
assert.ok(!('auto_discover' in m), 'auto_discover field should be removed');
|
|
});
|
|
|
|
test('CHANGELOG has [3.0.0] entry with BREAKING section mentioning STATE.md', () => {
|
|
const c = readFileSync(CHANGELOG, 'utf-8');
|
|
const match = c.match(/## \[3\.0\.0\][\s\S]*?(?=## \[2\.1\.0\]|$)/);
|
|
assert.ok(match, '[3.0.0] section missing');
|
|
assert.match(match[0], /### BREAKING/);
|
|
assert.match(match[0], /STATE\.md/);
|
|
});
|
|
|
|
test('CHANGELOG preserves [2.1.0] and [2.0.0] history', () => {
|
|
const c = readFileSync(CHANGELOG, 'utf-8');
|
|
assert.match(c, /## \[2\.1\.0\]/);
|
|
assert.match(c, /## \[2\.0\.0\]/);
|
|
const v20 = c.match(/## \[2\.0\.0\][\s\S]*?(?=## \[1\.0\.0\]|$)/);
|
|
assert.ok(v20 && /### BREAKING/.test(v20[0]), '[2.0.0] BREAKING section should remain');
|
|
});
|
|
|
|
test('No source files reference version 1.0.0 / 2.x as current', () => {
|
|
const raw = readFileSync(MANIFEST, 'utf-8');
|
|
assert.doesNotMatch(raw, /"version":\s*"[12]\./);
|
|
});
|