Skip to content

zhangluka/OpenSpec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

539 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhSpec logo

CI npm version License: MIT Discord

The most loved spec framework.

Stars Downloads Contributors

Our philosophy:
→ fluid not rigid
→ iterative not waterfall
→ easy not complex
→ built for brownfield not just greenfield
→ scalable from personal projects to enterprises

Tip

New workflow now available! We've rebuilt PhSpec with a new artifact-guided workflow.

Run /phsx:onboard to get started. → Learn more here

Follow @0xTab on X for updates · Join the PhSpec Discord for help and questions.

Teams

Using PhSpec in a team? Email here for access to our Slack channel.

See it in action

You: /phsx:new add-dark-mode
AI:  Created phspec/changes/add-dark-mode/
     Ready to create: proposal

You: /phsx:ff   # "fast-forward" - generate all planning docs
AI:  ✓ proposal.md — why we're doing this, what's changing
     ✓ specs/       — requirements and scenarios
     ✓ design.md    — technical approach
     ✓ tasks.md     — implementation checklist
     Ready for implementation!

You: /phsx:apply
AI:  Implementing tasks...
     ✓ 1.1 Add theme context provider
     ✓ 1.2 Create toggle component
     ✓ 2.1 Add CSS variables
     ✓ 2.2 Wire up localStorage
     All tasks complete!

You: /phsx:archive
AI:  Archived to phspec/changes/archive/2025-01-23-add-dark-mode/
     Specs updated. Ready for the next feature.
PhSpec Dashboard

PhSpec dashboard preview

Quick Start

Requires Node.js 20.19.0 or higher.

Install PhSpec globally:

npm install -g @bobby_z/phspec@latest

Then navigate to your project directory and initialize:

cd your-project
phspec init

Now tell your AI: /phsx:new <what-you-want-to-build>

Note

Not sure if your tool is supported? View the full list – we support 20+ tools and growing.

Also works with pnpm, yarn, bun, and nix. See installation options.

Docs

Getting Started: first steps
Workflows: combos and patterns
Commands: slash commands & skills
CLI: terminal reference
Supported Tools: tool integrations & install paths
Concepts: how it all fits

Brownfield & SDD Best Practices: 棕地接入与业务开发流程规范(团队/公司接入必读)
Multi-Language: multi-language support
Customization: make it yours

Why PhSpec?

AI coding assistants are powerful but unpredictable when requirements live only in chat history. PhSpec adds a lightweight spec layer so you agree on what to build before any code is written.

  • Agree before you build — human and AI align on specs before code gets written
  • Stay organized — each change gets its own folder with proposal, specs, design, and tasks
  • Work fluidly — update any artifact anytime, no rigid phase gates
  • Use your tools — works with 20+ AI assistants via slash commands

How we compare

vs. Spec Kit (GitHub) — Thorough but heavyweight. Rigid phase gates, lots of Markdown, Python setup. PhSpec is lighter and lets you iterate freely.

vs. Kiro (AWS) — Powerful but you're locked into their IDE and limited to Claude models. PhSpec works with the tools you already use.

vs. nothing — AI coding without specs means vague prompts and unpredictable results. PhSpec brings predictability without the ceremony.

Updating PhSpec

Upgrade the package

npm install -g @bobby_z/phspec@latest

Refresh agent instructions

Run this inside each project to regenerate AI guidance and ensure the latest slash commands are active:

phspec update

Usage Notes

Model selection: PhSpec works best with high-reasoning models. We recommend Opus 4.5 and GPT 5.2 for both planning and implementation.

Context hygiene: PhSpec benefits from a clean context window. Clear your context before starting implementation and maintain good context hygiene throughout your session.

Contributing

Small fixes — Bug fixes, typo corrections, and minor improvements can be submitted directly as PRs.

Larger changes — For new features, significant refactors, or architectural changes, please submit an PhSpec change proposal first so we can align on intent and goals before implementation begins.

When writing proposals, keep the PhSpec philosophy in mind: we serve a wide variety of users across different coding agents, models, and use cases. Changes should work well for everyone.

AI-generated code is welcome — as long as it's been tested and verified. PRs containing AI-generated code should mention the coding agent and model used (e.g., "Generated with Claude Code using claude-opus-4-5-20251101").

Development

  • Install dependencies: pnpm install
  • Build: pnpm run build
  • Test: pnpm test
  • Develop CLI locally: pnpm run dev or pnpm run dev:cli
  • Conventional commits (one-line): type(scope): subject

Other

Telemetry

PhSpec collects anonymous usage stats.

We collect only command names and version to understand usage patterns. No arguments, paths, content, or PII. Automatically disabled in CI.

Opt-out: export PHSPEC_TELEMETRY=0 or export DO_NOT_TRACK=1

Maintainers & Advisors

See MAINTAINERS.md for the list of core maintainers and advisors who help guide the project.

License

MIT

About

OpenSpec-based system with internalization support and internal Agent tools for spec-driven development(SDD)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.6%
  • Other 1.4%