用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kofj/rdd --skill rdd-migrate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | rdd-migrate |
| description | Migrate an existing project to RDD framework, preserving existing structure and documentation |
Migrate existing projects to RDD (Roadmap Driven Development) paradigm
This skill guides the migration of existing projects to the RDD development paradigm. It analyzes project structure, code, and documentation to create a comprehensive RDD-compatible project organization without disrupting existing work.
When to Use:
Analyze the existing project structure to understand:
Project Analysis Checklist:
- [ ] Identify project type (library, service, application, CLI)
- [ ] Map existing directory structure
- [ ] Identify existing documentation files
- [ ] Find configuration files (package.json, Cargo.toml, go.mod, etc.)
- [ ] Locate test directories and patterns
- [ ] Identify build/deployment scripts
- [ ] Find existing CHANGELOG or version history
- [ ] Identify existing ADRs or decision logs
Scan the codebase for:
Code Analysis Checklist:
- [ ] Main entry points and core modules
- [ ] Key abstractions and interfaces
- [ ] External dependencies
- [ ] Test coverage status
- [ ] TODO/FIXME/HACK comments (technical debt indicators)
- [ ] Configuration patterns
- [ ] Error handling patterns
Identify missing RDD documentation:
Documentation Gap Checklist:
- [ ] Is there a project charter? (charter.md)
- [ ] Are engineering principles documented?
- [ ] Is there any roadmap or milestone tracking?
- [ ] Are design decisions recorded? (ADRs)
- [ ] Is technical debt tracked explicitly?
- [ ] Is there a handoff mechanism for agent continuity?
Determine current project state:
State Assessment Questions:
- What is the current development phase?
- What features are complete/in-progress/planned?
- Are there any active branches or work-in-progress?
- What are the known issues or blockers?
- What technical debt exists?
Generate a migration plan at docs/migration/migration-plan.md:
# RDD Migration Plan
**Project**: [Project Name]
**Migration Date**: YYYY-MM-DD
**Current State**: [Description]
## Analysis Summary
### Project Type
[Library/Service/Application/CLI]
### Current Structure
[Brief description of existing structure]
### Key Findings
- Finding 1
- Finding 2
- Finding 3
## Migration Roadmap
| Phase | Task | Priority | Status |
|-------|------|----------|--------|
| 1 | Create RDD directory structure | P0 | [ ] |
| 2 | Create project charter | P0 | [ ] |
| 3 | Document engineering principles | P0 | [ ] |
| 4 | Create initial roadmap | P0 | [ ] |
| 5 | Document existing ADRs | P1 | [ ] |
| 6 | Create technical debt ledger | P1 | [ ] |
| 7 | Create handoff documentation | P1 | [ ] |
| 8 | Set up hooks configuration | P2 | [ ] |
## Existing Technical Debt
| ID | Description | Priority | Source |
|----|-------------|----------|--------|
| TD-01 | [From TODO/FIXME scan] | [Priority] | [File:line] |
## Decisions Required
- [ ] Decision 1: [Description]
- [ ] Decision 2: [Description]
## Risks
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| [Risk 1] | H/M/L | H/M/L | [Strategy] |
Break migration into stages:
Stage 0: Foundation Setup
.rdd/ directory with configurationdocs/ directory structureStage 1: Current State Documentation
Stage 2: History Capture
Stage 3: Process Integration
Create the standard RDD directory structure:
.rdd/
├── config.yml
├── hooks.yml (optional)
└── cache/
├── context.json
└── state.json
docs/
├── framework/
│ ├── project-governance-spec.md
│ ├── agentic-code-execution-spec.md
│ └── standards-authoring-spec.md
├── stages/
│ ├── stage-roadmap.md
│ └── stage-0.md (current/most recent stage)
├── handoff/
│ └── handoff-latest.md
├── 01-charter.md
├── 02-engineering-principles.md
├── 03-stage-based-development.md
├── 08-autonomous-decisions.md
├── 10-review-practices.md
├── 11-next-steps.md
└── 12-technical-debt.md
docs/01-charter.md)From existing project documentation, extract:
# Project Charter
## Vision
[One paragraph describing what this project aims to achieve]
## Scope
### In Scope
- [What the project does]
### Out of Scope
- [What the project explicitly does not do]
## Success Criteria
- [How success is measured]
## Stakeholders
- [Who cares about this project]
## Timeline
- [High-level timeline or "Continuous Development"]
## Resources
- [Key dependencies, technologies]
docs/02-engineering-principles.md)Extract or define principles from codebase patterns:
# Engineering Principles
## Core Principles
1. [Principle observed in codebase]
2. [Principle observed in codebase]
3. [Principle observed in codebase]
## Coding Standards
- [Standards observed or to be adopted]
## Testing Philosophy
- [Testing patterns observed]
## Documentation Requirements
- [Documentation standards]
docs/stages/stage-roadmap.md)From existing features/plans, create roadmap:
# Project Roadmap
**Last Updated**: YYYY-MM-DD
**Current Stage**: Stage N
**Overall Progress**: X%
## Vision
[Project vision]
## Stage Overview
| Stage | Title | Status | Priority | Dependencies |
|-------|-------|--------|----------|--------------|
| 0 | Foundation | Complete | P0 | None |
| 1 | [Current Work] | In Progress | P0 | Stage 0 |
| 2 | [Next Feature] | Planning | P1 | Stage 1 |
## Current Focus
**Active Stage**: Stage N
**Current Objective**: [What's being worked on]
docs/12-technical-debt.md)From codebase scan, create debt ledger:
# Technical Debt Ledger
## Active Debt
### TD-01: [Title from TODO/FIXME]
- **Priority**: [Blocking/Degraded Functionality/Technical Optimization]
- **Source**: [File:line]
- **Original Description**: [Quote from code comment]
- **Suggested Resolution Stage**: [Stage N or "Special iteration"]
- **Created Date**: YYYY-MM-DD
## Resolved Debt
[Empty initially, populated as debt is addressed]
docs/08-autonomous-decisions.md)Document significant past decisions:
# Autonomous Decisions Log
## Decision History
### Decision 1: [Past Decision Title]
**Background**: [What circumstances led to this decision]
**Decision**: [What path was chosen]
**Rationale**: [Why this path was selected]
**Impact on Subsequent Stages**:
- [How this affects future work]
**Date**: YYYY-MM-DD (approximate if unknown)
**Related Stage**: Stage 0 (Historical)
**Alternatives Considered**:
1. [Alternative 1]: [Why not chosen]
2. [Alternative 2]: [Why not chosen]
docs/handoff/handoff-latest.md)Capture current state for agent continuity:
# Agent Handoff Document
Generated: YYYY-MM-DD
Previous Agent: Migration
Current Stage: Stage N
## Current Progress
**Phase**: [Phase description]
**Progress Percentage**: X%
**Current Gate**: Gate 0
## Context for New Agent
### Project Overview
[Brief description of what this project does]
### Key Files to Read First
1. [Critical file 1] - [Why important]
2. [Critical file 2] - [Why important]
### Important Context
- [Context that isn't obvious from documents]
- [Any implicit knowledge that should be explicit]
### Commands to Know
- `task [command]` - [Description]
## Next Single Action
**Immediate Next Step**: [What to do next]
**How to Execute**:
1. [Step 1]
2. [Step 2]
AGENTS.md:
# Agent Entry Point
This project follows RDD (Roadmap Driven Development) paradigm.
## Quick Start
1. Read `docs/stages/stage-roadmap.md` for project overview
2. Read `docs/handoff/handoff-latest.md` for current state
3. Read `docs/12-technical-debt.md` for known issues
4. Proceed with current Stage from appropriate Gate
## Key Documents
| Document | Purpose |
|----------|---------|
| `docs/01-charter.md` | Project vision and scope |
| `docs/stages/stage-roadmap.md` | Current roadmap |
| `docs/08-autonomous-decisions.md` | Decision history |
| `docs/12-technical-debt.md` | Technical debt ledger |
## RDD Skills Available
- `/rdd-core` - Core RDD concepts
- `/rdd-templates` - Document templates
- `/rdd-migrate` - Migration guide
CLAUDE.md:
# Claude Code Entry Point
This project uses RDD (Roadmap Driven Development).
## Getting Started
For Claude Code agents:
1. Start with `docs/handoff/handoff-latest.md`
2. Check `docs/stages/stage-roadmap.md` for current stage
3. Follow the Stage progression through the Gates
## Core Principles
- Humans define Roadmap, Agents execute Stages
- Every Stage is verifiable, rollback-capable, handoff-ready
- Documentation is synchronous - no "docs pending"
- All technical debt must be visible in the ledger
## Reference
See `.claude/skills/rdd-core/SKILL.md` for detailed RDD specification.
.rdd/config.yml)# RDD Configuration
project:
name: [Project Name]
type: [library|service|application|cli]
stages:
directory: docs/stages
current: 0
hooks:
enabled: false # Enable after configuring hooks.yml
notifications:
default_level: P2
documentation:
auto_sync: true
templates: .claude/skills/rdd-templates/SKILL.md
.rdd/hooks.yml)# Hook Notification Configuration
# Uncomment and configure channels as needed
channels:
# wecom:
# webhook_url: ${WECOM_WEBHOOK_URL}
# email:
# smtp_host: ${SMTP_HOST}
# smtp_port: 587
# from: ${SMTP_FROM}
# to: ${SMTP_TO}
# bark:
# server: ${BARK_SERVER}
# key: ${BARK_KEY}
# telegram:
# bot_token: ${TELEGRAM_BOT_TOKEN}
# chat_id: ${TELEGRAM_CHAT_ID}
# webhook:
# url: ${WEBHOOK_URL}
# method: POST
# headers:
# Content-Type: application/json
triggers:
roadmap_change:
level: P0
channels: [wecom, email]
block: true
consecutive_failure:
level: P0
channels: [wecom, bark, telegram]
block: true
condition:
failure_count: 3
stage_complete:
level: P2
channels: [wecom]
block: false
Add to Taskfile.yml:
version: '3'
tasks:
# RDD Commands
rdd:status:
desc: Show RDD project status
cmds:
- echo "Current Stage: $(grep 'Current Stage' docs/stages/stage-roadmap.md || echo 'Unknown')"
- echo "Check docs/handoff/handoff-latest.md for details"
rdd:roadmap:
desc: Show project roadmap
cmds:
- cat docs/stages/stage-roadmap.md
rdd:debt:
desc: Show technical debt
cmds:
- cat docs/12-technical-debt.md
rdd:handoff:
desc: Show handoff document
cmds:
- cat docs/handoff/handoff-latest.md
rdd:fresh-check:
desc: Verify new agent can take over
cmds:
- echo
Before marking migration complete:
Migration Validation Checklist:
- [ ] .rdd/ directory created with config.yml
- [ ] docs/ directory structure matches RDD specification
- [ ] Project charter exists and is meaningful
- [ ] Engineering principles documented
- [ ] Initial roadmap created with current stage
- [ ] Technical debt ledger created (even if empty)
- [ ] ADR log created for past decisions
- [ ] Handoff document captures current state
- [ ] AGENTS.md entry point exists
- [ ] CLAUDE.md entry point exists
- [ ] CHANGELOG.md has migration entry
- [ ] Taskfile.yml has RDD commands
Verify migration success with fresh-agent-check:
Fresh Agent Check:
1. Can a new agent understand the project from docs/01-charter.md?
2. Can a new agent identify current work from docs/handoff/handoff-latest.md?
3. Can a new agent understand what to do next from docs/stages/stage-roadmap.md?
4. Can a new agent identify known issues from docs/12-technical-debt.md?
5. Can a new agent understand past decisions from docs/08-autonomous-decisions.md?
When validation passes:
Update docs/stages/stage-roadmap.md:
Create migration ADR in docs/08-autonomous-decisions.md:
### Decision N: RDD Migration
**Background**: Project migrated to RDD paradigm for improved agent-driven development
**Decision**: Adopted RDD structure with full documentation suite
**Rationale**: Enables near-fully-autonomous agent-driven development with minimal human intervention
**Impact on Subsequent Stages**:
- All future work follows Stage-based progression
- Technical debt must be explicitly tracked
- Documentation updates are synchronous with code changes
**Date**: YYYY-MM-DD
Update CHANGELOG.md:
## [Migration] - YYYY-MM-DD
### Added
- RDD directory structure (.rdd/)
- Project charter (docs/01-charter.md)
- Engineering principles (docs/02-engineering-principles.md)
- Initial roadmap (docs/stages/stage-roadmap.md)
- Technical debt ledger (docs/12-technical-debt.md)
- ADR log (docs/08-autonomous-decisions.md)
- Handoff documentation (docs/handoff/handoff-latest.md)
- Entry points (AGENTS.md, CLAUDE.md)
- Taskfile RDD commands
### Changed
- Project structure aligned with RDD specification
For new projects with minimal existing code:
For projects in active development:
For mature projects in maintenance:
For projects needing significant refactoring:
Symptom: Don't know why decisions were made
Solution:
Symptom: Multiple README files, outdated docs
Solution:
Symptom: Hard to define what constitutes a Stage
Solution:
Symptom: Overwhelming number of TODOs/FIXMEs
Solution:
After successful migration:
Verify Hook Notifications (if configured)
Begin RDD Workflow
Iterate on Documentation
For detailed RDD specification, see:
prompt.md - Full RDD specification.claude/skills/rdd-core/SKILL.md - Core RDD concepts.claude/skills/rdd-templates/SKILL.md - Document templates