Example — Product Settings Page (API Keys)
작성일: 2026-05-21 Context: Product Source: agent 샘플 생성용 reference
요청 (agent-request)
{
"context": "product",
"role": "developer",
"taskType": "page",
"target": "Console API Key settings page",
"inputs": {
"designContext": "context/DESIGN.product.md",
"tokens": ["tokens/tokens.product.css", "tokens/token-intents.json"],
"forbiddenRules": "rules/forbidden-rules.json",
"promptGuide": "prompts/developer-prompt-guide.md"
},
"requirements": [
"Use token intents",
"Avoid raw hex",
"Avoid fallback hex",
"Avoid magic z-index",
"Avoid text gradient",
"Include empty/loading/error/success states",
"Include design self-check"
],
"constraints": {
"framework": "Next.js 14 App Router",
"styling": "Tailwind 3",
"react": "18",
"uiPackage": "@upstageai/ui@1.1.12"
},
"outputFormat": "structure-copy-code-self-check",
"humanReviewer": "dhongshim"
}
결과 (agent-response)
Context Routing
- selectedContext: product
- reason: Authenticated console settings workflow
- designFragment: context/DESIGN.product.md
- tokenSources: [tokens/tokens.product.css]
- forbiddenRules: rules/forbidden-rules.json
- humanReviewNeeded: []
Summary
콘솔 API Key 설정 페이지 초안 — 리스트, 생성, revoke 흐름 + empty/loading/error/success.
Structure
| Section | Purpose | Token intents | States | Components |
|---|---|---|---|---|
| Header | API key 관리 목적 설명 + 1차 CTA | text.primary, text.secondary, action.primary |
default | @upstageai/ui Button |
| Quota strip | 현재 사용량 / 잔여 키 수 안내 | surface.subtle, text.secondary, state.warning (잔여 적을 때) |
default, warning | @upstageai/ui Badge |
| Key list | active API keys 표 | surface.default, border.subtle, text.primary, state.disabled (revoked) |
empty, loading, default | @upstageai/ui Table, @upstageai/ui Skeleton, @upstageai/ui Badge |
| Create key dialog | 새 키 생성 (name, scope) + 결과 표시 | surface.overlay, action.primary, action.secondary, state.success, state.error |
default, loading, error, success | @upstageai/ui Dialog, @upstageai/ui Input, @upstageai/ui Button |
| Revoke confirm | 키 제거 확인 (destructive) | action.destructive, surface.overlay |
default, loading, success | @upstageai/ui AlertDialog, @upstageai/ui Button |
Copy
- title:
API keys - description:
Create and manage keys for API access. - primaryCta:
Create key - emptyState:
No API keys yet. Create your first key to start using Upstage APIs. - errorState:
Couldn't load your API keys. Try again or contact support if this keeps happening. - successState:
Key created. Copy it now — you won't be able to see it again.
Code Notes
- framework: Next.js 14 App Router
- styling: Tailwind 3
- components:
@upstageai/ui Button,Table,Badge,Dialog,AlertDialog,Input,Skeleton - 새 컴포넌트 생성 없음.
- 모든 색은
hsl(var(--*))또는var(--*). raw hex / fallback hex 없음. - modal z-index:
var(--z-modal).
Used Token Intents
action.primary, action.secondary, action.destructive, surface.default, surface.subtle, surface.overlay, text.primary, text.secondary, border.subtle, state.warning, state.success, state.error, state.disabled, focus.ring, motion.duration.
Self-Check
{
"contextMatch": {
"status": "pass",
"context": "product",
"notes": "Authenticated console settings — Product context 정확히 일치."
},
"tokenIntentUsage": {
"status": "pass",
"used": [
"action.primary", "action.secondary", "action.destructive",
"surface.default", "surface.subtle", "surface.overlay",
"text.primary", "text.secondary", "border.subtle",
"state.warning", "state.success", "state.error", "state.disabled",
"focus.ring", "motion.duration"
],
"unknown": []
},
"forbiddenRules": {
"status": "pass",
"violations": [],
"exceptionsClaimed": []
},
"codeSafety": {
"rawHex": "pass",
"fallbackHex": "pass",
"magicZIndex": "pass",
"textGradient": "pass"
},
"copyTone": {
"status": "needs-review",
"language": "en",
"notes": "Upstage 톤 — precise / confident. 한글 카피 필요 시 사람 reviewer 확인 권장."
},
"brandRules": {
"b3FeaturedCardOnePerGrid": "n/a",
"b5OnePrimaryCta": "pass",
"b7SemanticOverPrimitive": "pass"
},
"humanReviewNeeded": [
"Confirm final copy tone (KO/EN policy)",
"Confirm route placement (/settings/api-keys vs /developer/keys)",
"Confirm quota strip 표시 정책 (always show vs 임계 이하만)"
],
"limitations": [
"실제 컴포넌트 visual 검증 불가 (텍스트 기반 작업)",
"Backend API contract 미확인"
]
}
Reviewer Note (사람 검수용 빈칸)
- [ ] Context: Product 맞는가?
- [ ] empty / loading / error / success 모두 의도와 맞는가?
- [ ] CTA hierarchy (Create key 1개 + revoke는 행별 ghost) 맞는가?
- [ ] copy 톤이 콘솔 다른 페이지와 일관되는가?
- [ ] dialog 안 key copy UX가 안전한가? (한 번만 보여주기 / clipboard 보장 / 다운로드 옵션)
- [ ] mobile 대응 우선순위?