Skip to content

feat: Add spec-keeper skill — living specification + ADR management #465

Closed

Description

@shohu

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:

  1. Repeated context gathering — every session starts with the same exploration (reading README, ARCHITECTURE, git log)
  2. Lost design rationale — decisions made during /office-hours or /plan-eng-review get buried in session-specific design docs under ~/.gstack/projects/
  3. Flow chain gap — /ship → /document-release updates 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:

  1. Layer 1 — grep scan (seconds, no Read): Find design docs with decision-related headers
  2. Layer 2 — header classification (seconds, no Read): Categorize as High/Medium/Low architecture relevance
  3. 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 .tmpl file 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:

  1. Should this be a core gstack skill or a recommended companion?
  2. Any preferences on where it fits in the flow chain?
  3. Interest in auto-triggering (e.g., suggest after /document-release)?

Activity

  1. added 3 commits that reference this issue on Mar 26, 2026
    2779706
    24c33aa
    854eb19
  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions