ogt-docs-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OGT Docs - Init

OGT 文档 - 初始化

Initialize the docs-first folder structure for a new or existing project.
为新项目或现有项目初始化docs-first文件夹结构。

Overview

概述

This skill creates the complete
docs/
folder hierarchy for a docs-first project. It sets up folders for definitions, tasks, rules, and all supporting structure.
mermaid
flowchart TB
    INIT["ogt docs init"] --> DOCS["docs/"]

    DOCS --> DEF["define/"]
    DOCS --> TODO["todo/"]
    DOCS --> RULES["rules/"]
    DOCS --> GUIDES["guides/"]

    DEF --> |business, features, code...| DEF_SUB[...]
    TODO --> |pending, in_progress, done...| TODO_SUB[...]
    RULES --> |code, git, docs...| RULES_SUB[...]
该Skill会为采用docs-first模式的项目创建完整的
docs/
文件夹层级结构,包含定义、任务、规则及所有配套结构的文件夹。
mermaid
flowchart TB
    INIT["ogt docs init"] --> DOCS["docs/"]

    DOCS --> DEF["define/"]
    DOCS --> TODO["todo/"]
    DOCS --> RULES["rules/"]
    DOCS --> GUIDES["guides/"]

    DEF --> |business, features, code...| DEF_SUB[...]
    TODO --> |pending, in_progress, done...| TODO_SUB[...]
    RULES --> |code, git, docs...| RULES_SUB[...]

When to Use

适用场景

  • Setting up a brand new project
  • Adding docs-first structure to existing project
  • Migrating from another documentation system
  • Onboarding team to docs-first workflow
  • 搭建全新项目
  • 为现有项目添加docs-first结构
  • 从其他文档系统迁移
  • 帮助团队适应docs-first工作流

Complete Folder Structure

完整文件夹结构

docs/
├── define/                         # Definitions (WHAT)
│   ├── business/                   # Business model
│   │   ├── pricing/
│   │   ├── users/
│   │   ├── revenue/
│   │   └── positioning/
│   │
│   ├── features/                   # Product features
│   │   └── {feature_name}/
│   │       ├── feature.md
│   │       ├── mvp.md
│   │       ├── phase_0.md
│   │       └── ...
│   │
│   ├── code/                       # Technical definitions
│   │   ├── architecture/
│   │   ├── services/
│   │   ├── data_models/
│   │   └── api/
│   │
│   ├── marketing/                  # Marketing definitions
│   │   ├── value_proposition/
│   │   ├── personas/
│   │   ├── messaging/
│   │   └── positioning/
│   │
│   ├── branding/                   # Brand identity
│   │   ├── visual_identity/
│   │   ├── voice_tone/
│   │   └── guidelines/
│   │
│   └── tools/                      # Tool documentation
│       ├── cli/
│       ├── scripts/
│       └── third_party/
├── todo/                           # Tasks (DOING)
│   ├── pending/                    # Not started
│   ├── in_progress/                # Being worked on
│   ├── review/                     # Awaiting review
│   ├── blocked/                    # Cannot proceed
│   ├── done/                       # Completed
│   ├── rejected/                   # Declined
│   ├── implemented/                # Deployed
│   └── audit_log/                  # Audit history
├── rules/                          # Standards (HOW)
│   ├── code/                       # Coding standards
│   │   ├── general/
│   │   ├── typescript/
│   │   ├── naming/
│   │   ├── front/
│   │   └── back/
│   │
│   ├── git/                        # Git workflow
│   │   ├── commits/
│   │   ├── branches/
│   │   ├── pull_requests/
│   │   └── reviews/
│   │
│   ├── docs/                       # Documentation standards
│   │   ├── structure/
│   │   └── formatting/
│   │
│   └── style/                      # Style guides
│       ├── ui/
│       └── api/
├── guides/                         # How-to guides
│   ├── getting_started/
│   ├── development/
│   └── deployment/
├── agents/                         # AI agent definitions
│   ├── _shared/                    # Shared context
│   │   ├── CONTEXT.md
│   │   ├── SKILLS.md
│   │   └── DOCS_STRUCTURE.md
│   │
│   └── {agent_name}/
│       └── AGENT.md
├── skills/                         # AI skills
│   └── {skill_name}/
│       └── SKILL.md
└── _templates/                     # Templates for new docs
    ├── task.md
    ├── feature.md
    ├── definition.md
    ├── rule.md
    └── tool.md

