name: mcp-java-dev-tools-regression-plan-crafter
description: "Create or update deterministic regression plans (metadata.json, contract.json, plan.md) under .mcpjvm/.../plans/regression."
MCP JVM Regression Plan Crafter
Use this skill to author or refine a persisted regression plan spec package before execution/replay.
Execution Mode
This skill must run in two phases:
ResearchCraft
Do not skip Research when route/base path evidence is incomplete.
Goal
Produce a deterministic, fail-closed plan package:
.mcpjvm/<project_name>/plans/regression/<regression_name>/metadata.json.mcpjvm/<project_name>/plans/regression/<regression_name>/contract.json.mcpjvm/<project_name>/plans/regression/<regression_name>/plan.md
Do not hand-author .mcpjvm/<project_name>/plans/regression/<plan>/runs/<run_id>/... artifacts in this skill. Those are machine-generated during execution.
Use artifact_management (artifactType=regression_plan) as the canonical MCP Tool for read/validate/upsert/list lifecycle operations.
Portable Source of Truth
Always align with:
references/spec-rules.mdreferences/authoring-checklist.mdreferences/templates/metadata.template.jsonreferences/templates/contract.template.jsonreferences/templates/plan.template.md
These references are bundled with the skill so it remains installable and usable across repositories. If user input conflicts with these rules, fail closed and request clarification.
Contract Rules
metadata.execution.intentmust beregression.contract.stepsmust be strict ordered1..Nwith uniqueorder.steps[].protocolmust match a key understeps[].transport(for exampleprotocol=httprequirestransport.http).- No hardcoded secrets in
metadata.json,contract.json, orplan.md. targets[].selectors.fqcnis mandatory for deterministic target identity.- If runtime pinning is enabled (
probeVerification=true,pinStrictProbeKey=true), each target must provideruntimeVerification.strictProbeKeyinFQCN#method:lineformat. steps[].whenis optional and supports deterministic condition nodes only (all,any,not) and predicates (equals,not_equals,in,exists).steps[].when.leftmust reference onlycontext.*or priorstep[n].*(wheren < current step order).
Plan Authoring Workflow
- Research target and route facts
- Collect target and scope
- Define prerequisites
- Define ordered steps
- Define step expectations
- Generate
plan.mdwith deterministic verbs - Validate consistency and fail closed on ambiguity
0) Research target and route facts
Before crafting, gather only provable facts from:
- source mappings
- runtime docs/contracts (for example OpenAPI), if available
- explicit user-provided inputs
Record unresolved route/base-path items as missing context. Do not synthesize guessed prefixes.
1) Collect target and scope
Capture:
- Regression name (
<regression_name>) - Target type (
class_method,class_scope,module_scope) - Deterministic selectors:
- required:
fqcn - optional:
method,signature,sourceRoot
- required:
If multi-module ambiguity exists and no deterministic selector is provided, fail closed.
2) Define prerequisites
For each context key:
keyrequiredsecretprovisioning(user_input|discoverable)discoverySourcewhenprovisioning=discoverable(datasource|runtime_context)- optional
default(non-secret only)
Use prerequisites for reusable runtime inputs (for example tenantId, region, auth.bearer).
3) Define ordered steps
For every executable step:
- assign
ordersequentially - assign stable
id - point
targetRef - set
protocol - define
transport.<protocol>details - optionally add
extractmappings for cross-step context - optionally add
whenfor deterministic conditional execution
Keep steps natural and dependency-aware (for example create before update/delete).
4) Define step expectations
Add deterministic assertions under steps[].expect[] for every step.
Required expectation fields:
idactualPathoperatorexpected(when required by operator)- optional
required(trueby default)
Supported operators:
field_equalsfield_existsfield_matches_regexnumeric_gtenumeric_ltecontainsprobe_line_hitoutcome_status
5) Generate plan.md
Required sections:
PurposeTargetsPrerequisitesStepsExpected Outcomes
Required action verbs in Steps:
ExecutesCapturesUsesSetsWaitsForVerifies
Required outcome verbs in Expected Outcomes:
ReturnsEmitsProducesMatchesPasses
6) Validate consistency
Before finalizing, verify:
- Metadata and contract compatibility
- Target selectors are deterministic
- Step ordering and protocol/transport mapping are valid
- Prerequisites cover all referenced context keys
- No secrets are persisted as defaults
plan.mdsemantics matchcontract.json
If any check fails, return blocked guidance with exact missing/invalid fields and no speculative defaults.
Required Deliverables Per Craft Request
When user asks to craft a plan, produce or update:
.mcpjvm/<project_name>/plans/regression/<regression_name>/metadata.json.mcpjvm/<project_name>/plans/regression/<regression_name>/contract.json.mcpjvm/<project_name>/plans/regression/<regression_name>/plan.md
Never require manual hand-construction when templates can be applied.
Use the template files, then specialize fields from the user context.
Persist through artifact_management with action=upsert after action=validate.
Fail-Closed Cases
Stop and return deterministic blocked guidance when:
- target selector is ambiguous (for example duplicate module candidates with no disambiguator)
- step order is non-sequential or duplicated
- protocol and transport key do not match
- required context keys cannot be determined and no safe default exists
- pinned strict probe key is required but invalid/missing
- user asks to persist secrets as defaults
- base path/prefix is not proven but required to produce executable route steps
- discoverable prerequisite is missing
discoverySource steps[].whenis malformed, uses unsupported operators, or references non-deterministic pathssteps[].whenreferences the same or a future step
Base Path Policy (No Assumptions)
- Never assume or inject a default route prefix/base path.
- Set base path only when:
- user provided it explicitly, or
- it is proven by source/runtime evidence.
- If base path is unproven:
- leave it unset in crafted plan fields,
- return deterministic
needs_user_inputguidance for the missing key.
Output Style
When crafting or updating plans, output:
- Absolute paths changed
- Short summary of deterministic selectors and step ordering
- Any blocked fields that require user input
Non-Goals
- Do not create additional MCP tools beyond the existing
artifact_managementpath. - Do not execute regression runs from this skill.
- Do not write
.mcpjvm/<project_name>/plans/regression/<plan>/runs/<run_id>artifacts manually.