OGT Docs - Documentation as Source of Truth
Philosophy
Documentation is the database of decisions. Code is merely its implementation.
CODEBLOCK0
When to Use This Skill
Use ogt-docs when you need to:
- - Understand the docs/ folder structure
- Find the right sub-skill for a specific task
- Initialize a new docs-first project
- Navigate between definition types
For specific tasks, use the specialized sub-skills listed below.
Documentation Structure Overview
CODEBLOCK1
The Folder-as-Entity Pattern
Every documentable item is a folder containing:
CODEBLOCK2
Benefits:
- - Move entire folder between workflow stages
- Attach unlimited supporting files
- Signal status via dot-files
- Version and track changes atomically
Sub-Skills Reference
Definitions (WHAT things ARE)
| Sub-Skill | Purpose | Use When |
|---|
| INLINECODE1 | General definition guidance | Need overview of definition types |
| INLINECODE2 |
Business model, pricing, users | Defining business concepts |
|
ogt-docs-define-feature | Product features and specs | Specifying a new feature |
|
ogt-docs-define-code | Technical architecture | Defining services, data models |
|
ogt-docs-define-marketing | Brand, messaging, audience | Marketing definitions |
|
ogt-docs-define-branding | Visual identity, tone | Brand guidelines |
|
ogt-docs-define-tools | Tooling and CLI specs | Defining developer tools |
Rules (HOW to IMPLEMENT)
| Sub-Skill | Purpose | Use When |
|---|
| INLINECODE8 | General rules guidance | Need overview of rule types |
| INLINECODE9 |
Coding standards overview | General code rules |
|
ogt-docs-rules-code-front | Frontend-specific rules | React, CSS, components |
|
ogt-docs-rules-code-back | Backend-specific rules | API, database, services |
|
ogt-docs-rules-code-infra | Infrastructure rules | Docker, CI/CD, deployment |
|
ogt-docs-rules-git | Version control rules | Commits, branches, PRs |
Tasks (WHAT to DO)
| Sub-Skill | Purpose | Use When |
|---|
| INLINECODE14 | Create and manage tasks | Need to create/update a task |
| INLINECODE15 |
Verify task completion | Checking if task is truly done |
Other
| Sub-Skill | Purpose | Use When |
|---|
| INLINECODE16 | General creation guidance | Need to create any doc type |
| INLINECODE17 |
Marketing content | Creating social/marketing content |
|
ogt-docs-audit | General audit guidance | Auditing documentation |
|
ogt-docs-init | Initialize docs structure | Setting up new project |
|
ogt-docs-config | Configuration options | Customizing docs workflow |
Workflow Overview
CODEBLOCK3
Quick Start
"I need to define something new"
→ Use ogt-docs-define to understand types, then the specific sub-skill
"I need to create a task"
→ Use INLINECODE22
"I need to check if a task is really done"
→ Use INLINECODE23
"I need to add coding rules"
→ Use ogt-docs-rules-code or the specific frontend/backend/infra variant
"I need to set up docs for a new project"
→ Use INLINECODE25
Naming Conventions
| Element | Format | Example |
|---|
| Folder slugs | snake_case | INLINECODE26 , INLINECODE27 |
| Primary files |
lowercase type |
task.md,
feature.md,
rule.md |
| Supporting files | lowercase descriptive |
phase_0.md,
notes.md,
progress.md |
| Signal files | dot + snake_case |
.blocked_reason,
.approved_by_human |
Signal Files Reference
Signal files are dot-files that indicate status or metadata.
| Signal | Type | Meaning |
|---|
| INLINECODE36 | Content | Schema/doc version (JSON) |
| INLINECODE37 |
Empty | Item is blocked |
|
.blocked_reason | Content | Why it's blocked |
|
.approved | Empty | Approved for implementation |
|
.approved_by_{name} | Empty | Who approved |
|
.rejected | Empty | Rejected |
|
.rejected_reason | Content | Why rejected |
|
.verified | Empty | Implementation verified |
|
.completed_at | Content | Completion timestamp |
|
.assigned_to_{agent} | Empty | Who's working on it |
|
.pr_link | Content | Associated PR URL |
|
.depends_on | Content | Dependencies list |
The Golden Rules
- 1. If it's not documented, it doesn't exist
- If code contradicts docs, code is wrong
- Never trust "done" status without verification
- Move folders, don't copy files
- Signal with dot-files, don't edit status fields
技能名称: ogt-docs
详细描述:
OGT 文档 - 以文档为事实来源
核心理念
文档是决策的数据库。代码仅仅是其实现。
┌─────────────────────────────────────────────────────────────────┐
│ 文档优先原则 │
├─────────────────────────────────────────────────────────────────┤
│ 1. 文档定义了事物是什么 │
│ 2. 代码实现了文档所规定的内容 │
│ 3. 冲突时以文档为准 │
│ │
│ 如果文档说X而代码做Y → 代码是错误的 │
└─────────────────────────────────────────────────────────────────┘
何时使用此技能
当您需要以下操作时,请使用 ogt-docs:
- - 了解 docs/ 文件夹结构
- 为特定任务找到正确的子技能
- 初始化一个新的文档优先项目
- 在不同定义类型之间导航
对于特定任务,请使用下面列出的专门子技能。
文档结构概览
docs/
├── definitions/ # 事物是什么
│ ├── business/ # 商业模式、定价、用户
│ ├── features/ # 产品功能和规格
│ ├── technical/ # 架构、服务、数据
│ └── domain/ # 领域特定概念
│
├── rules/ # 如何实现
│ ├── code/ # 编码标准
│ │ ├── frontend/
│ │ ├── backend/
│ │ └── infra/
│ ├── git/ # 版本控制规则
│ └── domain/ # 领域特定规则
│
├── todo/ # 任务管理
│ ├── pending/ # 未开始
│ ├── in_progress/ # 进行中
│ ├── review/ # 等待审查
│ ├── blocked/ # 无法继续
│ ├── done/ # 已完成并验证
│ └── rejected/ # 已拒绝的任务
│
├── guides/ # 操作指南
│ └── {topic}/
│
└── social/ # 营销与沟通
├── campaigns/
├── content/
└── branding/
文件夹即实体模式
每个可文档化的项目都是一个文件夹,包含:
{item_slug}/
├── {type}.md # 主文档 (task.md, feature.md 等)
├── {supporting_files}.md # 附加文档
└── .{signal_files} # 状态标记和元数据
优势:
- - 在工作流阶段之间移动整个文件夹
- 附加无限数量的支持文件
- 通过点文件标记状态
- 原子化版本控制和变更追踪
子技能参考
定义(事物是什么)
| 子技能 | 用途 | 使用场景 |
|---|
| ogt-docs-define | 通用定义指导 | 需要了解定义类型概览 |
| ogt-docs-define-business |
商业模式、定价、用户 | 定义业务概念 |
| ogt-docs-define-feature | 产品功能和规格 | 定义新功能 |
| ogt-docs-define-code | 技术架构 | 定义服务、数据模型 |
| ogt-docs-define-marketing | 品牌、信息传达、受众 | 营销定义 |
| ogt-docs-define-branding | 视觉识别、语气 | 品牌指南 |
| ogt-docs-define-tools | 工具和 CLI 规格 | 定义开发者工具 |
规则(如何实现)
| 子技能 | 用途 | 使用场景 |
|---|
| ogt-docs-rules | 通用规则指导 | 需要了解规则类型概览 |
| ogt-docs-rules-code |
编码标准概览 | 通用代码规则 |
| ogt-docs-rules-code-front | 前端特定规则 | React、CSS、组件 |
| ogt-docs-rules-code-back | 后端特定规则 | API、数据库、服务 |
| ogt-docs-rules-code-infra | 基础设施规则 | Docker、CI/CD、部署 |
| ogt-docs-rules-git | 版本控制规则 | 提交、分支、PR |
任务(要做什么)
| 子技能 | 用途 | 使用场景 |
|---|
| ogt-docs-create-task | 创建和管理任务 | 需要创建/更新一个任务 |
| ogt-docs-audit-task |
验证任务完成 | 检查任务是否真正完成 |
其他
| 子技能 | 用途 | 使用场景 |
|---|
| ogt-docs-create | 通用创建指导 | 需要创建任何文档类型 |
| ogt-docs-create-social |
营销内容 | 创建社交/营销内容 |
| ogt-docs-audit | 通用审计指导 | 审计文档 |
| ogt-docs-init | 初始化文档结构 | 设置新项目 |
| ogt-docs-config | 配置选项 | 自定义文档工作流 |
工作流概览
mermaid
flowchart TB
subgraph define [1. 定义]
D1[创建定义]
D2[获得批准]
end
subgraph regulate [2. 规范]
R1[创建规则]
R2[添加示例]
end
subgraph implement [3. 实现]
I1[创建任务]
I2[编写代码]
I3[审查]
end
subgraph verify [4. 验证]
V1[运行检查]
V2[确认匹配]
end
define --> regulate --> implement --> verify
verify -->|不匹配| implement
verify -->|文档错误| define
快速入门
我需要定义一些新内容
→ 使用 ogt-docs-define 了解类型,然后使用特定的子技能
我需要创建一个任务
→ 使用 ogt-docs-create-task
我需要检查一个任务是否真正完成
→ 使用 ogt-docs-audit-task
我需要添加编码规则
→ 使用 ogt-docs-rules-code 或特定的前端/后端/基础设施变体
我需要为新项目设置文档
→ 使用 ogt-docs-init
命名约定
| 元素 | 格式 | 示例 |
|---|
| 文件夹别名 | snakecase | globalsearch, user_auth |
| 主文件 |
小写类型 | task.md, feature.md, rule.md |
| 支持文件 | 小写描述性 | phase_0.md, notes.md, progress.md |
| 信号文件 | 点 + snake
case | .blockedreason, .approved
byhuman |
信号文件参考
信号文件是表示状态或元数据的点文件。
| 信号 | 类型 | 含义 |
|---|
| .version | 内容 | 架构/文档版本 (JSON) |
| .blocked |
空 | 项目被阻塞 |
| .blocked_reason | 内容 | 阻塞原因 |
| .approved | 空 | 批准实施 |
| .approved
by{name} | 空 | 批准人 |
| .rejected | 空 | 已拒绝 |
| .rejected_reason | 内容 | 拒绝原因 |
| .verified | 空 | 实现已验证 |
| .completed_at | 内容 | 完成时间戳 |
| .assigned
to{agent} | 空 | 负责人员 |
| .pr_link | 内容 | 关联的 PR URL |
| .depends_on | 内容 | 依赖项列表 |
黄金法则
- 1. 如果没有文档记录,它就不存在
- 如果代码与文档矛盾,代码是错误的
- 未经验证,永远不要相信已完成状态
- 移动文件夹,不要复制文件
- 使用点文件发送信号,不要编辑状态字段