designpaca 초기 구현 — 스킬 · 설치 CLI · 배포 파이프라인

웹 디자인 파이프라인 스킬과 이를 5개 에이전트에 설치하는 CLI 를 담은 모노레포.

스킬 (packages/skill)
- SKILL.md 261줄 + 참조 문서 16개 3,349줄. progressive disclosure 로
  본문은 절차와 인덱스만, 지식은 references/ 로 분리
- 0~6단계 파이프라인. 규모에 따라 전체·연장·국소 세 경로로 분기
- 하드 게이트 12개는 grep·카운트로 검증 가능한 것만. 취향 판단은 제외
- 미학 프리셋 5종, AI 슬롭 지문 목록, 한글 조판 규칙,
  SVG 필터·three.js·인터랙티브 모션·HTML-in-Canvas 실전 지침

설치 CLI (packages/cli, packages/core)
- npx designpaca 온보딩 TUI. Claude Code · Codex · Cursor · Windsurf · AGENTS.md
- 매니페스트에 설치 시점 해시를 기록해 사용자가 고친 파일은 update 가 건너뛴다
- 타깃별로 본문의 references/ 경로를 실제 설치 위치로 재작성
- AGENTS.md 는 항상 로드되므로 본문 대신 303자 포인터만 주입
- Windsurf 는 12,000자 상한 초과 시 설치를 차단

배포 (build/ci, .forgejo/workflows)
- 태그 v* → 검사·테스트·빌드 → npmjs 배포 + Forgejo 레지스트리 미러
  → draft 릴리스 → Cloudflare Pages. 재실행 멱등

근거 (research/)
- 약 250개 웹 소스 조사 결과와 도그푸딩 검증 2건. 스킬의 모든 수치는 여기서 나온다

테스트 22개 통과 (core 16 · cli 6)
This commit is contained in:
Yun Chan 2026-08-20 10:48:00 +09:00
commit 8808c672dc
135 changed files with 38838 additions and 0 deletions

80
build/ci/lint-skill.mjs Normal file
View file

@ -0,0 +1,80 @@
// 스킬 문서의 최소 규약을 검사한다. CI 와 `pnpm test` 가 함께 쓴다.
// - SKILL.md 존재와 프론트매터 필수 필드
// - description 길이(트리거 정확도에 직접 영향)
// - references 링크가 실제 파일을 가리키는지
import fs from "node:fs/promises";
import path from "node:path";
const root = path.resolve(process.argv[2] ?? ".");
const errors = [];
const warnings = [];
const skillPath = path.join(root, "SKILL.md");
let md;
try {
md = await fs.readFile(skillPath, "utf8");
} catch {
console.error(`SKILL.md 를 찾을 수 없다: ${skillPath}`);
process.exit(1);
}
const fmMatch = /^---\r?\n([\s\S]*?)\r?\n---/.exec(md);
if (!fmMatch) {
errors.push("프론트매터(---)가 없다");
} else {
const fm = Object.fromEntries(
fmMatch[1]
.split(/\r?\n/)
.map((l) => /^([A-Za-z0-9_-]+):\s*(.*)$/.exec(l))
.filter(Boolean)
.map((m) => [m[1], m[2].replace(/^["']|["']$/g, "")]),
);
if (fm.name !== "designpaca") errors.push(`name 이 designpaca 가 아니다: ${fm.name}`);
if (!fm.description) errors.push("description 이 없다");
else {
const len = fm.description.length;
if (len < 80) warnings.push(`description 이 짧다(${len}자) — 트리거 정확도가 떨어진다`);
if (len > 700) warnings.push(`description 이 길다(${len}자) — 요약해라`);
}
}
// 본문이 참조하는 파일이 실제로 있는지 확인한다 (references/xxx.md 형태)
const refs = [...md.matchAll(/references\/[A-Za-z0-9._/-]+\.md/g)].map((m) => m[0]);
for (const rel of new Set(refs)) {
try {
await fs.access(path.join(root, rel));
} catch {
errors.push(`본문이 가리키는 참조 문서가 없다: ${rel}`);
}
}
// 참조 문서가 본문 어디에서도 언급되지 않으면 죽은 문서다
async function walk(dir, base = dir) {
const out = [];
let entries = [];
try {
entries = await fs.readdir(dir, { withFileTypes: true });
} catch {
return out;
}
for (const e of entries) {
const full = path.join(dir, e.name);
if (e.isDirectory()) out.push(...(await walk(full, base)));
else out.push(path.relative(base, full).split(path.sep).join("/"));
}
return out;
}
const refDir = path.join(root, "references");
for (const f of await walk(refDir, root)) {
if (!f.endsWith(".md")) continue;
const rel = f.split(path.sep).join("/");
if (!md.includes(rel)) warnings.push(`본문에서 참조되지 않는 문서: ${rel}`);
}
for (const w of warnings) console.warn(` 경고: ${w}`);
if (errors.length > 0) {
for (const e of errors) console.error(` 오류: ${e}`);
console.error(`\n스킬 검사 실패 — 오류 ${errors.length}`);
process.exit(1);
}
console.log(`스킬 검사 통과 (경고 ${warnings.length}건)`);