Logo Design Baseline

Design Baseline

Cộng đồng
Bandersnatch0x
design-baseline

Khám phá, xác thực hoặc phác thảo DESIGN.md thuộc dự án trước khi thêm hay chỉnh sửa giao diện trong một frontend hiện có. Dùng khi khởi tạo design playbook trong một kho mã đã có trang, component, theme, token hoặc style; khi giao diện mới không nhất quán với các phần hiện có; khi DESIGN.md có thể đang thiếu, chưa đầy đủ, mâu thuẫn hoặc lỗi thời; hoặc khi người dùng muốn tạo hệ thống thiết kế từ mã nguồn frontend hiện có. Tạo bản nháp có nguồn gốc rõ ràng và yêu cầu xác nhận trước khi tạo hoặc thay thế chuẩn nền tảng lâu dài.

Add to TypingMind

Tổng quan

Nhà phát hànhBandersnatch0x
Kho mãdesign-playbook
Tên kỹ năngdesign-baseline
Sao
3
Bản fork
0
Tệp đi kèm
4
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Bandersnatch0x công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Design Baseline trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Bandersnatch0x/design-playbook/tree/main/packages/design-playbook/skills/design-baseline
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Bandersnatch0x/design-playbook.git /tmp/design-playbook
mkdir -p .claude/skills
cp -r /tmp/design-playbook/packages/design-playbook/skills/design-baseline .claude/skills/design-baseline
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Design Baseline trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Design Baseline ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Design Baseline với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

design-baseline

Establish one project-owned visual authority before UI decisions or Fill. Treat existing code and rendered pages as evidence, not as permission to silently rewrite DESIGN.md.

Authority boundary

This skill ownsDoes not own
Discovering and structurally validating project DESIGN.mdFunctional success criteria (spec L1–L6)
Extracting a draft from first-party frontend sourceThird-party reference Keep, Change, and Do not copy (reference-intake)
Source hashes, observed and inferred labels, confidence, unresolved gapsComponent and template selection (ui-picker)
Confirmation before a durable baseline writePass or Fail verdict (ui-evaluator)

Canonical authority is <project-root>/DESIGN.md. Accept .stitch/DESIGN.md as a compatibility candidate only. If both exist with different content, stop for an explicit user choice. Never merge them silently.

Deep module (SSOT for deterministic work)

All path resolution, scanning, drafting, hashing, durable write, and re-verification live in one module:

scripts/design_baseline.py

Public interface:

python
prepare(project_root, run_root) -> state
confirm(project_root, run_root, decision, reason=None) -> state
verify(project_root, run_root) -> state

CLI:

text
python scripts/design_baseline.py prepare <project_root> <run_root>
python scripts/design_baseline.py confirm <project_root> <run_root> --decision accept|waive [--reason ...]
python scripts/design_baseline.py verify  <project_root> <run_root>

On Windows, non-ASCII --reason text can be mangled between shell and Python (ANSI code page, e.g. GBK on zh-CN). When argv carries undecodable bytes, confirm refuses with an error instead of persisting mojibake. Prefer the module API (confirm(project_root, run_root, decision, reason=...)) or ASCII text for CLI --reason with non-ASCII content.

State is a cache, not authority. Every public call resolves paths against the supplied project root. verify re-hashes the bound baseline and its first-party sources before returning a downstream binding. Fill and other consumers may only use a binding that just passed verify.

statusMeaning
readyBound baseline (decision.kind = existing or accepted)
needs_confirmationProvenance-backed draft awaits accept or waive; baseline_rejection records why an existing candidate was not bound (null when none existed)
waivedExplicit waiver confirmed by this run's user, carrying that user's non-empty reason
ambiguousConflicting candidates. Human choice required

Workflow

1. Classify the project

Apply the existing-product gate when the orchestrator returned requires_baseline, including durable review, diagnosis, or plan work on an existing product. Skip when entry routing returned no-run or did not set requires_baseline. Do not independently reclassify the repository as greenfield to skip after routing. Narrate the skip in one line.

Done when: the run records existing-product or greenfield, with the file signals used for that classification.

2. Prepare (prepare)

Run prepare(project_root, run_root). Deterministic code:

  • discovers DESIGN.md / .stitch/DESIGN.md (rejects escaping symlinks);
  • validates a complete existing baseline in place;
  • or scans first-party theme, token, style, component, and page sources, writes evidence.json + DESIGN.draft.md, and returns needs_confirmation;
  • writes .scratch/<run>/design-baseline/state.json (schema: design-baseline/v1).

Agent work after prepare:

  • if status is ready then cite path + sha256 and continue;
  • if ambiguous then stop for the smallest user decision. Never invent a third authority;
  • if needs_confirmation then review the draft. Optionally enrich only material claims with [inferred confidence=…] in the draft file, then re-run prepare if structure and sources changed (do not hand-edit hashes). When baseline_rejection is set, an existing DESIGN.md was rejected for the stated reason, accepting the draft replaces it (a backup is kept; see Confirm).

Never write or overwrite project DESIGN.md in this step.

Done when: state.json exists with one of the four statuses above. Drafts carry source paths + SHA-256 and observed and inferred labels.

