Code map and ownership¶
Use this page to choose a responsible layer. The complete source inventory lists every inventoried first-party file, module summary and public top-level symbol. Its symbols are navigation aids rather than a stable exported API. The tables below add the context that AST inspection cannot supply: boundaries, neighboring modules, tests and when to edit a subsystem. All linked source and tests refer to the documented baseline.
Startup and presentation¶
| Files and key entry points | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
| app.py: page registration, workspace selection | connects ui.common, presentation, runtime connections and ui/pages/* |
edit navigation or top-level session wiring; keep domain decisions in services | UI, navigation |
launcher.py: main, application_root, default_home, prepare_runtime |
checkout/wheel/frozen startup, theme copy and Store initialization | edit launch/home/asset discovery; preserve lazy Streamlit import and legacy storage paths | distribution, storage locations |
ui/common.py, presentation.py, style.css |
cached Store/graph, exact asset/source selectors, common downloads and semantic chrome | edit shared presentation once; cache keys include workspace/source revision, settings and disclosure | UI parity, explorer evidence |
| ui/pages/: dashboard, builder, analysis, explorer, columns, transformations, tools, settings, connections, management, automation | page scripts delegate panels and services | edit page composition; avoid duplicate analysis, validation or persistent state in session widgets | navigation, column quality |
| lineage_navigation.py, lineage_tree.py, copy_names.py | selection history, lazy tree and clipboard components | edit exploration controls; exact IDs, cycle/depth bounds and escaped imported labels must survive | lineage tree, lineage QoL |
| analysis_sections.py, analysis_ai.py, analysis_inspection.py, analysis_reasoning.py | analysis launch/progress/report, lazy durable inspection and transient reasoning | edit analysis UI; delegate budgets/checkpoints to services, hydrate source only on demand | analysis UI, inspection UI, visibility |
| assistance.py, unresolved_review.py, assistance_result.py | preview, request, durable results and explicit inferred merge | edit focused assistance UI; share prepared request fingerprint and source-version pin | focused assistance, diagnostic budgets |
| workspace_settings.py, provider_settings.py, agent_settings.py, data_management.py | forms over configuration, provider, policy and maintenance services | edit user controls; persisted settings and launch permissions are separate contracts | remaining settings, provider setup, maintenance |
Import, parsing and identity¶
| Files and key exports | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
ingestion.py: Limits, ImportReport, Importer, safe_relative, decode |
archives/directories/browser entries to immutable source inventory and blobs | edit import admission, decoding or limits; do not bypass allowed roots, archive checks or excluded secrets | ingestion, hardening, inventory controls |
models.py: AssetRef, Usage, Operation, Diagnostic, ParseResult, statements, stable_id, operation_ids |
parser-neutral facts, evidence and deterministic identity inputs | edit shared contracts, serialization or statement splitting; check every parser and cached result | SQL, SAS, workflow |
parsers/sql.py: parse_sql; sql_transformations.py |
SQLGlot facts, supported wrappers, direct references and derivation extraction | edit SQL syntax/semantics; keep unsupported constructs explicit and update parser version | SQL, static wrappers, SQL transformations |
parsers/sas.py: parse_sas; sas_sql.py, sas_transformations.py |
DATA/PROC/macros/library references and embedded SQL | edit SAS extraction; source mapping, inline-data masking and job-local WORK identity must remain conservative | SAS project, SAS transformations |
parsers/csv.py: parse_csv, bounded_records |
bounded file asset/schema sampling | edit CSV inventory/schema inference; a filename match alone never establishes a table dependency | workflow, schemas |
asset_identity.py: AssetResolver, job and label helpers; schemas.py: collect_schemas |
namespace, lifetime, job and quote-aware identity; trusted declaration reconciliation | edit resolution or wildcard expansion; ambiguous declarations and unknown runtime order stay unresolved | job identity, schemas, column QoL |
dbt is a project subsystem¶
| Files | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
| dbt/imports.py, yaml.py, discovery.py | DbtImportOptions, path exclusions, safe YAML, project/package membership and artifacts |
edit admission/discovery; never read profiles or evaluate imported configuration | imports, scenarios |
| models.py, resources.py, templates.py, resolution.py | immutable project/resource identities, versions, SQL/Python/YAML/seed/macro inventory, static refs | edit resource/ref support; candidate conditional/dynamic references differ from resolved dependencies | resources, templates |
| artifacts.py, evidence.py, analysis.py | bounded artifact versions, exact JSON pointers/spans, static query/DAG adaptation | edit manifest/catalog/run-results or generated SQL evidence; preserve original versus compiled origin | artifacts, analysis |
| service.py, persistence.py, ai_context.py | closure/cache, DbtOperations, normalized snapshots, static and AI inventory/context |
edit project reports or persisted dbt support; ordinary facts publish with the shared workspace transaction | store, access, AI context |
Facts and investigation¶
| Files and key exports | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
services.py: analyze, analysis_is_current, publish_analysis_results, column_report, compare_runs |
parse/cache coordination and atomic current-fact materialization, dbt and accepted AI integration | edit orchestration/publication/freshness; selections preserve coherent prior results and pending input state | workflow, AI publication |
store.py: Store |
locked DuckDB, additive migrations through version 10 at this baseline, workspace/source/settings readers | edit persistence schema or exact-version retrieval; changing a current file must not rewrite historic evidence | store, pipeline store, inspection |
graph.py: LineageGraph |
directed evidence graph, focused traversal, paths, cycles and temporary contraction | edit graph algorithms; missing endpoints and traversal limits retain incomplete/unresolved markers | graph, lineage QoL |
transformations.py: materialize_columns, column_catalog, trace_columns |
revision-bound column/value derivations, roles, scopes and bounded traversal | edit transformation meaning; direct column_report is a different question |
transformations, access |
| reporting.py, exports.py, excel_exports.py | shared stored reports, offline HTML/CSV/source ZIP and literal-text bounded XLSX | edit serialization/report output; require explicit source inclusion, escape values, preserve revision and coverage | exports, Excel, report parity |
| graph_images.py, graph_image_service.py, image_worker.py, artifacts.py | inert SVG, bounded PNG workers and managed export publication/retrieval | edit image generation or artifact lifecycle; bounds and source disclosure apply before generation and retrieval | graph images, image artifacts, artifacts parity |
AI: preparation, extraction, recovery and publication¶
The AI architecture gives the detailed sequence. Protocol 5 is current; older adaptive/hybrid descriptions are historical. Independent extraction checks provenance and structure without static semantic approval; AI facts remain inferred. The model still contains compatibility fields, so do not infer a supported UI/CLI control from a field alone.
| Files | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
| analysis_service.py, project_analysis.py, ai_analysis_models.py | preview_analysis, run_analysis, analysis_report, transport operations and strict data contracts |
edit project lifecycle; parser/AI requests have different privacy/network requirements, hybrid is rejected by current coordinator | build contract, runs, policy interfaces |
| ai_context.py, ai_source_views.py, ai_context_index.py | original-source parts, bounded views, context index, completion dependencies | edit planner/context completeness; retain original offsets and pinned context on resume | preparation, context index, completion |
| ai_budget.py, ai_batching.py, model_capabilities.py, ai_rate_limits.py, llm_resources.py | complete request-envelope accounting, model-share allocation, packing, quota and request admission | edit capacity/concurrency; preview and dispatch must use the same bound profile/allocation | allocation, token budget, rate limits |
| llm.py, ai_wire.py, ai_extraction_recovery.py | provider requests/stream decoding, structured extraction wire format and recovery classification/splitting | edit transport/recovery; a lost response can have unknown upstream outcome and spending | transport, wire, recovery |
| ai_validation.py, ai_citations.py, ai_semantic.py, ai_composition.py, ai_linking.py, ai_reconciliation.py | current validate_extraction source provenance/internal consistency, file consolidation and deterministic operation graph; legacy citation/semantic/reconciliation APIs remain distinct |
edit extraction structure, linking or compatibility paths; current AI acceptance does not prove semantics | validation, consolidation, operation graph |
| ai_analysis_store.py, ai_pipeline_store.py, ai_inspection.py, ai_analysis_progress.py | durable results/requests/attempts/context checkpoints, retained bounded payloads and progress | edit resume/inspection/accounting; durable success and transient reasoning are separate | persistence, resumable files, response replay |
| assistance_queue.py, focused_grounding.py, ai_results.py, ai_service.py | focused diagnostic review, grounded claims, advisory results and explicit merge | edit manual assistance; advisory column/explanation output cannot merge lineage | queue, focused assistance, results |
Automation, configuration and maintenance¶
| Files and key exports | Responsibility and adjacent modules | Boundary; when to edit | Tests |
|---|---|---|---|
cli.py, agent/cli_ai.py, cli_dbt.py, cli_reports.py, cli_settings.py |
Typer adapters, structured output, explicit launch grants | edit command spelling/argument translation; keep policy in shared services and docs reference tables synchronized | CLI, documentation |
agent/service.py: AgentService; contracts.py, paging.py, capabilities.py |
action dispatch, launch + workspace policy, bounded query/revision cursors and capability discovery | edit shared automation use cases; default launch is read-only, source/config/network/admin grants are distinct | service, parity contracts, access |
| agent/mcp_server.py, jobs.py, worker.py | typed MCP adapters, guarded HTTP, thread/detached jobs and source-free journals | edit protocol/job lifecycle; MCP never gains local-admin maintenance mutations, polling must not require DB ownership | MCP, gateway sockets, analysis jobs |
| configuration.py, settings_service.py, provider_service.py, connections.py | validated portable preferences, revision-checked patches, provider/routing policy, scoped credentials/redaction | edit settings/provider/secret handling; connection values stay ephemeral and exact origin/reference grants remain enforced | workspace configuration, connections, providers parity |
| storage_locations.py, theme_configuration.py, logging_config.py | startup storage allowlist, app-wide theme configuration, safe structured event metadata | edit application controls; these have different scope from transferable workspace preferences | storage, themes, logging |
| cleanup.py, maintenance.py, temporary_cleanup.py, database_maintenance.py | fresh preview/confirmation, protected history, recoverable staging cleanup, integrity/backup/new-home restore | edit lifecycle operations; active work, retained evidence, shared blobs and mandatory backups need isolated regression coverage | cleanup, history, temporary cleanup, dbt maintenance |
Tooling and resources¶
| Paths | Role and when to edit | Adjacent evidence |
|---|---|---|
prompts/, src/dataforge/tokenizer_assets/ |
versioned assistance instructions and offline tokenizer resource; schema/protocol edits require prompt/cache/resume review | LLM, budget, LLM tests |
scripts/benchmark*.py, qualify_ai_context.py, verify_agents.py, verify_llm.py, verify_parity.py |
labeled synthetic/archive qualification and optional live checks; edit when a measured contract/workload changes | benchmark, parity verifier, qualification |
scripts/build/, src/dataforge/build.py, scripts/release.py, Dockerfile, compose.yaml |
packaging, bundled assets, executable/installer and smoke/release paths | distribution, release, installer |
scripts/docs/, mkdocs.yml, .github/workflows/ |
strict documentation build/publication, CI and security automation; inventory generation is AST-only | documentation maintenance, technology |
tests/test_*.py, tests/focused_test_profiles.py, fixture helpers and fixture trees |
executable regression contracts, shared bounded test selection and retained sample evidence | testing guide; inventory lists each file |
Pure package markers, resource/config files, test helpers and smaller sibling modules remain individually discoverable in the inventory. A module appearing next to another module does not grant it ownership of that module's policy or persistence.