Skip to content

Commit 5238358

Browse files
jwaldripclaude
andcommitted
refactor: remove mode selection from elaboration and construction
The HITL/OHOTL/AHOTL mode concept duplicates Claude Code's native permission system (plan/acceptEdits/bypassPermissions). Users control oversight by changing Claude's mode, not by baking it into the spec. Removes Phase 3.5, mode from intent.md frontmatter, mode from iteration.json, and modeToAgentTeamsMode mapping from Task spawns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e252c1 commit 5238358

File tree

3 files changed

+9
-61
lines changed

3 files changed

+9
-61
lines changed

plugin/skills/construct/SKILL.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ Initialize `iteration.json` from the intent artifacts:
212212
INTENT_DIR=".ai-dlc/${INTENT_SLUG}"
213213
INTENT_FILE="$INTENT_DIR/intent.md"
214214

215-
# Read workflow and mode from intent.md frontmatter
215+
# Read workflow from intent.md frontmatter
216216
WORKFLOW_NAME=$(han parse yaml workflow -r --default "default" < "$INTENT_FILE" 2>/dev/null || echo "default")
217-
MODE=$(han parse yaml mode -r --default "OHOTL" < "$INTENT_FILE" 2>/dev/null || echo "OHOTL")
218217

219218
# Resolve workflow to hat sequence
220219
if [ -f ".ai-dlc/workflows.yml" ]; then
@@ -226,7 +225,7 @@ fi
226225
FIRST_HAT=$(echo "$WORKFLOW_HATS" | jq -r '.[0]')
227226

