Skip to content

Commit 3617cac

Browse files
jwaldripclaude
andcommitted
refactor: consolidate intent.yaml into intent.md frontmatter
Testing config (unit_tests, integration_tests, coverage_threshold, e2e_tests) now lives in intent.md frontmatter alongside workflow, mode, and git strategy. Eliminates the redundant intent.yaml file. Updated consumers: subagent-context.sh, reviewer hat, elaborate skill. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f0d410c commit 3617cac

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed

hats/reviewer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The Reviewer verifies that the Builder's implementation satisfies the Unit's Com
3232
## Steps
3333

3434
1. Check testing requirements
35-
- Read testing requirements from `.ai-dlc/{intent-slug}/intent.yaml`
35+
- Read testing requirements from `.ai-dlc/{intent-slug}/intent.md` frontmatter
3636
- If testing requirements are configured, verify each:
3737
- **Unit tests**: If `unit_tests: true`, verify unit tests exist for new/modified code
3838
- **Integration tests**: If `integration_tests: true`, verify integration tests exist
@@ -76,7 +76,7 @@ The Reviewer verifies that the Builder's implementation satisfies the Unit's Com
7676

7777
## Success Criteria
7878

79-
- [ ] Testing requirements checked (if configured in intent.yaml)
79+
- [ ] Testing requirements checked (if configured in intent.md)
8080
- [ ] All Completion Criteria verified (pass/fail for each)
8181
- [ ] Code quality issues documented
8282
- [ ] Edge cases and error handling reviewed
@@ -86,14 +86,14 @@ The Reviewer verifies that the Builder's implementation satisfies the Unit's Com
8686

8787
## Testing Verification Details
8888

89-
When verifying testing requirements from `intent.yaml`:
89+
When verifying testing requirements from `intent.md`:
9090

9191
### Reading the Configuration
9292

9393
```bash
9494
INTENT_SLUG=$(han keep load --branch main intent-slug --quiet 2>/dev/null || echo "")
9595
INTENT_DIR=".ai-dlc/${INTENT_SLUG}"
96-
TESTING_CONFIG=$(han parse yaml testing --json < "$INTENT_DIR/intent.yaml" 2>/dev/null || echo "{}")
96+
TESTING_CONFIG=$(han parse yaml testing --json < "$INTENT_DIR/intent.md" 2>/dev/null || echo "{}")
9797
```
9898

9999
### Unit Tests (when `unit_tests: true`)

hooks/subagent-context.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ if [ -n "$PLAN" ]; then
110110
echo ""
111111
fi
112112

113-
# Display testing requirements if configured
114-
if [ -f "$INTENT_DIR/intent.yaml" ]; then
115-
TESTING_JSON=$(han parse yaml testing --json < "$INTENT_DIR/intent.yaml" 2>/dev/null || echo "")
113+
# Display testing requirements if configured (stored in intent.md frontmatter)
114+
if [ -f "$INTENT_FILE" ]; then
115+
TESTING_JSON=$(han parse yaml testing --json < "$INTENT_FILE" 2>/dev/null || echo "")
116116
if [ -n "$TESTING_JSON" ] && [ "$TESTING_JSON" != "null" ] && [ "$TESTING_JSON" != "{}" ]; then
117117
echo "### Testing Requirements"
118118
echo ""

skills/elaborate/SKILL.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,11 @@ git:
618618
change_strategy: {unit|intent|trunk|bolt}
619619
auto_merge: {true|false}
620620
auto_squash: false
621+
testing:
622+
unit_tests: true # true = required, false = optional
623+
integration_tests: false # true = required, false = optional
624+
coverage_threshold: 80 # percentage (0-100), or null for no requirement
625+
e2e_tests: false # true = required, false = optional
621626
created: {ISO date}
622627
status: active
623628
---
@@ -658,27 +663,16 @@ problem space.}
658663
{Relevant background, constraints, decisions made during elaboration}
659664
```
660665

661-
### 3. Write `intent.yaml` (testing configuration):
662-
```yaml
663-
# Testing requirements configured during elaboration
664-
# The reviewer hat enforces these requirements
665-
666-
testing:
667-
unit_tests: true # true = required, false = optional
668-
integration_tests: false # true = required, false = optional
669-
coverage_threshold: 80 # percentage (0-100), or null for no requirement
670-
e2e_tests: false # true = required, false = optional
671-
```
666+
**Testing frontmatter schema:**
672667

673-
**Schema:**
674668
| Field | Type | Description |
675669
|-------|------|-------------|
676670
| `testing.unit_tests` | boolean | Whether unit tests are required for new code |
677671
| `testing.integration_tests` | boolean | Whether integration tests are required |
678672
| `testing.coverage_threshold` | number or null | Minimum coverage percentage, or null if no requirement |
679673
| `testing.e2e_tests` | boolean | Whether E2E tests must pass |
680674

681-
### 4. Write `unit-NN-{slug}.md` for each unit:
675+
### 3. Write `unit-NN-{slug}.md` for each unit:
682676
```markdown
683677
---
684678
status: pending
@@ -726,7 +720,7 @@ misinterpret what to build.}
726720
- `documentation``do-technical-documentation` agents
727721
- `devops` → infrastructure/deployment agents
728722

729-
### 5. Save iteration state to han keep:
723+
### 4. Save iteration state to han keep:
730724

731725
Intent-level state is saved to the current branch (which is now the intent branch):
732726

@@ -738,7 +732,7 @@ han keep save intent-slug "{intent-slug}"
738732
han keep save iteration.json '{"iteration":1,"hat":"{first-hat-after-elaborator}","workflowName":"{workflow}","mode":"{HITL|OHOTL|AHOTL}","workflow":["{hat1}","{hat2}"],"status":"active"}'
739733
```
740734

741-
### 6. Commit all artifacts on intent branch:
735+
### 5. Commit all artifacts on intent branch:
742736

743737
```bash
744738
git add .ai-dlc/
@@ -758,8 +752,7 @@ Intent Worktree: /tmp/ai-dlc-{intent-slug}/
758752
Branch: ai-dlc/{intent-slug}
759753
760754
Created: .ai-dlc/{intent-slug}/
761-
- intent.md
762-
- intent.yaml (testing requirements)
755+
- intent.md (intent, config, and testing requirements)
763756
- unit-01-{name}.md
764757
- unit-02-{name}.md
765758
...

0 commit comments

Comments
 (0)