docs/
├── define/                         # 定义(WHAT)
│   ├── business/                   # 业务模型
│   │   ├── pricing/
│   │   ├── users/
│   │   ├── revenue/
│   │   └── positioning/
│   │
│   ├── features/                   # 产品功能
│   │   └── {feature_name}/
│   │       ├── feature.md
│   │       ├── mvp.md
│   │       ├── phase_0.md
│   │       └── ...
│   │
│   ├── code/                       # 技术定义
│   │   ├── architecture/
│   │   ├── services/
│   │   ├── data_models/
│   │   └── api/
│   │
│   ├── marketing/                  # 营销定义
│   │   ├── value_proposition/
│   │   ├── personas/
│   │   ├── messaging/
│   │   └── positioning/
│   │
│   ├── branding/                   # 品牌标识
│   │   ├── visual_identity/
│   │   ├── voice_tone/
│   │   └── guidelines/
│   │
│   └── tools/                      # 工具文档
│       ├── cli/
│       ├── scripts/
│       └── third_party/
├── todo/                           # 任务(DOING)
│   ├── pending/                    # 未开始
│   ├── in_progress/                # 进行中
│   ├── review/                     # 待审核
│   ├── blocked/                    # 受阻
│   ├── done/                       # 已完成
│   ├── rejected/                   # 已拒绝
│   ├── implemented/                # 已部署
│   └── audit_log/                  # 审核历史
├── rules/                          # 标准(HOW)
│   ├── code/                       # 编码标准
│   │   ├── general/
│   │   ├── typescript/
│   │   ├── naming/
│   │   ├── front/
│   │   └── back/
│   │
│   ├── git/                        # Git工作流
│   │   ├── commits/
│   │   ├── branches/
│   │   ├── pull_requests/
│   │   └── reviews/
│   │
│   ├── docs/                       # 文档标准
│   │   ├── structure/
│   │   └── formatting/
│   │
│   └── style/                      # 风格指南
│       ├── ui/
│       └── api/
├── guides/                         # 操作指南
│   ├── getting_started/
│   ├── development/
│   └── deployment/
├── agents/                         # AI Agent定义
│   ├── _shared/                    # 共享上下文
│   │   ├── CONTEXT.md
│   │   ├── SKILLS.md
│   │   └── DOCS_STRUCTURE.md
│   │
│   └── {agent_name}/
│       └── AGENT.md
├── skills/                         # AI Skills
│   └── {skill_name}/
│       └── SKILL.md
└── _templates/                     # 新文档模板
    ├── task.md
    ├── feature.md
    ├── definition.md
    ├── rule.md
    └── tool.md

Initialization Steps

初始化步骤

Step 1: Create Root Structure

步骤1:创建根结构

bash
mkdir -p docs/{define,todo,rules,guides,agents,skills,_templates}
bash
mkdir -p docs/{define,todo,rules,guides,agents,skills,_templates}

Step 2: Create Define Subfolders

步骤2:创建Define子文件夹

bash
undefined
bash
undefined

Business

业务相关

mkdir -p docs/define/business/{pricing,users,revenue,positioning}
mkdir -p docs/define/business/{pricing,users,revenue,positioning}

Features

功能相关

mkdir -p docs/define/features
mkdir -p docs/define/features

Code

技术相关

mkdir -p docs/define/code/{architecture,services,data_models,api}
mkdir -p docs/define/code/{architecture,services,data_models,api}

Marketing

营销相关

mkdir -p docs/define/marketing/{value_proposition,personas,messaging,positioning}
mkdir -p docs/define/marketing/{value_proposition,personas,messaging,positioning}

Branding

品牌相关

mkdir -p docs/define/branding/{visual_identity,voice_tone,guidelines}
mkdir -p docs/define/branding/{visual_identity,voice_tone,guidelines}

Tools

工具相关

