SkillAtlasSkill 详情

design-first

Composable AI skills that teach assistants structured thinking — design-first, context-aware, an...

审核状态:已审核Quality 80Security 62

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年9月11日

Lattice

lattice

Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.

License: MIT Claude Code Cursor PRs Welcome martinfowler.com StarMapper

What is Lattice?

AI coding assistants jump straight to code, silently make design decisions, forget constraints mid-conversation, and produce output nobody reviewed against real standards. Lattice fixes this with composable skills in three tiers — atoms, molecules, refiners — that embed battle-tested engineering disciplines plus a living context layer that accumulates your project's standards, decisions, and review insights across every feature cycle.

Three principles guided Lattice's design:

  • Skills over prompts — versioned, team-owned skill files in the repository beat personal prompts on one developer's machine
  • Composability over monoliths — small single-purpose skills that combine into workflows beat one instruction document that tries to cover everything
  • Living context over static config — the .lattice/ folder grows smarter with every feature cycle rather than being configured once and forgotten

The Three Tiers

TierPurpose
AtomsSingle-principle guardrails — clean code, architecture, DDD, secure coding, test quality, design-first, and more
MoleculesMulti-step workflows that compose atoms — design, implement, refactor, fix, review
RefinersGuided interviews that produce project-specific standards, customizing how atoms behave for your team

The Composability Model

See How It Works for the full skill inventory and mechanics.

The Pipeline

Skills form a delivery lifecycle: requirement-forge → design-blueprint → code-forge → review, with refactor-safely and bug-fix covering structural and defect-driven work. requirement-forge starts the pipeline — it acts as a senior PM + BA pair to produce structured feature specs in .lattice/requirements/ that feed directly into design-blueprint. For teams with existing codebases, architecture-compass sits before the pipeline — it scans the repository, runs a structured interview, and produces an agreed architectural direction that orients the team before any code changes begin. Each stage consumes and produces artifacts in .lattice/, growing the living context layer.

Feature Lifecycle Pipeline

Getting Started

  1. Install Lattice — choose the path that fits your setup:

    Option A — Claude Code plugin (also works in Cursor — reads Claude Code skills automatically)

    /plugins marketplace add techygarg/lattice
    /plugins install lattice
    /reload-plugins
    

    Option B — Codex-compatible plugin package

    codex plugin marketplace add techygarg/lattice
    codex plugin add lattice@lattice
    codex plugin list | rg -i lattice
    

    The Codex plugin manifest lives in .codex-plugin/ and is registered by .agents/plugins/marketplace.json. Like every host plugin here, it's a thin manifest only — it points at the same shared, flat skills/ folder every other host uses, plus the verification runner script (scripts/run-verification.sh) — Codex has no subagent concept, so verification always runs the script directly rather than via a subagent. Grok (.grok-plugin/) and Kimi (.kimi-plugin/) follow the same pattern.

    Option C — Clone and install locally (any AI tool)

    git clone https://github.com/techygarg/lattice.git
    cd lattice
    ./tools/install.sh /absolute/path/to/your/skills/folder
    

    Pass the skills directory for your tool: ~/.claude/skills/ for Claude Code, .cursor/skills/ for Cursor, or any tool's skills folder.

    Option D — Agent Plugins 1.0-conformant clients A root plugin.json conforming to the open, vendor-neutral Agent Plugins standard ships alongside the host-specific manifests above — any conformant client auto-discovers skills straight from the skills/ folder with zero extra install steps. Shipped in Codex CLI, Cursor, VS Code / GitHub Copilot, and Kiro as of this writing.

    See docs/plugins.md for the full per-host status table and how to add a new host.

    Try it immediately. The repo includes sample/ — a realistic .NET 8 User Service spec with requirements, domain concepts, and constraints already written. Copy the sample/ folder contents into any empty directory and follow the steps below.

  2. Run /lattice-init in your AI tool's chat — scans the project, suggests refiners in priority order, creates .lattice/config.yaml. All skill commands (/lattice-init,/requirement-forge, /design-blueprint, /code-forge, etc.) are typed in the AI chat, not the terminal.

  3. Spec (optional but recommended) — /requirement-forge acts as a senior PM + BA pair to define epics and feature specs before any design begins. Accepts existing PRDs, feature lists, or a verbal description. Produces .lattice/requirements/ as direct input to design-blueprint.

  4. Design — /design-blueprint walks through five progressive design levels before any code is written.

  5. Implement — /code-forge generates implementation from the approved blueprint, applying all quality atoms.

  6. Review — /review audits the change and persists insights into .lattice/ for the next cycle.

