LiveSpec - 与代码共存的规范 ✨
AI 翻译
LiveSpec - Specifications that live with your code ✨
插件Shell · PythonGitHub @chrs-myrs自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
安装型项目无需部署域名也可验证。个人仓库可通过 GitHub 登录验证,组织仓库可使用上方的仓库验证文件。
正在加载完整 README。 以下为已保存的摘录。
An information architecture that generates context trees for AI agents
Not just folders—a system for organizing project intent that AI agents can consume. Specifications stay synchronized with code, and structured context (AGENTS.md) is generated automatically.
LiveSpec is an information architecture and context generation system:查看完整 README ↗An information architecture that generates context trees for AI agents
Not just folders—a system for organizing project intent that AI agents can consume. Specifications stay synchronized with code, and structured context (AGENTS.md) is generated automatically.
LiveSpec is an information architecture and context generation system:
The folder structure is a means. The generated context tree is the end.
This repository is a live example: LiveSpec applied to itself. See specs/ for how we specify documentation, prompts, and methodology—then see how AGENTS.md is generated from those specs.
LiveSpec solves this through:
Before diving into architecture, understand these three mental models:
Intent flows down, implementations trace back up:
PURPOSE.md → WHY does this exist?
↓
foundation/ → WHAT must we achieve?
↓
strategy/ → HOW will we approach it?
↓
features/ → WHAT does the system do? (observable)
Why it matters: When requirements change, you trace down to find affected behaviors. When implementations exist, they trace back up to justify their existence.
Two orthogonal concerns that don't mix:
| Concern | Location | Contains | Applies To |
|---|---|---|---|
| Workspace | specs/workspace/ | HOW you build: patterns, workflows, agent behavior | All development |
| Product | specs/{foundation,strategy,features,interfaces}/ | WHAT you build: requirements, architecture, behaviors | This project specifically |
Key insight: Workspace specs govern ALL your development. Product specs are project-specific deliverables.
| Layer | Folder | Driving Question | Owned By |
|---|---|---|---|
| 1 | foundation/ | What outcomes must we achieve? | Business/Product |
| 2 | strategy/ | What technical approach will we use? | Architecture |
| 3 | features/ + interfaces/ | What does the system observably do? | Engineering |
Note: This shows initial project setup flow. LiveSpec methodology is iterative - Phase 4 (EVOLVE) detects regeneration signals and keeps specs current. See Five Phases for the complete cycle.
graph TD
%% Main Vertical Flow
PURPOSE[PURPOSE.md<br/>Why this exists]
REQUIREMENTS[foundation/<br/>What we must achieve]
CONSTRAINTS[foundation/<br/>Hard boundaries]
STRATEGY[strategy/<br/>Technical approach]
SPECS[features/ + interfaces/<br/>What system does]
CODE[Your Code<br/>AI-generated or manual]
%% Validation
TESTS[tests/<br/>Validation]
%% Workspace (separate)
WORKSPACE[workspace/<br/>Development process]
%% Downward Flow (derives-from, guided-by)
PURPOSE --> REQUIREMENTS
REQUIREMENTS --> CONSTRAINTS
REQUIREMENTS --> STRATEGY
CONSTRAINTS --> STRATEGY
STRATEGY -->|guided-by| SPECS
SPECS --> CODE
%% Upward Flow (satisfies)
SPECS -.satisfies.-> REQUIREMENTS
%% Validation
TESTS <-.validates.-> SPECS
TESTS <-.validates.-> CODE
style PURPOSE fill:#e1f5ff
style REQUIREMENTS fill:#e1f5ff
style CONSTRAINTS fill:#e1f5ff
style STRATEGY fill:#fff4e1
style SPECS fill:#e8f5e9
style CODE fill:#e8f5e9
style TESTS fill:#fce4ec
style WORKSPACE fill:#f5f5f5
Legend:
Note: This diagram shows how LiveSpec documents itself using its own methodology (dogfooding). The Architecture diagram above shows how you structure your project.
LiveSpec achieves complete circularity - every deliverable is defined by a spec, every spec is defined by the framework:
graph TD
META[Framework<br/>7 metaspecs + 3 conventions]
SPECS[Project Specs<br/>30 specifications]
DELIVER[Deliverables<br/>Prompts, docs, framework, templates]
META -->|constrain| SPECS
SPECS -->|define| DELIVER
DELIVER -.dogfoods.-> META
style META fill:#fff4e1
style SPECS fill:#e8f5e9
style DELIVER fill:#fce4ec
Complete chain verified:
type, category, fidelity, criticality, failure_mode, governed-by)specs/ describing itLiveSpec enables AI agents to generate code from your specifications:
Write minimal specs describing what your system should do. AI agents read these specs and generate the implementation. No framework lock-in - works with Claude Code, GitHub Copilot, Cursor, or any coding agent.
Spec-to-code generation:
Key difference from other tools:
Compare to spec-kit: LiveSpec is the no-tooling, agent-agnostic alternative. Same philosophy (specs drive development) but manual-friendly and framework-free.
Choose your preferred method:
Pros: Version management, no file duplication, integrated commands Requires: Claude Code 1.0.33+
# Add LiveSpec marketplace
/plugin marketplace add chrs-myrs/livespec
# Install plugin
/plugin install livespec@livespec
# Initialize your project
/livespec:init
Available commands after installation:
/livespec:init - Initialize project with workspace specs/livespec:design - Create and refine specifications (Phase 0/1)/livespec:audit - Spec health, validation, and context generation (Phase 3/4)/livespec:sweep - Multi-project audit across your portfolio/livespec:learn - Session completion and learning capture/livespec:birth - Incubate and birth child projects from within a parent LiveSpec project/livespec:go - Intelligent entry point, routes to the right skill based on intent/livespec:upgrade - Migrate an existing project to the current versionUpdate later:
/plugin update livespec
Customize your project via specs/workspace/ (constitution, patterns, workflows) — the plugin itself is not meant to be edited in place.
# Initialize with defaults (5 min)
/livespec:init
# Or with full customization (20-30 min)
/livespec:init full
# Edit PURPOSE.md with your project vision
# Then generate context
/livespec:audit context
# Extract specifications from existing code
/livespec:audit extract
# Regenerate agent context
/livespec:audit context
your-project/
├── PURPOSE.md # Why this project exists
│
├── specs/ # All specifications (mandatory frontmatter)
│ ├── workspace/ # Operating context (HOW you work)
│ │ ├── taxonomy.spec.md # Project classification (check FIRST)
│ │ ├── constitution.spec.md # Development principles
│ │ ├── patterns.spec.md # Code patterns
│ │ └── workflows.spec.md # Development workflows
│ ├── foundation/ # WHY — strategic outcomes and constraints
│ │ ├── outcomes.spec.md
│ │ └── constraints.spec.md
│ ├── strategy/ # HOW — cross-cutting technical decisions
│ ├── features/ # WHAT — observable behaviours
│ ├── interfaces/ # Contracts — API/data formats
│ └── artifacts/ # Deliverable specifications
│
├── registries/ # Accepted current state (gaps, issues, improvements)
│
├── AGENTS.md # Generated agent context (from workspace specs)
│
└── [your code] # Your implementation
Workspace specs control HOW you build. Customize these after Phase 0 setup, before main development:
| File | Purpose | Example |
|---|---|---|
| taxonomy.spec.md | Project classification—check FIRST for any file placement | project_type: Software vs project_type: Governance |
| constitution.spec.md | Development principles, AI agent behavior | principle: "Specs before implementation" |
| patterns.spec.md | Code patterns, naming conventions, file organization | naming: kebab-case for files, PascalCase for components |
| workflows.spec.md | Development processes, commit practices, review requirements | commits: Conventional Commits format required |
When to customize: After running Phase 0 quick-start, BEFORE starting Phase 1 design work.
All specifications follow Markdown Specification Language (MSL):
---
criticality: CRITICAL
failure_mode: System unsecured without authentication
---
# User Authentication
## Requirements
- [!] System authenticates users via email and password before allowing access to protected resources.
- Valid credentials allow login
- Invalid credentials rejected
- Sessions persist after authentication
- Protected resources require authentication
That's it. Title, frontmatter, Requirements. Minimal. Testable.
LiveSpec conventions → | MSL Specification →
LiveSpec guides development through five phases with clear entry/exit criteria. Hybrid workflow - natural progression through phases with feedback loops when discovering unknowns.
Establish problem space and development approach
Design solution architecture
Implement the solution
Validate solution meets requirements
Keep specs and code synchronized (continuous)
Phase 4 maintains alignment through regeneration signals - the core value of LiveSpec:
graph LR
CODE[Code Changes]
SPECS[Specifications]
DRIFT[Detect Drift]
UPDATE[Update/Extract]
CODE -->|4a: detect-drift| DRIFT
DRIFT -->|drift found| UPDATE
UPDATE -->|4b: extract-specs<br/>4e: validate| SPECS
SPECS -->|guide| CODE
SPECS -.Phase 1-2<br/>Design & Build.-> CODE
CODE -.Phase 4<br/>Evolve.-> SPECS
style CODE fill:#e8f5e9
style SPECS fill:#e8f5e9
style DRIFT fill:#fff4e1
style UPDATE fill:#fff4e1
Key insight: Specs and code inform each other continuously. Start with specs (design-first) OR start with code (extract-first) - both work.
Common mistakes when setting up LiveSpec:
| Mistake | Symptom | Fix |
|---|---|---|
| Creating files before checking taxonomy | Files in wrong locations, agents confused | Always read specs/workspace/taxonomy.spec.md FIRST |
| Mixing workspace and product concerns | Workspace specs contain business logic, or vice versa | Workspace = HOW you build (all projects). Product = WHAT you build (this project) |
| Skipping Phase 0 | Missing workspace specs, no constitution | Run 0a-quick-start.md or 0b-customize-workspace.md |
| Forgetting to regenerate AGENTS.md | AI agents using stale context | Run /livespec:audit context after spec changes |
Quick diagnostic: If your AI agent seems confused about your project structure, regenerate AGENTS.md first.
Current Version: 5.13.0
LiveSpec v5 is distributed as a Claude Code plugin:
/plugin install livespec for integrated experience/livespec:*context-builder performs isolated context regenerationPrevious: v4 introduced disposable code architecture, v5 replaced directory-copy distribution with a Claude Code plugin.
Changelog → | Migration guide →
That's it. No installation. No dependencies.
livespec/
├── PURPOSE.md # Why LiveSpec exists
├── README.md # This file
│
├── .claude-plugin/ # PLUGIN (install via /plugin install)
│ ├── plugin.json # Plugin manifest
│ └── marketplace.json # Self-hosted marketplace
│
├── skills/ # Plugin skills
│ ├── init/SKILL.md
│ ├── design/SKILL.md
│ ├── audit/SKILL.md
│ ├── sweep/SKILL.md
│ ├── learn/SKILL.md
│ ├── birth/SKILL.md
│ ├── go/SKILL.md
│ └── upgrade/SKILL.md
│
├── commands/ # Slash command routers (routes-to: skills/*/SKILL.md)
│ ├── init.md
│ ├── design.md
│ ├── audit.md
│ ├── sweep.md
│ ├── learn.md
│ ├── birth.md
│ ├── go.md
│ └── upgrade.md
│
├── agents/ # Sub-agent definitions
│ └── context-builder.md # Isolated AGENTS.md/ctxt/ regeneration
│
├── references/ # Reference content for the plugin
│ ├── guides/
│ ├── prompts/
│ └── standards/
│
├── templates/ # Project scaffolding templates
│
├── examples/ # Worked example projects
│
├── specs/ # DOGFOODING (LiveSpec's own specs)
│ ├── workspace/
│ ├── foundation/
│ ├── strategy/
│ ├── features/
│ ├── artifacts/
│ └── interfaces/
│
└── docs/ # User documentation
For Users: Install the plugin (/plugin install livespec)
Contributions welcome! We dogfood our own methodology:
MIT License - see LICENSE
LiveSpec v5 — Information architecture for AI-first development.
Simple. Minimal. Effective.