mkdir -p docs/define/tools/{cli,scripts,dev,third_party}
undefined
mkdir -p docs/define/tools/{cli,scripts,dev,third_party}
undefined

Step 3: Create Todo Subfolders

步骤3:创建Todo子文件夹

bash
mkdir -p docs/todo/{pending,in_progress,review,blocked,done,rejected,implemented,audit_log}
bash
mkdir -p docs/todo/{pending,in_progress,review,blocked,done,rejected,implemented,audit_log}

Step 4: Create Rules Subfolders

步骤4:创建Rules子文件夹

bash
undefined
bash
undefined

Code rules

编码规则

mkdir -p docs/rules/code/{general,typescript,naming,errors,async,front,back}
mkdir -p docs/rules/code/{general,typescript,naming,errors,async,front,back}

Git rules

Git规则

mkdir -p docs/rules/git/{commits,branches,pull_requests,reviews,merging,tags}
mkdir -p docs/rules/git/{commits,branches,pull_requests,reviews,merging,tags}

Docs rules

文档规则

mkdir -p docs/rules/docs/{structure,formatting}
mkdir -p docs/rules/docs/{structure,formatting}

Style rules

风格规则

mkdir -p docs/rules/style/{ui,api}
undefined
mkdir -p docs/rules/style/{ui,api}
undefined

Step 5: Create Guides Subfolders

步骤5:创建Guides子文件夹

bash
mkdir -p docs/guides/{getting_started,development,deployment}
bash
mkdir -p docs/guides/{getting_started,development,deployment}

Step 6: Create Agent Structure

步骤6:创建Agent结构

bash
mkdir -p docs/agents/_shared
bash
mkdir -p docs/agents/_shared

Step 7: Create Templates

步骤7:创建模板

See Templates section below.

见下方模板章节。

Templates

模板

docs/_templates/task.md

docs/_templates/task.md

markdown
undefined
markdown
undefined

Task: {Title}

Task: {Title}

Summary

Summary

One paragraph describing what needs to be done and why.
One paragraph describing what needs to be done and why.

Objectives

Objectives

  • Specific objective 1
  • Specific objective 2
  • Specific objective 3
  • Specific objective 1
  • Specific objective 2
  • Specific objective 3

Acceptance Criteria

Acceptance Criteria

  • Verifiable criterion 1
  • Verifiable criterion 2
  • Verifiable criterion 3
  • TypeScript compiles clean (if applicable)
  • Verifiable criterion 1
  • Verifiable criterion 2
  • Verifiable criterion 3
  • TypeScript compiles clean (if applicable)

Dependencies

Dependencies

  • {dependency} or "None"
  • {dependency} or "None"

Estimated Effort

Estimated Effort

{Tiny|Small|Medium|Large|XLarge} ({time estimate})
{Tiny|Small|Medium|Large|XLarge} ({time estimate})

References

References

  • Relevant link or file path
undefined
  • Relevant link or file path
undefined

docs/_templates/feature.md

docs/_templates/feature.md

markdown
undefined
markdown
undefined

Feature: {Name}

Feature: {Name}

Summary

Summary

One paragraph explaining the feature and its value.
One paragraph explaining the feature and its value.

User Stories

User Stories

As a {user type}, I want to {action}, so that {benefit}.
As a {user type}, I want to {action}, so that {benefit}.

Scope

Scope

In Scope

In Scope

  • Item 1
  • Item 2
  • Item 1
  • Item 2

Out of Scope

Out of Scope

  • Item 1
  • Item 2
  • Item 1
  • Item 2

Success Metrics

Success Metrics

  • Metric 1
  • Metric 2
  • Metric 1
  • Metric 2

Phases

Phases

See mvp.md and phase files for implementation details.
undefined
See mvp.md and phase files for implementation details.
undefined

docs/_templates/definition.md

docs/_templates/definition.md

markdown
undefined
markdown
undefined

{Name}

{Name}

Summary

Summary

One paragraph explaining what this is.
One paragraph explaining what this is.

Details

Details

Detailed explanation of the concept, entity, or component.
Detailed explanation of the concept, entity, or component.

Structure

Structure


{structure diagram or tree}

{structure diagram or tree}

Examples

Examples

Example 1

Example 1

{description and example}
{description and example}

