visionspec

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2026 License: MIT

README ΒΆ

VisionSpec

Go CI Go Lint Go SAST Go Report Card Docs Docs Visualization License

Multi-domain specification orchestration for humans and AI agents.

Overview

VisionSpec bridges the gap between organizational intent and executable specifications for AI coding agents. It implements Amazon's Working Backwards methodology to ensure every requirement traces back to a specific customer outcome.

Key Capabilities:

  • πŸ“£ Working Backwards flow - Start with vision (Press Release), derive requirements (PRD)
  • 🎯 Methodology profiles - AWS, Google, Stripe, Lean Startup, Design Thinking, JTBD
  • ✍️ Domain-specific authoring - Separate specs for PM, UX, Engineering
  • βš™οΈ LLM synthesis - Generate Press, FAQ, PRD, TRD, TPD, IRD from source specs
  • πŸ“Š Structured evaluation - Per-domain LLM judges with customizable rubrics
  • πŸ”„ Reconciliation - Conflict detection and tradeoff resolution
  • πŸ“¦ Target adapters - Export to SpecKit, GSD, GasTown, GasCity, OpenSpec

All synthesized documents are committed to git and can be reviewed, edited, and refined by humans or collaboratively with AI assistants.

Installation

go install github.com/ProductBuildersHQ/visionspec/cmd/visionspec@v0.5.0

Quick Start

# Initialize a new project
visionspec init user-onboarding

# Validate project structure
visionspec lint

# Check project status
visionspec status
visionspec status --format json
visionspec status --format html > status.html

Directory Structure

docs/specs/
β”œβ”€β”€ CONSTITUTION.md                    # Repo-level governance
β”œβ”€β”€ ROADMAP.md                         # Cross-project priorities
└── {project}/                         # kebab-case project name
    β”œβ”€β”€ source/                        # Human-authored specs
    β”‚   β”œβ”€β”€ mrd.md
    β”‚   β”œβ”€β”€ prd.md
    β”‚   └── uxd.md
    β”œβ”€β”€ gtm/                           # LLM-generated GTM docs
    β”‚   β”œβ”€β”€ press.md
    β”‚   β”œβ”€β”€ faq.md
    β”‚   └── narrative.md
    β”œβ”€β”€ technical/                     # LLM-generated technical docs
    β”‚   β”œβ”€β”€ trd.md
    β”‚   β”œβ”€β”€ tpd.md
    β”‚   └── ird.md
    β”œβ”€β”€ eval/                          # All evaluations
    β”‚   β”œβ”€β”€ mrd.eval.json
    β”‚   β”œβ”€β”€ prd.eval.json
    β”‚   └── ...
    β”œβ”€β”€ .graphize/                     # Requirement graph
    β”œβ”€β”€ spec.md                        # Reconciled execution spec
    β”œβ”€β”€ current-truth.md               # Post-ship state
    β”œβ”€β”€ status.html                    # Readiness report
    β”œβ”€β”€ index.md                       # MkDocs page
    └── visionspec.yaml                 # Configuration

Working Backwards Flow

VisionSpec implements Amazon's Working Backwards methodology. Instead of starting with requirements and hoping they lead to a good customer experience, you start with the vision and work backwards:

1. MARKET PROBLEM (human-authored)
   mrd.md
       ↓
2. WORKING BACKWARDS (synthesized, editable)
   press.md  β†’  faq.md  β†’  prd.md
   (vision)     (scope)    (requirements)
       ↓
3. STAKEHOLDER REVIEW (synthesized, editable)
   narrative-1p.md / narrative-6p.md
       ↓
4. USER EXPERIENCE (human-authored)
   uxd.md
       ↓
5. TECHNICAL SPECS (synthesized, editable)
   trd.md  β†’  tpd.md  β†’  ird.md
   (design)   (tests)    (infra)
       ↓
6. RECONCILIATION
   All approved specs β†’ spec.md
       ↓
7. AI EXECUTION
   spec.md β†’ SpecKit | GSD | GasTown | GasCity
       ↓
8. POST-SHIP ALIGNMENT
   spec.md + reality β†’ current-truth.md

Why this order? The Press Release defines the customer experience before any requirements are written. The FAQ challenges that vision and surfaces gaps. Only then is the PRD derivedβ€”grounded in a validated vision rather than abstract feature lists.

