trellis-update-spec
Fungsinya
Skill ini mencatat apa yang Anda pelajari saat bekerja ke dalam dokumen spesifikasi proyek. Untuk tim yang ingin sesi mendatang dimulai dengan pelajaran tersebut.
Kapan dipakai
- βSaat Anda selesai mengerjakan tugas atau memperbaiki bug dan mempelajari sesuatu yang layak disimpan.
- βSaat Anda menemukan pola atau konvensi baru di codebase.
- βSaat sebuah perubahan menyentuh perintah, API, basis data, atau integrasi dan kontraknya perlu didokumentasikan.
Link skill
https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-update-spec/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βKita baru saja mengubah API unggahan. Perbarui spesifikasi agar pekerjaan berikutnya mengikuti kontrak yang baru.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menemukan file spesifikasi yang cocok dengan pelajaran itu dan menulis entri konkret dengan signature, kontrak, kasus error, contoh, dan tes untuk diperiksa. Spesifikasi dibuat spesifik, bukan hanya prinsip umum.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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" section |
| Established a convention | Team agreed on naming pattern | Quality guidelines |
| New thinking trigger | "Don't forget to check X before doing Y" | guides/*.md (as a checklist item) |
Key Insight: Code-spec updates are NOT just for problems. Every feature implementation contains design decisions and contracts that future AI/developers need to execute safely.
Spec Structure Overview
.trellis/spec/
βββ <layer>/ # Per-layer coding standards (e.g., backend/, frontend/, api/)
β βββ index.md # Overview and links
β βββ *.md # Topic-specific guidelines
βββ guides/ # Thinking checklists (NOT coding specs!)
βββ index.md # Guide index
βββ *.md # Topic-specific guides
CRITICAL: Code-Spec vs Guide - Know the Difference
| Type | Location | Purpose | Content Style |
|---|---|---|---|
| Code-Spec | <layer>/*.md |
Tell AI "how to implement safely" | Signatures, contracts, matrices, cases, test points |
| Guide | guides/*.md |
Help AI "what to think about" | Checklists, questions, pointers to specs |
Decision Rule: Ask yourself:
- "This is how to write the code" β Put in a spec layer directory
- "This is what to consider before writing" β Put in
guides/
Example:
| Learning | Wrong Location | Correct Location |
|---|---|---|
| "Use API X not API Y for this task" | β guides/ (too specific for a thinking guide) |
β Relevant spec file (concrete convention) |
| "Remember to check X when doing Y" | β Spec file (too abstract for a spec) | β
guides/ (thinking checklist) |
Guides should be short checklists that point to specs, not duplicate the detailed rules.
Update Process
Step 1: Identify What You Learned
Answer these questions:
- What did you learn? (Be specific)
- Why is it important? (What problem does it prevent?)
- Where does it belong? (Which spec file?)
Step 2: Classify the Update Type
| Type | Description | Action |
|---|---|---|
| Design Decision | Why we chose approach X over Y | Add to "Design Decisions" section |
| Project Convention | How we do X in this project | Add to relevant section with examples |
| New Pattern | A reusable approach discovered | Add to "Patterns" section |
| Forbidden Pattern | Something that causes problems | Add to "Anti-patterns" or "Don't" section |
| Common Mistake | Easy-to-make error | Add to "Common Mistakes" section |
| Convention | Agreed-upon standard | Add to relevant section |
| Gotcha | Non-obvious behavior | Add warning callout |
Pertanyaan umum
Apa itu code-spec?
Spesifikasi yang berisi signature, field data, dan perilaku error yang konkret dan dapat diuji, bukan hanya prinsip umum.
Kapan format yang lebih dalam diperlukan?
Skill mewajibkannya untuk perubahan pada perintah, kontrak API, skema basis data, atau integrasi infrastruktur.
Bagian apa saja yang disertakan?
Cakupan, signature, kontrak, tabel validasi dan error, kasus baik dan buruk, tes yang diperlukan, dan contoh salah versus benar.
Detail
Deskripsi asli dari pembuat
Captures executable contracts and coding conventions into .trellis/spec/ documents. Use when learning something valuable from debugging, implementing, or discussion that should be preserved for future sessions.
repo: mindfold-ai/Trellis
Popularitas
- Bintang GitHub
- 15k
- Peringkat
- #11035
- Lisensi
- AGPL-3.0
- Diperbarui
- 29/9/2026
Komentar
- β¦
Skill lain dari repositori ini
first-principles-thinking
15kMembantu agent Anda menguji rencana atau desain dengan memecahnya menjadi kebenaran dasar dan bernalar dari situ, bukan mengandalkan kebiasaan atau konvensi.
python-design
15kMembantu agent Anda menulis dan meninjau skrip baris perintah Python dengan modul yang jelas, antarmuka sederhana, dan komplikasi tersembunyi yang lebih sedikit.
trellis-before-dev
15kMembantu agent Anda membaca panduan coding proyek dan catatan tugas sebelum mulai menulis kode, sehingga mengikuti konvensi tim.
trellis-brainstorm
15kMembantu agent Anda memperjelas fitur baru atau tugas yang belum jelas dengan mengajukan satu pertanyaan bermanfaat setiap kali, memeriksa kode, dan menyepakati ruang lingkup yang sempit.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.