Example 2

Example 2

{description and example}
{description and example}

Related

Related

  • Link to related definition
  • Link to related rule
undefined
  • Link to related definition
  • Link to related rule
undefined

docs/_templates/rule.md

docs/_templates/rule.md

markdown
undefined
markdown
undefined

Rule: {Name}

Rule: {Name}

Summary

Summary

One sentence stating the rule clearly.
One sentence stating the rule clearly.

Rationale

Rationale

Why this rule exists.
Why this rule exists.

The Rule

The Rule

Clear statement using RFC 2119 keywords (MUST, SHOULD, MAY).
Clear statement using RFC 2119 keywords (MUST, SHOULD, MAY).

Examples

Examples

Correct

Correct

{correct example}
{correct example}

Incorrect

Incorrect

{incorrect example with explanation}
{incorrect example with explanation}

Exceptions

Exceptions

Documented exceptions.
Documented exceptions.

Enforcement

Enforcement

How the rule is enforced.
undefined
How the rule is enforced.
undefined

docs/_templates/tool.md

docs/_templates/tool.md

markdown
undefined
markdown
undefined

Tool: {Name}

Tool: {Name}

Summary

Summary

Brief description of the tool.
Brief description of the tool.

Purpose

Purpose

What problem it solves.
What problem it solves.

Installation

Installation

bash
{installation command}
undefined
bash
{installation command}
undefined

Quick Start

Quick Start

bash
{basic usage}
bash
{basic usage}

Commands

Commands

CommandDescription
{cmd1}{description}
{cmd2}{description}
CommandDescription
{cmd1}{description}
{cmd2}{description}

Configuration

Configuration

{configuration options}
{configuration options}

Examples

Examples

{usage examples}

---
{usage examples}

---

Shared Agent Context

共享Agent上下文

docs/agents/_shared/CONTEXT.md

docs/agents/_shared/CONTEXT.md

markdown
undefined
markdown
undefined

Project Context

Project Context

Project Name

Project Name

{Project Name}
{Project Name}

Description

Description

{One paragraph description}
{One paragraph description}

Tech Stack

Tech Stack

  • Frontend: {stack}
  • Backend: {stack}
  • Database: {database}
  • Infrastructure: {infra}
  • Frontend: {stack}
  • Backend: {stack}
  • Database: {database}
  • Infrastructure: {infra}

Repository

Repository

{repo URL}
{repo URL}

Key Directories

Key Directories


{project}/
├── {dir1}/ # {purpose}
├── {dir2}/ # {purpose}
└── docs/ # Documentation (docs-first)

```

{project}/
├── {dir1}/ # {purpose}
├── {dir2}/ # {purpose}
└── docs/ # Documentation (docs-first)

```

Current Focus

Current Focus

{What the team is currently working on}
{What the team is currently working on}

Key Decisions

Key Decisions

  1. {Decision 1} - {rationale}
  2. {Decision 2} - {rationale}
undefined
  1. {Decision 1} - {rationale}
  2. {Decision 2} - {rationale}
undefined

docs/agents/_shared/SKILLS.md

docs/agents/_shared/SKILLS.md

markdown
undefined
markdown
undefined

Available Skills

Available Skills

Skills available to all agents in this project.
Skills available to all agents in this project.

Documentation Skills

Documentation Skills

SkillTriggerPurpose
ogt-docs-create-task"create a task"Create new task
ogt-docs-define"define X"Create definitions
ogt-docs-rules"create rule"Create rules
ogt-docs-audit-task"audit tasks"Verify tasks
SkillTriggerPurpose
ogt-docs-create-task"create a task"Create new task
ogt-docs-define"define X"Create definitions
ogt-docs-rules"create rule"Create rules
ogt-docs-audit-task"audit tasks"Verify tasks

Code Skills

Code Skills

{project-specific code skills}
{project-specific code skills}

Tool Skills

Tool Skills

{project-specific tool skills}
undefined
{project-specific tool skills}
undefined

docs/agents/_shared/DOCS_STRUCTURE.md

docs/agents/_shared/DOCS_STRUCTURE.md

markdown
undefined
markdown
undefined

Documentation Structure

Documentation Structure

