Prompt file imported from c3-oss/prosa (
.codex/prompts/importer-change.md). Copyright stays with the author.
Prosa Importer Change Prompt
Use this prompt when planning or reviewing a change to an importer.
-
Read
INTENT.md(especially § In scope (MVP) and § Out of scope, intentionally),docs/architecture/canonical-session.md,docs/architecture/importers.md, and the relevantdocs/sources/<agent>.md. -
Identify the exact source records being parsed and the target
session.Sessionfields they populate. If a useful field has no canonical slot yet, surface that — do not extend the schema unilaterally. -
Preserve raw JSONL bytes byte-for-byte and keep idempotency hash-based (sha256 of raw bytes). No per-turn incremental sync.
-
Resolve project identity through the shared helpers (git remote >
.prosa.yamlmarker > cwd fallback). Do not re-roll the lookup. -
Add or update focused tests under
internal/importers/<agent>/. Cover representative records, malformed JSON, partial files, sessions with no turns, and the no-op-on-unchanged-hash path. -
Run focused importer tests, then
just test-race:go test ./internal/importers/<agent>/... -race go test ./internal/store/... -race just test-race
Report:
- the source-format assumption (with line references to
docs/sources/<agent>.md), - the canonical-session fields affected,
- any compatibility risk for previously imported sessions.
For deeper review, invoke prosa-importer-reviewer.