update-spec

Update .trellis/spec/ documents with executable code-spec contracts.

92|8|Updated May 15, 2026
One-click install
npx skills add https://github.com/LonelyHerbivore/Trellis-Herbivore --skill update-spec-lonelyherbivore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-spec
Source: https://github.com/LonelyHerbivore/Trellis-Herbivore/tree/main/packages/cli/src/templates/codex/skills/update-spec
Command: npx skills add https://github.com/LonelyHerbivore/Trellis-Herbivore --skill update-spec-lonelyherbivore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents valuable implementation knowledge from getting lost in chat by capturing it into .trellis/spec/ as executable, testable code contracts that future AI runs can follow safely and consistently.

Core Features & Use Cases

  • Executable code-spec updates: records concrete signatures, payload fields, env keys, validation behavior, and error handling so changes remain verifiable over time.
  • Infra and cross-layer enforcement: mandates a deeper spec structure when changes affect infrastructure or cross-layer contracts.
  • Well-structured spec evolution: supports adding design decisions, conventions, patterns, anti-patterns, gotchas, and common mistakes in the right spec location.

Quick Start

Use update-spec after you implement a feature, fix a bug, or make a design decision so the corresponding code-spec files are updated with required contracts, validation matrices, and test points.

Frequently Asked Questions about update-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve implementation knowledge as executable code contracts?

You can preserve implementation knowledge by updating .trellis/spec/ documents with executable code-spec contracts. This captures concrete signatures, validation behavior, and error matrices so future AI runs execute consistently and safely.

What is the best way to document infrastructure and cross-layer changes?

Documenting infrastructure and cross-layer changes requires a deeper spec structure. You should record scope, triggers, signatures, validation matrices, and test points to ensure changes remain verifiable and reduce future mis-execution.

When should I update executable specs after feature implementation?

You should update executable specs immediately after implementing features, fixing bugs, or making design decisions. This ensures the spec files contain required contracts, assertion points, and wrong vs correct examples while the context is fresh.

How do I structure validation matrices and test points in code specs?

Structure validation matrices by including scope/trigger, signatures, contracts, error handling, good/base/bad cases, and required tests with assertion points. This ensures the code-spec files remain verifiable and executable over time.

Does this approach work for capturing anti-patterns and design decisions?

Yes, this approach supports adding design decisions, conventions, patterns, anti-patterns, gotchas, and common mistakes. Recording them in the correct spec location ensures future development avoids repeating documented errors.

Why does my code execution fail after infrastructure changes?

Execution often fails because implementation knowledge was lost in chat rather than captured as executable contracts. Without updated spec files containing validation behavior and error matrices, future runs lack the required context for consistency.