3. Confirm or waive (confirm)

Show a compact summary: atmosphere, core tokens, typography, layout, shared components, conflicting evidence, inferred claims. Ask before the durable write.

  • Accept. confirm(..., decision="accept") atomically writes canonical <project-root>/DESIGN.md from the bound draft and returns a ready state. If a differing DESIGN.md already exists, the previous content is backed up byte-exact first and the state records it as replaced_baseline (path, sha256, backup). The CLI prints an overwrite warning with the backup path.
  • Waive. confirm(..., decision="waive", reason=<user reason>) does not write DESIGN.md. Existing-product Fill may continue only after this explicit waiver. A waiver belongs to the user, not the agent. Recommending it is allowed, but the first waiver of a run must be put to this run's user and answered there. The reason carries what that user actually said. A waiver or ruling from an earlier run, another agent, or a surviving state.json is provenance, not this user's consent. ADR-0033 draws the same boundary for repository-stored preferences. Never call confirm(..., "waive") before this run's user has answered.
  • Revise. edit only the draft (or fix sources), then prepare again.

Never infer acceptance from silence. Never replace a valid baseline merely because extraction found different implementation details. Report the drift for a decision.

Done when: state.json is ready (existing or accepted) or waived with a non-empty reason given by this run's user.

3a. Promote an adjudicated component (promote)

A component promotion requires a user promotion_decided/promote governance event and a fresh execution-time check. The source must be a real project-relative file. The current .scratch/<run>/decision-report.md history must still meet the component threshold. The governance event alone is not a durable bypass for stale or fabricated candidates. Token promotion remains governed separately because token candidate extraction is a different input seam.

4. Verify before Fill (verify)

Immediately before Fill (and any time a consumer needs a binding), call verify(project_root, run_root).

  • Re-checks path containment, baseline hash, source freshness, and provenance alignment. Promoted component sources are bound by source_sha256. Source drift fails closed and requires a fresh adjudication and promotion rather than silently updating the binding.
  • Rejects forged state.json, stale sources, candidate conflicts, and symlink escape.
  • On success, returns the binding: baseline path + sha256 (or an explicit waiver).

Downstream may only consume this verified result, not a hand-edited confirm file and not a draft.

Done when: verify returns without error. The decision report can cite design-baseline: <path> sha256:<digest> or waived:<reason>.

5. Bind downstream consumers

ConsumerRequired behavior
ui-pickerCite the verified baseline in the decision report. Preserve visual roles, density, layout, and component conventions unless a declared change is approved
FillUse project tokens and shared components. Log missing roles instead of inventing raw values. Gate on successful verify
craft-guardTreat obvious baseline drift as a craft failure, not merely personal taste
ui-evaluatorPoint observable drift back to DESIGN.md. The baseline is supporting declaration evidence, never L6 runtime proof by itself

Third-party or sample DESIGN.md files remain reference-intake inputs. They never become project authority automatically.

Artifacts

text
<project-root>/DESIGN.md                            # durable authority after accept
.scratch/<run>/design-baseline/state.json           # gate cache (schema design-baseline/v1)
.scratch/<run>/design-baseline/evidence.json        # extraction evidence (when drafted)
.scratch/<run>/design-baseline/DESIGN.draft.md      # proposal; never authority by itself
.scratch/<run>/design-baseline/previous-DESIGN.md   # backup of a replaced DESIGN.md (when overwritten)

The deep module prepare/confirm/verify is the sole gate surface. An adopted existing DESIGN.md only needs to carry verifiable source provenance (path + SHA-256 under ## Source Evidence & Confidence) to be bound. The other section names in references/design-template.md are draft guidance, not a structural contract imposed on hand-written baselines.

Scope fence

InOut of scope
First-party visual baseline and provenanceFunctional behavior belongs to ux-spec
Existing-source extractionExternal inspiration belongs to reference-intake
Confirmation before durable writeScene, template, and component decision belongs to ui-picker
Baseline drift source for point-backRuntime evidence judgment belongs to ui-evaluator

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Design Baseline làm được gì?

Khám phá, xác thực hoặc phác thảo DESIGN.md thuộc dự án trước khi thêm hay chỉnh sửa giao diện trong một frontend hiện có. Dùng khi khởi tạo design playbook trong một kho mã đã có trang, component, theme, token hoặc style; khi giao diện mới không nhất quán với các phần hiện có; khi DESIGN.md có thể đang thiếu, chưa đầy đủ, mâu thuẫn hoặc lỗi thời; hoặc khi người dùng muốn tạo hệ thống thiết kế từ mã nguồn frontend hiện có. Tạo bản nháp có nguồn gốc rõ ràng và yêu cầu xác nhận trước khi tạo hoặc thay thế chuẩn nền tảng lâu dài.

Vì sao nên dùng Design Baseline trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Design Baseline là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Design Baseline trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Bandersnatch0x/design-playbook/tree/main/packages/design-playbook/skills/design-baseline. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Design Baseline?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Design Baseline với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Design Baseline với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Design Baseline có miễn phí không?

Kỹ năng này được Bandersnatch0x phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