웹 디자인 파이프라인 스킬과 이를 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)
55 lines
2 KiB
TypeScript
55 lines
2 KiB
TypeScript
import pc from "picocolors";
|
||
|
||
/** designpaca 의 강조색 — 한 가지만 쓴다 */
|
||
export const accent = (s: string) => pc.magenta(s);
|
||
export const dim = (s: string) => pc.dim(s);
|
||
export const bold = (s: string) => pc.bold(s);
|
||
|
||
export const ok = (s: string) => `${pc.green("✓")} ${s}`;
|
||
export const warn = (s: string) => `${pc.yellow("!")} ${s}`;
|
||
export const bad = (s: string) => `${pc.red("✗")} ${s}`;
|
||
export const info = (s: string) => `${pc.cyan("·")} ${s}`;
|
||
|
||
/**
|
||
* 터미널에서 차지하는 칸 수. 한글·한자·가나는 2칸을 먹는다.
|
||
* String.length 로 padEnd 하면 한글이 섞인 표가 어긋난다.
|
||
*/
|
||
export function displayWidth(s: string): number {
|
||
// ANSI 이스케이프는 폭을 차지하지 않는다
|
||
const plain = s.replace(/\[[0-9;]*m/g, "");
|
||
let w = 0;
|
||
for (const ch of plain) {
|
||
const cp = ch.codePointAt(0) ?? 0;
|
||
const wide =
|
||
(cp >= 0x1100 && cp <= 0x115f) || // 한글 자모
|
||
(cp >= 0x2e80 && cp <= 0xa4cf) || // CJK 부수 ~ 이
|
||
(cp >= 0xac00 && cp <= 0xd7a3) || // 한글 음절
|
||
(cp >= 0xf900 && cp <= 0xfaff) || // CJK 호환
|
||
(cp >= 0xfe30 && cp <= 0xfe6f) ||
|
||
(cp >= 0xff00 && cp <= 0xff60) || // 전각
|
||
(cp >= 0xffe0 && cp <= 0xffe6);
|
||
w += wide ? 2 : 1;
|
||
}
|
||
return w;
|
||
}
|
||
|
||
/** displayWidth 기준으로 오른쪽을 채운다 */
|
||
export function padDisplay(s: string, width: number): string {
|
||
const pad = width - displayWidth(s);
|
||
return pad > 0 ? s + " ".repeat(pad) : s;
|
||
}
|
||
|
||
export function heading(s: string): string {
|
||
return `\n${bold(s)}\n${dim("─".repeat(Math.min(s.length + 8, 56)))}`;
|
||
}
|
||
|
||
/** 긴 경로 목록을 접어서 보여준다 — 설치 계획이 화면을 삼키지 않게 */
|
||
export function fold(items: string[], max = 6): string[] {
|
||
if (items.length <= max) return items;
|
||
return [...items.slice(0, max), dim(`… 그 외 ${items.length - max}개`)];
|
||
}
|
||
|
||
export function table(rows: [string, string][]): string {
|
||
const w = Math.max(...rows.map(([k]) => k.length));
|
||
return rows.map(([k, v]) => ` ${k.padEnd(w)} ${dim(v)}`).join("\n");
|
||
}
|