Skip to content
Development
Skill

/spec-sync

Use in cross-session work when user-confirmed outcomes, non-goals, hard constraints, or acceptance criteria have not been written back to the current source of truth (spec), or reality conflicts with it enough that following it would be wrong; also use during wrap-up or handoff

From plugin
coding-discipline
258 skills

Claude Code

$ npx -y skills add chipfighter/coding-discipline --skill spec-sync --agent claude-code

SKILL.md

spec-sync.SKILL.md
name: spec-sync
description: Use in cross-session work when user-confirmed outcomes, non-goals, hard constraints, or acceptance criteria have not been written back to the current source of truth (spec), or reality conflicts with it enough that following it would be wrong; also use during wrap-up or handoff when a source of truth should exist but does not. Edit only the affected original wording; do not keep separate old and new versions. Do not trigger for work that can be completed within one session, local implementation details, verification against existing acceptance criteria, locating the source of truth, or ordinary documentation edits.
license: MIT

Hard rule: **A change confirmed in conversation must not remain only in the conversation.** If user-confirmed intent that affects future collaboration or acceptance is not written back to the source of truth in this session, the next session cannot even see that the user changed their mind—intent that was never persisted cannot be recovered.

The decision test (the only test for whether to sync)

> If the next session or another agent read only the current source of truth, would it continue toward an outcome the user has rejected, violate a new constraint, or judge completion against stale criteria? If so, the change must be synced.

  • Only changes the user has **already confirmed** belong in the spec; your own inferences and ideas still under discussion do not.
  • Before deciding, read the current source of truth at most once to compare. Do not turn this into research.

Write-back rules

1. Use the current source of truth already designated by the project—the document named by the project guide. 2. If none is designated, designate an existing Issue / PRD / ADR / status document as the current spec; **do not copy it into a second document**. If there are multiple candidates or none is obvious, ask the user to choose. 3. If nothing exists and the work genuinely spans sessions, is shared by multiple people, or would be costly to get wrong, ask whether the user wants a minimal spec (below). The user decides whether to create one; do not create one for work that can be completed within a single session. 4. After designating or creating one, put a pointer to the source of truth in the project guide document (the “where to find the current state” entry in `CLAUDE.md` / `AGENTS.md`)—**write only the pointer, not a copy of the content**—so the next session can find it. 5. **Edit only the affected original wording**: do not append separate “old decision / new decision” versions, reorder the document, or polish the whole document along the way. Replace the affected text as a whole only when the direction changes substantially; leave history to Git. 6. Do not record execution progress, next steps, or verification evidence. Those belong to the harness / Git / CI, not the spec. 7. In multi-person / multi-agent work, workers are read-only by default; the primary agent or owner maintains the spec.

Minimal spec (five items—add no more than needed)

The current desired outcome; explicit non-goals; hard constraints; acceptance criteria for this work; confirmed unresolved questions that would block safe execution (include only questions the user has confirmed—do not promote your guesses into settled facts).

Exceptions (do not force either case)

  • **No write access to the source of truth** (for example, a PRD owned by someone else): do not overstep. State clearly what is stale and who should update it.
  • **The user explicitly refuses write-back**: explain that the next session may read the old target, then comply. An old spec must never be used to block the user's latest instruction.

Hard rules

  • Do not write changes to outcomes / non-goals / hard constraints / acceptance criteria into the source of truth until the user has confirmed them.
  • If the implementation is verified but the source of truth is not synced, report those as two separate facts. Do not claim “the source of truth is synced” or “handoff will preserve everything.”
  • Complete the sync **within this session**. Do not expect a later session to recover intent that was never persisted.

Boundary

Which document is the current source of truth and how to read it belong to context-hygiene. Verifying completion against existing acceptance criteria belongs to verify-before-done. This skill governs one thing only: **whether the source of truth reflects the user's latest confirmed decisions.**

Read more
@chipfighter
Ships withcoding-discipline

Chinese → README.zh-CN.md Guardrails, not a workflow. Quiet on routine work; firm when a named failure mode is at risk. AI coding agents tend to fail in two expensive ways: They drift off-goal.

Stars on GitHub

Momentum

stars in total
25
Star history of chipfighter/coding-discipline on GitHub, a chart by star-history.com

Other skills on coding-discipline.

git-flow

git-flow

Use when creating a branch, using worktrees for parallel work, committing, or wrapping up. Covers branch naming, conventional…

tdd

tdd

Use before implementation when behavior can be verified by automated tests and regression coverage has clear value. For bugs with…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about spec-sync.

Which coding agents can use spec-sync?
spec-sync installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.