/test-plan:test-plan-update <SOURCE> [<NEW_DOC_PATH>...]from test-plan
Update an existing test plan with new documentation (ADR, API specs, design specs, design docs). Re-analyzes, updates artifacts, bumps version, and optionally regenerates test cases. Use when requirements evolve or new technical documentation becomes available after initial test plan creation.
Ships in test-plan. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Update an existing test plan when new information becomes available (ADRs, API specs, design specs, design documents, requirement changes).
/test-plan-update <SOURCE> [<NEW_DOC_PATH>...]
Examples:
/test-plan-update ~/Code/opendatahub-test-plans/plans/ai-hub/mcp_catalog adr.pdf/test-plan-update ~/Code/opendatahub-test-plans/plans/ai-hub/mcp_catalog ./design-spec.md/test-plan-update ~/Code/opendatahub-test-plans/plans/ai-hub/mcp_catalog (pull latest design-spec
attachment from Jira using TestPlan source_key)/test-plan-update https://github.com/org/repo/pull/42 api-spec.md design.md/test-plan-update https://github.com/org/repo/tree/test-plan/RHAISTRAT-400 requirements-v2.mdParse $ARGUMENTS to extract:
mcp_catalog or /path/to/mcp_cataloghttps://github.com/org/repo/tree/test-plan/RHAISTRAT-400https://github.com/org/repo/pull/5repo_root=$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P), classify each path with the
deterministic CLI
(uv run --project "$repo_root" python "$repo_root/scripts/resolve_design_spec.py" --classify <path>);
use kind to decide labeling and whether to snapshot as a design spec. If no paths are
given, set PULL_JIRA_DESIGN_SPEC=true to fetch the newest design-spec attachment via
source_key into a temp file in Step 2 (analyzers see it; feature-dir snapshot waits for
Step 4).When a new design-spec path is provided:
$repo_root and add it to
additional_docsWhen PULL_JIRA_DESIGN_SPEC=true, fetch into a temp dir in Step 2 (not the feature dir), pass
that path to analyzers/merge as Design Spec, then snapshot into $feature_dir only after
Step 4 approval via --local-path "$STAGED_DESIGN_SPEC_PATH".
If insufficient arguments are provided, ask the user via AskUserQuestion:
Where is the test plan to update?
You can provide:
- Local directory path (e.g.,
~/Code/opendatahub-test-plans/plans/ai-hub/mcp_catalog)- GitHub branch URL (e.g.,
https://github.com/org/repo/tree/test-plan/RHAISTRAT-400)- GitHub PR URL (e.g.,
https://github.com/org/repo/pull/5)
Then ask:
What new documentation should be incorporated?
Provide file paths (ADR, API spec, design spec, etc.), or leave empty to pull the newest design-spec attachment from Jira using the plan's
source_key.
Install the test-plan package (makes all scripts importable):
bash "${CLAUDE_SKILL_DIR}/../../scripts/bootstrap.sh" --layout "${CLAUDE_SKILL_DIR}" || exit 1
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv sync --extra dev)
If installation fails, inform the user and do NOT proceed. Once installed, all Python scripts will work from any directory.
Use the shared locate-feature-dir utility:
result=$(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/repo.py locate-feature-dir "<source>")
if [ $? -ne 0 ]; then
echo "$result"
exit 1
fi
# Parse JSON output
feature_dir=$(printf '%s\n' "$result" | jq -r '.feature_dir')
source_type=$(printf '%s\n' "$result" | jq -r '.source_type')
Validate local paths against skill repository:
if [ "$source_type" = "local" ]; then
# Validate against skill repository (no force flag for updates)
if [ -n "${FULLSEND_TARGET_REPO_DIR:-}" ]; then
FULLSEND_TARGET_REPO_DIR=$(cd "$FULLSEND_TARGET_REPO_DIR" && pwd -P) || exit 1
export FULLSEND_TARGET_REPO_DIR
fi
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/repo.py validate-local-path "$feature_dir") || exit 1
fi
Note: GitHub sources are always external repos, so no skill repo validation needed.
Set repo_root=$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P).
If no document paths were provided, set PULL_JIRA_DESIGN_SPEC=true (fetch in Step 2 via
source_key; feature-dir snapshot waits for Step 4). Otherwise, for each new document path:
if [ ! -f "$doc_path" ]; then
echo "❌ ERROR: Document not found: $doc_path"
exit 1
fi
Read <feature_dir>/TestPlan.md using Read tool
source_key, version, feature, components, additional_docsRead <feature_dir>/TestPlanGaps.md (if exists)
Read <feature_dir>/TestPlanReview.md (if exists)
Read <feature_dir>/README.md
Check for test cases: <feature_dir>/test_cases/INDEX.md
has_test_cases=trueFor each new document path:
uv run --project "$repo_root" python "$repo_root/scripts/resolve_design_spec.py" --classify "$doc_path"
and use kind (design_spec | adr | other) for labeling — do not inspect content yourself.Design Spec, ADR, or inferred other label).kind is design_spec, stage the path for later snapshot — do not write
.source-design-spec.md or edit additional_docs yet (wait for Step 4 approval).If PULL_JIRA_DESIGN_SPEC=true, fetch the attachment into a temp dir before analysis (do not
write $feature_dir/.source-design-spec.md yet):
tmp_ds_dir=$(mktemp -d)
jira_ds=$(cd "$repo_root" && uv run python scripts/resolve_design_spec.py \
--issue-key "$source_key" --feature-dir "$tmp_ds_dir" --snapshot) || exit 1
if [ "$(echo "$jira_ds" | jq -r '.has_content')" = "true" ]; then
STAGED_DESIGN_SPEC_PATH="$tmp_ds_dir/.source-design-spec.md"
fi
Read $STAGED_DESIGN_SPEC_PATH when set and label it Design Spec for Steps 3–5.
Invoke the three analyzer skills in parallel using the Skill tool, passing:
Original strategy content (from Jira via source_key, or from local cache)
Existing additional docs (from frontmatter additional_docs)
New documents (just read in Step 2), including a Jira-fetched design spec at
$STAGED_DESIGN_SPEC_PATH when PULL_JIRA_DESIGN_SPEC=true
test-plan.analyze.endpoints: Re-extract feature scope and API endpoints
test-plan.analyze.risks: Re-determine test levels, types, priorities, risks
test-plan.analyze.infra: Re-identify environment, test data, infrastructure needs
Each analyzer returns:
Invoke the test-plan-merge forked sub-agent using the Skill tool to intelligently merge new analyzer findings into the existing test plan:
Skill: test-plan-merge
Arguments:
Old TestPlan.md: <full content from Step 1>
New Findings from Analyzers:
- Endpoints: <findings from Step 3>
- Risks: <findings from Step 3>
- Infrastructure: <findings from Step 3>
New Documents: <full content from Step 2 with labels>
Example:
ADR (adr-v2.pdf):
<full text content of the ADR>
API Spec (api-spec.md):
<full text content of the API spec>
Rationale: The merge agent needs access to actual document content (not just filenames) to:
The sub-agent has context: fork so it runs in isolation and returns cleanly.
The merge sub-agent returns:
Validate merge (manual review):
Present the change summary to the user:
Merge completed. Changes proposed:
Sections modified: <list from statistics>
User edits preserved in: <list from statistics>
Items added: <count>
Items updated: <count>
Items deprecated: <count>
<full change summary from agent>
Ask user via AskUserQuestion:
Review merge changes before applying
The merge agent updated sections. Review the changes above.
Proceed with these updates? [yes/no]
If no: Stop without applying updates (TestPlan.md unchanged; discard staged design-spec
snapshot/frontmatter changes — nothing was written to $feature_dir yet)
If yes: Continue to apply updates. If $STAGED_DESIGN_SPEC_PATH is set, snapshot it now:
(cd "$repo_root" && uv run python scripts/resolve_design_spec.py \
--local-path "$STAGED_DESIGN_SPEC_PATH" \
--feature-dir "$feature_dir" --snapshot) || exit 1
Then add .source-design-spec.md to additional_docs when bumping frontmatter in Step 9.
Rationale: Provides manual validation that merge preserved user edits and made sensible decisions. User can review the change summary before committing to the updates.
Apply the updates:
Invoke the test-plan-resolve-gaps forked sub-agent using the Skill tool to cross-reference old gaps with new findings:
Skill: test-plan-resolve-gaps
Arguments:
Old Gaps from TestPlanGaps.md: <content from Step 1>
New Findings from Analyzers:
- Endpoints: <findings from Step 3>
- Risks: <findings from Step 3>
- Infrastructure: <findings from Step 3>
New Documents: <full content from Step 2 with labels>
Example:
ADR (adr-v2.pdf):
<full text content>
Rationale: Same as Step 4 - the agent needs actual document content to verify gap resolution claims (e.g., "API versioning now specified in ADR section 2.3" - agent can check if true).
The sub-agent has context: fork so it runs in isolation and returns cleanly.
The sub-agent returns:
Validate gap count arithmetic:
# Extract counts from sub-agent statistics
resolved_count=<from_statistics>
unresolved_count=<from_statistics>
new_count=<from_statistics>
# Validate arithmetic (original - resolved + new = unresolved)
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/validate.py gap-counts \
"$feature_dir" $resolved_count $unresolved_count $new_count)
if [ $? -ne 0 ]; then
echo "⚠️ Gap count mismatch detected. Please review resolve-gaps output manually."
# Ask user via AskUserQuestion: Continue anyway? [yes/no]
# If no: exit 1
fi
Update TestPlanGaps.md:
# Get gap count from sub-agent statistics
new_gap_count=<count_of_unresolved_gaps>
# Update status: Open if gaps remain, Resolved if all resolved
new_status=$([ $new_gap_count -eq 0 ] && echo "Resolved" || echo "Open")
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/frontmatter.py set <feature_dir>/TestPlanGaps.md \
gap_count=$new_gap_count \
status=$new_status)
Invoke test-plan.review skill with the updated feature directory:
/test-plan-review <feature_dir>
This generates a new TestPlanReview.md with updated score and verdict.
Handle review output:
If has_test_cases=true (test cases exist), ask the user via AskUserQuestion:
New information has been incorporated into the test plan.
Changes detected:
Do you want to update the existing test cases?
- Yes, update test cases — regenerate affected test cases and add new ones for new coverage
- No, keep test cases as-is — only TestPlan.md has been updated
- Review changes first — show me the diff before deciding
If user selects option 1:
/test-plan-create-cases <feature_dir> to regenerate test casesIf user selects option 3:
Update the README with:
## Changelog
### v1.1.0 (2026-04-23)
- Updated with new API specification
- Resolved 3 gaps from TestPlanGaps.md
- Added 2 new endpoints to Section 4
Bump version (minor; if test cases were regenerated, bump twice):
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/version.py bump <feature_dir>/TestPlan.md minor)
If test cases were regenerated, run a second minor bump.
The script outputs JSON with old_version and new_version.
Update TestPlan.md frontmatter (additional_docs and other fields):
(cd "$(cd -P "${CLAUDE_SKILL_DIR}/../.." && pwd -P)" && uv run python scripts/frontmatter.py set <feature_dir>/TestPlan.md \
additional_docs="<updated_comma_separated_list>")
Update status if needed:
Present final summary to user:
Test plan updated successfully
- Location:
<feature_dir>- Version: <old_version> → <new_version>
- Quality score: <old_score>/10 → <new_score>/10
- Verdict:
- Gaps resolved:
- Gaps remaining:
- Test cases: <updated|unchanged>
Updated artifacts:
- TestPlan.md
- TestPlanGaps.md
- TestPlanReview.md
- README.md
- test_cases/ (if regenerated)
Next steps:
- Review changes:
git diff(if in git repo)- Publish updates:
/test-plan-publish <feature_name>
/test-plan-create for that/test-plan-resolve-feedback for that/test-plan-publish after updating$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
claude-opus-4-6Other plugins' skills for the same job
16 skills in this plugin
/test-plan-analyze-endpointsAnalyzes strategy, optional ADR, and optional design spec to extract feature scope, AC-traced test objectives, and interfaces under test. Use for extracting technical scope and e2e/UI test surface from requirements documents./test-plan-analyze-infraAnalyzes strategy, optional ADR, and optional design spec to identify test environment configuration, test data, test users, infrastructure, and tooling requirements. Use for determining test execution prerequisites and infrastructure setup needs./test-plan-analyze-risksAnalyzes strategy, optional ADR, and optional design spec to determine test levels, test types, priority definitions, non-functional requirements, and risks with mitigations. Use for identifying what needs testing, how to prioritize test coverage, and what risks to mitigate.test-plan@opendatahub-skills is listed by opendatahub-io/skills-registry — review the source before installing
npx claudepluginhub opendatahub-io/skills-registry --plugin test-plan