integration-test-worker
БесплатноБез исполняемых скриптовНе проверенBuilds cross-area integration tests for the mission engine module system
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Integration Test Worker
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
When to Use This Skill
Use for features that build integration tests wiring multiple mission engine modules together:
- Shared mock infrastructure (mock factories, test pipeline helpers)
- Cross-area flow tests (dependency chains, friction loops, milestone gates)
- End-to-end pipeline tests (full lifecycle, concurrent dispatch, recovery)
- Tests involving external modules (A2A task state machine, queue operations, budget enforcement)
Work Procedure
1. Understand the Feature
Read the feature's description, expectedBehavior, and verificationSteps carefully. Cross-reference with the validation contract assertions listed in fulfills to understand exactly what behavior must be verified.
Read AGENTS.md for the EXACT state machine transitions and event names. Using wrong state names will cause test failures.
2. Understand the Module APIs
Before writing any code, read the actual module source files to understand:
- The exact export names and function signatures
- The exact constructor parameters and options
- The exact return value shapes
- Any side effects (file writes, events emitted)
Key modules to reference:
.claude/lib/mission/features-state-machine.cjs— VALID_TRANSITIONS, FeaturesStateMachine class.claude/lib/mission/friction-loop.cjs— FrictionLoopEngine, event names.claude/lib/mission/worker-features-dispatcher.cjs— dispatchFeature function.claude/lib/mission/scrutiny-reviewer.cjs— ScrutinyReviewer class.claude/lib/mission/milestone-gate.cjs— MilestoneGate class.claude/lib/mission/workspace-provisioner.cjs— provisionWorkspace function.claude/lib/mission/handoff-watcher.cjs— HandoffWatcher class.claude/lib/mission/persona-injector.cjs— composePersona function.claude/lib/services/services-registry.cjs— ServicesRegistry class.claude/lib/services/bootstrap-system.cjs— BootstrapSystem class.claude/lib/readiness/readiness-scorer.cjs— ReadinessScorer class
3. Write Tests FIRST (TDD Red Phase)
Before writing ANY helper/infrastructure code:
- Create test file in
tests/integration/ - Use
node:testwithdescribe()andit()blocks - Use
assertfromnode:assert/strict - Write tests that exercise the integration points described in the feature
- Run tests with
node --test <test-file>to confirm they FAIL (red phase)
Test file conventions:
- Filename: matches feature scope (e.g.,
cross-area.test.cjs,e2e-pipeline.test.cjs) - Use temp directories for workspace isolation (clean up in
after()) - Mock external dependencies with the shared mock factory when available
- Use
path.join()for all paths (Windows compatibility) - Each
describe()block should map to one validation assertion ID
4. Build Required Infrastructure (TDD Green Phase)
If the feature requires shared helpers (mock factory, test pipeline):
- Create helper files in
tests/integration/helpers/ - Use CommonJS:
module.exports = { ... } - Helpers must be stateless between test cases
- Each mock factory function returns a fresh instance
If the feature is purely tests (no new helpers needed):
- Wire the real modules together with mocks for external deps
- Drive the lifecycle through explicit method calls
- Assert state at each transition point
5. Verify Your Work
- Run the specific test file:
node --test tests/integration/<file>.test.cjs - Run the full test suite:
pnpm test(must not break existing tests) - Run format check:
pnpm format:check - If format fails, run:
node scripts/format-tracked.mjs --writethen re-check
6. Check Edge Cases
- Verify tests work with temp paths containing spaces or special characters
- Verify cleanup happens even when assertions fail (use try/finally or after())
- Verify no open handles (setTimeout, setInterval) prevent test runner from exiting
Example Handoff
{
"salientSummary": "Built shared mock factory with createMockDb, createMockBudget, createMockEnqueue, createMockWorker. Wrote 12 test cases covering all 4 stubs' recording, configurability, and isolation. All tests pass, pnpm test green, format:check clean.",
"whatWasImplemented": "tests/integration/helpers/mock-factory.cjs with 4 factory functions. Each returns a configurable stub that records invocations. createMockWorker writes synthetic handoff JSON to a specified directory. All stubs have independent state per instantiation.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "node --test tests/integration/helpers/mock-factory.test.cjs",
"exitCode": 0,
"observation": "12 tests pass, 0 fail"
},
{
"command": "pnpm test",
"exitCode": 0,
"observation": "457 tests pass including 12 new integration tests"
},
{ "command": "pnpm format:check", "exitCode": 0, "observ
Установить integration-test-worker в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл integration-test-worker?
Builds cross-area integration tests for the mission engine module system
Как установить скилл integration-test-worker?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл integration-test-worker запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic