auto-test-execution
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
- License 许可
- MIT
- 所属仓库
- jmagly/aiwg
- 最近更新
- 2026-11-14
- Stars
- ★ 229
- Forks
- 36
01 前言 Front Matter
- name
- auto-test-execution
- namespace
- aiwg
- platforms
- [ "all" ]
- description
- Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
03 SKILL.md 正文
auto-test-execution
Automatically execute tests when code-generating agents write to source files, enforcing the execute-before-return pattern.
Triggers
Primary phrases matched automatically from skill description. No additional alternate expressions defined.
Purpose
This skill enforces the MetaGPT executable feedback pattern: code-generating agents must execute tests before returning results to the user. It activates automatically when agents modify source code files.
Behavior
When triggered, this skill:
-
Detect modified files:
- Track which source files the agent has written to
- Identify the relevant test framework
-
Find related tests:
- Look for test files matching the modified source
- Convention:
src/foo/bar.ts->test/unit/foo/bar.test.ts - If no tests exist, prompt agent to generate them
-
Execute tests:
- Run the project's test command focused on relevant tests
- Capture results: passed, failed, errors
-
Handle results:
- All pass: Allow agent to return results
- Failures: Trigger debug-and-retry loop (max 3 attempts)
- Persistent failures: Escalate with debug memory context
-
Update debug memory:
- Record session in
.aiwg/ralph/debug-memory/sessions/ - Extract patterns for future reference
- Record session in
Activation Conditions
activation:
always_active_for:
- software-implementer
- debugger
- test-engineer
triggered_by:
- file_write:
patterns:
- "src/**/*.ts"
- "src/**/*.js"
- "src/**/*.py"
- "**/*.go"
- "**/*.rs"
skip_when:
- test_files_only: true
- documentation_only: true
- configuration_only: true
Integration
This skill uses:
project-awareness: Detect test framework and configuration- Debug memory at
.aiwg/ralph/debug-memory/for pattern learning
References
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md - Feedback rules
- @$AIWG_ROOT/${CLAUDE_PLUGIN_ROOT}/docs/executable-feedback-guide.md - Guide
- @$AIWG_ROOT/${CLAUDE_PLUGIN_ROOT}/schemas/debug-memory.yaml - Memory schema
- @.aiwg/research/findings/REF-013-metagpt.md - Research foundation
04 同仓库更多 Skills
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.