/grey-matter:wrap-sessionfrom grey-matter
End-of-session closing bookend: run reconcile-tickets then retro, and land cheap mechanical checks, guardrails, or notes immediately.
Ships in grey-matter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The closing bookend of a session. One command that runs the two end-of-session passes in order and then does the thing they stop short of: land the cheap mechanical findings this session instead of leaving every improvement as a ticket for later.
reconcile-tickets grooms the board.retro grooms the environment — and classifies each finding mechanical (a
deterministic check/guardrail) or judgement (a coding standard, a call no check can
make).Composes the two existing skills; it does not re-spell them. Both remain invokable alone.
This is the session-end twin of orient (the start bookend); handoff writes the pickup
doc, not this.
Call the Skill tool with reconcile-tickets. It makes open tickets current, captures the
session's untracked work as tickets, and sets the frontier ordering. Run it first so
the board exists for step 3 to file deferred findings into, and so retro's later
judgement-findings extend real tickets rather than duplicate them.
Call the Skill tool with retro. It reads the session from a fresh context, surfaces
improvement candidates by severity, and classifies each mechanical vs judgement.
Let retro own that classification and the candidate list — don't second-guess its
categories here. Carry its output into step 3.
This is the step the bookend adds. For each accepted, mechanical finding, decide land-now vs defer by a single bar:
Cheap and unambiguous — the fix is clear in shape, small, and you can verify it this session. Land it now. Expensive or ambiguous — big, cross-cutting, or needs a design call. Leave it a ticket (reconcile filed it in step 1).
Default to landing; defer only when the bar says so, or when the user says so. For each land-now finding, pick the form by what the finding is:
scripts/check-*.mjs — the gates-coverage check
requires a scripts/gates.json entry that runs it, so add one. Prove it red-then-green on
a seeded case before moving on.AGENTS.md-pointed docs/agents/ note. Choose which by the promotion test in
doc-conventions.md: do-on-cue with a clear
trigger → a skill; read-when-relevant → a note. Write it to the writing-for-agents
rules (call that Skill tool when authoring), and reach it via a pointer, never an orphan.AGENTS.md line, an unwired existing check, a
token-heavy tool path) → make the edit directly; it's already in the right place.When you create or move a skill or doc, keep the indexes honest in the same step: a new
skill updates its bucket README.md, compass, and the meta roster
(maintenance-skills.md) together — the
set-equality lint fails a missed one.
.references/ is gitignored except its committed README.md,
which is the rehydration index: on a fresh checkout .references/ is empty, and that
README is the only thing telling an agent what to re-clone and how. A session that clones a
new reference (or drops one) and forgets the README leaves the index stale, and the next
machine can't rehydrate.
So verify the committed index matches what's on disk: every directory under .references/
(except README.md itself) has a section in the README with what it is, why it's a
reference, and the exact clone command; and every reference the README lists still exists.
Reconcile any drift now — add the missing section (or remove the dropped one), and refresh a
clone command or pin that moved. If .references/ and the index already agree, say so and
move on; this is a quick currency check, not a rewrite.
Before any verification-dependent commit, push, deploy or publish, discover the adopting
project's required checks from its AGENTS.md and applicable project docs. Run the single
documented check command in the speed phase, or the documented gate stage in the stability
phase. If the project documents only individual required commands, run each one and retain
each completed result. If the required command for the declared or default phase is missing,
the executable is unavailable, a run fails or times out, or its result is incomplete, report
an unresolved gate with its owner and stop dependent mutations; do not invent a checker or treat
a missing result as green. Optional observations may be reported separately and do not block.
Read the completed command result before scheduling the dependent action; unrelated read-only
work may continue.
For this repository, run node scripts/gate.mjs pre-merge so anything landed in step 3 (a new
check, a new skill/doc, a moved pointer) passes the consistency invariants and link checks, and
confirm tkt validate is clean. Then confirm the working tree is clean (git status --porcelain):
a non-empty tree at wrap time means finished work is stranded unpushed — commit and push it
(or say why it's deliberately left), because the "commit + push after every task" rhythm means
the next session should find nothing dangling. Likewise list uncommitted artifacts this
session left (scratch, build output, outside work folders) whose lifecycle scope has ended, and
apply the close rule to them. Then report three things: the board delta
(tickets created / updated, what the frontier now surfaces), the environment changes
landed this session (including any rehydration-index fix), and what was deferred to a
ticket and why.
When retained artifacts pass to another session or harness, carry their retention owner, purpose and end condition per artifact hygiene's lifecycle rule.
reconcile-tickets and retro; the command
surface, ticket standard, and finding categories live in those (and in tkt-core).handoff; reading it
and choosing the next move is orient, next session.gate.mjs pre-merge..references/README.md indexes exactly the references on disk, each with a
working clone command — a fresh checkout could rehydrate from it.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub smileynet/grey-matter --plugin grey-matter51 skills in this plugin
/adopt-projectAdopt a brownfield repo into grey-matter: characterize its as-is model, subsume existing agent config, seed a triaged board, and wire plumbing./changelogMaintain CHANGELOG.md in Keep a Changelog format with user-facing entries. Use when recording what changed for a release, updating the Unreleased section, or asked to write/update the changelog./cheat-sheetList every skill in this set by category with a one-line description. Use when the user wants a quick reference card of available skills, asks "what skills are there", or "list all commands"./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./code-reviewReview a commit range, staged changes, or working tree on two axes (Standards + Spec) in parallel sub-agents and file findings as tickets. Use to review a branch, PR, WIP changes, or "review since X"./compassFind which skill or flow fits your situation. A router over the skills in this repo. Use when you (or the agent) are unsure which skill to reach for, want to see how the skills fit together, or ask "what should I use for X".