orchestrix-yuri 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +122 -0
- package/bin/install.js +25 -0
- package/lib/installer.js +86 -0
- package/package.json +31 -0
- package/skill/SKILL.md +136 -0
- package/skill/data/deployment-options.yaml +44 -0
- package/skill/data/phase-routing.yaml +50 -0
- package/skill/resources/.gitignore.template +29 -0
- package/skill/resources/core-config.template.yaml +67 -0
- package/skill/resources/handoff-detector.sh +374 -0
- package/skill/resources/mcp.json.template +18 -0
- package/skill/resources/o-help.md +23 -0
- package/skill/resources/o-status.md +37 -0
- package/skill/resources/o.md +87 -0
- package/skill/resources/settings.local.json +15 -0
- package/skill/resources/start-orchestrix.sh +373 -0
- package/skill/scripts/ensure-session.sh +61 -0
- package/skill/scripts/monitor-agent.sh +61 -0
- package/skill/scripts/scan-stories.sh +16 -0
- package/skill/scripts/start-planning.sh +20 -0
- package/skill/tasks/yuri-create-project.md +258 -0
- package/skill/tasks/yuri-deploy-project.md +139 -0
- package/skill/tasks/yuri-develop-project.md +150 -0
- package/skill/tasks/yuri-handle-change.md +239 -0
- package/skill/tasks/yuri-plan-project.md +158 -0
- package/skill/tasks/yuri-resume.md +132 -0
- package/skill/tasks/yuri-status.md +156 -0
- package/skill/tasks/yuri-test-project.md +172 -0
- package/skill/templates/memory.template.yaml +77 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Phase 1: Create Project
|
|
2
|
+
|
|
3
|
+
**Command**: `*create`
|
|
4
|
+
**Purpose**: Collect project information from user and scaffold a complete Orchestrix project.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- None (this is the entry point)
|
|
11
|
+
|
|
12
|
+
## Resource Directory
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
RESOURCE_DIR="${CLAUDE_SKILL_DIR}/resources"
|
|
16
|
+
# Resolves to: ~/.claude/skills/yuri/resources/
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 0: Check Resumption
|
|
22
|
+
|
|
23
|
+
- If `.yuri/memory.yaml` exists AND `phase1_create: complete` → offer skip to Phase 2
|
|
24
|
+
- If `.yuri/memory.yaml` exists AND `phase1_create: in_progress` → resume from last saved step
|
|
25
|
+
- Otherwise → proceed to Step 1
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 1: Collect Orchestrix License Key
|
|
30
|
+
|
|
31
|
+
Ask the user for their Orchestrix license key.
|
|
32
|
+
|
|
33
|
+
**Validation rules**:
|
|
34
|
+
- Must start with `orch_live_` or `orch_trial_`
|
|
35
|
+
- No key → inform: "Apply at https://orchestrix-mcp.youlidao.ai"
|
|
36
|
+
- User says "configure later" → record empty, use `YOUR_LICENSE_KEY_HERE` placeholder
|
|
37
|
+
- Invalid format → prompt again with format hint
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Step 2: Collect Project Basics
|
|
42
|
+
|
|
43
|
+
Ask the user for:
|
|
44
|
+
1. **Project name** (Chinese or English)
|
|
45
|
+
2. **Core problem** (1-3 sentences describing what the project solves)
|
|
46
|
+
|
|
47
|
+
Auto-generate the directory name:
|
|
48
|
+
- Chinese → translate to English meaning, kebab-case (e.g. "智能柜管理系统" → `smart-locker-management`)
|
|
49
|
+
- English → kebab-case
|
|
50
|
+
- Max 30 characters
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Step 3: Confirm Summary
|
|
55
|
+
|
|
56
|
+
Present this confirmation to the user:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
## 📋 Project Understanding Confirmation
|
|
60
|
+
|
|
61
|
+
| Item | Content |
|
|
62
|
+
|------|---------|
|
|
63
|
+
| **Project Name** | {name} |
|
|
64
|
+
| **Project Directory** | ~/Codes/{kebab-name}/ |
|
|
65
|
+
| **Core Problem** | {description} |
|
|
66
|
+
| **License Key** | {provided / pending} |
|
|
67
|
+
|
|
68
|
+
Confirm? (Y/N, or specify what to change)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Wait for `Y`. If `N` → return to the specific question the user wants to change.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Step 4: Create Directory Structure
|
|
76
|
+
|
|
77
|
+
After user confirms, create the project skeleton:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
PROJECT_DIR=~/Codes/{dir-name}
|
|
81
|
+
mkdir -p "$PROJECT_DIR/docs"
|
|
82
|
+
mkdir -p "$PROJECT_DIR/.claude/commands"
|
|
83
|
+
mkdir -p "$PROJECT_DIR/.claude/hooks"
|
|
84
|
+
mkdir -p "$PROJECT_DIR/.orchestrix-core/scripts"
|
|
85
|
+
mkdir -p "$PROJECT_DIR/.yuri/phase-logs"
|
|
86
|
+
mkdir -p "$PROJECT_DIR/.yuri/checkpoints"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Step 5: Generate .mcp.json
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
RESOURCE_DIR="${CLAUDE_SKILL_DIR}/resources"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
1. Read `$RESOURCE_DIR/mcp.json.template`
|
|
98
|
+
2. Replace `{{ORCHESTRIX_LICENSE_KEY}}` → user's key (or `YOUR_LICENSE_KEY_HERE`)
|
|
99
|
+
3. Write → `$PROJECT_DIR/.mcp.json`
|
|
100
|
+
|
|
101
|
+
If a non-template `mcp.json` exists in resources, use it directly.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Step 6: Copy Orchestrix Infrastructure
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
RESOURCE_DIR="${CLAUDE_SKILL_DIR}/resources"
|
|
109
|
+
|
|
110
|
+
cp "$RESOURCE_DIR/settings.local.json" "$PROJECT_DIR/.claude/settings.local.json"
|
|
111
|
+
cp "$RESOURCE_DIR/handoff-detector.sh" "$PROJECT_DIR/.claude/hooks/handoff-detector.sh"
|
|
112
|
+
chmod +x "$PROJECT_DIR/.claude/hooks/handoff-detector.sh"
|
|
113
|
+
cp "$RESOURCE_DIR/o.md" "$PROJECT_DIR/.claude/commands/o.md"
|
|
114
|
+
cp "$RESOURCE_DIR/o-help.md" "$PROJECT_DIR/.claude/commands/o-help.md"
|
|
115
|
+
cp "$RESOURCE_DIR/o-status.md" "$PROJECT_DIR/.claude/commands/o-status.md"
|
|
116
|
+
cp "$RESOURCE_DIR/start-orchestrix.sh" "$PROJECT_DIR/.orchestrix-core/scripts/start-orchestrix.sh"
|
|
117
|
+
chmod +x "$PROJECT_DIR/.orchestrix-core/scripts/start-orchestrix.sh"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Step 7: Generate core-config.yaml
|
|
123
|
+
|
|
124
|
+
1. Read `$RESOURCE_DIR/core-config.template.yaml`
|
|
125
|
+
2. Replace placeholders:
|
|
126
|
+
- `{{PROJECT_NAME}}` → project name
|
|
127
|
+
- `{{REPO_ID}}` → english directory name (kebab-case)
|
|
128
|
+
- `{{TEST_COMMAND}}` → infer from tech stack:
|
|
129
|
+
|
|
130
|
+
| Tech Stack | Test Command |
|
|
131
|
+
|------------|-------------|
|
|
132
|
+
| Node.js / React / Next.js / Vue | `npm test` |
|
|
133
|
+
| Python / Django / Flask / FastAPI | `pytest` |
|
|
134
|
+
| Go | `go test ./...` |
|
|
135
|
+
| Java / Spring | `./gradlew test` |
|
|
136
|
+
| Deno | `deno test -A` |
|
|
137
|
+
| Other / Unknown | (empty, auto-detect later) |
|
|
138
|
+
|
|
139
|
+
3. Write → `$PROJECT_DIR/.orchestrix-core/core-config.yaml`
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Step 8: Generate .gitignore
|
|
144
|
+
|
|
145
|
+
Write to `$PROJECT_DIR/.gitignore`:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
node_modules/
|
|
149
|
+
vendor/
|
|
150
|
+
venv/
|
|
151
|
+
__pycache__/
|
|
152
|
+
.env
|
|
153
|
+
.env.local
|
|
154
|
+
.env.*.local
|
|
155
|
+
.DS_Store
|
|
156
|
+
Thumbs.db
|
|
157
|
+
dist/
|
|
158
|
+
build/
|
|
159
|
+
out/
|
|
160
|
+
*.log
|
|
161
|
+
.idea/
|
|
162
|
+
.vscode/
|
|
163
|
+
*.swp
|
|
164
|
+
*.swo
|
|
165
|
+
.orchestrix-core/runtime/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
If a `.gitignore.template` exists in resources, use that instead.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Step 9: Initialize Memory
|
|
173
|
+
|
|
174
|
+
Read the memory template from `${CLAUDE_SKILL_DIR}/templates/memory.template.yaml` and populate it with collected data:
|
|
175
|
+
|
|
176
|
+
- `project.name` → project name
|
|
177
|
+
- `project.dir_name` → kebab-case directory name
|
|
178
|
+
- `project.project_root` → absolute path to project directory
|
|
179
|
+
- `project.license_key` → collected key or empty
|
|
180
|
+
- `project.description` → core problem statement
|
|
181
|
+
- `project.created_at` → current ISO 8601 timestamp
|
|
182
|
+
- `lifecycle.current_phase` → 1
|
|
183
|
+
- `lifecycle.current_step` → "phase1.step9.memory_init"
|
|
184
|
+
- `lifecycle.phase_status.phase1_create` → "in_progress"
|
|
185
|
+
|
|
186
|
+
Write → `$PROJECT_DIR/.yuri/memory.yaml`
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Step 10: Git Init + Commit
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
cd "$PROJECT_DIR" && git init && git add .
|
|
194
|
+
git commit -m "chore: init project with Orchestrix
|
|
195
|
+
|
|
196
|
+
- Project brief generated from interactive session
|
|
197
|
+
- Orchestrix infrastructure: MCP config, hooks, slash commands
|
|
198
|
+
- Core config with project-specific settings
|
|
199
|
+
|
|
200
|
+
🤖 Generated with [Orchestrix](https://orchestrix-mcp.youlidao.ai)"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Step 11: Output Result
|
|
206
|
+
|
|
207
|
+
Display to the user:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
## ✅ Project Created
|
|
211
|
+
**Path**: ~/Codes/{dir-name}/
|
|
212
|
+
|
|
213
|
+
### Files created
|
|
214
|
+
- `.mcp.json` — Orchestrix MCP Server config
|
|
215
|
+
- `.claude/settings.local.json` — Claude Code hooks config
|
|
216
|
+
- `.claude/hooks/handoff-detector.sh` — HANDOFF auto-detection hook
|
|
217
|
+
- `.claude/commands/o.md` — /o command (Agent activation)
|
|
218
|
+
- `.claude/commands/o-help.md` — /o-help command
|
|
219
|
+
- `.claude/commands/o-status.md` — /o-status command
|
|
220
|
+
- `.orchestrix-core/core-config.yaml` — Project config
|
|
221
|
+
- `.orchestrix-core/scripts/start-orchestrix.sh` — tmux multi-window automation
|
|
222
|
+
- `.gitignore` — Git ignore rules
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
IF license key is empty, add warning:
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
⚠️ License Key not configured. Edit .mcp.json, replace YOUR_LICENSE_KEY_HERE.
|
|
229
|
+
Apply at: https://orchestrix-mcp.youlidao.ai
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Update memory:
|
|
233
|
+
- `lifecycle.phase_status.phase1_create` → "complete"
|
|
234
|
+
- `lifecycle.current_phase` → 1
|
|
235
|
+
- `lifecycle.current_step` → "phase1.complete"
|
|
236
|
+
|
|
237
|
+
Save checkpoint → `.yuri/checkpoints/checkpoint-phase1.yaml`
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Step 12: Ask Whether to Start Planning
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
🚀 **Start project planning now?**
|
|
245
|
+
|
|
246
|
+
| Step | Agent | Task | Output |
|
|
247
|
+
|------|-------|------|--------|
|
|
248
|
+
| 0 | Analyst | Create project brief | docs/project-brief.md |
|
|
249
|
+
| 1 | PM | Generate PRD | docs/prd/*.md |
|
|
250
|
+
| 2 | UX Expert | Frontend spec | docs/front-end-spec*.md |
|
|
251
|
+
| 3 | Architect | Architecture doc | docs/architecture*.md |
|
|
252
|
+
| 4 | PO | Validate + shard | Reports + sharded files |
|
|
253
|
+
|
|
254
|
+
Reply: **Y** (start now) or **N** (plan manually later)
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
- If Y → execute `tasks/yuri-plan-project.md`
|
|
258
|
+
- If N → save state, end with reminder: "Run `/yuri *plan` when ready."
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Phase 5: Deploy Project
|
|
2
|
+
|
|
3
|
+
**Command**: `*deploy`
|
|
4
|
+
**Purpose**: Present deployment options, execute the user's chosen deployment strategy, and verify the deployment is healthy.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- Phase 4 (Test) must be complete
|
|
11
|
+
- `.yuri/memory.yaml` must exist with `phase4_test: complete`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 0: Load Memory and Validate
|
|
16
|
+
|
|
17
|
+
1. Read `.yuri/memory.yaml` — restore project context
|
|
18
|
+
2. Verify `lifecycle.phase_status.phase4_test == complete`
|
|
19
|
+
- If not → "Phase 4 not complete. Run `*test` first."
|
|
20
|
+
3. Set `PROJECT_DIR` from `project.project_root`
|
|
21
|
+
4. If `phase5_deploy == in_progress` → resume from last step
|
|
22
|
+
5. If `phase5_deploy == complete` → show deployed URL, offer re-deploy
|
|
23
|
+
|
|
24
|
+
Update memory:
|
|
25
|
+
- `lifecycle.current_phase` → 5
|
|
26
|
+
- `lifecycle.phase_status.phase5_deploy` → "in_progress"
|
|
27
|
+
- Save immediately
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Step 1: Present Deployment Options
|
|
32
|
+
|
|
33
|
+
Read deployment options from `${CLAUDE_SKILL_DIR}/data/deployment-options.yaml` and present to user:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
## 🚀 Deployment Options
|
|
37
|
+
|
|
38
|
+
### 🇨🇳 China Region
|
|
39
|
+
|
|
40
|
+
| # | Provider | Best For | Description |
|
|
41
|
+
|---|----------|----------|-------------|
|
|
42
|
+
| 1 | Sealos | Prototype / MVP | One-click container deployment, zero ops |
|
|
43
|
+
| 2 | Aliyun ECS + Docker Compose | Production | Full control with ECS instances |
|
|
44
|
+
| 3 | Vercel (CN-accessible) | Frontend / SSR | Static and SSR deployment |
|
|
45
|
+
|
|
46
|
+
### 🌍 Overseas
|
|
47
|
+
|
|
48
|
+
| # | Provider | Best For | Description |
|
|
49
|
+
|---|----------|----------|-------------|
|
|
50
|
+
| 4 | Vercel | Frontend / Full-stack (Next.js) | Zero-config deployment |
|
|
51
|
+
| 5 | Railway | Backend APIs | Simple container deployment |
|
|
52
|
+
| 6 | AWS / GCP | Enterprise scale | Full cloud infrastructure |
|
|
53
|
+
|
|
54
|
+
Select a number (1-6), or describe your deployment preference:
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 2: User Selects Strategy
|
|
60
|
+
|
|
61
|
+
Record the user's choice:
|
|
62
|
+
- `deployment.strategy` → selected option ID (e.g. `china-sealos`, `overseas-vercel`)
|
|
63
|
+
- Save memory immediately
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Step 3: Execute Deployment
|
|
68
|
+
|
|
69
|
+
Based on the selected strategy, generate and execute the necessary deployment configuration:
|
|
70
|
+
|
|
71
|
+
### Common steps for all strategies:
|
|
72
|
+
|
|
73
|
+
1. **Generate Dockerfile** (if not exists):
|
|
74
|
+
- Analyze project tech stack from `project.tech_stack`
|
|
75
|
+
- Create appropriate multi-stage Dockerfile
|
|
76
|
+
|
|
77
|
+
2. **Generate docker-compose.yml** (if applicable):
|
|
78
|
+
- For strategies that use Docker Compose (e.g. `china-aliyun-ecs`)
|
|
79
|
+
|
|
80
|
+
3. **Generate CI/CD config** (if applicable):
|
|
81
|
+
- Vercel: `vercel.json`
|
|
82
|
+
- Railway: `railway.json`
|
|
83
|
+
- AWS: basic deployment scripts
|
|
84
|
+
|
|
85
|
+
4. **Execute deployment commands**:
|
|
86
|
+
- Run the appropriate deployment CLI commands
|
|
87
|
+
- Handle authentication prompts
|
|
88
|
+
|
|
89
|
+
### Self-solve problems:
|
|
90
|
+
|
|
91
|
+
- Max 2 retries for any failed step
|
|
92
|
+
- Analyze error output and attempt fix
|
|
93
|
+
- Only ask user for:
|
|
94
|
+
- **Credentials** (API keys, tokens)
|
|
95
|
+
- **DNS configuration** (domain names, CNAME records)
|
|
96
|
+
- **Environment secrets** (database URLs, API secrets)
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Step 4: Health Check and Report
|
|
101
|
+
|
|
102
|
+
1. Wait for deployment to complete
|
|
103
|
+
2. Run health check on the deployed URL:
|
|
104
|
+
```bash
|
|
105
|
+
curl -s -o /dev/null -w "%{http_code}" "$DEPLOYED_URL"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
3. IF healthy (2xx response):
|
|
109
|
+
|
|
110
|
+
Save final state:
|
|
111
|
+
- `deployment.url` → deployed URL
|
|
112
|
+
- `deployment.status` → "healthy"
|
|
113
|
+
- `lifecycle.phase_status.phase5_deploy` → "complete"
|
|
114
|
+
- `lifecycle.current_step` → "phase5.complete"
|
|
115
|
+
- Write checkpoint → `.yuri/checkpoints/checkpoint-phase5.yaml`
|
|
116
|
+
|
|
117
|
+
Report:
|
|
118
|
+
```
|
|
119
|
+
## ✅ Deployment Complete!
|
|
120
|
+
|
|
121
|
+
| Item | Detail |
|
|
122
|
+
|------|--------|
|
|
123
|
+
| **URL** | {deployed_url} |
|
|
124
|
+
| **Strategy** | {strategy_name} |
|
|
125
|
+
| **Status** | ✅ Healthy |
|
|
126
|
+
| **Health Check** | HTTP {status_code} |
|
|
127
|
+
|
|
128
|
+
🎉 Your project is live! From idea to deployment — mission complete.
|
|
129
|
+
|
|
130
|
+
### What's Next?
|
|
131
|
+
- Monitor your application at the deployed URL
|
|
132
|
+
- Run `/yuri *change "{description}"` to handle new requirements
|
|
133
|
+
- Run `/yuri *status` to check project state at any time
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
4. IF unhealthy:
|
|
137
|
+
- Capture error details
|
|
138
|
+
- Attempt fix (max 2 retries)
|
|
139
|
+
- If still failing → report to user with diagnostics and ask for guidance
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Phase 3: Develop Project
|
|
2
|
+
|
|
3
|
+
**Command**: `*develop`
|
|
4
|
+
**Purpose**: Launch the automated development loop (SM → Architect → Dev → QA) via tmux and monitor progress until all stories are complete.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- Phase 2 (Plan) must be complete
|
|
11
|
+
- Sharded docs must exist (`docs/prd/epic-*.yaml`)
|
|
12
|
+
- `.yuri/memory.yaml` must exist with `phase2_plan: complete`
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 0: Load Memory and Validate
|
|
17
|
+
|
|
18
|
+
1. Read `.yuri/memory.yaml` — restore project context
|
|
19
|
+
2. Verify `lifecycle.phase_status.phase2_plan == complete`
|
|
20
|
+
- If not → "Phase 2 not complete. Run `*plan` first."
|
|
21
|
+
3. Set `PROJECT_DIR` from `project.project_root`
|
|
22
|
+
4. Count total epics/stories from `docs/prd/epic-*.yaml`:
|
|
23
|
+
```bash
|
|
24
|
+
TOTAL_STORIES=$(grep -r 'stories:' "$PROJECT_DIR/docs/prd/epic-"*.yaml 2>/dev/null | wc -l)
|
|
25
|
+
```
|
|
26
|
+
5. If `phase3_develop == in_progress` → resume monitoring loop
|
|
27
|
+
6. If `phase3_develop == complete` → offer skip to Phase 4
|
|
28
|
+
|
|
29
|
+
Update memory:
|
|
30
|
+
- `lifecycle.current_phase` → 3
|
|
31
|
+
- `lifecycle.phase_status.phase3_develop` → "in_progress"
|
|
32
|
+
- `development.total_stories` → counted total
|
|
33
|
+
- Save immediately
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 1: Launch Dev Automation
|
|
38
|
+
|
|
39
|
+
Use the lazy session creation script:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
SCRIPT_DIR="${CLAUDE_SKILL_DIR}/scripts"
|
|
43
|
+
SESSION=$(bash "$SCRIPT_DIR/ensure-session.sh" dev "$PROJECT_DIR")
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This creates an `orchestrix-{repo-id}` tmux session with 4 windows:
|
|
47
|
+
- Window 0: Architect
|
|
48
|
+
- Window 1: SM (Scrum Master)
|
|
49
|
+
- Window 2: Dev
|
|
50
|
+
- Window 3: QA
|
|
51
|
+
|
|
52
|
+
SM auto-starts the development loop upon session creation.
|
|
53
|
+
|
|
54
|
+
Update memory:
|
|
55
|
+
- `tmux.dev_session` → `$SESSION`
|
|
56
|
+
- Save immediately
|
|
57
|
+
|
|
58
|
+
Report to user:
|
|
59
|
+
```
|
|
60
|
+
🚀 Development session started: {SESSION}
|
|
61
|
+
4 agents active: Architect, SM, Dev, QA
|
|
62
|
+
SM is beginning the development loop...
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Step 2: Monitoring Loop
|
|
68
|
+
|
|
69
|
+
Poll every 5 minutes until all stories are done.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
WHILE stories_done < total_stories:
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 2.1 Scan Story Statuses
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
SCRIPT_DIR="${CLAUDE_SKILL_DIR}/scripts"
|
|
79
|
+
RESULT=$(bash "$SCRIPT_DIR/scan-stories.sh" "$PROJECT_DIR")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Output: count by status (Blocked, InProgress, Review, Done, etc.)
|
|
83
|
+
|
|
84
|
+
### 2.2 Report to User
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
📊 Progress: {done}/{total} stories
|
|
88
|
+
✅ Done: {list of done story IDs}
|
|
89
|
+
🔄 In Progress: {list}
|
|
90
|
+
⏳ Remaining: {count}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 2.3 Stuck Detection
|
|
94
|
+
|
|
95
|
+
IF no progress for 15 minutes (3 consecutive polls with same done count):
|
|
96
|
+
1. Capture all 4 tmux window contents:
|
|
97
|
+
```bash
|
|
98
|
+
for W in 0 1 2 3; do
|
|
99
|
+
tmux capture-pane -t "$SESSION:$W" -p -S -50
|
|
100
|
+
done
|
|
101
|
+
```
|
|
102
|
+
2. Analyze for error patterns (exceptions, stuck loops, missing handoffs)
|
|
103
|
+
3. Attempt recovery:
|
|
104
|
+
- Resend handoff to target window
|
|
105
|
+
- `/clear` → restart agent
|
|
106
|
+
4. Increment `development.stuck_count`
|
|
107
|
+
|
|
108
|
+
IF `stuck_count > 3`:
|
|
109
|
+
- Report to user with full diagnostics
|
|
110
|
+
- Request human intervention
|
|
111
|
+
- Pause monitoring loop
|
|
112
|
+
|
|
113
|
+
### 2.4 Save Memory
|
|
114
|
+
|
|
115
|
+
After each poll cycle:
|
|
116
|
+
- `development.stories_done` → current done count
|
|
117
|
+
- `development.stories_in_progress` → list of in-progress story IDs
|
|
118
|
+
- `development.last_progress_at` → timestamp of last progress change
|
|
119
|
+
- Save immediately
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 3: All Stories Done
|
|
124
|
+
|
|
125
|
+
1. Save checkpoint:
|
|
126
|
+
- `lifecycle.phase_status.phase3_develop` → "complete"
|
|
127
|
+
- `lifecycle.current_step` → "phase3.complete"
|
|
128
|
+
- Write checkpoint → `.yuri/checkpoints/checkpoint-phase3.yaml`
|
|
129
|
+
|
|
130
|
+
2. Report:
|
|
131
|
+
```
|
|
132
|
+
## ✅ Development Phase Complete
|
|
133
|
+
|
|
134
|
+
All {total} stories implemented!
|
|
135
|
+
|
|
136
|
+
| Status | Count |
|
|
137
|
+
|--------|-------|
|
|
138
|
+
| Done | {done} |
|
|
139
|
+
| Total | {total} |
|
|
140
|
+
|
|
141
|
+
Development session: {SESSION} (still running for QA phase)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
3. Ask:
|
|
145
|
+
```
|
|
146
|
+
🚀 Ready to start smoke testing? (Y/N)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
- If Y → execute `tasks/yuri-test-project.md`
|
|
150
|
+
- If N → save state, end with reminder: "Run `/yuri *test` when ready."
|