Carmen Labs

Prompt Logs

Optional file for preserving the prompt history used to regenerate an MView.

Prompt Logs

prompts_history.json is an optional file an implementation may store next to mview.json to record prompts submitted during MView creation or regeneration.

The current, normative prompt for the mutation lives in mview.json as prompt. The history does not replace that field: it only preserves earlier or later attempts for auditing, debugging, and traceability.

Location

If present, the file must live in the same directory as mview.json:

.mviews/
└── sales-dashboard/
    ├── mview.json
    ├── prompts_history.json
    ├── parser.ts
    └── Dashboard.tsx

Format

The file contains a JSON array. Each entry represents a prompt submitted by the user or by a regeneration tool.

[
  {
    "prompt": "Create an executive view of monthly sales and top clients.",
    "sentAt": "2026-07-16T18:35:00Z"
  },
  {
    "prompt": "Adjust the view to support the new Region column and show totals by region.",
    "sentAt": "2026-07-16T19:10:00Z"
  }
]

Fields

FieldTypeRequiredDescription
promptstringyesSubmitted prompt.
sentAtstringyesSubmission date and time in ISO 8601 format.

Implementations may add their own fields to each entry, such as model, createdBy, or result, but they must not depend on them to execute the MView. Execution must depend on mview.json, parser.ts, the component, and declared resources.

Expected Use

  • Show the user how the mutation evolved.
  • Recover a previous prompt as a starting point for regeneration.
  • Audit when each change was requested.

The file is informational. If it is missing, the MView remains valid as long as mview.json satisfies the schema.

Logs de prompts

Archivo opcional para conservar el historial de prompts usados al regenerar una MView.

Logs de prompts

prompts_history.json es un archivo opcional que una implementación puede guardar junto a mview.json para registrar los prompts enviados durante la creación o regeneración de una MView.

El prompt actual y normativo de la mutación vive en mview.json como prompt. El historial no reemplaza ese campo: solo conserva intentos anteriores o posteriores para auditoría, depuración y trazabilidad.

Ubicación

Si existe, el archivo debe estar en el mismo directorio que mview.json:

.mviews/
└── sales-dashboard/
    ├── mview.json
    ├── prompts_history.json
    ├── parser.ts
    └── Dashboard.tsx

Formato

El archivo contiene un array JSON. Cada entrada representa un prompt enviado por el usuario o por una herramienta de regeneración.

[
  {
    "prompt": "Crea una vista ejecutiva de ventas mensuales y clientes principales.",
    "sentAt": "2026-07-16T18:35:00Z"
  },
  {
    "prompt": "Ajusta la vista para soportar la nueva columna Region y mostrar totales por region.",
    "sentAt": "2026-07-16T19:10:00Z"
  }
]

Campos

CampoTipoRequeridoDescripción
promptstringPrompt enviado.
sentAtstringFecha y hora de envío en formato ISO 8601.

Las implementaciones pueden agregar campos propios a cada entrada, como model, createdBy o result, pero no deben depender de ellos para ejecutar la MView. La ejecución debe depender de mview.json, parser.ts, el componente y los recursos declarados.

Uso esperado

  • Mostrar al usuario cómo evolucionó la mutación.
  • Recuperar un prompt anterior como punto de partida para regenerar.
  • Auditar cuándo se pidió cada cambio.

El archivo es informativo. Si falta, la MView sigue siendo válida mientras mview.json cumpla el esquema.