SuperAPI AI Directory

devdocs-onboard

Office & productivity

View repository

Updated 10-15 08:13

About this skill

Project Context

Generate a project context summary to help AI tools or team members quickly understand the project and take over the work.

Run Modes

/devdocs-onboard              → 智能检测(询问读或写)
/devdocs-onboard --read       → 只读取现有文档,不修改
/devdocs-onboard --update     → 强制重新扫描更新
Mode Read Documents Scan Project Write Files Applicable Scenarios
Smart Detection ✅ As Appropriate As Appropriate When Uncertain
--read ✅ ❌ ❌ New AI Takes Over the Project
--update - ✅ ✅ After Completing a Phase of Work

Smart Detection Flow

检测 00-context.md 是否存在
        │
        ├── 不存在 → 自动进入更新模式
        │
        └── 存在 → 询问用户
                    ├── "读取现有内容" → 展示文档,不修改
                    └── "重新扫描更新" → 扫描项目,覆盖文件

Language Rules

  • Support questions in Chinese and English
  • Always reply in Chinese
  • Generate documents in Chinese

Trigger Conditions

  • The user switches AI tools and needs to pass on context
  • The user starts a new conversation session
  • Team members need to understand the project
  • The user requests a project brief

Core Philosophy

Context Transfer Problem

会话 A (Claude Code)          会话 B (新 AI 工具)
        │                            │
        ├── 了解项目结构              │ ← 需要重新了解
        ├── 读取设计文档              │ ← 需要重新读取
        ├── 理解当前进度              │ ← 需要重新理解
        └── 知道下一步任务            │ ← 需要重新确认
                                     │
                    ┌────────────────┘
                    ▼
             /devdocs-onboard
                    │
                    ▼
            生成上下文摘要
                    │
                    ▼
             快速接手项目

Core Principles:

  • A single document contains all key context
  • A new AI can start working immediately after reading it
  • Avoid repeated exploration and inquiries

Workflow

1. 扫描 DevDocs 文档
   │
   ▼
2. 提取关键信息
   ├── 项目概述
   ├── 技术架构
   ├── 当前进度
   └── 待办任务
   │
   ▼
3. 扫描代码库结构
   │
   ▼
4. 生成上下文摘要
   │
   ▼
5. 输出文件(可直接传递给新 AI)

Output Files

Main File:docs/devdocs/00-context.md

This file is designed to be directly copied to a new AI tool as initial context.

Document Structure

# 项目上下文:<项目名称>

**生成时间**:YYYY-MM-DD HH:mm
**生成工具**:/devdocs-onboard

---

## 1. 项目概述

### 1.1 项目目标
<从 01-requirements.md 提取>

### 1.2 核心功能
| 编号 | 功能 | 状态 |
|------|------|------|
| F-001 | <功能名称> | ✅ 已完成 / 🔄 进行中 / ⏳ 待开发 |

### 1.3 技术栈
<从 02-system-design.md 提取>

---

## 2. 系统架构

### 2.1 架构概览
<从 02-system-design.md 提取架构图>

### 2.2 核心模块
| 模块 | 职责 | 关键文件 |
|------|------|----------|
| <模块名> | <职责> | `src/xxx/` |

### 2.3 核心接口
<从 02-system-design.md 提取关键接口签名>

---

## 3. 代码结构

### 3.1 目录结构

<Actual project directory structure, obtained via ls/tree>


### 3.2 关键文件说明
| 文件 | 用途 |
|------|------|
| `src/index.ts` | 入口文件 |
| `src/config.ts` | 配置管理 |

---

## 4. 当前进度

### 4.1 总体进度
| 类型 | 总数 | 已完成 | 进行中 | 完成率 |
|------|------|--------|--------|--------|
| 功能点 | X | X | X | XX% |
| 开发任务 | X | X | X | XX% |

### 4.2 最近完成
- T-05: <任务名称> (YYYY-MM-DD)
- T-04: <任务名称> (YYYY-MM-DD)

### 4.3 当前进行中
- T-06: <任务名称>
  - 状态:<进度描述>
  - 涉及文件:`src/xxx.ts`

### 4.4 未提交变更
<如有未提交的代码变更,列出>

---

## 5. 待办任务

### 5.1 下一步任务
| 优先级 | 任务 | 依赖 | 关联需求 |
|--------|------|------|----------|
| P0 | T-07: <任务名称> | T-06 | F-002, AC-005 |

### 5.2 阻塞项
<如有阻塞项,列出>

---

## 6. 重要约定

### 6.1 编码规范
- 遵循 MTE 原则(可维护、可测试、可扩展)
- 函数不超过 50 行
- 参数不超过 5 个

### 6.2 测试要求
- 单元测试覆盖率 ≥ 80%
- 禁止弱断言

