复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Composable AI skills that teach assistants structured thinking — design-first, context-aware, an...
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.
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:
.lattice/ folder grows smarter with every feature cycle rather than being configured once and forgotten| Tier | Purpose |
|---|---|
| Atoms | Single-principle guardrails — clean code, architecture, DDD, secure coding, test quality, design-first, and more |
| Molecules | Multi-step workflows that compose atoms — design, implement, refactor, fix, review |
| Refiners | Guided interviews that produce project-specific standards, customizing how atoms behave for your team |

See How It Works for the full skill inventory and mechanics.
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.

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 thesample/folder contents into any empty directory and follow the steps below.
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.
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.
Design — /design-blueprint walks through five progressive design levels before any code is written.
Implement — /code-forge generates implementation from the approved blueprint, applying all quality atoms.
Review — /review audits the change and persists insights into .lattice/ for the next cycle.
.lattice/config.yaml key documentedHelper skills for creating and maintaining Lattice itself — see dev-skills/.
MIT
name: bug-fix
description: "Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality, and testing guardrails into a reproduce-first repair workflow. Use when the user says 'fix this bug', 'debug this', 'investigate this failure', 'patch this regression', 'repair this issue', or 'why is this broken'."Load these skills based on bug scope:
framework:knowledge-priming -- Load project context so the diagnosis grounds in the real codebase. (always)framework:context-anchoring -- Find and load the feature's context doc; capture diagnosis and repair decisions in it. (always)framework:learning-harvest -- Load prior operational learnings at session start; harvest new ones at session end. (always)framework:collaborative-judgment -- Surface hypotheses and repair trade-offs as structured options instead of silently assuming. (always)framework:clean-code -- Keep the fix focused, readable, and free of drive-by changes. (always)framework:test-quality -- Regression tests, characterization baseline, assertion quality. (always)framework:architecture -- Layer placement and dependency direction. (conditional: layer placement is in question — Steps 2/4/5)framework:domain-driven-design -- Domain invariants and aggregate behavior. (conditional: domain invariants involved — Steps 2/5)framework:secure-coding -- Trust bounds and sensitive data handling. (conditional: trust boundary crossed — Steps 2/5)Start from the failure, not from a proposed fix.
framework:learning-harvest Load behavior. Focus hint: "bug investigation — focus: reliability, quality signals".framework:context-anchoring Document Discovery to check for an existing context doc covering the affected feature/module:
End the step by summarizing the bug in one sentence:
"Observed X, expected Y, reproducible via Z."
STOP: If you cannot yet state the bug that clearly, gather more evidence before proposing any code changes.
Primary discipline: never present a fix for a bug you have not reproduced.
Reproduce the failure using the strongest evidence available, in this order:
Localize the issue before editing:
framework:architecture to identify which architectural layer the defect originates in.framework:secure-coding applies to the fix (Step 5).framework:domain-driven-design applies to the fix (Step 5).framework:architecture applies to the fix (Steps 4–5).If multiple plausible root causes remain, use framework:collaborative-judgment to present the leading hypotheses and what evidence would distinguish them.
Before writing any regression test, state the root-cause hypothesis explicitly via framework:collaborative-judgment:
"The bug is caused by [X]. When [C holds], the correct outcome should be [P]. We confirm this by writing a test that is red before the fix and green after."
If the user identifies a flaw in the hypothesis, revise it before writing tests.
End the step with an explicit bug contract:
C (bug condition): [exact input/state triggering the bug] P (fix postcondition): [what correct behavior looks like when C holds] Preserved: [what must remain identical for all inputs outside C]
STOP: If you cannot state all three, keep localizing before writing tests.
Persistence check — now that the bug is reproduced and localized, decide whether to persist the investigation:
framework:context-anchoring, then use it as the source of truth.Phase A — Bug-Condition Tests (must start RED)
framework:test-quality inline while writing it.Stopping rule:
framework:clean-code inline and keep the seam minimal.Phase B — Preservation Baseline (must stay GREEN)
Separate the repair strategy from the code change itself.
Before editing, decide:
Default to the smallest safe fix that restores correct behavior without architectural backsliding.
Guardrails:
framework:architecture layering rules when choosing the repair location — do not patch in an outer layer when the rule belongs inward./design-blueprint.Multiple valid repair strategies exist with meaningful trade-offs → present them using framework:collaborative-judgment before proceeding.
Always apply:
framework:clean-code -- keep the delta focused, readable, and easy to reason about.framework:test-quality -- maintain the regression test and any nearby supporting tests.Conditionally apply, based on the localized root cause:
framework:architecture.framework:domain-driven-design.framework:secure-coding.After implementing the fix, before presenting:
Verify the repair on three levels:
When reporting completion, be explicit about the verification scope:
If the fix is narrow and confidence is high, say so briefly. If verification is partial, say so clearly.
If a context doc is active (persistence accepted in Step 2), use framework:context-anchoring Enrich to preserve the important parts of the repair. In non-persistent mode, skip to the harvest below:
No context doc exists and the fix exposed a non-trivial design or domain lesson → suggest creating one so the lesson survives the session.
Harvest learnings: run framework:learning-harvest Harvest behavior. Session context: "bug investigation — root cause diagnosis and repair". Synthesize and propose cross-cutting patterns from this session — root-cause categories, failure modes likely to recur elsewhere, boundary-condition gaps. The user confirms what enters the document. STOP: run this before recommending /review below.
After the fix is complete, recommend /review when the change:
评论 (0)
暂无评论,成为第一个评论者吧!