228227
# Initialize iteration state
229-
STATE='{"iteration":1,"hat":"'"${FIRST_HAT}"'","workflowName":"'"${WORKFLOW_NAME}"'","mode":"'"${MODE}"'","workflow":'"${WORKFLOW_HATS}"',"status":"active"}'
228+
STATE='{"iteration":1,"hat":"'"${FIRST_HAT}"'","workflowName":"'"${WORKFLOW_NAME}"'","workflow":'"${WORKFLOW_HATS}"',"status":"active"}'
230229
han keep save iteration.json "$STATE"
231230
```
232231

@@ -360,7 +359,7 @@ Task({
360359
description: `${FIRST_HAT}: ${unitName}`,
361360
name: `${FIRST_HAT}-${unitSlug}`,
362361
team_name: `ai-dlc-${intentSlug}`,
363-
mode: modeToAgentTeamsMode(intentMode),
362+
364363
prompt: `
365364
Execute the ${FIRST_HAT} role for unit ${unitName}.
366365
@@ -397,13 +396,6 @@ Task({
397396
})
398397
```
399398

400-
Mode mapping:
401-
402-
| Intent Mode | Task `mode` | Behavior |
403-
|-------------|-------------|----------|
404-
| HITL | `plan` | Agent proposes, human approves |
405-
| OHOTL | `acceptEdits` | Agent works, human can intervene |
406-
| AHOTL | `bypassPermissions` | Full autonomy within criteria |
407399

408400
### Step 4 (Teams): Monitor and React Loop
409401

@@ -450,7 +442,7 @@ Task({
450442
description: `${nextHat}: ${unitName}`,
451443
name: `${nextHat}-${unitSlug}`,
452444
team_name: `ai-dlc-${intentSlug}`,
453-
mode: modeToAgentTeamsMode(intentMode),
445+
454446
prompt: `
455447
Execute the ${nextHat} role for unit ${unitName}.
456448
@@ -585,7 +577,7 @@ Task({
585577
description: `integrator: ${intentSlug}`,
586578
name: `integrator-${intentSlug}`,
587579
team_name: `ai-dlc-${intentSlug}`,
588-
mode: modeToAgentTeamsMode(intentMode),
580+
589581
prompt: `
590582
Execute the Integrator role for intent ${intentSlug}.
591583
@@ -800,22 +792,10 @@ STATE=$(echo "$STATE" | han parse json --set "currentUnit=$UNIT_NAME")
800792
han keep save iteration.json "$STATE"
801793
```
802794

803-
#### Step 3: Read Mode and Spawn Subagent
795+
#### Step 3: Spawn Subagent
804796

805797
**CRITICAL: Do NOT execute hat work inline. Always spawn a subagent.**
806798

807-
##### Read operating mode from intent
808-
809-
```bash
810-
# Mode is defined on the intent (set during elaboration)
811-
MODE=$(echo "$STATE" | han parse json mode -r --default OHOTL)
812-
813-
# Also check intent.md frontmatter as source of truth
814-
if [ -f "${INTENT_DIR}/intent.md" ]; then
815-
MODE=$(han parse yaml mode -r --default "$MODE" < "${INTENT_DIR}/intent.md" 2>/dev/null || echo "$MODE")
816-
fi
817-
```
818-
819799
##### Spawn based on `state.hat`
820800

821801
| Role | Agent Type | Description |

plugin/skills/elaborate/SKILL.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -372,36 +372,6 @@ If the user selects "Custom", ask them to specify which hats to include and in w
372372

373373
---
374374

375-
## Phase 3.5: Select Operating Mode
376-
377-
The operating mode defines the level of human oversight for this intent. This applies to the **entire intent**, not individual hats.
378-
379-
Use `AskUserQuestion`:
380-
```json
381-
{
382-
"questions": [{
383-
"question": "What level of human oversight for this intent?",
384-
"header": "Mode",
385-
"options": [
386-
{"label": "OHOTL (Recommended)", "description": "AI edits files freely without asking. You see changes in real-time and can interrupt at any point. Best for most development work."},
387-
{"label": "HITL", "description": "AI proposes each change as a plan and waits for your approval before editing any file. You approve or reject each step. Best for novel or high-risk work."},
388-
{"label": "AHOTL", "description": "AI runs with full autonomy — no permission prompts, no pauses. You review the final result. Best for well-defined, low-risk tasks with clear success criteria."}
389-
],
390-
"multiSelect": false
391-
}]
392-
}
393-
```
394-
395-
**Mode mapping for Agent Teams (when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` is enabled):**
396-
397-
| AI-DLC Mode | Agent Teams `mode` | Behavior |
398-
|-------------|-------------------|----------|
399-
| HITL | `plan` | Agent proposes, human approves each step |
400-
| OHOTL | `acceptEdits` | Agent works autonomously, human can intervene |
401-
| AHOTL | `bypassPermissions` | Agent operates with full autonomy |
402-
403-
---
404-
405375
## Phase 4: Define Success Criteria
406376

407377
Work with the user to define 3-7 **verifiable** success criteria. Each MUST be:
@@ -571,8 +541,8 @@ For each unit:
571541
- Builds: {specific components/modules/endpoints}
572542
- Criteria: {count} success criteria
573543

574-
### Workflow & Mode
575-
{workflow name} — {mode}
544+
### Workflow
545+
{workflow name}
576546
```
577547

578548
Then ask with `AskUserQuestion`:
@@ -679,7 +649,6 @@ This ensures:
679649
```markdown
680650
---
681651
workflow: {workflow-name}
682-
mode: {HITL|OHOTL|AHOTL}
683652
git:
684653
change_strategy: {unit|intent|trunk|bolt}
685654
auto_merge: {true|false}
@@ -906,7 +875,6 @@ Created: .ai-dlc/{intent-slug}/
906875
...
907876
908877
Workflow: {workflowName}
909-
Mode: {mode}
910878
Next hat: {next-hat}
911879
```
912880

plugin/skills/fail/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Task({
8989
description: `builder (retry): ${unitName}`,
9090
name: `builder-${unitSlug}-retry${retries}`,
9191
team_name: `ai-dlc-${intentSlug}`,
92-
mode: modeToAgentTeamsMode(intentMode),
92+
9393
prompt: `
9494
Re-execute the builder role for unit ${unitName}.
9595

0 commit comments

Comments
 (0)