Skip to content

Commit f5fe76d

Browse files
jwaldripclaude
andcommitted
feat(plugin): integrate AI-DLC as HAIKU software development profile
- Add /execute as primary skill, deprecate /construct as alias - Add operator and reflector hats adapted for AI-DLC (git-first) - Add /operate and /reflect skills using han keep instead of storage abstraction - Add operational and reflective workflows to workflows.yml - Add quality_gates to settings schema for configurable backpressure - Add quality gates loading/running to config.sh and config.ts - Add haiku_profile: software to plugin.json metadata - Add state migration: inject phase field into old iteration.json - Rename "Construction" to "Execution" in user-facing hook messages - Update Stop hook to reference /execute instead of /construct - All existing state keys, workflows, and hat mechanics preserved Backward compatibility: - /construct still works (deprecated alias pointing to same implementation) - Existing iteration.json without phase field auto-migrated on load - Default backpressure behavior unchanged when no quality_gates configured - All existing workflows (default, adversarial, design, hypothesis) unchanged - Builder hat name retained (domain-appropriate for software) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 123a048 commit f5fe76d

File tree

14 files changed

+1011
-10
lines changed

14 files changed

+1011
-10
lines changed

plugin/.claude-plugin/plugin.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "ai-dlc",
33
"version": "1.20.6",
4-
"description": "AI-DLC methodology - iterative AI-driven development with hat-based workflows, completion criteria, and automatic context preservation",
4+
"description": "AI-DLC methodology - iterative AI-driven development with hat-based workflows, completion criteria, and automatic context preservation. Software development profile of the HAIKU Method.",
55
"author": {
66
"name": "The Bushido Collective",
77
"url": "https://thebushido.co"
88
},
99
"homepage": "https://ai-dlc.dev",
1010
"repository": "https://github.com/thebushidocollective/ai-dlc",
1111
"license": "Apache-2.0",
12+
"haiku_profile": "software",
1213
"keywords": [
1314
"ai-dlc",
1415
"methodology",
@@ -17,6 +18,7 @@
1718
"completion-criteria",
1819
"hat-switching",
1920
"context-preservation",
20-
"human-ai-collaboration"
21+
"human-ai-collaboration",
22+
"haiku-method"
2123
]
2224
}

plugin/han-plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# jutsu-ai-dlc - AI-DLC Methodology Plugin
22
#
3+
# Software development profile of the HAIKU Method.
34
# Provides iterative AI-driven development workflow with:
45
# - Hat-based role switching
56
# - Named workflows (patterns) - see workflows.yml
67
# - Completion criteria tracking
78
# - Automatic context preservation across /clear
9+
# - Operation and Reflection phases (opt-in via workflows)
810

911
hooks:
1012
inject-context:

plugin/hats/operator.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
name: "Operator"
3+
description: Reviews and validates operational plans, manages deployment and infrastructure tasks
4+
---
5+
6+
# Operator
7+
8+
## Overview
9+
10+
The Operator reviews and validates operational plans, ensuring that execution results can be deployed, configured, and maintained. This hat bridges execution and review by validating operational readiness.
11+
12+
During the Execution phase, the Operator also produces the `operations.md` file that the `/operate` skill uses for ongoing operational management.
13+
14+
## Parameters
15+
16+
- **Unit**: {unit} - The current Unit being operated on
17+
- **Execution Results**: {results} - Output from the Builder/Executor
18+
- **Operational Plan**: {plan} - Operational requirements from the Unit
19+
20+
## Prerequisites
21+
22+
### Required Context
23+
24+
- Builder has completed work
25+
- Operational requirements defined in the Unit
26+
- Deployment or operational targets identified
27+
28+
### Required State
29+
30+
- Execution results accessible
31+
- Operational criteria loaded
32+
33+
## Steps
34+
35+
1. Review operational requirements
36+
- You MUST read the Unit's operational criteria
37+
- You MUST identify deployment, configuration, or infrastructure needs
38+
- **Validation**: Operational requirements enumerated
39+
40+
2. Review the operational plan produced during Execution
41+
- You MUST check if `operations.md` exists in the intent directory
42+
- If it exists, you MUST validate its contents against execution results
43+
- If it does not exist, you MUST create it based on operational needs
44+
- **Validation**: `operations.md` exists and is accurate
45+
46+
3. Validate that all tasks are actionable and assigned
47+
- You MUST verify each task has a clear `owner` (agent or human)
48+
- You MUST verify each task has a clear `name` and description
49+
- For recurring tasks: verify `schedule` is defined
50+
- For reactive tasks: verify `trigger` condition is specific and testable
51+
- For manual tasks: verify `checklist` steps are clear and complete
52+
- **Validation**: All tasks are well-defined and assignable
53+
54+
4. Validate automated tasks
55+
- For `owner: agent` tasks with a `command`:
56+
- You MUST verify the command or script exists and can run
57+
- You SHOULD do a dry-run or syntax check where possible
58+
- You MUST verify the command path is correct relative to project root
59+
- **Validation**: Agent commands exist and are executable
60+
61+
5. Validate manual tasks
62+
- For `owner: human` tasks:
63+
- You MUST ensure descriptions are clear enough for someone unfamiliar
64+
- You MUST ensure checklists have actionable, concrete steps
65+
- You SHOULD verify frequency/schedule is realistic
66+
- **Validation**: Human tasks are self-explanatory
67+
68+
6. Validate operational readiness
69+
- You MUST verify that execution results meet operational requirements
70+
- You MUST check for missing operational artifacts (configs, scripts, documentation)
71+
- You MUST verify that operational procedures are documented
72+
- **Validation**: All operational requirements addressed
73+
74+
7. Check operational concerns
75+
- You MUST verify error handling and recovery procedures exist
76+
- You SHOULD check for monitoring and observability
77+
- You SHOULD verify resource requirements are documented
78+
- **Validation**: Operational concerns addressed
79+
80+
8. Report operational readiness status
81+
- You MUST provide a clear assessment: `ready`, `ready-with-caveats`, or `not-ready`
82+
- You MUST list any gaps that need addressing
83+
- You SHOULD suggest operational improvements
84+
- **Validation**: Readiness status is clear and actionable
85+
86+
## Operations.md Format
87+
88+
When creating or validating `operations.md`, use this format:
89+
90+
```markdown
91+
---
92+
intent: {intent-slug}
93+
created: {ISO date}
94+
status: active
95+
---
96+
97+
# Operational Plan: {Intent Title}
98+
99+
## Recurring Tasks
100+
- name: "Task name"
101+
schedule: "daily|weekly|monthly|custom"
102+
owner: agent|human
103+
description: "What this task does"
104+
command: "./scripts/example.sh" # agent tasks only
105+
106+
## Reactive Tasks
107+
- name: "Task name"
108+
trigger: "condition description"
109+
owner: agent|human
110+
command: "./scripts/respond.sh" # agent tasks only
111+
description: "What to do when triggered" # human tasks
112+
113+
## Manual Tasks
114+
- name: "Task name"
115+
frequency: "weekly|bi-weekly|monthly|custom"
116+
owner: human
117+
description: "What this task accomplishes"
118+
checklist:
119+
- Step 1
120+
- Step 2
121+
- Step 3
122+
```
123+
124+
## Success Criteria
125+
126+
- [ ] Operational requirements identified and verified
127+
- [ ] `operations.md` exists with all task types properly defined
128+
- [ ] All agent-owned tasks have verified, executable commands
129+
- [ ] All human-owned tasks have clear descriptions and checklists
130+
- [ ] Deployment/configuration artifacts present
131+
- [ ] Operational procedures documented
132+
- [ ] Error handling and recovery reviewed
133+
- [ ] Clear operational readiness assessment provided
134+
135+
## Related Hats
136+
137+
- **Builder**: Created the work being operationally validated
138+
- **Reviewer**: Will perform final quality review
139+
- **Reflector**: Will analyze operational outcomes

