Skip to content

Feat/confluence sharepoint okf sources - #108

Merged
atharvaph-debug merged 2 commits into
mainfrom
feat/confluence-sharepoint-okf-sources
Jun 19, 2026
Merged

Feat/confluence sharepoint okf sources#108
atharvaph-debug merged 2 commits into
mainfrom
feat/confluence-sharepoint-okf-sources

Conversation

@atharvaph-debug

Copy link
Copy Markdown
Collaborator

Enrichment agent: natural-language --task input

Add a free-text --task flag: a lightweight classifier reads the description,
extracts the sources (Drive, local MD, Confluence, SharePoint, GitHub, BigQuery)
and mode, and resolves them into the existing typed flags. Deterministic
guardrails (anti-hallucination, URL cross-check, shape/confidence checks) filter
the parse; credentials are never read from the text.

--task and the classic flags mix freely — explicit flags always win, and omitting
--task leaves behavior unchanged. --project and --model are still required (needed
to run the classifier). Includes a README section documenting the new flow.

Add a single free-text --task flag that describes what to enrich and which
sources to read; a focused classifier resolves it into the agent's existing
typed source flags. The typed flags remain the canonical interface — this is
additive sugar that merges into them, and explicit flags always win.

tools/source_classifier.py (new):
  * LLM classification of the task into typed source categories (Drive
    folder/doc, local path, Confluence, SharePoint, GitHub repo, BigQuery
    dataset/table) plus infra config (output_dir / location / entry_group)
    and an inferred enrichment mode.
  * Deterministic, model-free guardrail layer (unit-testable without Vertex):
    G1 anti-hallucination (value must appear in the task), G2 URL/shape
    cross-check that overrides the model, G3 shape validation, G4 confidence
    floor, G5 dedup.
  * Confluence/SharePoint URLs are deferred to the production partition_sources
    parsers (page-id / space-key / site lifting); only a non-URL space KEY is
    routed straight to --confluence_space.

agent_runner.py:
  * --task / --task_dry_run flags; runs the classifier on the light model
    (KC_LIGHT_MODEL or --model), echoes the resolved config + sources, then
    auto-proceeds (or exits on --task_dry_run).
  * Merge: explicit flags win, scalars keep the explicit value, lists union.
  * --project now resolves flag -> GOOGLE_CLOUD_PROJECT -> ADC default (still
    required overall); --model stays required. project/model are NOT parsed
    from --task since they're needed to run the classifier itself.
  * --output_dir defaults to a CWD subdir named after the dataset/entry group
    when unset; mode is inferred from --task, falling back to the legacy
    dataset=>table/else=>doc rule, and prompts interactively when ambiguous.

Backward compatible: when --task is absent the classifier is never invoked and
every source resolves to its explicit flag value exactly as before.
Add a short README section covering the --task flag: describe a run in plain
English or keep using the classic flags (they mix freely; explicit flags win),
and call out that --project and --model are still required even with --task
since they're needed to run the classifier itself.
@atharvaph-debug
atharvaph-debug merged commit d2b9e2e into main Jun 19, 2026
6 checks passed
@jialuzh
jialuzh deleted the feat/confluence-sharepoint-okf-sources branch June 21, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant