DataCoolie Discover
Outcome And Boundary
Produce compact, reproducible source facts with provenance. Own inspection of source objects,
columns, types, constraints, relationships, size estimates, change signals, layouts, capabilities,
access limitations, and probe failures.
Do not turn candidates into architecture or ingestion decisions. A possible watermark remains
evidence. Do not create configuration, runtime metadata, runners, functions, infrastructure, or
releases.
Probe Contract
Use the smallest packaged read-only probe before manual investigation. Scripts generate repeatable
rows and status; the agent enriches only verified gaps.
- Resolve credentials, headers, and storage options from environment variables or ambient identity.
- Reject secret-bearing command arguments and do not retain source values by default.
- Bound remote traversal, catalog inspection, custom queries, samples, and network calls.
- Treat exit
0 as complete, exit 3 as usable but partial, and any other non-zero exit as failed.
- Write every probe to its own scratch artifact. Duplicate stable keys are errors, not overwrite
instructions.
Resource Routing
Resolve resources relative to this skill and read only the matching reference.
| Need |
Resource |
| Relational catalog or bounded SQL gap |
scripts/introspect_db.py, scripts/probe_db.py |
| File schema or bounded directory layout |
scripts/introspect_files.py |
| OpenAPI, GraphQL, or OData |
scripts/introspect_api.py |
| Iceberg, Hive, Unity Catalog, or Glue |
scripts/introspect_lakehouse.py |
| Merge/refresh observations or assess watermark signals |
scripts/merge_observations.py, scripts/assess_watermarks.py |
| Finalize complete object decisions |
scripts/finalize_watermark_assessment.py, templates/watermark-assessment.example.json |
| Apply verified observation annotations |
scripts/enrich_observations.py |
| Observation fields or manual rows |
references/observation-contract.md |
| Python packages or external CLI prerequisites |
references/dependency-routing.md |
| Unsupported source or unresolved probe gap |
references/fallback-probes.md |
| Bounded database evidence query |
references/evidence-queries.md, scripts/probe_db.py |
| Final summary or interview |
templates/discovery-report.tpl.md, templates/interview-questions.md |
Workflow
- Inventory every declared source boundary. For a new project, probe each source even when the
supplied connection details and descriptions appear complete; declared facts select and bound
the probe but do not replace observed evidence. For existing work, scope probes to the new,
changed, missing, or contradictory facts.
- Read
references/dependency-routing.md; install only the selected probe's dependencies and
preflight any required external CLI.
- Run each probe into a distinct
.scratch/discover/{probe}.csv and status JSON. Keep bounded
layout summaries under .scratch/discover/; they are supporting evidence, not another inventory.
- Resolve or report partial and failed probes. Never describe partial coverage as complete.
- For a new project, merge all usable probe CSVs, including a single input, with
merge_observations.py. For an existing source, use refresh mode with the current inventory as
--base, explicit --replace-source and status inputs, a scratch candidate output, and a scratch
diff. Do not replace prior complete evidence with a partial probe unless that exact source is
explicitly accepted. Promote the validated candidate to discover/observations.csv.
- Preserve exact observed column types so build can author shared schema hints without re-querying
or guessing. Keep probe time, method, scope, and failures in status JSON and the report rather
than duplicating them on every observation row.
- Run
assess_watermarks.py into .scratch/discover/watermark-assessment.csv with
--summary-output .scratch/discover/object-summary.json. Read the JSON summary first and open
detailed observations only for ambiguous objects. Normalized identifier and structural signals
are scratch evidence, not final candidates.
- Assess every object for mutation coverage, ordering, duplicates, resets, late changes,
filtering, and delete visibility. Investigate only decision-changing gaps. Use
references/evidence-queries.md for one bounded custom database query and
references/fallback-probes.md for unsupported sources; never execute reference examples as a
batch. Custom SQL is self-contained and probe_db.py writes its bounded envelope to scratch
JSON. For file sources, also verify delivery semantics: whether modification times are stable,
whether files are replaced in place, and whether the path has real year/month/day/hour levels.
Keep these object/layout facts in the report; framework virtual columns are not observed source
columns.
- Complete the scratch object decisions and run
finalize_watermark_assessment.py. It must cover
every observed object and generates both watermark annotations and the report table. Apply its
annotations with enrich_observations.py; use direct annotations only for other verified gaps.
- Assemble
discover/report.md with scope, exclusions, methods, partial or failed probes, and the
generated assessment table. Discovery recommends evidence and fallbacks but leaves the final
load strategy to design or an explicit human decision. Describe a transaction/business date as
a backward fallback, not as complete change coverage, when no reliable change signal exists.
Output And Handoff
{workspace}/discover/
observations.csv
report.md
raw/ # optional safe evidence required for reproducibility
observations.csv is the only durable machine-readable inventory. report.md summarizes
high-signal evidence without copying the inventory, samples, or credentials.
Shortlists, compact summaries, object decisions, generated annotations, report fragments, refresh
candidates, and diffs are scratch-only. They must never be imported by runtime code or mistaken for
additional durable inventories.
Hand exact evidence paths to design when intent remains open, or to build when the design is
sufficient. Runtime code must not import discovery artifacts. Discovery approves neither outcome.
End with unresolved questions; state None when there are none.
1---2name: datacoolie-discover3description: Inspect data sources and produce verified source evidence for DataCoolie design or build work. Use for every new DataCoolie project before design, for every declared source type, and when an existing source is new, changed, missing evidence, or contradictory. Discovery is read-only evidence and never creates runtime metadata, workspace code, infrastructure, or releases.4---56# DataCoolie Discover78## Outcome And Boundary910Produce compact, reproducible source facts with provenance. Own inspection of source objects,11columns, types, constraints, relationships, size estimates, change signals, layouts, capabilities,12access limitations, and probe failures.1314Do not turn candidates into architecture or ingestion decisions. A possible watermark remains15evidence. Do not create configuration, runtime metadata, runners, functions, infrastructure, or16releases.1718## Probe Contract1920Use the smallest packaged read-only probe before manual investigation. Scripts generate repeatable21rows and status; the agent enriches only verified gaps.2223- Resolve credentials, headers, and storage options from environment variables or ambient identity.24- Reject secret-bearing command arguments and do not retain source values by default.25- Bound remote traversal, catalog inspection, custom queries, samples, and network calls.26- Treat exit `0` as complete, exit `3` as usable but partial, and any other non-zero exit as failed.27- Write every probe to its own scratch artifact. Duplicate stable keys are errors, not overwrite28 instructions.2930## Resource Routing3132Resolve resources relative to this skill and read only the matching reference.3334| Need | Resource |35|---|---|36| Relational catalog or bounded SQL gap | `scripts/introspect_db.py`, `scripts/probe_db.py` |37| File schema or bounded directory layout | `scripts/introspect_files.py` |38| OpenAPI, GraphQL, or OData | `scripts/introspect_api.py` |39| Iceberg, Hive, Unity Catalog, or Glue | `scripts/introspect_lakehouse.py` |40| Merge/refresh observations or assess watermark signals | `scripts/merge_observations.py`, `scripts/assess_watermarks.py` |41| Finalize complete object decisions | `scripts/finalize_watermark_assessment.py`, `templates/watermark-assessment.example.json` |42| Apply verified observation annotations | `scripts/enrich_observations.py` |43| Observation fields or manual rows | `references/observation-contract.md` |44| Python packages or external CLI prerequisites | `references/dependency-routing.md` |45| Unsupported source or unresolved probe gap | `references/fallback-probes.md` |46| Bounded database evidence query | `references/evidence-queries.md`, `scripts/probe_db.py` |47| Final summary or interview | `templates/discovery-report.tpl.md`, `templates/interview-questions.md` |4849## Workflow50511. Inventory every declared source boundary. For a new project, probe each source even when the52 supplied connection details and descriptions appear complete; declared facts select and bound53 the probe but do not replace observed evidence. For existing work, scope probes to the new,54 changed, missing, or contradictory facts.552. Read `references/dependency-routing.md`; install only the selected probe's dependencies and56 preflight any required external CLI.573. Run each probe into a distinct `.scratch/discover/{probe}.csv` and status JSON. Keep bounded58 layout summaries under `.scratch/discover/`; they are supporting evidence, not another inventory.594. Resolve or report partial and failed probes. Never describe partial coverage as complete.605. For a new project, merge all usable probe CSVs, including a single input, with61 `merge_observations.py`. For an existing source, use refresh mode with the current inventory as62 `--base`, explicit `--replace-source` and status inputs, a scratch candidate output, and a scratch63 diff. Do not replace prior complete evidence with a partial probe unless that exact source is64 explicitly accepted. Promote the validated candidate to `discover/observations.csv`.656. Preserve exact observed column types so build can author shared schema hints without re-querying66 or guessing. Keep probe time, method, scope, and failures in status JSON and the report rather67 than duplicating them on every observation row.687. Run `assess_watermarks.py` into `.scratch/discover/watermark-assessment.csv` with69 `--summary-output .scratch/discover/object-summary.json`. Read the JSON summary first and open70 detailed observations only for ambiguous objects. Normalized identifier and structural signals71 are scratch evidence, not final candidates.728. Assess every object for mutation coverage, ordering, duplicates, resets, late changes,73 filtering, and delete visibility. Investigate only decision-changing gaps. Use74 `references/evidence-queries.md` for one bounded custom database query and75 `references/fallback-probes.md` for unsupported sources; never execute reference examples as a76 batch. Custom SQL is self-contained and `probe_db.py` writes its bounded envelope to scratch77 JSON. For file sources, also verify delivery semantics: whether modification times are stable,78 whether files are replaced in place, and whether the path has real year/month/day/hour levels.79 Keep these object/layout facts in the report; framework virtual columns are not observed source80 columns.819. Complete the scratch object decisions and run `finalize_watermark_assessment.py`. It must cover82 every observed object and generates both watermark annotations and the report table. Apply its83 annotations with `enrich_observations.py`; use direct annotations only for other verified gaps.8410. Assemble `discover/report.md` with scope, exclusions, methods, partial or failed probes, and the85 generated assessment table. Discovery recommends evidence and fallbacks but leaves the final86 load strategy to design or an explicit human decision. Describe a transaction/business date as87 a backward fallback, not as complete change coverage, when no reliable change signal exists.8889## Output And Handoff9091```text92{workspace}/discover/93 observations.csv94 report.md95 raw/ # optional safe evidence required for reproducibility96```9798`observations.csv` is the only durable machine-readable inventory. `report.md` summarizes99high-signal evidence without copying the inventory, samples, or credentials.100101Shortlists, compact summaries, object decisions, generated annotations, report fragments, refresh102candidates, and diffs are scratch-only. They must never be imported by runtime code or mistaken for103additional durable inventories.104105Hand exact evidence paths to design when intent remains open, or to build when the design is106sufficient. Runtime code must not import discovery artifacts. Discovery approves neither outcome.107End with unresolved questions; state `None` when there are none.