From vista
Reverse-engineer an existing codebase into Vista planning artifacts, or convert old Vista features into the current arch schema.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vista:legacyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reverse-engineer an existing codebase into Vista planning artifacts (domain requirements + architecture diagrams), or convert old-format Vista features into the current `/arch` planning schema.
Reverse-engineer an existing codebase into Vista planning artifacts (domain requirements + architecture diagrams), or convert old-format Vista features into the current /arch planning schema.
/vista:legacy <feature-name>
/vista:adduiFlows, dataModels, dataFlow, services) into the new arch/ directory format with native .mmd diagramsCreate the feature directory if it doesn't exist:
python vista/scripts/setup-feature.py --name $ARGUMENTS
If the directory already exists, proceed. Existing files won't be overwritten.
Check docs/<name>/ for pre-existing documentation:
domain-requirements.md — Domain requirements (may be template-only)arch/_arch.json — Architecture manifest (may be empty)arch/*.mmd — Any existing diagramsspecs/*.md — Any specification documentsIMPLEMENTATION_PLAN.md — Implementation plan (may be template-only)<name>_plan.json — Old-format plan JSON (check for inline architecture sections)<name>_prd.json — Old-format PRD JSONAGENTS.md — Old build agent config (deprecated)Report what was found.
Detect mode: If the feature directory contains a <name>_plan.json with any of these inline sections — uiFlows, dataModels, dataFlow, services — this is an old-format Vista feature that needs conversion. Follow Path A: Convert Old Vista Feature below.
Otherwise, this is a fresh reverse-engineering task. Follow Path B: Reverse-Engineer from Source Code.
Use this path when a <name>_plan.json exists with inline architecture sections.
Read <name>_plan.json and extract data from the inline sections:
| Plan JSON Section | What to Extract |
|---|---|
uiFlows.screens | Screen names, components, descriptions, entry points |
uiFlows.transitions | Screen-to-screen navigation triggers and conditions |
dataModels.entities | Entity names, fields, types, relationships |
dataFlow | API endpoints, request/response sequences, data pipelines |
services | Service names, responsibilities, dependencies, integrations |
Also read <name>_prd.json if present — it may contain additional context (success criteria, test scenarios, functional requirements) that enriches diagram generation.
Convert the extracted sections into native Mermaid .mmd files in arch/:
| Source Section | Output Diagram | Diagram Type |
|---|---|---|
services + overall structure | system-architecture.mmd | flowchart — Components, services, and their relationships |
uiFlows.screens + transitions | user-flow.mmd | flowchart — Screen navigation and user journeys |
dataModels.entities | data-model.mmd | er — Entity-relationship diagram with fields |
dataFlow (per key flow) | sequence-{flow}.mmd | sequence — Request/response sequences between components |
| Stateful components (if any) | state-{component}.mmd | state — State transitions |
Follow the same Mermaid conventions as /vista:plan Step 3:
Set all diagram descriptions to note they are "converted from old-format plan JSON" so reviewers know the source.
Write arch/_arch.json referencing all generated diagrams (conforming to vista/templates/arch-schema.json):
{
"feature": "<name>",
"diagrams": [
{
"name": "System Architecture",
"file": "system-architecture.mmd",
"type": "mermaid",
"diagramType": "flowchart",
"category": "architecture",
"description": "System components and relationships (converted from old-format plan JSON)"
}
]
}
Update the <name>_plan.json to reference the new arch directory:
architecture section with "ref": "./arch/_arch.json"uiFlows, dataModels, dataFlow, servicesmeta and implementationPhases intactThe updated plan JSON should conform to vista/templates/plan-schema.json.
Check for and remove deprecated artifacts:
AGENTS.md — Old build agent config, no longer used<name>_preview.html — Old preview file (the web dashboard replaces this)Ask the user before deleting anything.
If domain-requirements.md is template-only or sparse, enrich it using data from:
<name>_prd.json) — Extract user stories, success criteria, functional requirementsMark any inferred content as "backfilled from old-format artifacts."
Discover the dashboard URL by calling the ralph_providers MCP tool and reading dashboard_url from the response.
Tell the user:
Conversion complete — summarize what was converted:
Review diagrams in the web dashboard:
<dashboard_url>/project/<project-id>/arch/<feature-name>
Use the AI chat panel to discuss and iterate on diagrams.
Pay special attention to:
Next steps:
/vista:tdd <name> — Generate TDD diagrams for heavy-logic components/vista:specs <name> — Generate or regenerate specifications/vista:add <name> — Extend the feature with new capabilitiesUse this path when no old-format plan JSON exists (or it has no inline architecture sections).
Use subagents to scan the actual codebase for implementation artifacts. Search for:
Data Models / Entities:
Services / Business Logic:
UI Components:
Data Flow:
Ask the user for guidance on where to look if the codebase structure is unclear.
Organize discovered code into architectural categories:
Present the categorized findings to the user for validation before proceeding.
Generate Mermaid .mmd files in arch/ from the categorized findings:
system-architecture.mmd — Flowchart of discovered components and their relationshipsuser-flow.mmd — Flowchart of discovered user journeysdata-model.mmd — ER diagram of discovered entities and relationshipssequence-{flow}.mmd — Sequence diagrams for key interaction flowsstate-{component}.mmd — State diagrams for stateful components (if any)Write arch/_arch.json manifest referencing all generated diagrams (conforming to vista/templates/arch-schema.json).
Set all diagram descriptions to note they are "reverse-engineered from existing codebase" so reviewers know these are inferences.
Fill in domain-requirements.md from code analysis:
Mark all backfilled content clearly as "reverse-engineered" so reviewers know these are inferences.
Discover the dashboard URL by calling the ralph_providers MCP tool and reading dashboard_url from the response.
Tell the user:
Review diagrams in the web dashboard:
<dashboard_url>/project/<project-id>/arch/<feature-name>
Use the AI chat panel to discuss and iterate on diagrams.
Or review directly by reading the .mmd files in the terminal.
Pay special attention to:
Next steps:
/vista:tdd <name> — Generate TDD diagrams for flagged heavy-logic components/vista:specs <name> — Generate specifications from the reverse-engineered artifacts/vista:add <name> — Extend the feature with new capabilitiesAfter legacy import (either path):
docs/<name>/
├── arch/
│ ├── _arch.json # Diagram manifest
│ ├── system-architecture.mmd # Components and relationships
│ ├── user-flow.mmd # User journeys
│ ├── data-model.mmd # Entity-relationship diagram
│ ├── sequence-*.mmd # Interaction flows
│ └── state-*.mmd # State machines (if any)
├── specs/ # Existing or empty (populated by /vista:specs)
├── domain-requirements.md # Backfilled or enriched
├── progress.txt # Progress tracking
└── IMPLEMENTATION_PLAN.md # Template (populated by Ralph loops)
Removed after conversion (Path A only):
AGENTS.md — Deprecated build agent config<name>_preview.html — Replaced by web dashboard<name>_plan.json (uiFlows, dataModels, dataFlow, services)npx claudepluginhub ribeec20/vista-marketplace --plugin vistaCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.