orchestrix-yuri 4.8.12 ā 4.8.13
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/lib/gateway/router.js +54 -3
- package/package.json +1 -1
package/lib/gateway/router.js
CHANGED
|
@@ -690,10 +690,61 @@ Reply with ONLY one word: small, medium, or large. Nothing else.`;
|
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
// Fallback
|
|
693
|
+
// Fallback: build a project summary from all phase states
|
|
694
694
|
if (parts.length === 0) {
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
const summaryLines = ['š **Project Status**', 'āāāāāāāāāāāāāāāāāāāāā'];
|
|
696
|
+
const idPath = path.join(projectRoot, '.yuri', 'identity.yaml');
|
|
697
|
+
if (fs.existsSync(idPath)) {
|
|
698
|
+
try {
|
|
699
|
+
const id = yaml.load(fs.readFileSync(idPath, 'utf8')) || {};
|
|
700
|
+
if (id.project && id.project.name) summaryLines.push(`Project: **${id.project.name}**`);
|
|
701
|
+
} catch { /* ok */ }
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const phaseNames = { 1: 'Create', 2: 'Plan', 3: 'Develop', 4: 'Test', 5: 'Deploy' };
|
|
705
|
+
const phaseIcons = { complete: 'ā
', in_progress: 'š', complete_with_failures: 'ā ļø' };
|
|
706
|
+
for (let p = 1; p <= 5; p++) {
|
|
707
|
+
const pPath = path.join(projectRoot, '.yuri', 'state', `phase${p}.yaml`);
|
|
708
|
+
if (fs.existsSync(pPath)) {
|
|
709
|
+
try {
|
|
710
|
+
const ps = yaml.load(fs.readFileSync(pPath, 'utf8')) || {};
|
|
711
|
+
const icon = phaseIcons[ps.status] || (ps.status ? 'š' : 'ā³');
|
|
712
|
+
summaryLines.push(`${icon} Phase ${p} (${phaseNames[p]}): ${ps.status || 'pending'}`);
|
|
713
|
+
} catch { /* ok */ }
|
|
714
|
+
} else {
|
|
715
|
+
summaryLines.push(`ā³ Phase ${p} (${phaseNames[p]}): pending`);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// Story progress if available
|
|
720
|
+
try {
|
|
721
|
+
const scriptPath = path.join(os.homedir(), '.claude', 'skills', 'yuri', 'scripts', 'scan-stories.sh');
|
|
722
|
+
if (fs.existsSync(scriptPath)) {
|
|
723
|
+
const { execSync } = require('child_process');
|
|
724
|
+
const scanOut = execSync(`bash "${scriptPath}" "${projectRoot}"`, { encoding: 'utf8', timeout: 10000 }).trim();
|
|
725
|
+
let created = 0, done = 0;
|
|
726
|
+
for (const line of scanOut.split('\n')) {
|
|
727
|
+
if (line.startsWith('Created:')) created = parseInt(line.split(':')[1], 10) || 0;
|
|
728
|
+
if (line.startsWith('StatusDone:')) done++;
|
|
729
|
+
}
|
|
730
|
+
if (created > 0) summaryLines.push(`\nš Stories: ${done}/${created} done`);
|
|
731
|
+
}
|
|
732
|
+
} catch { /* ok */ }
|
|
733
|
+
|
|
734
|
+
if (focus.pulse) summaryLines.push(`\nš¬ ${focus.pulse}`);
|
|
735
|
+
|
|
736
|
+
const nextActions = [];
|
|
737
|
+
const phaseNum = parseInt(focus.phase, 10);
|
|
738
|
+
if (focus.step && focus.step.includes('complete')) {
|
|
739
|
+
if (phaseNum < 5) {
|
|
740
|
+
const nextPhase = phaseNames[phaseNum + 1];
|
|
741
|
+
if (nextPhase) nextActions.push(`Run \`*${nextPhase.toLowerCase()}\` to start next phase`);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
nextActions.push('Ask me anything about the project');
|
|
745
|
+
summaryLines.push(`\nš” ${nextActions.join(', or ')}`);
|
|
746
|
+
|
|
747
|
+
parts.push(summaryLines.join('\n'));
|
|
697
748
|
}
|
|
698
749
|
} catch { /* ok */ }
|
|
699
750
|
}
|
package/package.json
CHANGED