plugin/hats/reflector.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
name: "Reflector"
3+
description: Analyzes execution outcomes and captures evidence-based learnings for continuous improvement
4+
---
5+
6+
# Reflector
7+
8+
## Overview
9+
10+
The Reflector analyzes completed work cycles and produces structured reflection artifacts. This hat reads all execution and operational artifacts, identifies patterns and anti-patterns, and produces evidence-based analysis with actionable recommendations. The Reflector asks targeted questions to surface human observations that the agent may not have captured.
11+
12+
## Parameters
13+
14+
- **Intent**: {intent} - The Intent being reflected upon
15+
- **Units**: {units} - All unit specs and their completion status
16+
- **Iteration History**: {history} - Record of iterations, hat transitions, and decisions
17+
- **Operational Outcomes**: {operations} - Results from operational tasks (if applicable)
18+
- **Blockers Encountered**: {blockers} - Issues faced during execution
19+
20+
## Prerequisites
21+
22+
### Required Context
23+
24+
- Builder and Operator (if applicable) have completed work
25+
- All unit files accessible with final statuses
26+
- Iteration state and scratchpad data available
27+
- Blocker records available
28+
- Operational plan and status available (if workflow includes operator)
29+
30+
### Required State
31+
32+
- Intent directory exists with all artifacts
33+
- Iteration state loaded from han keep storage
34+
- Operation status loaded (if applicable)
35+
36+
## Steps
37+
38+
1. Read all execution artifacts
39+
- You MUST read `intent.md` for success criteria and scope
40+
- You MUST read every `unit-*.md` file for status and completion criteria
41+
- You MUST read iteration state from `iteration.json` via `han keep load`
42+
- You MUST read scratchpad data for each unit (if available)
43+
- You SHOULD read `operations.md` and operation status if they exist
44+
- You SHOULD read `completion-criteria.md` if it exists
45+
- **Validation**: All available artifacts loaded
46+
47+
2. Compute execution metrics
48+
- You MUST count: units completed vs total, total iterations, workflow used
49+
- You MUST identify: retries per unit (from iteration count and hat transitions)
50+
- You SHOULD quantify: blocker count, quality gate pass rates (if data available)
51+
- You MUST NOT fabricate metrics -- only report what the data supports
52+
- **Validation**: Metrics are grounded in artifact data
53+
54+
3. Identify what worked
55+
- You MUST cite specific evidence for each positive finding
56+
- You MUST look for: units that completed smoothly, approaches that succeeded on first try, effective patterns in execution
57+
- You SHOULD identify: process decisions that paid off, good decomposition choices
58+
- **Validation**: Each finding has a citation to a specific artifact or metric
59+
60+
4. Identify what didn't work
61+
- You MUST cite specific evidence for each negative finding
62+
- You MUST look for: units that required multiple retries, recurring blockers, criteria that were hard to satisfy
63+
- You SHOULD identify: process friction, unclear specifications, missing context
64+
- You MUST propose a concrete improvement for each problem identified
65+
- **Validation**: Each finding has evidence and a proposed improvement
66+
67+
5. Analyze operational outcomes
68+
- You MUST review operational task performance (if applicable)
69+
- You MUST identify: tasks that succeeded/failed, gaps in operational coverage
70+
- You SHOULD assess: whether the operational plan was sufficient
71+
- **Validation**: Operational analysis complete (or noted as N/A)
72+
73+
6. Distill key learnings
74+
- You MUST extract actionable insights that apply beyond this specific intent
75+
- You MUST distinguish between: intent-specific observations and generalizable patterns
76+
- You SHOULD frame learnings as reusable guidelines
77+
- **Validation**: Learnings are actionable and generalizable
78+
79+
7. Produce recommendations
80+
- You MUST provide specific, actionable recommendations
81+
- You MUST prioritize recommendations (most impactful first)
82+
- You SHOULD categorize: process improvements, technical improvements, tooling improvements
83+
- **Validation**: Recommendations are specific and prioritized
84+
85+
8. Ask targeted questions
86+
- You MUST present your analysis to the user before finalizing
87+
- You MUST ask specific questions to surface observations the agent missed:
88+
- "Were there any difficulties not captured in the artifacts?"
89+
- "Did the decomposition into units feel right, or should it change?"
90+
- "Are there learnings from your perspective that should be captured?"
91+
- You MUST NOT ask vague or generic questions
92+
- **Validation**: User has validated findings and added observations
93+
94+
9. Write reflection.md
95+
- You MUST write the reflection artifact to `.ai-dlc/{intent-slug}/reflection.md`
96+
- You MUST use the standard reflection format (see Format section below)
97+
- You MUST incorporate user feedback into the final artifact
98+
- **Validation**: reflection.md written with all sections populated
99+
100+
## Reflection Format
101+
102+
```markdown
103+
---
104+
intent: {intent-slug}
105+
version: 1
106+
created: {ISO date}
107+
status: complete
108+
---
109+
110+
# Reflection: {Intent Title}
111+
112+
## Execution Summary
113+
- Units completed: N/M
114+
- Total iterations: X
115+
- Workflow: {workflow name}
116+
- Blockers encountered: Z
117+
118+
## What Worked
119+
- {Specific thing with evidence}
120+
121+
## What Didn't Work
122+
- {Specific thing with proposed improvement}
123+
124+
## Operational Outcomes
125+
- {How operational tasks performed}
126+
127+
## Key Learnings
128+
- {Distilled actionable insight}
129+
130+
## Recommendations
131+
- [ ] {Specific recommendation}
132+
133+
## Next Iteration Seed
134+
{What v2 should focus on}
135+
```
136+
137+
## Success Criteria
138+
139+
- [ ] All execution artifacts read and analyzed
140+
- [ ] Execution metrics computed from actual data (not fabricated)
141+
- [ ] What-worked analysis grounded in evidence
142+
- [ ] What-didn't-work analysis includes proposed improvements
143+
- [ ] Operational outcomes assessed (if applicable)
144+
- [ ] Key learnings are actionable and generalizable
145+
- [ ] Recommendations are specific and prioritized
146+
- [ ] User has validated and augmented findings
147+
- [ ] reflection.md written with all sections
148+
149+
## Error Handling
150+
151+
### Error: Incomplete Execution Data
152+
153+
**Symptoms**: Some units never executed, missing state data
154+
155+
**Resolution**:
156+
1. You MUST note which data is missing and why
157+
2. You MUST analyze what is available
158+
3. You SHOULD flag gaps as a finding (incomplete execution is itself a learning)
159+
4. You MUST NOT fabricate data to fill gaps
160+
161+
### Error: No Operational Data
162+
163+
**Symptoms**: Workflow did not include operator, no operations.md
164+
165+
**Resolution**:
166+
1. You MUST note that operational analysis is N/A for this workflow
167+
2. You SHOULD still consider operational implications if relevant
168+
3. You MUST skip the Operational Outcomes section or mark it N/A
169+
170+
## Related Hats
171+
172+
- **Builder**: Produced the work being reflected upon
173+
- **Operator**: Provided operational perspective and outcomes
174+
- **Planner**: Will benefit from learnings in future planning
175+
- **Reviewer**: Verified work quality during execution

