웹 디자인 파이프라인 스킬과 이를 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)
57 lines
1.8 KiB
TypeScript
57 lines
1.8 KiB
TypeScript
import path from "node:path";
|
|
import { exists } from "../fsx.ts";
|
|
import type { FileAction, TargetAdapter, TargetContext } from "../types.ts";
|
|
import { anyExists, referenceActions, rewriteRefPaths } from "./common.ts";
|
|
|
|
/** 본문과 references 가 함께 놓이는 루트 (본문 경로 재작성 기준) */
|
|
const REF_PREFIX = ".cursor/rules/designpaca";
|
|
|
|
/**
|
|
* Cursor — .cursor/rules/designpaca.mdc.
|
|
* .mdc 프론트매터는 SKILL.md 와 필드가 다르다(description/globs/alwaysApply)므로 변환한다.
|
|
*
|
|
* Windsurf 는 이 파일을 읽지 않는다(.windsurf/rules/*.md 를 쓴다) — 별도 어댑터로 분리했다.
|
|
*/
|
|
export const cursor: TargetAdapter = {
|
|
id: "cursor",
|
|
label: "Cursor",
|
|
hint: ".cursor/rules/designpaca.mdc — 프로젝트 단위",
|
|
// Cursor 의 전역 규칙은 파일이 아니라 앱 설정(User Rules)이라 프로젝트 범위만 지원한다
|
|
scopes: ["project"],
|
|
|
|
async detect(ctx: TargetContext) {
|
|
return anyExists([path.join(ctx.cwd, ".cursor"), path.join(ctx.home, ".cursor")]);
|
|
},
|
|
|
|
async plan(ctx: TargetContext) {
|
|
const rulesDir = path.join(ctx.cwd, ".cursor", "rules");
|
|
const mdc = path.join(rulesDir, "designpaca.mdc");
|
|
const refRoot = path.join(rulesDir, "designpaca");
|
|
|
|
const header = [
|
|
"---",
|
|
`description: ${ctx.skill.description}`,
|
|
"globs:",
|
|
"alwaysApply: false",
|
|
"---",
|
|
"",
|
|
].join("\n");
|
|
|
|
const actions: FileAction[] = [
|
|
{
|
|
kind: "write",
|
|
path: mdc,
|
|
content: header + rewriteRefPaths(ctx.skill.body, REF_PREFIX),
|
|
},
|
|
...referenceActions(refRoot, ctx.skill),
|
|
];
|
|
|
|
return {
|
|
target: this.id,
|
|
scope: ctx.scope,
|
|
root: rulesDir,
|
|
actions,
|
|
alreadyInstalled: await exists(mdc),
|
|
};
|
|
},
|
|
};
|