Saltar al contenido
Skillpedia
Programación general15 mil · #11035

trellis-update-spec

Qué hace

La skill registra en los documentos de especificación del proyecto lo que has aprendido mientras trabajabas. Está pensada para equipos que quieren que las sesiones futuras empiecen con esas lecciones.

Cuándo usarla

  • ✓Cuando terminas una tarea o corriges un error y has aprendido algo que merece conservarse.
  • ✓Cuando descubres un patrón o una convención nueva en la base de código.
  • ✓Cuando un cambio afecta a un comando, una API, una base de datos o una integración y su contrato debe documentarse.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-update-spec/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Acabamos de cambiar la API de subida. Actualiza la especificación para que el trabajo futuro siga el nuevo contrato.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente busca el archivo de especificación que corresponde a la lección y escribe una entrada concreta con firmas, contratos, casos de error, ejemplos y pruebas que comprobar. Mantiene la especificación concreta en lugar de limitarse a principios generales.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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
Preguntas frecuentes

¿Qué es una especificación de código?

Una especificación que recoge firmas concretas, campos de datos y comportamiento ante errores que pueden probarse, y no solo principios generales.

¿Cuándo es obligatorio el formato más detallado?

La skill lo exige para cambios en comandos, contratos de API, esquemas de base de datos o integraciones de infraestructura.

¿Qué secciones incluye?

Alcance, firmas, contratos, una tabla de validación y errores, casos buenos y malos, pruebas necesarias y un ejemplo de incorrecto frente a correcto.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
15 mil
Posición en el ranking
#11035
Licencia
AGPL-3.0
Actualizada
29/9/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas