gza-spec-coherence
Check the behavior spec set for coherence, ownership boundaries, and plain-language discipline without editing the spec or the code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check the behavior spec set for coherence, ownership boundaries, and plain-language discipline without editing the spec or the code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Review changes on current branch and output a structured review. Optionally post to PR with --pr flag, or apply non-blocking follow-ups inline with --apply-followups.
Run an interactive code-only review for a gza task's implementation branch and produce structured review output compatible with gza-task-improve
Check the implementation against the behavior specs in specs/behavior/. Reports where the code diverges from intended behavior — each divergence is either a code bug or a spec gap. The behavior spec is the source of truth; this skill never edits code or the spec.
Turn the recurring `watch` stuck-task pile into (1) a diagnosis of why each class is stuck, (2) the existing stuck rows actually cleared now, and (3) systemic prevention so it does not recur. Snapshots watch/incomplete/queue, buckets stuck tasks by failure class, dedups against already-tracked `system` work, unsticks each row by its clearing action (drop moot/dead/stale, spawn follow-up, hand review-loop rows to /gza-task-fix), then ranks and files `system`-tagged prevention fixes by blast radius (cascade-preventer first). Never merges, retries, resumes, deletes branches, or edits code.
Triage `gza incomplete` rows — classify each unresolved merge-unit lineage and recommend the right corrective action (drop moot leaves, escalate to fix, surface manual-resolve rebases, etc.). Never merges, retries, resumes, or deletes branches; never edits code.
Diagnose why a gza task failed — analyzes logs, detects loops, checks diffs, compares baselines, and suggests fixes
| name | gza-spec-coherence |
| description | Check the behavior spec set for coherence, ownership boundaries, and plain-language discipline without editing the spec or the code |
| allowed-tools | Read, Glob, Grep, Write, Bash(ls:*), Bash(git grep:*), Bash(date +%Y%m%d%H%M%S) |
| version | 1.0.0 |
| public | true |
Review the behavior spec set itself in specs/behavior/ for authoring quality:
coherence, ownership boundaries, atomic normative text, and plain-language discipline.
This skill is blind to authorship. The behavior spec is a shared artifact that both humans and agents edit, so you judge the text only: never who wrote it.
This is neither an implementation conformance check nor a feature-spec freshness review:
gza-spec-review-all | gza-behavior-check | gza-spec-coherence (this skill) | |
|---|---|---|---|
| Source of truth | the code | the behavior spec | the behavior-spec set as a set |
| A mismatch means | the doc drifted | code diverged or spec is wrong | ownership, wording, or cross-reference discipline drifted |
| Reviews | specs/features/ | specs/behavior/ vs code | specs/behavior/ vs itself |
Critical: this skill MUST NOT edit the spec or the code. It reports findings only. Each finding cites file + section and says concretely what to change.
specs/behavior/**specs/behavior/ set.specs/behavior/** — review those files against the
rest of the set.specs/behavior/ — review matching files, but still load
the owning files needed to judge overlap and references.If the caller provides a change list, do not limit yourself to those files alone: coherence findings often live at the boundary between the changed file and its owner. Primary findings should still be about the changed behavior-spec files unless an owning file must change to resolve a duplicate-ownership problem.
00-overview.md, instead of re-defining them.MUST, MUST NOT, SHALL,
SHOULD, MAY) that can be said more plainly. Report the exact clause and give a
tighter rewrite.MUST / MUST NOT.Implementation note.Read specs/behavior/README.md and specs/behavior/00-overview.md first. Extract:
Implementation note, status banners,
planned/aspirational notes, rationale)Then list every in-scope file and its declared responsibility in one short table before you start judging overlap.
For each file, ask:
00-overview.md instead of cross-referencing it?Treat 00-overview.md as the default owner of shared vocabulary and system-wide
invariants unless another file explicitly owns a narrower concept.
Known current example: today 00-overview.md owns shared vocabulary and core
invariants, while lifecycle-engine.md restates both in ## Shared model, ## Policy knobs, and repeated invariant references. On the current tree, this overlap should be
reported. After the refactor that replaces restatement with clean cross-references, the
same pair should be reported as resolved.
Check every ownership reference and every local markdown link that matters to the contract:
Report both:
Walk every normative clause in scope and classify it:
MUST/SHALL/etc. for commentary, rationale,
formatting, or obvious restatementFor every verbose clause, quote the clause, then propose a tighter rewrite in plainer words that preserves the same requirement.
Prefer simple English over legalistic prose. Shorter is better when the requirement stays equally precise.
For each in-scope section, confirm:
Implementation note blocks or
equivalent non-normative labeling.date +%Y%m%d%H%M%S
Write to reviews/<timestamp>-spec-coherence.md.
# Behavior spec coherence check
**Scope:** <all behavior specs | changed files>
**Owner map reviewed:** <files>
## Summary
Files reviewed: N
Findings: W overlap · X restatement · Y cross-reference · Z normative-discipline · A open-question/implementation-note issues · B plain-language rewrites
## Blockers
### B1
**Finding:** OVERLAP — `specs/behavior/lifecycle-engine.md` §Shared model
**Conflicts with:** `specs/behavior/00-overview.md` §Vocabulary / §Core invariants
**Problem:** Restates shared vocabulary and invariants that `00-overview.md` already owns.
**What to change:** Replace the restated definitions with a brief cross-reference to
`00-overview.md`, and keep only engine-specific material here.
### B2
**Finding:** RFC-2119 — `specs/behavior/<file>.md` §<section>
**Problem:** Uses `MUST` for rationale / omits `MUST` where the sentence is contract.
**What to change:** <concrete rewrite guidance>
## Follow-Ups
- PLAIN-LANGUAGE — `specs/behavior/<file>.md` §<section>
Quote the clause, explain why it is too wordy, and propose a tighter rewrite.
- CROSS-REFERENCE — `specs/behavior/<file>.md` §<section>
Name the missing or broken pointer to the owning file/section and the exact fix.
- OPEN-QUESTION — `specs/behavior/<file>.md` §<section>
Explain why the text reads like an implied contract and how to mark it explicitly as open.
- IMPLEMENTATION-NOTE — `specs/behavior/<file>.md` §<section>
Identify implementation detail that should move under a clearly marked `Implementation note`.
- Resolved / clean boundaries:
- `00-overview.md` ↔ `lifecycle-engine.md`: shared vocabulary is owned once and referenced, not restated.
## Questions / Assumptions
- None.
## Verdict
Verdict: CHANGES_REQUESTED
The report must use this standard review shape exactly:
## Summary## Blockers## Follow-Ups## Questions / Assumptions## VerdictThe final verdict must be exactly one of:
APPROVEDCHANGES_REQUESTEDNEEDS_DISCUSSIONIf a section has nothing to report, write None. under that heading instead of omitting it.