一键导入
strategy-refine
Refine a single strategy — add the HOW, dependencies, impacted teams/components, and non-functional requirements. Requires a strategy key argument.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refine a single strategy — add the HOW, dependencies, impacted teams/components, and non-functional requirements. Requires a strategy key argument.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create strategies from approved RFEs by cloning them to RHAISTRAT in Jira, or guiding the user through manual cloning.
Sign off on a CI-approved strategy — pushes content and adds strat-creator-human-sign-off label. For rubric-pass strategies only.
Adversarial review of a single refined strategy. Scores against rubric, then runs independent forked reviewers for detailed prose. Requires a strategy key argument.
Reviews strategy features for testability — are acceptance criteria measurable, are edge cases covered, can this be validated?
Pull a RHAISTRAT issue from Jira into the local/ workspace for human review. Only works on post-CI strategies.
Push a locally-refined strategy back to Jira and resubmit to CI. For needs-attention strategies only.
| name | strategy-refine |
| description | Refine a single strategy — add the HOW, dependencies, impacted teams/components, and non-functional requirements. Requires a strategy key argument. |
| context | fork |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
You are a senior engineer performing feature refinement. Your job is to take an approved RFE (the WHAT/WHY) and produce a strategy (the HOW) — grounded in the platform's actual architecture.
If --dry-run is in $ARGUMENTS, skip ALL external writes:
artifacts/strat-tasks/Check if strategy files exist in local/strat-tasks/. If they do, this is a local human review session pulled via /strategy-pull.
In local mode:
local/strat-tasks/ instead of artifacts/strat-tasks/local/strat-reviews/ instead of artifacts/strat-reviews/local/strat-originals/ instead of artifacts/strat-originals/local/strat-tasks/Local mode is also active if any strategy file's frontmatter contains workflow: local.
If both local/strat-tasks/ and artifacts/strat-tasks/ have files, prefer local/strat-tasks/.
If --architecture-context <path> is in $ARGUMENTS, link the local path before reading:
bash ${CLAUDE_SKILL_DIR}/scripts/fetch-architecture-context.sh <path>
Otherwise, if .context/architecture-context/ does not exist, fetch from remote:
bash ${CLAUDE_SKILL_DIR}/scripts/fetch-architecture-context.sh
This skill processes exactly one strategy per invocation. $ARGUMENTS must contain a strategy key (e.g., RHAISTRAT-1531 or STRAT-001). If no key is provided, stop with an error: "No strategy key provided. Usage: /strategy-refine RHAISTRAT-NNNN"
Read the strategy file in artifacts/strat-tasks/. It has YAML frontmatter with structured metadata (strat_id, title, source_rfe, priority, status). Read frontmatter with:
python3 ${CLAUDE_SKILL_DIR}/scripts/frontmatter.py read artifacts/strat-tasks/<filename>.md
Each file also contains the business need from the source RFE. This business need is fixed input — VERBATIM, character-for-character from the original RFE. Do NOT paraphrase, rewrite, clean up grammar, or reinterpret the business need text. Your job is to add or revise the HOW (the ## Strategy (AI Generated by Agentic SDLC Pipeline) section), not change the WHAT.
Read the strategy's frontmatter to get the jira_key. If jira_key is not null, fetch the STRAT's labels from Jira:
python3 ${CLAUDE_SKILL_DIR}/scripts/fetch_issue.py RHAISTRAT-NNNN --fields labels --markdown
If the STRAT has either strat-creator-rubric-pass or strat-creator-needs-attention in its labels, stop — it has already been processed by the pipeline:
[SKIP] RHAISTRAT-NNNN — already has <label>, skipping refinementCheck if a prior review exists in artifacts/strat-reviews/ for the strategy being refined. If one exists, this is a revision — the strategy has already been refined and reviewed. Read the review file.
In revision mode:
## Revision History section (artifacts/strat-reviews/{id}-review.md), not in the strategy artifact itself. Keep strategy files clean with only frontmatter and business/strategy content.If no review files exist, this is initial refinement — generate the strategy from the stub.
CRITICAL: Never skip refinement. The ## Strategy (AI Generated by Agentic SDLC Pipeline) section MUST be generated or regenerated on every run. Do NOT check whether the section "already has content" and skip — the entire purpose of this skill is to write that section. Even if the section appears to have content, regenerate it with current architecture context and staff engineer input.
Check for architecture context in .context/architecture-context/architecture/. Find the rhoai-* version directory. If found, read PLATFORM.md to understand the platform structure, then read component docs relevant to the strategy.
If architecture context is not available, note this and produce the best refinement you can from the RFE content alone.
Before generating the strategy, check for three high-priority inputs that contain implementation guidance. These take priority over general architecture context when they exist, because they represent either domain expert knowledge, cross-strategy corrections, or prior technical analysis of this specific RFE.
Priority chain (highest to lowest):
Read the strategy's frontmatter to get the source_rfe key (e.g., RHAIRFE-710). Always fetch fresh comments from Jira — do not rely on a cached comments file from a previous run, as new comments may have been added since creation.
python3 ${CLAUDE_SKILL_DIR}/scripts/fetch_issue.py RHAIRFE-NNNN --fields comment --markdown
Parse the JSON output and write the comments to the originals directory (overwriting any existing file). In local mode, write to local/strat-originals/{source_rfe}-comments.md; otherwise write to artifacts/strat-originals/{source_rfe}-comments.md:
# Comments: RHAIRFE-NNNN
## Author Name — YYYY-MM-DD
<comment body in markdown>
Then scan the comments for one containing the marker [RFE Creator] followed by "The following technical implementation details were removed from the RFE description during review." This comment contains implementation details that rfe-creator deliberately stripped from the RFE to keep it "open to how" — these details are explicitly described as "better suited for a RHAISTRAT."
Extract the content after the marker. This is high-priority input for the Technical Approach section. The removed context often contains proposed solution architectures, component-level design decisions, API designs, and integration patterns.
Use this content as a primary input when writing the Technical Approach. It should inform and ground the technical decisions, though you may extend, refine, or disagree with specific recommendations based on the architecture context.
If Jira is unavailable, fall back to reading the cached comments file from the originals directory (local/strat-originals/ in local mode, artifacts/strat-originals/ otherwise). If neither Jira nor a cached file is available, proceed without it.
Read the strategy file being refined. Check the ## Staff Engineer / SME Input section for content beyond the default template placeholder (HTML comments only).
If a staff engineer has added guidance, corrections, or domain expertise to this section, treat it as the highest-priority input. Staff engineer input overrides both architecture context and removed RFE context when they conflict, because it represents direct human expert judgment on this specific strategy.
When Staff Engineer / SME Input has content:
If the section contains only HTML comments, it has no actionable input — skip it.
Check for overlay files in .context/architecture-context/overlays/. If the directory exists, glob all *.md files (excluding README.md) and read their YAML frontmatter.
Filter for relevant overlays:
status must be active (ignore superseded)release list must contain the target RHOAI release (e.g., "3.5") or "all"affects list must intersect with the components mentioned in this strategy's ## Affected Components table. Overlays with affects: [platform] match any strategy.For each matched overlay, read its ## Fact and ## Impact on Strategies sections. Inject these into your refinement context alongside the architecture docs and other sources.
Priority: Overlays are human-authored corrections that are more recent than the generated architecture context. When an overlay contradicts the architecture docs, follow the overlay. Staff Engineer / SME Input still takes precedence over overlays when they conflict.
When overlays are applied, print which ones were used:
Overlays applied:
- 0001: KFP SDK updated to 2.16 in RHOAI 3.4
If no overlays directory exists or no overlays match, proceed without them.
Use the unified template in ${CLAUDE_SKILL_DIR}/strat-template.md. All sizes produce all sections — scale depth, not section count. Fill in:
## Business Need (from RFE) section serves as "The Why" in the Feature Refinement Template. Do not rename, duplicate, or paraphrase it.Each strategy file has three top-level sections with strict ownership rules:
| Section | Owner | Rules |
|---|---|---|
## Business Need (from RFE) | RFE (verbatim) | NEVER modify — character-for-character copy from the source RFE |
## Strategy (AI Generated by Agentic SDLC Pipeline) | Pipeline | Your content goes here. Regenerate on each run. |
## Staff Engineer / SME Input | Human | NEVER modify, remove, or reorder — read-only input for you |
On initial refinement, generate the ## Strategy section content. On revision runs, regenerate the ## Strategy section content informed by review feedback, Staff Engineer / SME Input, and removed RFE context. Never touch the other two sections.
Update the strategy file in artifacts/strat-tasks/ with the completed strategy. Only write within the ## Strategy (AI Generated by Agentic SDLC Pipeline) section. The ## Business Need (from RFE) and ## Staff Engineer / SME Input sections MUST remain untouched.
After writing the strategy content, update the frontmatter status:
python3 ${CLAUDE_SKILL_DIR}/scripts/frontmatter.py set artifacts/strat-tasks/<filename>.md \
status=Refined
If NOT in dry-run mode and the strategy has a real jira_key (not null), push the Strategy section to the RHAISTRAT issue in Jira. This updates only the Strategy section — the existing description (Business Need) is preserved.
python3 scripts/push_strategy.py RHAISTRAT-NNNN artifacts/strat-tasks/RHAISTRAT-NNNN.md
Then add the provenance label:
python3 -c "
import sys; sys.path.insert(0, 'scripts')
from jira_utils import add_labels, require_env
s, u, t = require_env()
add_labels(s, u, t, 'RHAISTRAT-NNNN', ['strat-creator-auto-refined'])
"
Print [JIRA] Strategy section pushed to RHAISTRAT-NNNN and [LABEL] strat-creator-auto-refined added to RHAISTRAT-NNNN.
If in dry-run mode, skip both and print [DRY RUN] Skipping Jira update for RHAISTRAT-NNNN.
$ARGUMENTS