Add cc-switch-dev-workflow skill

这个提交包含在:
X
2026-03-26 00:27:17 -07:00
父节点 fc8ad7c145
当前提交 dcb2a10ad8
修改 46 个文件,包含 3393 行新增0 行删除

查看文件

@@ -0,0 +1,53 @@
# Templates Index
## Purpose
提供知识库中的标准模板集合,统一输入输出格式,降低 agent 自由发挥空间。
## When to Use
- 新建 `CLAUDE.md`
- 新建 `ANALYSIS.md`
- 新建 `TODO.yaml`
- 新建 Spec、TDD 计划、handoff 和验收清单
## Inputs
- 当前阶段目标
- 当前范围边界
- 当前来源文档
## Outputs
- 标准化模板文件
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- 阶段相关 skill
## Steps
1. 从本页选择模板。
2. 按模板填入当前项目内容。
3. 保持字段结构不变,只替换内容。
## Exit Criteria
- 阶段产物都使用统一模板
## Failure Recovery
- 如果 agent 开始自定义模板字段,回到本页恢复标准结构
## Related Templates
- 全部模板均在本目录
## Template List
| 模板 | 用途 |
|---|---|
| [`claude-md-template.md`](./claude-md-template.md) | 项目执行说明 |
| [`analysis-template.md`](./analysis-template.md) | 阶段分析报告 |
| [`todo-yaml-template.md`](./todo-yaml-template.md) | 任务清单 |
| [`spec-template.md`](./spec-template.md) | 单份 Spec |
| [`tdd-plan-template.md`](./tdd-plan-template.md) | 复杂任务实施计划 |
| [`agent-handoff-template.md`](./agent-handoff-template.md) | agent 交接契约 |
| [`acceptance-checklist-template.md`](./acceptance-checklist-template.md) | 验收清单 |

查看文件

@@ -0,0 +1,70 @@
# Template: Acceptance Checklist
## Purpose
把最终人工验收标准固定下来,避免发布前只靠口头确认。
## When to Use
- Acceptance 阶段
- 里程碑发布前
## Inputs
- 最终代码库
- `SPECS/*.md`
- 测试结果
## Outputs
- 验收结论
## Primary Agent/Model
人工主导
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
-
## Steps
1. 按清单逐项确认。
2. 给每个问题定级。
3. 决定发布、回退或继续收敛。
## Exit Criteria
- 通过/不通过有明确结论
## Failure Recovery
- 若结论模糊,重新按清单走,不做主观拍板
## Related Templates
- [`agent-handoff-template.md`](./agent-handoff-template.md)
## Template
```markdown
# Acceptance Checklist
## Functional
- [ ] All SPEC clauses implemented
- [ ] Critical user flows work
- [ ] Edge cases handled
## Testing
- [ ] All tests pass
- [ ] Core coverage acceptable
- [ ] No known blocking race/security issue
## Documentation
- [ ] SPECS align with code
- [ ] Public APIs documented
- [ ] README/update notes complete
## Code Quality
- [ ] Lint/build pass
- [ ] No unresolved high-risk architecture issue
- [ ] Module boundaries remain clear
## Decision
- [ ] Release
- [ ] Return to Alignment
- [ ] Return to Code
- [ ] Record follow-up items
```

查看文件

@@ -0,0 +1,68 @@
# Template: Agent Handoff
## Purpose
统一 agent 之间的交接格式,压缩上下文且保留必需边界。
## When to Use
- 线程切换
- 角色切换
- fallback 回主线程
## Inputs
- 上一角色高密度产物
- 当前边界
## Outputs
- handoff 摘要
## Primary Agent/Model
当前发起 handoff 的 agent
## Secondary Agent/Model
接收 handoff 的 agent
## Required Skills
-
## Steps
1. 填满所有字段。
2. 删除无关对话。
3. 确认接收方无需回看原线程。
## Exit Criteria
- 接收方能立即开始执行
## Failure Recovery
- 若 handoff 无法直接执行,说明摘要还不够密
## Related Templates
- [`analysis-template.md`](./analysis-template.md)
## Template
```markdown
# Handoff
## Goal
-
## Scope
-
## Non-Goals
-
## Source of Truth
-
## Constraints
-
## Deliverable
-
## Validation
-
## Escalation
- Stop and ask when:
```

