docs: prioritize agent-led Obelisk installation

Present the bootstrap SKILL.md as the recommended setup path, keep manual installation secondary, and add regression coverage for the documentation order.
This commit is contained in:
tommy0103
2026-07-16 20:16:55 +08:00
parent 90191e4604
commit 0d3797b55d
3 changed files with 49 additions and 7 deletions
+18
View File
@@ -24,6 +24,24 @@ test('root SKILL.md bootstraps the CLI before installing the official skill', ()
assert.doesNotMatch(source, /obelisk --query/);
});
test('README presents agent-led installation before manual npm setup', () => {
const source = readFileSync(join(repoRoot, 'README.md'), 'utf8');
const publishedSkillReadme = readFileSync(
join(repoRoot, 'packaging', 'skill-README.md'),
'utf8',
);
const agentInstall = source.indexOf('Let your agent install it (recommended)');
const manualInstall = source.indexOf('Install manually');
assert.ok(agentInstall >= 0);
assert.ok(manualInstall > agentInstall);
assert.match(source, /curl -fsSL .*\/SKILL\.md/);
assert.ok(
publishedSkillReadme.indexOf('Install with your agent (recommended)')
< publishedSkillReadme.indexOf('Install manually'),
);
});
test('install.sh installs and verifies only the CLI', () => {
const home = mkdtempSync(join(tmpdir(), 'obelisk-install-script-'));
const fakeBin = join(home, 'bin');