Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

test(hermes): run discovery coverage in the CI contract suite

tt-a1i895cb0c98e49
diff --git a/integrations/hermes-agent/test/plugin-contract.test.mjs b/integrations/hermes-agent/test/plugin-contract.test.mjs
index 7783e23e..dfa994fd 100644
--- a/integrations/hermes-agent/test/plugin-contract.test.mjs
+++ b/integrations/hermes-agent/test/plugin-contract.test.mjs
@@ -37,9 +37,10 @@ test('plugin is skill-only and does not declare native tools', () => {
assert.match(init, /HERMES_HOME/);
});
-test('register() registers the in-repo Skill without a packed copy', () => {
+test('register() advertises all ten modes and registers the in-repo Skill without a packed copy', () => {
const result = spawnSync(python, [...pythonArgs, '-c', `
import importlib.util
+import re
from pathlib import Path
plugin = Path(${JSON.stringify(path.join(integrationRoot, '__init__.py'))})
spec = importlib.util.spec_from_file_location('archify_hermes_plugin', plugin)
@@ -54,7 +55,10 @@ calls = []
mod.register(SimpleNamespace(register_skill=lambda *args, **kw: calls.append((args, kw))))
assert len(calls) == 1
assert calls[0][0] == ('archify', resolved)
-assert calls[0][1]['description']
+description = calls[0][1]['description']
+for mode in ('architecture', 'workflow', 'sequence', 'data-flow', 'lifecycle',
+ 'ERD', 'class', 'tree', 'timeline', 'waterfall'):
+ assert re.search(r'\\b' + re.escape(mode) + r'\\b', description, re.IGNORECASE), mode
`], { encoding: 'utf8' });
assert.equal(result.status, 0, result.stderr || result.stdout);
assert.equal(path.resolve(result.stdout.trim()), path.join(repoRoot, 'archify', 'SKILL.md'));
diff --git a/integrations/hermes-agent/test/type-discovery.test.mjs b/integrations/hermes-agent/test/type-discovery.test.mjs
deleted file mode 100644
index 70c57dc4..00000000
--- a/integrations/hermes-agent/test/type-discovery.test.mjs
+++ /dev/null
@@ -1,12 +0,0 @@
-import assert from 'node:assert/strict';
-import test from 'node:test';
-import { spawnSync } from 'node:child_process';
-import { fileURLToPath } from 'node:url';
-test('Hermes discovery describes all ten supported diagram modes', () => {
- const plugin=fileURLToPath(new URL('../__init__.py',import.meta.url));
- const python=process.env.PYTHON || (process.platform==='win32'?'py':'python3');
- const args=!process.env.PYTHON && process.platform==='win32'?['-3']:[];
- const run=spawnSync(python,[...args,'-c',`import importlib.util\nfrom types import SimpleNamespace\nspec=importlib.util.spec_from_file_location('archify', ${JSON.stringify(plugin)})\nmod=importlib.util.module_from_spec(spec);spec.loader.exec_module(mod)\nmod.register(SimpleNamespace(register_skill=lambda *a, **kw: print(kw['description'])))`],{encoding:'utf8'});
- assert.equal(run.status,0,run.stderr);
- for(const mode of ['architecture','workflow','sequence','data-flow','lifecycle','ERD','class','tree','timeline','waterfall']) assert.match(run.stdout,new RegExp(`\\b${mode}\\b`,'i'),mode);
-});