speq-record
Skill56 starsChanged 2 months agoMITView on GitHub
Merge implemented spec deltas into the permanent specs library and archive the plan. Use when implementation is verified — after /speq-implement produces verification-report.md — or when the user asks to record, merge, or archive a finished plan. Arg: <plan-name>.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- speq-adr-rulesSkill
- speq-auditSkill
- speq-cliSkill
- speq-code-guardrailsSkill
- speq-code-reviewSkill
- speq-code-toolsSkill
- speq-design-philosophySkill
- speq-ext-researchSkill
- speq-git-disciplineSkill
- speq-git-operationsSkill
- speq-implement-prSkill
- speq-implementSkill
- speq-missionSkill
- speq-planningSkill
- speq-plan-prSkill
- speq-plan-reviewSkill
- speq-planSkill
- speq-spec-mergeSkill
- speq-writing-guardrailsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Check for .speq/record-hook.md in the repo root.
- Very specific: line 23
Present: read it. Announce "Loaded project hook: .speq/record-hook.md".
- Distinctive: line 66
If the sub-agent returns threshold signals:
- Very specific: line 68
Use AskUserQuestion to get the user's organizational decision
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Spec Recorder (Orchestrator)
Thin orchestrator. It verifies preconditions and delegates the merge work to the recorder-agent sub-agent.
Required Skills (for the orchestrator)
Invoke before starting:
/speq-cli— Spec validation
The recorder-agent sub-agent invokes its own required skills.
Workflow
Phase 0: Load Project Hook (orchestrator)
Check for .speq/record-hook.md in the repo root.
- Present: read it. Announce "Loaded project hook: .speq/record-hook.md". Its content is authoritative: it can add to, change, or override any part of this workflow. If the hook conflicts with this workflow, the hook wins.
- Absent: continue normally, no mention.
Note it (not its full content) as a Project Hook: line in the recorder-agent brief below.
Phase 1: Resolve Plan Name (orchestrator)
Get the plan name from the user prompt. If none is given, use AskUserQuestion to present the plans under specs/_plans/.
Phase 2: Verify Preconditions (orchestrator)
Check: specs/_plans/<plan-name>/verification-report.md exists?
├─ Yes → Proceed
└─ No → STOP: "Run /speq-implement <plan-name> first."Phase 3: Delegate to recorder-agent
Spawn the recorder sub-agent with the plan name:
Delegate to recorder-agent — Record <plan-name> into permanent specs
## Plan Name
<plan-name>
## Context
- Verification report confirmed at: specs/_plans/<plan-name>/verification-report.md
- Plan file: specs/_plans/<plan-name>/plan.md
- Delta specs: specs/_plans/<plan-name>/**/spec.md
- Architecture delta (optional): specs/_plans/<plan-name>/architecture.md
## Your Task
Merge all delta specs, and the architecture delta if present, into permanent specs per the `recorder-agent` workflow. Validate between merges. Archive the plan on success. If any library threshold is exceeded (scenarios > 10, domain features > 8), STOP before archiving and return a question for the user.
Project Hook: <if active, ".speq/record-hook.md — read it and apply it"; otherwise omit this line>
Return a summary of merged features and the archive path.Phase 4: Handle Threshold Escalations (orchestrator)
If the sub-agent returns threshold signals:
- Use
AskUserQuestionto get the user's organizational decision - Respawn
recorder-agentwith the decision, OR apply a trivial edit (for example, a file rename) directly - Archive only after all decisions are resolved
If the sub-agent returns Recording failed: architecture delta: ..., do not respawn it and do not fix the delta yourself. The plan stays unarchived. Report the message to the user and stop. The fix is a plan change: correct architecture.md in the plan, or refresh its BASE after a stale-base error.
Phase 5: Confirm Completion (orchestrator)
Report to user:
✓ Verification report confirmed
✓ All deltas merged
✓ Spec library validated
✓ Plan archived: specs/_recorded/NNN-<plan-name>
✓ Architecture merged: <sections> (omit when no delta)
✓ ADRs accepted: N — <slugs> (omit when none)Work Split (reference)
| Step | Performed by | Why |
| Precondition checks, user questions | This skill (pins Sonnet) | Lightweight orchestration |
| Delta merge, validation, archive | recorder-agent sub-agent | Mechanical file surgery |
The split preserves rotation discipline: the orchestrator can respawn the sub-agent with a fresh context and keep its own state.
Anti-Patterns
| Pattern | Why Wrong |
| Record without verification report | Implementation not proven |
| Orchestrator merges directly | Breaks rotation / context discipline |
| Assume split/domain decisions | User must confirm |
| Skip validation | Broken specs may result |
| Leave DELTA markers | Pollutes permanent specs |
| Archive after an architecture delta failure | The delta was not merged, so the plan must stay open |
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
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.

