orchestrix-yuri 4.8.2 → 4.8.4
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.
|
@@ -52,8 +52,8 @@ const MESSAGES = {
|
|
|
52
52
|
zh: '🎉 规划完成!{summary}\n\n下一步:检查上面的文档,然后运行 `*develop` 开始开发。',
|
|
53
53
|
},
|
|
54
54
|
dev_complete: {
|
|
55
|
-
en: '🎉 Development complete! All stories implemented.\n\
|
|
56
|
-
zh: '🎉 开发完成!所有 story 已实现。\n\n
|
|
55
|
+
en: '🎉 Development complete! All stories implemented.\n\nAuto-starting smoke tests...',
|
|
56
|
+
zh: '🎉 开发完成!所有 story 已实现。\n\n自动启动冒烟测试...',
|
|
57
57
|
},
|
|
58
58
|
test_all_passed: {
|
|
59
59
|
en: '\n🚀 All tests passed! Run `*deploy` when ready.',
|
|
@@ -887,6 +887,16 @@ class PhaseOrchestrator {
|
|
|
887
887
|
|
|
888
888
|
log.engine('Dev phase complete');
|
|
889
889
|
this.onComplete('develop', msg('dev_complete'));
|
|
890
|
+
|
|
891
|
+
// Auto-chain: start test phase immediately after dev completes.
|
|
892
|
+
// This makes "develop all stories then test" a single unattended flow.
|
|
893
|
+
try {
|
|
894
|
+
const result = this.startTest(this._projectRoot);
|
|
895
|
+
log.engine(`Auto-chained to test phase: ${result.slice(0, 80)}`);
|
|
896
|
+
this.onProgress(result);
|
|
897
|
+
} catch (err) {
|
|
898
|
+
log.warn(`Auto-chain to test failed: ${err.message}`);
|
|
899
|
+
}
|
|
890
900
|
}
|
|
891
901
|
|
|
892
902
|
// ── Test Phase ──────────────────────────────────────────────────────────────
|
package/lib/gateway/router.js
CHANGED
|
@@ -552,18 +552,35 @@ class Router {
|
|
|
552
552
|
return { text: '❌ Usage: *change "description of the change"\n\nExample: *change "Add dark mode toggle to settings page"' };
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
// Step 1: Ask Claude to assess scope
|
|
555
|
+
// Step 1: Ask Claude to assess scope — with conversation context + project state
|
|
556
556
|
this.history.append(msg.chatId, 'user', msg.text);
|
|
557
557
|
log.router(`Change request: "${description.slice(0, 80)}..." — assessing scope...`);
|
|
558
558
|
|
|
559
|
+
// Build context: recent conversation + project focus
|
|
560
|
+
const recentMsgs = this.history.getRecent(msg.chatId);
|
|
561
|
+
const recentContext = recentMsgs.slice(-6).map((m) => `${m.role}: ${m.text.slice(0, 200)}`).join('\n');
|
|
562
|
+
|
|
563
|
+
let projectContext = '';
|
|
564
|
+
try {
|
|
565
|
+
const focusPath = path.join(projectRoot, '.yuri', 'focus.yaml');
|
|
566
|
+
if (fs.existsSync(focusPath)) {
|
|
567
|
+
const focus = yaml.load(fs.readFileSync(focusPath, 'utf8')) || {};
|
|
568
|
+
projectContext = `Current phase: ${focus.phase || '?'}, step: ${focus.step || '?'}, pulse: ${focus.pulse || '?'}`;
|
|
569
|
+
}
|
|
570
|
+
} catch { /* ok */ }
|
|
571
|
+
|
|
559
572
|
const scopePrompt = `You are assessing a change request for a software project.
|
|
560
573
|
|
|
561
|
-
Change description: "${description}"
|
|
574
|
+
${projectContext ? `Project state: ${projectContext}\n` : ''}${recentContext ? `Recent conversation:\n${recentContext}\n\n` : ''}Change description: "${description}"
|
|
575
|
+
|
|
576
|
+
IMPORTANT: Consider the FULL conversation context, not just the description.
|
|
577
|
+
If the user is approving/confirming a previously discussed plan that involves multiple components, stories, or a major redesign — that is medium or large, NOT small.
|
|
578
|
+
"批准" / "ok" / "go ahead" in response to a multi-story plan = large scope.
|
|
562
579
|
|
|
563
|
-
|
|
564
|
-
- **small**:
|
|
565
|
-
- **medium**: Cross-component change, needs PO routing
|
|
566
|
-
- **large**: Cross-module
|
|
580
|
+
Classify the scope as one of:
|
|
581
|
+
- **small**: Single-file fix, UI tweak, or isolated change (≤5 files, no architecture impact)
|
|
582
|
+
- **medium**: Cross-component change, needs PO routing (new API endpoint, refactoring a module)
|
|
583
|
+
- **large**: Cross-module change, multi-story plan, major redesign, needs full orchestration
|
|
567
584
|
|
|
568
585
|
Reply with ONLY one word: small, medium, or large. Nothing else.`;
|
|
569
586
|
|