查看文件

@@ -0,0 +1,78 @@
# Template: ANALYSIS.md
## Purpose
统一阶段分析报告结构,确保下一步 tasking 有稳定输入。
## When to Use
- Research
- Spec
- Code
- Alignment
## Inputs
- 当前阶段源材料
- 当前阶段目标
- 当前阶段边界
## Outputs
- `ANALYSIS.md`
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- 对应阶段 analyzing skill
## Steps
1. 先写范围和目标。
2. 再写优先级、结构拆分和风险。
3. 只保留下一步 tasking 真正需要的信息。
## Exit Criteria
- tasking agent 不需要回看原始长文就能生成任务
## Failure Recovery
- 如果分析报告无法直接生成任务,说明范围还没压缩好
## Related Templates
- [`todo-yaml-template.md`](./todo-yaml-template.md)
- [`agent-handoff-template.md`](./agent-handoff-template.md)
## Template
```markdown
# ANALYSIS
## Goal
-
## Scope
- Included:
- Excluded:
## Inputs
-
## Findings
-
## Priority
1.
2.
3.
## Structure
- Category A:
- Category B:
## Risks
-
## Decisions Needed
-
## Exit Criteria
-
```

查看文件

@@ -0,0 +1,93 @@
# Template: CLAUDE.md
## Purpose
生成项目级执行说明,让 agent 始终在固定边界内工作。
## When to Use
- Setup 阶段
- 老项目补规范时
## Inputs
- 清洗后的会议纪要
- 技术轨道决策
- 项目目标与边界
## Outputs
- `CLAUDE.md`
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- `ralphy-initializing`
## Steps
1. 用下方模板生成草案。
2. 对照 `platform/``orchestration/` 页面补齐白名单和流程约束。
3. 审核后作为项目执行说明固化。
## Exit Criteria
- `CLAUDE.md` 足够让实现 agent 不再随机发挥
## Failure Recovery
- 若缺少禁用项、例外接口或验收标准,禁止进入后续阶段
## Related Templates
- [`analysis-template.md`](./analysis-template.md)
## Template
```markdown
# CLAUDE.md
## Project
- Name:
- Goal:
- Audience:
- In Scope:
- Out of Scope:
## Design Philosophy
- KISS:
- DRY:
- YAGNI:
- Type Safety First:
- Preferred Architectural Shape:
## Default Stack
- Track:
- Language:
- UI:
- Styling:
- Auth:
- Data Fetching:
- Router:
- Service Layer:
- ORM:
- Database:
## Hard Boundaries
- Do not introduce:
- Do not modify:
- Do not bypass:
- Exceptions require:
## Process Requirements
- Follow stages:
- Source of truth:
- Required review gates:
- Required testing posture:
- Required refactor rhythm:
## Skills And Templates
- Preferred skills:
- Required templates:
## Definition Of Done
- Spec approved:
- Tests pass:
- Alignment complete:
- Acceptance signed off:
```

查看文件

@@ -0,0 +1,70 @@
# Template: SPEC
## Purpose
统一单份 Spec 的章节结构和内容边界。
## When to Use
- Spec 阶段
- 老项目补 Spec
## Inputs
- `.research/*.md`
- 业务目标
- 边界与术语
## Outputs
- `SPECS/*.md`
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- `spec-reviewing`
- 若已安装可选:`spec-writing`
## Steps
1. 用固定结构写 Spec。
2. 只保留系统契约,不写教程。
3. 审查通过后再进入实施。
## Exit Criteria
- Spec 可被违反、可被测试、可被引用
## Failure Recovery
- 若内容无法被违反,移出 Spec
- 若写成实现细节,回退到更高抽象层
## Related Templates
- [`analysis-template.md`](./analysis-template.md)
## Template
```markdown
# <SPEC Title>
## Overview
- Defines:
- Not Covered:
- Related SPECS:
## Terminology
-
## Domain Sections
### <Section Name>
- Rule:
- Acceptance:
> **Why**:
> **Rejected**:
## Forbidden
- Do not:
- Use instead:
- Reason:
## References
- Internal:
- External:
```

