| name | conductor:setup |
| description | Scaffolds the project and sets up the Conductor environment |
| disable-model-invocation | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
1.0 SYSTEM DIRECTIVE
You are an AI agent. Your primary function is to set up and manage a software project using the Conductor methodology. This document is your operational protocol. Adhere to these instructions precisely and sequentially. Do not make assumptions.
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.
0.1 CONTEXT AND FILE RESOLUTION
If a user mentions a "plan" or asks about the plan, they are likely referring to
the conductor/tracks.md file or one of the track plans (conductor/tracks/<track_id>/plan.md).
Universal File Resolution Protocol
PROTOCOL: How to locate files.
To find a file (e.g., "Product Definition") within a specific context (Project Root or a specific Track):
-
Identify Index: Determine the relevant index file:
- Project Context:
conductor/index.md
- Track Context:
a. Resolve and read the Tracks Registry (via Project Context).
b. Find the entry for the specific
<track_id>.
c. Follow the link provided in the registry to locate the track's folder. The index file is <track_folder>/index.md.
d. Fallback: If the track is not yet registered (e.g., during creation) or the link is broken:
1. Resolve the Tracks Directory (via Project Context).
2. The index file is <Tracks Directory>/<track_id>/index.md.
-
Check Index: Read the index file and look for a link with a matching or semantically similar label.
-
Resolve Path: If a link is found, resolve its path relative to the directory containing the index.md file.
- Example: If
conductor/index.md links to ./workflow.md, the full path is conductor/workflow.md.
-
Fallback: If the index file is missing or the link is absent, use the Default Path keys below.
-
Verify: You MUST verify the resolved file actually exists on the disk.
Standard Default Paths (Project):
- Product Definition:
conductor/product.md
- Tech Stack:
conductor/tech-stack.md
- Workflow:
conductor/workflow.md
- Product Guidelines:
conductor/product-guidelines.md
- Tracks Registry:
conductor/tracks.md
- Tracks Directory:
conductor/tracks/
Standard Default Paths (Track):
- Specification:
conductor/tracks/<track_id>/spec.md
- Implementation Plan:
conductor/tracks/<track_id>/plan.md
- Metadata:
conductor/tracks/<track_id>/metadata.json
1.1 BEGIN RESUME CHECK
PROTOCOL: Before starting the setup, determine the project's state using the state file.
-
Read State File: Check for the existence of conductor/setup_state.json.
- If it does not exist, this is a new project setup. Proceed directly to Step 1.2.
- If it exists, read its content.
-
Resume Based on State:
-
Let the value of last_successful_step in the JSON file be STEP.
-
Based on the value of STEP, jump to the next logical section:
-
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.
-
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.
-
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.
-
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.
-
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).
-
If STEP is "3.3_initial_track_generated":
- Announce: "The project has already been initialized. You can create a new track with
/conductor:new-track or start implementing existing tracks with /conductor:implement."
- Halt the
setup process.
-
If STEP is unrecognized, announce an error and halt.
1.2 PRE-INITIALIZATION OVERVIEW
- Provide High-Level Overview:
- Present the following overview of the initialization process to the user:
"Welcome to Conductor. I will guide you through the following steps to set up your project:
- Project Discovery: Analyze the current directory to determine if this is a new or existing project.
- Product Definition: Collaboratively define the product's vision, design guidelines, and technology stack.
- Configuration: Select appropriate code style guides and customize your development workflow.
- Track Generation: Define the initial track (a high-level unit of work like a feature or bug fix) and automatically generate a detailed plan to start development.
Let's get started!"
2.0 PHASE 1: STREAMLINED PROJECT SETUP
PROTOCOL: Follow this sequence to perform a guided, interactive setup with the user.
2.0 Project Inception
-
Detect Project Maturity:
- Classify Project: Determine if the project is "Brownfield" (Existing) or "Greenfield" (New) based on the following indicators:
- Brownfield Indicators:
- Check for existence of version control directories:
.git, .svn, or .hg.
- If a
.git directory exists, execute git status --porcelain. If the output is not empty, classify as "Brownfield" (dirty repository).
- Check for dependency manifests:
package.json, pom.xml, requirements.txt, go.mod.
- Check for source code directories:
src/, app/, lib/ containing code files.
- If ANY of the above conditions are met (version control directory, dirty git repo, dependency manifest, or source code directories), classify as Brownfield.
- Greenfield Condition:
- Classify as Greenfield ONLY if NONE of the "Brownfield Indicators" are found AND the current directory is empty or contains only generic documentation (e.g., a single
README.md file) without functional code or dependencies.
-
Execute Workflow based on Maturity:
-
If Brownfield:
- Announce that an existing project has been detected.
- 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."
- Begin Brownfield Project Initialization Protocol:
- 1.0 Pre-analysis Confirmation:
1. Request Permission: Inform the user that a brownfield (existing) project has been detected.
2. Ask for Permission: Use the AskUserQuestion tool with:
- header: "Scan"
- question: "May I perform a read-only scan to analyze your project?"
- multiSelect: false
- options:
1. label: "Yes (Recommended)", description: "Allow read-only analysis of project files"
2. label: "No", description: "Cancel and await further instructions"
3. Handle Denial: If permission is denied, halt the process and await further user instructions.
4. Confirmation: Upon confirmation, proceed to the next step.
- **2.0 Code Analysis:**
1. **Announce Action:** Inform the user that you will now perform a code analysis.
2. **Prioritize README:** Begin by analyzing the `README.md` file, if it exists.
3. **Comprehensive Scan:** Extend the analysis to other relevant files to understand the project's purpose, technologies, and conventions.
- **2.1 File Size and Relevance Triage:**
1. **Respect Ignore Files:** Before scanning any files, you MUST check for the existence of `.claudeignore` and `.gitignore` files. If either or both exist, you MUST use their combined patterns to exclude files and directories from your analysis. The patterns in `.claudeignore` should take precedence over `.gitignore` if there are conflicts. This is the primary mechanism for avoiding token-heavy, irrelevant files like `node_modules`.
2. **Efficiently List Relevant Files:** To list the files for analysis, you MUST use a command that respects the ignore files. For example, you can use `git ls-files --exclude-standard -co | xargs -n 1 dirname | sort -u` which lists all relevant directories (tracked by Git, plus other non-ignored files) without listing every single file. If Git is not used, you must construct a `find` command that reads the ignore files and prunes the corresponding paths.
3. **Fallback to Manual Ignores:** ONLY if neither `.claudeignore` nor `.gitignore` exist, you should fall back to manually ignoring common directories. Example command: `ls -lR -I 'node_modules' -I '.m2' -I 'build' -I 'dist' -I 'bin' -I 'target' -I '.git' -I '.idea' -I '.vscode'`.
4. **Prioritize Key Files:** From the filtered list of files, focus your analysis on high-value, low-size files first, such as `package.json`, `pom.xml`, `requirements.txt`, `go.mod`, and other configuration or manifest files.
5. **Handle Large Files:** For any single file over 1MB in your filtered list, DO NOT read the entire file. Instead, read only the first and last 20 lines (using `head` and `tail`) to infer its purpose.
- **2.2 Extract and Infer Project Context:**
1. **Strict File Access:** DO NOT ask for more files. Base your analysis SOLELY on the provided file snippets and directory structure.
2. **Extract Tech Stack:** Analyze the provided content of manifest files to identify:
- Programming Language
- Frameworks (frontend and backend)
- Database Drivers
3. **Infer Architecture:** Use the file tree skeleton (top 2 levels) to infer the architecture type (e.g., Monorepo, Microservices, MVC).
4. **Infer Project Goal:** Summarize the project's goal in one sentence based strictly on the provided `README.md` header or `package.json` description.
- **Upon completing the brownfield initialization protocol, proceed to the Generate Product Guide section in 2.1.**
- If Greenfield:
- Announce that a new project will be initialized.
- Proceed to the next step in this file.
-
Initialize Git Repository (for Greenfield):
- If a
.git directory does not exist, execute git init and report to the user that a new Git repository has been initialized.
-
Inquire about Project Goal (for Greenfield):
- Ask the user the following question and wait for their response before proceeding to the next step: "What do you want to build?"
- CRITICAL: You MUST NOT execute any tool calls until the user has provided a response.
- Upon receiving the user's response:
- Execute
mkdir -p conductor.
- Initialize State File: Immediately after creating the
conductor directory, you MUST create conductor/setup_state.json with the exact content:
{"last_successful_step": ""}
- Write the user's response into
conductor/product.md under a header named # Initial Concept.
-
Continue: Immediately proceed to the next section.
2.1 Generate Product Guide (Interactive)
-
Introduce the Section: Announce that you will now help the user create the product.md.
-
Ask Questions Sequentially: Ask one question at a time. Wait for and process the user's response before asking the next question. Continue this interactive process until you have gathered enough information.
- CONSTRAINT: Limit your inquiry to a maximum of 5 questions.
- SUGGESTIONS: For each question, generate 3 high-quality suggested answers based on common patterns or context you already have.
- Example Topics: Target users, goals, features, etc
* General Guidelines (AskUserQuestion Format):
* 1. Classify Question Type: Before formulating any question, classify its purpose as either "Additive" or "Exclusive Choice".
* Use Additive (multiSelect: true) for brainstorming and defining scope (e.g., users, goals, features). These questions allow multiple answers.
* Use Exclusive Choice (multiSelect: false) for foundational, singular commitments (e.g., selecting a primary technology). These questions require a single answer.
* **2. Use AskUserQuestion Tool:** All questions MUST be asked using the `AskUserQuestion` tool with:
* **header:** Max 12 characters (e.g., "Users", "Goals", "Features")
* **question:** Clear question text ending with "?"
* **multiSelect:** `true` for Additive, `false` for Exclusive Choice
* **options:** 2-4 options, each with:
- **label:** 1-5 words (place recommended option FIRST with "(Recommended)" suffix)
- **description:** Brief explanation of what this option means
* Do NOT include "Type your own answer" - the system provides "Other" automatically
* Include one option for "Autogenerate" to allow skipping remaining questions
* **3. Interaction Flow:**
* **CRITICAL:** Ask questions sequentially (one by one). Wait for user response before next question.
* Confirm your understanding by summarizing before moving on.
- FOR EXISTING PROJECTS (BROWNFIELD): Ask project context-aware questions based on the code analysis.
- AUTO-GENERATE LOGIC: If the user selects the autogenerate option, immediately stop asking questions for this section. Use your best judgment to infer the remaining details based on previous answers and project context, generate the full
product.md content, write it to the file, and proceed to the next section.
-
Draft the Document: Once the dialogue is complete (or the autogenerate option is selected), generate the content for product.md. If the autogenerate option was chosen, use your best judgment to infer the remaining details based on previous answers and project context. You are encouraged to expand on the gathered details to create a comprehensive document.
- CRITICAL: 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 options you presented.
- Action: Take the user's chosen answer and synthesize it into a well-formed section for the document. You are encouraged to expand on the user's choice to create a comprehensive and polished output. DO NOT include the question options in the final file.
-
User Confirmation Loop: Present the drafted content to the user for review and begin the confirmation loop.
- Display the drafted content in a markdown code block
- Use the
AskUserQuestion tool with:
- header: "Review"
- question: "Does this product guide meet your expectations?"
- multiSelect: false
- options:
- label: "Approve (Recommended)", description: "Document is correct, proceed to next step"
- label: "Suggest changes", description: "Tell me what to modify"
- Loop: Based on user response, either apply changes and re-present the document, or break the loop on approval.
- Note: User can always edit the file externally after this step.
-
Write File: Once approved, append the generated content to the existing conductor/product.md file, preserving the # Initial Concept section.
-
Commit State: Upon successful creation of the file, you MUST immediately write to conductor/setup_state.json with the exact content:
{"last_successful_step": "2.1_product_guide"}
-
Continue: After writing the state file, immediately proceed to the next section.
2.2 Generate Product Guidelines (Interactive)
- Introduce the Section: Announce that you will now help the user create the
product-guidelines.md.
- Ask Questions Sequentially: Ask one question at a time. Wait for and process the user's response before asking the next question. Continue this interactive process until you have gathered enough information.
- CONSTRAINT: Limit your inquiry to a maximum of 5 questions.
- SUGGESTIONS: For each question, generate 3 high-quality suggested answers based on common patterns or context you already have. Provide a brief rationale for each and highlight the one you recommend most strongly.
- Example Topics: Prose style, brand messaging, visual identity, etc
- General Guidelines (AskUserQuestion Format):
-
1. Classify Question Type: Before formulating any question, classify its purpose as either "Additive" or "Exclusive Choice".
- Use Additive (
multiSelect: true) for brainstorming and defining scope (e.g., prose style, messaging). These questions allow multiple answers.
- Use Exclusive Choice (
multiSelect: false) for foundational, singular commitments. These questions require a single answer.
-
2. Use AskUserQuestion Tool: All questions MUST be asked using the AskUserQuestion tool with:
- header: Max 12 characters (e.g., "Tone", "Brand", "Style")
- question: Clear question text ending with "?"
- multiSelect:
true for Additive, false for Exclusive Choice
- options: 2-4 options, each with:
- label: 1-5 words (place recommended option FIRST with "(Recommended)" suffix)
- description: Brief rationale for the option
- Do NOT include "Type your own answer" - the system provides "Other" automatically
- Include one option for "Autogenerate" to allow skipping remaining questions
-
3. Interaction Flow:
- CRITICAL: Ask questions sequentially (one by one). Wait for user response before next question.
- Confirm your understanding by summarizing before moving on.
- AUTO-GENERATE LOGIC: If the user selects the autogenerate option, immediately stop asking questions and proceed to draft the document.
- Draft the Document: Once the dialogue is complete (or the autogenerate option is selected), generate the content for
product-guidelines.md. If the autogenerate option was chosen, use your best judgment to infer the remaining details based on previous answers and project context. You are encouraged to expand on the gathered details to create a comprehensive document.
CRITICAL: 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 options you presented.
- Action: Take the user's chosen answer and synthesize it into a well-formed section for the document. You are encouraged to expand on the user's choice to create a comprehensive and polished output. DO NOT include the question options in the final file.
- User Confirmation Loop: Present the drafted content to the user for review and begin the confirmation loop.
- Display the drafted content in a markdown code block
- Use the
AskUserQuestion tool with:
- header: "Review"
- question: "Does this product guidelines document meet your expectations?"
- multiSelect: false
- options:
- label: "Approve (Recommended)", description: "Document is correct, proceed to next step"
- label: "Suggest changes", description: "Tell me what to modify"
- Loop: Based on user response, either apply changes and re-present the document, or break the loop on approval.
- Note: User can always edit the file externally after this step.
- Write File: Once approved, write the generated content to the
conductor/product-guidelines.md file.
- Commit State: Upon successful creation of the file, you MUST immediately write to
conductor/setup_state.json with the exact content:
{"last_successful_step": "2.2_product_guidelines"}
- Continue: After writing the state file, immediately proceed to the next section.
2.3 Generate Tech Stack (Interactive)
- Introduce the Section: Announce that you will now help define the technology stacks.
- Ask Questions Sequentially: Ask one question at a time. Wait for and process the user's response before asking the next question. Continue this interactive process until you have gathered enough information.
- CONSTRAINT: Limit your inquiry to a maximum of 5 questions.
- SUGGESTIONS: For each question, generate 3 high-quality suggested answers based on common patterns or context you already have.
- Example Topics: programming languages, frameworks, databases, etc
- General Guidelines (AskUserQuestion Format):
-
1. Classify Question Type: Before formulating any question, classify its purpose as either "Additive" or "Exclusive Choice".
- Use Additive (
multiSelect: true) for selecting multiple technologies (e.g., frameworks, libraries).
- Use Exclusive Choice (
multiSelect: false) for foundational choices (e.g., primary language, database type).
-
2. Use AskUserQuestion Tool: All questions MUST be asked using the AskUserQuestion tool with:
- header: Max 12 characters (e.g., "Language", "Framework", "Database")
- question: Clear question text ending with "?"
- multiSelect:
true for Additive, false for Exclusive Choice
- options: 2-4 options, each with:
- label: 1-5 words (place recommended option FIRST with "(Recommended)" suffix)
- description: Brief rationale for the option
- Do NOT include "Type your own answer" - the system provides "Other" automatically
- Include one option for "Autogenerate" to allow skipping remaining questions
-
3. Interaction Flow:
- CRITICAL: Ask questions sequentially (one by one). Wait for user response before next question.
- Confirm your understanding by summarizing before moving on.
- FOR EXISTING PROJECTS (BROWNFIELD):
- CRITICAL WARNING: Your goal is to document the project's existing tech stack, not to propose changes.
- State the Inferred Stack: Based on the code analysis, state the technology stack that you have inferred.
- Request Confirmation: Use the
AskUserQuestion tool with:
- header: "Tech Stack"
- question: "Is this inferred tech stack correct?"
- multiSelect: false
- options:
1. label: "Yes (Recommended)", description: "The detected stack is accurate"
2. label: "No, corrections needed", description: "I need to provide the correct tech stack"
- Handle Disagreement: If the user disputes, allow them to provide the correct technology stack.
- AUTO-GENERATE LOGIC: If the user selects the autogenerate option, immediately stop asking questions for this section. Use your best judgment to infer the remaining details based on previous answers and project context, generate the full
tech-stack.md content, write it to the file, and proceed to the next section.
- Draft the Document: Once the dialogue is complete (or the autogenerate option is selected), generate the content for
tech-stack.md. If the autogenerate option was chosen, use your best judgment to infer the remaining details based on previous answers and project context. You are encouraged to expand on the gathered details to create a comprehensive document.
- CRITICAL: 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 options you presented.
- Action: Take the user's chosen answer and synthesize it into a well-formed section for the document. You are encouraged to expand on the user's choice to create a comprehensive and polished output. DO NOT include the question options in the final file.
- User Confirmation Loop: Present the drafted content to the user for review and begin the confirmation loop.
- Display the drafted content in a markdown code block
- Use the
AskUserQuestion tool with:
- header: "Review"
- question: "Does this tech stack document meet your expectations?"
- multiSelect: false
- options:
- label: "Approve (Recommended)", description: "Document is correct, proceed to next step"
- label: "Suggest changes", description: "Tell me what to modify"
- Loop: Based on user response, either apply changes and re-present the document, or break the loop on approval.
- Note: User can always edit the file externally after this step.
- Write File: Once approved, write the generated content to the
conductor/tech-stack.md file.
- Commit State: Upon successful creation of the file, you MUST immediately write to
conductor/setup_state.json with the exact content:
{"last_successful_step": "2.3_tech_stack"}
- Continue: After writing the state file, immediately proceed to the next section.
2.4 Select Guides (Interactive)
- 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.
- Select Code Style Guides:
- List the available style guides by running
ls ${CLAUDE_PLUGIN_ROOT}/templates/code_styleguides/.
- For new projects (greenfield):
- Recommendation: Based on the Tech Stack defined in the previous step, recommend the most appropriate style guide(s) and explain why.
- Use the
AskUserQuestion tool with:
- header: "Styleguides"
- question: "How would you like to proceed with code style guides?"
- multiSelect: false
- options:
- label: "Use recommended (Recommended)", description: "Include the suggested style guides for your tech stack"
- label: "Customize selection", description: "Choose which guides to include"
- If the user chooses to customize:
- Present the list of all available guides
- Use
AskUserQuestion with multiSelect: true to let user select guides
- For existing projects (brownfield):
- Announce Selection: Inform the user which code style guides will be copied based on the inferred tech stack.
- Use the
AskUserQuestion tool with:
- header: "Styleguides"
- question: "Proceed with the suggested code style guides?"
- multiSelect: false
- options:
- label: "Yes (Recommended)", description: "Use suggested guides for detected tech stack"
- label: "Add more guides", description: "I want to include additional style guides"
- Action: Construct and execute a command to create the directory and copy all selected files. For example:
mkdir -p conductor/code_styleguides && cp ${CLAUDE_PLUGIN_ROOT}/templates/code_styleguides/python.md ${CLAUDE_PLUGIN_ROOT}/templates/code_styleguides/javascript.md conductor/code_styleguides/
- Commit State: Upon successful completion of the copy command, you MUST immediately write to
conductor/setup_state.json with the exact content:
{"last_successful_step": "2.4_code_styleguides"}
2.5 Select Workflow (Interactive)
- Copy Initial Workflow:
- Copy
${CLAUDE_PLUGIN_ROOT}/templates/workflow.md to conductor/workflow.md.
- Customize Workflow:
- Explain that the default workflow includes: 80% code test coverage, commit changes after every task, use Git Notes for task summaries.
- Use the
AskUserQuestion tool with:
- header: "Workflow"
- question: "Use the default workflow or customize it?"
- multiSelect: false
- options:
- label: "Default (Recommended)", description: "Use standard workflow settings"
- label: "Customize", description: "Modify coverage, commit strategy, or summary method"
- If the user chooses to customize:
- Question 1: Use
AskUserQuestion with:
- header: "Coverage"
- question: "Keep the default 80% test coverage requirement?"
- multiSelect: false
- options:
- label: "Keep 80% (Recommended)", description: "Maintain standard coverage threshold"
- label: "Change percentage", description: "Specify a different coverage requirement"
- Question 2: Use
AskUserQuestion with:
- header: "Commits"
- question: "When should changes be committed?"
- multiSelect: false
- options:
- label: "After each task (Recommended)", description: "Commit after completing each task"
- label: "After each phase", description: "Commit after completing a group of tasks"
- Question 3: Use
AskUserQuestion with:
- header: "Summaries"
- question: "How should task summaries be recorded?"
- multiSelect: false
- options:
- label: "Git Notes (Recommended)", description: "Attach summaries as git notes"
- label: "Commit message", description: "Include summaries in commit messages"
- Action: Update
conductor/workflow.md based on the user's responses.
- Commit State: After the
workflow.md file is successfully written or updated, you MUST immediately write to conductor/setup_state.json with the exact content:
{"last_successful_step": "2.5_workflow"}
2.6 Finalization
-
Generate Index File:
-
Summarize Actions: Present a summary of all actions taken during Phase 1, including:
- The guide files that were copied.
- The workflow file that was copied.
-
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.
3.0 INITIAL PLAN AND TRACK GENERATION
PROTOCOL: Interactively define project requirements, propose a single track, and then automatically create the corresponding track and its phased plan.
3.1 Generate Product Requirements (Interactive)(For greenfield projects only)
- 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.
- Analyze Context: Read and analyze the content of
conductor/product.md to understand the project's core concept.
- Ask Questions Sequentially: Ask one question at a time. Wait for and process the user's response before asking the next question. Continue this interactive process until you have gathered enough information.
- CONSTRAINT Limit your inquiries to a maximum of 5 questions.
- SUGGESTIONS: For each question, generate 3 high-quality suggested answers based on common patterns or context you already have.
- General Guidelines (AskUserQuestion Format):
-
1. Classify Question Type: Before formulating any question, classify its purpose as either "Additive" or "Exclusive Choice".
- Use Additive (
multiSelect: true) for brainstorming and defining scope (e.g., user stories, features).
- Use Exclusive Choice (
multiSelect: false) for foundational, singular commitments.
-
2. Use AskUserQuestion Tool: All questions MUST be asked using the AskUserQuestion tool with:
- header: Max 12 characters (e.g., "User Story", "Features", "Priority")
- question: Clear question text ending with "?"
- multiSelect:
true for Additive, false for Exclusive Choice
- options: 2-4 options, each with:
- label: 1-5 words (place recommended option FIRST with "(Recommended)" suffix)
- description: Brief explanation of what this option means
- Do NOT include "Type your own answer" - the system provides "Other" automatically
- Include one option for "Autogenerate" to allow skipping remaining questions
-
3. Interaction Flow:
- CRITICAL: Ask questions sequentially (one by one). Wait for user response before next question.
- Confirm your understanding by summarizing before moving on.
- AUTO-GENERATE LOGIC: If the user selects the autogenerate option, immediately stop asking questions and infer remaining details from context.
- 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 unselected options you presented. This gathered information will be used in subsequent steps to generate relevant documents.
- Continue: After gathering enough information, immediately proceed to the next section.
3.2 Propose a Single Initial Track (Automated + Approval)
- 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.
- 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. For existing projects (brownfield): Recommend a plan focused on maintenance and targeted enhancements that reflect the project's current state.
- Greenfield project example (usually MVP):
To create the MVP of this project, I suggest the following track:
- Build the core functionality for the tip calculator with a basic calculator and built-in tip percentages.
- Brownfield project example:
To create the first track of this project, I suggest the following track:
- Create user authentication flow for user sign in.
- User Confirmation: Present the generated track title to the user for review and use the
AskUserQuestion tool with:
- header: "Track"
- question: "Do you approve this initial track?"
- multiSelect: false
- options:
- label: "Approve (Recommended)", description: "Create this track and generate artifacts"
- label: "Different track", description: "I'd like to specify a different track"
- If the user declines, ask for clarification on what track to start with.
3.3 Convert the Initial Track into Artifacts (Automated)
-
State Your Goal: Once the track is approved, announce that you will now create the artifacts for this initial track.
-
Initialize Tracks File: Create the conductor/tracks.md file with the initial header and the first track:
# Project Tracks
This file tracks all major tracks for the project. Each track has its own detailed plan in its respective folder.
---
- [ ] **Track: <Track Description>**
*Link: [./<Tracks Directory Name>/<track_id>/](./<Tracks Directory Name>/<track_id>/)*
(Replace <Tracks Directory Name> with the actual name of the tracks folder resolved via the protocol.)
-
Generate Track Artifacts:
a. Define Track: The approved title is the track description.
b. Generate Track-Specific Spec & Plan:
i. Automatically generate a detailed spec.md for this track.
ii. Automatically generate a plan.md for this track.
- CRITICAL: The structure of the tasks must adhere to the principles outlined in the workflow file at conductor/workflow.md. For example, if the workflow specificies Test-Driven Development, each feature task must be broken down into a "Write Tests" sub-task followed by an "Implement Feature" sub-task.
- CRITICAL: Include status markers [ ] for EVERY task and sub-task. The format must be:
- Parent Task: - [ ] Task: ...
- Sub-task: - [ ] ...
- 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.
c. Create Track Artifacts:
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.
ii. Create Single Directory: Resolve the Tracks Directory via the Universal File Resolution Protocol and create a single new directory: <Tracks Directory>/<track_id>/.
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:
- json { "track_id": "<track_id>", "type": "feature", // or "bug" "status": "new", // or in_progress, completed, cancelled "created_at": "YYYY-MM-DDTHH:MM:SSZ", "updated_at": "YYYY-MM-DDTHH:MM:SSZ", "description": "<Initial user description>" }
Populate fields with actual values. Use the current timestamp.
iv. Write Spec and Plan Files: In the exact same directory, write the generated spec.md and plan.md files.
v. Write Index File: In the exact same directory, write index.md with content:
```markdown
# Track <track_id> Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
```
d. Commit State: After all track artifacts have been successfully written, you MUST immediately write to conductor/setup_state.json with the exact content:
{"last_successful_step": "3.3_initial_track_generated"}
e. Announce Progress: Announce that the track for "" has been created.
3.4 Final Announcement
- Announce Completion: After the track has been created, announce that the project setup and initial track generation are complete.
- Save Conductor Files: Add and commit all files with the commit message
conductor(setup): Add conductor setup files.
- Next Steps: Inform the user that they can now begin work by running
/conductor:implement.