trellis-update-spec
◉ 12.9k↓ 12.9k↺ 2026.07.20@mindfold-ai/trellis-update-spec把调试/实现/讨论中有价值的可执行约定沉淀进 .trellis/spec/,供后续会话复用。
| name | trellis-update-spec |
|---|---|
| description | 把调试/实现/讨论中有价值的可执行约定沉淀进 .trellis/spec/,供后续会话复用。 |
更新 Spec
trellis-update-spec
把调试/实现/讨论中有价值的可执行约定沉淀进 .trellis/spec/,供后续会话复用。
核心说明
以下为上游 SKILL.md 摘要(英文原文结构保留要点):
Update Code-Spec - Capture Executable Contracts
When you learn something valuable (from debugging, implementing, or discussion), use this to update the relevant code-spec documents.
Timing: After completing a task, fixing a bug, or discovering a new pattern
Code-Spec First Rule (CRITICAL)
In this project, "spec" for implementation work means code-spec:
- Executable contracts (not principle-only text)
- Concrete signatures, payload fields, env keys, and boundary behavior
- Testable validation/error behavior
If the change touches infra or cross-layer contracts, code-spec depth is mandatory.
Mandatory Triggers
Apply code-spec depth when the change includes any of:
- New/changed command or API signature
- Cross-layer request/response contract change
- Database schema/migration change
- Infra integration (storage, queue, cache, secrets, env wiring)
Mandatory Output (7 Sections)
For triggered tasks, include all sections below:
- Scope / Trigger
- Signatures (command/API/DB)
- Contracts (request/response/env)
- Validation & Error Matrix
- Good/Base/Bad Cases
- Tests Required (with assertion points)
- Wrong vs Correct (at least one pair)
When to Update Code-Specs
| Trigger | Example | Target Spec | |---------|---------|-------------| | Implemented a feature | Added a new integration or module | Relevant spec file | | Made a design decision | Chose extensibility pattern over simplicity | Relevant spec + "Design Decisions" section | | Fixed a bug | Found a subtle issue with error handling | Relevant spec (e.g., error-handling docs) | | Discovered a pattern | Found a better way to structure code | Relevant spec file | | Hit a gotcha | Learned that X must be done before Y | Relevant spec + "Common Mistakes" sec
安装
随 Trellis 一并分发。执行 trellis init 后可在 .agents/skills/trellis-update-spec/(及各平台 skill 目录)使用。
npm install -g @mindfoldhq/trellis@latest
trellis init -u your-name