See Working Backwards for the full methodology.

CLI Commands

Full documentation: CLI Reference

Project Setup
Command Description
init <project> Initialize a new project
create <type> Scaffold a new spec from template
lint [project] Validate directory structure
status Show project status and readiness
profiles <cmd> Manage configuration profiles
Spec Workflow
Command Description
eval [type] Evaluate specs using LLM judges
synthesize <type> Generate GTM/technical specs from sources
reconcile Generate unified execution spec
approve <type> Approve a spec for reconciliation
Export & Integration
Command Description
export <target> Export to target execution system
targets List available export targets
serve Start MCP server for AI integration
docs <cmd> Generate MkDocs documentation
Context & Traceability
Command Description
context <cmd> Gather codebase context
graph <cmd> Manage requirement graphs

Status Command

The status command shows project readiness with multiple output formats:

# Terminal output with readiness gates
visionspec status -p myproject

# JSON for programmatic use
visionspec status -p myproject --format json

# HTML report with traffic light indicator
visionspec status -p myproject --format html > status.html

# Markdown for embedding in docs
visionspec status -p myproject --format markdown

# CI mode - exits non-zero if not ready
visionspec status -p myproject --ci
Readiness Gates
Gate Description
Required specs present All required source specs (mrd, prd, uxd, trd) exist
Evaluations passing No blocking evaluation findings
Approvals obtained All required specs have approvals
Execution spec generated spec.md has been created

MCP Server

VisionSpec includes an MCP (Model Context Protocol) server for integration with AI coding assistants like Claude Code and Kiro CLI.

# Run MCP server directly
visionspec-mcp
MCP Tools
Tool Status Description
list_projects Implemented List all visionspec projects
get_project_status Implemented Get project readiness status
start_draft Implemented Initialize a new draft
update_draft Implemented Save draft content
eval_draft Implemented Evaluate draft against rubric
finalize_draft Implemented Promote draft to final spec
get_draft Implemented Retrieve current draft
discard_draft Implemented Delete a draft
get_spec Implemented Get specification content
get_eval Implemented Get evaluation results
run_eval Implemented Run evaluation against rubric
synthesize Implemented Generate a spec
reconcile Implemented Generate execution spec
approve Implemented Approve a specification
export Implemented Export to target system

Export Targets

Target Description
speckit GitHub Spec-Kit format
gsd Get Shit Done (PLAN.md, STATE.md)
gastown GasTown formulas and beads
gascity GasCity city.toml configuration
openspec OpenSpec portable format (future)

Configuration Profiles

VisionSpec includes two types of profiles:

Stage-Based Profiles

For different product lifecycle stages:

Profile Required Specs Use Case
0-1 hypothesis Idea validation phase
startup prd Pre-PMF startups
growth prd, uxd, faq 1-N scaling phase
enterprise mrd, prd, uxd, trd, press, faq, spec Post-PMF enterprises
Methodology Profiles

For different organizational methodologies:

Profile Methodology Best For
aws Working Backwards Customer-centric products (PR/FAQ, 6-pager)
google Design Docs + RFC Engineering-heavy orgs (OKRs, experiments)
stripe API-First Platform/API products (contract-first, DX)
lean-startup Build-Measure-Learn Early validation (hypothesis, MVP)
design-thinking Stanford d.school Human-centered design (empathy, prototyping)
jtbd Jobs to be Done Customer motivations (job statements, outcomes)
Using Profiles
# List available profiles
visionspec profiles list

# Show profile details
visionspec profiles show aws

# Initialize with a methodology profile
visionspec init my-product --profile aws

# Initialize with a stage profile
visionspec init my-feature --profile startup

# Export profile for customization
visionspec profiles export enterprise ./my-profile

# Initialize with custom profile directory
visionspec init my-project --profile-dir ./my-profile

CLI as Library

Organizations can build custom CLI tools using visionspec as a library:

import (
    "github.com/ProductBuildersHQ/visionspec/pkg/cli"
    "github.com/ProductBuildersHQ/visionspec/pkg/profiles"
)

func main() {
    root := &cobra.Command{Use: "org-spec"}

    // Load a profile
    profile, _ := profiles.DefaultLoader().Load("enterprise")
    cfg := cli.ConfigFromProfile(profile)

    // Add visionspec commands
    cli.AddCommandsTo(root, cfg)

    root.Execute()
}

