agentleFS
acaprariacaprari/specdriven-skills/skills/spec-capture/SKILL.md

spec-capture

Skill1 starsChanged 5 months agoMITView on GitHub

Use when a session has produced decisions, rationale, or context not yet captured in specs, and the session history is available to read.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Sunnyshinnny776/pm-agentic-cookbook★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the session history. First pass — group findings by capability area:

    line 16
  2. Distinctive:

    Wait for confirmation before writing.

    line 45
  3. Very specific:

    Create or update capability spec files based on confirmed decisions only.

    line 49
  4. Distinctive:

    Do not infer silently. Surface the ambiguity and ask.

    line 66
  5. Distinctive:

    If the session context is thin, already compacted, or appears to be from a previous conversation:

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec: Capture

Overview

Capture extracts decisions from the current session and writes them into spec files. It never writes silently — it presents what it found, flags ambiguities, and asks for confirmation before touching any file.

Protocol

Step 1: Extract and group

Read the session history. First pass — group findings by capability area:

  • Explicit decisions: something the user stated or chose, with rationale present or inferable from context
  • Ambiguous items: looks like a decision, but intent is unclear — could be a preference, a temporary shortcut, or a decision that was never actually finalised
  • Implementation details that were never decided: things that emerged from code rather than from a choice (these do not belong in specs)

Second pass — cross-cutting clusters. Scan the per-capability groups for cross-cutting clusters: decision sets that span 2+ capabilities with a shared rationale or rejected alternative, or that introduce a framework/principle not native to any single capability. Lift these into a separate candidate-ADR group — do not leave them split across capability groups.

The rebuild-guarantee test: would splitting these into per-capability Decisions entries lose coherence? If yes, the cluster wants an ADR. Apply the spec:core (a) + (b or c) heuristic to confirm.

Step 2: Present before writing

Present findings to the user before writing anything:

"Here's what I extracted from this session, grouped by area. Confirm and I'll write — or correct anything that's wrong."

[Capability area]

  • Decision: [what was decided] — Rationale: [why]
  • Decision: [what was decided] — Rationale: [why]

Candidate ADR — cross-cutting cluster:

  • [Cluster title] — spans [capabilities]; unifying argument: [shared rationale]; rejected alternatives: [list, if any].

Flagged — intent unclear:

  • "[quote or paraphrase]" — Did you mean [interpretation A] or [interpretation B]?

Not capturing (implementation detail, no explicit decision):

  • [thing that emerged from code] — If this was a deliberate choice, tell me the rationale and I'll add it.

Wait for confirmation before writing.

Step 3: Write after confirmation

Create or update capability spec files based on confirmed decisions only. Follow the format from spec:core:

  • New capability area → new <capability>.md
  • Existing area → edit Decisions and Invariants entries in place
  • Cross-cutting cluster meeting the spec:core (a) + (b or c) heuristic → new ADR (one per cluster, not one per constituent decision)
  • New capability files created → update specs/README.md
  • CLAUDE.md enforcement block missing → add it

What to Flag

Flag anything before writing where the intent could plausibly be misread:

  • Statements made under time pressure that may have been shortcuts, not decisions
  • "For now" qualifiers — is the constraint intentional or a deferred decision?
  • Choices that look like defaults — was this actually considered, or just the first option tried?
  • Disagreements or reversals mid-session — what was the final state?

Do not infer silently. Surface the ambiguity and ask.

The Wall: Thin or Compacted Session Context

If the session context is thin, already compacted, or appears to be from a previous conversation:

"The session context I can read [describes what's available]. I was able to recover [X decisions], but I can't reliably recover [Y] — the context doesn't contain enough detail. For those gaps, spec:infer can read the codebase directly and propose what's missing."

State what was recoverable and what was not. Do not guess at missing context.

Soft Referrals

  • Thin or compacted context → recommend spec:infer
  • Ambiguous intent that questions can't resolve → recommend spec:infer as a complement (code may reveal more)

Common Mistakes

MistakeCorrect behaviour
Writing spec files before presenting findingsExtract → present → confirm → write. Always.
Including implementation details as decisionsImplementation details without rationale do not belong in specs
Writing ambiguous items without flagging themFlag with explicit question; do not infer intent
Silently skipping items with unclear intentSurface them in the "Flagged" section
Writing from compacted/prior session context without saying soState the limitation; recommend spec:infer for gaps

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.