Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ dist/
.worktree/ # git worktree 并行开发目录
.vitepress-dist/
.opencode
docs/dev/handoff/ # 临时产物(handoff、issue body 等)
53 changes: 34 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@
}
```

Once started, the plugin automatically injects 9 slash commands, 9 flow skills, and 5 agents.
Once started, the plugin automatically injects 7 slash commands, 8 flow skills, 5 agents, and 5 deterministic lifecycle tools.

## Command Overview

| Command | Stage | Output |
|---------|-------|--------|
| `/setup` | Setup | `docs/` directory structure and environment validation |
| `/requirements` | Requirements | PRD → `docs/prd/` + GitHub Issue |
| `/design` | Design | Technical specification + ADR → `docs/dev/specs/` + `docs/adr/` |
| `/tasks` | Task decomposition | DAG tasks + Sub Issues → `docs/dev/tasks/` |
| `/code` | Coding | Branch + code + unit tests + PR |
| `/test` | Testing | Trigger CI + monitor + report |
| `/setup` | Setup | `docs/` directory structure, Project Profile, CI/release workflow validation |
| `/requirements` | Requirements | PRD → `docs/prd/` + Draft Parent Issue |
| `/design` | Design | Technical specification + necessary ADR → `docs/dev/specs/` + `docs/adr/` |
| `/tasks` | Task decomposition | DAG tasks + Sub Issues (GitHub 权威源) |
| `/code` | Coding | Task + Runtime TDD evidence + PR |
| `/review` | Review | Dual-axis review + automatic merge |
| `/release` | ⚠️ Manual release | Version → Changelog → Release → npm publish |
| `/handoff` | Handoff | Package context for transfer across sessions |
| `/release` | ⚠️ Manual release | Version proposal → Release PR → tag push → workflow monitor |

## Quick Start

Expand All @@ -60,19 +58,36 @@ npm install @devcxl/opencode-cabbage
src/ # Thin TypeScript layer
├── index.ts # Plugin entry point
├── plugin.ts # Package root resolution
└── plugin/
├── server.ts # Main factory: injects skills, commands, and agents
├── commands.ts # Command loader
├── skills.ts # Skill loader
├── prompts.ts # Prompt loader
├── bootstrap.ts # Startup guidance
└── agents.ts # Agent injection
├── plugin/ # Loaders + tool factories
│ ├── server.ts # Main factory: injects skills, commands, agents, 5 lifecycle tools
│ ├── commands.ts # Command loader
│ ├── skills.ts # Skill loader
│ ├── prompts.ts # Prompt loader
│ ├── bootstrap.ts # Startup guidance
│ ├── agents.ts # Agent injection
│ ├── setup-control.ts # setup_control tool
│ ├── flow-control.ts # flow_control tool
│ ├── task-control.ts # task_control tool
│ ├── tdd-checkpoint.ts # tdd_checkpoint tool
│ └── release-control.ts # release_control tool
└── kernel/ # Deterministic thin kernel
├── slug.ts # Functional slug derivation/validation
├── records.ts # Flow/Task Record CRUD (GitHub authoritative)
├── worktree.ts # Worktree lifecycle (no --force)
├── tdd/ # Runtime TDD pure functions + evidence
├── review.ts # Merge gates (CI/protection/risk/approval)
├── release.ts # Version proposal + tag immutability
├── context.ts # Root CONTEXT.md discovery/injection
├── profile.ts # AGENTS.md Project Profile parsing
├── session-index.ts # Flow→session index + takeover
├── caller.ts # Caller role matrix
├── permission.ts # Permission matching semantics
└── legacy.ts # Legacy FlowRun detection

assets/ # Runtime assets
├── commands/ # 9 slash commands
├── skills/ # 9 flow-* skills
├── commands/ # 7 slash commands
├── skills/ # 8 flow-* skills
├── agents/ # 5 agent definitions
├── context/ # Domain glossary
└── prompts/ # Guidance prompts and templates
```

