File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -209,3 +209,24 @@ else
209209 echo
210210 echo ' Commit workflow complete.'
211211fi
212+
213+ # -- State staleness warning --
214+ # If any feat: commit was created but .ai/state.adf wasn't in the changeset, warn.
215+ HAS_FEAT=0
216+ STATE_TOUCHED=0
217+ for group in " ${GROUP_ORDER[@]} " ; do
218+ msg=" $( commit_message_for_group " $group " ) "
219+ if [[ " $msg " == feat* ]]; then
220+ HAS_FEAT=1
221+ fi
222+ files_in_group=" ${GROUP_FILES[$group]} "
223+ if echo " $files_in_group " | grep -q ' \.ai/state\.adf' ; then
224+ STATE_TOUCHED=1
225+ fi
226+ done
227+
228+ if [[ " $HAS_FEAT " -eq 1 && " $STATE_TOUCHED " -eq 0 && -f " .ai/state.adf" ]]; then
229+ echo
230+ echo ' [warn] feat: commit created but .ai/state.adf was not updated.'
231+ echo ' Consider updating STATE to reflect the new milestone/feature.'
232+ fi
You can’t perform that action at this time.
0 commit comments