Skip to content

Commit eae1c68

Browse files
jwaldripclaude
andcommitted
feat(workflow): auto-route discipline: design to design workflow
Design units no longer require manually setting workflow: design. Elaborate auto-sets it during unit creation, and construct falls back to the design workflow when discipline: design is detected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c0349b7 commit eae1c68

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

plugin/skills/construct/SKILL.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,20 @@ fi
437437
update_unit_status "$UNIT_FILE" "in_progress"
438438
```
439439

440-
3. **Resolve per-unit workflow** — read the unit's `workflow:` frontmatter field. If present, resolve it to a hat sequence. If absent, fall back to the intent-level workflow:
440+
3. **Resolve per-unit workflow** — read the unit's `workflow:` frontmatter field. If present, resolve it to a hat sequence. If absent, check for discipline-based defaults before falling back to the intent-level workflow:
441441

442442
```bash
443443
UNIT_WORKFLOW_NAME=$(han parse yaml workflow -r --default "" < "$UNIT_FILE" 2>/dev/null || echo "")
444444

445+
# Discipline-based fallback: auto-route discipline: design → workflow: design
446+
if [ -z "$UNIT_WORKFLOW_NAME" ]; then
447+
UNIT_DISCIPLINE=$(han parse yaml discipline -r --default "" < "$UNIT_FILE" 2>/dev/null || echo "")
448+
case "$UNIT_DISCIPLINE" in
449+
design) UNIT_WORKFLOW_NAME="design" ;;
450+
*) ;; # fall through to intent-level
451+
esac
452+
fi
453+
445454
if [ -n "$UNIT_WORKFLOW_NAME" ]; then
446455
# Resolve unit-specific workflow
447456
UNIT_WORKFLOW_HATS=""

plugin/skills/elaborate/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ Do NOT ask the user whether to decompose. Assess the complexity from the domain
619619

620620
Set the `workflow:` frontmatter field on units that need a non-default workflow. Omit it (or leave empty) for units that should use the intent-level workflow.
621621

622+
**Auto-routing rule:** When generating a unit with `discipline: design`, automatically set `workflow: design` in the frontmatter. Do not require the user to specify this manually. This ensures design units always route through the design workflow (`planner → designer → reviewer`) instead of accidentally inheriting the intent-level workflow.
623+
622624
Define each unit with **enough detail that a builder with zero prior context builds the right thing**:
623625

624626
- **Name and description**: What this unit accomplishes, stated in terms of the domain model
@@ -981,7 +983,7 @@ depends_on: []
981983
branch: ai-dlc/{intent-slug}/NN-{unit-slug}
982984
discipline: {discipline} # frontend, backend, api, documentation, devops, design, etc.
983985
pass: "" # Which pass this unit belongs to (design, product, dev) — empty for single-pass intents
984-
workflow: "" # Per-unit workflow override (optional — omit or leave empty to use intent-level workflow)
986+
workflow: "" # Per-unit workflow override (optional — omit or leave empty to use intent-level workflow). Auto-set to "design" when discipline is "design".
985987
ticket: "" # Ticketing provider ticket key (auto-populated if ticketing provider configured)
986988
# git: # Optional: per-unit VCS override (only include when unit has an override)
987989
# change_strategy: "" # Overrides intent-level strategy for this unit (e.g., "unit" for foundational units)

0 commit comments

Comments
 (0)