Conductor Setup
Initialize project with Conductor context-driven development
Claude CodeGeneric
---
description: Initialize project with Conductor context-driven development
---
<!--
SYSTEM DIRECTIVE: You are an AI agent. Follow these instructions precisely.
CRITICAL: Validate every tool call. If any fails, halt and announce the failure.
CRITICAL: When determining model complexity, ALWAYS select the "flash" model.
-->
# Conductor Setup
Initialize this project with context-driven development. Follow this workflow precisely and sequentially.
---
## 1.0 RESUME CHECK
**PROTOCOL: Before starting setup, determine the project's state using the state file.**
1. **Read State File:** Check for `conductor/setup_state.json`
- If it does NOT exist, this is a new project. Proceed to Section 1.1.
- If it exists, read its content.
2. **Resume Based on State:** Let `last_successful_step` be `STEP`:
- If `STEP` is `"2.1_product_guide"`: Announce "Resuming: Product Guide complete. Next: Product Guidelines." → Proceed to **Section 2.2**
- If `STEP` is `"2.2_product_guidelines"`: Announce "Resuming: Guidelines complete. Next: Tech Stack." → Proceed to **Section 2.3**
- If `STEP` is `"2.3_tech_stack"`: Announce "Resuming: Tech Stack complete. Next: Code Styleguides." → Proceed to **Section 2.4**
- If `STEP` is `"2.4_code_styleguides"`: Announce "Resuming: Styleguides complete. Next: Workflow." → Proceed to **Section 2.5**
- If `STEP` is `"2.5_workflow"`: Announce "Resuming: Scaffolding complete. Next: Initial Track." → Proceed to **Phase 2 (Section 3.0)**
- If `STEP` is `"3.3_initial_track_generated"` or `"complete"`:
- Announce: "Project already initialized. Use `/conductor-newtrack` or `/conductor-implement`."
- **HALT** the setup process.
- If `STEP` is unrecognized: Announce error and halt.
---
## 1.1 PRE-INITIALIZATION OVERVIEW
Present to user:
> "Welcome to Conductor. I will guide you through:
> 1. **Project Discovery:** Analyze if this is new or existing project
> 2. **Product Definition:** Define vision, guidelines, and tech stack
> 3. **Configuration:** Select code style guides and workflow
> 4. **Track Generation:** Create the initial development track
>
> Let's get started!"
---
## 2.0 PHASE 1: PROJECT SETUP
### 2.0 Project Inception - Brownfield/Greenfield Detection
1. **Classify Project Maturity:**
**Brownfield Indicators (ANY match = Brownfield):**
- Version control: `.git`, `.svn`, `.hg` directories exist
- Dirty git repo: `git status --porcelain` returns non-empty output
- Dependency manifests: `package.json`, `pom.xml`, `requirements.txt`, `go.mod`, `Cargo.toml`
- Source directories: `src/`, `app/`, `lib/` containing code files
**Greenfield Condition:**
- NONE of above indicators found
- Directory is empty or contains only generic docs (e.g., single `README.md`)
2. **Execute Based on Maturity:**
**IF BROWNFIELD:**
- Announce: "Existing project detected."
- If uncommitted changes detected: "WARNING: You have uncommitted changes. Please commit or stash before proceeding."
- **Request Permission:**
> "I've detected an existing project. May I perform a read-only scan to analyze it?"
> A) Yes
> B) No
>
> Please respond with A or B.
- If denied, halt and await instructions.
- **Code Analysis:**
- Respect `.gitignore` and `.geminiignore` patterns
- Analyze README.md, package.json, directory structure
- Extract: Programming Language, Frameworks, Database Drivers
- Infer: Architecture type (Monorepo, Microservices, MVC)
- Summarize project goal from README header or package description
- Proceed to **Section 2.1**
**IF GREENFIELD:**
- Announce: "New project will be initialized."
- Initialize git if `.git` doesn't exist: `git init`
- **Ask:** "What do you want to build?"
- **CRITICAL:** Wait for user response before any tool calls.
- Upon response:
- Execute: `mkdir -p conductor`
- Create `conductor/setup_state.json`: `{"last_successful_step": ""}`
- Write response to `conductor/product.md` under `# Initial Concept`
- Proceed to **Section 2.1**
---
### 2.1 Generate Product Guide (Interactive)
1. **Announce:** "Now let's create `product.md`."
2. **Ask Questions Sequentially (max 5):**
- **Question Classification:** Before each question, classify as:
- **Additive:** For brainstorming (users, goals, features) - add "(Select all that apply)"
- **Exclusive Choice:** For singular decisions - do NOT add multi-select
- **Format:** Vertical list with options:
```
A) [Option A]
B) [Option B]
C) [Option C]
D) Type your own answer
E) Autogenerate and review product.md
```
- For Brownfield: Ask context-aware questions based on code analysis
- **AUTO-GENERATE:** If user selects E, stop questions and generate based on context
3. **Draft Document:** Generate `product.md` using ONLY user's selected answers. Ignore unselected options.
4. **User Confirmation Loop:**
> "I've drafted the product guide. Please review:"
> ```markdown
> [Drafted content]
> ```
> A) **Approve** - Proceed
> B) **Suggest Changes** - Tell me what to modify
- Loop until approved.
5. **Write File:** Append to `conductor/product.md`, preserving `# Initial Concept`.
6. **Commit State:** Write `conductor/setup_state.json`:
```json
{"last_successful_step": "2.1_product_guide"}
- Continue: Proceed to Section 2.2.
2.2 Generate Product Guidelines (Interactive)
Announce: "Now let's create
product-guidelines.md."Ask Questions Sequentially (max 5):
- Topics: Prose style, brand messaging, visual identity
- Same A/B/C/D/E format as Section 2.1
- For each option, provide brief rationale and highlight recommendation
Draft Document: Generate using ONLY user's selected answers.
User Confirmation Loop: Same as Section 2.1.
Write File: Write to
conductor/product-guidelines.md.Commit State:
Maintain Conductor Setup?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Conductor Setup on getagentictools](https://getagentictools.com/loops/nguyensitrung-conductor-setup?ref=badge)