Streamlined two-phase workflow: review, then commit. Verdict gate between phases. Self-contained — execute the inlined steps directly, do NOT invoke other skills via the Skill tool.
63
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./plugins/flowai/skills/review-and-commit/SKILL.mdTwo-phase command: first review current changes (QA + code review), then commit only if approved. A verdict gate between the phases ensures only approved changes get committed. Streamlined version: Phase 2 reuses diff from Phase 1, targeted doc sync, inline commit grouping.
The gate logic prevents committing code that has critical issues.
Maintainer note (NOT for runtime): generated by scripts/generate-skill-composites.ts from framework/composites.yaml. Source-of-truth bookkeeping only.
<step_by_step>
Empty Diff Guard — git diff --stat, git diff --cached --stat,
git status --short. No changes → STOP. System gitStatus snapshot
can be stale (hooks / parallel processes); if live status shows
unauthored files clean per snapshot, ask user before staging.
Pre-flight Project Check
deno.json → deno task check/test;
package.json → check/lint/test script; Makefile check →
make check; pyproject.toml → pytest/ruff check .; go.mod →
go vet ./... && go test ./...) → else "No automated checks configured"
in the report and JiT subset disables (Rule 10). Do NOT guess.deno * creates deno.lock; npm * resolves deps; etc. Pre-flight
artifacts (deno.lock, __pycache__/, node_modules/, .pytest_cache/)
in the tree after verification are a bug.[critical] and continue review.HEAD; commit-range → <range-start>^). Prefer git worktree add <SCRATCH>/jit-parent-<sid> <parent-sha> (full runnable tree); use
git show <parent-sha>:<path> fallback ONLY if worktree-add fails.
BEFORE any JiT synthesis, run the SAME project test/check command from
2a inside the parent worktree to verify baseline is green. Fallback
path OR red baseline → "JiT disabled — parent baseline unavailable/red"
in Degradation Notes; review continues without the JiT subset.Gather Context
SRS, SDS, and tasks from AGENTS.md. If SRS or
SDS exists and its current content is not already in your context —
read the resolved file before proceeding. If a required role is missing,
report it and continue only for review steps that do not depend on that
role.git diff (unstaged), git diff --cached (staged),
or git log --oneline <base>..HEAD + git diff <base>..HEAD for
branch-based changes.git diff does NOT show untracked files. Check
git status output from step 1 — for each untracked file, read its
content directly and include it in the review scope.tasks role / task list).git log -1 --pretty=%B <parent-sha>..HEAD (or commit messages
of the range). Optionally gh pr view --json body IF the gh CLI is
available AND the branch has a PR. If gh is missing or errors, proceed
silently — PR body is a bonus.Parallel Delegation (after gathering context):
git diff --stat shows < 50 changed lines,
skip delegation — run all steps inline (overhead not justified).Task,
Agent, parallel):
console-expert). Return pass/fail + full output.TODO,
FIXME, HACK, XXX, console.log, temp_*, *.tmp, *.bak,
hardcoded secrets patterns. Delegate to a console/shell-capable agent.
Return findings list.QA: Task Completion
[critical] Missing.[critical] Phantom completion.4a. FR Coverage Audit (blocking gate — see Requirements Lifecycle in AGENTS.md)
implements:; (b) FR sections added/modified in the diff to SRS; (c) [REF:fr:<id>] SALP markers touched in the diff.**Acceptance:** with a runnable ref (test path::name, benchmark id, command, or manual — <reviewer>); missing/placeholder → [critical] no acceptance reference. (2) Run the evidence command (or deno run -A scripts/check-fr-coverage.ts FR-<ID>); non-zero / failing / manual without reviewer → [critical] acceptance fails. (3) FR claimed implemented but no [REF:fr:<id>] marker in changed source → [critical] missing code marker. (4) DoD [x] with no evidence run/cached pass → [critical] Phantom completion.Approve while any FR-gate issue remains.QA: Hygiene (use SA2 result if available; else inline)
temp_*, *.tmp, *.bak, debug console.log/
print statements, hardcoded secrets or localhost URLs.TODO, FIXME, HACK, XXX introduced in
this diff (distinguish from pre-existing ones).[warning] Entire directory deleted — confirm intentional and ask the
user to verify before proceeding.Code Review: Design & Architecture
Code Review: Implementation Quality
any, untyped
parameters, missing return types (where project conventions require them).Code Review: Readability & Style
8a. Mutant + Catching Test Synthesis (JiT) (skip on pure-deletion diff or JiT-disabled flag)
8b. Dual-Run + Filter (JiT) (skip if Step 8a skipped)
Mutant kill-rate skipped — single test invocation exceeded 30 s threshold (recorded N s) in Degradation Notes so the lost signal is
visible (not just an absent section).Run Automated Checks (collect from step 2 and/or SA1)
Final Report — verdict on first line. Include JiT sections (Intents,
Catching Tests, Uncovered Risks, Degradation Notes) only when the
JiT subset ran (or was disabled — Degradation Notes then explains why).
Section order:
## Review: [Approve | Request Changes | Needs Discussion]
### Verdict (plain language) — 2–4 sentences a non-coder acts on: task complete? design sound? key risks? next step? Accept WITHOUT reading the diff. MUST come first.
### Intents (≤5)
### QA Findings — [severity] file:line — description
### Code Review Findings — [severity] file:line — description
### Catching Tests (pass on parent, fail on diff) — name, intent #, mutant killed?, failure, file:line
### Uncovered Risks — risk + reason no test (non-deterministic / I/O / etc.)
### Automated Checks — [pass|fail|skipped] command — summary
### Degradation Notes — which JiT step was skipped and why
### Summary — requirements X/Y; catching tests N; critical/warning/nit counts
### Diff (optional) — offer diff/details for optional inspection; verdict stands without it; never block (Model B). MUST close the report.≥1 surviving catching test → verdict = Request Changes regardless of
other findings. Rank findings top-5 by severity × uniqueness. No issues
AND zero catching tests → "Changes look good. All requirements covered, no
issues found, no behavioural regressions detected." (last clause only when
JiT actually ran).
save <name> / save all / discard all. On save: propose
destination beside file-under-test, confirm, git mv, stage. On
discard all (default for timeout/ambiguous): delete entire scratch
directory, leave no stray files.</step_by_step>
After completing the review report above:
Approve → DO NOT commit yet. Phase 2 below is MANDATORY: re-plan the todo list with Phase 2 steps and execute all of them in order. Committing before reaching Phase 2 step 6 (Reflect) is a workflow violation.Request Changes or Needs Discussion → output the full report and STOP. Do NOT commit.<step_by_step>
git status -s to confirm nothing changed between phases.*_test.*, *.test.*), CI (.github/), acceptance tests (acceptance-tests/), formatting, or dev-environment (.devcontainer/). → Skip doc sync. Output: Documentation sync: skipped — infra-only changes (tests/CI/acceptance-tests)../AGENTS.md has a ## Documentation Map section. If yes → use the path→document mapping from there. If no → use the default mapping:
tasks from AGENTS.md and read that file there. Do NOT scan all task files.tasks role with date: frontmatter (skip legacy flat-path), first check frontmatter status:. If it is superseded, require/keep superseded_by: and skip DoD derivation because the stale original DoD no longer maps to current reality. Otherwise count top-level - [ ]/- [x] items in ## Definition of Done. Derive status: K=0→"to do", 0<K<N→"in progress", K=N→"done" (warn if no DoD). Rewrite frontmatter and git add if it differs. Idempotent. Never downgrade done. Warn-only on parse errors.tasks role with date: frontmatter): NEVER delete — persistent canonical records. Status auto-flip in step 4.3 is the only lifecycle action for non-superseded tasks; status: superseded records are preserved.date: frontmatter): if all DoD items satisfied → git rm and commit; if any unsatisfied → ask user "Delete or keep?"; if no DoD → ask user.reflect skill directly (via the Skill tool, native slash-command execution, or inline execution of its SKILL.md instructions — whichever the host IDE supports).
d. Do NOT ask the user for confirmation before invoking; proceed autonomously (the context question in step b is not a confirmation request — it gathers missing information).git status. If reflect left working-tree edits (typically AGENTS.md, **/CLAUDE.md, framework/**, .claude/**, documents/**): stage them and commit as agent: apply reflect-suggested improvements (or narrower scope, e.g. agent(commit): tighten doc-audit gate). Do NOT amend earlier commits — keep reflect-driven edits as a separate commit. If git status is clean, skip.git status to confirm all changes are committed.Output a combined summary:
b4ba256
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.