plugins/github-copilot-modernization/skills/clarifying-scenarios/SKILL.md
Evaluates whether a user's modernization/rewrite request provides enough scenario context to proceed (e.g., target component library, screenshots, design system for frontend; API contract policy, data migration strategy for backend). Produces a deterministic clarity score, asks the user for missing required fields via a structured form, and writes a canonical `clarification.md` artifact consumed by all downstream agents. Triggers: "clarification gate", "scenario clarification", "elicit missing context", "evaluate prompt completeness", "ask user for screenshots / target library / design system". NOT for: feature specification (use feature-inventory), planning (use creating-implementation-plan), implementation (use implementing-code), or resolving spec-time `[NEEDS CLARIFICATION]` markers (those remain owned by feature-inventory).
npx skillsauth add microsoft/github-copilot-modernization clarifying-scenariosInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Frontend rewrites in particular fail silently when the user prompt omits the target component library, screenshots, or compliance requirements. This skill catches those gaps before decomposition by:
clarification.md consumed by Foundation/Design/Plan agents.You receive these from the coordinator (via task metadata or dependencyArtifacts):
| Input | Source | Required |
|-------|--------|----------|
| userInput (raw user prompt) | task metadata | yes |
| classification (type, complexity, target, etc.) | coordinator §1 output | yes |
| project_facts (detected tech stack, frontend/backend presence) | coordinator §2.1 output | yes |
| interactive (boolean — is a TTY available?) | session env (default true) | no |
| Existing clarification.md (if any) | {{BASE_PATH}}/clarification.md | no |
Only one file is ever written to disk:
{{BASE_PATH}}/clarification.md ← canonical artifact (written only on READY)
The clarification form is never persisted to disk. When the gate needs user input, the skill renders the form inline (as the body of its return value) and the coordinator embeds it in the [wait] message shown to the user. The user's reply comes back through the next invocation's userInput / conversation context — not by editing a file. This eliminates a class of bugs where a stale form lingers on disk after clarification completes.
Decision tokens returned to the coordinator:
READY <path-to-clarification.md> — clarification.md written, ready to proceedNEEDS_INPUT — the body of this return value IS the form markdown; coordinator shows it to the user verbatim inside [wait]BLOCKED <reason> — inputs malformed or required info cannot be collectedApply the rules in references/scoring-rubric.md §"Step 1 — Scope Detection" to determine which kits apply:
frontend — load references/kit-frontend.mdbackend — load references/kit-backend.mdreferences/kit-generic.mdIf classification is direct or fix_bug, return READY with a minimal clarification.md that records scope: [] and clarity_score: 1.0. Do not run scoring.
For each field in each applicable kit, scan the userInput and project_facts for accepted evidence (per the kit's "Accepted evidence" list). Mark each field present or missing.
Be conservative: if you are unsure whether evidence is present, mark missing and let the user confirm. False positives are worse than asking.
Apply references/scoring-rubric.md §"Step 2-3" to compute per-kit scores and the overall pass/fail.
clarification.md).templates/clarification-form.md to identify the fields that need answers. Do not write anything to disk.userInput or project_facts — mark them as prefilled: true with the detected value so the coordinator can show them as pre-selected defaults.NEEDS_INPUT with the body as a JSON array of question objects. Each object has:
{
"id": "F2",
"question": "What target component / UI library should the new frontend use?",
"importance": "required",
"options": ["shadcn/ui", "Material UI", "Ant Design", "Chakra UI"],
"default": null,
"prefilled": false,
"prefilled_value": null
}
id: field identifier (F1–F10, B1–B5, G1–G3).question: human-readable question text (concise, one sentence).importance: required | recommended | optional.options: array of common choices (may be empty if free-text only). Include an "Other" option when applicable.default: the default value if skipped (null for required fields).prefilled: true if evidence was found in the user's input.prefilled_value: the detected value (null if not prefilled).When re-invoked with the user's collected answers (formatted as "F1: <answer>, F2: <answer>, ..." or free-text):
resolution: user, value = answer.resolution: user, value = confirmed value.required → resolution: default, value = the field's default-if-skipped.required → resolution: blocking, no value, append to blocking_gaps.rounds < 2, return NEEDS_INPUT again with only the still-missing fields as structured questions.rounds == 2 and gaps remain, apply defaults to all non-required missing fields and mark unfilled required fields as blocking_gaps. Proceed to Step 6.clarification.mdtemplates/clarification.md to {{BASE_PATH}}/clarification.md.generated_at: current UTC timescope: the detected scope listclarity_score: the final overall scorerounds: number of clarification rounds takengaps: every field where resolution != userblocking_gaps: every required field with resolution == blockingREADY <path>.No cleanup step needed. Because the form was never written to disk, there is nothing to delete. This is the single source-of-truth file for clarification state.
When interactive == false (no TTY, --yes flag, CI run):
default-if-skipped to every missing non-required field.BLOCKED missing required fields: <list>. The coordinator decides whether to fail or proceed with risks.Maximum 2 clarification rounds per session. After round 2, defaults are applied automatically — the user is not asked a third time.
Given the same userInput, classification, and project_facts, this skill must produce the same clarity_score and the same set of asked fields. Do not introduce randomness or model-driven judgement at the scoring step — only at the evidence-extraction step (where light interpretation of natural language is unavoidable).
references/kit-frontend.md — full frontend field setreferences/kit-backend.md — backend field set (v1 skeleton)references/kit-generic.md — baseline fields (always applied)references/scoring-rubric.md — scoring algorithm and pass thresholdstemplates/clarification-form.md — user-facing questionnairetemplates/clarification.md — canonical artifact schema (clarification/v1)tools
Lifecycle hooks for the modernize-rearchitecture coordinator. Defines hook points, registered actions, and execution rules.
development
Provides role charters (mission, ownership, core principles, quality bar) for a multi-agent coding team. Each charter defines the role's mission, ownership scope, core principle (boundary constraints), and quality bar. Most roles also include communication rules. Consumed by the coordinator during task decomposition to assign work to the correct role. Triggers: "look up role charter", "what does the architect own", "check role boundaries", "find team roles", "which role handles X", "list agent charters", "role responsibilities". NOT for: task decomposition (use breaking-down-tasks), implementation (use implementing-code), architecture analysis (use analyzing-architecture).
tools
Zero-dependency shell recon for any code repository — detect languages, count LOC, and report project scale. Pure POSIX find/wc or PowerShell, no Python or third-party tools required. Triggers: "how big is this project", "what languages", "project sizing", "repo recon", "LOC count", "scope check".
data-ai
Discovers valid migration plans in the workspace and returns the selected plan path. A valid plan is a subdirectory of .github/modernize/ that contains plan.md AND tasks.json (tasks.json may be in the plan folder or in a .metadata subfolder). Handles 0, 1, or multiple plans and prompts the user when a choice is needed. Triggers: "list plans", "find plans", "select plan", "list-and-select-plan", "discover plans".