impl-agency-csv-roundtrip

Impl: agency CSV roundtrip — import/export starter format

Metadata

Statusdone
Assignedagent-2390
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelcodex:gpt-5.5
Created2026-05-04T17:41:12.121183869+00:00
Started2026-05-04T18:46:37.222795738+00:00
Completed2026-05-04T19:12:52.233188040+00:00
Tagsagency,sync,impl,federation, eval-scheduled
Eval score0.88
└ blocking impact0.93
└ completeness0.86
└ constraint fidelity0.70
└ coordination overhead0.91
└ correctness0.90
└ downstream usability0.91
└ efficiency0.82
└ intent fidelity0.74
└ style adherence0.86

Description

Description

Implement byte-for-byte round-trippable CSV import/export matching agentbureau/agency's 12-column starter schema (type, name, description, quality, domain_specificity, domain, origin_instance_id, parent_content_hash, scope, parent_ids, generation, created_by). Driven by findings from research-agency-csv-roundtrip. Depends on hash-compat (so re-hash logic must already be settled).

Likely scope

  • Extend wg agency import to accept a --format agency-csv flag and parse all 12 columns (CSV → primitive YAML).
  • Add wg agency export --format agency-csv to emit a CSV byte-equal to agency's starter.csv when given a primitive set.
  • Treat parent_ids as JSON array column (per spec). Treat domain as comma-separated.
  • Add fixture tests/fixtures/agency-starter-sample.csv (5–10 rows from real agency starter).
  • Round-trip test: parse → serialize → byte-diff against fixture.

File scope

  • src/commands/agency_import.rs
  • src/commands/agency_push.rs (for export)
  • src/agency/store.rs (only if needed for canonical serialization helpers)
  • tests/fixtures/agency-starter-sample.csv
  • tests/integration_agency_csv_roundtrip.rs

Do NOT touch:

  • src/agency/hash.rs (owned by impl-agency-hash-compat)
  • src/agency/types.rs (owned by impl-agency-schema-fields)

Validation

  • Failing test written first: test_agency_csv_byte_equal_roundtrip
  • All 12 agency columns round-trip cleanly
  • Domain comma-separated and parent_ids JSON-list parsing covered
  • cargo build + cargo test pass with no regressions
  • Live smoke: wg agency import --format agency-csv tests/fixtures/agency-starter-sample.csv then wg agency export --format agency-csv - byte-equals the input

Depends on

Required by

Log