Visual Spec Skill
Analyzes visual specifications based on user input and turns brief business requests into structured requirement output.
When to Use
Invoke this skill when:
- Business side provided a very simple described requirements.
- User runs to start a new requirement analysis flow.
What This Skill Defines
- Fill in details based on scenario-based-facilitation method.
- Design the data models.
- Generate UI mockups based on the details filled in.
- Generate business logic details in visual formats.
Commands
Use this command to create a new requirement analysis session.
Language:
- Read (supports , , ; default to if missing/invalid).
- If the command argument or input explicitly provides , use that value for this run and update to it (update only that field). should be treated as an alias of .
- When , all headings in
/specs/background/original.md
must be English; normalize any non-English headings to:
, , , , , , , , .
Flow:
0. Ensure
exists, and ensure subfolders exist:
- Do NOT create (it is deprecated).
0.2 If the user passes in the command arguments, set to that value (update only that field, keep other fields and formatting unchanged). should be treated as an alias of .
0.5 Create editable project constraints so the user can tweak them early (do not overwrite if they already exist):
- Create with defaults (prototype stack selection + catalog) if missing
- Create
/prototype_ui_convention.md
(same directory as ) if missing
- Ask the user to input the original requirement.
- When the user presses Enter, treat the input as the raw requirement source.
- Load the prompt file at
prompts/vspec_new/background.md
.
- Use that prompt to analyze the requirement and expand the business context.
- Write the raw requirement and background analysis output to
/specs/background/original.md
.
5.5 Create /specs/background/question_and_answer.html
by copying prompts/vspec_new/question_and_answer.html
(single-file HTML with inline CSS/JS) so the user can answer questions and write back to markdown.
- Ask the user to answer the questions from the Open Questions section (use the section title in the selected language). The user should answer via
/specs/background/question_and_answer.html
(select /specs/background/original.md
in the page and save back), then reply with a continuation signal (e.g. / ). Then STOP. Do not load any subsequent prompts or generate any further artifacts before that.
- After the user replies (answers or confirmed), load
prompts/vspec_new/stakeholders.md
to analyze stakeholders.
- Write the stakeholder result to
/specs/background/stakeholder.md
(markdown table).
- Load
prompts/vspec_new/roles.md
to analyze system user roles (direct users) and their work tasks.
- Write the roles result to
/specs/background/roles.md
.
- Load
prompts/vspec_new/terms.md
to extract key terms and definitions.
- Write the terms result to
/specs/background/terms.md
(markdown table).
- Load
prompts/vspec_new/flows.md
to analyze business workflows and generate PlantUML swimlane diagrams.
- Write the diagrams to .
- Load
prompts/vspec_new/scenarios.md
to enumerate business scenarios by node combinations.
- Write the scenarios result to
/specs/background/scenarios.md
(markdown table).
- Load
prompts/vspec_new/details_pre_post.md
to create per-node detail folders and generate for each node.
- Load
prompts/vspec_new/details_constraints.md
to generate for each node.
- Load
prompts/vspec_new/details_variations.md
to generate for each node.
- Load
prompts/vspec_new/details_boundaries.md
to generate for each node.
- Load
prompts/vspec_new/details_symmetry.md
to generate for each node.
- Ensure the per-node outputs are written under
/specs/background/scenario_details/
.
- Load
prompts/vspec_new/dependencies.md
to analyze external dependency systems.
- Write the dependencies result to
/specs/background/dependencies.md
.
- Load
prompts/vspec_new/functions.md
to generate feature/function lists grouped by modules and external dependency systems.
- Write the function lists to .
- Load
prompts/vspec_new/questions.md
to generate question lists and required business materials.
- Write the questions result to
/specs/background/questions.md
(markdown list).
- Load
prompts/harness/post_new_verify.md
to validate whether functions and scenario_details are complete (login/config/master-data/approval). If it outputs any issues, show the issue list and stop.
- Return the structured analysis result and continue to the next requirement-design step.
Use this command to generate an interview outline / survey questionnaire for user research and requirement validation.
Flow:
- Load
prompts/vspec_interview/interview.md
.
- Generate the questionnaire markdown and write it to
/docs/current/interview_questionnaire.md
.
Use this command to generate a Word-openable
(single-file HTML) version of the interview questionnaire.
Flow:
- Ensure
/docs/current/interview_questionnaire.md
exists; if missing, ask the user to run first.
- Load
prompts/vspec_interview/interview_word.md
.
- Write the Word file to
/docs/current/interview_questionnaire.docx
.
Use this command to refine and update the requirement based on refine materials stored under
, or based on one or more input files/directories provided as command arguments.
Flow:
0. Ensure
exists and is non-empty; if missing, stop and ask the user to run
first.
- Read refine inputs:
- If command arguments are provided, treat them as refine input sources (files/directories).
- Otherwise:
- Prefer (if present).
- If is missing, ask the user to paste the refinement content (what to change) in the prompt window, and treat that pasted content as the refine input.
- You may additionally read as supporting materials when explicitly referenced/needed (prefer
/docs/refine/file_list.md
if present; else read files in name order).
- If
prompts/vspec_refine/refine.md
is missing, stop immediately and do nothing.
- Load
prompts/vspec_refine/refine.md
to apply the refinement, update the canonical requirement, and update impacted artifacts.
- Append the refinement result to
/specs/background/original.md
, and update impacted and accordingly; if exists and is non-empty, sync-update impacted backend code as well.
Use this command to refine and update the requirement based on answered questions.
Flow:
- If
/specs/background/questions.md
is missing, stop immediately and do nothing.
- If
/specs/background/questions.md
contains no pending/unanswered questions, stop immediately and do nothing.
- Read
/specs/background/questions.md
and pick answered items.
- Load
prompts/vspec_refine/refine_q.md
to merge answers into the canonical requirement.
- Append the refinement result to
/specs/background/original.md
.
- Update
/specs/background/questions.md
to mark items that are treated as answered in this run:
- Wrap the answer and status values with (use the field names in the selected language) so answered items are visually highlighted.
Use this command to generate more clarification questions and append them to
/specs/background/questions.md
.
Flow:
- If
/specs/background/questions.md
is missing, stop and ask the user to run first.
- Load
prompts/vspec_more_q/more_q.md
to generate additional questions (avoid duplicates and continue numbering).
- Append the new items to
/specs/background/questions.md
(do not rewrite existing items).
- Provide a clear instruction for the user to answer the questions and then run .
Use this command to expand requirement details based on the function list.
Language:
- Read (supports , , ; default to if missing/invalid).
- All generated spec documents under must use the selected language consistently (headings, tables, field descriptions, statuses, button names, messages).
Flow:
- Read the feature/function list from .
- You must iterate every function row across all files under (not just core.md), so no module or external-system function is missed.
- Read supporting artifacts when available: , ,
/specs/background/scenario_details/
, /specs/background/roles.md
, and existing (if any).
- For each function (page or non-page job), first determine which detail artifacts are actually involved, then only generate those artifacts; do not generate documents for non-involved parts.
- Coverage requirement: for every function row you iterate, you must generate at least and . If you cannot, output an explicit error and stop (do not silently skip).
- Step type requirement: you must determine the step type from the function row (e.g. terminal type / page vs backend vs job), and generate the corresponding logic artifacts; do not skip logic:
- For / / steps: always generate and .
- For steps: always generate (service logic: inputs/outputs, rules, states, APIs/events, errors, idempotency).
- For steps: always generate (job logic: trigger/schedule, data scope, retries/compensation, observability, failure handling).
- Always generate the baseline docs:
- : RBAC permissions down to page areas and controls.
- : data permission rules and scope.
- Page-only:
- : page loading logic.
- : page interaction logic.
- : validation logic in matrix format (only for submit-type pages/actions; if the page has no submit/save/approve/reject/cancel/change actions, skip).
- : checks after submit (if the page has submit).
post_submit_processing.md
: processing logic after submit (if the page has submit).
post_submit_navigation.md
: post-submit return and navigation (if the page has submit).
- Conditional (generate only if involved by the current function’s logic/scenarios/models/dependencies):
- : operation/audit logging (only when the business requires change history retention, compliance audit, or non-repudiation; otherwise skip).
- : decision matrix (决策矩阵) for operation availability under each status (if there is a status machine and operations vary by status/role).
- : notifications (if there is any notification requirement).
- : MQ topics/events/message schema/reliability details (if there is async events, queues, or cross-system eventing).
- : file import details (if there is any import entry/requirement).
- : file export details (if there is any export entry/requirement).
- : calculation formulas and metric semantics (if there are any calculations/metrics).
- : expression tree (HTML) (if there is multi-level nested branching logic).
- : numbering/code generation rules (if any codes/serial numbers are generated/assigned).
- : payment and refund details (if there is any payment/refund/settlement/reconciliation logic).
- : account/login details (if there is any non-SSO login/account/password flow).
- : judgemental matrix (判定矩阵) for multi-factor logic branching (if 2+ factors jointly decide outcomes).
- Module-level (generate at most once per module, and only if involved):
- : time-axis visualization (HTML) for overall flow impact analysis (only when there is long time-span logic that affects flow decisions, e.g. effective/expiry, deadlines, grace periods, cross-day rules).
- : status list + transitions + PlantUML state diagram (overall; not per function).
- : non-functional requirements summary for the module (overall; not per function).
- : scheduled jobs summary for the module (overall; not per function).
- Write only the generated (involved) detail documents:
- Per-function:
/specs/details/<module_slug>/<logic_type>/<function_slug>.(md|html)
- Module-level:
/specs/details/<module_slug>/<logic_type>/<module_slug>.(md|html)
- Load
prompts/vspec_detail/index.md
to generate a single-page viewer /specs/details/reader.html
:
- Left: directory tree based on
- Right: markdown-rendered reading pane
- Render PlantUML diagrams (do not show raw PlantUML text)
Use this command to generate a Word document (Word-openable single-file
in HTML format) that aggregates the requirement detail artifacts into a deliverable doc, and write it under
.
Language:
- Read (supports , , ; default to if missing/invalid).
- The generated Word document must use the selected language consistently (titles, headings, field labels, table headers).
Flow:
- Ensure exists.
- Read the existing artifacts when available:
- Canonical requirement:
/specs/background/original.md
- Function list:
- Detail specs:
- Roles & permissions:
/specs/background/roles.md
, /specs/details/**/rbac.md
- Data permission:
/specs/details/**/data_permission.md
- Scenarios & flows:
/specs/background/scenarios.md
, /specs/background/scenario_details/**
,
- Dependencies:
/specs/background/dependencies.md
- Models:
- Load and generate the doc as a Word-openable single HTML file.
- Write the output file to:
/docs/current/requirement_detail.docx
.
Use this command to generate models and a runnable prototype for validation.
Language:
- Read (supports , , ; default to if missing/invalid).
- Generate docs and all prototype UI copy in the selected language consistently.
Flow:
0. Ensure
exists and is non-empty; if missing, stop and output the prerequisite message: “Run /vspec:detail to generate /specs/details/ before /vspec:verify”.
- If
/specs/background/questions.md
exists and contains unanswered questions, ask the user to answer them before continuing (allow skip per question, but ensure none remains unanswered).
- Load
prompts/vspec_verify/model.md
to generate data models.
- Write model files to .
- Generate a runnable page prototype based on functions, details, models, and roles; the prototype tech stack can be selected via (auto-created with defaults if missing).
- Load
prompts/vspec_verify/prototype.md
for the prototype generation rules (must follow stack; do not output html-only).
- Write the prototype to .
- Load
prompts/harness/post_verify_stack_verify.md
to validate whether the prototype frontend stack matches . If it outputs any issues, show the issue list and stop.
- Load
prompts/vspec_verify/validation.md
to generate a scenario validation web page.
- Write the validation page to and provide a entry for access.
- Load
prompts/vspec_verify/entries.md
to generate an entry page and write it to /specs/prototypes/entries.html
(do not link it from any menu/header).
- Load
prompts/harness/post_verify_mobile_selection_check.md
to ensure mobile data selection uses a picker page (list-based), not dropdown Select. If it outputs any issues, show the issue list and stop.
- Load
prompts/harness/post_verify_price_format_check.md
to validate money/price formatting (right aligned, 2 decimals, thousand separators). If it outputs any issues, show the issue list and stop.
- Load
prompts/harness/post_verify_click_check.md
to detect clickable UI elements that do nothing. If it outputs any issues, show the issue list and stop.
- Load
prompts/harness/post_verify_verify.md
to validate the prototype completeness. If it outputs any issues, show the issue list and stop.
Use this command to run a quality check on the generated requirement artifacts under
.
Note: The Pro edition supports broader quality checks (e.g. more post-run prototype/implementation verifications) and requires a paid plan.
Language:
- Read (supports , , ; default to if missing/invalid).
- The QC report must use the selected language consistently.
Flow:
- Read built-in standard at
prompts/vspec_qc/quality_standard.md
.
- If a requirement quality error book exists under project , generate/update project root based on it.
- If project root exists, merge it as supplementary/overriding standard.
- Load and generate a non-conformance checklist.
- Write the report to .
Use this command to generate acceptance test cases.
Language:
- Read (supports , , ; default to if missing/invalid).
- All acceptance documents under must use the selected language consistently.
Flow:
- Read ,
/specs/background/scenarios.md
, /specs/background/scenario_details/
, /specs/background/roles.md
, .
- Load
prompts/vspec_accept/accept.md
to generate acceptance test cases covering core flows, exceptions, boundary, permissions, and data scope.
- Write results to (one subfolder per function) and generate an index at
/specs/acceptance/index.md
.
Use this command to generate automation test code based on acceptance cases and specs.
Language:
- Read (supports , , ; default to if missing/invalid).
- Test case titles/descriptions should follow the selected language as much as possible.
Flow:
- Read , , , and detect the existing test frameworks in the repository.
- Load
prompts/vspec_test/test.md
to generate automation tests using the existing frameworks and conventions.
- Write test code to the project test directories (or if no standard exists) and ensure it can run with existing scripts.
- Load
prompts/harness/post_append_test_coverage_check.md
to verify whether test coverage is sufficiently complete; if it outputs any issues, continue.
- If issues exist, rerun once focusing only on the missing items from the issue list, then rerun the coverage check.
- If issues still exist after the second coverage check, show the issue list and stop.
- This command generates/adds tests to improve coverage; it does not execute test commands.
Use this command to generate integrated frontend/backend code based on the specs.
Flow:
- Read , , ,
/specs/background/dependencies.md
, and detect the current frontend/backend stacks and code conventions.
- Load
prompts/vspec_impl/implement.md
and implement backend-first: generate a runnable backend project under (health check + core APIs/services), then generate frontend integration after backend APIs are available.
- Write code only under with minimal diffs and keep it reviewable; backend must be under and prototype frontend under .
- Load
prompts/harness/post_impl_verify.md
to validate backend MVC structure and test coverage. If it outputs any issues, show the issue list and stop.
Use this command to upgrade/retrofit requirements based on materials stored under
(
for legacy system,
for new inputs), and regenerate the
artifacts in the same structure as
.
Language:
- Read (supports , , ; default to if missing/invalid).
- All regenerated artifacts must use the selected language consistently.
Flow:
- Ensure the input entry file exists at
/docs/current/file_list.md
; if missing, generate it with the expected input list template.
- Read
/docs/current/file_list.md
, then read the listed sources under (typically , , optionally , , ) in order and extract structured information (functions, dependencies, UI style, roles/permissions, technical spec). Additionally, you must recursively scan and all its subdirectories and treat those documents as raw input materials (even if they are not explicitly listed yet); when you find legacy files not in , append them into /docs/current/file_list.md
and then read them.
- If
/specs/background/original.md
exists, treat it as the current canonical requirement and use it as baseline for diff (inherit/new/change/deprecate).
- Load
prompts/vspec_upgrade/upgrade.md
and generate/update artifacts under , reusing output conventions.
- Sync extracted technical spec into so it can be used by and .
Use this command to break down requirements, estimate efforts, and schedule via a user story map.
Language:
- Read (supports , , ; default to if missing/invalid).
- Both
/specs/plan/plan_estimate.md
and /specs/plan/plan_schedule.html
must use the selected language consistently.
Flow:
- Read ,
/specs/background/roles.md
, /specs/background/scenarios.md
, , /specs/background/dependencies.md
.
- Load
prompts/vspec_plan/estimate.md
to generate estimates aligned to the function list.
- Write estimates to
/specs/plan/plan_estimate.md
.
- Load
prompts/vspec_plan/schedule.md
to generate the schedule and delivery map.
- Write schedule HTML to
/specs/plan/plan_schedule.html
.
Use this command to generate a market research and product positioning pack (MRD): market landscape, competitor analysis, user positioning, and product design notes.
Flow:
- Ensure exists.
- Read baseline artifacts when available:
/specs/background/original.md
, /specs/background/roles.md
, /specs/background/terms.md
, /specs/background/scenarios.md
, , /specs/background/dependencies.md
, and (if any).
- Load .
- Write outputs to:
/docs/market/competitors.md
/docs/market/product_design.md
Prompt Files
prompts/vspec_new/background.md
: the prompt used right after receives the raw requirement.
prompts/vspec_interview/interview.md
: the prompt used by to generate /docs/current/interview_questionnaire.md
.
prompts/vspec_interview/interview_word.md
: the prompt used by to generate /docs/current/interview_questionnaire.docx
(Word-openable single-file HTML).
prompts/vspec_new/stakeholders.md
: the prompt used after the user answers to generate /specs/background/stakeholder.md
.
prompts/vspec_new/roles.md
: the prompt used after stakeholder analysis to generate /specs/background/roles.md
.
prompts/vspec_new/terms.md
: the prompt used after roles analysis to generate /specs/background/terms.md
.
prompts/vspec_new/flows.md
: the prompt used after terms analysis to generate .
prompts/vspec_new/scenarios.md
: the prompt used after flows analysis to generate /specs/background/scenarios.md
.
prompts/vspec_new/details_pre_post.md
: the prompt used after scenarios analysis to generate per-node under /specs/background/scenario_details/
.
prompts/vspec_new/details_constraints.md
: the prompt used after Pre/Post to generate per-node under /specs/background/scenario_details/
.
prompts/vspec_new/details_variations.md
: the prompt used after Constraints to generate per-node under /specs/background/scenario_details/
.
prompts/vspec_new/details_boundaries.md
: the prompt used after Variations to generate per-node under /specs/background/scenario_details/
.
prompts/vspec_new/details_symmetry.md
: the prompt used after Boundaries to generate per-node under /specs/background/scenario_details/
.
prompts/vspec_new/dependencies.md
: the prompt used after details analysis to generate /specs/background/dependencies.md
.
prompts/vspec_new/functions.md
: the prompt used after dependencies analysis to generate .
prompts/vspec_new/questions.md
: the prompt used after functions analysis to generate /specs/background/questions.md
.
prompts/vspec_more_q/more_q.md
: the prompt used by to append more questions to /specs/background/questions.md
.
- : the prompt used by to generate market/user/competitor/product docs under .
prompts/vspec_refine/refine.md
: the prompt used by to refine the requirement based on .
prompts/vspec_refine/refine_q.md
: the prompt used by to refine the requirement based on answered questions.
- : the prompt used by to generate a Word-openable (HTML) requirement detail document under .
prompts/vspec_verify/model.md
: the prompt used by to generate .
prompts/vspec_verify/prototype.md
: the prompt used by to generate the stack-selected runnable prototype under (must follow ).
prompts/vspec_verify/validation.md
: the prompt used by to generate the validation web page with a entry.
prompts/vspec_detail/rbac.md
: the prompt used by to generate RBAC detail docs.
prompts/vspec_detail/data_permission.md
: the prompt used by to generate data permission detail docs.
prompts/vspec_detail/page_load.md
: the prompt used by to generate page loading logic docs.
prompts/vspec_detail/interaction.md
: the prompt used by to generate page interaction logic docs.
prompts/vspec_detail/index.md
: the prompt used by to generate /specs/details/reader.html
as a markdown/PlantUML-rendered viewer.
prompts/vspec_detail/index.html
: the fixed HTML template used by to stabilize /specs/details/reader.html
generation (directory tree + markdown renderer).
prompts/vspec_detail/timeline.md
: the prompt used by to generate time-axis HTML docs.
prompts/vspec_detail/formula.md
: the prompt used by to generate formula docs.
prompts/vspec_detail/expression_tree.md
: the prompt used by to generate expression tree docs.
prompts/vspec_detail/code_rules.md
: the prompt used by to generate numbering/code rules docs.
prompts/vspec_detail/judgemental_matrix.md
: the prompt used by to generate decision matrix docs.
prompts/vspec_detail/validation_matrix.md
: the prompt used by to generate validation matrix docs.
prompts/vspec_detail/post_submit_check.md
: the prompt used by to generate post-submit checks docs.
prompts/vspec_detail/post_submit_processing.md
: the prompt used by to generate post-submit processing docs.
prompts/vspec_detail/post_submit_navigation.md
: the prompt used by to generate post-submit navigation docs.
prompts/vspec_detail/mq.md
: the prompt used by to generate MQ message design docs.
prompts/vspec_detail/message_queue.md
: the prompt used by to generate message queue design docs.
prompts/vspec_detail/cache.md
: the prompt used by to generate cache design docs.
prompts/vspec_detail/service_logic.md
: the prompt used by to generate backend service logic docs for steps.
prompts/vspec_detail/job_logic.md
: the prompt used by to generate job logic docs for steps.
prompts/vspec_detail/logging_matrix.md
: the prompt used by to generate logging matrix docs.
prompts/vspec_detail/notification_matrix.md
: the prompt used by to generate notification matrix docs.
prompts/vspec_detail/nfp.md
: the prompt used by to generate non-functional requirements docs.
prompts/vspec_detail/file_import.md
: the prompt used by to generate file import docs.
prompts/vspec_detail/file_export.md
: the prompt used by to generate file export docs.
prompts/vspec_detail/cron_job.md
: the prompt used by to generate scheduled job docs.
prompts/vspec_accept/accept.md
: the prompt used by to generate acceptance test cases.
prompts/vspec_test/test.md
: the prompt used by to generate automation test code.
prompts/vspec_impl/implement.md
: the prompt used by to generate integrated frontend/backend code.
prompts/vspec_upgrade/upgrade.md
: the prompt used by to generate upgraded specs from inputs.
prompts/vspec_plan/estimate.md
: the prompt used by to generate /specs/plan/plan_estimate.md
.
prompts/vspec_plan/schedule.md
: the prompt used by to generate /specs/plan/plan_schedule.html
.
- : the prompt used by to generate .
prompts/vspec_qc/quality_standard.md
: built-in quality standard used by .
Suggested Workflow
- Install this skill.
- Run .
- Ask the user to input the original requirement and wait for Enter.
- Load
prompts/vspec_new/background.md
and start requirement analysis.
- Ask the user to answer .
- Load
prompts/vspec_new/stakeholders.md
and generate /specs/background/stakeholder.md
.
- Load
prompts/vspec_new/roles.md
and generate /specs/background/roles.md
.
- Load
prompts/vspec_new/terms.md
and generate /specs/background/terms.md
.
- Load
prompts/vspec_new/flows.md
and generate .
- Load
prompts/vspec_new/scenarios.md
and generate /specs/background/scenarios.md
.
- Load
prompts/vspec_new/details_pre_post.md
and generate per-node under /specs/background/scenario_details/
.
- Load
prompts/vspec_new/details_constraints.md
and generate per-node under /specs/background/scenario_details/
.
- Load
prompts/vspec_new/details_variations.md
and generate per-node under /specs/background/scenario_details/
.
- Load
prompts/vspec_new/details_boundaries.md
and generate per-node under /specs/background/scenario_details/
.
- Load
prompts/vspec_new/details_symmetry.md
and generate per-node under /specs/background/scenario_details/
.
- Load
prompts/vspec_new/dependencies.md
and generate /specs/background/dependencies.md
.
- Load
prompts/vspec_new/functions.md
and generate .
- Load
prompts/vspec_new/questions.md
and generate /specs/background/questions.md
.
- Follow the generated analysis steps to continue the project.
Output Goal
- Clarify business objective and core user scenario.
- Identify key roles, page modules, and interaction flow.
- Extract entities and main data fields.
- Produce a visual-spec-oriented requirement draft for the next step.