Skip to content

Commit caeb814

Browse files
committed
feat(conductor): implement tracks directory abstraction
1 parent 6b14aaa commit caeb814

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

GEMINI.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ To find a file (e.g., "**Product Definition**") within a specific context (Proje
99

1010
1. **Identify Index:** Determine the relevant index file:
1111
- **Project Context:** `conductor/index.md`
12-
- **Track Context:** `conductor/tracks/<track_id>/index.md`
12+
- **Track Context:**
13+
a. Resolve and read the **Tracks Registry** (via Project Context).
14+
b. Find the entry for the specific `<track_id>`.
15+
c. Follow the link provided in the registry to locate the track's folder. The index file is `<track_folder>/index.md`.
16+
d. **Fallback:** If the track is not yet registered (e.g., during creation) or the link is broken:
17+
1. Resolve the **Tracks Directory** (via Project Context).
18+
2. The index file is `<Tracks Directory>/<track_id>/index.md`.
1319

1420
2. **Check Index:** Read the index file and look for a link with a matching or semantically similar label.
1521

@@ -26,6 +32,7 @@ To find a file (e.g., "**Product Definition**") within a specific context (Proje
2632
- **Workflow**: `conductor/workflow.md`
2733
- **Product Guidelines**: `conductor/product-guidelines.md`
2834
- **Tracks Registry**: `conductor/tracks.md`
35+
- **Tracks Directory**: `conductor/tracks/`
2936

3037
**Standard Default Paths (Track):**
3138
- **Specification**: `conductor/tracks/<track_id>/spec.md`

commands/conductor/implement.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
156156
3. **Handle User Response:**
157157
* **If user chooses "A" (Archive):**
158158
i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it.
159-
ii. **Archive Track Folder:** Move the track's folder from `conductor/tracks/<track_id>` to `conductor/archive/<track_id>`.
159+
ii. **Archive Track Folder:** Move the track's folder from its current location (resolved via the **Tracks Directory**) to `conductor/archive/<track_id>`.
160160
iii. **Remove from Tracks File:** Read the content of the **Tracks Registry** file, 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.
161161
iv. **Commit Changes:** Stage the **Tracks Registry** file and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`.
162162
v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
@@ -165,9 +165,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
165165
> "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)"
166166
ii. **Handle Confirmation:**
167167
- **If 'yes'**:
168-
a. **Delete Track Folder:** Permanently delete the track's folder from `conductor/tracks/<track_id>`.
168+
a. **Delete Track Folder:** Resolve the **Tracks Directory** and permanently delete the track's folder from `<Tracks Directory>/<track_id>`.
169169
b. **Remove from Tracks File:** Read the content of the **Tracks Registry** file, remove the entire section for the completed track, and write the modified content back to the file.
170-
c. **Commit Changes:** Stage the **Tracks Registry** file and the deletion of `conductor/tracks/<track_id>`. Commit with the message `chore(conductor): Delete track '<track_description>'`.
170+
c. **Commit Changes:** Stage the **Tracks Registry** file and the deletion of the track directory. Commit with the message `chore(conductor): Delete track '<track_description>'`.
171171
d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
172172
- **If 'no' (or anything else)**:
173173
a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed."

commands/conductor/newTrack.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
111111
112112
### 2.4 Create Track Artifacts and Update Main Plan
113113
114-
1. **Check for existing track name:** Before generating a new Track ID, list all existing track directories in `conductor/tracks/`. Extract the short names from these track IDs (e.g., ``shortname_YYYYMMDD`` -> `shortname`). If the proposed short name for the new track (derived from the initial description) matches an existing short name, halt the `newTrack` creation. Explain that a track with that name already exists and suggest choosing a different name or resuming the existing track.
114+
1. **Check for existing track name:** Before generating a new Track ID, resolve the **Tracks Directory** using the **Universal File Resolution Protocol**. List all existing track directories in that resolved path. Extract the short names from these track IDs (e.g., ``shortname_YYYYMMDD`` -> `shortname`). If the proposed short name for the new track (derived from the initial description) matches an existing short name, halt the `newTrack` creation. Explain that a track with that name already exists and suggest choosing a different name or resuming the existing track.
115115
2. **Generate Track ID:** Create a unique Track ID (e.g., ``shortname_YYYYMMDD``).
116-
3. **Create Directory:** Create a new directory: `conductor/tracks/<track_id>/`
117-
4. **Create `metadata.json`:** Create a metadata file at `conductor/tracks/<track_id>/metadata.json` with content like:
116+
3. **Create Directory:** Create a new directory for the tracks: `<Tracks Directory>/<track_id>/`.
117+
4. **Create `metadata.json`:** Create a metadata file at `<Tracks Directory>/<track_id>/metadata.json` with content like:
118118
```json
119119
{
120120
"track_id": "<track_id>",
@@ -127,9 +127,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
127127
```
128128
* Populate fields with actual values. Use the current timestamp.
129129
5. **Write Files:**
130-
* Write the confirmed specification content to `conductor/tracks/<track_id>/spec.md`.
131-
* Write the confirmed plan content to `conductor/tracks/<track_id>/plan.md`.
132-
* Write the index file to `conductor/tracks/<track_id>/index.md` with content:
130+
* Write the confirmed specification content to `<Tracks Directory>/<track_id>/spec.md`.
131+
* Write the confirmed plan content to `<Tracks Directory>/<track_id>/plan.md`.
132+
* Write the index file to `<Tracks Directory>/<track_id>/index.md` with content:
133133
```markdown
134134
# Track <track_id> Context
135135
@@ -141,10 +141,13 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
141141
- **Announce:** Inform the user you are updating the **Tracks Registry**.
142142
- **Append Section:** Resolve the **Tracks Registry** via the **Universal File Resolution Protocol**. Append a new section for the track to the end of this file. The format MUST be:
143143
```markdown
144+
145+
---
146+
144147
- [ ] **Track: <Track Description>**
145-
*Link: [./conductor/tracks/<track_id>/](./conductor/tracks/<track_id>/)*
148+
*Link: [./<Relative Track Path>/](./<Relative Track Path>/)*
146149
```
147-
(Replace placeholders with actual values)
150+
(Replace `<Relative Track Path>` with the path to the track directory relative to the **Tracks Registry** file location.)
148151
7. **Announce Completion:** Inform the user:
149152
> "New track '<track_id>' has been created and added to the tracks file. You can now start implementation by running `/conductor:implement`."
150153

commands/conductor/setup.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
336336
337337
## Management
338338
- [Tracks Registry](./tracks.md)
339+
- [Tracks Directory](./tracks/)
339340
```
340341
- **Announce:** "Created `conductor/index.md` to serve as the project context index."
341342
@@ -405,8 +406,9 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
405406
---
406407
407408
- [ ] **Track: <Track Description>**
408-
*Link: [./conductor/tracks/<track_id>/](./conductor/tracks/<track_id>/)*
409+
*Link: [./<Tracks Directory Name>/<track_id>/](./<Tracks Directory Name>/<track_id>/)*
409410
```
411+
(Replace `<Tracks Directory Name>` with the actual name of the tracks folder resolved via the protocol.)
410412
3. **Generate Track Artifacts:**
411413
a. **Define Track:** The approved title is the track description.
412414
b. **Generate Track-Specific Spec & Plan:**
@@ -419,7 +421,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
419421
- **CRITICAL: Inject Phase Completion Tasks.** You MUST read the `conductor/workflow.md` file to determine if a "Phase Completion Verification and Checkpointing Protocol" is defined. If this protocol exists, then for each **Phase** that you generate in `plan.md`, you MUST append a final meta-task to that phase. The format for this meta-task is: `- [ ] Task: Conductor - User Manual Verification '<Phase Name>' (Protocol in workflow.md)`. You MUST replace `<Phase Name>` with the actual name of the phase.
420422
c. **Create Track Artifacts:**
421423
i. **Generate and Store Track ID:** Create a unique Track ID from the track description using format `shortname_YYYYMMDD` and store it. You MUST use this exact same ID for all subsequent steps for this track.
422-
ii. **Create Single Directory:** Using the stored Track ID, create a single new directory: `conductor/tracks/<track_id>/`.
424+
ii. **Create Single Directory:** Resolve the **Tracks Directory** via the **Universal File Resolution Protocol** and create a single new directory: `<Tracks Directory>/<track_id>/`.
423425
iii. **Create `metadata.json`:** In the new directory, create a `metadata.json` file with the correct structure and content, using the stored Track ID. An example is:
424426
- ```json
425427
{

0 commit comments

Comments
 (0)