@conscience-technology/ovenn 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -4
- package/assets/components/AIMessage/AIMessage.module.css +10 -0
- package/assets/components/AIMessage/AIMessage.tsx +6 -2
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +1 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
- package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
- package/assets/components/Breadcrumb/index.ts +1 -0
- package/assets/components/Button/Button.module.css +2 -4
- package/assets/components/Callout/Callout.module.css +44 -18
- package/assets/components/Callout/Callout.tsx +9 -4
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +13 -0
- package/assets/components/Canvas/Canvas.tsx +378 -94
- package/assets/components/Canvas/clipboard.ts +5 -1
- package/assets/components/Canvas/collision.ts +5 -1
- package/assets/components/Canvas/graph.ts +14 -5
- package/assets/components/Canvas/history.ts +11 -4
- package/assets/components/Canvas/index.ts +2 -1
- package/assets/components/Canvas/types.ts +36 -1
- package/assets/components/CanvasEdge/tokens.css +14 -1
- package/assets/components/CanvasNode/tokens.css +13 -10
- package/assets/components/ChatComposer/ChatComposer.tsx +1 -1
- package/assets/components/ChatInput/ChatInput.tsx +1 -1
- package/assets/components/ColorField/ColorField.module.css +6 -1
- package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
- package/assets/components/CommandPalette/CommandPalette.module.css +114 -0
- package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
- package/assets/components/CommandPalette/index.ts +1 -0
- package/assets/components/Drawer/Drawer.module.css +30 -0
- package/assets/components/Drawer/Drawer.tsx +75 -16
- package/assets/components/Drawer/index.ts +1 -0
- package/assets/components/FileIcon/FileIcon.tsx +1 -0
- package/assets/components/FileIcon/fileExtMap.ts +1 -0
- package/assets/components/Icon/Icon.tsx +3 -0
- package/assets/components/Input/Input.module.css +3 -3
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +1 -1
- package/assets/components/Onboarding/OnboardingPage.tsx +13 -11
- package/assets/components/Onboarding/actions.ts +9 -9
- package/assets/components/Select/Select.module.css +1 -1
- package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
- package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
- package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
- package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
- package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
- package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
- package/assets/components/SocialLoginButton/assets/github.svg +3 -0
- package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
- package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
- package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
- package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
- package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
- package/assets/components/SocialLoginButton/assets/naver.png +0 -0
- package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
- package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
- package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
- package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
- package/assets/components/SocialLoginButton/assets/x.svg +3 -0
- package/assets/components/SocialLoginButton/index.ts +2 -0
- package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
- package/assets/components/SocialLoginButton/providers.ts +23 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +2 -2
- package/assets/components/ThemeController.tsx +2 -2
- package/assets/components/TimelineView/TimelineView.tsx +4 -2
- package/assets/components/Tooltip/Tooltip.module.css +1 -0
- package/assets/components/_data.ts +1 -1
- package/assets/components/_utils.css +1 -0
- package/assets/components/component-registry.json +30 -1
- package/assets/components/index.ts +1 -0
- package/assets/components/side-effect-css.d.ts +5 -0
- package/assets/components/themeBootScript.ts +7 -1
- package/assets/components/tokens.css +14 -6
- package/assets/prompts/ASSEMBLY.md +4 -0
- package/assets/prompts/CASCADE.md +2 -2
- package/assets/prompts/CATALOG.md +2 -1
- package/assets/prompts/PRINCIPLES.md +4 -8
- package/assets/prompts/RULES.md +19 -1
- package/assets/prompts/SLOTS.md +2 -4
- package/assets/prompts/WORKFLOW_DESIGN.md +0 -4
- package/assets/prompts/axes/icon.md +1 -1
- package/assets/prompts/axes/material.md +4 -4
- package/assets/prompts/axes/motion.md +1 -1
- package/assets/prompts/axes/shape.md +2 -2
- package/assets/prompts/axes/voice.md +1 -1
- package/assets/prompts/components/_variants.md +4 -4
- package/assets/prompts/components/accordion.md +4 -4
- package/assets/prompts/components/ai-message.md +6 -2
- package/assets/prompts/components/attachment-item.md +2 -2
- package/assets/prompts/components/breadcrumb.md +11 -5
- package/assets/prompts/components/button.md +3 -3
- package/assets/prompts/components/callout.md +8 -4
- package/assets/prompts/components/canvas-edge.md +1 -1
- package/assets/prompts/components/canvas-node.md +1 -1
- package/assets/prompts/components/canvas.md +24 -8
- package/assets/prompts/components/card.md +1 -2
- package/assets/prompts/components/chart-bar.md +1 -1
- package/assets/prompts/components/chat-input.md +1 -1
- package/assets/prompts/components/checkbox.md +5 -5
- package/assets/prompts/components/color-field.md +2 -2
- package/assets/prompts/components/command-palette.md +55 -47
- package/assets/prompts/components/context-menu.md +5 -5
- package/assets/prompts/components/date-picker.md +2 -2
- package/assets/prompts/components/drawer.md +17 -3
- package/assets/prompts/components/dropdown-menu.md +3 -3
- package/assets/prompts/components/event-list-item.md +4 -4
- package/assets/prompts/components/file-icon.md +2 -2
- package/assets/prompts/components/gallery-item.md +1 -1
- package/assets/prompts/components/hint.md +3 -3
- package/assets/prompts/components/kanban.md +2 -3
- package/assets/prompts/components/list-item.md +12 -12
- package/assets/prompts/components/menu-item.md +2 -2
- package/assets/prompts/components/message-table.md +4 -4
- package/assets/prompts/components/onboarding.md +3 -3
- package/assets/prompts/components/page-header.md +6 -7
- package/assets/prompts/components/quotation-bar.md +1 -1
- package/assets/prompts/components/select.md +1 -1
- package/assets/prompts/components/shortcut.md +3 -3
- package/assets/prompts/components/sidebar.md +5 -4
- package/assets/prompts/components/social-login-button.md +117 -0
- package/assets/prompts/components/stepper.md +1 -1
- package/assets/prompts/components/tab-strip.md +2 -2
- package/assets/prompts/components/table-row-edit.md +6 -6
- package/assets/prompts/components/table-row-select.md +1 -1
- package/assets/prompts/components/tabs.md +5 -2
- package/assets/prompts/components/textarea.md +1 -1
- package/assets/prompts/components/toast.md +3 -3
- package/assets/prompts/components/tooltip.md +3 -3
- package/assets/prompts/components/topbar.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +9 -9
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
- package/assets/prompts/primitives/scroll.md +1 -1
- package/assets/prompts/recipes/README.md +5 -6
- package/assets/prompts/recipes/meta-line.md +2 -2
- package/assets/prompts/recipes/page-header.md +2 -2
- package/assets/prompts/recipes/section-header.md +1 -1
- package/assets/prompts/themes/_SCHEMA.md +2 -2
- package/assets/prompts/tokens/material.md +5 -2
- package/assets/prompts/tokens/radius.md +1 -1
- package/assets/prompts/use-cases/chat-chat-input.md +382 -74
- package/assets/prompts/use-cases/data-list-item.md +38 -431
- package/assets/prompts/use-cases/feedback-drawer.md +112 -33
- package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
- package/assets/prompts/use-cases/structure-canvas.md +1016 -0
- package/assets/skills/ovenn-validate/SKILL.md +1 -1
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +7 -1
- package/assets/skills/ovenn-validate/scripts/lib/engine.mjs +105 -0
- package/assets/skills/ovenn-validate/scripts/lib/engine.test.mjs +46 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +5 -3
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +28 -5
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +15 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +7 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +61 -30
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +7 -4
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +3 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +8 -136
- package/assets/skills/ovenn-wireframe/SKILL.md +1 -1
- package/bin/ovenn.js +8 -0
- package/package.json +2 -2
- package/src/commands/check.js +70 -0
- package/src/commands/info.js +32 -7
- package/src/commands/init.js +26 -30
- package/src/commands/setup-checks.js +80 -0
- package/src/commands/update.js +90 -18
- package/src/data/ctds-releases.json +1 -0
- package/src/utils/assets.js +5 -0
- package/src/utils/component-usage.js +7 -1
- package/src/utils/design-workflow.js +6 -2
- package/src/utils/doctor.js +7 -1
- package/src/utils/legacy-ctds.js +169 -0
- package/src/utils/managed-assets.js +16 -3
- package/src/utils/route.js +17 -0
- package/src/utils/rules-context.js +91 -0
- package/src/utils/update-transaction.js +16 -3
- package/assets/prompts/FEEDBACK_PROCESS.md +0 -19
- package/assets/prompts/GUIDE.md +0 -307
- package/assets/prompts/MEMORY.md +0 -202
- package/assets/prompts/TEMPLATE_PREVIEWS.md +0 -21
- package/assets/prompts/components/README.md +0 -84
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The /ovenn onboarding route that init creates and a CTDS migration recreates in place of /ctds. */
|
|
2
|
+
export function renderOvennRoute() {
|
|
3
|
+
// 사용자 플젝 alias 호환성 — 상대경로로 안전하게.
|
|
4
|
+
// app/ovenn/page.tsx → ../../components/ovenn/Onboarding (useSrcDir도 동일 레벨)
|
|
5
|
+
const importPath = "../../components/ovenn/Onboarding";
|
|
6
|
+
return `/**
|
|
7
|
+
* Ovenn onboarding route.
|
|
8
|
+
* Generated by \`npx ovenn init\`. Edit freely — subsequent \`ovenn init\`
|
|
9
|
+
* runs will not overwrite this file unless you pass --force.
|
|
10
|
+
*/
|
|
11
|
+
import { OnboardingPage } from "${importPath}";
|
|
12
|
+
|
|
13
|
+
export default function Page() {
|
|
14
|
+
return <OnboardingPage />;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rules and workflow text sized to the task: the components in a componentPlan, and the current phase.
|
|
3
|
+
* Shared by MCP get_rules/get_design_workflow and the CLI's --local equivalents, so both return the same text.
|
|
4
|
+
* Without arguments the callers keep returning the full documents.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Markdown split at ## and ### headings; text before the first heading is `intro`. */
|
|
8
|
+
export function sections(markdown) {
|
|
9
|
+
const lines = markdown.split("\n"), out = [], intro = [];
|
|
10
|
+
let current = null;
|
|
11
|
+
for (const line of lines) {
|
|
12
|
+
const heading = line.match(/^(#{2,3})\s+(.+?)\s*$/);
|
|
13
|
+
if (heading) { current = { level: heading[1].length, heading: heading[2], lines: [line] }; out.push(current); }
|
|
14
|
+
else (current ? current.lines : intro).push(line);
|
|
15
|
+
}
|
|
16
|
+
return { intro: intro.join("\n").trim(), sections: out.map((s) => ({ level: s.level, heading: s.heading, text: s.lines.join("\n").trim() })) };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Sections whose heading contains one of `wanted`, plus the subsections under a picked parent. */
|
|
20
|
+
export function pickSections(markdown, wanted) {
|
|
21
|
+
const { intro, sections: all } = sections(markdown);
|
|
22
|
+
const picked = [];
|
|
23
|
+
let parentLevel = null;
|
|
24
|
+
for (const s of all) {
|
|
25
|
+
if (parentLevel !== null && s.level > parentLevel) { picked.push(s.text); continue; }
|
|
26
|
+
parentLevel = null;
|
|
27
|
+
if (wanted.some((w) => s.heading.includes(w))) { picked.push(s.text); parentLevel = s.level; }
|
|
28
|
+
}
|
|
29
|
+
return [intro, ...picked].filter(Boolean).join("\n\n");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const WORKFLOW_PHASES = {
|
|
33
|
+
plan: {
|
|
34
|
+
assembly: ["1. 역할", "2. 레퍼런스", "3. 부품", "조립 전 확인", "기존 UI 전환", "실행 주체"],
|
|
35
|
+
review: ["원칙", "미적 완성도", "명시적 디자인 금지", "Do", "Don't"],
|
|
36
|
+
},
|
|
37
|
+
build: {
|
|
38
|
+
assembly: ["조립 전 확인", "기존 UI 전환", "4. 조립", "5. 규칙 검사"],
|
|
39
|
+
review: ["원칙", "명시적 디자인 금지", "Do", "Don't", "Fallback"],
|
|
40
|
+
},
|
|
41
|
+
review: {
|
|
42
|
+
assembly: ["6. 눈으로", "실행 기록", "실행 주체"],
|
|
43
|
+
review: null, // the reviewer needs every criterion
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** ASSEMBLY / WORKFLOW_DESIGN cut to a phase. `phase` undefined keeps both documents whole. */
|
|
48
|
+
export function phaseSources(assembly, review, phase) {
|
|
49
|
+
if (!phase) return { assembly, review };
|
|
50
|
+
const map = WORKFLOW_PHASES[phase];
|
|
51
|
+
if (!map) throw new Error(`Unknown phase: ${phase} (plan, build or review)`);
|
|
52
|
+
return { assembly: pickSections(assembly, map.assembly), review: map.review ? pickSections(review, map.review) : review };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** "ButtonGroup" · "Button Group" · "button-group" → "button-group" (same mapping as get_component). */
|
|
56
|
+
export function componentSlug(name) {
|
|
57
|
+
const slug = String(name).trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase();
|
|
58
|
+
return slug === "button-group" || slug === "buttongroup" ? "control-group" : slug;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Sections that carry a component's contract: principle, behaviour and input handling, accessibility, and the Don'ts.
|
|
62
|
+
const RULE_SECTIONS = /^(?:원칙|행동|인터랙션|접근성|키보드|Don'?t)(?=$|[\s:(])/i;
|
|
63
|
+
|
|
64
|
+
/** A component document reduced to its rules: contract sections plus every [HARD] line outside them. */
|
|
65
|
+
export function componentRules(markdown) {
|
|
66
|
+
const { sections: all } = sections(markdown);
|
|
67
|
+
const dont = all.filter((s) => RULE_SECTIONS.test(s.heading)).map((s) => s.text);
|
|
68
|
+
const inDont = new Set(dont.join("\n").split("\n").map((l) => l.trim()));
|
|
69
|
+
const hard = markdown.split("\n").map((l) => l.trim()).filter((l) => /\[HARD\]/.test(l) && !inDont.has(l));
|
|
70
|
+
return [...dont, ...(hard.length ? [`### [HARD] (그 밖의 절)\n${hard.join("\n")}`] : [])].join("\n\n").trim();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* RULES plus the rules of the listed components; PRINCIPLES only when asked (or when no component is listed).
|
|
75
|
+
* @param {{rules: string, principles: string, components?: string[], withPrinciples?: boolean, readComponent: (slug: string) => string|null}} input
|
|
76
|
+
*/
|
|
77
|
+
export function rulesContext({ rules, principles, components = [], withPrinciples, readComponent }) {
|
|
78
|
+
if (!components.length) return `${rules}\n\n---\n\n${principles}`;
|
|
79
|
+
const parts = [rules, "---", "## 부품 규칙 (componentPlan의 부품만)"];
|
|
80
|
+
const missing = [];
|
|
81
|
+
for (const name of [...new Set(components)]) {
|
|
82
|
+
const doc = readComponent(componentSlug(name));
|
|
83
|
+
if (!doc) { missing.push(name); continue; }
|
|
84
|
+
const body = componentRules(doc);
|
|
85
|
+
parts.push(`### ${name}\n${body ? body.replace(/^###/gm, "####") : "(이 부품 문서에는 Don't·[HARD]가 없다. RULES만 적용한다.)"}`);
|
|
86
|
+
}
|
|
87
|
+
if (missing.length) parts.push(`문서가 없는 이름: ${missing.join(", ")}. 카탈로그(find_components 또는 prompts/CATALOG.md)에서 실제 부품 이름을 확인한다.`);
|
|
88
|
+
parts.push("API·Props·예시는 get_component(또는 prompts/components/<slug>.md)로, 변형·안전 정책 전문은 principles를 켜서 받는다.");
|
|
89
|
+
if (withPrinciples) parts.push("---", principles);
|
|
90
|
+
return parts.join("\n\n");
|
|
91
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync, rmSync, readdirSync, openSync, closeSync, lstatSync, chmodSync } from "node:fs";
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync, rmSync, rmdirSync, readdirSync, openSync, closeSync, lstatSync, chmodSync } from "node:fs";
|
|
2
2
|
import { join, dirname } from "node:path";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { safePath, hashAt, digest } from "./managed-assets.js";
|
|
@@ -59,14 +59,16 @@ export function applyUpdate(root, changes, {beforeWrite} = {}) {
|
|
|
59
59
|
if (before !== item.current) throw new Error(`File changed since planning: ${item.path}`);
|
|
60
60
|
const backup = `backups/${index}`;
|
|
61
61
|
if (before !== null) atomic(safePath(root, `.ovenn/updates/${id}/${backup}`), readFileSync(target));
|
|
62
|
-
|
|
62
|
+
// content === null removes the file; its backup restores it on rollback.
|
|
63
|
+
journal.files.push({path: item.path, before, after: item.content === null ? null : digest(item.content), backup, mode: before === null ? 0o644 : lstatSync(target).mode & 0o777});
|
|
63
64
|
}
|
|
64
65
|
atomic(path, JSON.stringify(journal, null, 2));
|
|
65
66
|
for (const [index, item] of changes.entries()) {
|
|
66
67
|
beforeWrite?.(index, id);
|
|
67
68
|
// Catch edits that occur while conflict choices or staging were in progress.
|
|
68
69
|
if (hashAt(safePath(root, item.path)) !== item.current) throw new Error(`Concurrent edit: ${item.path}`);
|
|
69
|
-
|
|
70
|
+
if (item.content === null) rmSync(safePath(root, item.path), {force: true});
|
|
71
|
+
else atomic(safePath(root, item.path), item.content, journal.files[index].mode);
|
|
70
72
|
}
|
|
71
73
|
atomic(path, JSON.stringify({...journal, status: "applied"}, null, 2));
|
|
72
74
|
return id;
|
|
@@ -77,3 +79,14 @@ export function applyUpdate(root, changes, {beforeWrite} = {}) {
|
|
|
77
79
|
throw error;
|
|
78
80
|
} finally { release(); }
|
|
79
81
|
}
|
|
82
|
+
/** Removes folders left empty by removed files, walking up from each file but never past the project root. */
|
|
83
|
+
export function pruneEmptyDirs(root, paths) {
|
|
84
|
+
for (const path of paths) {
|
|
85
|
+
const parts = path.split("/").slice(0, -1);
|
|
86
|
+
while (parts.length) {
|
|
87
|
+
const folder = safePath(root, parts.join("/"));
|
|
88
|
+
if (!existsSync(folder) || readdirSync(folder).length) break;
|
|
89
|
+
rmdirSync(folder); parts.pop();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# 사용자 피드백에서 WORKFLOW_DESIGN 규칙 개선까지
|
|
2
|
-
|
|
3
|
-
사용자 피드백으로 Ovenn 디자인 규칙을 개선하는 메타 프로세스. agent가 매 요청마다 실행할 지침이 아니라, `continue` 모드에서 피드백 원인 분석 계약과 사용자가 WORKFLOW_DESIGN을 유지관리할 때의 작업 순서를 담는다. 정책 원본은 [[WORKFLOW_DESIGN]]이다.
|
|
4
|
-
|
|
5
|
-
## 시각 교정 사례와 소비자 전달
|
|
6
|
-
|
|
7
|
-
규칙 준수와 미적 완성도는 별도로 판단한다. 규칙 위반 없음은 미감 합격이 아니며, 미감 채택도 위반을 면제하지 않는다. 사람 평가는 AI 독립 검수와 구분하고 해당 회차의 실제 소스·캡처, 평가 당시의 규칙 정의·원본 해시에 연결한다. 기준이 바뀌면 과거 판정과 현재 평가를 구분한다. 기준 사례에는 같은 업무의 전후 전체 화면과 필요한 부분 확대, 적용 문맥, 수정 전 관측, 바꾼 점, 좋아진 이유, 원본 부품과 변형 내용을 보존한다. 사례를 저장한 뒤의 사람 평가는 동일 소스·캡처일 때만 별도 이력으로 연결하며 저장 당시 근거를 덮어쓰지 않는다. 미확인은 합격으로 취급하지 않는다.
|
|
8
|
-
|
|
9
|
-
평가 기록 저장은 모델 학습이나 소비자 배포가 아니다. 수정 후 규칙 검사와 미감 판단을 완료한 사례에서 사람이 적용 판단과 범위를 작성하고 이 원본의 실험 초안으로 만든다. 한 화면의 값을 모든 화면의 정답으로 만들지 않는다. 초안으로 원래 과제를 재실험하고 독립 검수를 마친 뒤 문서 전후와 실제 화면을 검토해 채택한다. 기준을 만드는 데 쓰지 않은 새 요청과 모델별 결과도 별도로 평가한다. 평가 수는 회차·서로 다른 과제·모델을 구분하며 적은 사례의 개선을 전체 품질 보증으로 표현하지 않는다.
|
|
10
|
-
|
|
11
|
-
채택된 판단은 이 원본에서 관리하고 기존 get_design_workflow/get_guide 및 CLI의 설치된 prompts/WORKFLOW_DESIGN.md로 전달한다. 실제 서비스 배포 또는 CLI 패키지 배포와 설치 업데이트가 있어야 소비자에게 적용된다. 소비자가 텍스트로 요청해도 에이전트가 이 지침을 읽는 기존 절차를 따른다. 로컬 사례 이미지·소스를 자동 배포하거나 사용자가 매번 레퍼런스를 제공해야 하는 계약을 만들지 않는다. 시각 입력을 받지 못하는 환경에서 이미지까지 전달됐다고 주장하지 않는다.
|
|
12
|
-
|
|
13
|
-
후속 수정은 화면을 고치는 것과 원인을 찾는 것을 함께 수행한다. 이전 입력에 제공된 문서, 실제 도구 호출에 등장한 문서, 생성자의 선택 설명을 구분해 확인한다. 관련 컴포넌트 문서·실제 코드와 spacing/typography/PRINCIPLES를 다시 검토하고, 실제로 문제에 관계없는 문서까지 억지로 고치지 않는다.
|
|
14
|
-
|
|
15
|
-
원인은 implementation_error(기존 규칙 미준수), missing_rule(규칙 부족), incorrect_rule(규칙 오류), uncertain(근거 부족)으로 구분한다. 구현 미준수는 구현을 바로잡고 문서를 더 엄격하게 만드는 것으로 대신하지 않는다. 규칙의 부족·오류는 해당 조항·화면 관측·영향을 연결해 설명한다. 한 화면의 취향을 모든 화면의 금지 규칙으로 일반화하지 않는다. 사용자 피드백과 현재 원칙이 충돌하면 적용 범위를 밝히고 원본의 미감 정책을 조용히 뒤집지 않는다.
|
|
16
|
-
|
|
17
|
-
실험용 사본에서 화면을 수정하고, 근거 있는 문서 수정안만 함께 작성한다. 소비자 프로젝트의 원본은 바로 바꾸지 않는다. .ovenn/feedback.json에는 summary, issues 배열을 남기며 각 항목은 feedback, classification, observation, cause, documents([{path,reason}]), verification을 가진다. summary·feedback·observation·cause·verification·문서 reason은 짧은 문자열로 작성하고 문서 경로는 prompts/ 기준으로 명시한다. 구조화된 보조 검증 기록은 문자열 요약과 구분해 보존한다. 원인·적용 판단은 모델의 설명이며 관측 사실과 구분한다. 불확실하면 uncertain으로 남기고 문서 수정을 강제하지 않는다.
|
|
18
|
-
|
|
19
|
-
수정 전후 문서와 입력 hash를 보존하고, 문서 초안으로 원래 과제를 다시 실험해 화면·기능·기존 계약에 미치는 영향을 검토한다. 재실험의 실행·독립 검수 완료는 미적 우수성의 보증이 아니다. 근거·전후·재실험 결과를 사람이 검토해 채택한 변경만 원본에 반영한다.
|
package/assets/prompts/GUIDE.md
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# Ovenn 프롬프트 작성 가이드
|
|
2
|
-
|
|
3
|
-
이 문서는 **Ovenn의 프롬프트 컨텍스트 문서(Layer 2)를 어떻게 쓸지**에 대한 규칙이다.
|
|
4
|
-
축(Axis), 토큰(Token), 컴포넌트(Component), 모션 프리미티브(Primitive) 문서를 작성할 때
|
|
5
|
-
이 가이드를 따른다.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 0. 전제
|
|
10
|
-
|
|
11
|
-
이 가이드는 [[PRINCIPLES]]의 전역 원칙을 이미 읽었다고 가정한다.
|
|
12
|
-
특히 §1(값과 판단의 분리), §6(하드코딩 금지)는 모든 섹션 문서 작성의 대전제다.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## 1. 소비 주체
|
|
17
|
-
|
|
18
|
-
**1차 소비자는 AI다.** Claude/Cursor 등에 통째로 주입되거나 부분 인용된다.
|
|
19
|
-
따라서:
|
|
20
|
-
|
|
21
|
-
- 밀도 높게 쓴다. 서론·에필로그 없음.
|
|
22
|
-
- 규칙은 명령형으로. "~하는 것이 좋습니다" ❌ → "~한다" ✅
|
|
23
|
-
- 예시는 규칙당 최대 1개. 반복 예시는 컨텍스트 낭비.
|
|
24
|
-
- Markdown 구조를 엄격히 따른다 (AI가 헤딩으로 섹션을 찾음).
|
|
25
|
-
|
|
26
|
-
사람이 참고로 읽을 순 있지만, **사람이 읽기 편하려고 형식을 무너뜨리지 않는다.**
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## 2. 공통 골격
|
|
31
|
-
|
|
32
|
-
모든 섹션 문서는 아래 5개 헤딩을 **이 순서로, 빠짐없이** 갖는다.
|
|
33
|
-
해당 사항이 없으면 헤딩 아래에 `N/A` 한 줄만 쓴다 (헤딩 자체를 생략하지 않는다).
|
|
34
|
-
리스트 헤딩(`Do`, `Don't`, `관련`)에서도 불릿 없이 `N/A` 한 줄로 표시한다.
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
## <섹션 이름>
|
|
38
|
-
|
|
39
|
-
### 원칙
|
|
40
|
-
<1~2줄. 이 규칙이 왜 존재하는가.>
|
|
41
|
-
|
|
42
|
-
### Do
|
|
43
|
-
- <명령형 규칙>
|
|
44
|
-
- <명령형 규칙>
|
|
45
|
-
|
|
46
|
-
### Don't
|
|
47
|
-
- <하드 리젝 사유. 강도가 애매하면 bullet 앞에 `[HARD]` 또는 `[SOFT]` 명시 — PRINCIPLES §4a 참고>
|
|
48
|
-
|
|
49
|
-
### Fallback
|
|
50
|
-
<규칙이 애매할 때의 기본값. 없으면 "규칙대로 판단 불가한 경우 사용자에게 확인".>
|
|
51
|
-
|
|
52
|
-
### 관련
|
|
53
|
-
- [[다른-섹션-이름]] — <왜 관련되는지 한 줄>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**N/A 예시:**
|
|
57
|
-
```markdown
|
|
58
|
-
### Don't
|
|
59
|
-
N/A
|
|
60
|
-
|
|
61
|
-
### 관련
|
|
62
|
-
N/A
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**왜 골격이 강제인가:**
|
|
66
|
-
- AI가 항상 같은 위치에서 정보를 찾을 수 있음
|
|
67
|
-
- 작성자가 "금지 규칙"을 빠뜨리지 않음 (빈칸이 눈에 띔)
|
|
68
|
-
- 크로스 참조가 왕복으로 성립함
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## 3. 섹션 타입별 추가 항목
|
|
73
|
-
|
|
74
|
-
공통 골격 뒤에 타입별 추가 섹션을 붙인다.
|
|
75
|
-
|
|
76
|
-
### 3.1 축(Axis) — 예: Shape, Density, Motion
|
|
77
|
-
|
|
78
|
-
공통 골격 다음에:
|
|
79
|
-
|
|
80
|
-
```markdown
|
|
81
|
-
### 값
|
|
82
|
-
- `<값1>` — <한 줄 설명>
|
|
83
|
-
- `<값2>` — <한 줄 설명>
|
|
84
|
-
|
|
85
|
-
### 기본값
|
|
86
|
-
`<값>`
|
|
87
|
-
|
|
88
|
-
### 페어링
|
|
89
|
-
- `<이 축의 값>` + `<다른 축의 값>` — <권장/비권장 및 이유>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 3.2 토큰(Token) — 예: Spacing, Radius, Shadow
|
|
93
|
-
|
|
94
|
-
공통 골격 다음에:
|
|
95
|
-
|
|
96
|
-
```markdown
|
|
97
|
-
### 토큰 표
|
|
98
|
-
| Token | 용도 |
|
|
99
|
-
|---|---|
|
|
100
|
-
| `<토큰명>` | <어디에 쓰는가 — 값이 아니라 용도> |
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
토큰 표에는 **값을 쓰지 않는다.** 값은 `PROJECT_OVERVIEW.md` 또는 실제 CSS에 있다.
|
|
104
|
-
프롬프트에는 "언제 쓰는가"만 담는다.
|
|
105
|
-
|
|
106
|
-
**그룹핑 허용:** 한 문서에 여러 토큰 계열이 포함되면 굵은 텍스트 그룹 헤딩으로 표를 나눌 수 있다 (예: color.md의 `**표면**`, `**텍스트**`, `**브랜드**`). 그룹 헤딩은 `###` 헤딩을 쓰지 않는다 — 골격 순서를 흐리기 때문. 굵은 텍스트만 사용.
|
|
107
|
-
|
|
108
|
-
### 3.3 컴포넌트(Component) — 예: Button, Modal, Table
|
|
109
|
-
|
|
110
|
-
**복잡 컴포넌트 (part 5+ 중첩) 는 "간편 + Compound 하이브리드 모드"로 작성:**
|
|
111
|
-
|
|
112
|
-
- **간편 모드 (flat prop)** — 가장 흔한 90% 자리용. prop 넘기면 바로 작동.
|
|
113
|
-
```tsx
|
|
114
|
-
<Modal open onOpenChange={set} title="삭제하시겠어요?" footer={<Buttons />}>본문</Modal>
|
|
115
|
-
```
|
|
116
|
-
- **Compound 모드 (세밀 제어)** — 10% 커스텀 자리용. `.Root/.Header/.Body/...` 조립.
|
|
117
|
-
```tsx
|
|
118
|
-
<Modal.Root open onOpenChange={set}>
|
|
119
|
-
<Modal.Header title="커스텀 헤더" dismissible={false} />
|
|
120
|
-
<Modal.Body>...</Modal.Body>
|
|
121
|
-
<Modal.Footer>...</Modal.Footer>
|
|
122
|
-
</Modal.Root>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**적용 대상:**
|
|
126
|
-
- 신규 복잡 컴포넌트 (Modal/Drawer/Dialog/DatePicker/Sheet 등 part 5+ 중첩) **반드시 두 모드 쌍으로 신설**
|
|
127
|
-
- 기존 복잡 컴포넌트에 간편 모드 추가는 **다른 작업 영향 없을 때만** — 기존 compound 사용처가 깨지면 안 됨
|
|
128
|
-
- Button/Card 등 part 2-3개 수준은 **간편 모드만** (compound 불필요)
|
|
129
|
-
|
|
130
|
-
**간편 모드 → Compound 변환:**
|
|
131
|
-
- 간편 모드는 내부적으로 compound 호출. 간편의 각 prop(title/description/footer)이 compound의 Header/Body/Footer 로 자동 치환.
|
|
132
|
-
- 소비자가 간편 → compound 바꾸려면 **prop 재구성만** 하면 됨 (JSX 구조 재작성 필요 없음).
|
|
133
|
-
|
|
134
|
-
**금지:**
|
|
135
|
-
- 간편 모드 안에 compound children 혼용 — "`<Modal title="..."><Modal.Body>...</Modal.Body></Modal>`" 같은 혼종 금지
|
|
136
|
-
- 간편 모드로 지원 안 되는 자리 (복잡 Header 커스텀 등) 는 **반드시 compound 모드로 전환**
|
|
137
|
-
|
|
138
|
-
공통 골격 다음에:
|
|
139
|
-
|
|
140
|
-
```markdown
|
|
141
|
-
### Props 시그니처
|
|
142
|
-
```tsx
|
|
143
|
-
<Component prop1="a | b | c" prop2={boolean} />
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Variant 매트릭스
|
|
147
|
-
| variant | 용도 | 금지 조합 |
|
|
148
|
-
|---|---|---|
|
|
149
|
-
| `<이름>` | <언제 쓰는가> | <어떤 축/prop과 못 씀> |
|
|
150
|
-
|
|
151
|
-
### 조합 예시
|
|
152
|
-
<규칙을 종합한 최소 예시 1개. 코드 블록.>
|
|
153
|
-
|
|
154
|
-
### data-slot
|
|
155
|
-
[[SLOTS]] 참고. 외부 참조·테스트·MCP 쿼리용 공식 API.
|
|
156
|
-
|
|
157
|
-
- `<component-kebab>-root` — 최상위 요소
|
|
158
|
-
- `<component-kebab>-<part1>` — <설명>
|
|
159
|
-
- `<component-kebab>-<part2>` — <설명>
|
|
160
|
-
- ...
|
|
161
|
-
|
|
162
|
-
### state attributes
|
|
163
|
-
- `data-<state>="true"` 또는 `data-<state>="<value>"` — <언제 켜지는지>
|
|
164
|
-
- ...
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
**compound part가 없는 single-element 컴포넌트** 는 `root` 하나만 명시 (Badge 처럼).
|
|
168
|
-
**Radix 자동 공급 state** (`data-state="open|closed"` 등) 는 그대로 유지 — 재선언 안 함.
|
|
169
|
-
|
|
170
|
-
### 3.4 모션 프리미티브(Primitive) — 예: fade, slide, scale
|
|
171
|
-
|
|
172
|
-
공통 골격 다음에:
|
|
173
|
-
|
|
174
|
-
```markdown
|
|
175
|
-
### 축별 스왑
|
|
176
|
-
| data-motion | 파라미터 |
|
|
177
|
-
|---|---|
|
|
178
|
-
| `expressive` | <이 프리미티브에서 뭐가 바뀌는가> |
|
|
179
|
-
| `standard` | ... |
|
|
180
|
-
| `subtle` | ... |
|
|
181
|
-
| `none` | <보통 즉시 완료 또는 스킵> |
|
|
182
|
-
|
|
183
|
-
### 겹침 규칙
|
|
184
|
-
<다른 프리미티브와 조합 가능 여부. 예: "fade와 scale만 조합 허용, 그 외 단독 사용.">
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### 3.5 테마(Theme) — 예: spare, expressive
|
|
188
|
-
|
|
189
|
-
Theme은 **6개 축 preset 묶음 + 축 밖 산문 레이어**다. Palette / Hue / Voice는 Theme 바깥(같은 Theme × 다른 색·보이스 성립).
|
|
190
|
-
공통 골격 다음에 아래 4블록을 **이 순서로** 붙인다. 자세한 스키마·셀프 체크리스트는 [[themes/_SCHEMA]].
|
|
191
|
-
|
|
192
|
-
```markdown
|
|
193
|
-
### Signature
|
|
194
|
-
이 Theme IS ___. <비교 수사 1문장>
|
|
195
|
-
|
|
196
|
-
### Preset
|
|
197
|
-
| Axis | Value | Why |
|
|
198
|
-
|---|---|---|
|
|
199
|
-
| [[axes/mode]] | `<값>` | <한 줄 이유> |
|
|
200
|
-
| ... | ... | ... | # Mode / Shape / Density / Font / Icon / Motion 6행
|
|
201
|
-
|
|
202
|
-
### Layout / Imagery / Decoration / Negative
|
|
203
|
-
<수치 금지, 선호·태도만. Negative는 최소 3개. 없는 섹션은 N/A.>
|
|
204
|
-
|
|
205
|
-
### Override / Known Gaps / Iteration Guide
|
|
206
|
-
<override는 전부 자유, 책임은 사용자. Known Gaps·Iteration Guide 의무.>
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## 4. 크로스 참조
|
|
212
|
-
|
|
213
|
-
다른 섹션을 참조할 땐 `[[섹션-이름]]` 형식을 쓴다 (kebab-case).
|
|
214
|
-
`관련` 헤딩 외에도 본문에서 자유롭게 링크한다.
|
|
215
|
-
|
|
216
|
-
```markdown
|
|
217
|
-
`crisp`은 데이터 밀도 높은 화면에 권장. [[axes/density]]가 `compact`일 때 특히 잘 맞음.
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
**링크 원칙:**
|
|
221
|
-
- 참조는 `[[폴더/이름]]` 형식. 폴더 접두어로 타입을 명시한다 (`[[axes/density]]`, `[[tokens/spacing]]`, `[[components/button]]`, `[[primitives/fade]]`, `[[presets/gov-formal]]`).
|
|
222
|
-
- 최상위 문서(`GUIDE`, `PRINCIPLES`)는 폴더 없이 `[[PRINCIPLES]]`.
|
|
223
|
-
- URL이나 상대 경로(`../axes/density.md`)로 걸지 않는다 — 파일 구조가 바뀌면 다 깨진다.
|
|
224
|
-
- 아직 안 쓴 섹션도 링크 가능. 나중에 쓸 것의 표식이 된다.
|
|
225
|
-
- `관련` 섹션에 링크가 없어도 됨 (`N/A`). 단, 정말 다른 어떤 섹션과도 무관한지 재검토한다.
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## 5. 파일 구조
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
prompts/
|
|
233
|
-
├── GUIDE.md # 이 문서
|
|
234
|
-
├── PRINCIPLES.md # 전역 원칙 (모든 섹션의 상위 규칙)
|
|
235
|
-
├── axes/
|
|
236
|
-
│ ├── mode.md
|
|
237
|
-
│ ├── palette.md
|
|
238
|
-
│ ├── hue.md
|
|
239
|
-
│ ├── shape.md
|
|
240
|
-
│ ├── icon.md
|
|
241
|
-
│ ├── density.md
|
|
242
|
-
│ ├── motion.md
|
|
243
|
-
│ ├── font.md
|
|
244
|
-
│ └── voice.md
|
|
245
|
-
├── tokens/
|
|
246
|
-
│ ├── spacing.md
|
|
247
|
-
│ ├── radius.md
|
|
248
|
-
│ ├── typography.md
|
|
249
|
-
│ ├── color.md
|
|
250
|
-
│ ├── shadow.md
|
|
251
|
-
│ ├── z-index.md
|
|
252
|
-
│ └── breakpoint.md
|
|
253
|
-
├── components/
|
|
254
|
-
│ ├── button.md
|
|
255
|
-
│ ├── input.md
|
|
256
|
-
│ └── ...
|
|
257
|
-
├── primitives/ # 모션 프리미티브
|
|
258
|
-
│ ├── fade.md
|
|
259
|
-
│ ├── slide.md
|
|
260
|
-
│ └── ...
|
|
261
|
-
├── brand-sets/ # 공개 metadata 계약만. 유료 recipe는 MCP 서버 전용
|
|
262
|
-
│ └── _SCHEMA.md
|
|
263
|
-
├── themes/ # 6축 묶음 + 축 밖 산문 레이어 (Palette/Voice는 바깥)
|
|
264
|
-
│ ├── _SCHEMA.md
|
|
265
|
-
│ ├── _TEMPLATE.md
|
|
266
|
-
│ └── <theme-slug>.md
|
|
267
|
-
└── presets/
|
|
268
|
-
└── <preset-name>.md # 프리셋 정의 + 프리셋 특유의 판단 규칙
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
**파일 하나 = 섹션 하나.** 여러 섹션을 한 파일에 묶지 않는다.
|
|
272
|
-
AI에 부분 주입할 때 파일 단위로 자르는 게 가장 안전하다.
|
|
273
|
-
|
|
274
|
-
### Brand Set과 Template 작성 경계
|
|
275
|
-
|
|
276
|
-
- Brand Set은 프로젝트 전역의 semantic component renderer 정책이다. 프로젝트당 하나만 활성화한다.
|
|
277
|
-
- Template은 `manifest + 실제 TSX/CSS + 콘텐츠 슬롯`으로 관리하는 exact artifact다.
|
|
278
|
-
- Template 코드는 메뉴·라벨·아이콘·라우트 데이터만 치환할 수 있게 작성하고, 시각·기능 특징은 잠근다.
|
|
279
|
-
- Preview, 코드 보기, MCP 적용 지시를 별도 수기 구현으로 복제하지 않는다. 같은 artifact에서 생성한다.
|
|
280
|
-
- 유료 Brand Set의 renderer recipe와 변환 프롬프트는 `prompts/`나 CLI assets에 두지 않는다.
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## 6. 작성 순서 권장
|
|
285
|
-
|
|
286
|
-
1. `PRINCIPLES.md` — 대전제(§0)와 전역 규칙
|
|
287
|
-
2. `axes/` 전 9개 — 축이 컴포넌트 규칙의 전제가 됨
|
|
288
|
-
3. `tokens/` 전 7개 — 토큰 이름을 컴포넌트가 참조함
|
|
289
|
-
4. `primitives/` — 컴포넌트가 프리미티브를 참조함
|
|
290
|
-
5. `components/` — 우선순위 컴포넌트부터
|
|
291
|
-
6. `presets/` — 축 조합 확정 후
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## 7. 셀프 체크리스트
|
|
296
|
-
|
|
297
|
-
새 프롬프트 문서를 커밋하기 전에 확인:
|
|
298
|
-
|
|
299
|
-
- [ ] 공통 골격 5개 헤딩이 모두 있는가 (없으면 `N/A`)
|
|
300
|
-
- [ ] [[PRINCIPLES]] §6 하드코딩 금지 목록을 위반하지 않는가
|
|
301
|
-
- [ ] 규칙이 명령형인가
|
|
302
|
-
- [ ] 예시는 규칙당 1개 이하인가
|
|
303
|
-
- [ ] 섹션 타입별 추가 항목을 붙였는가
|
|
304
|
-
- [ ] `관련` 링크가 있거나, 없다면 진짜 독립적인지 재확인 (§4 참고)
|
|
305
|
-
|
|
306
|
-
### 부품으로 조립하고 표현을 변형하기
|
|
307
|
-
부품 재사용·예외·조립 전 명세는 [[PRINCIPLES]]와 [[ASSEMBLY]]의 공통 계약을 따른다. scoped skin과 출처 있는 파생은 허용하되, 사용 가능한 부품을 단순 native 요소로 다시 작성하는 우회와 구분한다.
|