Project Architect
Use this skill to enforce repository architecture constraints. In component builds, this runs after design extraction and before implementation.
Mandatory Execution Rules
- •Read this file before acting.
- •Execute all workflow steps in exact order.
- •Execute all sub-bullets under each step.
- •Do not skip, combine, or reorder steps.
- •If blocked or context is missing, resolve before moving on.
- •When done, return to
build-component.
Trigger
Use when implementation needs architectural guardrails for:
- •components,
- •tokens,
- •themes/regions,
- •page integration constraints.
In the build flow: build-component -> read-screenshot (if needed) -> project-architect -> implementation.
Do This First (Required)
- •Confirm scope type:
- •shared core change,
- •regional extension,
- •experiment.
- •Read
references/token-architecture.md. - •Read
references/golden-path-workflow.md. - •If region-specific work, read
references/regional-extension-guide.md.
Repository Contract (Must Keep)
- •One shared implementation for all regions.
- •Static pages remain:
index.html,article.html,design-manual.html. - •Token source is
assets/tokens.css; token consumer isassets/styles.css. - •Runtime theme switching only in
assets/theme.js. - •Shared JS entry point is
assets/script.js. - •Each new component gets its own folder:
- •
assets/components/<component-name>/ - •
<component-name>.css - •
<component-name>.jsonly if behavior requires JS.
- •
- •Component CSS/JS must be scoped.
- •Component CSS loads via
assets/styles.cssimports only (no page-level component<link>tags). - •Component JS loads via
assets/script.jsonly (no page-level component<script>tags). - •No per-region HTML forks; region differences come from tokens.
Hard Rules
- •Use tokens in component/layout CSS (
var(--...)). - •Typography in component CSS must use semantic typography tokens first (for example
font: var(--news-sys-typography-quote)), including font family, size, weight, and line-height. - •Do not use legacy typography aliases (
--font-*) inside component styles; reserve them for compatibility in shared/global legacy layers only. - •For Figma/screenshot component builds, reuse existing tokens by default.
- •Do not add new tokens unless user explicitly asks for token architecture changes.
- •Keep
assets/styles.csslimited to imports + shared/global rules (no component rule blocks there). - •Keep
assets/script.jsas shared registry/entry for component scripts. - •Keep theme IDs synchronized across:
- •selectors in
assets/tokens.css, - •
THEMESinassets/theme.js, - •theme picker option values.
- •selectors in
- •Avoid page-specific inline styles/scripts.
- •Keep semantic markup stable across pages.
Safe Change Workflow (Execute In Order)
- •Define semantic need (not raw styling).
- •Choose existing token(s) in
assets/tokens.css. - •For typography, choose semantic
--news-sys-typography-*/--md-sys-typescale-*tokens before setting discrete font properties. - •Do not override
font-size,font-weight, orline-heightin component rules when a semantic typography token is applied; if unavoidable, document the exception explicitly. - •If no exact token for screenshot/Figma task:
- •use closest semantic token,
- •document visual delta,
- •do not create new token by default.
- •Only if user explicitly requests, add/adjust tokens in
assets/tokens.css. - •If creating component, add
assets/components/<component-name>/and component files. - •Import component CSS from
assets/styles.css. - •If component JS exists, register/import from
assets/script.js. - •If adding theme/region, update both:
- •token override block in
assets/tokens.css, - •key in
assets/theme.js.
- •Validate:
- •theme selector works on all pages,
- •
localStoragekeytv2-region-themepersists, - •no hardcoded region colors in component rules,
- •no legacy
--font-*usage inside component CSS, - •no direct
font-size/font-weight/line-heightoverrides where semantic typography tokens already define them, - •component CSS/JS loading follows contract,
- •mobile and desktop render correctly.
Output Requirements
When done, report:
- •Constraints applied.
- •Architecture decisions made.
- •Files that must be touched (or avoided).
- •Any rule conflicts/blockers and how they were resolved.