Skip to content

RyanMerlin/curio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Curio — Curated Intelligence Operator

Curio

An information transformation system for enterprise knowledge. Git‑native, multi‑provider, multi‑tenant. Curates raw sources into a hierarchy of curated knowledge — and mirrors the result into Confluence for the humans who consume it.

version tests providers license


Why Curio

Most knowledge tools index documents. Curio editorializes them.

Every intake source is judged against the existing tree, scored on seven dimensions, optionally rewritten, optionally consolidated with peers, and routed to staged/, review/, or published/ with a defensible rationale recorded as a proposal dossier. The Rust binary handles deterministic execution; the LLM agent handles editorial judgment. Git is the system of record. Confluence is the read‑only mirror your audience actually opens.

Curio is not a page router. It is an information architect.

"If a curation step cannot be explained as inference‑driven judgment, the step is too early." — docs/design/operating-contract.md

What Curio does well

  • Hierarchy‑first synthesis. The agent walks the existing tree's index.md summaries and peer pages near likely branches before proposing a path. Default bias is toward deeper placement, never the easiest shallow match.
  • Multi‑source merge. Multiple sources from a single intake request can be consolidated into one curated proposal; the proposal dossier records every contributing source.
  • Agent‑authored bodies. The agent ships a curated knowledge object, not a raw capture. Body rewrites land with a structured decision section explaining the scores, alternatives, and recommended action.
  • Continuous overlap detection. Pages with high semantic overlap are flagged for merge or consolidation instead of becoming silent duplicates.
  • Self‑sharpening. curio sharpen --prepare emits a manifest of restructure / merge / split candidates for the agent to act on.
  • Taxonomy mutations. When no existing node fits, the agent proposes a new node against NORTHSTAR.md. Reviewers see a dedicated "Taxonomy mutation proposed" panel in Confluence before approving.
  • Production‑grade safety. Atomic registry writes, intake resume‑after‑crash, publish‑time re‑gate (quality + overlap + taxonomy validity rechecked at promotion), --force escape hatch with audit logging, JSON error envelope on every --json command, full --dry-run that never touches Confluence.

The lifecycle

  ┌──────────┐     ┌───────────┐     ┌──────────┐     ┌──────────┐     ┌─────────────┐
  │  intake  │ ──▶ │  process  │ ──▶ │  staged  │ ──▶ │  publish │ ──▶ │ sync to     │
  │ wiki/    │     │  (agent)  │     │  /review │     │          │     │ Confluence  │
  │  intake/ │     └───────────┘     └──────────┘     └──────────┘     └─────────────┘
  └──────────┘           │                  ▲
       │                 │ proposal,        │ feedback signals
       │                 │ dossier,         │ (👍 / 👎 / ❓ from
       │                 │ scores           │ reviewers in Confluence)
       │                 ▼                  │
       │           ┌──────────┐             │
       └────────▶  │   heal   │ ────────────┘
                   │ sharpen  │
                   └──────────┘

Every transition is git‑committed; every editorial decision lives in a .proposal.json dossier next to the page. The audit trail is the repo.

Target use cases

Use case What Curio organizes Why it fits
Customer / account intelligence sanitized engagement notes, recurring patterns, post‑engagement learnings Hierarchy keeps related accounts together; overlap detection prevents account‑specific lessons from being lost in duplicate pages.
Product knowledge bases install, configure, upgrade, troubleshoot per product / version Deeper paths (e.g. product-tree/example-server/upgrade/versions/24.2) keep technical content discoverable as products evolve.
Partner / channel knowledge partner programs, tiering, joint motions, partner‑led playbooks Confluence mirror lets partner‑facing teams consume curated output without git literacy.
FDE / SE use‑case catalogs engagement patterns, solution recipes, anti‑patterns Anti‑pattern branch + sharpening loop turns failure analyses into reusable policy.
Subject‑matter references structured technical references with explicit taxonomy NORTHSTAR.md is the editorial charter; the agent enforces it.

Each KB is a separate git repo with its own taxonomy, its own Confluence space, and its own credentials. A single Curio harness instance manages N KBs without cross‑tenant leak.

Get started

You can drive Curio three ways. Pick whichever fits the moment.

Option 1 — Service via Docker (recommended for shared use)

The hosted path your colleagues will use day‑to‑day.

# from this repo
cd deploy/local
cp .env.example .env            # paste your Confluence token
docker compose up -d --build
curl http://localhost:8080/healthz
./smoke-test.sh                 # exercises all 3 KBs end‑to‑end

Then post a job:

