psi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePSI - Plan Spec Implement
PSI - 规划-规范-实现
Structured workflow for planning, specifying, and implementing changes with documentation-first approach.
一种采用文档先行方法的规划、制定规范和实现变更的结构化工作流。
When to Use
使用场景
Only use when:
- Explicitly directed by the user
- Mentioned in project file
AGENTS.md
Do not use automatically - this is an opt-in workflow, not a default.
仅在以下情况使用:
- 用户明确指示
- 项目文件中提及
AGENTS.md
请勿自动使用 - 这是一个可选加入的工作流,而非默认工作流。
Core Workflow
核心工作流
Plan → Spec → Implement
Phases are independent - you can start with any phase, but all must ensure documentation stays up-to-date.
规划 → 规范 → 实现
各阶段相互独立 - 你可以从任意阶段开始,但所有阶段都必须确保文档保持最新。
Key Principles
核心原则
- Ephemeral planning - Plans stored in (not committed)
~/.dot-agent/ - Documentation-first - Specs applied to project docs/READMEs/AGENTS.md
- Test-first implementation - Tests for docs/user journeys before code
- Design/review embedded - Design and review integrated into Plan/Spec phases
- Phase independence - Each phase can work standalone, all update docs
- 临时规划 - 计划存储在中(不提交到版本库)
~/.dot-agent/ - 文档先行 - 将规范应用于项目文档/READMEs/AGENTS.md
- 测试先行实现 - 在编写代码前为文档/用户流程编写测试
- 内嵌设计/评审 - 将设计和评审整合到规划/规范阶段
- 阶段独立性 - 每个阶段均可独立工作,所有阶段都会更新文档
Phase Overview
阶段概述
Plan Phase
规划阶段
- Generates detailed plans in
~/.dot-agent/repo/YYYY-MM-work-name.plan.md - Research stored in
~/.dot-agent/working-dir/repo/YYYY-MM-work-name.research.md - Embeds design considerations
- Includes review before proceeding
- 在中生成详细计划
~/.dot-agent/repo/YYYY-MM-work-name.plan.md - 研究内容存储在中
~/.dot-agent/working-dir/repo/YYYY-MM-work-name.research.md - 内嵌设计考量
- 包含推进前的评审
Spec Phase
规范阶段
- Generates specs for: API schemas, interfaces, DTOs, database models, config, env vars, architecture, user journeys, package structure, tech choices
- Embeds design considerations
- Reviews specs before applying
- Applies to: , README.md files, AGENTS.md files
docs/
- 为以下内容生成规范:API 模式、接口、DTO、数据库模型、配置、环境变量、架构、用户流程、包结构、技术选型
- 内嵌设计考量
- 在应用前评审规范
- 应用于:、README.md 文件、AGENTS.md 文件
docs/
Implement Phase
实现阶段
- Test-first: tests for docs/user journeys before code
- CI verification: verify types, tests, lint pass before committing
- Atomic commits: group related changes with tests
- Updates docs, README.md, AGENTS.md as code evolves
- Can work independently if specs exist in docs
- 测试先行:在编写代码前为文档/用户流程编写测试
- CI 验证:提交前验证类型、测试、代码检查是否通过
- 原子提交:将相关变更与测试分组提交
- 随着代码演进更新文档、README.md、AGENTS.md
- 如果文档中已存在规范,可独立开展工作
Research Management
研究内容管理
Detects phrases like:
- "looking at your research" → Loads research file
- "refine your research" → Updates research file, narrows focus
可识别如下表述:
- "查看你的研究内容" → 加载研究文件
- "优化你的研究内容" → 更新研究文件,缩小研究范围
Documentation Structure
文档结构
- README.md: Aim for < 1000 lines (not hard rule), can be longer if needed
- AGENTS.md: < 200 lines, inline at root/packages/modules/code level
- docs/: Architecture, roadmap, tech-choices, setup/, user-journeys/, design/
- README.md:目标行数<1000行(非硬性规则),如有需要可更长
- AGENTS.md:<200行,置于根目录/包/模块/代码层级
- docs/:架构、路线图、技术选型、setup/、user-journeys/、design/
References
参考资料
For detailed protocols, see:
- - Plan generation with embedded design/review
references/plan-phase.md - - Spec generation and application
references/spec-phase.md - - Test-first implementation
references/implement-phase.md - - Reviewing plans/specs/design
references/review-protocol.md - - Research file handling
references/research-management.md - - Documentation organization rules
references/docs-structure.md - - Storage paths and conventions
references/file-paths.md
如需详细协议,请参阅:
- - 内嵌设计/评审的规划生成
references/plan-phase.md - - 规范生成与应用
references/spec-phase.md - - 测试先行实现
references/implement-phase.md - - 规划/规范/设计评审
references/review-protocol.md - - 研究文件处理
references/research-management.md - - 文档组织规则
references/docs-structure.md - - 存储路径与约定
references/file-paths.md