### 6.3 提交规范
<从 git log 提取项目提交风格>

---

## 7. 快速开始

### 7.1 环境准备
```bash
<安装依赖命令>

7.2 Run the Project

<运行命令>

7.3 Run Tests

<测试命令>

8. DevDocs Document Index

Document Path Description
Requirements Document docs/devdocs/01-requirements.md Feature points, user stories, acceptance criteria
System Design docs/devdocs/02-system-design.md Architecture, interfaces, data models
Test Cases docs/devdocs/03-test-cases.md Test strategy, traceability matrix
Development Tasks docs/devdocs/04-dev-tasks.md Task list, dependencies

Onboarding Suggestions:

  1. First read this document to understand the full picture
  2. Check the "Currently In Progress" task status
  3. Continue development from the "Next Tasks"
  4. Consult the corresponding DevDocs documents for detailed questions

## 信息提取规则

### 从 DevDocs 提取

| 信息 | 来源文档 | 提取内容 |
|------|----------|----------|
| 项目目标 | `01-requirements.md` | 需求背景、目标用户 |
| 功能列表 | `01-requirements.md` | F-XXX 功能点及状态 |
| 技术栈 | `02-system-design.md` | 技术选型表 |
| 架构图 | `02-system-design.md` | 架构概览图 |
| 核心接口 | `02-system-design.md` | 接口签名表 |
| 当前进度 | `04-dev-tasks.md` | 执行检查清单 |
| 待办任务 | `04-dev-tasks.md` | 未完成的 T-XX |

### 从代码库提取

| 信息 | 提取方法 |
|------|----------|
| 目录结构 | `ls -la` 或 `tree` |
| 关键文件 | 分析 package.json、入口文件 |
| 未提交变更 | `git status` |
| 提交风格 | `git log --oneline -5` |
| 运行命令 | 从 package.json scripts 或 Makefile 提取 |

## 使用场景

### 场景一:完成工作,准备交接(--update)

```text
用户: /devdocs-onboard --update

Agent: 正在扫描项目并生成上下文...
✅ 已更新 docs/devdocs/00-context.md

您可以将此文件内容复制给新的 AI 工具,它将快速了解项目并接手工作。

Scenario 2: New AI Takes Over the Project (--read)

用户: /devdocs-onboard --read

Agent: 正在读取项目上下文...

[展示 00-context.md 内容]

当前进度:8/12 任务已完成 (67%)
下一步:T-09 用户认证模块

建议从"待办任务"部分继续开发。

Scenario 3: When Uncertain (Smart Detection)

用户: /devdocs-onboard

Agent: 检测到 docs/devdocs/00-context.md 已存在(更新于 2 小时前)

请选择:
1. 读取现有内容(不修改)
2. 重新扫描更新

用户: 1

Agent: [展示现有文档内容]

Constraints

Generation Constraints

  • Must scan all DevDocs documents
  • Must check the current codebase status
  • Must include information about uncommitted changes
  • The output file must be self-contained (not dependent on external links for understanding)
  • Key information must be displayed directly (not just references to document paths)

Content Constraints

  • Project overview must not exceed 200 characters
  • Architecture diagram must be included (ASCII or Mermaid)
  • Must list actionable next steps
  • Sensitive information (keys, passwords) must not be included
  • File paths must be accurate and accessible

Update Constraints

  • Each generation overwrites the old file
  • The generation time must be recorded
  • If DevDocs does not exist, prompt the user to run the relevant skill first

Skill Collaboration

Scenario Collaborating Skill Description
DevDocs does not exist /devdocs-retrofit First generate documentation by reverse-engineering the code
Progress information is outdated /devdocs-sync Sync the documentation status first
Detailed tasks are needed /devdocs-dev-tasks View the complete task list
Memory file synchronization /agent-memory Update AGENTS.md

Command options

# 智能检测:根据文档存在状态询问用户
/devdocs-onboard

# 只读模式:读取并展示现有文档,不做任何修改
/devdocs-onboard --read

# 更新模式:强制重新扫描项目并更新文档
/devdocs-onboard --update

Sub-Agent summary format

When this Skill runs as a sub-Agent, return the following structured summary:

skill: devdocs-onboard
mode: read | update | auto
summary:
  project_name: "<项目名>"
  progress: "X/Y tasks completed (XX%)"
  next_task: T-XX
  blockers: []
context_age: "<N hours/days since last update>"
status: completed
output_file: docs/devdocs/00-context.md

Next steps

Handover party (Tool A)

  1. After completing a phase of work, run /devdocs-onboard --update
  2. Pass the 00-context.md content to the new AI tool

Receiver party (Tool B)

  1. Run /devdocs-onboard --read to understand the project
  2. Continue development from the "To-do tasks" section
  3. After completing work, run /devdocs-onboard --update to update the context