{
  "$schema": "https://upstage.ai/design-system/schemas/context-routing/0.1.0",
  "version": "0.2.2",
  "createdAt": "2026-05-21",
  "contexts": [
    "product",
    "website",
    "marketing"
  ],
  "default": "product",
  "note": "agent는 작업 시작 전 selectedContext + reason + designFragment + tokenSources + forbiddenRules + humanReviewNeeded를 먼저 출력한다. 단, preRouting을 먼저 수행한다 — 재사용 확인은 컨텍스트 확정보다 앞선다.",
  "routes": [
    {
      "match": [
        "deck",
        "덱",
        "PPT",
        "PPTX",
        "발표자료",
        "프레젠테이션",
        "슬라이드",
        "slides",
        "presentation"
      ],
      "context": "marketing",
      "design": [
        "context/DESIGN.marketing.md",
        "context/marketing/decks.md"
      ],
      "tokens": [
        "deck/assets/upstage-deck.css"
      ],
      "rules": [
        "rules/forbidden-rules.json"
      ],
      "note": "Upstage 덱은 내부 카드/표/콘솔 키워드보다 산출물 포맷을 우선한다. Deck CSS만 로드한다."
    },
    {
      "match": [
        "console",
        "dashboard",
        "settings",
        "api key",
        "billing",
        "usage",
        "playground",
        "admin",
        "workspace",
        "component",
        "컴포넌트",
        "modal",
        "table",
        "form",
        "toast",
        "설정",
        "대시보드"
      ],
      "context": "product",
      "design": "context/DESIGN.product.md",
      "tokens": [
        "tokens/primitives.css",
        "tokens/tokens.product.css",
        "tokens/typography.css",
        "tokens/typography.product.css",
        "tokens/layout.css",
        "tokens/motion.css",
        "tokens/motion.product.css",
        "tokens/a11y.css",
        "tokens/a11y.product.css",
        "tokens/base.shared.css",
        "tokens/base.product.css"
      ],
      "rules": [
        "rules/forbidden-rules.json",
        "rules/a11y-contract.json"
      ]
    },
    {
      "match": [
        "stages.ai",
        "upstage.ai",
        "website",
        "homepage",
        "pricing",
        "docs landing",
        "product overview",
        "company",
        "careers",
        "cta",
        "banner",
        "hero",
        "section",
        "card",
        "footer",
        "nav",
        "navbar",
        "배너",
        "히어로",
        "섹션",
        "카드",
        "푸터",
        "내비",
        "솔루션",
        "solutions",
        "use case",
        "유즈케이스",
        "blog",
        "블로그",
        "customers",
        "고객사",
        "partners",
        "파트너"
      ],
      "context": "website",
      "design": [
        "context/DESIGN.website.md",
        "context/website-style-guide.md",
        "context/website-hero-types.md",
        "context/website-section-patterns.md"
      ],
      "tokens": [
        "tokens/primitives.css",
        "tokens/tokens.product.css",
        "tokens/website.css",
        "tokens/typography.css",
        "tokens/typography.product.css",
        "tokens/layout.css",
        "tokens/motion.css",
        "tokens/motion.product.css",
        "tokens/a11y.css",
        "tokens/a11y.product.css",
        "tokens/base.shared.css",
        "tokens/base.product.css",
        "tokens/base.website.css",
        "tokens/a11y.website.css"
      ],
      "rules": [
        "rules/forbidden-rules.json",
        "rules/a11y-contract.json"
      ]
    },
    {
      "match": [
        "campaign",
        "landing",
        "webinar",
        "ebook",
        "sales",
        "event",
        "flyer",
        "brochure",
        "social asset",
        "ad",
        "promotion",
        "카드뉴스",
        "캐러셀",
        "carousel",
        "deck",
        "덱",
        "포스터",
        "원페이저",
        "플라이어",
        "브로셔",
        "인쇄물",
        "one-pager"
      ],
      "context": "marketing",
      "design": "context/DESIGN.marketing.md",
      "tokens": [
        "tokens/primitives.css",
        "tokens/tokens.marketing.css",
        "tokens/typography.css",
        "tokens/layout.css",
        "tokens/motion.css",
        "tokens/a11y.css",
        "tokens/base.shared.css",
        "tokens/base.marketing.css"
      ],
      "rules": [
        "rules/forbidden-rules.json",
        "rules/a11y-contract.json"
      ]
    }
  ],
  "tieBreakers": [
    {
      "if": "requested deliverable is an Upstage deck, PPT, or presentation, even if it describes Console/Product",
      "context": "marketing",
      "note": "Use context/marketing/decks.md and deck/assets/upstage-deck.css only."
    },
    {
      "if": "requested deliverable is the console workflow or authenticated app UI itself, including its print button or print dialog",
      "context": "product",
      "note": "인쇄 기능을 가진 제품 화면은 Product다. 콘솔을 설명하는 종이 브로셔를 UI 자체로 보지 않는다."
    },
    {
      "if": "requested deliverable is a physical printed marketing artifact, even if it describes product UI",
      "context": "marketing",
      "note": "출력 채널 print를 적용한다. 화면의 인쇄 버튼 UI 또는 print 코드 설명은 해당하지 않는다."
    },
    {
      "if": "public website with product explanation",
      "context": "website"
    },
    {
      "if": "campaign conversion page or sales material",
      "context": "marketing"
    },
    {
      "if": "interactive component on a marketing page (chat, lead form, demo)",
      "context": "product",
      "note": "Hybrid — Marketing surface + Product interactive variant. Animation/decorative는 Marketing, 상호작용은 Product 표준 (ARIA, focus, keyboard)"
    }
  ],
  "outputContract": {
    "format": "markdown",
    "template": [
      "## Context Routing",
      "",
      "- selectedContext: <product|website|marketing>",
      "- reason: <1-2문장>",
      "- designFragment: context/DESIGN.<context>.md",
      "- tokenSources: [tokens/...]",
      "- forbiddenRules: rules/forbidden-rules.json",
      "- humanReviewNeeded: [...]"
    ]
  },
  "examples": [
    {
      "input": "콘솔의 API Key 설정 페이지",
      "output": {
        "selectedContext": "product",
        "reason": "Authenticated console settings workflow",
        "designFragment": "context/DESIGN.product.md",
        "tokenSources": [
          "tokens/tokens.product.css"
        ],
        "humanReviewNeeded": []
      }
    },
    {
      "input": "AI Stages homepage hero section",
      "output": {
        "selectedContext": "website",
        "reason": "Public product website / hybrid product explanation",
        "designFragment": "context/DESIGN.website.md",
        "tokenSources": [
          "tokens/tokens.product.css",
          "tokens/website.css"
        ],
        "humanReviewNeeded": [
          "Confirm Website exceptions"
        ]
      }
    },
    {
      "input": "12월 Solar 컨퍼런스 웨비나 랜딩",
      "output": {
        "selectedContext": "marketing",
        "reason": "Campaign conversion page",
        "designFragment": "context/DESIGN.marketing.md",
        "tokenSources": [
          "tokens/tokens.marketing.css"
        ],
        "humanReviewNeeded": [
          "Confirm campaign copy tone"
        ]
      }
    },
    {
      "input": "Marketing landing 안에 들어갈 demo chat widget",
      "output": {
        "selectedContext": "product",
        "reason": "Hybrid — Marketing surface + Product interactive variant. 상호작용성 있는 컴포넌트는 Product 표준",
        "designFragment": "context/DESIGN.product.md",
        "tokenSources": [
          "tokens/tokens.product.css"
        ],
        "humanReviewNeeded": [
          "Marketing surface와 시각 위계 충돌 여부",
          "ARIA/focus/keyboard 확인"
        ]
      }
    },
    {
      "input": "콘솔의 인쇄 버튼과 인쇄 설정 UI",
      "output": {
        "selectedContext": "product",
        "reason": "만드는 대상은 인증된 제품 UI 자체다. 인쇄 기능 이름은 출력 채널이 아니다.",
        "designFragment": "context/DESIGN.product.md",
        "tokenSources": [
          "tokens/tokens.product.css"
        ],
        "humanReviewNeeded": [],
        "outputChannel": "screen"
      }
    },
    {
      "input": "콘솔 기능을 설명하는 인쇄소 납품용 브로셔",
      "output": {
        "selectedContext": "marketing",
        "reason": "만드는 대상은 종이 브로셔다. 소재가 콘솔이라고 Product UI로 라우팅하지 않는다.",
        "designFragment": "context/DESIGN.marketing.md",
        "tokenSources": [
          "tokens/tokens.marketing.css"
        ],
        "humanReviewNeeded": [
          "인쇄소 납품 사양 확인"
        ],
        "outputChannel": "print"
      }
    }
  ],
  "updatedAt": "2026-09-18",
  "pathBase": "모든 design/tokens/rules 경로는 Skill 루트의 references/starter-kit/ 기준이다.",
  "preRouting": {
    "rule": "컨텍스트를 정하기 전에 먼저 한다",
    "steps": [
      "**신규 컴포넌트·섹션 요청이면 기존 것부터 확인한다.** CTA·배너·히어로·카드·폼처럼 이미 있는 것을 새로 만들려는 요청인지 본다. Webflow 컴포넌트 34개 중 CTA만 7종이고 테스티모니얼 3종은 인스턴스가 1개다 — 복제로 늘어난 결과다. context/website-section-patterns.md 「손으로 만들기 전에 컴포넌트를 본다」 표를 읽는다.",
      "히어로면 context/website-hero-types.md 에서 유형(T1~T4)을 고른다. 페이지 이름으로 만들지 않는다.",
      "공통 층(헤딩·본문·버튼·색·간격)이면 context/website-style-guide.md 에 이미 있는지 본다.",
      "**라우팅 키워드에 안 걸려도 여기서 멈추지 않는다.** 매치가 없으면 default(product)로 가되, 무엇을 만드는지 사용자에게 한 줄 확인하고 진행한다. 라우팅 실패를 이유로 작업을 중단하지 않는다."
    ],
    "why": "2026-08-21 테스트에서 \"CTA 배너 새로 만들어줘\"가 실패했다. CTA·배너가 match 키워드에 없다는 이유로 멈췄고, 컨텍스트 미확정을 이유로 DESIGN.website.md조차 읽지 않았다. 재사용 규칙이 라우팅 게이트 뒤에 가려져 도달하지 못한 것이다."
  },
  "outputChannels": {
    "evaluation": "산출물 컨텍스트·포맷을 정한 다음, 키워드 매치와 별도로 실제 출력 의도를 판단한다.",
    "print": {
      "when": "실제 종이 출력이 요청되거나 작업 납품 조건으로 확정된 경우에만 추가로 로드한다.",
      "design": [
        "context/DESIGN.print.md"
      ],
      "rules": [
        "rules/print-specs.json"
      ],
      "context": "marketing",
      "preserveFormat": "덱은 Deck 프로파일과 전용 CSS를 유지한다. 출력 채널 때문에 웹/Product 토큰을 섞지 않는다.",
      "exclude": "화면용 PPT·디지털 카드뉴스·웹·다운로드 PDF만 요청된 경우. 디지털과 인쇄를 모두 요청하면 출력 파일별로 적용한다. 화면의 인쇄 버튼·인쇄 설정 UI 또는 print 코드 설명에도 적용하지 않는다.",
      "unclear": "원페이저·포스터·PDF라는 이름만으로 인쇄를 단정하지 않는다. 초안은 진행하고 인쇄 납품 전 채널을 확인한다."
    }
  }
}
