From test-plan
Analyze test cases and recommend placement (component repo vs downstream E2E repo). Use for determining where each test should be implemented based on test level, dependencies, and repository capabilities.
npx claudepluginhub opendatahub-io/skills-registry --plugin test-planThis skill uses the workspace's default tool permissions.
Analyzes test case specifications and recommends whether each should be placed in the component repository (upstream) or downstream E2E repository, based on test level, infrastructure requirements, priority, and repository readiness.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Analyzes test case specifications and recommends whether each should be placed in the component repository (upstream) or downstream E2E repository, based on test level, infrastructure requirements, priority, and repository readiness.
This skill is not user-invocable. It is called by:
test-plan.case-implement (Step 2)Parse $ARGUMENTS to extract file paths:
--feature-dir: Path to feature directory containing TestPlan.md and test_cases/--code-repo: GitHub repository name (e.g., opendatahub-io/odh-dashboard)--code-repo-readiness: Agent readiness level (high, medium, low, none, unknown)--code-repo-has-tests: Boolean (true/false)--downstream-readiness: Downstream repo readiness (high, medium, low)Read <feature_dir>/TestPlan.md to understand:
Read all TC-*.md files from <feature_dir>/test_cases/:
Key Principles (refined to address common concerns):
For each TC:
Extract characteristics by analyzing TC text (preconditions + steps + expected results):
Test level signals:
is_unit: contains "single function", "isolated", "mock", "unit test", "no dependencies"is_integration: contains "multiple components", "database", "service", "integration"is_api: contains "HTTP", "REST", "API", "endpoint", "/api/"is_e2e: contains "end-to-end", "E2E", "user workflow", "full flow", "UI", "browser"is_contract: contains "contract test", "API contract", "schema validation"Infrastructure requirement signals:
requires_k8s_api: contains "Kubernetes", "K8s", "CRD", "Custom Resource", "kubectl", "namespace" (but NOT "full deployment")requires_cluster: contains "OpenShift", "cluster", "pod", "deployment" (actual cluster, not just K8s API)requires_full_stack: contains "RHOAI", "ODH", "full deployment", "multiple services", "end-to-end deployment"Classify test level:
is_e2e AND requires_full_stack → level = e2eis_unit → level = unitis_contract OR is_api → level = apiis_integration → level = integrationrequires_k8s_api AND NOT requires_full_stack → level = k8s-integrationcomponentScore placement options (same_repo, downstream, both):
Initialize scores: same_repo = 0, downstream = 0, both = 0
Factor 1: Test level preferences
unit:
code_repo_has_tests: same_repo += 10downstream += 5e2e:
downstream += 10api:
code_repo_has_tests: both += 8downstream += 7integration:
code_repo_readiness == 'high' AND code_repo_has_tests: same_repo += 7downstream += 8k8s-integration:
code_repo_has_tests: same_repo += 8downstream += 6component:
code_repo_has_tests: same_repo += 8downstream += 6Factor 2: Infrastructure requirements
requires_full_stack:
downstream += 10same_repo = max(0, same_repo - 5)requires_cluster AND level == e2e:
downstream += 7requires_k8s_api AND level in [unit, integration, k8s-integration]:
code_repo_has_tests: same_repo += 5downstream += 4Factor 3: TC priority (P0 strongly prefers upstream for fast feedback)
priority == 'P0':
e2e:
same_repo += 10api: both += 5e2e):
downstream += 10same_repo = max(0, same_repo - 3)Factor 4: Code repo agent readiness
code_repo_readiness == 'high': same_repo += 3code_repo_readiness in ['low', 'none']: downstream += 4Determine recommended placement:
Important: The 'both' option only makes sense when there are reasons to place the test in BOTH locations. If downstream == 0, then 'both' is illogical (why place it downstream if there are zero reasons to?).
downstream == 0: recommended_placement = same_repo (because 'both' doesn't make sense if there are zero reasons to place it downstream)same_repo == 0: recommended_placement = downstream (because 'both' doesn't make sense if there are zero reasons to place it upstream)same_repo > downstream: recommended_placement = same_repodownstream > same_repo: recommended_placement = downstreamsame_repo == downstream):
recommended_placement = same_repoStore decision for this TC:
tc['level'] = leveltc['placement_recommendation'] = recommended_placementtc['placement_scores'] = {same_repo: X, downstream: Y, both: Z}tc['placement_reasons'] = [list of reasons from scoring]Display placement summary:
==========================================
Placement Recommendations for <feature_name>
==========================================
TC-MIG-001 (k8s-integration, P0)
Characteristics: requires_k8s_api
Scores: same_repo=28, downstream=0, both=0
→ Recommended: same_repo
→ Reasons: P0 → upstream (fast feedback), K8s integration → envtest
TC-E2E-001 (e2e, P0)
Characteristics: is_e2e, requires_full_stack
Scores: same_repo=0, downstream=30, both=0
→ Recommended: downstream
→ Reasons: E2E + full stack → downstream only
Summary:
- same_repo: 5 TCs
- downstream: 2 TCs
- both: 1 TC
==========================================
Ask user via AskUserQuestion:
Question: "Review placement recommendations?"
Options:
If user chooses Option 1: Return all decisions as-is.
If user chooses Option 2: For each TC, ask:
TC-{id} ({level}, {priority})
Recommended: {placement}
Scores: same_repo={X}, downstream={Y}, both={Z}
Reasons: {reasons}
Choose placement:
1. Accept recommendation ({placement})
2. Override to: same_repo
3. Override to: downstream
4. Override to: both
For any overrides, update tc['placement_recommendation'] and add tc['placement_override'] = True.
Return structured output with placement decisions for all TCs:
{
"tc_placements": [
{
"tc_id": "TC-MIG-001",
"level": "k8s-integration",
"placement": "same_repo",
"scores": {"same_repo": 28, "downstream": 0, "both": 0},
"reasons": ["P0 → upstream (fast feedback)", "K8s integration → envtest"],
"override": false
},
...
]
}
$ARGUMENTS