agent-mp 0.5.30 → 0.5.31

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.
@@ -1007,12 +1007,17 @@ REGLA: Al terminar, reporta todo lo que encontraste de forma clara y estructurad
1007
1007
  const resultPath = path.join(taskDir, 'result.md');
1008
1008
  if (await fileExists(resultPath)) {
1009
1009
  const result = await readFile(resultPath);
1010
- const verdict = result.includes('PASS') || result.includes('✅') ? 'PASS' : 'FAIL';
1010
+ // Buscar el veredicto principal en las primeras líneas (donde está "**Verdict: PASS/FAIL**")
1011
+ const firstLines = result.split('\n').slice(0, 10).join('\n');
1012
+ const verdict = firstLines.includes('Verdict: FAIL') || firstLines.includes('❌') ? 'FAIL' : 'PASS';
1011
1013
  ctx += `- RESULTADO PREVIO: ${verdict}\n`;
1012
1014
  if (verdict === 'FAIL') {
1013
1015
  ctx += `\n⚠️ ESTA TAREA YA FALLÓ ANTES. Razones del FAIL:\n${result.slice(0, 1500)}\n`;
1014
1016
  ctx += `\nIMPORTANTE: Si el usuario pide re-implementar, debés corregir ESPECÍFICAMENTE los puntos marcados como FAIL.\n`;
1015
1017
  }
1018
+ else {
1019
+ ctx += `\n✅ La tarea ya fue completada exitosamente.\n`;
1020
+ }
1016
1021
  }
1017
1022
  // Leer spec.md si existe
1018
1023
  const specPath = path.join(this.projectDir, '.agent', 'docs', featureId, 'spec.md');
@@ -1043,11 +1048,13 @@ ${specContent}
1043
1048
  CONTEXTO DEL PROYECTO:
1044
1049
  ${context}
1045
1050
 
1046
- INSTRUCCIONES:
1047
- 1. Analiza la tarea y el contexto del proyecto.
1048
- 2. Descompone en steps concretos y verificables.
1049
- 3. Define acceptance_criteria medibles (cada criterio debe poder verificarse leyendo un archivo).
1050
- 4. Responde SOLO con este JSON exacto, sin texto adicional:
1051
+ INSTRUCCIONES CRÍTICAS:
1052
+ 1. Si hay SPEC.MD, ESE ES EL DOCUMENTO PRIMARIO — define completamente la tarea. Los archivos raw son solo contexto histórico, NO los uses para definir la implementación.
1053
+ 2. Ignorá cualquier información que NO tenga relación directa con la tarea del spec.md (ej: listas de modelos, ejemplos genéricos, etc.).
1054
+ 3. Generá steps CONCRETOS y DIRECTOS para implementar lo que dice el spec.md — sin sobre-analizar.
1055
+ 4. Si el spec.md dice "script que muestra la hora", los steps son: (1) crear el script, (2) hacerlo ejecutable. No más.
1056
+ 5. Definí acceptance_criteria medibles leyendo archivos.
1057
+ 6. Responde SOLO con este JSON exacto, sin texto adicional:
1051
1058
 
1052
1059
  {"plan":{"task_id":"${taskId}","description":"${task}","steps":[{"num":1,"description":"descripcion concreta del paso","files":["archivo/a/crear.ts"],"status":"pending"}],"acceptance_criteria":["criterio verificable"],"deliberation":{"needed":false,"question":""}}}`;
1053
1060
  const res = await this.runWithFallback('orchestrator', prompt, 'Planificacion');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-mp",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "description": "Deterministic multi-agent CLI orchestrator — plan, code, review",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",