curl -X POST http://localhost:8080/v1/jobs \
  -H 'Content-Type: application/json' \
  -d '{"job_type":"intake","workspace_id":"partner-business","operation":"intake",
       "actor":{"kind":"human","id":"you"},"trigger":{"kind":"manual"},
       "write_mode":"direct_push",
       "inputs":{"args":["--url","https://yourorg.atlassian.net/wiki/spaces/X/pages/123"]}}'

Option 2 — CLI (local dev / debug)

cd curio-rs && cargo build --release --bin curio
./target/release/curio --workspace <name> doctor   # 8 infra checks; expect ✓ all
./target/release/curio --workspace <name> intake --url <confluence-or-web-url>
./target/release/curio --workspace <name> process --prepare > manifest.json
# hand manifest.json to your agent, get routes.json back
./target/release/curio --workspace <name> process --route-file routes.json
./target/release/curio --workspace <name> publish <slug>
./target/release/curio --workspace <name> sync

Option 3 — Onboard a new colleague

deploy/local/setup-colleague.sh <name> <space-key> <parent-page-id>
# Scaffolds the KB, registers the workspace in both curio.workspaces.toml
# and deploy/local/state/workspaces.json, runs git init, prints next steps.

See docs/runbook.md for the full day‑zero operator guide.

The Confluence side

What reviewers actually see when they open a page Curio synced to their space:

  • Banner explaining the lane (Review, Staged) and what action is expected
  • Curation Decision table with all seven score dimensions as inline bars (route, quality, hierarchy fit, overlap risk, evidence completeness, usability, freshness)
  • Recommendation panel with proposal kind, recommended action, merge target if any, review reason
  • Taxonomy mutation proposed note macro when approving the proposal also adds a new node to NORTHSTAR.md — with full new‑node title, slug, parent path, description, rationale
  • Alternatives considered list (the paths the agent rejected and why)
  • Body rewrite badgenone / light_edit / full_synthesis so reviewers know what they're reading
  • Branch landing pages with status badges on every child link (proposal kind, route confidence, overlap warning, "+new node" tag)
  • Pinned reviewer comment — react 👍 to approve, 👎 to reject, ❓ to request a rewrite; equivalent labels work too; curio feedback applies the signals

Multi‑tenant from day one

   curio harness                 ┌─────────────┐
   (one Docker container)        │ Confluence  │
        │                        │  spaces     │
        ├── wiki #1   ◀──sync──▶ │  • PARTNER  │
        ├── wiki #2   ◀──sync──▶ │  • FDE      │
        └── wiki #3   ◀──sync──▶ │  • CURIO    │
  • Each KB declares its Confluence URL, email, space key, and token env var in its own .curio.yaml.
  • The token env var is per‑KB — colleagues can each have their own bot account if they want.
  • The workspace registry is atomic (write‑tmp + rename) so concurrent restarts can't corrupt it.
  • curio doctor runs eight per‑KB infrastructure checks including a real Confluence auth probe.

Two‑layer architecture

   ┌──────────────────────────────────────────┐
   │   Curio harness (this repo)              │
   │   • Provider entrypoints + profiles      │  ◀── editorial / inference layer
   │   • Skills, plugins, marketplace catalog │      (Claude / Codex / Gemini)
   │   • Manifest + dossier composition       │
   │   • Operator UX                          │
   └──────────────────┬───────────────────────┘
                      │
   ┌──────────────────▼───────────────────────┐
   │   curio-rs (deterministic Rust crate)    │
   │   • CLI primitives (intake, process,     │  ◀── deterministic / safety layer
   │     publish, sync, doctor, heal, etc.)   │      (no LLM calls in the binary)
   │   • Git mutations                        │
   │   • Confluence v2 client                 │
   │   • Filesystem + index management        │
   │   • Service (Cloud Run / Docker)         │
   └──────────────────────────────────────────┘

The rule: if behavior is deterministic and safety‑sensitive, it lives in curio-rs. If it is about composition, routing, or editorial judgment, it lives in the harness.

Providers

All three providers launch from the same workspace contract — taxonomy, skills, plugin catalog, manifest, environment.

Provider Entrypoint Profile Notes
Claude CLAUDE.md (stub → HARNESS.md + providers/claude/overrides.md) providers/claude/profile.json Primary curation agent today; .claude/settings.local.json optional
Codex AGENTS.md (same pattern) providers/codex/profile.json .agents/skills/ compatibility mirror
Gemini GEMINI.md (same pattern) providers/gemini/profile.json ADK‑Go launcher target

