How fission-ai/openspec works
OpenSpec is a CLI for spec-driven development with AI coding assistants. The documented workflow moves from exploring an idea to proposing a change, implementing it, and archiving updated specs; users can also initialize projects, validate changes, configure workflows, and plan in shared stores. The graph preserves those stages and key supporting capabilities. Relationships are based on README statements and the supplied source excerpts or index references; some command internals and unsampled subsystems are represented without inferred call paths.
Main entry points: index.ts CLI entry · instructions.ts Workflow instructions · validator.ts Validate change · root-selection.ts Root selection
Components 22
CLI and workflows
- CLI entry
src/cli/index.ts - Explore
src/core/templates/workflows/explore.ts - Propose change
src/commands/workflow/new-change.ts - Workflow instructions
src/commands/workflow/instructions.ts - Shared output
src/commands/shared-output.ts - Shell completions
src/core/completions/command-registry.ts
Planning and validation
- Apply specs
src/core/specs-apply.ts - Archive change
src/core/archive.ts - Validate change
src/core/validation/validator.ts - Markdown parsing
src/core/parsers/markdown-parser.ts - Change parsing
src/core/parsers/change-parser.ts - Requirement parsing
src/core/parsers/requirement-blocks.ts - Task progress
src/utils/task-progress.ts
Stores and configuration
- Root selection
src/core/root-selection.ts - Store registry
src/core/store/registry.ts - Project configuration
src/core/project-config.ts - Planning home
src/core/planning-home.ts - Project context
src/commands/context.ts - Shared stores
src/core/store/operations.ts
Agent integrations
- Agent command adapters
src/core/command-generation/adapters - Project initialization
src/core/init.ts
Other components
- Developer
Connections 25
- Developer → CLI entry: runs commands
README.md - CLI entry → Explore: starts exploration
- CLI entry → Propose change: starts proposal
src/cli/index.ts - Propose change → Workflow instructions: requests instructions
- Workflow instructions → Apply specs: guides implementation
README.md - Developer → Archive change: archives change
README.md - CLI entry → Validate change: validates changes
- Validate change → Markdown parsing: parses specs
src/core/validation/validator.ts - Validate change → Change parsing: parses changes
src/core/validation/validator.ts - Markdown parsing → Requirement parsing: parses requirements
src/core/parsers/markdown-parser.ts - Change parsing → Requirement parsing: parses deltas
src/core/parsers/change-parser.ts - Validate change → Task progress: resolves task files
src/core/validation/validator.ts - CLI entry → Root selection: resolves project root
src/cli/index.ts - Root selection → Store registry: reads registry
src/core/root-selection.ts - Workflow instructions → Root selection: resolves root
src/commands/workflow/instructions.ts - Workflow instructions → Store registry: reads snapshot
src/commands/workflow/instructions.ts - Workflow instructions → Project configuration: reads config
src/commands/workflow/instructions.ts - Workflow instructions → Planning home: uses planning home
src/commands/workflow/instructions.ts - Project context → Root selection: resolves root
src/commands/context.ts - Project context → Shared output: emits failures
src/commands/context.ts - CLI entry → Shared output: uses output helpers
src/cli/index.ts - CLI entry → Shell completions: supports completion
- Developer → Project initialization: initializes project
README.md - Project initialization → Agent command adapters: installs tool commands
- Developer → Shared stores: plans in store
README.md