Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4e8ffd9
docs(concepts): add grounding corpus for Ask Ontos (#280)
mvkonchits-db May 29, 2026
9ca44c7
feat(copilot): ground Ask Ontos in concept docs (#280)
mvkonchits-db May 29, 2026
84c29a1
fix(copilot): make search_ontos_concepts path resolution layout-agnostic
mvkonchits-db May 29, 2026
2e73ba6
fix(copilot): strip internal citation comments from user-visible resp…
mvkonchits-db May 29, 2026
ed02d73
docs(concepts): add installation-and-troubleshooting corpus (#280)
mvkonchits-db May 29, 2026
74e11c5
fix(copilot): hide three-tier confidence labels from user-visible res…
mvkonchits-db May 29, 2026
b015ff8
fix(copilot): stop echoing the user's question at the start of responses
mvkonchits-db May 29, 2026
c687f11
refactor(copilot): move system_prompts to tools/ (#280)
mvkonchits-db Jun 2, 2026
8c07adf
refactor(copilot): rename concepts → handbook to free up the "Concept…
mvkonchits-db Jun 2, 2026
3c26d22
feat(copilot): instruct the LLM on multi-language handling (#280)
mvkonchits-db Jun 2, 2026
aa6b9c4
fix(copilot): replace undefined _DEFAULT_HANDBOOK_DIR in resolve-fail…
mvkonchits-db Jun 2, 2026
7081758
feat(copilot): app-state awareness — adoption mode + mode-aware pream…
mvkonchits-db May 29, 2026
c97512a
feat(copilot): inject role + page + entity context into Ask Ontos pro…
mvkonchits-db May 29, 2026
73e315d
refactor(copilot): drop redundant client-side context prefix (#280)
mvkonchits-db May 29, 2026
7f8c082
feat(copilot): honor applied role override in Ask Ontos role label (#…
mvkonchits-db Jun 1, 2026
47be228
feat(copilot): entity-aware starter prompts on detail pages (#280)
mvkonchits-db Jun 1, 2026
5df37d8
feat(copilot): expand entity-templated starter prompts (#280)
mvkonchits-db Jun 1, 2026
375c33b
feat(copilot): smart prompt ranking + per-scope cap (#280)
mvkonchits-db Jun 1, 2026
82a3fc3
feat(copilot): context-scope toggle on Asking-about chip (#280)
mvkonchits-db Jun 1, 2026
2ab4a15
fix(copilot): match role override id as string in role label derivation
mvkonchits-db Jun 1, 2026
c331e2d
feat(copilot): audience contract + Asset awareness + how-to template …
mvkonchits-db Jun 1, 2026
b0a9419
docs(concepts): layer corpus into user-facing and implementation sect…
mvkonchits-db Jun 1, 2026
2b2b5d9
docs(concepts): drop unverified UI placement in DQX profiling step
mvkonchits-db Jun 1, 2026
806ff1a
docs(concepts): align Quality UI labels with the actual app
mvkonchits-db Jun 2, 2026
cce0a44
feat(copilot): drop ct_explain_quality starter prompt (#280)
mvkonchits-db Jun 2, 2026
afd6a54
fix(copilot): strip orphan asterisk runs + tighten markdown rule
mvkonchits-db Jun 2, 2026
0e99640
fix(copilot): post-rebase fixes after concepts→handbook rename
mvkonchits-db Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions docs/handbook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Ontos Handbook (LLM Grounding Corpus)

These documents are **internal grounding material for the Ask Ontos copilot**,
not user-facing product documentation. They define the canonical vocabulary,
role model, lifecycle states, ontology stack, data-quality model, and
end-to-end flows of Ontos so that a retrieval tool (`search_ontos_handbook`,
grep-style match) can return citable text fragments to the LLM at answer
time.

Naming note: this corpus used to be called "concepts", but "Concept" is
already an Ontos ontology entity (an RDFS class / SKOS concept in the
knowledge graph). To avoid overloading the noun in code, API surface,
and docs, the LLM-grounding markdown corpus is "handbook".

## How to read this corpus {#how-to-read}

If you are new to Ontos, start with
[end-to-end-flows.md](end-to-end-flows.md) — it walks the bottom-up and
top-down flows that the rest of the corpus elaborates. Then read the
[entities-glossary.md](entities-glossary.md) as a one-paragraph map of
every first-class thing. Then read whichever lifecycle / domain doc your
task touches. Citation discipline is required (see below) — if the
copilot can't anchor a claim to an anchor in this corpus, it should
refuse to answer rather than hallucinate.

## Scope {#scope}

In scope:

- Conceptual definitions of every first-class entity (data product,
contract, domain, agreement, workflow execution, concept, semantic
link, quality check, etc.)
- Role catalog, permission model, identity resolution, demo-mode override
- Status state machines for data products, contracts, agreements, and
workflow executions
- Ontology + knowledge graph + glossary distinctions
- Data quality model — definitions, measurements, rollups, DQX
integration
- End-to-end flows — bottom-up (UC → curated catalog) and top-down
(ontology → physical assets)
- Customer-voice "common questions" sections, role-targeted persona
framings

Out of scope:

- API reference (use the FastAPI `/docs` endpoint)
- File / line implementation citations (these live in
`docs/architecture/` if needed)
- Tutorials, marketing material, customer playbooks

## Citation discipline {#citation-discipline}

When the copilot answers a conceptual question, it attaches a citation of
the form `[ref: <file>.md#<anchor>]` to the relevant claim. In v1 these
citations are **internal-only** — they are stripped from the
user-facing response. They exist so reviewers can audit grounding
quality and so the citation contract is ready when we expose them in
v2.

Authoring rules for citation-ready sections:

1. Every concept worth citing has an explicit HTML anchor:
`## Thing {#thing}`.
2. Anchor names are kebab-case derived from the section heading.
3. Cross-references between docs use relative anchored links:
`[Output Port](data-contract-lifecycle.md#output-port)`.
4. Each file ends with a verification footer
(`_Last verified against codebase: YYYY-MM-DD_`).

## Adding a new concept doc {#adding-a-doc}

1. Pick a single subject (a role, a lifecycle, an entity family, a
cross-cutting concern). Keep each file under ~3.5 pages.
2. Add anchors for every concept the LLM might be asked about — not
every paragraph, but every nameable thing. Aim for 10–20 anchors per
file.
3. Ground claims in source (managers, db models, enums). Mark anything
in flux as "in the current Ontos version" or "evolving".
4. Include a Common Questions section if the doc covers something
customers ask about repeatedly.
5. Update the file list below.
6. Re-verify and bump the verification footer.

## Current corpus {#current-corpus}

| File | Subject |
|---|---|
| [roles-and-rbac.md](roles-and-rbac.md) | Permission model (feature × access level), built-in roles, identity resolution, demo-mode override, per-execution authz, Ontos-admin vs workspace-admin |
| [data-product-lifecycle.md](data-product-lifecycle.md) | ODPS data product states, deliverables, consumables, delivery methods, consumer principals, version family, common questions |
| [data-contract-lifecycle.md](data-contract-lifecycle.md) | ODCS v3.1.0 contract states, schema, quality definitions, editor-of-record framing, contracts-first vs products-first, version family, common questions |
| [agreement-workflow.md](agreement-workflow.md) | Approval workflow runtime, agreement vs execution vs wizard session, approval gates, grant_permissions, webhook extras, common questions |
| [ontology-and-knowledge-graph.md](ontology-and-knowledge-graph.md) | Ontology, knowledge graph, semantic links, glossary, three-tier linking, runtime graph, SPARQL, round-trip current state, common questions |
| [asset-model.md](asset-model.md) | One-pager: unified Asset entity, ontology-driven AssetType, AssetTypeCategory, entity relationships, asset reviews |
| [delivery-and-propagation.md](delivery-and-propagation.md) | Delivery Method vs Delivery Mode, Direct/Indirect/Manual modes, change-type taxonomy, concept→UC tag flow, integration with grant_permissions, common questions |
| [mcp-and-ask-ontos.md](mcp-and-ask-ontos.md) | In-product Ask Ontos copilot (grounding, permissions, refusals) vs the external MCP server (tokens, scopes, JSON-RPC), common questions |
| [data-quality.md](data-quality.md) | ODCS quality definitions, per-entity quality items, DQX end-to-end flow, source enums, surfacing, common questions |
| [end-to-end-flows.md](end-to-end-flows.md) | Bottom-up flow (UC → product → contract → concept), top-down flow (ontology → assets → tags), where they meet, common questions |
| [entities-glossary.md](entities-glossary.md) | One-paragraph definitions of every first-class entity |
| [installation-and-troubleshooting.md](installation-and-troubleshooting.md) | Distribution channels (Marketplace vs Git), first-install prerequisites, update workflow, alembic discipline, common UI errors users hit (request-role prompt, 403s, scope-missing, grant_permissions, sync layout), common questions |
| [personas-quick-reference.md](personas-quick-reference.md) | Plain-language persona framings, pages they touch, what they ask Ask Ontos |

_Last verified against codebase: 2026-05-29_
Loading