Learn More

  • Origin Story — why Lattice exists, how five collaboration patterns became an installable framework, and the design philosophy behind it
  • How It Works — full skill inventory, composability mechanics, atoms/molecules/refiners in depth, the pipeline
  • Practical Guide — scenario-driven Q&A: getting started, customization, workflow, transformation, team usage, troubleshooting
  • Architecture Compass — the architectural thinking partner: why it exists, what to expect, and how a session works
  • Configuration Reference — every .lattice/config.yaml key documented
  • Framework Intelligence — verification passes, feedback loops, AI compliance techniques
  • Collaborative Judgment — why AI should ask on genuine judgment calls or missing/conflicting facts and how it works at runtime
  • Verification Agent — why the verifier subagent exists, the cost model behind it, and how to enable the done-gate manually or automatically per project
  • The Article Series — the five collaboration patterns Lattice operationalizes (martinfowler.com)

Dev Skills

Helper skills for creating and maintaining Lattice itself — see dev-skills/.

StarMapper

StarMapper

License

MIT

开发与工程

高风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 未检测到明显外部权限要求。
  • 存在潜在风险命令,请谨慎安装。
  • 扫描发现:1 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/techygarg/lattice.git
  3. 将 "skills/design-first" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/techygarg/lattice.git
  3. 将 "skills/design-first" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/techygarg/lattice.git
  3. 将 "skills/design-first" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/techygarg/lattice.git
  3. 将 "skills/design-first" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/techygarg/lattice.git
  3. 将 "skills/design-first" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: design-first
description: "Guide structured design thinking through 5 progressive levels before any code is written. Levels: Capabilities, Components, Interactions, Contracts, Implementation. Use when building new features, refactoring significant code, designing modules, or when the user says 'design this', 'architect this', 'let's think before coding', 'walk me through the design', or 'whiteboard this'. For simple utilities enter at Level 4 (Contracts), for single-component tasks at Level 2 — see Complexity Calibration. Do not use for quick bug patches."

Design-First (Progressive Design Facilitation)

The 5 Levels

Level 1: Capabilities (The "What")

Purpose: Confirm scope. Surface the user-facing outcomes the system must deliver. Shared vocabulary check — ensure the human and the AI are talking about the same feature with the same boundaries.

Output format: Numbered list of user-facing capabilities, max 5. Each capability is a plain-language outcome, not an implementation detail.

Boundary: No components, no architecture, no technical detail. If a capability mentions a specific technology, class, or data structure, it belongs at a later level. This level answers only "what does the user get?"

Checkpoint: "Does this Level 1 (Capabilities) look correct? Should I proceed to Level 2 (Components)?"

Level 2: Components (The "Who")

Purpose: Identify the building blocks. What major pieces does the system have, and what is each one responsible for?

Output format: 3-5 components, each with a single responsibility and a one-line description. Include an ASCII or Mermaid diagram showing how they relate. Note integration points with existing infrastructure.

Boundary: No data flow, no sequence of operations, no interaction detail. Describe each component by what it is and what it owns — not how it communicates with others. If you find yourself writing "A sends X to B", that belongs at Level 3.

Checkpoint: "Does this Level 2 (Components) look correct? Should I proceed to Level 3 (Interactions)?"

Level 3: Interactions (The "How They Talk")

Purpose: Define the data flow between components. How do the building blocks communicate to deliver the capabilities?

Output format: A sequence diagram (ASCII or Mermaid) or a numbered flow showing the order of operations. For each interaction, describe WHAT data passes between components. See ./references/methodology-detail.md for notation guidance.

Boundary: No function signatures, no type definitions, no implementation detail. Focus on what passes between components, not how each component processes internally. If you are defining method parameters or return types, that belongs at Level 4.

Checkpoint: "Does this Level 3 (Interactions) look correct? Should I proceed to Level 4 (Contracts)?"

Level 4: Contracts (The "Interface Definitions")

Purpose: Define the interfaces, method signatures, and type definitions that formalize the interactions. This is the handoff artifact — the specification that implementation is built against.

Output format: Typed interfaces, method signatures, type definitions in a language-appropriate format (TypeScript interfaces, Java interfaces, Python protocols, etc.). Use the project's primary language; if ambiguous, ask before writing contracts. No function bodies — signatures and types only. Include error/failure types where interactions can fail. See ./references/methodology-detail.md for interface definition patterns.

