LLM Leverage Patterns
OpenKnowledge is unusual in this corpus: it barely calls an LLM at all. It ships no agent loop, no provider abstraction, no prompt-caching strategy, no thinking management. The intelligence is borrowed from whatever harness mounts it. So the interesting question isn't "how does OK use the LLM" — it's "how does OK make a borrowed agent more effective, and safer, than it would be alone?"
1. The tool result is a just-in-time prompt
The strongest pattern. The workflow tool returns instructional prose, not data
(04_knowledge_workflows.md). Calling workflow({kind:'research'}) hands the
agent an 8-step procedure with hard gates; consolidate hands it a different one
with a decision gate. The harness "loop" stays generic; OK injects the method
per call. This is scope-injected-at-render
and markdown-as-skills taken to their conclusion:
the procedure is delivered at tool-call time, scoped to the mode requested, and
versioned server-side so it can improve without the agent reinstalling anything.
2. Skill as the floor, MCP as the ceiling
The discovery skill is written to work with no MCP server at all — bare
ls/cat/grep (05_skills.md). The agent's baseline capability is assumed to
be "a shell and a filesystem"; everything richer is an upgrade. This is a robust
way to leverage any agent: never depend on a capability the weakest harness
lacks.
3. Human-in-the-loop as STOP gates
Across discover/research/consolidate, the agent proposes and waits at
every phase boundary. consolidate refuses to promote research to canonical until
a human confirms a decision landed. The guardrail isn't a content filter — it's a
workflow gate that keeps the agent from advancing the knowledge base's state of
truth on its own. Two autonomy modes (Supervised / Headless) let you dial how many
gates are interactive while keeping the safety-critical ones (research-body.ts:28-41).
4. Provisional vs. canonical as enforced voice
The same model writes very differently depending on the workflow: provisional
articles must hedge ("tentative", "initial findings"); canonical articles must
decide ("we chose"). The status frontmatter and the prose voice are both
mandated. Leverage pattern: constrain the model's register with the document's
type, so a reader (or a downstream agent) can trust the confidence level without
re-judging it.
5. Evidence discipline
"Capture raw sources first; cite every claim; no bare URLs" (04). The agent is
steered to ground before it synthesizes, and the grounding is preserved in the
KB (the ingest layer) so the citation never rots. This is the cheapest possible
hallucination guardrail — make the verifiable thing the required input.
What distinguishes OpenKnowledge from "just ask Claude Code"?
Claude Code can already write markdown and run git. So what does OK add?
- Persistence with attribution. Claude Code's edits are anonymous diffs; OK's
edits are git commits on per-writer refs with
agent_type/session footers (07_git_sync_audit.md). The who and why survive. - A live, reviewable surface. The human watches edits land in a WYSIWYG editor
and can roll back one agent's contributions selectively (
06_collaboration_crdt.md), instead of reading a terminal diff. - A curation method, not just file ops.
discover/ingest/research/consolidateencode how to build a knowledge base well — dedup-before-research, ground-before-claim, decide-before-canonize — which a bare agent doesn't know. - Hybrid semantic search over the corpus (
09_agentic_search.md), which a shell-only agent can't do. - Cross-harness reach. The same substrate serves Claude, Codex, Cursor, and a
fully-local OpenCode loop from one MCP + skill install (
02_harness_integration.md).
The honest flip side: for a one-off note, "just ask Claude Code" is fine. OK earns its keep when knowledge accumulates over time and provenance, review, and curation start to matter — which is precisely the regime a code-review meta-harness and a compliance platform both live in.
For the owner's two projects
- Swisscheese. The reusable ideas: deliver the review rubric as a tool result; let agents be CRDT peers with per-author rollback; record every agent action as an attributed git commit; gate promotion-to-canonical on human decision. OK is the "substrate" complement to Omnigent's "orchestrator" — together they bracket the design space.
- AI Act platform. The audit story is nearly turnkey: per-writer refs +
OkActorEntryfooters = Art. 12 record-keeping; STOP gates = Art. 14 human oversight; evidence-discipline + immutable supersedes chains = traceable, reviewable AI output by construction.