Pragmap for VS Code
Pragmap turns golden-path function contracts into source-code tours inside VS Code.
Use it to explain and review the business-critical path through a codebase: checkout, signup, admin publishing, mobile capture flows, and other flows that agents or humans should not accidentally bypass.
What Pragmap does
Pragmap contracts live in .pragmap.yml files and point at source symbols that matter to a product flow. The VS Code extension reads those contracts and gives you an interactive tour through the code.
With the extension you can:
- browse Pragmap paths from the Explorer sidebar
- start a guided source tour for a selected path
- step forward and backward through required functions
- open the exact file and symbol for each step
- read product-facing step labels and descriptions in context
Quick start
- Install the extension.
- Open a workspace that contains a
.pragmap.yml file.
- Open the Explorer sidebar.
- Find the Pragmap view.
- Select a path and run Pragmap: Start Tour.
Example contract shape:
version: 1
paths:
checkout.success:
description: User submits checkout details and receives an order.
required:
- id: checkout.validate
label: Validate checkout
description: Confirms details are safe before an order is created.
file: src/checkout.ts
symbol: validateCheckout
order: 1
- id: checkout.create_order
label: Create order
description: Persists the order only after validation succeeds.
file: src/orders.ts
symbol: createOrder
order: 2
forbidden: []
Commands
- Pragmap: Refresh — reload Pragmap contracts from the workspace
- Pragmap: Start Tour — start a tour for the selected path
- Pragmap: Next Step — move to the next source step
- Pragmap: Previous Step — move to the previous source step
- Pragmap: End Tour — close the active tour
Works with Pragmap CLI
The extension is a companion to the Pragmap CLI. Use the CLI to scan, record, and verify golden paths:
npm install -D @pragmap/cli
npx pragmap verify checkout.success --contract .pragmap.yml --transform -- npm test
The extension focuses on reading and touring existing contracts in VS Code.
Current pre-release scope
This pre-release supports browsing and touring .pragmap.yml contracts in TypeScript/JavaScript-oriented workspaces, including the Next.js and React Native / Expo patterns Pragmap supports today.
Planned future work includes richer contract authoring, verification status in the editor, and deeper CLI integration.
Learn more