Skip to content

Commit 92e0f2f

Browse files
authored
Merge pull request TheBushidoCollective#17 from TheBushidoCollective/hampton/fix-status-persistence
fix(status): commit unit/intent status changes to git
2 parents b2d0eae + 1303fb3 commit 92e0f2f

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

plugin/skills/advance/SKILL.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ INTENT_DIR=".ai-dlc/${INTENT_SLUG}"
7070
CURRENT_UNIT=$(echo "$ITERATION_JSON" | han parse json currentUnit -r --default "")
7171
if [ -n "$CURRENT_UNIT" ] && [ -f "$INTENT_DIR/${CURRENT_UNIT}.md" ]; then
7272
update_unit_status "$INTENT_DIR/${CURRENT_UNIT}.md" "completed"
73+
# Commit the status change so it persists across sessions
74+
git add "$INTENT_DIR/${CURRENT_UNIT}.md"
75+
git commit -m "status: mark ${CURRENT_UNIT} as completed"
7376
fi
7477
```
7578
@@ -217,9 +220,19 @@ SKIP_INTEGRATOR=false
217220
// See Step 2e below
218221
return runIntegration();
219222
}
220-
// Integration passed - Mark intent as done
223+
// Integration passed or skipped - Mark intent as done
221224
state.status = "complete";
222225
// han keep save iteration.json '<updated JSON>'
226+
```
227+
228+
```bash
229+
# Update intent.md frontmatter status so it persists in git (not just ephemeral han keep)
230+
han parse yaml-set status "complete" < "$INTENT_DIR/intent.md" > "$INTENT_DIR/intent.md.tmp" && mv "$INTENT_DIR/intent.md.tmp" "$INTENT_DIR/intent.md"
231+
git add "$INTENT_DIR/intent.md"
232+
git commit -m "status: mark intent ${INTENT_SLUG} as complete"
233+
```
234+
235+
```javascript
223236
// Output completion summary (see Step 5)
224237
return completionSummary;
225238
}
@@ -312,6 +325,12 @@ Task({
312325
```bash
313326
STATE=$(echo "$STATE" | han parse json --set "integratorComplete=true" --set "status=complete")
314327
han keep save iteration.json "$STATE"
328+
329+
# Update intent.md frontmatter status so it persists in git (not just ephemeral han keep)
330+
han parse yaml-set status "complete" < "$INTENT_DIR/intent.md" > "$INTENT_DIR/intent.md.tmp" && mv "$INTENT_DIR/intent.md.tmp" "$INTENT_DIR/intent.md"
331+
git add "$INTENT_DIR/intent.md"
332+
git commit -m "status: mark intent ${INTENT_SLUG} as complete"
333+
315334
# Proceed to Step 5 (completion summary)
316335
```
317336

plugin/skills/construct/SKILL.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ fi
435435

436436
```bash
437437
update_unit_status "$UNIT_FILE" "in_progress"
438+
# Commit the status change so it persists across sessions
439+
git add "$UNIT_FILE"
440+
git commit -m "status: mark $(basename "$UNIT_FILE" .md) as in_progress"
438441
```
439442

440443
3. **Resolve per-unit workflow** — read the unit's `workflow:` frontmatter field. If present, resolve it to a hat sequence. If absent, check for discipline-based defaults before falling back to the intent-level workflow:
@@ -644,7 +647,12 @@ Task({
644647

645648
**If no next hat** (last hat in workflow -- unit complete):
646649

647-
a. Mark unit as completed: `update_unit_status "$UNIT_FILE" "completed"`
650+
a. Mark unit as completed and commit:
651+
```bash
652+
update_unit_status "$UNIT_FILE" "completed"
653+
git add "$UNIT_FILE"
654+
git commit -m "status: mark $(basename "$UNIT_FILE" .md) as completed"
655+
```
648656
b. Remove unit from `unitStates`
649657
c. Merge or PR based on effective change strategy:
650658

@@ -1068,6 +1076,9 @@ source "${CLAUDE_PLUGIN_ROOT}/lib/dag.sh"
10681076
# Update unit status to in_progress in the intent worktree
10691077
# UNIT_FILE points to the file in .ai-dlc/{intent-slug}/
10701078
update_unit_status "$UNIT_FILE" "in_progress"
1079+
# Commit the status change so it persists across sessions
1080+
git add "$UNIT_FILE"
1081+
git commit -m "status: mark $(basename "$UNIT_FILE" .md) as in_progress"
10711082
```
10721083

10731084
**Track current unit in iteration state** so `/advance` knows which unit to mark completed:

0 commit comments

Comments
 (0)