# Changelog

All notable changes to `baoyu-design` are tracked in this file.

## Unreleased

### Added

- Added end-to-end design-system support so a design project can follow an existing system: discovery, a sync step that copies a self‑contained, version‑pinned copy into `<project>/_ds/<slug>/`, page wiring, a generated per‑load binding prompt (`_ds_prompt.md`), and the binding recorded in `<project>/_d_meta.json` — documented in the new `use-design-system.md` built‑in skill.
- Added a portable design-system authoring pipeline: a compiler that bundles a system's tokens and React components for loading, a read-only checker (with a matching checker subagent) that validates a system without writing, and the `design-system-authoring-guide.md` flow.
- Added asset recording that indexes a project's deliverables and their review status in `_d_meta.json`, bootstrapping that metadata even when no design system is used.
- Added a read-only fork-verifier subagent (`agents/fork-verifier-agent.md`) for thorough post-build checks — it loads the served deliverable, catches console errors, screenshots the layout, and probes for overflow root causes and unresolved `var(--*)` tokens before returning a single done / needs-work verdict; the Claude Code, Cursor, and Codex harness references now resolve their `fork_verifier_agent` verification subagent to it.
- Added this changelog to keep project updates in one place.

### Changed

- Upgraded the generated per-load design-system prompt (`_ds/<slug>/_ds_prompt.md`) to the design-mode reference structure: a bundle-first wiring section that opens with the skill's pinned React/ReactDOM UMD tags and lists every stylesheet `<link>` in the `@import` closure plus the bundle `<script>` (plain compiled JS, loaded after React/ReactDOM — never `type="text/babel"`/`type="module"`), an explicit compose-with-the-bundle rule (don't recreate exported components or restyle raw HTML to imitate them), a destructure example using the system's real component names (constant-style exports such as `ICON_NAMES` are skipped as samples), a `type="text/babel"` + pinned Babel-standalone example showing how the page's own JSX is transpiled, the source-tree pointer ahead of the inlined guide, and a new `<ds-prompt-excerpts>` block reproducing the first lines of each component's `*.prompt.md` (those files aren't bound into `_ds/`). CSS-only and zero-component systems degrade to stylesheet-led wording; the import script's printed wiring report now matches the prompt, and `use-design-system.md` plus the core workflow document the new wiring.
- The design-system compiler now also exposes PascalCase exports of `.jsx`/`.tsx` files that lack a sibling `.d.ts` on `window.<Namespace>` (collision-guarded — a `.d.ts`-backed component always keeps its name), so such files are bundled and exported but carry no props contract, adherence rules, or starting-point eligibility.
- Expanded the authoring guide's GitHub source-import flow into concrete steps: browse a repo tree with `gh api` without cloning, sparse-checkout only the needed path prefixes into a scratch dir outside the design-system folder (a clone inside it would pollute compiler discovery), and stop to ask the user when a repo is private or unreachable.
- Aligned component authoring docs with the compiler: components import React only and may import siblings with relative paths (the compiler strips/rewrites these at bundle time); `app.css` is documented as an accepted global-CSS entry name.
- Project setup now asks where to save the project and which design system(s) to use (none, one, or several); reopening a project reloads its bound design systems from `_d_meta.json` before designing.
- Documented importing and using existing design systems in the English and Simplified Chinese README files.
- Clarified that final design and prototype delivery should include the running preview, not only the generated file.
- Updated Claude Code, Codex Agent, and Cursor harness references to make final preview handoff visible to the user after verification.
- Updated the English and Simplified Chinese README files to document Codex Agent support, the new `references/codex.md` harness map, install examples, usage notes, and changelog links.

## 2026-06-06

### Added

- Added Codex Agent support with `skills/baoyu-design/references/codex.md`, covering question asking, browser preview, screenshots, debugging, deliverable surfacing, and subagent verification defaults.
- Added English and Simplified Chinese README files.
- Added the portable `baoyu-design` Agent Skill, core design methodology, built-in skill prompts, starter components, and harness reference docs for Claude Code and Cursor.
- Added the initial repository files and MIT license.

### Changed

- Updated the skill entry flow to detect Codex Agent and fall back cleanly for Claude Desktop-like or other file-capable harnesses.
- Reworded preview and verification instructions in built-in export skills so they route through the selected harness reference instead of hard-coded preview tool names.
