Logo Program Design

Program Design

Cộng đồng
chanmathew
program-design

Lock the shape of the code — types, signatures, call stacks, file layout — before anyone writes production code.

Tổng quan

Nhà phát hànhchanmathew
Kho mãagent-skills
Tên kỹ năngprogram-design
Sao
26
Bản fork
1
Tệp đi kèm
1
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 là Markdown thuần túy, không phải 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ộ.

  • 1 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 chanmathew công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Program Design 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 thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/chanmathew/agent-skills/tree/main/program-design
  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/chanmathew/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/program-design .claude/skills/program-design
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 Program Design 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ự tải Program Design 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 Program Design không bị giới hạn ở mô hình mà kỹ năng này được viết cho. 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 kỹ năng chưa dùng không tốn chi phí.

  • Đổ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.

Program Design

Align on code shape before implementation: the types, signatures, call stacks, and file layout that architecture is too coarse for and review is too late to change. The model drafts compact sketches; you argue about taste; then you lock the shape. Nobody writes production code.

This is not an implementation spec. If you are writing function bodies, AC matrices, or a file-by-file work order, you have gone too far.

Core contract

  • Lock the program for one implementation unit: a ticket, or a capability whose architecture is already settled.
  • Behaviour comes from the spec and ticket. Architecture (if any) constrains seams. This skill owns taste — depth, naming, layout, call shape.
  • Inspect the repository. Prefer evidence over generic best practices.
  • Read-only: inspect code, docs, tests, and history; do not modify production code.
  • Draft sketches, grill taste forks, lock. Stop unless the user asks to continue.
  • Use /codebase-design language: module, seam, depth, interface.

When to use / skip

text
wayfinder → grill-with-docs → /to-spec
                 ↓
           /architecture     # system shape, if new seams / multi-ticket
                 ↓
           /program-design   # this skill
                 ↓
           /to-tickets → /implement
SituationSkill
Product or requirements still open/grilling / /to-spec first
New services, schemas, or module boundaries/architecture first
Obvious oneshot on an established patternSkip to /implement
Architecture is obvious; quality of the code is not/program-design
Ticket exists and this slice's internals matter/program-design on that ticket

Forbidden

  • Full function bodies
  • Per-AC behaviour matrices
  • Implementation sequences or phased checklists
  • Test-command and fixture inventories
  • Dual representation of the same fact
  • A second evidence appendix restating the sketches
  • Every available visual in one document
  • Box-drawing as the first character, ~ markers, column-padded comments, unicode ∧ ¬ ∨ ≠ in sketches

/to-spec and /to-tickets stay path-free. /architecture stays at module boundaries. /implement owns files, tests, and sequence.

Steps

1. Establish the unit

Read the ticket, spec, architecture (if any), ADRs, and project instructions.

Ready when the behaviour is clear and the remaining unknown is how the code should look. If behaviour is still open, stop and send the user back. If a multi-ticket spec is the only input and slice boundaries are unclear, send them to /to-tickets after this — or to /architecture if seams are also unclear.

Record the outcome in one sentence. Recommend defaults for non-blocking ambiguity. Stop for the user only when a taste fork would change public APIs, persistence, security, or system boundaries — those belong in architecture.

This step is complete when the unit and outcome are explicit.

2. Inspect the repository

Trace the current call path. Note symbols, types, helpers, and conventions this change should reuse. Conflicting patterns: pick one, with evidence.

This step is complete when every proposed seam has an existing counterpart or is named as new and justified.

3. Draft the smallest sketches

Pick only the views this change needs — usually two, rarely more than three. Follow references/program-design-template.md for rendering, including the sketch formatting rules. Those rules exist because chat highlighters, not the author, control color and wrapping.

Change is aboutView
Where it lives / what is newFile tree in diff — marker, then ├─ │ └─
Orchestration or control flowCall tree in diff — same glyphs as calldiff
Frontend structureComponent tree in diff
Types an agent would get wrongSignatures and types — no bodies
The algorithm is the decisionShort pseudocode

Use diff when the surrounding shape already exists. Show the whole block only when most of it is new.

Prefer, in order:

  1. Existing code over new code.
  2. Local code over a shared abstraction.
  3. Established repository patterns over new patterns.
  4. Explicit code over generic frameworks.
  5. A narrow implementation over speculative extensibility.
  6. One clear execution path over interchangeable layers.

New interfaces, factories, adapters, registries, or shared utilities require a current problem with multiple immediate call sites.

This step is complete when a reviewer can see the proposed program without reading prose around it.

4. Grill taste

Put the real forks to the user, one at a time, each with a recommendation. A taste fork is something a reviewer would fight about: deep vs shallow module, existing helper vs new file, sync vs job, this seam vs that one.

Revise the sketches after each answer. Do not interview about facts the repo already contains.

This step is complete when remaining forks are locked or explicitly deferred.

5. Lock

Persist only when a later session needs the sketches (/implement or /to-tickets in a fresh context). If none exists, use docs/agents/program-design/<short-slug>.md. For small work continuing in this conversation, the sketches in-chat are the artifact.

Before handing off, verify:

  • Two or three sketches, not a spec.
  • File layout and call stacks follow the sketch formatting rules in references/program-design-template.md (diff marker then ├─ │ └─, no ~, no padded comment columns, lines ~72 characters, predicates in words).
  • No function bodies, AC matrices, test commands, or implementation sequence.
  • Proposed symbols are marked; existing symbols come from the repo.
  • Taste forks are resolved or named as blocking.

Handoff

Report:

  1. Path to the document, or in-conversation.
  2. One-sentence summary of the locked shape.
  3. Blocking decisions, or None.
  4. Confirmation that production code was not modified.
  5. Next step:

If slices are not published:

text
/to-tickets using <program-design-path>

If a ticket already exists:

text
/implement <ticket> using <program-design-path>

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

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

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

Lock the shape of the code — types, signatures, call stacks, file layout — before anyone writes production code.

Vì sao nên dùng Program Design 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. Program Design 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 Program Design trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/chanmathew/agent-skills/tree/main/program-design. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành 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 Program Design?

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.

Bạn có thể dùng Program Design 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 Program Design 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 Program Design có miễn phí không?

Kỹ năng này được chanmathew 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 cho mô hình các công cụ mới để gọi — mã đượ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à tiêu chí của đầu ra tốt. 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 👇