Skip to content

Commit d9a62b5

Browse files
committed
refactor(agent-system): replace test-verification hooks with /verify-tests skill
The TaskCompleted, implementer Stop, refactorer PostToolUse, and test-writer Stop hooks each ran the project test suite automatically on agent/task lifecycle events, serializing 30-120s of verification work per event. Replace all four with a single on-demand /verify-tests skill that Claude invokes explicitly. Keeps test-running behaviour available without forcing it on every stop or completion, aligning with the same pattern used by /cq.
1 parent eef910b commit d9a62b5

10 files changed

Lines changed: 77 additions & 610 deletions

File tree

container/.devcontainer/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
4848

4949
### Active
5050

51-
- **agent-system** — 4 custom agents (architect, claude-guide, explorer, generalist) + built-in agent redirection
51+
- **agent-system** — 4 custom agents (architect, claude-guide, explorer, generalist) + built-in agent redirection + `/verify-tests` skill
5252
- **skill-engine** — 2 coding knowledge packs (`/team`, `/agent-browser`) + auto-suggestion
5353
- **auto-code-quality** — File tracking, syntax validation, `/cq` quality gate (format + lint + test on demand)
5454
- **session-context** — Git state injection, TODO harvesting, commit reminders

container/.devcontainer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
### Agent System
5454

5555
- **All agents and skills set to `effort: max`** — active agents (claude-guide, explorer, generalist), all 14 archived agents in `agent-system/agents/_archived/`, both active skill-engine skills (`team`, `agent-browser`), all 22 archived skills across `skill-engine` and `agent-system`, and all 10 skills in currently disabled plugins (`git-workflow`, `prompt-snippets`, `spec-workflow`, `ticket-workflow`) now declare `effort: max`. This ensures any plugin re-enable in the future yields max-effort runs without further edits.
56+
- **Replaced automatic test hooks with `/verify-tests` skill** — removed `TaskCompleted` hook (`task-completed-check.py`), implementer Stop hook (`verify-no-regression.py`), refactorer PostToolUse hook (`verify-no-regression.py`), and test-writer Stop hook (`verify-tests-pass.py`). Test verification is now on-demand via `/verify-tests`, which detects the project's test framework and runs the suite with structured reporting.
5657

5758
### Plugin Cleanup
5859