Folder Convention

Folder Convention

Every documentable item is a folder, not a file.

docs/{section}/{category}/{item_name}/
├── {type}.md # Primary document (task.md, feature.md, etc.)
├── {supporting}.md # Supporting documents
└── .{signal} # Signal files
Every documentable item is a folder, not a file.

docs/{section}/{category}/{item_name}/
├── {type}.md # Primary document (task.md, feature.md, etc.)
├── {supporting}.md # Supporting documents
└── .{signal} # Signal files

Signal Files

Signal Files

SignalTypePurpose
.version
ContentSchema version
.priority
ContentPriority level
.blocked
EmptyItem is blocked
.verified
EmptyItem verified
SignalTypePurpose
.version
ContentSchema version
.priority
ContentPriority level
.blocked
EmptyItem is blocked
.verified
EmptyItem verified

Workflow

Workflow

Tasks move between folders:

pending/ -> in_progress/ -> review/ -> done/ -> implemented/
Features evolve through phases:

mvp.md -> phase_0.md -> phase_1.md -> ...

---
Tasks move between folders:

pending/ -> in_progress/ -> review/ -> done/ -> implemented/
Features evolve through phases:

mvp.md -> phase_0.md -> phase_1.md -> ...

---

Init Script

初始化脚本

Complete initialization script:
bash
#!/bin/bash
完整初始化脚本:
bash
#!/bin/bash

init-docs.sh - Initialize docs-first structure

init-docs.sh - Initialize docs-first structure

set -e
echo "Initializing docs-first structure..."
set -e
echo "Initializing docs-first structure..."

Create main directories

Create main directories

mkdir -p docs/{define,todo,rules,guides,agents,skills,_templates}
mkdir -p docs/{define,todo,rules,guides,agents,skills,_templates}

Define subdirectories

Define subdirectories

mkdir -p docs/define/business/{pricing,users,revenue,positioning} mkdir -p docs/define/features mkdir -p docs/define/code/{architecture,services,data_models,api} mkdir -p docs/define/marketing/{value_proposition,personas,messaging,positioning} mkdir -p docs/define/branding/{visual_identity,voice_tone,guidelines} mkdir -p docs/define/tools/{cli,scripts,dev,third_party}
mkdir -p docs/define/business/{pricing,users,revenue,positioning} mkdir -p docs/define/features mkdir -p docs/define/code/{architecture,services,data_models,api} mkdir -p docs/define/marketing/{value_proposition,personas,messaging,positioning} mkdir -p docs/define/branding/{visual_identity,voice_tone,guidelines} mkdir -p docs/define/tools/{cli,scripts,dev,third_party}

Todo subdirectories

Todo subdirectories

mkdir -p docs/todo/{pending,in_progress,review,blocked,done,rejected,implemented,audit_log}
mkdir -p docs/todo/{pending,in_progress,review,blocked,done,rejected,implemented,audit_log}

Rules subdirectories

Rules subdirectories

mkdir -p docs/rules/code/{general,typescript,naming,errors,async,front,back} mkdir -p docs/rules/git/{commits,branches,pull_requests,reviews,merging,tags} mkdir -p docs/rules/docs/{structure,formatting} mkdir -p docs/rules/style/{ui,api}
mkdir -p docs/rules/code/{general,typescript,naming,errors,async,front,back} mkdir -p docs/rules/git/{commits,branches,pull_requests,reviews,merging,tags} mkdir -p docs/rules/docs/{structure,formatting} mkdir -p docs/rules/style/{ui,api}

Guides subdirectories

Guides subdirectories

mkdir -p docs/guides/{getting_started,development,deployment}
mkdir -p docs/guides/{getting_started,development,deployment}

Agent structure

Agent structure

mkdir -p docs/agents/_shared
mkdir -p docs/agents/_shared

Create template files

Create template files

cat > docs/_templates/task.md << 'EOF'
cat > docs/_templates/task.md << 'EOF'

Task: {Title}

Task: {Title}

Summary

Summary

One paragraph describing what needs to be done and why.
One paragraph describing what needs to be done and why.

Objectives

Objectives

  • Specific objective 1
  • Specific objective 2
  • Specific objective 1
  • Specific objective 2

