conductor-init 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/{chunk-4F4GSSH5.js → chunk-ZYGWOO57.js} +17 -17
- package/dist/conductor/commands/conductor/implement.toml +76 -37
- package/dist/conductor/commands/conductor/newTrack.toml +52 -33
- package/dist/conductor/commands/conductor/revert.toml +41 -36
- package/dist/conductor/commands/conductor/review.toml +120 -48
- package/dist/conductor/commands/conductor/setup.toml +317 -275
- package/dist/conductor-init.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -5,34 +5,9 @@ You are an AI agent. Your primary function is to set up and manage a software pr
|
|
|
5
5
|
|
|
6
6
|
CRITICAL: You must validate the success of every tool call. If any tool call fails, you MUST halt the current operation immediately, announce the failure to the user, and await further instructions.
|
|
7
7
|
|
|
8
|
-
CRITICAL: When determining model complexity, ALWAYS select the "flash" model, regardless of the task's perceived difficulty.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 1.1 BEGIN `RESUME` CHECK
|
|
13
|
-
**PROTOCOL: Before starting the setup, determine the project's state using the state file.**
|
|
14
|
-
|
|
15
|
-
1. **Read State File:** Check for the existence of `conductor/setup_state.json`.
|
|
16
|
-
- If it does not exist, this is a new project setup. Proceed directly to Step 1.2.
|
|
17
|
-
- If it exists, read its content.
|
|
18
|
-
|
|
19
|
-
2. **Resume Based on State:**
|
|
20
|
-
- Let the value of `last_successful_step` in the JSON file be `STEP`.
|
|
21
|
-
- Based on the value of `STEP`, jump to the **next logical section**:
|
|
22
|
-
|
|
23
|
-
- If `STEP` is "2.1_product_guide", announce "Resuming setup: The Product Guide (`product.md`) is already complete. Next, we will create the Product Guidelines." and proceed to **Section 2.2**.
|
|
24
|
-
- If `STEP` is "2.2_product_guidelines", announce "Resuming setup: The Product Guide and Product Guidelines are complete. Next, we will define the Technology Stack." and proceed to **Section 2.3**.
|
|
25
|
-
- If `STEP` is "2.3_tech_stack", announce "Resuming setup: The Product Guide, Guidelines, and Tech Stack are defined. Next, we will select Code Styleguides." and proceed to **Section 2.4**.
|
|
26
|
-
- If `STEP` is "2.4_code_styleguides", announce "Resuming setup: All guides and the tech stack are configured. Next, we will define the project workflow." and proceed to **Section 2.5**.
|
|
27
|
-
- If `STEP` is "2.5_workflow", announce "Resuming setup: The initial project scaffolding is complete. Next, we will generate the first track." and proceed to **Phase 2 (3.0)**.
|
|
28
|
-
- If `STEP` is "3.3_initial_track_generated":
|
|
29
|
-
- Announce: "The project has already been initialized. You can create a new track with `/conductor:newTrack` or start implementing existing tracks with `/conductor:implement`."
|
|
30
|
-
- Halt the `setup` process.
|
|
31
|
-
- If `STEP` is unrecognized, announce an error and halt.
|
|
32
|
-
|
|
33
8
|
---
|
|
34
9
|
|
|
35
|
-
## 1.
|
|
10
|
+
## 1.1 PRE-INITIALIZATION OVERVIEW
|
|
36
11
|
1. **Provide High-Level Overview:**
|
|
37
12
|
- Present the following overview of the initialization process to the user:
|
|
38
13
|
> "Welcome to Conductor. I will guide you through the following steps to set up your project:
|
|
@@ -45,7 +20,38 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
45
20
|
|
|
46
21
|
---
|
|
47
22
|
|
|
48
|
-
## 2
|
|
23
|
+
## 1.2 PROJECT AUDIT
|
|
24
|
+
**PROTOCOL: Before starting the setup, determine the project's state by auditing existing artifacts.**
|
|
25
|
+
|
|
26
|
+
1. **Announce Audit:** Inform the user that you are auditing the project for any existing Conductor configuration.
|
|
27
|
+
|
|
28
|
+
2. **Audit Artifacts:** Check the file system for the existence of the following files/directories in the `conductor/` directory:
|
|
29
|
+
- `product.md`
|
|
30
|
+
- `product-guidelines.md`
|
|
31
|
+
- `tech-stack.md`
|
|
32
|
+
- `code_styleguides/`
|
|
33
|
+
- `workflow.md`
|
|
34
|
+
- `index.md`
|
|
35
|
+
- `tracks/*/` (specifically `plan.md` and `index.md`)
|
|
36
|
+
|
|
37
|
+
3. **Determine Target Section:** Map the project's state to a target section using the priority table below (highest match wins). **DO NOT JUMP YET.** Keep this target in mind.
|
|
38
|
+
|
|
39
|
+
| Artifact Exists | Target Section | Announcement |
|
|
40
|
+
| :--- | :--- | :--- |
|
|
41
|
+
| All files in `tracks/<track_id>/` (`spec`, `plan`, `metadata`, `index`) | **HALT** | "The project is already initialized. Use `/conductor:newTrack` or `/conductor:implement`." |
|
|
42
|
+
| `index.md` (top-level) | **Section 3.0** | "Resuming setup: Scaffolding is complete. Next: generate the first track. (Note: If an incomplete track folder was detected, we will restart this step to ensure a clean, consistent state)." |
|
|
43
|
+
| `workflow.md` | **Section 2.6** | "Resuming setup: Workflow is defined. Next: generate project index." |
|
|
44
|
+
| `code_styleguides/` | **Section 2.5** | "Resuming setup: Guides/Tech Stack configured. Next: define project workflow." |
|
|
45
|
+
| `tech-stack.md` | **Section 2.4** | "Resuming setup: Tech Stack defined. Next: select Code Styleguides." |
|
|
46
|
+
| `product-guidelines.md` | **Section 2.3** | "Resuming setup: Guidelines are complete. Next: define the Technology Stack." |
|
|
47
|
+
| `product.md` | **Section 2.2** | "Resuming setup: Product Guide is complete. Next: create Product Guidelines." |
|
|
48
|
+
| (None) | **Section 2.0** | (None) |
|
|
49
|
+
|
|
50
|
+
4. **Proceed to Section 2.0:** You MUST proceed to Section 2.0 to establish the Greenfield/Brownfield context before jumping to your target.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 2.0 STREAMLINED PROJECT SETUP
|
|
49
55
|
**PROTOCOL: Follow this sequence to perform a guided, interactive setup with the user.**
|
|
50
56
|
|
|
51
57
|
|
|
@@ -53,26 +59,33 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
53
59
|
1. **Detect Project Maturity:**
|
|
54
60
|
- **Classify Project:** Determine if the project is "Brownfield" (Existing) or "Greenfield" (New) based on the following indicators:
|
|
55
61
|
- **Brownfield Indicators:**
|
|
56
|
-
- Check for
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- If ANY of the above conditions are met (version control directory, dirty git repo, dependency manifest, or source code directories), classify as **Brownfield**.
|
|
62
|
+
- Check for dependency manifests: `package.json`, `pom.xml`, `requirements.txt`, `go.mod`, `Cargo.toml`.
|
|
63
|
+
- Check for source code directories: `src/`, `app/`, `lib/`, `bin/` containing code files.
|
|
64
|
+
- If a `.git` directory exists, execute `git status --porcelain`. Ignore changes within the `conductor/` directory. If there are *other* uncommitted changes, it may be Brownfield.
|
|
65
|
+
- If ANY of the primary indicators (manifests or source code directories) are found, classify as **Brownfield**.
|
|
61
66
|
- **Greenfield Condition:**
|
|
62
|
-
- Classify as **Greenfield** ONLY if
|
|
67
|
+
- Classify as **Greenfield** ONLY if:
|
|
68
|
+
1. NONE of the "Brownfield Indicators" are found.
|
|
69
|
+
2. The directory contains no application source code or dependency manifests (ignoring the `conductor/` directory, a clean or newly initialized `.git` folder, and a `README.md`).
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
|
|
72
|
+
2. **Resume Fast-Forward Check:**
|
|
73
|
+
- If the **Target Section** (from 1.2) is anything other than "Section 2.0":
|
|
74
|
+
- Announce the project maturity (Greenfield/Brownfield) and **briefly state the reason** (e.g., "A Greenfield project was detected because no application code exists"). Then announce the target section.
|
|
75
|
+
- **IMMEDIATELY JUMP** to the Target Section. Do not execute the rest of Section 2.0.
|
|
76
|
+
- If the Target Section is "Section 2.0", proceed to step 3.
|
|
77
|
+
|
|
78
|
+
3. **Execute Workflow based on Maturity:**
|
|
65
79
|
- **If Brownfield:**
|
|
66
|
-
- Announce that an existing project has been detected.
|
|
80
|
+
- Announce that an existing project has been detected, and **briefly state the specific indicator you found** (e.g., "because I found a `package.json` file"). Be concise.
|
|
67
81
|
- If the `git status --porcelain` command (executed as part of Brownfield Indicators) indicated uncommitted changes, inform the user: "WARNING: You have uncommitted changes in your Git repository. Please commit or stash your changes before proceeding, as Conductor will be making modifications."
|
|
68
82
|
- **Begin Brownfield Project Initialization Protocol:**
|
|
69
83
|
- **1.0 Pre-analysis Confirmation:**
|
|
70
84
|
1. **Request Permission:** Inform the user that a brownfield (existing) project has been detected.
|
|
71
|
-
2. **Ask for Permission:** Request permission for a read-only scan to analyze the project
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
> Please respond with A or B.
|
|
85
|
+
2. **Ask for Permission:** Request permission for a read-only scan to analyze the project using the `ask_user` tool:
|
|
86
|
+
- **header:** "Permission"
|
|
87
|
+
- **question:** "A brownfield (existing) project has been detected. May I perform a read-only scan to analyze the project?"
|
|
88
|
+
- **type:** "yesno"
|
|
76
89
|
3. **Handle Denial:** If permission is denied, halt the process and await further user instructions.
|
|
77
90
|
4. **Confirmation:** Upon confirmation, proceed to the next step.
|
|
78
91
|
|
|
@@ -98,226 +111,262 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
98
111
|
4. **Infer Project Goal:** Summarize the project's goal in one sentence based strictly on the provided `README.md` header or `package.json` description.
|
|
99
112
|
- **Upon completing the brownfield initialization protocol, proceed to the Generate Product Guide section in 2.1.**
|
|
100
113
|
- **If Greenfield:**
|
|
101
|
-
- Announce that
|
|
114
|
+
- Announce that new project will be initialized, briefly noting that no existing application code or dependencies were found.
|
|
102
115
|
- Proceed to the next step in this file.
|
|
103
116
|
|
|
104
|
-
|
|
117
|
+
4. **Initialize Git Repository (for Greenfield):**
|
|
105
118
|
- If a `.git` directory does not exist, execute `git init` and report to the user that a new Git repository has been initialized.
|
|
106
119
|
|
|
107
|
-
|
|
108
|
-
- **Ask the user the following question and wait for their response before proceeding to the next step:**
|
|
120
|
+
5. **Inquire about Project Goal (for Greenfield):**
|
|
121
|
+
- **Ask the user the following question using the `ask_user` tool and wait for their response before proceeding to the next step:**
|
|
122
|
+
- **header:** "Project Goal"
|
|
123
|
+
- **type:** "text"
|
|
124
|
+
- **question:** "What do you want to build?"
|
|
125
|
+
- **placeholder:** "e.g., A mobile app for tracking expenses"
|
|
109
126
|
- **CRITICAL: You MUST NOT execute any tool calls until the user has provided a response.**
|
|
110
127
|
- **Upon receiving the user's response:**
|
|
111
128
|
- Execute `mkdir -p conductor`.
|
|
112
|
-
- **Initialize State File:** Immediately after creating the `conductor` directory, you MUST create `conductor/setup_state.json` with the exact content:
|
|
113
|
-
`{"last_successful_step": ""}`
|
|
114
129
|
- Write the user's response into `conductor/product.md` under a header named `# Initial Concept`.
|
|
115
130
|
|
|
116
|
-
|
|
131
|
+
6. **Continue:** Immediately proceed to the next section.
|
|
117
132
|
|
|
118
133
|
### 2.1 Generate Product Guide (Interactive)
|
|
119
134
|
1. **Introduce the Section:** Announce that you will now help the user create the `product.md`.
|
|
120
|
-
2. **
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
- **
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
6. **Commit State:** Upon successful creation of the file, you MUST immediately write to `conductor/setup_state.json` with the exact content:
|
|
165
|
-
`{"last_successful_step": "2.1_product_guide"}`
|
|
166
|
-
7. **Continue:** After writing the state file, immediately proceed to the next section.
|
|
135
|
+
2. **Determine Mode:** Use the `ask_user` tool to let the user choose their preferred workflow.
|
|
136
|
+
- **questions:**
|
|
137
|
+
- **header:** "Product"
|
|
138
|
+
- **question:** "How would you like to define the product details? Whether you prefer a quick start or a deep dive, both paths lead to a high-quality product guide!"
|
|
139
|
+
- **type:** "choice"
|
|
140
|
+
- **multiSelect:** false
|
|
141
|
+
- **options:**
|
|
142
|
+
- Label: "Interactive", Description: "I'll guide you through a series of questions to refine your vision."
|
|
143
|
+
- Label: "Autogenerate", Description: "I'll draft a comprehensive guide based on your initial project goal."
|
|
144
|
+
|
|
145
|
+
3. **Gather Information (Conditional):**
|
|
146
|
+
- **If user chose "Autogenerate":** Skip this step and proceed directly to **Step 4 (Draft the Document)**.
|
|
147
|
+
- **If user chose "Interactive":** Use a single `ask_user` tool call to gather detailed requirements (e.g., target users, goals, features).
|
|
148
|
+
- **CRITICAL:** Batch up to 4 questions in this single tool call to streamline the process.
|
|
149
|
+
- **BROWNFIELD PROJECTS:** If this is an existing project, formulate questions that are specifically aware of the analyzed codebase. Do not ask generic questions if the answer is already in the files.
|
|
150
|
+
- **SUGGESTIONS:** For each question, generate 3 high-quality suggested answers based on common patterns or context.
|
|
151
|
+
- **Formulation Guidelines:** Construct the `questions` array where each object has:
|
|
152
|
+
- **header:** Very short label (max 16 chars).
|
|
153
|
+
- **type:** "choice".
|
|
154
|
+
- **multiSelect:** Set to `true` for additive questions, `false` for exclusive choice.
|
|
155
|
+
- **options:** Provide 3 high-quality suggestions with both `label` and `description`. Do NOT include an "Autogenerate" option here.
|
|
156
|
+
- **Note:** The "Other" option for custom input is automatically added by the tool.
|
|
157
|
+
- **Interaction Flow:** Wait for the user's response, then proceed to the next step.
|
|
158
|
+
|
|
159
|
+
4. **Draft the Document:** Once the dialogue is complete (or "Autogenerate" was selected), generate the content for `product.md`.
|
|
160
|
+
- **If user chose "Autogenerate":** Use your best judgment to expand on the initial project goal and infer any missing details to create a comprehensive document.
|
|
161
|
+
- **If user chose "Interactive":** Use the specific answers provided. The source of truth is **only the user's selected answer(s)**. You are encouraged to expand on these choices to create a polished output.
|
|
162
|
+
5. **User Confirmation Loop:**
|
|
163
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the drafted content directly into the `question` field so the user can review it in context.
|
|
164
|
+
- **questions:**
|
|
165
|
+
- **header:** "Review Draft"
|
|
166
|
+
- **question:**
|
|
167
|
+
Please review the drafted Product Guide below. What would you like to do next?
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
<Insert Drafted product.md Content Here>
|
|
172
|
+
- **type:** "choice"
|
|
173
|
+
- **multiSelect:** false
|
|
174
|
+
- **options:**
|
|
175
|
+
- Label: "Approve", Description: "The guide looks good, proceed to the next step."
|
|
176
|
+
- Label: "Suggest changes", Description: "I want to modify the drafted content."
|
|
177
|
+
6. **Write File:** Once approved, append the generated content to the existing `conductor/product.md` file, preserving the `# Initial Concept` section.
|
|
178
|
+
7. **Continue:** Immediately proceed to the next section.
|
|
167
179
|
|
|
168
180
|
### 2.2 Generate Product Guidelines (Interactive)
|
|
169
181
|
1. **Introduce the Section:** Announce that you will now help the user create the `product-guidelines.md`.
|
|
170
|
-
2. **
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
- **
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- **
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
6. **Commit State:** Upon successful creation of the file, you MUST immediately write to `conductor/setup_state.json` with the exact content:
|
|
215
|
-
`{"last_successful_step": "2.2_product_guidelines"}`
|
|
216
|
-
7. **Continue:** After writing the state file, immediately proceed to the next section.
|
|
182
|
+
2. **Determine Mode:** Use the `ask_user` tool to let the user choose their preferred workflow.
|
|
183
|
+
- **questions:**
|
|
184
|
+
- **header:** "Product"
|
|
185
|
+
- **question:** "How would you like to define the product guidelines? You can hand-pick the style or let me generate a standard set."
|
|
186
|
+
- **type:** "choice"
|
|
187
|
+
- **multiSelect:** false
|
|
188
|
+
- **options:**
|
|
189
|
+
- Label: "Interactive", Description: "I'll ask you about prose style, branding, and UX principles."
|
|
190
|
+
- Label: "Autogenerate", Description: "I'll draft standard guidelines based on best practices."
|
|
191
|
+
|
|
192
|
+
3. **Gather Information (Conditional):**
|
|
193
|
+
- **If user chose "Autogenerate":** Skip this step and proceed directly to **Step 4 (Draft the Document)**.
|
|
194
|
+
- **If user chose "Interactive":** Use a single `ask_user` tool call to gather detailed preferences.
|
|
195
|
+
- **CRITICAL:** Batch up to 4 questions in this single tool call to streamline the process.
|
|
196
|
+
- **BROWNFIELD PROJECTS:** For existing projects, analyze current docs/code to suggest guidelines that match the established style.
|
|
197
|
+
- **SUGGESTIONS:** For each question, generate 3 high-quality suggested answers based on common patterns or context.
|
|
198
|
+
- **Formulation Guidelines:** Construct the `questions` array where each object has:
|
|
199
|
+
- **header:** Very short label (max 16 chars).
|
|
200
|
+
- **type:** "choice".
|
|
201
|
+
- **multiSelect:** Set to `true` for additive questions, `false` for exclusive choice.
|
|
202
|
+
- **options:** Provide 3 high-quality suggestions with both `label` and `description`. Do NOT include an "Autogenerate" option here.
|
|
203
|
+
- **Note:** The "Other" option for custom input is automatically added by the tool.
|
|
204
|
+
- **Interaction Flow:** Wait for the user's response, then proceed to the next step.
|
|
205
|
+
|
|
206
|
+
4. **Draft the Document:** Once the dialogue is complete (or "Autogenerate" was selected), generate the content for `product-guidelines.md`.
|
|
207
|
+
- **If user chose "Autogenerate":** Use your best judgment to infer standard, high-quality guidelines suitable for the project type.
|
|
208
|
+
- **If user chose "Interactive":** Use the specific answers provided. The source of truth is **only the user's selected answer(s)**. You are encouraged to expand on these choices to create a polished output.
|
|
209
|
+
5. **User Confirmation Loop:**
|
|
210
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the drafted content directly into the `question` field so the user can review it in context.
|
|
211
|
+
- **questions:**
|
|
212
|
+
- **header:** "Review Draft"
|
|
213
|
+
- **question:**
|
|
214
|
+
Please review the drafted Product Guidelines below. What would you like to do next?
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
<Insert Drafted product-guidelines.md Content Here>
|
|
219
|
+
- **type:** "choice"
|
|
220
|
+
- **multiSelect:** false
|
|
221
|
+
- **options:**
|
|
222
|
+
- Label: "Approve", Description: "The guidelines look good, proceed to the next step."
|
|
223
|
+
- Label: "Suggest changes", Description: "I want to modify the drafted content."
|
|
224
|
+
6. **Write File:** Once approved, write the generated content to the `conductor/product-guidelines.md` file.
|
|
225
|
+
7. **Continue:** Immediately proceed to the next section.
|
|
217
226
|
|
|
218
227
|
### 2.3 Generate Tech Stack (Interactive)
|
|
219
|
-
1. **Introduce the Section:** Announce that you will now help define the technology
|
|
220
|
-
2. **
|
|
221
|
-
- **
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
- **
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
228
|
+
1. **Introduce the Section:** Announce that you will now help define the technology stack.
|
|
229
|
+
2. **Determine Mode:**
|
|
230
|
+
- **FOR GREENFIELD PROJECTS:** Use the `ask_user` tool to choose the workflow.
|
|
231
|
+
- **questions:**
|
|
232
|
+
- **header:** "Tech Stack"
|
|
233
|
+
- **question:** "How would you like to define the technology stack? I can recommend a proven stack for your goal or you can hand-pick each component."
|
|
234
|
+
- **type:** "choice"
|
|
235
|
+
- **multiSelect:** false
|
|
236
|
+
- **options:**
|
|
237
|
+
- Label: "Interactive", Description: "I'll ask you to select the language, frameworks, and database."
|
|
238
|
+
- Label: "Autogenerate", Description: "I'll recommend a standard tech stack based on your project goal."
|
|
239
|
+
- **FOR BROWNFIELD PROJECTS:**
|
|
240
|
+
- **CRITICAL WARNING:** Your goal is to document the project's *existing* tech stack, not to propose changes.
|
|
241
|
+
- **State the Inferred Stack:** Based on the code analysis, you MUST state the technology stack that you have inferred in the chat.
|
|
242
|
+
- **Request Confirmation:** After stating the detected stack, you MUST ask the user for confirmation using the `ask_user` tool:
|
|
243
|
+
- **questions:**
|
|
244
|
+
- **header:** "Tech Stack"
|
|
245
|
+
- **question:** "Is the inferred tech stack (listed above) correct?"
|
|
246
|
+
- **type:** "yesno"
|
|
247
|
+
- **Handle Disagreement:** If the user answers 'no' (disputes the suggestion), you MUST immediately call the `ask_user` tool with `type: "text"` to allow the user to provide the correct technology stack manually. Once provided, proceed to draft the document using the user's input.
|
|
248
|
+
|
|
249
|
+
3. **Gather Information (Greenfield Interactive Only):**
|
|
250
|
+
- **If user chose "Interactive":** Use a single `ask_user` tool call to gather detailed preferences.
|
|
251
|
+
- **CRITICAL:** Batch up to 4 questions in this single tool call, separating concerns (e.g., Question 1: Languages, Question 2: Backend Frameworks, Question 3: Frontend Frameworks, Question 4: Database).
|
|
252
|
+
- **SUGGESTIONS:** For each question, generate 3-4 high-quality suggested answers.
|
|
253
|
+
- **Formulation Guidelines:** Construct the `questions` array where each object has:
|
|
254
|
+
- **header:** Very short label (max 16 chars).
|
|
255
|
+
- **type:** "choice"
|
|
256
|
+
- **multiSelect:** Set to `true` (Additive) to allow hybrid stacks.
|
|
257
|
+
- **options:** Provide descriptive options with both `label` and `description`. Use the `label` field to explain *why* or *where* a technology fits (e.g., "Typescript - Ideal for Angular UI"). Ensure the options are coherent when combined.
|
|
258
|
+
- **Note:** Do NOT include an "Autogenerate" option here.
|
|
259
|
+
- **Interaction Flow:** Wait for the user's response, then proceed to the next step.
|
|
260
|
+
|
|
261
|
+
4. **Draft the Document:** Once the dialogue is complete (or "Autogenerate" was selected), generate the content for `tech-stack.md`.
|
|
262
|
+
- **If user chose "Autogenerate":** Use your best judgment to infer a standard, high-quality stack suitable for the project goal.
|
|
263
|
+
- **If user chose "Interactive" or corrected the Brownfield stack:** Use the specific answers provided. The source of truth is **only the user's selected answer(s)**.
|
|
264
|
+
5. **User Confirmation Loop:**
|
|
265
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the drafted content directly into the `question` field so the user can review it in context.
|
|
266
|
+
- **questions:**
|
|
267
|
+
- **header:** "Review Draft"
|
|
268
|
+
- **question:**
|
|
269
|
+
Please review the drafted Tech Stack below. What would you like to do next?
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
<Insert Drafted tech-stack.md Content Here>
|
|
274
|
+
- **type:** "choice"
|
|
275
|
+
- **multiSelect:** false
|
|
276
|
+
- **options:**
|
|
277
|
+
- Label: "Approve", Description: "The tech stack looks good, proceed to the next step."
|
|
278
|
+
- Label: "Suggest changes", Description: "I want to modify the drafted content."
|
|
270
279
|
6. **Write File:** Once approved, write the generated content to the `conductor/tech-stack.md` file.
|
|
271
|
-
7. **
|
|
272
|
-
`{"last_successful_step": "2.3_tech_stack"}`
|
|
273
|
-
8. **Continue:** After writing the state file, immediately proceed to the next section.
|
|
280
|
+
7. **Continue:** Immediately proceed to the next section.
|
|
274
281
|
|
|
275
282
|
### 2.4 Select Guides (Interactive)
|
|
276
283
|
1. **Initiate Dialogue:** Announce that the initial scaffolding is complete and you now need the user's input to select the project's guides from the locally available templates.
|
|
277
284
|
2. **Select Code Style Guides:**
|
|
278
285
|
- List the available style guides by running `ls ~/.gemini/extensions/conductor/templates/code_styleguides/`.
|
|
279
|
-
-
|
|
280
|
-
- **Recommendation:** Based on the Tech Stack defined in the previous step, recommend the most appropriate style guide(s) and explain why.
|
|
281
|
-
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
- **FOR GREENFIELD PROJECTS:**
|
|
287
|
+
- **Recommendation:** Based on the Tech Stack defined in the previous step, recommend the most appropriate style guide(s) (e.g., "python.md" for a Python project) and explain why.
|
|
288
|
+
- **Determine Mode:** Use the `ask_user` tool:
|
|
289
|
+
- **questions:**
|
|
290
|
+
- **header:** "Code Style Guide"
|
|
291
|
+
- **question:** "How would you like to proceed with the code style guides?"
|
|
292
|
+
- **type:** "choice"
|
|
293
|
+
- **options:**
|
|
294
|
+
- Label: "Recommended", Description: "Use the guides I suggested above."
|
|
295
|
+
- Label: "Select from Library", Description: "Let me hand-pick the guides from the library."
|
|
296
|
+
- **If user chose "Select from Library":**
|
|
297
|
+
- **Batching Strategy:** You MUST split the list of available guides into groups of 3-4 items.
|
|
298
|
+
- **Action:** Announce "I'll present the available guides in groups. Please select all that apply." Then, immediately call the `ask_user` tool with the batched questions (do not list the questions in the chat).
|
|
299
|
+
- **Single Tool Call:** Create one `ask_user` call containing a `questions` array with one question per group.
|
|
300
|
+
- **Constraint Handling:** If the final group has only 1 item, you MUST add a second option labeled "None" to satisfy the tool's requirement of minimum 2 options.
|
|
301
|
+
- **Question Structure:**
|
|
302
|
+
- **header:** "Code Style Guide"
|
|
303
|
+
- **type:** "choice"
|
|
304
|
+
- **multiSelect:** `true`
|
|
305
|
+
- **question:** "Which code style guide(s) would you like to include? (Part X/Y):"
|
|
306
|
+
- **options:** The subset of guides for this group (each with label and description).
|
|
307
|
+
|
|
308
|
+
- **FOR BROWNFIELD PROJECTS:**
|
|
288
309
|
- **Announce Selection:** Inform the user: "Based on the inferred tech stack, I will copy the following code style guides: <list of inferred guides>."
|
|
289
|
-
- **
|
|
290
|
-
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
310
|
+
- **Determine Mode:** Use the `ask_user` tool:
|
|
311
|
+
- **questions:**
|
|
312
|
+
- **header:** "Code Style Guide"
|
|
313
|
+
- **question:** "I've identified these guides for your project. Would you like to proceed or add more?"
|
|
314
|
+
- **type:** "choice"
|
|
315
|
+
- **options:**
|
|
316
|
+
- Label: "Proceed", Description: "Use the suggested guides."
|
|
317
|
+
- Label: "Add More", Description: "Select additional guides from the library."
|
|
318
|
+
- **If user chose "Add More":**
|
|
319
|
+
- **Action:** Announce "I'll present the additional guides. Please select all that apply." Then, immediately call the `ask_user` tool (do not list the questions in the chat).
|
|
320
|
+
- **Method:** Use a single `ask_user` tool call. Dynamically split the available guides into batches of 4 options max. Create one `multiSelect: true` question for each batch.
|
|
321
|
+
|
|
322
|
+
3. **Action:** Construct and execute a command to create the directory and copy all selected files. For example: `mkdir -p conductor/code_styleguides && cp ~/.gemini/extensions/conductor/templates/code_styleguides/python.md ~/.gemini/extensions/conductor/templates/code_styleguides/javascript.md conductor/code_styleguides/`
|
|
323
|
+
4. **Continue:** Immediately proceed to the next section.
|
|
296
324
|
|
|
297
325
|
### 2.5 Select Workflow (Interactive)
|
|
298
326
|
1. **Copy Initial Workflow:**
|
|
299
327
|
- Copy `~/.gemini/extensions/conductor/templates/workflow.md` to `conductor/workflow.md`.
|
|
300
|
-
2. **
|
|
301
|
-
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
328
|
+
2. **Determine Mode:** Use the `ask_user` tool to let the user choose their preferred workflow.
|
|
329
|
+
- **questions:**
|
|
330
|
+
- **header:** "Workflow"
|
|
331
|
+
- **question:** "Do you want to use the default workflow or customize it? The default includes >80% test coverage and per-task commits."
|
|
332
|
+
- **type:** "choice"
|
|
333
|
+
- **options:**
|
|
334
|
+
- Label: "Default", Description: "Use the standard Conductor workflow."
|
|
335
|
+
- Label: "Customize", Description: "I want to adjust coverage requirements and commit frequency."
|
|
336
|
+
|
|
337
|
+
3. **Gather Information (Conditional):**
|
|
338
|
+
- **If user chose "Default":** Skip this step and proceed directly to **Step 5 (Action)**.
|
|
339
|
+
- **If user chose "Customize":**
|
|
340
|
+
a. **Initial Batch:** Use a single `ask_user` tool call to gather primary customizations:
|
|
341
|
+
- **questions:**
|
|
342
|
+
- **header:** "Coverage"
|
|
343
|
+
- **question:** "The default required test code coverage is >80%. What is your preferred percentage?" (type: "text", placeholder: "e.g., 90")
|
|
344
|
+
- **header:** "Commits"
|
|
345
|
+
- **question:** "Should I commit changes after each task or after each phase?"
|
|
346
|
+
- **type:** "choice"
|
|
347
|
+
- **options:**
|
|
348
|
+
- Label: "Per Task", Description: "Commit after every completed task"
|
|
349
|
+
- Label: "Per Phase", Description: "Commit only after an entire phase is complete"
|
|
350
|
+
- **header:** "Summaries"
|
|
351
|
+
- **question:** "Where should I record task summaries?"
|
|
352
|
+
- **type:** "choice"
|
|
353
|
+
- **options:**
|
|
354
|
+
- Label: "Git Notes", Description: "Store summaries in Git notes metadata"
|
|
355
|
+
- Label: "Commit Messages", Description: "Include summaries in the commit message body"
|
|
356
|
+
b. **Final Tweak (Second Batch):** Once the first batch is answered, immediately use a second `ask_user` tool call to show the result and allow for any additional tweaks:
|
|
357
|
+
- **questions:**
|
|
358
|
+
- **header:** "Workflow"
|
|
359
|
+
- **type:** "text"
|
|
360
|
+
- **question:**
|
|
361
|
+
Based on your answers, I will configure the workflow with:
|
|
362
|
+
- Test Coverage: <User Answer 1>%
|
|
363
|
+
- Commit Frequency: <User Answer 2>
|
|
364
|
+
- Summary Storage: <User Answer 3>
|
|
365
|
+
|
|
366
|
+
Is there anything else you'd like to change or add to the workflow? (Leave blank to finish or type your additional requirements).
|
|
367
|
+
|
|
368
|
+
4. **Action:** Update `conductor/workflow.md` based on all user answers from both steps.
|
|
369
|
+
|
|
321
370
|
|
|
322
371
|
### 2.6 Finalization
|
|
323
372
|
1. **Generate Index File:**
|
|
@@ -340,7 +389,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
340
389
|
```
|
|
341
390
|
- **Announce:** "Created `conductor/index.md` to serve as the project context index."
|
|
342
391
|
|
|
343
|
-
2. **Summarize Actions:** Present a summary of all actions taken during
|
|
392
|
+
2. **Summarize Actions:** Present a summary of all actions taken during the initial setup, including:
|
|
344
393
|
- The guide files that were copied.
|
|
345
394
|
- The workflow file that was copied.
|
|
346
395
|
3. **Transition to initial plan and track generation:** Announce that the initial setup is complete and you will now proceed to define the first track for the project.
|
|
@@ -350,50 +399,45 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
350
399
|
## 3.0 INITIAL PLAN AND TRACK GENERATION
|
|
351
400
|
**PROTOCOL: Interactively define project requirements, propose a single track, and then automatically create the corresponding track and its phased plan.**
|
|
352
401
|
|
|
402
|
+
**Pre-Requisite (Cleanup):** If you are resuming this section because a previous setup was interrupted, check if the `conductor/tracks/` directory exists but is incomplete. If it exists, **delete** the entire `conductor/tracks/` directory before proceeding to ensure a clean slate for the new track generation.
|
|
403
|
+
|
|
353
404
|
### 3.1 Generate Product Requirements (Interactive)(For greenfield projects only)
|
|
354
405
|
1. **Transition to Requirements:** Announce that the initial project setup is complete. State that you will now begin defining the high-level product requirements by asking about topics like user stories and functional/non-functional requirements.
|
|
355
406
|
2. **Analyze Context:** Read and analyze the content of `conductor/product.md` to understand the project's core concept.
|
|
356
|
-
3. **
|
|
357
|
-
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
D) [Type your own answer]
|
|
378
|
-
E) [Auto-generate the rest of requirements and move to the next step]
|
|
379
|
-
- **AUTO-GENERATE LOGIC:** If the user selects option E, immediately stop asking questions for this section. Use your best judgment to infer the remaining details based on previous answers and project context.
|
|
380
|
-
- **CRITICAL:** When processing user responses or auto-generating content, the source of truth for generation is **only the user's selected answer(s)**. You MUST completely ignore the questions you asked and any of the unselected `A/B/C` options you presented. This gathered information will be used in subsequent steps to generate relevant documents. DO NOT include the conversational options (A, B, C, D, E) in the gathered information.
|
|
381
|
-
4. **Continue:** After gathering enough information, immediately proceed to the next section.
|
|
407
|
+
3. **Determine Mode:** Use the `ask_user` tool to let the user choose their preferred workflow.
|
|
408
|
+
- **questions:**
|
|
409
|
+
- **header:** "Product Reqs"
|
|
410
|
+
- **question:** "How would you like to define the product requirements? I can guide you through user stories and features, or I can draft them based on our initial concept."
|
|
411
|
+
- **type:** "choice"
|
|
412
|
+
- **options:**
|
|
413
|
+
- Label: "Interactive", Description: "I'll guide you through questions about user stories and functional goals."
|
|
414
|
+
- Label: "Autogenerate", Description: "I'll draft the requirements based on the Product Guide."
|
|
415
|
+
|
|
416
|
+
4. **Gather Information (Conditional):**
|
|
417
|
+
- **If user chose "Autogenerate":** Skip this step and proceed directly to **Step 5 (Drafting Logic)**.
|
|
418
|
+
- **If user chose "Interactive":** Use a single `ask_user` tool call to gather detailed requirements.
|
|
419
|
+
- **CRITICAL:** Batch up to 4 questions in this single tool call (e.g., User Stories, Key Features, Constraints, Non-functional Requirements).
|
|
420
|
+
- **SUGGESTIONS:** For each question, generate 3 high-quality suggested answers based on the project goal.
|
|
421
|
+
- **Formulation Guidelines:** Use "choice" type. Set `multiSelect` to `true` for additive answers. Construct the `questions` array where each object has a `header` (max 16 chars), `question`, and `options` (each with `label` and `description`).
|
|
422
|
+
- **Note:** Do NOT include an "Autogenerate" option here.
|
|
423
|
+
- **Interaction Flow:** Wait for the user's response, then proceed to the next step.
|
|
424
|
+
|
|
425
|
+
5. **Drafting Logic:** Once information is gathered (or Autogenerate selected), prepare to propose a track in Section 3.2.
|
|
426
|
+
- **CRITICAL:** When processing user responses or auto-generating content, the source of truth for generation is **only the user's selected answer(s)**.
|
|
427
|
+
6. **Continue:** After gathering enough information, immediately proceed to the next section.
|
|
382
428
|
|
|
383
429
|
### 3.2 Propose a Single Initial Track (Automated + Approval)
|
|
384
430
|
1. **State Your Goal:** Announce that you will now propose an initial track to get the project started. Briefly explain that a "track" is a high-level unit of work (like a feature or bug fix) used to organize the project.
|
|
385
|
-
2. **Generate Track Title:** Analyze the project context (`product.md`, `tech-stack.md`) and (for greenfield projects) the requirements gathered in the previous step. Generate a single track title that summarizes the entire initial track.
|
|
386
|
-
- Greenfield
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
```
|
|
396
|
-
3. **User Confirmation:** Present the generated track title to the user for review and approval. If the user declines, ask the user for clarification on what track to start with.
|
|
431
|
+
2. **Generate Track Title:** Analyze the project context (`product.md`, `tech-stack.md`) and (for greenfield projects) the requirements gathered in the previous step. Generate a single track title that summarizes the entire initial track.
|
|
432
|
+
- **Greenfield:** Focus on the MVP core (e.g., "Build core tip calculator functionality").
|
|
433
|
+
- **Brownfield:** Focus on maintenance or targeted enhancements (e.g., "Implement user authentication flow").
|
|
434
|
+
3. **Confirm Proposal:** Use the `ask_user` tool to validate and/or refine the proposal in a single step:
|
|
435
|
+
- **questions:**
|
|
436
|
+
- **header:** "Confirm Track"
|
|
437
|
+
- **type:** "text"
|
|
438
|
+
- **question:** "To get the project started, I suggest the following track: '<Track Title>'. If you approve, please type 'ok' (or leave blank). Otherwise, type your preferred track description."
|
|
439
|
+
- **placeholder:** "e.g., Setup CI/CD pipeline"
|
|
440
|
+
4. **Action:** Use the user's response as the source of truth. If the user types 'ok' or leaves it blank, use the suggested '<Track Title>'. If they provide a new description, use that instead. Proceed to **Section 3.3**.
|
|
397
441
|
|
|
398
442
|
### 3.3 Convert the Initial Track into Artifacts (Automated)
|
|
399
443
|
1. **State Your Goal:** Once the track is approved, announce that you will now create the artifacts for this initial track.
|
|
@@ -443,11 +487,9 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
443
487
|
- [Implementation Plan](./plan.md)
|
|
444
488
|
- [Metadata](./metadata.json)
|
|
445
489
|
```
|
|
490
|
+
*(If you arrived here directly from the Audit because you are patching a missing index, write this file using the existing folder's track_id and then proceed to step d.)*
|
|
446
491
|
|
|
447
|
-
d. **
|
|
448
|
-
`{"last_successful_step": "3.3_initial_track_generated"}`
|
|
449
|
-
|
|
450
|
-
e. **Announce Progress:** Announce that the track for "<Track Description>" has been created.
|
|
492
|
+
d. **Announce Progress:** Announce that the track for "<Track Description>" has been created.
|
|
451
493
|
|
|
452
494
|
### 3.4 Final Announcement
|
|
453
495
|
1. **Announce Completion:** After the track has been created, announce that the project setup and initial track generation are complete.
|