Automated summary
Prompts an AI agent to update relevant specification documents after completing tasks, fixing bugs, or discovering new patterns to capture project knowledge.
Strengths
- Captures tacit knowledge into formal documents.
- Reduces re-asking of same questions.
- Provides clear structure for spec updates.
- Ensures consistency with project conventions.
Limitations
- Requires well-organized spec directory structure.
- May update incorrect or outdated specs if not careful.
- Relies on clear classification of learning type.
Use after completing implementation, debugging, or discovering a new pattern or convention to document it.
Avoid for one-off temporary code or trivial changes that do not represent reusable knowledge.
Security analysis
SafeThe skill only provides editorial guidance for updating specification documents; no commands with side effects are included.
No concerns found
How this analysis is madeExamples
We just added template download using giget. Update the relevant backend spec file with the implementation details and design decisions.We fixed a subtle error handling bug. Update the error-handling spec to document the gotcha and the fix pattern.The team agreed on a naming convention for API endpoints. Update the project conventions spec to reflect this decision.name: update-spec description: "Update Spec - Capture Knowledge into Specifications"
Update Spec - Capture Knowledge into Specifications
When you learn something valuable (from debugging, implementing, or discussion), use this skill to update the relevant spec documents.
Timing: After completing a task, fixing a bug, or discovering a new pattern
When to Update Specs
| Trigger | Example | Target Spec |
|---------|---------|-------------|
| Implemented a feature | Added template download with giget | Relevant backend/ or frontend/ file |
| Made a design decision | Used type field + mapping table for extensibility | Relevant spec + "Design Decisions" section |
| Fixed a bug | Found a subtle issue with error handling | backend/error-handling.md |
| Discovered a pattern | Found a better way to structure code | Relevant backend/ or frontend/ 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.md |
| New thinking trigger | "Don't forget to check X before doing Y" | guides/*.md (as a checklist item, not detailed rules) |
Key Insight: Spec updates are NOT just for problems. Every feature implementation contains design decisions and project conventions that future AI/developers need to know.
Spec Structure Overview
.trellis/spec/
├── backend/ # Backend coding standards
│ ├── index.md # Overview and links
│ └── *.md # Topic-specific guidelines
├── frontend/ # Frontend coding standards
│ ├── index.md # Overview and links
│ └── *.md # Topic-specific guidelines
└── guides/ # Thinking checklists (NOT coding specs!)
├── index.md # Guide index
└── *.md # Topic-specific guides
CRITICAL: Spec vs Guide - Know the Difference
| Type | Location | Purpose | Content Style |
|------|----------|---------|---------------|
| Spec | backend/*.md, frontend/*.md | Tell AI "how to write code" | Detailed rules, code examples, forbidden patterns |
| 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
backend/orfrontend/ - "This is what to consider before writing" → Put in
guides/
Example:
| Learning | Wrong Location | Correct Location |
|----------|----------------|------------------|
| "Use reconfigure() not TextIOWrapper for Windows stdout" | ❌ guides/cross-platform-thinking-guide.md | ✅ backend/script-conventions.md |
| "Remember to check encoding when writing cross-platform code" | ❌ backend/script-conventions.md | ✅ guides/cross-platform-thinking-guide.md |
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 |
Step 3: Read the Target Spec
Before editing, read the current spec to:
- Understand existing structure
- Avoid duplicating content
- Find the right section for your update
cat .trellis/spec/<category>/<file>.md
Step 4: Make the Update
Follow these principles:
- Be Specific: Include concrete examples, not just abstract rules
- Explain Why: State the problem this prevents
- Show Code: Add code snippets for patterns
- Keep it Short: One concept per section
Step 5: Update the Index (if needed)
If you added a new section or the spec status changed, update the category's index.md.
Update Templates
Adding a Design Decision
### Design Decision: [Decision Name]
**Context**: What problem were we solving?
**Options Considered**:
1. Option A - brief description
2. Option B - brief description
**Decision**: We chose Option X because...
**Example**:
\`\`\`typescript
// How it's implemented
code example
\`\`\`
**Extensibility**: How to extend this in the future...
Adding a Project Convention
### Convention: [Convention Name]
**What**: Brief description of the convention.
**Why**: Why we do it this way in this project.
**Example**:
\`\`\`typescript
// How to follow this convention
code example
\`\`\`
**Related**: Links to related conventions or specs.
Adding a New Pattern
### Pattern Name
**Problem**: What problem does this solve?
**Solution**: Brief description of the approach.
**Example**:
\`\`\`
// Good
code example
// Bad
code example
\`\`\`
**Why**: Explanation of why this works better.
Adding a Forbidden Pattern
### Don't: Pattern Name
**Problem**:
\`\`\`
// Don't do this
bad code example
\`\`\`
**Why it's bad**: Explanation of the issue.
**Instead**:
\`\`\`
// Do this instead
good code example
\`\`\`
Adding a Common Mistake
### Common Mistake: Description
**Symptom**: What goes wrong
**Cause**: Why this happens
**Fix**: How to correct it
**Prevention**: How to avoid it in the future
Adding a Gotcha
> **Warning**: Brief description of the non-obvious behavior.
>
> Details about when this happens and how to handle it.
Interactive Mode
If you're unsure what to update, answer these prompts:
-
What did you just finish?
- [ ] Fixed a bug
- [ ] Implemented a feature
- [ ] Refactored code
- [ ] Had a discussion about approach
-
What did you learn or decide?
- Design decision (why X over Y)
- Project convention (how we do X)
- Non-obvious behavior (gotcha)
- Better approach (pattern)
-
Would future AI/developers need to know this?
- To understand how the code works → Yes, update spec
- To maintain or extend the feature → Yes, update spec
- To avoid repeating mistakes → Yes, update spec
- Purely one-off implementation detail → Maybe skip
-
Which area does it relate to?
- [ ] Backend code
- [ ] Frontend code
- [ ] Cross-layer data flow
- [ ] Code organization/reuse
- [ ] Quality/testing
Quality Checklist
Before finishing your spec update:
- [ ] Is the content specific and actionable?
- [ ] Did you include a code example?
- [ ] Did you explain WHY, not just WHAT?
- [ ] Is it in the right spec file?
- [ ] Does it duplicate existing content?
- [ ] Would a new team member understand it?
Relationship to Other Commands
Development Flow:
Learn something → $update-spec → Knowledge captured
↑ ↓
$break-loop ←──────────────────── Future sessions benefit
(deep bug analysis)
$break-loop- Analyzes bugs deeply, often reveals spec updates needed$update-spec- Actually makes the updates (this skill)$finish-work- Reminds you to check if specs need updates
Core Philosophy
Specs are living documents. Every debugging session, every "aha moment" is an opportunity to make the spec better.
The goal is institutional memory:
- What one person learns, everyone benefits from
- What AI learns in one session, persists to future sessions
- Mistakes become documented guardrails
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/update-spec-capture-knowledge-into-specifications-mrx3xwqi/download' --output '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md.part' && mv '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md.part' '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && test -s '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/update-spec' && cp -R '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi' '.claude/skills/update-spec'Cursor
test -f '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && test -s '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/update-spec' && cp -R '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi' '.cursor/skills/update-spec'Codex
test -f '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && test -s '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/update-spec' && cp -R '.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi' '.agents/skills/update-spec'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi'openskills read 'update-spec-capture-knowledge-into-specifications-mrx3xwqi'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/update-spec-capture-knowledge-into-specifications-mrx3xwqi/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Supabase Docs Authoring
Documentation
Write, edit, and review Supabase documentation content including guides, tutorials, reference docs, and partials. Follow style guides and MDX/TOML validation rules.
Create Architecture Decision Record
Documentation
Create a new Architecture Decision Record with sequential numbering, register it in the AgentDB graph, and link related ADRs.
Plan update with deep research
Documentation
Updates a plan document by launching parallel subagents to analyze a topic across all compiler passes, then consolidates findings into the plan doc.