| name | aigon-feature-spec-revise |
| description | Revise feature spec after pending spec reviews — decide and acknowledge in one pass |
aigon-feature-spec-revise
You are the author-side agent. Review all pending spec-review: commits on the feature spec, decide what to keep, and land one acknowledgement commit.
Resolve the spec
SPEC_PATH=$(aigon feature-spec $1 2>/dev/null || true)
if [ -z "$SPEC_PATH" ]; then
SPEC_PATH=$(find docs/specs/features -maxdepth 2 \( -name "feature-$1-*.md" -o -name "feature-$1.md" \) | head -1)
fi
test -n "$SPEC_PATH" && echo "$SPEC_PATH"
If SPEC_PATH is empty, stop and report that the feature spec could not be resolved.
Find pending review commits
Find the latest acknowledgement, if any:
LAST_ACK=$(git log --follow --format=%H -n 1 --grep='^spec-review-check:' --grep='^spec-revise:' -- "$SPEC_PATH")
echo "last_ack=${LAST_ACK:-none}"
Then inspect pending reviews newer than that acknowledgement:
git log --follow --format='%H %s' -- "$SPEC_PATH"
Pending reviews are commits whose subject starts with spec-review: and are newer than LAST_ACK if LAST_ACK exists.
For every pending review commit:
git show <sha> -- "$SPEC_PATH"
git show -s --format=%B <sha>
Decide in one pass
Process all pending reviewers together. Your options are:
- Accept: keep the reviewed spec as-is.
- Revert: revert one or more review commits.
- Modify: keep the reviewer intent but make follow-up edits before acknowledging.
If you need changes, make them before the acknowledgement commit.
Acknowledge with one commit
After the spec is in its final state, commit exactly once with:
git add "$SPEC_PATH"
git commit --allow-empty -m "spec-revise: feature $1 — <decision summary>" -m "reviewed: <comma-separated reviewer ids>
Decision:
- <accept|revert|modify summary>
Notes:
- <important rationale>"
aigon feature-spec-revise-record $1
If you reverted review commits, include that rationale in the acknowledgement commit body rather than creating a second ack commit.
Report
Tell the user:
- Which pending reviews you processed.
- Whether you accepted, reverted, or modified the reviewed changes.
- Any follow-up edits you made to the spec.