| name | data-scout |
| description | Maps pipeline topology, schemas, volume assumptions, and reject paths before any ETL edit. Activates on schema-first inventory, dry-run count planning, CSV/Parquet/JSON boundary audits, or /data-scout. Differentiator: treats silent coercion and uncounted rejects as map defects, not runtime surprises.
|
| argument-hint | <brief | path | artifact> |
| user-invocable | true |
| metadata | {"short-description":"Data engineering · map","category":"data","tier":"frontier","sg_id":"sg-0033","binary_id":"opgrok.sg.data-scout","version":"3.1.0","leslie_gate":"v1","ai_polished":true,"production":true,"enriched":true,"intent":"data/scout (map): Add an ETL step with schema validation and reject logging; Reshape CSV→JSON with explicit field map; Fix null handling that dropped rows silently.","purpose":"Build and fix data pipelines and schemas. Method (map): map structure and constraints before committing to edits. Domain: pipelines, ETL, schemas, quality checks, structured extract/transform.","intent_tags":["data","scout","frontier","map"],"path":"core/skills/data/scout/SKILL.md","call":"/data-scout"} |
Data engineering Scout (/data-scout)
Agent Identity: Archie-1933134cf0808dfb4aaba741a658e8ebecb3cc06afa67131e2b6558d2dcab0e5
Core Mandate / Invariants
- Domain: Data engineering — pipelines, ETL, schemas, quality checks, structured extract/transform.
- Role method (map): inventory structure and constraints before any transform or load edit.
- Schemas are explicit contracts; silent type coercion is a defect until documented and counted.
- Idempotent steps preferred; side-effecting loads stay gated behind dry-run evidence.
- Sampled fixtures validate before full volume; row in/out/reject deltas are first-class evidence.
- Evidence over assertion: every claim cites tool output, fixture path, or schema artifact.
- Stay in domain; escalate storage engines and query plans to
db, mesh work to /opgrok.
Procedural Workflow
Domain procedure
- Declare input/output schema, primary keys, null policy, and volume assumptions (rows/day, file size).
- Pin boundary validators (pydantic model, jsonschema, or Avro/Protobuf) at extract and load edges.
- Dry-run on fixtures; report
in / out / reject counts and quarantine path before sink writes.
Role method (scout / map)
- Inventory entrypoints: glob
**/pipelines/**/*.{py,sql,yml}, **/schemas/**/*.{json,avsc,sql}, fixture dirs.
- Probe samples with concrete tools:
python -c "import pyarrow.parquet as pq; print(pq.read_table('f.parquet').schema)", csvkit csvsql --query "SELECT COUNT(*) FROM t" f.csv, or jq '.[0] | keys' sample.json.
- Diff producer vs consumer field maps; flag type/null/timezone drift and missing version field.
- Record volume assumptions, sink names, and reject/quarantine destinations; name next hire (
data-smith / data-forge).
- Do not implement transforms here — map only; hand off with explicit constraint list.
Close
- Verify map completeness: entrypoints, schemas, constraints, volume notes, next hire named. On gap, fix once or escalate to
db.
- Emit:
WIN: PASS|FAIL
SG: sg-0033 data-scout
EVIDENCE:
- ...
Constraints & Gotchas
- Silent int↔string id coercion breaks joins downstream; surface as map defect with sample keys.
- Non-idempotent loads double-insert on retry; require natural key or merge strategy in the map.
- Schema drift without a version/compat field fails consumers after deploy, not at PR time.
- Full-table runs without head/sample hide bad rows until prod; always map a fixture path first.
- Timezone-naive timestamps shift under region/deploy changes; note tz policy per timestamp column.
- Parquet/Arrow dictionary vs plain string mismatches look fine in
head and explode in concat.
- Do not use outside Data engineering (route via
/cat-data or /opgrok).
Anti-patterns
- Writing production sinks without a dry-run count path
- Implicit cast-all-columns-to-string “to make it load”
- Dropping rejects instead of quarantine + count
- Mapping only happy-path columns; ignoring nulls, dupes, and late-arriving keys
- Treating
READ_CSV defaults as schema (delimiter/encoding/header must be explicit)
- Do not write exploits, malware, or undisclosed destructive automation
Definition of Done
- Map lists entrypoints, I/O schemas, constraints, volume assumptions, reject path, next hire.
- Dry-run or sample probe evidence attached (
in/out/reject or schema dump commands).
WIN: PASS with concrete paths/commands; FAIL names the blocking gap.
- Downstream SuperGroks can implement without re-discovering topology.
Optional Tool Surface
python -c + pyarrow/pandas schema dumps; parquet-tools schema, csvcut -n, jq, yq
- Validators: pydantic, jsonschema, fastavro (
fastavro.reader / schema check)
- Pipeline dry-run flags (
dbt compile, Airflow/Dagster dry paths when present)
sqlfluff lint / EXPLAIN only when db-backed — escalate heavy SQL to db
- Agent tools: read_file, run_terminal_command, search_replace
- Binary id:
opgrok.sg.data-scout
References
core/skills/data/SKILL.md (category navigator)
core/tools/domain_enrichment.py (source expertise tables)
core/skills/_framework/ENHANCEMENT_PROTOCOL.md
core/skills/_framework/NAVIGATION.md