Acceptance Criteria

Acceptance Criteria

  • Verifiable criterion 1
  • Verifiable criterion 2
  • TypeScript compiles clean
  • Verifiable criterion 1
  • Verifiable criterion 2
  • TypeScript compiles clean

Dependencies

Dependencies

None
None

Estimated Effort

Estimated Effort

Medium (2-4 hours) EOF
cat > docs/_templates/feature.md << 'EOF'
Medium (2-4 hours) EOF
cat > docs/_templates/feature.md << 'EOF'

Feature: {Name}

Feature: {Name}

Summary

Summary

One paragraph explaining the feature.
One paragraph explaining the feature.

User Stories

User Stories

As a user, I want to {action}, so that {benefit}.
As a user, I want to {action}, so that {benefit}.

Scope

Scope

In Scope

In Scope

  • Item 1
  • Item 1

Out of Scope

Out of Scope

  • Item 1
  • Item 1

Success Metrics

Success Metrics

  • Metric 1 EOF
cat > docs/_templates/definition.md << 'EOF'
  • Metric 1 EOF
cat > docs/_templates/definition.md << 'EOF'

{Name}

{Name}

Summary

Summary

One paragraph explaining what this is.
One paragraph explaining what this is.

Details

Details

Detailed explanation.
Detailed explanation.

Examples

Examples

Example 1
Example 1

Related

Related

  • Related link EOF
cat > docs/_templates/rule.md << 'EOF'
  • Related link EOF
cat > docs/_templates/rule.md << 'EOF'

Rule: {Name}

Rule: {Name}

Summary

Summary

One sentence stating the rule.
One sentence stating the rule.

Rationale

Rationale

Why this rule exists.
Why this rule exists.

The Rule

The Rule

MUST/SHOULD/MAY statement.
MUST/SHOULD/MAY statement.

Examples

Examples

Correct

Correct

Example
Example

Incorrect

Incorrect

Example
Example

Enforcement

Enforcement

How enforced. EOF
How enforced. EOF

Create shared agent context

Create shared agent context

cat > docs/agents/_shared/CONTEXT.md << 'EOF'
cat > docs/agents/_shared/CONTEXT.md << 'EOF'

Project Context

Project Context

Project Name

Project Name

{Project Name}
{Project Name}

Description

Description

{Description}
{Description}

Tech Stack

Tech Stack

  • Frontend:
  • Backend:
  • Database:
  • Frontend:
  • Backend:
  • Database:

Key Directories

Key Directories


project/
├── src/
└── docs/
EOF
cat > docs/agents/_shared/DOCS_STRUCTURE.md << 'EOF'

project/
├── src/
└── docs/
EOF
cat > docs/agents/_shared/DOCS_STRUCTURE.md << 'EOF'

Documentation Structure

Documentation Structure

Every documentable item is a folder, not a file.
Every documentable item is a folder, not a file.

Signal Files

Signal Files

SignalPurpose
.version
Schema version
.priority
Priority level
.verified
Item verified
EOF
echo "Done! Structure created in docs/" echo "" echo "Next steps:" echo "1. Edit docs/agents/_shared/CONTEXT.md with project info" echo "2. Create initial feature definitions in docs/define/features/" echo "3. Add first tasks to docs/todo/pending/"

---
SignalPurpose
.version
Schema version
.priority
Priority level
.verified
Item verified
EOF
echo "Done! Structure created in docs/" echo "" echo "Next steps:" echo "1. Edit docs/agents/_shared/CONTEXT.md with project info" echo "2. Create initial feature definitions in docs/define/features/" echo "3. Add first tasks to docs/todo/pending/"

---

Verification

验证

After initialization, verify the structure:
bash
undefined
初始化完成后,验证结构是否正确:
bash
undefined

Count directories created

统计已创建的目录数量

find docs -type d | wc -l
find docs -type d | wc -l

Expected: ~60 directories

预期:约60个目录

Check key directories exist

检查关键目录是否存在