Adding a fourth provider = one folder under providers/<name>/ plus one root stub. See HARNESS.md for the shared operating contract.

Tests and quality

  • 80 tests pass — lib unit tests, demo workspace, multi‑KB isolation, multi‑tenant safety, publish re‑gate, page‑body rewrite, multi‑source synthesis, routing evaluation, doctest.
  • Every command supports --json with a stable envelope {command, ok, data} or, on errors, {command, ok: false, error: {code, message, hint}}.
  • curio doctor validates eight per‑KB infrastructure invariants (config / NORTHSTAR / git / Confluence URL / email / token / space key / auth probe).
  • --dry-run on every write command is a true read‑only preview — sync --dry-run never constructs a Confluence client.
  • Atomic registry writes prevent corruption across concurrent service restarts.
  • Multi‑tenant integration tests verify zero cross‑KB filesystem or env‑var leak.

Documentation

Doc Audience What's in it
HARNESS.md Agents Canonical, provider‑neutral operating contract
ARCHITECTURE.md Engineers Layer boundaries (curio‑rs ↔ harness) and design rules
docs/runbook.md Operators / colleagues Day‑zero guide: intake → process → publish → sync, recovery, rollback
docs/design/process.md Anyone shaping the editorial pipeline Long‑form spec for the proposal model
docs/design/operating-contract.md Curation agents + reviewers The inference‑first loop
docs/agent-cli-contract.md Tool integrators Machine‑readable JSON shapes for every command
docs/design/2026-05-10-production-handoff-plan.md Implementers The Tier 1 handoff plan, completed
docs/design/2026-05-10-tier2-plan.md Implementers Tier 2 editorial completion plan, in flight
CHANGELOG.md Everyone Most recent shipped changes

Repo layout

curio-agent/
├── HARNESS.md                     # canonical shared contract
├── CLAUDE.md / AGENTS.md / GEMINI.md   # thin provider stubs
├── providers/
│   ├── claude/{profile.json, overrides.md, settings.template.json}
│   ├── codex/{profile.json, overrides.md}
│   └── gemini/{profile.json, overrides.md}
├── skills/                        # authored Curio skills
├── plugins/                       # plugin bundles (skills + tools)
├── curio-rs/                      # the deterministic Rust crate
│   ├── src/
│   │   ├── commands/              # one file per CLI subcommand
│   │   ├── service/               # HTTP service for Docker / Cloud Run
│   │   └── *.rs                   # config, confluence, git_ops, ...
│   └── tests/                     # integration tests
├── deploy/
│   ├── cloud-run/                 # Cloud Run Dockerfile + Terraform
│   └── local/                     # docker-compose for local 3-KB testing
└── docs/                          # all the docs above

Status

Tier Status
Tier 1 — multi‑tenant hardening, doctor, runbook, colleague onboarding ✅ Shipped
Tier 2 — page‑body rewriting, Review‑tree polish, multi‑source synthesis ✅ Shipped (T2‑A → T2‑C)
Tier 2 — embeddings overlap, continuous sharpening, tuning‑corpus learning 🟨 In flight (T2‑D → T2‑F)
Tier 3 — Cloud Run deploy, audit log surfacing in Confluence 🗓 Planned

See docs/design/2026-05-10-tier2-plan.md for what's next.

Onboarding a colleague (one command)

deploy/local/setup-colleague.sh alice myspace 9876543210

Scaffolds ~/curio-kb/alice/ with a wiki tree, NORTHSTAR.md template, .curio.yaml pointed at the right Confluence space, .env.example for the token, a colleague‑facing README, and git init. Registers the workspace in both curio.workspaces.toml and the docker‑compose service registry. Prints the colleague's first five steps.

Operating principles

  1. Git is the source of truth. Confluence is the read‑only mirror.
  2. Inference first. Use commands to apply decisions, not to discover whether a decision exists.
  3. published is never the first move. New work lands in staged or review.
  4. Hierarchy is the primary optimization target. Default toward deeper paths for technical or scenario‑specific content.
  5. Confidence alone is not enough to publish. Quality and usability matter equally; the publish gate re‑checks at promotion.
  6. Anything a human must review must surface in Confluence. If it's only in Git, it's operationally invisible.
  7. Low‑signal content goes back to review. Never publish a placeholder with a weak confidence‑only justification.

Curio · Curated Intelligence Operator · Git‑native, multi‑provider, multi‑tenant

About

Git-native editorial knowledge-base harness. Curates raw sources into a hierarchy of curated knowledge — and mirrors the result into Confluence for the humans who consume it.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors