platonic-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Platonic 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
    .platonic.yml
    config, specs directory, templates, and impl guide scaffolding
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:
  • .platonic.yml
    project config at project root
  • specs/
    directory with RFC infrastructure and templates
  • docs/impl/
    directory for implementation guides
  • docs/drafts/
    directory for Phase 0 design 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:
  1. Scaffold directories, config, and templates
  2. Scan the codebase systematically (5 phases)
  3. Plan a modular RFC dependency graph (present to user for confirmation)
  4. Generate Draft RFCs capturing the system's conceptual and architecture design
  5. Populate rfc-index.md, rfc-namings.md, and rfc-history.md
搭建基础设施从现有代码中恢复设计规范:
  1. 搭建目录、配置文件与模板
  2. 分5个阶段系统性扫描代码库
  3. 规划模块化RFC依赖图(提交用户确认)
  4. 生成捕获系统概念与架构设计的草稿RFC
  5. 填充rfc-index.md、rfc-namings.md与rfc-history.md文件

Core Concepts

核心概念

Three Spec Kinds

三类规范

Platonic Coding recognizes three kinds of RFC specifications:
KindPurposeContainsDoes NOT Contain
Conceptual DesignVision, principles, taxonomy, invariantsDesign philosophy, abstractions, terminologySchemas, APIs, code
Architecture DesignComponents, layers, data flow, constraintsModule responsibilities, dependency rules, abstract schemasConcrete API signatures, language-specific code
Impl Interface DesignAPI contracts, naming conventions, signaturesType definitions, interface contracts, error patternsImplementation 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

可用操作

OperationReference FilePurpose
Scaffold
scaffold-project.md
Create directories, config, templates
Scan
scan-project.md
Systematically analyze existing codebase
Plan Modular Specs
plan-modular-specs.md
Propose RFC dependency graph from scan results
Recover Conceptual
recover-conceptual.md
Generate conceptual design spec from code
Recover Architecture
recover-architecture.md
Generate architecture design spec from code
Recover Impl Interface
recover-impl-interface.md
Generate impl interface design spec from code
See references/REFERENCE.md for detailed operation guides.
操作参考文件用途
搭建
scaffold-project.md
创建目录、配置文件与模板
扫描
scan-project.md
系统性分析现有代码库
规划模块化规范
plan-modular-specs.md
根据扫描结果拟议RFC依赖图
恢复概念设计
recover-conceptual.md
从代码中生成概念设计规范
恢复架构设计
recover-architecture.md
从代码中生成架构设计规范
恢复实现接口
recover-impl-interface.md
从代码中生成实现接口设计规范
查看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.md

Templates

模板

Templates are provided in
assets/
for all generated files:
  • platonic.yml.template
    - Project configuration
  • rfc-standard.md.template
    - RFC process with spec kinds guidance
  • rfc-history.md.template
    ,
    rfc-index.md.template
    ,
    rfc-namings.md.template
    - Infrastructure
  • rfc-template.md
    - Generic RFC template
  • conceptual-design.md.template
    - Conceptual design spec template
  • architecture-design.md.template
    - Architecture design spec template
  • impl-interface-design.md.template
    - Implementation interface design spec template
  • impl-guide-template.md
    - Implementation guide template
  • impl-readme.md.template
    ,
    drafts-readme.md.template
    - Directory READMEs
Templates use
{{PLACEHOLDER}}
syntax. Common placeholders:
{{PROJECT_NAME}}
,
{{LANGUAGE}}
,
{{FRAMEWORK}}
.
assets/
目录下提供了所有生成文件的模板:
  • platonic.yml.template
    - 项目配置模板
  • rfc-standard.md.template
    - 包含规范类型指引的RFC流程模板
  • rfc-history.md.template
    rfc-index.md.template
    rfc-namings.md.template
    - 基础设施模板
  • rfc-template.md
    - 通用RFC模板
  • conceptual-design.md.template
    - 概念设计规范模板
  • architecture-design.md.template
    - 架构设计规范模板
  • impl-interface-design.md.template
    - 实现接口设计规范模板
  • impl-guide-template.md
    - 实现指南模板
  • impl-readme.md.template
    drafts-readme.md.template
    - 目录README模板
模板使用
{{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

最佳实践

  1. Always read the reference file for each operation before executing it
  2. Review recovered specs: All generated RFCs are Draft -- review and refine with platonic-specs
  3. Confirm the RFC graph: The agent proposes a modular spec plan; confirm before generation
  4. Keep it small: Fewer, focused specs are better than many overlapping ones
  5. Use platonic-workflow for future development after initialization
  1. 执行操作前务必阅读对应参考文件
  2. 审核恢复的规范:所有生成的RFC均为草稿——使用platonic-specs技能进行审核与优化
  3. 确认RFC图:Agent会拟议模块化规范计划,生成前请确认
  4. 保持精简:少量聚焦的规范优于大量重叠的规范
  5. 初始化完成后,使用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
    refine
    operation post-init to validate and update recovered specs
  • 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:对照恢复的规范审核代码