Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
onto_marketplace Design
Summary
Add an onto_marketplace tool (tool #43) that provides a curated catalogue of 29 standard W3C/ISO/industry ontologies, fetchable with a single command. Built on top of existing fetch_url + load_turtle/load_content infrastructure.
Motivation
Every real ontology project starts from industry standards, not a blank slate. Palantir sells pre-built "industry models" as a premium feature. We give away 29 standard ontologies for free -- proper OWL/RDF standards that interoperate with any tool in the semantic web ecosystem.
Tool Interface
Input
struct OntoMarketplaceInput {
action: String, // "list" or "install"
id: Option<String>, // e.g. "prov-o", "schema-org", "foaf"
domain: Option<String>, // filter list by domain
}
Actions
- list: Returns JSON array of
{id, name, description, domain, url, format}. Filterable by domain. - install: Fetches the ontology by ID from its canonical URL, loads it into the triple store, returns triple count + class/property stats.
Catalogue (29 ontologies)
Implementation
Changes required
src/graph.rs-- Addload_content(&self, content: &str, format: RdfFormat) -> Result<usize>to handle fetched content in any RDF format (not just Turtle).src/inputs.rs-- AddOntoMarketplaceInputstruct.src/marketplace.rs(new) -- Catalogue definition as a static array ofMarketplaceEntrystructs.src/server.rs-- Addonto_marketplacetool method.src/main.rs-- AddmarketplaceCLI subcommand.
Catalogue storage
Hardcoded Rust array. No remote registry. Standard ontologies don't change often -- updates come with new releases of the binary.
Format handling
Each catalogue entry stores its RDF format (turtle or rdfxml). The install action uses fetch_url then load_content(content, format) instead of load_turtle to handle both formats.
Benchmarking
After implementation, benchmark all 29 ontologies through the full pipeline:
onto_clear->onto_marketplace install <id>->onto_stats->onto_reason->onto_stats
Record: fetch time, triple count (before/after reasoning), class count, property count. Add results to README.