|
| 1 | +--- |
| 2 | +description: Enable multi-agent mode for an existing project |
| 3 | +argument-hint: <agent1,agent2,...> |
| 4 | +--- |
| 5 | + |
| 6 | +Enable multi-agent mode for an existing project by adding agent roles to feature_list.json. |
| 7 | + |
| 8 | +Arguments: $ARGUMENTS |
| 9 | + |
| 10 | +Parse the comma-separated list of agent roles (e.g., `design,architect,api`). |
| 11 | + |
| 12 | +## Prerequisites |
| 13 | + |
| 14 | +- feature_list.json must exist (run `/init-harness` first if not) |
| 15 | +- Project should not already be in multi-agent mode |
| 16 | + |
| 17 | +## Steps: |
| 18 | + |
| 19 | +1. **Read current feature_list.json** |
| 20 | + |
| 21 | + If file doesn't exist, error: "No feature_list.json found. Run `/init-harness` first." |
| 22 | + |
| 23 | + If `multi_agent_mode` is already true, warn: "Project is already in multi-agent mode with agents: [list]. Use `/add-agent` to add more agents or manually edit feature_list.json." |
| 24 | + |
| 25 | +2. **Parse agent roles from arguments** |
| 26 | + |
| 27 | + Split by comma, trim whitespace, lowercase all roles. |
| 28 | + |
| 29 | + If no agents provided, error: "Please specify agent roles. Example: `/enable-multi-agent design,architect,api`" |
| 30 | + |
| 31 | +3. **Update feature_list.json** |
| 32 | + |
| 33 | + Add to the root object: |
| 34 | + ```json |
| 35 | + { |
| 36 | + "multi_agent_mode": true, |
| 37 | + "agents": ["agent1", "agent2", "agent3"] |
| 38 | + } |
| 39 | + ``` |
| 40 | + |
| 41 | +4. **Handle existing features** |
| 42 | + |
| 43 | + If features already exist, ask the user: |
| 44 | + |
| 45 | + "You have [N] existing features. Would you like to assign them to agents now?" |
| 46 | + |
| 47 | + Options: |
| 48 | + - **Yes, assign now** - For each feature, prompt which agent (or "unassigned") |
| 49 | + - **No, leave unassigned** - Set all existing features' `assigned_to` to `null` |
| 50 | + - **Assign by category** - Auto-assign based on category-to-agent mapping (prompt for mapping) |
| 51 | + |
| 52 | +5. **Ensure feature schema compatibility** |
| 53 | + |
| 54 | + For each existing feature, add if missing: |
| 55 | + - `assigned_to`: null (or assigned agent) |
| 56 | + - `blocked_by`: [] |
| 57 | + |
| 58 | +6. **Update summary** |
| 59 | + |
| 60 | + - Update `last_updated` to today's date |
| 61 | + |
| 62 | +7. **Display confirmation** |
| 63 | + |
| 64 | + ``` |
| 65 | + Multi-agent mode enabled! |
| 66 | +
|
| 67 | + Agents: design, architect, api |
| 68 | +
|
| 69 | + Features: |
| 70 | + Assigned: X |
| 71 | + Unassigned: Y |
| 72 | +
|
| 73 | + Next steps: |
| 74 | + - Use `/add-feature agent:category "name" description` to add agent-assigned features |
| 75 | + - Run `/session-start` to select your agent role |
| 76 | + - Use `/reassign-feature FEAT-001 agent` to reassign features |
| 77 | + ``` |
| 78 | + |
| 79 | +## Example usage: |
| 80 | + |
| 81 | +``` |
| 82 | +/enable-multi-agent design,architect,api |
| 83 | +``` |
| 84 | + |
| 85 | +Output: |
| 86 | +``` |
| 87 | +Multi-agent mode enabled! |
| 88 | +
|
| 89 | +Agents: design, architect, api |
| 90 | +
|
| 91 | +You have 5 existing features. Would you like to assign them to agents? |
| 92 | +> Assign by category |
| 93 | +
|
| 94 | +Category mapping: |
| 95 | + ui → design |
| 96 | + core → architect |
| 97 | + api → api |
| 98 | + security → api |
| 99 | +
|
| 100 | +Features assigned: |
| 101 | + UI-001 → design |
| 102 | + CORE-001 → architect |
| 103 | + API-001, API-002 → api |
| 104 | + SEC-001 → api |
| 105 | +``` |
0 commit comments