You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove elaborator from construction workflows and improve intent discovery
Elaboration is a separate pre-construction phase (/elaborate), not a
construction hat. Including it in workflows forced construct to work
around it everywhere. This removes the elaborator hat from all workflow
definitions, fallback defaults, and construction logic.
Also improves:
- Elaborate Phase 0 skips completed/in-progress intents (only pending
intents can be re-elaborated)
- Construct discovers intents from both filesystem AND ai-dlc/* branches
(not just current directory)
- Workflow selection uses preflight display + AI recommendation before
user decides, with support for custom hat compositions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**Important:** The orchestrator runs in `/tmp/ai-dlc-{intent-slug}/`, NOT the original repo directory. This keeps main clean and enables parallel intents.
@@ -179,9 +210,9 @@ Loop over ALL ready units from the DAG (not just one):
179
210
source"${CLAUDE_PLUGIN_ROOT}/lib/dag.sh"
180
211
READY_UNITS=$(find_ready_units "$INTENT_DIR")
181
212
182
-
# Determine first construction hat (skip "elaborator" if present)
213
+
# Determine first construction hat
183
214
WORKFLOW_HATS=$(echo "$STATE"| han parse json workflow)
**Include repo URL for cowork**: If operating in a cloned workspace, include the repo URL in each teammate's prompt: "Repository: `<remote-url>`. Clone and checkout `ai-dlc/<intent-slug>` if you don't have local access." This enables teammates to clone independently in cowork mode.
@@ -420,10 +451,10 @@ fi
420
451
```
421
452
422
453
d. Check DAG for newly unblocked units
423
-
e. For each newly ready unit, spawn at `workflow[0]` (first hat, skipping "elaborator" if present -- use the first non-elaborator hat):
454
+
e. For each newly ready unit, spawn at `workflow[0]` (first hat):
Copy file name to clipboardExpand all lines: plugin/skills/elaborate/SKILL.md
+48-8Lines changed: 48 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,11 @@ Before any elaboration, verify the working environment:
72
72
If the user invoked this with a slug argument:
73
73
74
74
1. Check if `.ai-dlc/{slug}/intent.md` exists
75
-
2. If it exists and no units are completed (all units have `status: pending`):
76
-
-**Assume the user wants to modify the existing intent**
75
+
2. If it exists, check the intent and unit statuses:
76
+
-**Skip if intent status is `complete`**: Tell the user "Intent `{slug}` is already completed. Run `/elaborate` without a slug to start a new intent." Then stop.
77
+
-**Skip if ANY unit has status `in_progress` or `completed`**: Construction has already started — elaboration would conflict with in-flight work. Tell the user "Intent `{slug}` already has units in progress or completed. Use `/resume {slug}` to continue construction or `/construct` to resume the build loop." Then stop.
78
+
-**Only proceed if ALL units have `status: pending`** (no work has begun yet):
79
+
3. If all units are pending — **assume the user wants to modify the existing intent**:
77
80
- Read ALL files in `.ai-dlc/{slug}/` directory
78
81
-**Display FULL file contents** to the user in markdown code blocks (never summarize or truncate):
79
82
```
@@ -107,7 +110,7 @@ If the user invoked this with a slug argument:
107
110
}]
108
111
}
109
112
```
110
-
3. Based on their choice:
113
+
4. Based on their choice:
111
114
-**Modify intent**: Jump to Phase 4 (Success Criteria) with current values pre-filled
112
115
-**Modify units**: Jump to Phase 5 (Decompose) with current units shown
113
116
-**Start fresh**: Delete `.ai-dlc/{slug}/` and proceed to Phase 1
Based on the intent, recommend a workflow from the discovered options. Present available workflows dynamically — do NOT hardcode the options.
314
+
This step has three parts: show what's available, make a recommendation, then let the user decide.
312
315
313
-
Use `AskUserQuestion` with the discovered workflows as options. Include a "Custom" option that lets the user compose their own hat sequence from the available hats:
316
+
#### 3a. Preflight — Display Available Options
317
+
318
+
First, show the user all predefined workflows (from Step 2) and available hats (from Step 1) so they have full visibility before any recommendation:
319
+
320
+
```markdown
321
+
## Available Workflows
322
+
323
+
{List each predefined workflow with its hat sequence, from Step 2}
324
+
325
+
## Available Hats
326
+
327
+
{List each hat with its slug and one-line description, from Step 1}
328
+
```
329
+
330
+
#### 3b. Recommendation — Suggest the Best Fit
331
+
332
+
Analyze the intent against the available options. Consider:
333
+
- What phases does this intent actually need? (Not every intent needs planning — a pure refactor might skip straight to builder.)
334
+
- Does the domain suggest specialized hats? (Security-sensitive work benefits from red-team/blue-team. Bug investigations benefit from observer/hypothesizer.)
335
+
- Keep it minimal — every hat adds an iteration cycle. Don't add hats "just in case."
336
+
337
+
Present your recommendation with reasoning:
338
+
339
+
```markdown
340
+
## Recommendation
341
+
342
+
**{workflow name or "Custom"}**: {hats as arrows}
343
+
344
+
{1-2 sentences explaining why this fits the intent. Reference specific aspects of what the user described.}
345
+
```
346
+
347
+
The recommendation can be a predefined workflow or a custom composition — whichever best fits. If suggesting a custom sequence, explain what each hat contributes to this specific intent.
348
+
349
+
#### 3c. User Decides
350
+
351
+
Use `AskUserQuestion` with the predefined workflows as options. Do NOT hardcode options — use the workflows discovered in Step 2:
314
352
315
353
```json
316
354
{
317
355
"questions": [{
318
-
"question": "Which workflow fits this task? (or compose a custom one from available hats)",
356
+
"question": "Which workflow would you like to use?",
319
357
"header": "Workflow",
320
358
"options": [
321
359
{"label": "{recommended} (Recommended)", "description": "{hats as arrows}"},
322
360
{"label": "{workflow2}", "description": "{hats as arrows}"},
323
361
{"label": "{workflow3}", "description": "{hats as arrows}"},
324
-
{"label": "Custom", "description": "Compose a custom hat sequence from available hats"}
362
+
{"label": "Custom", "description": "Tell me which hats to use and in what order"}
325
363
],
326
364
"multiSelect": false
327
365
}]
328
366
}
329
367
```
330
368
369
+
If your recommendation is a custom composition, include it as the first option with "(Recommended)". The predefined workflows still appear as alternatives.
370
+
331
371
If the user selects "Custom", ask them to specify which hats to include and in what order.
332
372
333
373
---
@@ -770,7 +810,7 @@ Intent-level state is saved to the current branch (which is now the intent branc
770
810
han keep save intent-slug "{intent-slug}"
771
811
772
812
# Intent-level state -> current branch (intent branch)
773
-
han keep save iteration.json '{"iteration":1,"hat":"{first-hat-after-elaborator}","workflowName":"{workflow}","mode":"{HITL|OHOTL|AHOTL}","workflow":["{hat1}","{hat2}"],"status":"active"}'
813
+
han keep save iteration.json '{"iteration":1,"hat":"{first-hat}","workflowName":"{workflow}","mode":"{HITL|OHOTL|AHOTL}","workflow":["{hat1}","{hat2}"],"status":"active"}'
0 commit comments