| name | commit |
| description | Run the forge gate-chain commit workflow: classify the change, run category validation, changelog check, and adversarial review before any git commit. Use whenever committing changes in this repo. |
Follow the COMPLETE pre-commit workflow defined in .opencode/rules/commit-workflow.md. Do NOT skip any steps unless the user explicitly says "skip tests", "skip review", or "just commit".
Validation is mandatory and must be executable where possible. Do not rely only on static inspection.
Parallel session safety is mandatory: commit only files changed in the current session. Never include files you did not edit in this session, and never use blanket staging (git add . / git add -A).
The authoritative steps are in commit-workflow.md; do not re-derive or skip any:
- Classify —
git status --short; identify only files YOU changed this session; classify each by category per [[commit-workflow]] Step 1. Files under .opencode/rules/**, .opencode/agents/**, .claude/agents/**, .opencode/commands/**, .claude/commands/**, .opencode/skills/**, .opencode/plugins/**, .opencode/scripts/**, opencode.jsonc, .claude/settings*.json, the review constitution, or CI/test gates are the control (AI-component) class — higher-scrutiny (see step 4).
- Validate — run the category-specific, executable validations for each changed file's category per [[commit-workflow]] Step 2. The control class additionally runs the evaluation harness —
bash .opencode/evals/run-evals.sh (a regression blocks).
- Changelog — if the change is user-facing, add or correct the project changelog entry per [[commit-workflow]] Step 3 (MANDATORY); if not user-facing, state explicitly why no entry is needed.
- Adversarial review — launch a
review-cheap subagent (fresh context) on the diff; must return PASS. Control / AI-component changes use the authoritative review-final and are gated-approval — present the PASS to the user and get explicit approval before committing (separation of duties; never auto-commit a control change). Cap the review loop at 8 iterations; if it does not converge, record the residual risk and escalate — do not commit.
- Commit — only after all gates pass: first run
.opencode/scripts/check-halt.sh commit (if it exits non-zero, stop — an operator halt is in force); then stage files by explicit path (NEVER git add .) and commit with a descriptive message.
If the user provided additional instructions: $ARGUMENTS