Boundary: No implementation logic. If a function body appears, it belongs at Level 5. Contracts reflect the design agreed at Levels 1-3, nothing more — no utility functions, helper methods, or convenience wrappers that are not part of the design. Every Level 3 interaction must map to at least one interface or type; no new interactions may appear here that were not agreed at Level 3.

Checkpoint: "Does this Level 4 (Contracts) look correct? Should I proceed to Level 5 (Implementation)?"

Level 5: Implementation (The "Code")

Purpose: Write code. Implement against the agreed contracts, within the agreed component boundaries, following the agreed interaction patterns.

Output format: Working code that fulfills the contracts defined at Level 4, each component implemented within its agreed boundary. The implementation is reviewable against the design: each component checked against its Level 2 description, each interaction against its Level 3 flow, each interface against its Level 4 contract.

STOP: Only after Level 4 is explicitly approved. Implementation follows the design; it must not introduce new components, new interactions, or new contracts that were not agreed upon.

The Zero Implementation Rule

No code until the design is agreed.

STOP: If you catch yourself writing function bodies before Level 5 is approved, return to the current design level and present only the output appropriate to that level.

Complexity Calibration

Task ComplexityStart AtExample
Simple utilityLevel 4 (Contracts)Date formatter, string helper
Single componentLevel 2 (Components)Validation service, API endpoint
Multi-component featureLevel 1 (Capabilities)Notification system, payment flow
New system integrationLevel 1 + deep Level 3Third-party API, event pipeline

Entry Assessment

Before producing the first level output, state the entry level and rationale:

"Based on [complexity signal], I'll start at Level [N] ([name]). Earlier levels are implicitly agreed — [brief statement of what's assumed]. Want to start here or go broader?"

Wait for confirmation before producing the first level output. If the user disagrees, adjust the entry point.

Level Completion Protocol

At the end of each level:

  1. Present the level output in the format specified for that level (numbered list, diagram, sequence flow, or interfaces).
  2. Self-check: is this simpler than it could be? If a simpler alternative exists, present it alongside: "I have a simpler option — [alternative]. Which do you prefer?"
  3. Ask the gating question: "Does this Level [N] look correct? Should I proceed to Level [N+1]?"
  4. STOP: Wait for explicit approval. Do not advance on silence or ambiguity.
  5. If the user redirects, corrects, or raises concerns, revise the current level. Do not advance until the revision is approved.

Level 5 exit: there is no Level 6 — at Level 5 the protocol ends after step 2. Present the implementation for review instead of asking a gating question; the skill is complete once the user accepts the implementation or requests revisions to it.

Out-of-level input: If the user provides detail belonging to a later level (e.g., interaction detail during Level 2), acknowledge it — "Good thinking, I'll capture that at Level [N] ([name])" — and continue the current level. Do not ignore or reject it.

Backtracking: If a later level reveals a gap in an earlier level (e.g., a missing component discovered during Level 3), name the gap, propose a revision to the earlier level, get approval for the revision, then resume the current level.

Scope expansion at Level 5: If the user requests new scope during implementation, assess the impact. If it affects components or interactions, propose a mini-loop back to the affected level for agreement. If it is purely implementation detail (logging, config), incorporate it directly.

Mid-level exit: If the user says "skip to code" or "just implement it" before the design is complete, acknowledge the tradeoff before proceeding: "Skipping Level [N] means [what hasn't been aligned] — I'll flag any design gaps I notice as I implement. Proceeding now." Then implement. Do not refuse or block; note the risk and move forward.

Simplicity Check (Every Level)

Actively push back on unnecessary complexity: capabilities beyond scope, components that could merge, interaction steps that add no value, contracts carrying utility functions nobody requested. Present the simpler alternative first. Let the user choose to add complexity rather than have to remove it later.

Anti-Patterns

Anti-PatternSymptomFix
Level CollapseComponents described with implementation codeStrip the code; return to component boundaries only
Scope CreepLevel 1 lists capabilities not in the requirementsRemove unrequested items; confirm scope
Premature DetailLevel 2 includes sequence diagrams or data flowMove interaction detail to Level 3
Gold PlatingContracts include utility functions not in the designRemove them; contracts reflect the design, not extras
Skipping LevelsJump from Level 1 to Level 4Back up; each level constrains the next
Silent AdvancementMoving to the next level without explicit approvalAlways ask the gating question and wait
Feature InjectionAdding rate limiting, analytics, or hooks nobody asked forRemove unrequested features; design only what was requested

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!