Cognisync is a filesystem-first framework for building LLM-maintained knowledge bases.
It turns the workflow described by Andrej Karpathy into a reusable open source system:
- Collect raw source material into a workspace.
- Index and normalize that material into a deterministic manifest.
- Generate structured work packets for LLM agents to compile a wiki.
- Lint the resulting knowledge base for integrity problems.
- Answer questions by searching the corpus and rendering outputs back into Markdown, slides, and other artifacts.
The goal is not to replace your favorite model or agent runner. The goal is to provide the workspace model, orchestration contracts, indexing primitives, and output formats that let people build serious tooling around this pattern.
- Filesystem-native:
raw/,wiki/, andoutputs/stay readable in tools like Obsidian. - LLM-compatible: the framework produces prompt packets and execution plans for external LLM CLIs.
- Incremental: every scan, lint pass, query, and report can be filed back into the workspace.
- Deterministic where possible: indexing, search, linting, and report scaffolding work without network access.
- Extensible: users can write adapters, renderers, and orchestration layers on top of the core contracts.
workspace/
├── AGENTS.md
├── log.md
├── raw/
│ └── ... source documents, repos, datasets, images
├── wiki/
│ ├── index.md
│ ├── sources.md
│ ├── concepts.md
│ ├── queries.md
│ ├── sources/
│ ├── concepts/
│ └── queries/
├── outputs/
│ ├── reports/
│ │ ├── change-summaries/
│ │ ├── exports/
│ │ ├── research-jobs/
│ │ ├── review-exports/
│ │ └── review-ui/
│ └── slides/
├── prompts/
└── .cognisync/
├── access.json
├── audit.json
├── collaboration.json
├── config.json
├── control-plane.json
├── graph.json
├── index.json
├── notifications.json
├── review-actions.json
├── review-queue.json
├── runs/
├── shared-workspace.json
├── sync/
├── sources.json
├── usage.json
└── plans/
- Workspace scaffolding
- A root
AGENTS.mdworkspace schema that explains the file-native contract to agents - A root
log.mdactivity ledger that records init, ingest, lint, compile, research, and maintenance work - Deterministic corpus scanner and manifest builder
- Stable source and graph manifests under
.cognisync/ - Stable review queue manifests for graph follow-up work under
.cognisync/ - Durable review-action state so accepted concepts, merge decisions, and dismissals survive rescans
- Durable collaboration threads under
.cognisync/collaboration.jsonso artifact review requests, comments, approvals, and change requests travel with the workspace - Durable shared-workspace state under
.cognisync/shared-workspace.jsonso peer bindings, accepted remote principals, and handoff bundles stay file-native too - Durable control-plane state under
.cognisync/control-plane.jsonso invites, bearer tokens, and scheduler ticks stay file-native too - Regenerated wiki navigation catalogs at
wiki/index.md,wiki/sources.md,wiki/concepts.md, andwiki/queries.md - Deterministic corpus change summaries after scan, ingest, maintenance, and research runs
- Export bridges for JSONL research datasets, training bundles, and presentation bundles
- Evaluation reports over persisted research runs
- Research job notes and validation reports under
outputs/reports/research-jobs/ - Markdown-aware search over
raw/andwiki/ - Compile planner for missing summaries, concept pages, and repair work
- Knowledge-base linter for broken links, missing summaries, graph conflicts, and duplicate concepts
- Markdown and Marp report renderers
- Research and compile run manifests with persisted validation state
- Command adapter contracts for wiring in external LLM CLIs
- A tested Python API and CLI
python3 -m pip install -e .
cognisync init .
cognisync doctor --strict
cognisync ingest batch sources.json
cognisync adapter list
cognisync adapter install codex --profile codex
cognisync compile --profile codex --strict
cognisync research "what are the main themes in this workspace?" --profile codex --mode memo --slidesIf you want a concrete workspace immediately, Cognisync can scaffold a polished demo garden:
cognisync demoBy default this writes a browsable example into examples/research-garden/. The demo includes:
- seeded raw source material
- compiled source summaries and concept pages
- a filed query page
- generated reports, slides, and prompt packets
You can inspect the checked-in example in examples/research-garden or follow the walkthrough in Demo Walkthrough.
Cognisync is strongest when you use it as a loop, not a bag of separate commands:
cognisync doctor --strict
cognisync ingest batch sources.json
cognisync review
cognisync collab request-review outputs/reports/report.md --assign reviewer-1 --actor-id editor-1
cognisync maintain
cognisync compile --profile codex --strict
cognisync research "what changed in this corpus?" --profile codex --slidesThe operator-facing workflow is documented in Operator Workflows.
Each scan, ingest, maintenance, and research pass now also writes a small change artifact into outputs/reports/change-summaries/ so the workspace records what moved:
- artifact and source count deltas
- orphan-page delta
- graph node and edge deltas
- changed artifact and source-group details
- affected graph nodes for entities, assertions, concept candidates, and conflicts
- recompilation suggestions such as
refresh_source_summarywith exact source and summary paths - new concept pages
- newly resolved merges
- newly dismissed review items
- newly surfaced conflicts
- suggested follow-up questions based on new conflicts, assertion growth, and coverage gaps
The workspace root now carries two operator-facing files inspired by the idea-file workflow:
AGENTS.mdis the durable workspace schema that tells an LLM how to treatraw/,wiki/,outputs/, and.cognisync/log.mdis an append-only human-readable timeline of important workspace actions
The wiki root also regenerates four navigation surfaces on refresh:
wiki/index.mdis the top-level agent entry pointwiki/sources.md,wiki/concepts.md, andwiki/queries.mdcatalog the durable pages in each section- source and concept catalogs count as stable navigation backlinks
- query catalogs only become backlink-bearing when an explicit review action promotes them, so query pages can still surface as orphan review candidates until they are intentionally filed
The richer ingest layer now makes the loop more useful before an LLM even runs:
ingest pdfpreserves the source PDF and writes a sidecar Markdown file with extracted text and metadataingest notebookpreserves the.ipynband writes a Markdown sidecar with cell counts, kernel metadata, code previews, and output-type summariesingest datasetcopies JSON, JSONL, CSV, TSV, Markdown, or text dataset descriptors intoraw/datasets/and writes a descriptor-level preview sidecar without materializing full datasetsingest image-foldercopies supported image assets intoraw/images/<name>-assets/and writes a gallery sidecar with extension counts and sibling Markdown/text captions when presentingest urlcaptures page metadata such as description, canonical URL, headings, discovered links, content stats, and local image capturesingest repocaptures repository stats, language signals, recent commits, and a nested tree snapshot in the repo manifest, whether the source is local or cloned from a remote Git URLingest urlsreads a plain-text or JSON URL list intoraw/urls/ingest sitemapexpands a sitemap into individual URL capturesingest batchprocesses a JSON manifest so larger source sets can land in one deterministic pass, including notebooks, dataset descriptors, image folders, URL lists, and sitemaps
Batch ingest accepts a JSON list or an object with an items list:
{
"items": [
{"kind": "url", "source": "https://example.com/article"},
{"kind": "urls", "source": "/path/to/urls.txt"},
{"kind": "sitemap", "source": "/path/to/sitemap.xml"},
{"kind": "pdf", "source": "/path/to/paper.pdf"},
{"kind": "notebook", "source": "/path/to/analysis.ipynb", "name": "analysis"},
{"kind": "dataset", "source": "/path/to/dataset-card.json", "name": "dataset-card"},
{"kind": "image-folder", "source": "/path/to/diagrams", "name": "architecture-diagrams"},
{"kind": "repo", "source": "https://github.com/example/repo.git"}
]
}Notebook, dataset, and image-folder ingest are local-first corpus capture paths. Hosted remote execution for local filesystem research-step ingest is intentionally still a later milestone; this release records durable artifacts and source manifests that future remote workers can consume.
The query and research outputs are now more citation-friendly by default:
- reports render an evidence summary with inline source ids like
[S1] - reports now render
Fact Blocksthat separate source-backed claims from the looser narrative sections - source blocks include path, source kind, score, retrieval reason, snippet, and embedded-image hints
- compile packets include input-context excerpts so external agents see richer raw context up front
- research runs validate inline citations and persist their status into
.cognisync/runs/ - scans now materialize stable source, graph, and review manifests at
.cognisync/sources.json,.cognisync/graph.json, and.cognisync/review-queue.json
cognisync research is the opinionated operator surface for question-driven work:
cognisync research "how do agent loops use memory?" --profile claude --mode memo --slidesIt scans the workspace, searches the corpus, renders a cited report, builds a prompt packet, optionally runs the packet through an adapter profile, validates inline citations, and files the resulting answer back into the workspace.
Every research run now also writes:
- a research plan in
.cognisync/plans/ - a run manifest in
.cognisync/runs/ - a research job workspace in
outputs/reports/research-jobs/ - a first-class agent-plan artifact pair at
outputs/reports/research-jobs/<run>/agent-plan.jsonandagent-plan.md - per-step execution packets in
outputs/reports/research-jobs/<run>/execution-packets/ - step execution and review state in
outputs/reports/research-jobs/<run>/checkpoints.json - a research change summary in
outputs/reports/change-summaries/ - enough state to resume execution later without rebuilding the packet
That run-scoped workspace is now directly operable too:
cognisync research-step list --run latest
cognisync research-step run --run latest --step build-paper-matrix --profile codex
cognisync research-step dispatch --run latest --default-profile codex --profile-route build-paper-matrix=gemini
cognisync research-step dispatch --run latest --default-profile codex --hosted
cognisync research-step review --run latest --step build-paper-matrix --status approved --reviewer reviewer-1
cognisync research --resume latestresearch-step turns the packet scaffold into a file-native operator loop:
listshows every step with planned, execution, and review status plus its assignment id, agent role, worker capability, review path, and planned adapter defaultrunexecutes one step packet through any configured adapter profile and writes the step artifact back into the research-job workspacedispatcheither executes eligible note-building steps locally in dependency order or queues the remote-eligible research steps as hosted jobs with--hosted, always honoring assignment-level adapter defaults unless you override specific step ids with--profile-routereviewrecords approval or change-request state on the same checkpoint manifest so later resumes or exports can see which intermediate artifacts were trustedresearch --resume latestnow closes the loop too: without--profile, it finalizes from an approvedexecute-profileartifact and runs local validation plus filing; with explicit--profile, it still reruns synthesis through that adapter on purpose
The agent-plan artifact now makes the multi-agent intent explicit and drives the first hosted research-step runtime:
- each eligible research step now maps to a stable assignment with an agent role, worker capability, validation rule set, and review path
- checkpoints keep step-level execution and review state linked back to those assignment ids
research-step dispatch --hostedqueues note-building and synthesis assignments as first-classresearch_stepjobs for remote workers, while validation and filing remain local-only in this milestone- hosted operators can now inspect
GET /api/research-runs, recordPOST /api/research-steps/review, and triggerPOST /api/research/resume, so the same reviewed hosted run can move from remote execution to final filing without dropping back to a local shell
Research now supports orchestration profiles too:
synthesis-reportfor working-set and outline-driven synthesisliterature-reviewfor paper matrices and gap trackingrepo-analysisfor code-surface and interface mappingcontradiction-findingfor claim ledgers and disagreement handlingmarket-scanfor competitor-grid and positioning work
Research verification is now stricter too:
- unknown citations fail the run
- uncited narrative claims fail the run
- malformed answers, such as missing top-level headings, fail the run
- conflicting source statements now fail the run unless the answer explicitly acknowledges the disagreement and cites both sides
The graph layer is richer now as well:
.cognisync/graph.jsonincludes entity nodes and mention edges, not just artifacts and tags- source-backed assertions now materialize as first-class assertion nodes with artifact support edges
- repeated entities and tags become concept candidates with support counts
- compile planning can propose concept pages from those candidates even when explicit tags are missing
- conflicting source claims are represented in the graph so downstream tools can inspect tensions in the corpus
- accepted concept pages now render grounded assertion sections so promoted concepts carry source-backed evidence instead of only source links
The operator loop now has a review layer too:
cognisync reviewrenders concept-page candidates, entity merge suggestions, conflicting claims, and backlink opportunities.cognisync/review-queue.jsonstores those items as a durable queue for follow-up automation or human review.cognisync/review-actions.jsonrecords accepted concept pages, resolved entity merges, and dismissed queue items so the graph stays cleaner on the next scancognisync review accept-concept <slug>turns a concept candidate into a deterministic concept page scaffoldcognisync review resolve-merge "<canonical label>"records a preferred label, updates concept metadata, and collapses future graph nodes into the resolved entitycognisync review apply-backlink <wiki/path.md>routes orphan pages back into stable navigation pages without mutating raw source materialcognisync review file-conflict "<subject>"files a deterministic conflict note underwiki/queries/conflicts/cognisync review dismiss <review-id> --reason "..."closes a queue item intentionally and persists why it should stay closedcognisync review reopen <review-id>removes a dismissal so the underlying item can surface in the queue againcognisync review list-dismissedshows the current dismissal ledgercognisync review clear-dismissed <review-id>removes one dismissal record without reopening it through a separate queue actioncognisync review exportwrites a machine-readable artifact with the open queue, dismissal ledger, and review action state for other agents or toolscognisync collab list|request-review|comment|approve|request-changes|resolvematerializes artifact-level review state in.cognisync/collaboration.json, so human or agent review threads live beside the corpus instead of in chat logscognisync export jsonlwrites research-run records intooutputs/reports/exports/as a portable JSONL dataset artifactcognisync export training-bundlewrites a finetuning-friendly dataset bundle with labels derived from validation and conflict checkscognisync export finetune-bundlewrites supervised and retrieval datasets together so research runs, validated remediation corrections, synthetic QA, and contrastive pairs can feed downstream finetuning jobs from one bundlecognisync export finetune-bundle --provider-format openai-chatalso emits an OpenAI-style chat JSONL alongside the generic supervised datasetcognisync export feedback-bundleturns low-quality research runs into remediation-ready records so eval output can feed a real correction loopcognisync remediate research --profile <profile>replays weak research runs through remediation prompts and writes validated correction jobs underoutputs/reports/remediation-jobs/cognisync export correction-bundleturns those validated remediation jobs into correction-training records for downstream repair or finetuning loopscognisync export training-loop-bundle --provider-format openai-chatpackages evaluation, feedback, corrections, and finetune artifacts into one portable training-loop bundlecognisync improve research --profile <profile> --provider-format openai-chatruns the remediation loop and refreshes the bundled training artifact in one commandcognisync notify listmaterializes a filesystem-native notification inbox from jobs, runs, connectors, and review state so operators can see backlog, due subscriptions, and failure signals without scraping logscognisync notify listnow also surfaces collaboration review backlog and outstanding requested-change threads from.cognisync/collaboration.jsoncognisync access list|grant|revokematerializes a file-native workspace roster in.cognisync/access.json, and mutating roster changes now accept--actor-idso only operator principals can change workspace membershipcognisync share status|bind-control-plane|invite-peer|accept-peer|list-peers|issue-peer-bundle|attach-remote-bundle|refresh-remote-bundle|list-attached-remotes|pull-remote|suspend-remote|detach-remote|set-peer-role|suspend-peer|remove-peer|set-policy|subscribe-sync|unsubscribe-sync|subscribe-remote-pull|unsubscribe-remote-pullmaterializes a file-native shared-workspace manifest in.cognisync/shared-workspace.json, so accepted peers, attached upstream remotes, published control-plane URLs, trust policy, scheduled peer exports, scheduled remote pulls, and peer lifecycle changes can be handed off without inventing a second state storecognisync control-plane status|invite|accept-invite|issue-token|list-tokens|revoke-token|schedule-research|schedule-compile|schedule-lint|schedule-maintain|list-scheduled-jobs|remove-scheduled-job|scheduler-status|scheduler-tick|serveadds a hosted-alpha control plane on top of the same workspace, with durable invites, scoped bearer tokens, optional token expiry, recurring job subscriptions, scheduler state, due peer-sync visibility, due remote-pull visibility, and a local HTTP surface for remote workerscognisync control-plane workerssurfaces the derived worker registry through the hosted-alpha layer too, so active and idle remote operators are inspectable without scraping queue manifestsGET /api/research-runsexposes research-run readiness, reconcile blockers, assignment summaries, and step-level execution or review state, whilePOST /api/research-steps/reviewandPOST /api/research/resumelet hosted reviewers and operators finish the research loop over HTTP with the same checkpoint-backed runtime as the local CLIcognisync audit listderives a readable audit index in.cognisync/audit.jsonfrom runs, jobs, sync events, connectors, the workspace roster, and collaboration activitycognisync usage reportderives a workspace usage ledger in.cognisync/usage.jsonwith counts for runs, jobs, connectors, sync volume, roles, storage bytes, and collaboration threadscognisync jobs enqueue ...,jobs claim-next,jobs heartbeat,jobs run-next,jobs retry,jobs work,jobs workers, andjobs listprovide a persisted local queue plus retry lineage, renewable worker leases, and a file-native worker roster for remote-style research, compile, lint, maintenance, ingest, scheduled connector execution, and attached-remote pull imports, and queue submission/retry now accepts--actor-idso only operator principals can schedule work- queued job manifests now also declare a
worker_capability, andjobs claim-next|heartbeat|run-next|work --capability ...can route workers toward compatible research, ingest, workspace, connector, or sync work instead of treating every worker as interchangeable cognisync worker remote --server-url ... --token ...polls the hosted-alpha control plane and executes queued jobs against the same manifest-backed runtime, so another process can drain work without sharing a shell sessioncognisync worker remote --poll-interval-seconds 2 --max-idle-polls 30lets a remote worker stay attached to the control plane long enough to catch future jobs instead of exiting immediately when the queue is briefly emptycognisync worker remote --capability workspace --capability connectorlets a remote worker advertise its declared capability set over HTTP, and the queue will only hand it matching jobscognisync worker remote --workspace /path/to/mirrornow claims detached jobs over HTTP, executes them inside a mirrored workspace, and syncs only the resulting artifacts back to the served workspace, so remote execution no longer depends on the server process doing the actual work locallycognisync worker remote --workspace /path/to/mirror --refresh-workspace-before-jobsfirst imports an inlinesync exportsnapshot from the served control plane, so an opted-in mirrored worker can catch raw/wiki/manifest changes before claiming the next detached jobcognisync sync export,sync import, andsync historymove portable workspace bundles between machines or operators, keep an audit trail in.cognisync/sync/, record astate_manifestsmap in each bundle manifest, attribute every export/import event to an explicit workspace actor, and can scope bundle exchange to an accepted shared peer with--for-peerand--from-peercognisync connector add|list|subscribe|unsubscribe|sync|sync-alladds a file-native connector registry for repos, single URLs, URL lists, and sitemaps, and connector mutations now accept--actor-idso only operator principals can register, schedule, or run connector pullscognisync export presentationsbundles generated slide decks plus companion reports and answers into a shareable export directorycognisync eval researchscores persisted research runs and now writes dimensioned quality metrics for grounding, citation integrity, retrieval coverage, structure, artifact completeness, and contradiction handlingcognisync synth qaandcognisync synth contrastivegenerate assertion-grounded synthetic QA and retrieval data from the graphcognisync ui reviewbuilds a lightweight browser dashboard from the same review state, with graph and run drilldowns, artifact previews, source coverage, compile health, run timelines, concept-graph views, and local review actions when servedcognisync ui review --serve --actor-id reviewer-1serves the same dashboard as an explicit workspace actor, so browser-side actions respect the file-native access roster instead of assuming every user is an operatorcognisync maintainapplies open concept, merge, backlink, and conflict actions automatically, then writes a maintenance run manifestcognisync maintainonly auto-accepts stronger concept candidates by default, so generic one-word concepts stay in the queue for human review- dismissed review items stay out of future queues and maintenance runs until the review-actions state is changed
scan,ingest, andmaintaineach write a change-summary artifact underoutputs/reports/change-summaries/so operators can review corpus deltas without diffing manifests by hand- those change summaries now include changed artifacts, affected graph nodes, graph deltas, recompilation suggestions, and follow-up questions so a run leaves behind next-step guidance, not just counters
- research job workspaces land under
outputs/reports/research-jobs/, include deterministic note artifacts, a source packet, checkpoints, and a validation report, and are ignored by the scanner so orchestration scratchpads do not leak back into retrieval - review exports land under
outputs/reports/review-exports/and are ignored by the scanner so operator telemetry does not leak back into retrieval - general export bundles land under
outputs/reports/exports/and are also ignored by the scanner so bridge artifacts do not leak back into retrieval - the review dashboard lands under
outputs/reports/review-ui/, writes stablereview-export.jsonanddashboard-state.jsonsidecars, emits static graph-node, run-detail, and artifact-preview pages, and can be served withcognisync ui review --serve - when served locally, the dashboard can accept concepts, dismiss or reopen review items, apply backlinks, file conflict notes, and resolve merge candidates against the live workspace state
- the served dashboard now runs as an explicit
--actor-id, shows that actor in the access panel, and returns a hard403when a reviewer tries operator-only actions like job execution or connector sync - the same dashboard now includes a Research Operator panel with research-run readiness, assignment metadata, reconcile blockers, step-output links, reviewer/operator step-review actions, and operator-only finalize or profile-rerun actions
- the dashboard now surfaces graph overview data from
.cognisync/graph.json, connected artifact summaries, recent change summaries, filtered graph/run explorers, richer run history from.cognisync/runs/, and browser-readable previews for referenced artifacts - the dashboard also surfaces source coverage from
.cognisync/sources.json, compile health from lint and compile-plan state, a run timeline page, and a static concept-graph map backed by.cognisync/graph.json - the same dashboard now also surfaces job-queue history from
.cognisync/jobs/and sync audit history from.cognisync/sync/, with static job-detail and sync-detail pages for browser-first control-plane inspection - the same dashboard now also surfaces
.cognisync/jobs/workers.json, so active and idle worker ownership is visible next to the queue instead of only through the CLI - that worker registry now also surfaces each worker's declared capabilities, so the UI can show whether a remote worker is meant for research, ingest, workspace maintenance, connectors, or sync handoffs
- the dashboard now surfaces connector definitions from
.cognisync/connectors.jsontoo, with static connector-detail pages and live actions forrun next job,sync connector, andsync all connectorswhen the UI is served locally - those job, sync, and connector views now also surface actor provenance, so the dashboard shows who queued work, who moved state, and who created or last synced each connector
- the same dashboard now reads
.cognisync/notifications.jsontoo, so backlog, validation-failure, and connector-attention signals show up as a durable inbox panel instead of living only in terminal output - the same dashboard now reads
.cognisync/access.jsontoo, so the workspace roster and role distribution are visible in the browser next to the rest of the operator state - the same dashboard now reads
.cognisync/audit.jsonand.cognisync/usage.jsontoo, so control-plane history and usage accounting show up alongside review, runs, jobs, sync, access, and notifications - the same dashboard now reads
.cognisync/collaboration.jsontoo, with live request-review, comment, approve, request-changes, and resolve actions when the UI is served locally
Maintenance policy is now configurable too. Cognisync reads defaults from .cognisync/config.json and lets you override them per run:
maintain --min-concept-support 3maintain --deny-concept agents --deny-concept loopsmaintain --allow-short-concepts-without-entity
The saved config surface looks like this:
{
"maintenance_policy": {
"min_concept_support": 2,
"require_entity_evidence_for_short_concepts": true,
"deny_concepts": []
}
}cognisync doctor now reports the active maintenance policy too, and warns when the workspace is configured permissively enough that low-signal concept pages are more likely to slip through maintenance.
- lint now surfaces raw sources with no headings or tags, duplicate concept pages, conflicting claims, and stale source summaries as graph-aware issues
- compile planning now turns stale summaries into
refresh_source_summarywork items instead of leaving them as passive warnings
The hosted-alpha control-plane layer is now available too:
cognisync share bind-control-plane https://control.example.test/api --workspace .cognisync share invite-peer remote-ops operator --workspace . --base-url https://remote.example.test/cognisync --capability jobs.remotecognisync share accept-peer remote-ops --workspace .cognisync share set-peer-role remote-ops reviewer --workspace .cognisync share suspend-peer remote-ops --workspace .cognisync share remove-peer remote-ops --workspace .cognisync share set-policy --workspace . --allow-remote-workers --allow-sync-imports --max-peer-role reviewer --require-secure-control-plane --allow-control-plane-host control.example.test --allow-peer-capability review.remote --allow-peer-capability sync.importcognisync share subscribe-sync remote-ops --workspace . --every-hours 1cognisync share issue-peer-bundle remote-ops --workspace . --output-file remote-ops.jsoncognisync share attach-remote-bundle remote-ops.json --workspace ./mirrorcognisync share refresh-remote-bundle remote-ops.json --workspace ./mirrorcognisync share pull-remote remote-ops --workspace ./mirrorcognisync share suspend-remote remote-ops --workspace ./mirrorcognisync share detach-remote remote-ops --workspace ./mirrorcognisync share subscribe-remote-pull remote-ops --workspace ./mirror --every-hours 1cognisync control-plane invite reviewer-2 reviewer --workspace .cognisync control-plane accept-invite reviewer-2 --workspace .cognisync control-plane issue-token local-operator --scope control.read --scope jobs.run --expires-in-hours 12 --output-file token.jsoncognisync control-plane schedule-research "map contradictions in deployment notes" --workspace . --every-hours 6 --mode memocognisync control-plane schedule-maintain --workspace . --every-hours 12 --max-concepts 4 --max-backlinks 4cognisync control-plane list-scheduled-jobs --workspace .cognisync control-plane scheduler-status --workspace .cognisync control-plane workers --workspace .cognisync control-plane release-worker remote-a --workspace . --reason operator_recovery --requeue-active-jobscognisync control-plane scheduler-tick --workspace . --enqueue-onlycognisync control-plane serve --workspace .cognisync worker remote --server-url http://127.0.0.1:8766 --token "$(jq -r .token remote-ops.json)" --worker-id remote-a --max-jobs 5 --poll-interval-seconds 2 --max-idle-polls 30cognisync worker remote --server-url http://127.0.0.1:8766 --token "$(jq -r .token remote-ops.json)" --worker-id workspace-a --capability workspace --capability connector --max-jobs 5cognisync worker remote --server-url http://127.0.0.1:8766 --token "$(jq -r .token remote-ops.json)" --worker-id ingest-a --workspace /tmp/cognisync-mirror --capability ingest --max-jobs 5cognisync worker remote --server-url http://127.0.0.1:8766 --token "$(jq -r .token remote-ops.json)" --worker-id mirror-a --workspace /tmp/cognisync-mirror --refresh-workspace-before-jobs --max-jobs 5
That layer keeps the same filesystem-first contract:
- accepted remote peers, attached upstream remotes, published control-plane URLs, trust policy, scheduled peer sync subscriptions, scheduled remote pulls, and the last issued peer bundle metadata persist in
.cognisync/shared-workspace.json - invites, issued tokens, scheduled job subscriptions, scheduler history, and the last due connector, peer-sync, remote-pull, and recurring-job ids persist in
.cognisync/control-plane.json - issued tokens stay scoped, so review-only actors can inspect status without being able to run jobs
- peer bundles carry the control-plane URL, token, scopes, and role for a specific accepted remote principal, so another machine can attach cleanly without manual token surgery
- peer bundle scopes now derive from declared peer capabilities like
jobs.remote,review.remote,scheduler.remote,connectors.sync,control.admin, or explicit scope strings, so remote handoffs do not silently overgrant the full role default - attached remotes can now be created directly from a peer bundle, then pulled over the hosted control plane into another workspace without manually exporting and unpacking bundle directories
- attached remotes can now also be refreshed from a rotated peer bundle, suspended without deleting local provenance, or detached entirely when the upstream relationship is no longer trusted
- shared-workspace trust policy can now also cap peer roles, require secure published control-plane URLs, restrict allowed control-plane hosts, and restrict allowed peer capabilities without editing manifests by hand
- shared peers can now be re-roled, suspended, or removed through the same file-native workflow, and those lifecycle changes revoke live access plus peer-issued control-plane tokens automatically
- control-plane tokens can now carry an hourly expiry and are marked invalid as soon as that TTL passes, so hosted-alpha bearer auth no longer defaults to effectively permanent credentials
control-plane statusnow includes a hosted hardening readout for long-lived tokens, broad operator tokens, permissive trust policy, stale active workers, queued hosted work, and high-severity notifications;GET /api/statusreturns the same report without exposing raw tokens or token hashes- peer-scoped
sync export --for-peerandsync import --from-peernow also require the accepted peer to declaresync.import, so bundle exchange is opt-in at the peer-capability layer instead of inferred from role alone - scheduled connector automation can enqueue
connector-sync-all --scheduled-onlywork, scheduled peer sync subscriptions can enqueue peer-scopedsync-exportwork, attached remotes can enqueueremote-sync-pullwork, and recurring research, compile, lint, or maintain subscriptions can enqueue regular corpus work without adding a second queue system - remote workers can poll through short idle windows and their live state is visible through
control-plane workersplus/api/workers, including polling sessions before a job is claimed and running mirrored workers with their current job ids - operators can now release a stale hosted worker and immediately requeue its live lease through
control-plane release-workerorPOST /api/workers/release, so recovery does not have to wait for a long lease timeout to expire - remote workers now report their declared capability set through
.cognisync/jobs/workers.jsonand/api/workers, and hosted job claims respect that routing data when a worker polls with--capability - mirrored remote workers can now use
/api/jobs/dispatch-next,/api/jobs/complete, and/api/jobs/failto claim work, execute it against a synced local mirror, and push back only the result artifacts through a targeted sync bundle instead of asking the server process to do the execution itself - mirrored remote workers now also keep renewing the active job lease while detached work is still running, so long-running mirror execution does not quietly outlive the hosted lease that owns it
- mirrored remote workers can now opt into
--refresh-workspace-before-jobswhen their bearer token hassync.export, pulling the latest served workspace snapshot into the local mirror before each hosted dispatch attempt control-plane servenow also exposes/api/share,/api/access,/api/collab,/api/notifications,/api/audit, and/api/usage, so the hosted-alpha surface can inspect shared-workspace, roster, review, inbox, and observability state remotely- the same served control plane now accepts collaboration actions over HTTP, so editors and reviewers can request review, comment, approve, request changes, and resolve artifact threads through the same token-backed surface
- the same served control plane now exposes
GET /api/reviewplus remote review actions like/api/review/accept-concept,resolve-merge,apply-backlink,file-conflict,dismiss,reopen, andclear-dismissed, so the filesystem-backed review queue is remotely readable and actionable without bypassing workspace roles GET /api/statusincludes the hosted hardening report from the local status command, so remote operators can inspect token expiry posture, trust-policy breadth, worker staleness, queue backlog, and high-severity notification risks before dispatching more work- the same served control plane now also exposes
GET /api/runs,GET /api/sync, andGET /api/change-summaries, so remote operators can inspect run history, sync events, and corpus deltas without shelling into the workspace host - the same served control plane now exposes
GET /api/artifacts/preview?path=..., so remote operators can inspect text artifacts and manifests directly over the hosted surface - the same served control plane now also exposes remote auth-admin endpoints like
POST /api/access/grant,/api/access/revoke,/api/invites/create,/api/invites/accept,/api/tokens/issue, and/api/tokens/revoke, so roster and token management no longer require direct shell access either - the same served control plane now also accepts shared-workspace policy updates plus peer sync subscription changes over HTTP, so trust policy and scheduled peer exports can be managed remotely without hand-editing manifests
- the same served control plane now also accepts peer invites, peer acceptance, peer bundle issuance, attached-remote attach and refresh actions, and attached-remote suspend and remove actions over HTTP, so remote operator handoffs can be prepared and tightened through the hosted-alpha surface too
- the same served control plane now also accepts peer role updates, suspension, and removal over HTTP, so shared-workspace trust can be tightened remotely instead of only granted
- connector registry state is now readable at
/api/connectors, and operator tokens can add connectors, manage subscriptions, or trigger/api/connectors/syncand/api/connectors/sync-allremotely through the same hosted-alpha surface - job queues are no longer read-only over HTTP: operator tokens can now enqueue research, research-step, compile, lint, maintain, ingest, connector, and peer-scoped sync-export jobs through
/api/jobs/enqueue/..., including/api/jobs/enqueue/research-stepfor hosted step execution - hosted job mutation endpoints stay role-gated too: matching
jobs.*scopes are not enough on their own, because/api/jobs/enqueue/...,/api/jobs/claim-next,/api/jobs/heartbeat, and/api/jobs/run-nextalso resolve back through.cognisync/access.jsonand require an operator principal - hosted detached-worker endpoints now also exist:
/api/jobs/dispatch-next,/api/jobs/complete, and/api/jobs/faillet a mirrored worker claim work, execute it remotely, and return result artifacts plus sync history over the same scoped control-plane surface - scheduler subscriptions are remotely manageable too:
GET /api/scheduler/jobsandPOST /api/scheduler/jobs/research|compile|lint|maintain|removeexpose the recurring-job layer over the same token-backed surface - sync bundles can now move directly over HTTP too:
POST /api/sync/exportcan emit an inline archive payload andPOST /api/sync/importcan restore that archive into another served workspace with the same peer-trust checks as the local CLI - sync bundles now include
.cognisync/control-plane.json, so the remote-control surface can move with the workspace
flowchart TD
A["scan builds index, source manifest, and graph manifest"] --> B["review queue materializes follow-up work"]
B --> C["operators accept concepts, resolve merges, apply backlinks, file conflicts, or dismiss items"]
C --> D["review actions persist in review-actions.json"]
D --> E["compile and research consume the cleaned corpus"]
E --> F["maintain can replay the same actions automatically"]
F --> A
The research surface now supports explicit answer modes:
--mode wikifor reusable filed answers inwiki/queries/--mode reportfor report-shaped outputs inoutputs/reports/--mode memofor tighter research memos inoutputs/reports/--mode brieffor concise briefing artifacts inoutputs/reports/--mode slidesfor Marp-oriented slide-deck answers inoutputs/slides/
You can also plan first and execute later:
cognisync research "map the open questions in this corpus"
cognisync research --resume latest --profile codexOnce a workspace has real runs in .cognisync/runs/, Cognisync can export that file-native state into downstream-friendly bundles:
cognisync export jsonl
cognisync export training-bundle
cognisync export finetune-bundle
cognisync export finetune-bundle --provider-format openai-chat
cognisync export feedback-bundle
cognisync remediate research --profile codex
cognisync export correction-bundle
cognisync export training-loop-bundle --provider-format openai-chat
cognisync improve research --profile codex --provider-format openai-chat
cognisync export presentations
cognisync eval research
cognisync synth qa
cognisync synth contrastiveexport jsonlwrites one JSONL row per research run with the question, run metadata, cited report text, prompt packet text, filed answer text, slide path, and validation state- exported JSONL rows now also include the research job profile, note paths, execution-packet paths, source-packet path, checkpoints path, and validation report path
export training-bundlewritesdataset.jsonlplusmanifest.jsonwith validation-derived labels like citation failures, unsupported-claim failures, and conflict gatesexport finetune-bundlewritessupervised.jsonl,retrieval.jsonl, andmanifest.jsonso downstream trainers get research-run SFT pairs, validated remediation-correction examples, synthetic QA examples, and contrastive retrieval pairs in one timestamped exportexport finetune-bundle --provider-format openai-chatalso writessupervised.openai-chat.jsonlwithmessagesarrays for direct OpenAI chat-finetuning pipelinesexport feedback-bundlewritesremediation.jsonlplusmanifest.jsonfor runs that need improvement, including their weak dimensions, current answers, and remediation promptsremediate research --profile <profile>consumes those weak runs, writes a remediation packet plus corrected answer and validation report underoutputs/reports/remediation-jobs/, and keeps those job artifacts out of retrievalexport correction-bundlewritesdataset.jsonlplusmanifest.jsonfor remediation jobs that passed validation, including the corrected answer, the previous failing answer, the improvement targets, and links back to the source and remediation manifestsexport training-loop-bundlewrites a timestamped umbrella bundle with nestedevaluation/,feedback/,corrections/, andfinetune/directories plus a top-level manifest so downstream training systems can ingest the full loop from one artifactimprove research --profile <profile>runs remediation first and then refreshes that training-loop bundle, so the corpus-to-model feedback loop can be driven as one operator actionexport presentationscopies generated slide decks and their companion reports or filed answers into a timestamped bundle with a stablemanifest.jsoneval researchwrites a Markdown scorecard and JSON payload with pass/fail counts, profile breakdowns, validation-label tallies, per-run dimension scores, and aggregate quality metrics such as grounding, citation integrity, retrieval coverage, structure, artifact completeness, and contradiction handlingsynth qawrites assertion-grounded question-answer pairs from.cognisync/graph.jsonsynth contrastivewrites positive/negative retrieval pairs from assertion support paths- both export surfaces write into
outputs/reports/exports/ - scanner ignores these bundles so dataset and sharing artifacts do not re-enter retrieval
You can now stage remote-style work locally instead of running everything immediately:
cognisync jobs enqueue research --profile codex "map the open questions in this corpus"
cognisync jobs enqueue improve-research --profile codex --provider-format openai-chat
cognisync jobs enqueue ingest-url https://example.com/paper --name paper-source
cognisync jobs enqueue ingest-repo https://github.com/example/research-repo --name research-repo
cognisync jobs enqueue ingest-sitemap https://example.com/sitemap.xml
cognisync jobs enqueue compile
cognisync jobs enqueue lint
cognisync jobs enqueue maintain --max-concepts 2 --max-backlinks 2
cognisync jobs enqueue connector-sync repo-remote-sample
cognisync jobs enqueue connector-sync-all --scheduled-only
cognisync jobs claim-next --worker-id worker-a
cognisync jobs claim-next --worker-id workspace-a --capability workspace
cognisync jobs heartbeat --worker-id worker-a --lease-seconds 900
cognisync jobs heartbeat --worker-id workspace-a --lease-seconds 900 --capability workspace
cognisync jobs run-next --worker-id worker-a
cognisync jobs run-next --worker-id workspace-a --capability workspace
cognisync jobs retry research-... --profile codex
cognisync jobs work --worker-id worker-a --max-jobs 10
cognisync jobs work --worker-id ingest-a --max-jobs 5 --capability ingest
cognisync jobs workers
cognisync jobs list
cognisync sync export --actor-id local-operator
cognisync sync export --actor-id local-operator --for-peer remote-ops
cognisync sync history
cognisync sync import outputs/reports/sync-bundles/sync-bundle-... --workspace /tmp/other-workspace --actor-id local-operator
cognisync sync import outputs/reports/sync-bundles/sync-bundle-... --workspace /tmp/other-workspace --actor-id local-operator --from-peer remote-opsjobs enqueue researchpersists a queued research manifest under.cognisync/jobs/manifests/jobs enqueue improve-researchqueues the one-shot correction-and-training loop for later executionjobs enqueue ingest-url,jobs enqueue ingest-repo, andjobs enqueue ingest-sitemaplet workers grow the raw corpus through the same leased queue model as the rest of the operator loopjobs enqueue compile,jobs enqueue lint, andjobs enqueue maintainlet the same queue drive the rest of the operator loop instead of only question answeringjobs enqueue connector-sync <connector-id>lets connector pulls land through the same worker and audit pathjobs enqueue connector-sync-all --scheduled-onlylets the queue execute only due connector subscriptions instead of re-walking the whole registryjobs claim-next --worker-id worker-arecords an explicit lease on the oldest claimable job so ownership is durable in the manifestjobs claim-next --worker-id workspace-a --capability workspaceroutes the claim toward jobs that declare theworkspaceworker capability, leaving research or ingest jobs queued for other workersjobs heartbeat --worker-id worker-a --lease-seconds 900renews that worker's active lease and records the heartbeat in both the job manifest and queue summaryjobs run-next --worker-id worker-aresumes that same worker's active claim or claims a fresh job when none is heldjobs retryre-queues a terminal job with lineage back to the original manifest, and can override the profile for another attemptjobs work --worker-id worker-adrains claimable jobs sequentially under the same worker identity and lease settingsjobs workersrenders.cognisync/jobs/workers.json, a derived worker registry that shows the last-seen time, active lease, declared capabilities, and idle/completed state for every worker that has touched the queuejobs enqueue ...andjobs retrynow accept--actor-id, so operators can submit queue work under an explicit principal while workers still claim and execute jobs through--worker-id- queued job manifests now persist
requested_by, so scheduled work keeps the submitting principal in.cognisync/jobs/manifests/ jobs enqueue sync-export remote-opslets the queue carry peer-scoped workspace handoffs through the same leased worker model as research and connector worksync exportwrites a portable workspace bundle underoutputs/reports/sync-bundles/withraw/,wiki/,prompts/,.cognisync/, and the important report job directoriessync exportandsync importnow accept--actor-id, require an operator workspace member, and persist that actor in both the bundle manifest and sync event historysync export --for-peer <peer-id>marks a bundle as intended for an accepted shared peer and records that peer in the bundle manifestsync import --from-peer <peer-id>validates that peer-scoped bundle against the target workspace trust policy and accepted peer roster before restoring itsync importrestores that bundle into another workspace root so queued state, manifests, and corpus files travel togethersync historyreads.cognisync/sync/history.json, which now records export/import events, acting principals, and bundle lineage- connector registry entries and connector run manifests now persist the mutating or syncing actor, so
.cognisync/connectors.jsonand.cognisync/runs/agree on who touched a connector
You can now register file-native source connectors and sync them directly or through the job queue:
cognisync connector add repo file:///tmp/sample-repo --name remote-sample
cognisync connector add urls /tmp/urls.txt --name batch-sources
cognisync connector subscribe repo-remote-sample --every-hours 6
cognisync connector list
cognisync connector sync repo-remote-sample
cognisync connector sync-all --scheduled-only
cognisync jobs enqueue connector-sync urls-batch-sources
cognisync jobs enqueue connector-sync-all --scheduled-only- connector definitions live in
.cognisync/connectors.json - supported connector kinds are
repo,url,urls, andsitemap connector subscribe <connector-id> --every-hours Nenables durable schedule metadata in the connector registry, includingnext_sync_atandlast_scheduled_sync_atconnector unsubscribe <connector-id>disables the scheduled subscription without deleting the connector definitionconnector syncruns the ingest path immediately and writes aconnector_syncrun manifest plus a change summaryconnector sync-allskips already-synced connectors by default and uses--forcewhen you want to re-pull the whole registryconnector sync-all --scheduled-onlyonly pulls connectors whose subscription window is currently due- queued connector syncs, including
connector-sync-all, use the same job-worker path and audit trail as the rest of the operator loop
Cognisync now ships with real Codex, Gemini, and Claude CLI presets so users do not have to guess at the adapter shape:
cognisync adapter install codex --profile codex
cognisync adapter install gemini --profile gemini
cognisync adapter install claude --profile claude
cognisync run-packet prompts/compile-plan.md --profile codex --output-file outputs/reports/compile-pass.md
cognisync run-packet prompts/query-what-are-the-main-themes-in-this-workspace.md --profile gemini --output-file outputs/reports/gemini-brief.md
cognisync run-packet prompts/query-map-the-open-questions.md --profile claude --output-file outputs/reports/claude-brief.mdThe built-in codex preset:
- streams the prompt packet to
codex execover stdin - runs Codex in the current workspace root
- uses
--output-last-messagewhen you pass--output-file
The built-in gemini preset:
- streams the prompt packet to Gemini CLI over stdin
- runs Gemini in non-interactive mode using
--prompt - captures stdout into
--output-filethrough Cognisync when you request a file output
The built-in claude preset:
- runs Claude Code in headless print mode
- streams the full prompt packet over stdin and captures the final text response from stdout
- sets
--output-format textand--input-format textso the adapter stays script-friendly
Custom adapter commands can template three useful values into the configured command list:
{workspace_root}for the current Cognisync workspace{prompt_file}for the packet path on disk{prompt_text}for CLIs that want the full packet injected as an argument instead of stdin
v0.1.4 remains a GitHub-first source release.
The package metadata is already in place, but the project is staying repo-first for now so the adapter contract, CLI surface, and contributor workflow can stabilize before a PyPI push. The current release policy is documented in Open Source Operations.
Cognisync assumes the knowledge base itself is the product surface.
Instead of hiding data behind a vector database or a proprietary UI, it keeps the corpus inspectable and durable:
- raw inputs are preserved
- compiled wiki pages are versioned files
- generated reports are first-class artifacts
- agent work is represented as packets and plans that other tools can consume
This makes the system easy to automate, easy to audit, and easy to publish.
The implementation is documented in:
- Multi-agent dispatch and review on top of the existing research execution-packet artifacts
- Native repository and dataset ingestion adapters
- Richer semantic extraction, merge resolution, and entity graphs
- Continuous health checks and auto-remediation loops
- Fine-tuning and synthetic dataset export pipelines
MIT