Skip to content

Commit 21e71a4

Browse files
author
catlog22
committed
feat: convert lite-plan and multi-cli-plan commands to orchestrator+phases skills
Convert workflow commands to unified skill structure with thin router pattern: - workflow-lite-plan: routes lite-plan + lite-execute with prompt enhancement - workflow-multi-cli-plan: routes multi-cli-plan + lite-execute with prompt enhancement Both preserve original command content verbatim in phase files.
1 parent 674bdc7 commit 21e71a4

6 files changed

Lines changed: 3136 additions & 0 deletions

File tree

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
name: workflow-lite-plan
3+
description: Lightweight planning and execution skill - route to lite-plan or lite-execute with prompt enhancement. Triggers on "workflow:lite-plan", "workflow:lite-execute".
4+
allowed-tools: Skill, Task, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep
5+
---
6+
7+
# Workflow Lite-Plan
8+
9+
Unified lightweight planning and execution skill. Routes to lite-plan (planning pipeline) or lite-execute (execution engine) based on trigger, with prompt enhancement for both modes.
10+
11+
## Architecture Overview
12+
13+
```
14+
┌─────────────────────────────────────────────────────┐
15+
│ SKILL.md (Router + Prompt Enhancement) │
16+
│ → Detect mode → Enhance prompt → Dispatch to phase │
17+
└──────────────────────┬──────────────────────────────┘
18+
19+
┌───────────┼───────────┐
20+
↓ ↓
21+
┌───────────┐ ┌───────────┐
22+
│ lite-plan │ │lite-execute│
23+
│ Phase 1 │ │ Phase 2 │
24+
│ Plan+Exec │──handoff─→│ Standalone │
25+
└───────────┘ └───────────┘
26+
```
27+
28+
## Mode Detection & Routing
29+
30+
```javascript
31+
const args = $ARGUMENTS
32+
const mode = detectMode()
33+
34+
function detectMode() {
35+
if (skillName === 'workflow:lite-execute') return 'execute'
36+
return 'plan' // default: workflow:lite-plan
37+
}
38+
```
39+
40+
**Routing Table**:
41+
42+
| Trigger | Mode | Phase Document | Description |
43+
|---------|------|----------------|-------------|
44+
| `workflow:lite-plan` | plan | [phases/01-lite-plan.md](phases/01-lite-plan.md) | Full planning pipeline (explore → plan → confirm → execute) |
45+
| `workflow:lite-execute` | execute | [phases/02-lite-execute.md](phases/02-lite-execute.md) | Standalone execution (in-memory / prompt / file) |
46+
47+
## Prompt Enhancement
48+
49+
Before dispatching to the target phase, enhance context:
50+
51+
```javascript
52+
// Step 1: Check for project context files
53+
const hasProjectTech = fileExists('.workflow/project-tech.json')
54+
const hasProjectGuidelines = fileExists('.workflow/project-guidelines.json')
55+
56+
// Step 2: Log available context
57+
if (hasProjectTech) {
58+
console.log('Project tech context available: .workflow/project-tech.json')
59+
}
60+
if (hasProjectGuidelines) {
61+
console.log('Project guidelines available: .workflow/project-guidelines.json')
62+
}
63+
64+
// Step 3: Dispatch to phase
65+
if (mode === 'plan') {
66+
// Read phases/01-lite-plan.md and execute
67+
} else {
68+
// Read phases/02-lite-execute.md and execute
69+
}
70+
```
71+
72+
## Execution Flow
73+
74+
### Plan Mode (workflow:lite-plan)
75+
76+
```
77+
1. Parse flags (-y/--yes, -e/--explore) and task description
78+
2. Enhance prompt with project context availability
79+
3. Read phases/01-lite-plan.md
80+
4. Execute lite-plan pipeline (Phase 1-5 within the phase doc)
81+
5. lite-plan Phase 5 internally calls workflow:lite-execute via Skill handoff
82+
```
83+
84+
### Execute Mode (workflow:lite-execute)
85+
86+
```
87+
1. Parse flags (--in-memory, -y/--yes) and input
88+
2. Enhance prompt with project context availability
89+
3. Read phases/02-lite-execute.md
90+
4. Execute lite-execute pipeline (input detection → execution → review)
91+
```
92+
93+
## Usage
94+
95+
```bash
96+
# Plan mode
97+
/workflow:lite-plan "实现JWT认证" # Interactive
98+
/workflow:lite-plan --yes "实现JWT认证" # Auto mode
99+
/workflow:lite-plan -y -e "优化数据库查询性能" # Auto + force exploration
100+
101+
# Execute mode (standalone)
102+
/workflow:lite-execute "Add unit tests for auth" # Prompt description
103+
/workflow:lite-execute plan.json # File input
104+
/workflow:lite-execute --in-memory # Called by lite-plan internally
105+
```
106+
107+
## Phase Reference Documents
108+
109+
| Phase | Document | Purpose |
110+
|-------|----------|---------|
111+
| 1 | [phases/01-lite-plan.md](phases/01-lite-plan.md) | Complete planning pipeline: exploration, clarification, planning, confirmation, handoff |
112+
| 2 | [phases/02-lite-execute.md](phases/02-lite-execute.md) | Complete execution engine: input modes, task grouping, batch execution, code review |

0 commit comments

Comments
 (0)