See examples/ for complete organization CLI examples.

Dependencies

Development

# Build
make build

# Test
make test

# Lint
make lint

# Install locally
make install

Project Status

See ROADMAP.md for detailed implementation status and CHANGELOG.md for release history.

Current Version: v0.5.0

Phase Status
Phase 0: Foundation Complete
Phase 1: Directory Structure Complete
Phase 2: Evaluation Engine Complete
Phase 3: GTM & Technical Synthesis Complete
Phase 4: Reconciliation Engine Complete
Phase 5: Target Adapters Complete
Phase 6: Claude Code Integration Complete
Phase 7: Graphize Integration Complete
Phase 8: Advanced Features Not Started
Phase 9: Composability Complete
Phase 10: Platform Enhancements Not Started
Phase 11: Context Sources Complete
Phase 12: Methodology Profiles Complete

License

MIT

Directories ΒΆ

Path Synopsis
cmd
mcp-server command
Package main is the entry point for the visionspec MCP server.
Package main is the entry point for the visionspec MCP server.
visionspec command
Package main is the entry point for the visionspec CLI.
Package main is the entry point for the visionspec CLI.
examples
0-1-product command
Example: 0-1 Product CLI using profiles
Example: 0-1 Product CLI using profiles
1-n-growth command
Example: 1-N Growth CLI using profiles
Example: 1-N Growth CLI using profiles
org-cli command
Example: Building a custom CLI with visionspec
Example: Building a custom CLI with visionspec
post-pmf-enterprise command
Example: Post-PMF Enterprise CLI using profiles
Example: Post-PMF Enterprise CLI using profiles
pre-pmf-startup command
Example: Pre-PMF Startup CLI using profiles
Example: Pre-PMF Startup CLI using profiles
internal
cli
Package cli implements the visionspec command-line interface.
Package cli implements the visionspec command-line interface.
mcp
Package mcp implements the Model Context Protocol server for visionspec.
Package mcp implements the Model Context Protocol server for visionspec.
pkg
cli
Package cli provides a composable CLI for visionspec.
Package cli provides a composable CLI for visionspec.
config
Package config handles configuration loading for visionspec.
Package config handles configuration loading for visionspec.
context
Package context provides context aggregation from multiple sources for grounding spec synthesis in reality.
Package context provides context aggregation from multiple sources for grounding spec synthesis in reality.
context/file
Package file provides local file context source.
Package file provides local file context source.
context/git
Package git provides git repository context source.
Package git provides git repository context source.
context/graphize
Package graphize provides graphize requirement traceability context source.
Package graphize provides graphize requirement traceability context source.
context/mcp
Package mcp provides MCP client for external context sources.
Package mcp provides MCP client for external context sources.
context/sources
Package sources provides factory functions to create context sources.
Package sources provides factory functions to create context sources.
draft
Package draft provides draft management for spec authoring.
Package draft provides draft management for spec authoring.
eval
Package eval provides evaluation orchestration for spec documents.
Package eval provides evaluation orchestration for spec documents.
lint
Package lint validates visionspec directory structure and naming conventions.
Package lint validates visionspec directory structure and naming conventions.
mkdocs
Package mkdocs generates MkDocs-compatible markdown files for visionspec projects.
Package mkdocs generates MkDocs-compatible markdown files for visionspec projects.
profiles
Package profiles provides reusable configuration profiles for visionspec.
Package profiles provides reusable configuration profiles for visionspec.
reconcile
Package reconcile provides spec reconciliation capabilities.
Package reconcile provides spec reconciliation capabilities.
rubrics
Package rubrics provides evaluation rubrics for spec types.
Package rubrics provides evaluation rubrics for spec types.
specgraph
Package specgraph provides requirement graph extraction from visionspec specs.
Package specgraph provides requirement graph extraction from visionspec specs.
status
Package status generates project status reports.
Package status generates project status reports.
synth
Package synth provides spec synthesis (generation) capabilities.
Package synth provides spec synthesis (generation) capabilities.
target
Package target provides export adapters for different execution systems.
Package target provides export adapters for different execution systems.
templates
Package templates provides embedded templates for spec types.
Package templates provides embedded templates for spec types.
types
Package types defines the core data structures for visionspec.
Package types defines the core data structures for visionspec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL