Skip to content

Commit f6a1522

Browse files
authored
Merge pull request #48 from gemini-cli-extensions/fix/issue-16-auto-commits
fix(conductor): ensure track completion and doc sync are committed automatically
2 parents 653829b + dd1cd1c commit f6a1522

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

commands/conductor/implement.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
7676
5. **Finalize Track:**
7777
- After all tasks in the track's local `plan.md` are completed, you MUST update the track's status in the tracks file.
7878
- This requires finding the specific heading for the track (e.g., `## [~] Track: <Description>`) and replacing it with the completed status (e.g., `## [x] Track: <Description>`).
79+
- **Commit Changes:** Stage `conductor/tracks.md` and commit with the message `chore(conductor): Mark track '<track_description>' as complete`.
7980
- Announce that the track is fully complete and the tracks file has been updated.
8081
8182
---
8283
83-
## 6.0 SYNCHRONIZE PROJECT DOCUMENTATION
84+
## 4.0 SYNCHRONIZE PROJECT DOCUMENTATION
8485
**PROTOCOL: Update project-level documentation based on the completed track.**
8586
8687
1. **Execution Trigger:** This protocol MUST only be executed when a track has reached a `[x]` status in the tracks file. DO NOT execute this protocol for any other track status changes.
@@ -127,6 +128,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
127128
128129
6. **Final Report:** Announce the completion of the synchronization process and provide a summary of the actions taken.
129130
- **Construct the Message:** Based on the records of which files were changed, construct a summary message.
131+
- **Commit Changes:**
132+
- If any files were changed (`product.md`, `tech-stack.md`, or `product-guidelines.md`), you MUST stage them and commit them.
133+
- **Commit Message:** `docs(conductor): Synchronize docs for track '<track_description>'`
130134
- **Example (if product.md was changed, but others were not):**
131135
> "Documentation synchronization is complete.
132136
> - **Changes made to `product.md`:** The user-facing description of the product was updated to include the new feature.
@@ -137,7 +141,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
137141
138142
---
139143
140-
## 7.0 TRACK CLEANUP
144+
## 5.0 TRACK CLEANUP
141145
**PROTOCOL: Offer to archive or delete the completed track.**
142146
143147
1. **Execution Trigger:** This protocol MUST only be executed after the current track has been successfully implemented and the `SYNCHRONIZE PROJECT DOCUMENTATION` step is complete.
@@ -154,15 +158,17 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
154158
i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it.
155159
ii. **Archive Track Folder:** Move the track's folder from `conductor/tracks/<track_id>` to `conductor/archive/<track_id>`.
156160
iii. **Remove from Tracks File:** Read the content of `conductor/tracks.md`, remove the entire section for the completed track (the part that starts with `---` and contains the track description), and write the modified content back to the file.
157-
iv. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
161+
iv. **Commit Changes:** Stage `conductor/tracks.md` and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`.
162+
v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
158163
* **If user chooses "B" (Delete):**
159164
i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation due to the irreversible nature of the action.
160165
> "WARNING: This will permanently delete the track folder and all its contents. This action cannot be undone. Are you sure you want to proceed? (yes/no)"
161166
ii. **Handle Confirmation:**
162167
- **If 'yes'**:
163168
a. **Delete Track Folder:** Permanently delete the track's folder from `conductor/tracks/<track_id>`.
164169
b. **Remove from Tracks File:** Read the content of `conductor/tracks.md`, remove the entire section for the completed track, and write the modified content back to the file.
165-
c. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
170+
c. **Commit Changes:** Stage `conductor/tracks.md` and the deletion of `conductor/tracks/<track_id>`. Commit with the message `chore(conductor): Delete track '<track_description>'`.
171+
d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
166172
- **If 'no' (or anything else)**:
167173
a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed."
168174
* **If user chooses "C" (Skip) or provides any other input:**

0 commit comments

Comments
 (0)