Section 09 - self-provisioning + ship the query surface (INV-4)
Goal
/sync-from-orilang provisions a project-local intel stack when missing — stand up neo4j (container,
idempotent) + apply schema + register the project’s OWN source in its repos.yaml + install a
post-commit code-graph sync hook — and ship the query surface (today orilang_only) so a synced project
can actually query. A host with no docker still runs the harness (the exit-0 / degraded contract is
preserved end-to-end).
Implementation Sketch
Today provisioning is fully manual (intel_repo/CLAUDE.md:38 docker compose up -d + fetch-all.sh +
schema apply); /sync-from-orilang does ZERO graph standup; and intel-query.sh / the query-intel
skill / intelligence.md are classified orilang_only (scripts/harness_dist/manifest.json:743), so a
synced project never receives the query surface. Degradation is already solid (intel-query.sh exit-0;
intel_package_runtime fail-open) — only the positive path is missing.
- Add a sync-time provisioning step (
scripts/sync_from_orilang_runtime/or harness_dist post-sync, canonical-driven per INV-1): distribute theintel_repoessentials (schema.cypher, venv requirements, grammars), stand up neo4j via an idempotent projectdocker-compose(per-project container/volume names), apply schema, write the project’srepos.yamlself-entry, install the post-commit code-graph hook. - Reclassify
intel-query.sh/query-intelskill /intelligence.mdinscripts/harness_dist/manifest.jsonfromorilang_only→tailorable/adaptedso the query surface ships (re-classification is a manifest sync-point;verifymust stay green). - PRESERVE the contract:
intel-query.shkeeps its no-docker-introspection rule (standup is a sync-time step, never a query-time one); a docker-less host stays exit-0 / degraded. Provision aggressively, degrade gracefully, never hard-depend on neo4j.
Spec & Rule References
INV-4 (mission). intelligence.md (degradation contract). script-first.md §11. Depends on s-07 + s-08
(ingest must work before auto-provisioning is worth it).
Layer Coverage
Tooling-scope: L1-L11 N/A. L12 = a sync into a throwaway target that stands up a real (throwaway) neo4j +
ingests + queries; plus a no-docker host staying exit-0. pytest gate: scripts/harness_dist/tests/
(manifest re-classification + degradation regression) + an end-to-end standup smoke test.
Work Items
- Add a canonical-driven sync-time provisioning step: distribute intel_repo essentials, stand up neo4j idempotently, apply schema, write the project’s repos.yaml self-entry, install the post-commit code-graph hook.
- Reclassify intel-query.sh/query-intel/intelligence.md in manifest.json from orilang_only to tailorable so the query surface ships (keep verify green).
- Preserve the exit-0/degraded contract: a docker-less host still runs the harness; standup is sync-time, never query-time.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “installable-harness/s-e8b53226” }, “generated_at”: “2026-06-25T17:32:01.961413+00:00”, “graph_state”: { “head_sha”: “b74d6b9a”, “last_code_import_at”: “2026-06-25T17:28:25.096Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:installable-harness/s-e8b53226] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/installable-harness” } } }
(full dossier: self-provisioning-ship-query—s-e8b53226.intel.json)