plugins/agile-workflow/skills/ln-523-auto-test-planner/SKILL.md
Plans automated tests (E2E/Integration/Unit) using Risk-Based Testing after manual testing. Use when Story needs a test task with prioritized scenarios.
npx skillsauth add levnikolaevich/claude-code-skills ln-523-auto-test-plannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
references/,../ln-*) are relative to this skill directory.
Type: L3 Worker
Creates Story test task with comprehensive automated test coverage (E2E/Integration/Unit) based on Risk-Based Testing methodology and REAL manual testing results.
| Input | Required | Source | Description |
|-------|----------|--------|-------------|
| storyId | Yes | args, git branch, kanban, user | Story to process |
Resolution: Story Resolution Chain. Status filter: To Review
Automation: Supports autoApprove: true in managed runs to skip manual confirmation.
MANDATORY READ: Load references/environment_state_contract.md, references/storage_mode_detection.md, and references/input_resolution_pattern.md
Extract: task_provider = Task Management → Provider (linear | file).
docs/tasks/kanban_board.md (see CLAUDE.md "Configuration Auto-Discovery")Step 0: Study Project Test Files
Step 1: Load Research and Manual Test Results
task_provider = linear: get_issue(storyId) — extract Story.id (UUID, NOT short ID)task_provider = file: Read story.md — extract Story metadatatask_provider = linear: list_comments(issueId=storyId) → find matching commenttask_provider = file: Glob("docs/tasks/epics/*/stories/*/comments/*.md") → find matching commentStep 2: Analyze Story + Tasks
task_provider = linear: list_issues(parentId=Story.id, state="Done")task_provider = file: Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → filter by **Status:** DoneProcess: Locate Linear comment with "Manual Testing Results" header -> Verify Format Version 1.0 -> Extract structured sections (Acceptance Criteria, Test Results by AC, Edge Cases, Error Handling, Integration Testing) using regex -> Validate (at least 1 PASSED AC, AC count matches Story, completeness check) -> Map parsed data to test design structure
Error Handling: Missing comment -> use fallback (inline research or skip per Phase 2 logic), Missing format version -> WARNING (try legacy parsing), Required section missing -> use fallback, No PASSED AC -> ERROR (fix implementation)
MANDATORY READ: Load references/risk_based_testing_guide.md for scoring and usefulness gates.
Conditional read: load references/risk_based_testing_methodology.md only when planning a full test strategy or when the risk/usefulness decision is ambiguous.
E2E-First Approach: Prioritize by business risk (Priority = Impact x Probability), not coverage metrics.
Workflow:
Step 1: Risk Assessment
Calculate Priority for each scenario from manual testing:
Priority = Business Impact (1-5) x Probability (1-5)
Decision Criteria:
Step 2: E2E Test Selection (2-5): Baseline 2 (positive + negative) ALWAYS + 0-3 additional (Priority ≥15 only)
Step 3: Unit Test Selection (0-15): DEFAULT 0. Add ONLY for complex business logic (Priority ≥15): financial, security, algorithms
Step 4: Integration Test Selection: DEFAULT 0. Add ONLY if E2E gaps AND Priority ≥15: rollback, concurrency, external API errors
Step 5: Validation: Each test passes Usefulness Criteria (Priority ≥15, Confidence ROI, Behavioral, Predictive, Specific, Non-Duplicative)
Generates complete test task per test_task_template.md (11 sections):
Sections 1-7: Context, Risk Matrix, E2E/Integration/Unit Tests (with Priority scores + justifications), Coverage, DoD
Section 8: Existing Tests to Fix (analysis of affected tests from implementation tasks)
Section 9: Infrastructure Changes (packages, Docker, configs - based on test dependencies)
Section 10: Documentation Updates (README, CHANGELOG, tests/README, config docs)
Section 11: Legacy Code Cleanup (unsupported patterns, backward compat, dead code)
Shows preview for review.
Step 1: Preview generated test plan (always displayed for transparency)
Step 2: Confirmation logic:
Step 3: Check for existing test task
task_provider = linear: list_issues(parentId=Story.id, label="tests")task_provider = file: Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → filter by **Labels:** containing testsDecision:
Step 4a: CREATE MODE (if Count = 0)
Managed delegation sequence:
childRunId = {parent_run_id}--ln-301--{storyId}childSummaryArtifactPath = .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-plan/ln-301--{storyId}.json.hex-skills/test-planning/ln-301--{storyId}_manifest.jsontask-plan-worker-runtime with both transport inputschild_run metadata in PHASE_6_DELEGATE_TASK_PLANln-301-task-creator with --run-id and --summary-artifact-pathtask-plan artifactPass to worker:
Worker returns: Task URL + task-plan artifact
Step 4b: REPLAN MODE (if Count >= 1)
Managed delegation sequence:
childRunId = {parent_run_id}--ln-302--{storyId}childSummaryArtifactPath = .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-plan/ln-302--{storyId}.json.hex-skills/test-planning/ln-302--{storyId}_manifest.jsontask-plan-worker-runtime with both transport inputschild_run metadata in PHASE_6_DELEGATE_TASK_PLANln-302-task-replanner with --run-id and --summary-artifact-pathtask-plan artifactPass to worker:
Worker returns: Operations summary + child task-plan artifact
Step 5: Return structured summary to caller
MANDATORY READ: Load references/test_planning_summary_contract.md, references/test_planning_worker_runtime_contract.md, references/task_plan_worker_runtime_contract.md
Runtime profile:
test-planning-workerln-523test-planning-workerworker, status, warnings, test_task_id, test_task_url, coverage_summary, planned_scenariosInvocation rules:
runId and summaryArtifactPathrunId and exact summaryArtifactPathDelegated child worker rules:
ln-301 or ln-302, ln-523 becomes the parent runtimetask-plan-worker-runtime before delegationchild_run metadata before the child Skill calltask-plan artifact, never child proseResearch and Manual Results Loaded:
Risk-Based Test Plan Generated:
Test Task Description Complete (11 sections):
Worker Delegation Executed:
task-plan-worker-runtimetask-plan-worker-runtimetask-plan artifact consumed before final summaryOutput:
references/environment_state_contract.mdreferences/storage_mode_detection.mdreferences/risk_based_testing_guide.mdreferences/risk_based_testing_methodology.mdreferences/auto_discovery_pattern.mdreferences/templates/test_task_template.md (workers ln-301/ln-302 load via Template Loading)references/risk_based_testing_examples.mdreferences/research_tool_fallback.mdtask-plan-worker-runtime, deterministic child runId, exact child summaryArtifactPath, and artifact-only consumptionMinimum Viable Testing: Start with baseline E2E (positive + negative). Each additional test must pass all 6 Usefulness Criteria.
Risk-Based Testing: Prioritize by Business Impact x Probability. E2E-first from ACTUAL manual testing results. Priority ≥15 scenarios covered by tests.
Expected-Based Testing: For deterministic tests, compare actual vs expected using diff. MANDATORY READ: Load ../ln-522-manual-tester/SKILL.md — section "Test Design Principles".
Version: 1.0.0 Last Updated: 2026-01-15
testing
Checks runtime lifecycle and config validation: bootstrap, shutdown, probes, cleanup, env sync, and fail-fast startup. Use for runtime readiness.
testing
Checks races, deadlocks, async hazards, TOCTOU, blocking I/O, and shared resource contention. Use when auditing concurrency correctness.
testing
Checks diagnosability through structured logs, metrics, traces, correlation IDs, and useful log levels. Use when auditing incident visibility.
development
Finds code that can be safely deleted: unreachable, unused, obsolete compatibility, and commented-out code. Use when pruning dead code.