platonic-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlatonic Init
Platonic 初始化
Initialize the Platonic Coding system for any project -- greenfield or existing codebase.
为任意项目——无论是全新项目还是已有代码库——初始化Platonic Coding系统。
When to Use This Skill
何时使用该技能
Use this skill when you need to:
- Bootstrap a new project with the Platonic Coding infrastructure
- Adopt the Platonic Coding paradigm for an existing codebase
- Recover missing design specs from code that was built without formal specifications
- Set up config, specs directory, templates, and impl guide scaffolding
.platonic.yml
Keywords: init, bootstrap, setup, adopt, recover, specs, RFC, platonic coding, project setup
当你需要以下操作时,使用本技能:
- 为新项目搭建Platonic Coding基础设施
- 为现有代码库采用Platonic Coding范式
- 从无正式规范的代码中恢复缺失的设计规范
- 配置文件、规范目录、模板及实现指南脚手架
.platonic.yml
关键词:初始化、搭建、配置、采用、恢复、规范、RFC、Platonic Coding、项目配置
What This Skill Does
本技能的功能
This skill operates in one of two modes:
本技能支持两种运行模式:
Mode 1: Greenfield Init (no existing code)
模式1:全新项目初始化(无现有代码)
Scaffolds the Platonic Coding infrastructure only:
- project config at project root
.platonic.yml - directory with RFC infrastructure and templates
specs/ - directory for implementation guides
docs/impl/ - directory for Phase 0 design drafts
docs/drafts/
仅搭建Platonic Coding基础设施:
- 项目根目录下的项目配置文件
.platonic.yml - 包含RFC基础设施与模板的目录
specs/ - 用于实现指南的目录
docs/impl/ - 用于0阶段设计草稿的目录
docs/drafts/
Mode 2: Recovery Init (existing codebase)
模式2:恢复模式初始化(现有代码库)
Scaffolds infrastructure and recovers design specs from the existing code:
- Scaffold directories, config, and templates
- Scan the codebase systematically (5 phases)
- Plan a modular RFC dependency graph (present to user for confirmation)
- Generate Draft RFCs capturing the system's conceptual and architecture design
- Populate rfc-index.md, rfc-namings.md, and rfc-history.md
搭建基础设施并从现有代码中恢复设计规范:
- 搭建目录、配置文件与模板
- 分5个阶段系统性扫描代码库
- 规划模块化RFC依赖图(提交用户确认)
- 生成捕获系统概念与架构设计的草稿RFC
- 填充rfc-index.md、rfc-namings.md与rfc-history.md文件
Core Concepts
核心概念
Three Spec Kinds
三类规范
Platonic Coding recognizes three kinds of RFC specifications:
| Kind | Purpose | Contains | Does NOT Contain |
|---|---|---|---|
| Conceptual Design | Vision, principles, taxonomy, invariants | Design philosophy, abstractions, terminology | Schemas, APIs, code |
| Architecture Design | Components, layers, data flow, constraints | Module responsibilities, dependency rules, abstract schemas | Concrete API signatures, language-specific code |
| Impl Interface Design | API contracts, naming conventions, signatures | Type definitions, interface contracts, error patterns | Implementation details, algorithms |
Platonic Coding定义了三类RFC规范:
| 类型 | 用途 | 包含内容 | 不包含内容 |
|---|---|---|---|
| 概念设计 | 愿景、原则、分类体系、不变量 | 设计理念、抽象模型、术语定义 | Schemas、API、代码 |
| 架构设计 | 组件、分层、数据流、约束条件 | 模块职责、依赖规则、抽象Schemas | 具体API签名、特定语言代码 |
| 实现接口设计 | API契约、命名规范、签名 | 类型定义、接口契约、错误模式 | 实现细节、算法 |
Modular RFC Recovery
模块化RFC恢复
Recovery produces a small graph of focused RFCs (default maximum: 5), not monolithic documents:
- Exactly 1 system-wide Conceptual Design spec (RFC-0001)
- 1 per major subsystem Architecture Design spec (depends on RFC-0001)
- Impl Interface specs only on explicit user request
The agent MUST present the proposed RFC graph to the user before generating any specs.
恢复操作会生成一个聚焦的小型RFC依赖图(默认最多5个),而非单体文档:
- 恰好1个系统级概念设计规范(RFC-0001)
- 每个主要子系统对应1个架构设计规范(依赖RFC-0001)
- 仅在用户明确请求时生成实现接口规范
在生成任何规范前,Agent必须将拟议的RFC图提交给用户确认。
Available Operations
可用操作
| Operation | Reference File | Purpose |
|---|---|---|
| Scaffold | | Create directories, config, templates |
| Scan | | Systematically analyze existing codebase |
| Plan Modular Specs | | Propose RFC dependency graph from scan results |
| Recover Conceptual | | Generate conceptual design spec from code |
| Recover Architecture | | Generate architecture design spec from code |
| Recover Impl Interface | | Generate impl interface design spec from code |
See references/REFERENCE.md for detailed operation guides.
| 操作 | 参考文件 | 用途 |
|---|---|---|
| 搭建 | | 创建目录、配置文件与模板 |
| 扫描 | | 系统性分析现有代码库 |
| 规划模块化规范 | | 根据扫描结果拟议RFC依赖图 |
| 恢复概念设计 | | 从代码中生成概念设计规范 |
| 恢复架构设计 | | 从代码中生成架构设计规范 |
| 恢复实现接口 | | 从代码中生成实现接口设计规范 |
查看references/REFERENCE.md获取详细的操作指南。
Output Structure
输出结构
<project-root>/
├── .platonic.yml # Project config (auto-discovered by all platonic skills)
├── specs/ # Default; user-configurable
│ ├── rfc-standard.md # RFC process & conventions (includes spec kinds)
│ ├── rfc-history.md # Change history
│ ├── rfc-index.md # Spec index
│ ├── rfc-namings.md # Terminology reference
│ ├── RFC-0001.md # [Recovery] Conceptual Design (Draft)
│ ├── RFC-0002.md # [Recovery] Architecture Design (Draft)
│ └── templates/ # Spec templates for future RFCs
│ ├── rfc-template.md
│ ├── conceptual-design.md
│ ├── architecture-design.md
│ └── impl-interface-design.md
├── docs/impl/ # Default; user-configurable
│ └── README.md
└── docs/drafts/ # Default; user-configurable
└── README.md<project-root>/
├── .platonic.yml # 项目配置(所有Platonic技能可自动识别)
├── specs/ # 默认路径;支持用户配置
│ ├── rfc-standard.md # RFC流程与约定(包含规范类型说明)
│ ├── rfc-history.md # 变更历史
│ ├── rfc-index.md # 规范索引
│ ├── rfc-namings.md # 术语参考
│ ├── RFC-0001.md # [恢复模式] 概念设计(草稿)
│ ├── RFC-0002.md # [恢复模式] 架构设计(草稿)
│ └── templates/ # 用于未来RFC的规范模板
│ ├── rfc-template.md
│ ├── conceptual-design.md
│ ├── architecture-design.md
│ └── impl-interface-design.md
├── docs/impl/ # 默认路径;支持用户配置
│ └── README.md
└── docs/drafts/ # 默认路径;支持用户配置
└── README.mdTemplates
模板
Templates are provided in for all generated files:
assets/- - Project configuration
platonic.yml.template - - RFC process with spec kinds guidance
rfc-standard.md.template - ,
rfc-history.md.template,rfc-index.md.template- Infrastructurerfc-namings.md.template - - Generic RFC template
rfc-template.md - - Conceptual design spec template
conceptual-design.md.template - - Architecture design spec template
architecture-design.md.template - - Implementation interface design spec template
impl-interface-design.md.template - - Implementation guide template
impl-guide-template.md - ,
impl-readme.md.template- Directory READMEsdrafts-readme.md.template
Templates use syntax. Common placeholders: , , .
{{PLACEHOLDER}}{{PROJECT_NAME}}{{LANGUAGE}}{{FRAMEWORK}}assets/- - 项目配置模板
platonic.yml.template - - 包含规范类型指引的RFC流程模板
rfc-standard.md.template - 、
rfc-history.md.template、rfc-index.md.template- 基础设施模板rfc-namings.md.template - - 通用RFC模板
rfc-template.md - - 概念设计规范模板
conceptual-design.md.template - - 架构设计规范模板
architecture-design.md.template - - 实现接口设计规范模板
impl-interface-design.md.template - - 实现指南模板
impl-guide-template.md - 、
impl-readme.md.template- 目录README模板drafts-readme.md.template
模板使用语法。常见占位符:、、。
{{PLACEHOLDER}}{{PROJECT_NAME}}{{LANGUAGE}}{{FRAMEWORK}}Usage Examples
使用示例
Example 1: Initialize a New Project
示例1:初始化新项目
Use platonic-init to set up Platonic Coding for my new project "Acme".
Language is TypeScript, framework is Next.js. Specs go in specs/.使用platonic-init为我的新项目"Acme"搭建Platonic Coding环境。
开发语言为TypeScript,框架为Next.js。规范文件存放在specs/目录下。Example 2: Adopt Platonic Coding for Existing Code
示例2:为现有代码采用Platonic Coding
Use platonic-init to recover design specs for this existing project.
Scan the codebase and propose what RFCs to generate.使用platonic-init为现有项目恢复设计规范。
扫描代码库并拟议需要生成的RFC文档。Example 3: Recovery with Custom Paths
示例3:自定义路径的恢复模式
Use platonic-init in recovery mode. Put specs in docs/rfcs/
and impl guides in docs/design/. Generate up to 4 RFCs.以恢复模式使用platonic-init。将规范文件存放在docs/rfcs/目录下,
实现指南存放在docs/design/目录下。最多生成4个RFC文档。Best Practices
最佳实践
- Always read the reference file for each operation before executing it
- Review recovered specs: All generated RFCs are Draft -- review and refine with platonic-specs
- Confirm the RFC graph: The agent proposes a modular spec plan; confirm before generation
- Keep it small: Fewer, focused specs are better than many overlapping ones
- Use platonic-workflow for future development after initialization
- 执行操作前务必阅读对应参考文件
- 审核恢复的规范:所有生成的RFC均为草稿——使用platonic-specs技能进行审核与优化
- 确认RFC图:Agent会拟议模块化规范计划,生成前请确认
- 保持精简:少量聚焦的规范优于大量重叠的规范
- 初始化完成后,使用platonic-workflow进行后续开发
Dependencies
依赖条件
- Read/write access to project directories
- Markdown file support
- For recovery mode: ability to scan and read source code files
- 具备项目目录的读写权限
- 支持Markdown文件
- 恢复模式:具备扫描与读取源代码文件的能力
Integration with Other Skills
与其他技能的集成
- platonic-specs: Use operation post-init to validate and update recovered specs
refine - platonic-workflow: After init, start at Phase 2 (impl guide) for new features
- platonic-impl-guide: Create implementation guides from recovered RFC specs
- platonic-code-review: Review code against recovered specs
- platonic-specs:初始化完成后,使用操作验证并更新恢复的规范
refine - platonic-workflow:初始化完成后,从第2阶段(实现指南)开始开发新功能
- platonic-impl-guide:从恢复的RFC规范生成实现指南
- platonic-code-review:对照恢复的规范审核代码