container/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
{
5454
"name": "agent-system",
55-
"description": "4 custom agents with built-in agent redirection (15 archived for rewrite)",
55+
"description": "4 custom agents with built-in agent redirection and /verify-tests skill (15 archived for rewrite)",
5656
"version": "1.0.0",
5757
"source": "./plugins/agent-system",
5858
"category": "development",

container/.devcontainer/plugins/devs-marketplace/plugins/agent-system/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-system",
3-
"description": "4 custom agents with built-in agent redirection (15 archived for rewrite)",
3+
"description": "4 custom agents with built-in agent redirection and /verify-tests skill (15 archived for rewrite)",
44
"author": {
55
"name": "AnExiledDev"
66
}

container/.devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# agent-system
22

3-
Claude Code plugin that provides 4 custom agents with automatic built-in agent redirection, working directory injection, read-only bash enforcement, and team quality gates. 15 additional agents are archived in `agents/_archived/` pending rewrite.
3+
Claude Code plugin that provides 4 custom agents with automatic built-in agent redirection, working directory injection, read-only bash enforcement, `/verify-tests` skill, and team quality gates. 15 additional agents are archived in `agents/_archived/` pending rewrite.
44

55
## What It Does
66

7-
Replaces Claude Code's built-in agents with enhanced custom agents that carry domain-specific instructions, safety hooks, and tailored tool configurations. Also provides team orchestration quality gates.
7+
Replaces Claude Code's built-in agents with enhanced custom agents that carry domain-specific instructions, safety hooks, and tailored tool configurations. Includes `/verify-tests` for on-demand test suite execution.
88

99
### Active Agents
1010

@@ -32,12 +32,18 @@ The following agents are preserved in `agents/_archived/` for future rewrite:
3232

3333
bash-exec, debug-logs, dependency-analyst, documenter, git-archaeologist, implementer, investigator, migrator, perf-profiler, refactorer, researcher, security-auditor, spec-writer, statusline-config, test-writer
3434

35-
### Quality Gates
35+
### Skills
36+
37+
| Skill | Purpose |
38+
|-------|---------|
39+
| `/debug` | Structured log investigation and diagnosis |
40+
| `/verify-tests` | Run project test suite, report results, fix failures |
41+
42+
### Orchestration Hooks
3643

3744
| Hook | Script | Purpose |
3845
|------|--------|---------|
3946
| TeammateIdle | `teammate-idle-check.py` | Prevents teammates from going idle with incomplete tasks |
40-
| TaskCompleted | `task-completed-check.py` | Runs test suite before allowing task completion |
4147

4248
## How It Works
4349

@@ -55,14 +61,6 @@ Claude calls the Task tool (spawning a subagent)
5561
|
5662
+-> Subagent works...
5763
|
58-
+-> TaskCompleted fires
59-
| |
60-
| +-> task-completed-check.py
61-
| |
62-
| +-> Detect test framework -> Run tests
63-
| +-> Tests pass? -> Allow completion
64-
| +-> Tests fail? -> Block, send feedback
65-
|
6664
+-> TeammateIdle fires (team mode)
6765
|
6866
+-> teammate-idle-check.py
@@ -86,7 +84,6 @@ Read-only agents (explorer, architect) have their Bash access restricted by `gua
8684
|--------|--------|--------|
8785
| redirect-builtin-agents.py | Allow (or rewrite) | Block with error |
8886
| guard-readonly-bash.py | Allow command | Block write operation |
89-
| task-completed-check.py | Tests pass | Tests fail (block completion) |
9087
| teammate-idle-check.py | No incomplete tasks | Has incomplete tasks |
9188

9289
### Timeouts
@@ -95,7 +92,6 @@ Read-only agents (explorer, architect) have their Bash access restricted by `gua
9592
|------|---------|
9693
| Agent redirection (PreToolUse) | 5s |
9794
| Teammate idle check | 10s |
98-
| Task completed check | 60s |
9995

10096
## Installation
10197

@@ -157,14 +153,13 @@ agent-system/
157153
+-- scripts/
158154
| +-- guard-readonly-bash.py # Read-only bash enforcement
159155
| +-- redirect-builtin-agents.py # Built-in agent redirection
160-
| +-- task-completed-check.py # Test suite quality gate
161156
| +-- teammate-idle-check.py # Incomplete task checker
162-
| +-- verify-no-regression.py # Post-edit regression tests (dormant — agents archived)
163-
| +-- verify-tests-pass.py # Test verification (dormant — agents archived)
164157
+-- skills/
165158
| +-- _archived/
166-
| +-- debug/
167-
| +-- SKILL.md # Log investigation skill (archived)
159+
| | +-- debug/
160+
| | +-- SKILL.md # Log investigation skill (archived)
161+
| +-- verify-tests/
162+
| +-- SKILL.md # On-demand test suite runner
168163
+-- AGENT-REDIRECTION.md # Redirection mechanism docs
169164
+-- REVIEW-RUBRIC.md # Agent/skill quality rubric
170165
+-- README.md # This file

container/.devcontainer/plugins/devs-marketplace/plugins/agent-system/hooks/hooks.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"description": "Agent redirection, subagent configuration, and team quality gate hooks",
2+
"description": "Agent redirection and team orchestration hooks",
33
"hooks": {
44
"PreToolUse": [
55
{
@@ -23,17 +23,6 @@
2323
}
2424
]
2525
}
26-
],
27-
"TaskCompleted": [
28-
{
29-
"hooks": [
30-
{
31-
"type": "command",
32-
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/task-completed-check.py",
33-
"timeout": 60
34-
}
35-
]
36-
}
3726
]
3827
}
3928
}

container/.devcontainer/plugins/devs-marketplace/plugins/agent-system/scripts/task-completed-check.py

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)