Initialize repository with harness code and assets
Initial import of all source code, config, and README assets: the packages workspace (cli, core, server, web, docs, landing, skills), build scripts, tooling config, and CI workflows. Includes the data-layout revision made on this branch: the local data root defaults to ~/.penguin/data (PENGUIN_HOME still overrides; the installer keeps its binaries in ~/.penguin), and every Agent lives under <project>/agents/<agent>/ — path helpers, the three agent-enumeration scans, the system prompt, built-in Skills, tests and docs all follow the new layout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ihk8iQuo3kv2aPjAYEPuR
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Docs ↔ skill-library sync: the Skills doc pages must mention every Skill that
|
||||
* actually ships in packages/skills (the library directory is the source of truth —
|
||||
* the same files loadLibrarySkills() reads). Derived, not hardcoded, so adding a
|
||||
* Skill without documenting it fails here instead of silently drifting.
|
||||
*/
|
||||
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const skillsRoot = join(__dirname, "..", "..", "skills", "skills");
|
||||
const contentDir = join(__dirname, "..", "content");
|
||||
|
||||
const librarySkills = readdirSync(skillsRoot, { withFileTypes: true })
|
||||
.filter((entry) => entry.isDirectory() && existsSync(join(skillsRoot, entry.name, "SKILL.md")))
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
|
||||
describe("docs ↔ skill library sync", () => {
|
||||
it("found the skill library", () => {
|
||||
expect(librarySkills.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
for (const lang of ["zh", "en"] as const) {
|
||||
it(`skills.${lang}.md mentions every library Skill`, () => {
|
||||
const page = readFileSync(join(contentDir, `skills.${lang}.md`), "utf8");
|
||||
const missing = librarySkills.filter((name) => !page.includes(`\`${name}\``));
|
||||
expect(missing, `undocumented skills in skills.${lang}.md`).toEqual([]);
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user