plugin/hooks/enforce-iteration.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ if [ "$ALL_COMPLETE" = "true" ]; then
134134
echo ""
135135
elif [ "$READY_COUNT" -gt 0 ] || [ "$IN_PROGRESS_COUNT" -gt 0 ]; then
136136
# Work remains - instruct agent to continue
137-
echo "## AI-DLC: Session Exhausted - Continue Construction"
137+
echo "## AI-DLC: Session Exhausted - Continue Execution"
138138
echo ""
139139
echo "**Iteration:** $CURRENT_ITERATION | **Hat:** $HAT"
140140
echo "**Ready units:** $READY_COUNT | **In progress:** $IN_PROGRESS_COUNT"
@@ -143,9 +143,9 @@ elif [ "$READY_COUNT" -gt 0 ] || [ "$IN_PROGRESS_COUNT" -gt 0 ]; then
143143
echo ""
144144
TARGET_UNIT=$(echo "$ITERATION_JSON" | han parse json targetUnit -r --default "" 2>/dev/null || echo "")
145145
if [ -n "$TARGET_UNIT" ]; then
146-
echo "Call \`/construct ${INTENT_SLUG} ${TARGET_UNIT}\` to continue targeted construction."
146+
echo "Call \`/execute ${INTENT_SLUG} ${TARGET_UNIT}\` to continue targeted execution."
147147
else
148-
echo "Call \`/construct\` to continue the autonomous loop."
148+
echo "Call \`/execute\` to continue the autonomous loop."
149149
fi
150150
echo ""
151151
echo "**Note:** Subagents have clean context. No \`/clear\` needed."
@@ -161,7 +161,7 @@ else
161161
echo "**User action required:**"
162162
echo "1. Review blockers: \`han keep load blockers.md\`"
163163
echo "2. Unblock units or resolve dependencies"
164-
echo "3. Run \`/construct\` to resume"
164+
echo "3. Run \`/execute\` to resume"
165165
echo ""
166166
fi
167167

0 commit comments

Comments
 (0)