Skip to content

Commit 05407ce

Browse files
committed
Improve validation loops and next-task skill
- Skip irrelevant agents in validation-loop and task-validation-loop when their review subjects don't exist (e.g., no design system) - Re-run only failed agents on retry instead of all 8, with domain spillover detection for cross-cutting fixes - Clarify next-task handoff to execute-task with explicit task-id format - Bump version to 1.0.4
1 parent 03f795e commit 05407ce

4 files changed

Lines changed: 59 additions & 6 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "groundwork",
33
"description": "Comprehensive skills library for Claude Code: planning, design, TDD, debugging, collaboration patterns, and proven techniques",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"author": {
66
"name": "Groundwork Contributors"
77
},

skills/next-task/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ Parse the tasks to find the next task to work on:
6262

6363
### Step 4: Delegate to Execute Task
6464

65-
Once a task is identified, **you MUST call the Skill tool:**
66-
`Skill(skill="groundwork:execute-task", args="TASK-NNN")`
65+
**You MUST call the Skill tool now:** `Skill(skill="groundwork:execute-task", args="<task-id>")`
6766

68-
Do NOT load project context, present summaries, or begin task execution yourself. The execute-task skill handles the complete workflow. Call it NOW with the identified task identifier.
67+
Replace `<task-id>` with the identified task identifier (e.g., `TASK-004`).
68+
69+
Do NOT load project context, explore the codebase, present summaries, or begin task execution yourself. The execute-task skill handles the complete workflow including worktree setup, TDD, and validation.

skills/task-validation-loop/SKILL.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ design_system ← Read specs/design_system.md (if exists, optional)
3131

3232
**Detection:** Check for file first (takes precedence), then directory. When reading a directory, aggregate all `.md` files recursively.
3333

34+
### 1.5. Determine Active Agents
35+
36+
| Agent | Skip when |
37+
|---|---|
38+
| `design-task-alignment-checker` | No `design_system` found AND no UI/frontend tasks in task list |
39+
40+
`prd-task-alignment-checker` and `architecture-task-alignment-checker` always run (their inputs are prerequisites).
41+
42+
Record skipped agents with verdict `skipped`.
43+
3444
### 2. Launch Validation Agents
3545

3646
Use Task tool to launch all 3 agents in parallel:
@@ -93,7 +103,12 @@ Present results in table format:
93103
- **accessibility-missing**: Add acceptance criteria to task
94104
- **over-tasked**: Remove task or add requirement to PRD (user decision)
95105

96-
3. **Re-run Agent Validation** - Launch all 3 agents again with updated task list
106+
3. **Re-run Agent Validation** — Re-launch ONLY agents that returned `request-changes`. Agents that approved retain their verdict unless the fix changed content in their domain:
107+
- **PRD alignment checker**: re-run if tasks were added/removed or requirements mapping changed
108+
- **Architecture alignment checker**: re-run if component assignments or technology references changed
109+
- **Design alignment checker**: re-run if accessibility criteria or design token references changed
110+
111+
For agents NOT re-run, carry forward their previous `approve` verdict and score.
97112

98113
4. **Check Results**
99114
- ALL approve → **PASS**, return success

skills/validation-loop/SKILL.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ Collect for the agents:
3030
- Architecture path: path to `specs/architecture.md` or `specs/architecture/` (do NOT read contents)
3131
- Design system path: path to `specs/design_system.md` or `specs/design_system/` (do NOT read contents)
3232

33+
### 1.5. Determine Active Agents
34+
35+
Based on context gathered, skip agents whose primary review subject does not exist:
36+
37+
| Agent | Skip when |
38+
|---|---|
39+
| `design-consistency-checker` | No `design_system_path` AND no CSS/styling files in `changed_file_paths` |
40+
| `spec-alignment-checker` | No `specs_path` found |
41+
| `architecture-alignment-checker` | No `architecture_path` found |
42+
43+
**Always run** regardless of context:
44+
- `code-quality-reviewer` — always applicable to code changes
45+
- `security-reviewer` — always applicable to code changes
46+
- `code-simplifier` — always applicable to code changes
47+
- `performance-reviewer` — always applicable to code changes
48+
- `housekeeper` — handles missing paths gracefully, still checks task status
49+
50+
Record skipped agents in the aggregation table with verdict `skipped` and a note explaining why.
51+
3352
### 2. Launch Verification Agents
3453

3554
Use Task tool to launch all 8 agents in parallel:
@@ -98,7 +117,25 @@ Each returns JSON:
98117
- Run tests - must pass
99118
- Confirm acceptance criteria
100119

101-
4. **Re-run Agent Validation** - Launch all 8 agents again
120+
4. **Re-run Agent Validation** — Re-launch ONLY agents that returned `request-changes` in the previous iteration.
121+
122+
**Domain spillover**: If a fix modified code relevant to an agent that previously approved, re-run that agent too:
123+
124+
| Fix touches... | Also re-run |
125+
|---|---|
126+
| Auth, crypto, input validation | security-reviewer |
127+
| Layer boundaries, component structure | architecture-alignment-checker |
128+
| CSS, design tokens, accessibility | design-consistency-checker |
129+
| Spec/requirement behavior | spec-alignment-checker |
130+
| Test files | code-quality-reviewer |
131+
| Task status, docs, spec files | housekeeper |
132+
| Hot paths, algorithmic changes | performance-reviewer |
133+
| Code structure, naming | code-simplifier |
134+
135+
**When in doubt, re-run.** False passes are worse than extra agent runs.
136+
137+
For agents NOT re-run, carry forward their previous `approve` verdict and score into the aggregation table.
138+
102139
- Do NOT re-read updated files into the orchestrator context — agents will re-read the updated files themselves
103140
- Only update `changed_file_paths` or `diff_stat` if the set of changed files has changed
104141

0 commit comments

Comments
 (0)