Expand Down
53 changes: 34 additions & 19 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@
}
```

插件启动后自动注入 9 个 slash command、9 个 flow skill、5 个 agent。
插件启动后自动注入 7 个 slash command、8 个 flow skill、5 个 agent 与 5 个确定性生命周期工具

## 命令一览

| 命令 | 阶段 | 产出 |
|------|------|------|
| `/setup` | 初始化 | `docs/` 目录结构、环境验证 |
| `/requirements` | 需求 | PRD → `docs/prd/` + GitHub Issue |
| `/design` | 设计 | 技术方案 + ADR → `docs/dev/specs/` + `docs/adr/` |
| `/tasks` | 任务拆解 | DAG 任务 + Sub Issues → `docs/dev/tasks/` |
| `/code` | 编码 | 分支 + 代码 + 单测 + PR |
| `/test` | 测试 | 触发 CI + 监控 + 汇报 |
| `/setup` | 初始化 | `docs/` 目录结构、Project Profile、CI/release workflow 校验 |
| `/requirements` | 需求 | PRD → `docs/prd/` + Draft Parent Issue |
| `/design` | 设计 | 技术方案 + 必要 ADR → `docs/dev/specs/` + `docs/adr/` |
| `/tasks` | 任务拆解 | DAG 任务 + Sub Issues(GitHub 权威源) |
| `/code` | 编码 | Task + Runtime TDD evidence + PR |
| `/review` | 审查 | 双轴审查 + 自动合并 |
| `/release` | ⚠️ 手动发布 | 版本 → Changelog → Release → npm publish |
| `/handoff` | 交接 | 打包上下文,跨会话传递 |
| `/release` | ⚠️ 手动发布 | 版本提议 → Release PR → tag push → workflow 监控 |

## 快速开始

Expand All @@ -60,19 +58,36 @@ npm install @devcxl/opencode-cabbage
src/ # TypeScript 薄层
├── index.ts # 插件入口
├── plugin.ts # 包路径解析
└── plugin/
├── server.ts # 主工厂:注入 skills/commands/agents
├── commands.ts # Command 加载器
├── skills.ts # Skill 加载器
├── prompts.ts # Prompt 加载器
├── bootstrap.ts # 启动引导
└── agents.ts # Agent 注入
├── plugin/ # 加载器 + 工具工厂
│ ├── server.ts # 主工厂:注入 skills/commands/agents/5 个生命周期工具
│ ├── commands.ts # Command 加载器
│ ├── skills.ts # Skill 加载器
│ ├── prompts.ts # Prompt 加载器
│ ├── bootstrap.ts # 启动引导
│ ├── agents.ts # Agent 注入
│ ├── setup-control.ts # setup_control 工具
│ ├── flow-control.ts # flow_control 工具
│ ├── task-control.ts # task_control 工具
│ ├── tdd-checkpoint.ts # tdd_checkpoint 工具
│ └── release-control.ts # release_control 工具
└── kernel/ # 确定性薄内核
├── slug.ts # Functional Slug 派生/校验
├── records.ts # Flow/Task Record CRUD(GitHub 权威源)
├── worktree.ts # Worktree 生命周期(无 --force)
├── tdd/ # Runtime TDD 纯函数 + evidence
├── review.ts # 合并门禁(CI/分支保护/风险/approval)
├── release.ts # 版本提议 + tag 不可变校验
├── context.ts # 根 CONTEXT.md 发现/注入
├── profile.ts # AGENTS.md Project Profile 解析
├── session-index.ts # Flow→session 索引 + takeover
├── caller.ts # 调用者角色矩阵
├── permission.ts # 权限匹配语义
└── legacy.ts # 旧 FlowRun 检测

assets/ # 运行时资源
├── commands/ # 9 个 slash command
├── skills/ # 9 个 flow-* skill
├── commands/ # 7 个 slash command
├── skills/ # 8 个 flow-* skill
├── agents/ # 5 个 agent 定义
├── context/ # 领域词汇表
└── prompts/ # 引导提示词 + 模板
```

Expand Down
2 changes: 1 addition & 1 deletion assets/agents/dev-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ permission:
- 开发文档 → `docs/dev/{api,db,guides}/`

### 子 agent 约束
- 禁止在 `/tmp/` 下创建或调试文件,临时产物统一放在 `docs/dev/handoff/` 目录
- 禁止在 `/tmp/` 下创建或调试文件;临时产物放入 worktree 内
- 文档产出必须遵循目录规范

---
Expand Down
41 changes: 0 additions & 41 deletions assets/context/CONTEXT.md

This file was deleted.

2 changes: 1 addition & 1 deletion assets/skills/flow-design/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ worktree 创建与 Planning PR 创建均由内核工具完成,创建动作全

## CONTEXT.md 术语

阅读项目根 CONTEXT.md 与 skills 内 `_context/CONTEXT.md` 了解领域术语
阅读项目根 CONTEXT.md(领域术语权威,已自动注入内容与 digest)
设计中发现的新术语经用户确认后写入根 CONTEXT.md(术语权威)。

## Output
Expand Down
6 changes: 1 addition & 5 deletions docs/dev/guides/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ npm run typecheck # 类型检查

## 发布

```bash
npm version patch|minor|major
git push origin main --tags
npm publish
```
发布走项目自身的 Release 流程:按 Profile 的版本规则更新版本文件 → 创建 Release PR → 人工批准合并 → 打 tag push → 由 `.github/workflows/release-publish.yml`(或项目配置的 release workflow)自动发布。不直接手动 `npm publish`。
22 changes: 0 additions & 22 deletions docs/dev/handoff/design-comment.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/dev/out-of-scope.md

This file was deleted.

Loading
Loading