@codexa/cli 9.0.18 → 9.0.19
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/commands/task.ts +18 -3
- package/package.json +1 -1
- package/workflow.ts +2 -1
package/commands/task.ts
CHANGED
|
@@ -681,7 +681,7 @@ function showImplementationSummary(
|
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
// v9.9: Phase advance — compact context and move to next phase
|
|
684
|
-
export function taskPhaseAdvance(options: { noCompact?: boolean; spec?: string } = {}): void {
|
|
684
|
+
export function taskPhaseAdvance(options: { noCompact?: boolean; json?: boolean; spec?: string } = {}): void {
|
|
685
685
|
initSchema();
|
|
686
686
|
const db = getDb();
|
|
687
687
|
|
|
@@ -730,8 +730,8 @@ export function taskPhaseAdvance(options: { noCompact?: boolean; spec?: string }
|
|
|
730
730
|
const summaryContent = `Resumo Fase ${currentPhase}: ${phaseTasks.length} tasks concluidas (${phaseTaskNames.substring(0, 200)}). ${decisionCount} decisions, ${artifactCount} artefatos acumulados.`;
|
|
731
731
|
|
|
732
732
|
db.run(
|
|
733
|
-
`INSERT INTO knowledge (spec_id, category, content, severity,
|
|
734
|
-
VALUES (?, 'phase_summary', ?, 'critical', '
|
|
733
|
+
`INSERT INTO knowledge (spec_id, task_origin, category, content, severity, broadcast_to, created_at)
|
|
734
|
+
VALUES (?, 0, 'phase_summary', ?, 'critical', 'all', ?)`,
|
|
735
735
|
[spec.id, summaryContent, now]
|
|
736
736
|
);
|
|
737
737
|
|
|
@@ -747,6 +747,21 @@ export function taskPhaseAdvance(options: { noCompact?: boolean; spec?: string }
|
|
|
747
747
|
.query("SELECT * FROM tasks WHERE spec_id = ? AND phase = ? ORDER BY number")
|
|
748
748
|
.all(spec.id, nextPhase) as any[];
|
|
749
749
|
|
|
750
|
+
if (options.json) {
|
|
751
|
+
console.log(JSON.stringify({
|
|
752
|
+
previousPhase: currentPhase,
|
|
753
|
+
currentPhase: nextPhase,
|
|
754
|
+
totalPhases,
|
|
755
|
+
tasks: nextPhaseTasks.map((t: any) => ({
|
|
756
|
+
number: t.number,
|
|
757
|
+
name: t.name,
|
|
758
|
+
agent: t.agent || "geral",
|
|
759
|
+
depends_on: t.depends_on ? JSON.parse(t.depends_on) : [],
|
|
760
|
+
})),
|
|
761
|
+
}));
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
|
|
750
765
|
console.log(`\n${"=".repeat(55)}`);
|
|
751
766
|
console.log(`FASE ${nextPhase}/${totalPhases} INICIADA`);
|
|
752
767
|
console.log(`${"=".repeat(55)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexa/cli",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.19",
|
|
4
4
|
"description": "Orchestrated workflow system for Claude Code - manages feature development through parallel subagents with structured phases, gates, and quality enforcement.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/workflow.ts
CHANGED
|
@@ -310,10 +310,11 @@ taskCmd
|
|
|
310
310
|
taskCmd
|
|
311
311
|
.command("phase-advance")
|
|
312
312
|
.description("Avanca para a proxima fase (compacta contexto automaticamente)")
|
|
313
|
+
.option("--json", "Saida em JSON")
|
|
313
314
|
.option("--no-compact", "Nao compactar knowledge antes de avancar")
|
|
314
315
|
.option("--spec <id>", "ID do spec (padrao: mais recente)")
|
|
315
316
|
.action(wrapAction((options) => {
|
|
316
|
-
taskPhaseAdvance({ noCompact: options.compact === false, spec: options.spec });
|
|
317
|
+
taskPhaseAdvance({ noCompact: options.compact === false, json: options.json, spec: options.spec });
|
|
317
318
|
}));
|
|
318
319
|
|
|
319
320
|
// ═══════════════════════════════════════════════════════════════
|