feat(graceful-handoff)!: integrate with STATE.md continuity system (v3.0.0)
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
This commit is contained in:
parent
a6f3ad4e93
commit
2c4e5e425b
18 changed files with 694 additions and 1656 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// plugin-manifest.test.mjs — verify plugin.json schema for v2.1
|
||||
// plugin-manifest.test.mjs — verify plugin.json schema + CHANGELOG for v3.0.
|
||||
|
||||
import { test } from 'node:test';
|
||||
import { strict as assert } from 'node:assert';
|
||||
|
|
@ -10,17 +10,14 @@ 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 2.1.0', () => {
|
||||
test('plugin.json version is 3.0.0', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
assert.equal(m.version, '2.1.0');
|
||||
assert.equal(m.version, '3.0.0');
|
||||
});
|
||||
|
||||
test('CHANGELOG has [2.1.0] entry mentioning model-aware fix', () => {
|
||||
const c = readFileSync(CHANGELOG, 'utf-8');
|
||||
assert.match(c, /## \[2\.1\.0\]/);
|
||||
const match = c.match(/## \[2\.1\.0\][\s\S]*?(?=## \[2\.0\.0\]|$)/);
|
||||
assert.ok(match, '[2.1.0] section missing');
|
||||
assert.match(match[0], /modell-bevisst|model-aware|resolveContextSource/i);
|
||||
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)', () => {
|
||||
|
|
@ -28,27 +25,23 @@ test('plugin.json does NOT include auto_discover (not in documented schema)', ()
|
|||
assert.ok(!('auto_discover' in m), 'auto_discover field should be removed');
|
||||
});
|
||||
|
||||
test('plugin.json description mentions auto-trigger or context-threshold', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
assert.match(m.description, /auto-trigger|context-threshold/i);
|
||||
});
|
||||
|
||||
test('CHANGELOG has [2.0.0] entry', () => {
|
||||
test('CHANGELOG has [3.0.0] entry with BREAKING section mentioning STATE.md', () => {
|
||||
const c = readFileSync(CHANGELOG, 'utf-8');
|
||||
assert.match(c, /## \[2\.0\.0\]/);
|
||||
});
|
||||
|
||||
test('CHANGELOG [2.0.0] entry has BREAKING section', () => {
|
||||
const c = readFileSync(CHANGELOG, 'utf-8');
|
||||
// Get content from [2.0.0] until next ## or end
|
||||
const match = c.match(/## \[2\.0\.0\][\s\S]*?(?=## \[1\.0\.0\]|$)/);
|
||||
assert.ok(match, '[2.0.0] section missing');
|
||||
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('No source files reference version 1.0.0', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
// Manifest is the canonical source — check it doesn't accidentally still say 1.0.0
|
||||
const raw = readFileSync(MANIFEST, 'utf-8');
|
||||
assert.doesNotMatch(raw, /"version":\s*"1\.0\.0"/);
|
||||
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]\./);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue