Skip to content

Test Planning

moira/test-planning creates an independently reviewed test strategy and detailed case plan. It does not implement or execute tests. Use it when you need to decide what should be tested, why it matters, how to verify it, and whether the proposed plan covers the known requirements and risks.

mcp__moira__start({
action: "prepare",
workflowId: "moira/test-planning",
parentExecutionId: "none"
})
mcp__moira__start({ action: "execute", startAttemptId: "<Start attempt ID from prepare>" })

The workflow accepts a feature, change, API, page, module, or system together with any available acceptance criteria, user scenarios, constraints, and known risks. The planning agent first inspects available task text, specifications, project documentation, and code. It asks for clarification only when a missing fact materially changes the strategy and cannot be discovered.

Choose Test Planning when the required result is a reviewed test plan rather than test code or a product change.

NeedWorkflow
Decide coverage, risks, priorities, cases, and expected resultsTest Planning
Implement or generate executable tests from known requirements or a planTest Generation
Implement a product change together with its tests, documentation, reviews, and delivery evidenceSoftware Development Flow
flowchart LR
    A[Plan from project evidence] --> B[Independent review]
    B --> C{Blocking findings?}
    C -->|No| D[Present accepted plan]
    C -->|Yes| E[Repair contract and Markdown]
    E --> B
    D --> F[End]

The planning stage performs the connected work in one responsibility:

  • records the tested scope, evidence, stable acceptance-criterion IDs, scenarios, constraints, assumptions, and unknowns;
  • identifies applicable technical, business, security, data-integrity, compatibility, and operational risks, each with impact and likelihood;
  • selects categories from the real scope and records why relevant categories are excluded;
  • assigns every case a P0–P3 priority and rationale;
  • writes executable steps, an observable expected result, and acceptance-criterion or risk links for every case;
  • recommends automation without running tests.

All files are fixed children of one traversal-safe local workspace named ./moira-ws/test-planning-<suffix>:

FileRole
requirements.mdTested scope, evidence sources, acceptance criteria, scenarios, constraints, assumptions, and unknowns
test-plan.contract.jsonCanonical schema-validated risks and case fields
test-plan.mdReady-to-use Markdown projection plus narrative coverage, exclusions, limitations, and automation recommendations
review.mdComplete current independent blocking findings

test-plan.contract.json is the source of truth for fields shared with the Markdown plan. The runtime validates the canonical object when it is created and whenever it is repaired. A risk without impact or likelihood, a case without required verifiable fields, an invalid priority, empty steps, or a case with no acceptance-criterion/risk link is rejected before the workflow advances.

Categories are conditional, not a universal checklist. Positive, negative, boundary, security, integration, performance, accessibility, compatibility, recovery, and compliance coverage are included when the tested scope needs them. A relevant omission requires a reason; an irrelevant category is not forced merely to reach a test count.

PriorityMeaning in the plan
P0Release-blocking behavior, data loss, critical security, or another failure that makes release unacceptable
P1Release-critical core flow or high-impact risk that must be covered before release
P2Important secondary behavior that should be verified
P3Lower-impact, cosmetic, or rare behavior that remains useful to record

P0/P1 assignments must be tied to release-critical behavior or high-impact risks. The workflow plans those checks; it does not claim that they passed because it does not execute them.

The reviewer runs in a separate host-supported context and reads the current files and primary project evidence directly. It checks:

  • every acceptance criterion and identified risk has appropriate coverage;
  • high-impact and release-critical risks have justified P0/P1 cases;
  • steps and expected results are executable and observable;
  • category exclusions and priority rationales are defensible;
  • identifiers and links are valid;
  • the Markdown projection matches the canonical JSON contract;
  • the plan stays inside its local planning authority.

A non-zero finding count can only enter repair. Repair changes the canonical contract or narrative evidence, regenerates the Markdown projection, and returns to the same review. The presentation node is reachable only after a zero-finding review. There is no delivery bypass for known gaps.

This workflow may inspect project evidence and create its four local planning files. It does not execute tests, modify product code, commit, push, publish, send notifications, or deploy. Test execution can only be recommended for a separately authorized caller or workflow.

Agent directives use named success connections, and the review gate uses true and false branches:

{
"id": "review-gate",
"type": "condition",
"condition": {
"operator": "eq",
"left": { "contextPath": "issues_count" },
"right": 0
},
"connections": {
"true": "present",
"false": "repair"
}
}