본문으로 건너뛰기
Skillpedia
일반 코딩15k · #11035

trellis-update-spec

하는 일

스킬은 작업 중 알게 된 내용을 프로젝트 명세 문서에 기록합니다. 앞으로의 세션이 그 교훈을 바탕으로 시작하기를 원하는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓작업을 마치거나 버그를 고쳤고, 보관할 가치가 있는 것을 배웠을 때.
  • ✓코드베이스에서 새로운 패턴이나 관례를 발견했을 때.
  • ✓명령, API, 데이터베이스, 통합을 바꿨고 그 계약을 문서화해야 하는 경우.

스킬 링크

https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-update-spec/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-update-spec/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“업로드 API를 바꿨습니다. 앞으로의 작업이 새 계약을 따르도록 명세를 업데이트해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 교훈에 맞는 명세 파일을 찾고, 시그니처, 계약, 오류 사례, 예시, 확인할 테스트가 담긴 구체적인 항목을 씁니다. 명세는 일반 원칙에 그치지 않고 구체적으로 유지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

  1. Scope / Trigger
  2. Signatures (command/API/DB)
  3. Contracts (request/response/env)
  4. Validation & Error Matrix
  5. Good/Base/Bad Cases
  6. Tests Required (with assertion points)
  7. 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:

  1. What did you learn? (Be specific)
  2. Why is it important? (What problem does it prevent?)
  3. 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
자주 묻는 질문

코드 명세란 무엇인가요?

일반 원칙만이 아니라, 테스트할 수 있는 구체적인 시그니처, 데이터 필드, 오류 동작을 담은 명세입니다.

더 깊은 형식은 언제 필요한가요?

명령, API 계약, 데이터베이스 스키마, 인프라 통합을 바꿀 때 필수입니다.

어떤 섹션이 들어가나요?

범위, 시그니처, 계약, 검증과 오류 표, 좋은 사례와 나쁜 사례, 필요한 테스트, 잘못된 예와 올바른 예입니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
15k
순위
#11035
라이선스
AGPL-3.0
업데이트
2026. 9. 29.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