test -d docs/define/features && echo "features: OK" test -d docs/todo/pending && echo "pending: OK" test -d docs/rules/code && echo "code rules: OK" test -d docs/_templates && echo "templates: OK"
test -d docs/define/features && echo "features: OK" test -d docs/todo/pending && echo "pending: OK" test -d docs/rules/code && echo "code rules: OK" test -d docs/_templates && echo "templates: OK"

Check templates exist

检查模板文件是否存在

test -f docs/_templates/task.md && echo "task template: OK" test -f docs/_templates/feature.md && echo "feature template: OK"

---
test -f docs/_templates/task.md && echo "task template: OK" test -f docs/_templates/feature.md && echo "feature template: OK"

---

Post-Init Steps

初始化后步骤

1. Configure Project Context

1. 配置项目上下文

Edit
docs/agents/_shared/CONTEXT.md
:
bash
vim docs/agents/_shared/CONTEXT.md
Fill in:
  • Project name
  • Description
  • Tech stack
  • Key directories
编辑
docs/agents/_shared/CONTEXT.md
bash
vim docs/agents/_shared/CONTEXT.md
填写以下内容:
  • 项目名称
  • 项目描述
  • 技术栈
  • 关键目录

2. Create First Feature

2. 创建首个功能文档

bash
mkdir -p docs/define/features/user_auth
cp docs/_templates/feature.md docs/define/features/user_auth/feature.md
vim docs/define/features/user_auth/feature.md
bash
mkdir -p docs/define/features/user_auth
cp docs/_templates/feature.md docs/define/features/user_auth/feature.md
vim docs/define/features/user_auth/feature.md

3. Create First Task

3. 创建首个任务文档

bash
mkdir -p docs/todo/pending/setup_project
cp docs/_templates/task.md docs/todo/pending/setup_project/task.md
vim docs/todo/pending/setup_project/task.md
bash
mkdir -p docs/todo/pending/setup_project
cp docs/_templates/task.md docs/todo/pending/setup_project/task.md
vim docs/todo/pending/setup_project/task.md

4. Add Essential Rules

4. 添加核心规则文档

Start with commit message format:
bash
mkdir -p docs/rules/git/commits
cp docs/_templates/rule.md docs/rules/git/commits/rule.md
vim docs/rules/git/commits/rule.md

从提交消息格式规则开始:
bash
mkdir -p docs/rules/git/commits
cp docs/_templates/rule.md docs/rules/git/commits/rule.md
vim docs/rules/git/commits/rule.md

Customization

自定义配置

Minimal Init

极简初始化

For smaller projects, use minimal structure:
bash
mkdir -p docs/{define/features,todo/{pending,done},rules/code,_templates}
针对小型项目,可使用极简结构:
bash
mkdir -p docs/{define/features,todo/{pending,done},rules/code,_templates}

Extended Init

扩展初始化

For larger projects, add:
bash
undefined
针对大型项目,可添加以下内容:
bash
undefined

Multiple environments

多环境配置

mkdir -p docs/define/environments/{dev,staging,prod}
mkdir -p docs/define/environments/{dev,staging,prod}

Multiple teams

多团队配置

mkdir -p docs/todo/{frontend,backend,devops}
mkdir -p docs/todo/{frontend,backend,devops}

Detailed rules

详细编码规则

mkdir -p docs/rules/code/{react,node,database}

---
mkdir -p docs/rules/code/{react,node,database}

---

Signal Files Reference

信号文件参考

SignalCreated DuringContent
.version
First document
{"schema": "1.0"}
.initialized
InitTimestamp
.last_audit
AuditTimestamp

信号文件创建时机内容
.version
首次创建文档时
{"schema": "1.0"}
.initialized
初始化时时间戳
.last_audit
审核时时间戳

Init Checklist

初始化检查清单

  • All main directories created
  • Define subdirectories created
  • Todo workflow directories created
  • Rules categories created
  • Templates created
  • Shared agent context created
  • CONTEXT.md filled in
  • First feature defined
  • First task created
  • Essential rules documented
  • 所有主目录已创建
  • Define子目录已创建
  • Todo工作流目录已创建
  • Rules分类目录已创建
  • 模板文件已创建
  • 共享Agent上下文已创建
  • CONTEXT.md已填写
  • 首个功能文档已定义
  • 首个任务文档已创建
  • 核心规则已文档化