Repository navigation
Description
Problem
When starting a new Claude Code session, the AI has no quick way to understand "what this project does right now." CLAUDE.md covers how to work, but not what exists. This leads to:
- Repeated context gathering — every session starts with the same exploration (reading README, ARCHITECTURE, git log)
- Lost design rationale — decisions made during
/office-hoursor/plan-eng-reviewget buried in session-specific design docs under~/.gstack/projects/ - Flow chain gap —
/ship→/document-releaseupdates code docs, but there's no step that updates "what the project can do" or preserves "why we decided X"
Proposal: spec-keeper skill
A new gstack skill that manages two artifacts:
| Artifact | Purpose | Location |
|---|---|---|
| SPEC.md | "What the AI needs to know on day 1" — current capabilities, architecture, key decisions | Project root |
| ADRs | Design decision records — context, decision, alternatives, consequences | docs/decisions/ |
4-Layer Information Model
CLAUDE.md ← How to work (rules, skills, conventions)
SPEC.md ← What exists now (capabilities, architecture, key decisions)
docs/decisions/ ← Why decisions were made (ADRs)
~/.gstack/projects/ ← Session-specific design docs (already managed by gstack)
Commands
| Command | When | What it does |
|---|---|---|
/spec-keeper init |
New project or first adoption | Scans all info sources (CLAUDE.md, gstack design docs, CHANGELOG, git log, code structure) → generates SPEC.md + ADRs |
/spec-keeper update |
After /document-release |
Incremental SPEC.md update — only edits changed sections, not full rewrite |
/spec-keeper adr |
After design decisions | Creates numbered ADR with auto-extraction from gstack design docs |
/spec-keeper status |
Anytime | Freshness check: last updated date, unreflected commits, line count health |
Flow Chain Integration
/ship → /document-release → /spec-keeper update (+adr) → /retro
/document-release already updates README/ARCHITECTURE/CHANGELOG. spec-keeper would be the next natural step — updating the "current state" snapshot and preserving any new design decisions.
Bloat Prevention
SPEC.md is read at session start, so size matters. Built-in thresholds:
- ≤150 lines: Healthy
- 151–200: Warning — consider splitting on next update
- ≥201: Auto-suggest split (Recent Changes rotation → CHANGELOG, ADR index externalization, section splitting with pointers)
Follows the principle: pointer > inline — details live in referenced files, agents Read on demand.
ADR Generation (3-Layer Filter for init)
Efficient ADR extraction from existing design docs using a cost-escalation strategy:
- Layer 1 — grep scan (seconds, no Read): Find design docs with decision-related headers
- Layer 2 — header classification (seconds, no Read): Categorize as High/Medium/Low architecture relevance
- Layer 3 — selective Read + parallel generation: Only read user-confirmed candidates, generate ADRs in parallel via Agent tool
Prior Art & Validation
I've been running this as a standalone global skill for several weeks across multiple projects:
- MVP-type project (feature accumulation): SPEC.md captures capability timeline, ADRs preserve architectural pivots
- Frequent-improvement project (ops/infra): SPEC.md tracks current state, ADRs record migration decisions
The flow chain integration (/ship → /document-release → /spec-keeper → /retro) works well in practice — spec-keeper catches what document-release misses (the "so what does this project do now?" question).
Implementation Notes
- Would need a
.tmplfile per gstack conventions - Primary info sources:
~/.gstack/projects/design docs, CLAUDE.md, CHANGELOG, git log, code structure - Templates for both MVP-type and frequent-improvement-type projects
- ADR template following standard format (Context / Decision / Alternatives / Consequences)
Happy to implement this as a PR if the direction makes sense. Would love feedback on:
- Should this be a core gstack skill or a recommended companion?
- Any preferences on where it fits in the flow chain?
- Interest in auto-triggering (e.g., suggest after
/document-release)?
Activity
feat: add /spec skill — living specification manager (closes garrytan…
feat: add /spec skill — living specification manager (closes garrytan…
feat: add /spec skill — living specification manager (closes garrytan…
time-attack commentedon Jul 15, 2026
@16francej — recommend closing this issue. Thanks for putting this together. We aren’t accepting new standalone skills right now, so we’re going to pass on this proposal. We can revisit the area later if it becomes part of GStack’s core workflow.