查看文件

@@ -0,0 +1,87 @@
# Template: TDD Plan
## Purpose
为复杂实现任务提供统一的 `.plans/*.md` 结构,确保实施 agent 拿到的是高密度执行计划,而不是松散说明。
## When to Use
- Code 阶段的复杂任务
- Alignment 阶段的缺口补齐任务
## Inputs
- `SPECS/*.md`
- 现有代码现状
- 当前任务范围
## Outputs
- `.plans/YYYY-MM-DD-<slug>.md`
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- `tdd-planning`
## Steps
1. 明确约束和依赖。
2. 定义接口契约。
3. 分阶段列出测试与实现顺序。
## Exit Criteria
- 实现 agent 无需回看完整 Spec 就能开始做 TDD
## Failure Recovery
- 如果计划没有测试场景或验收标准,计划不合格
## Related Templates
- [`todo-yaml-template.md`](./todo-yaml-template.md)
## Template
```markdown
# TDD Plan: <Feature>
## Goal
-
## Scope
- Included:
- Excluded:
## Constraints
-
## Current State
-
## Architecture
- Modules touched:
- Dependency order:
## Interface Contract
- Public API:
- Input:
- Output:
- Errors:
## Test Plan
1. Failing test:
2. Minimal implementation:
3. Refactor:
## Phases
### Phase 1
-
### Phase 2
-
## Validation
- Unit tests:
- Integration tests:
- Lint/build:
## Acceptance Criteria
-
```

查看文件

@@ -0,0 +1,68 @@
# Template: TODO.yaml
## Purpose
统一任务清单格式,保证任务标题自包含并适配循环执行。
## When to Use
- Spec tasking
- Code tasking
- Alignment tasking
## Inputs
- 已审核的 `ANALYSIS.md`
- 当前阶段的来源文件
## Outputs
- `TODO.yaml`
## Primary Agent/Model
`GPT-5.4 Pro xhigh`
## Secondary Agent/Model
`Claude Opus 4.6`
## Required Skills
- `spec-tasking`
- `spec-gap-tasking`
- `spec-implementing-tasking`
## Steps
1. 每个任务标题都写清 `Action + Where + Reference`
2. 复杂任务拆成 `Plan + Impl`
3. 每批任务插入质量检查点。
## Exit Criteria
- 任务可以只看标题执行
## Failure Recovery
- 如果标题读不出范围和依据,重写任务,不补描述赌运气
## Related Templates
- [`analysis-template.md`](./analysis-template.md)
## Template
```yaml
tasks:
# Priority 1
- title: "Plan <feature> (<operation>) and use <planning-skill> to generate .plans/<date>-<slug>.md"
description: "Scope: <where>. Reference: <spec/research/source>."
completed: false
- title: "Implement <feature> in <where>, covering <reference>, and use <implementing-skill> to follow .plans/<date>-<slug>.md"
description: "Validation: <tests/checks>. Impact: <create/modify files>."
completed: false
- title: "Review <where> for simplification opportunities and use code-simplifying skill"
description: "Keep behavior unchanged."
completed: false
- title: "Review <where> for refactoring opportunities and use code-refactoring skill to generate .plans/<date>-<refactor-slug>.md"
description: "Focus: DRY/SRP/OCP/KISS."
completed: false
```
## Title Rules
- 必须是一行
- 必须点名模块或路径
- 必须点名依据文档或计划文件
- 不写“实现某功能”这种无上下文标题