Skip to content

Modes and lifecycles

A reference for every mode, state and closed value set in the system. Other pages explain why; this one is the exhaustive what, so you can look up a value you saw in the UI, an API response or a database row.

Every set below is closed — enforced by an enum, and usually by a database constraint as well. If you see a value that is not here, it is a bug or this page is out of date.

Repositories

Source

ValueMeaning
gitCloned from a remote. Supports webhooks, scheduled sync, and incremental graph ingest against the previous commit.
zipCreated from an uploaded archive. No webhooks, no ref tracking. The archive is stored at <checkouts_root>/<repo_id>.zip and re-extracted on every sync — it is the only copy, so the checkout volume is not disposable for these. Re-snapshot by uploading again.

Status

Eight values. This is the availability signal, not the outcome of the last sync — see reads survive a failed write.

ValueMeaning
pendingCreated, nothing has run yet
cloningFetching the checkout
indexingParsing and graph extraction
embeddingVectorising code and documents
generatingSummaries and wiki
readyServing. Reached after a successful sync, and returned to after a failed sync if a prior snapshot exists
errorFailed and never successfully indexed — there is nothing to serve
deletingAsync purge in progress; read paths hide the row

The phase advance never demotes a ready repository, so a re-sync does not take it offline.

Visibility

ValueMeaning
publicReadable by any authenticated user; readable anonymously only if COGRAPH_AUTH__PUBLIC_READ is also on
admin_onlyNot public. A misnomer — a plain user with a group grant can read it. Default for new repositories

Sync schedule

ValueNext run
manualNever automatically
hourlyNext top of the hour
dailysync_hour_utc today or tomorrow
weeklyNext Monday at sync_hour_utc
webhookOnly on an inbound push

A scheduler tick runs every minute and enqueues what is due.

Sync pipeline

Trigger

ValueRaised by
initialThe first sync after a repository is created
manualAn operator pressing reindex
scheduleThe scheduler tick
webhookAn inbound push event

Steps

Nine values in the enum; eight run. Always in this order.

StepUnit reportedNotes
cloneAlready done by the orchestrator; marked complete immediately
parsefilestree-sitter
extract_graphsymbolsCall, import and inheritance resolution
embednodesSkipped if no embedding role — which fails the run instead
index_repo_docspagesDiscovery + chunking
embed_repo_docschunks
generate_summariessummariesSkipped without completion_writer
generate_wikipagesSkipped without completion_writer
export_confluenceNot implemented. Enum-only; no code path produces it

Run status

ValueMeaning
queuedEnqueued, not started
runningIn progress
successCompleted
errorFailed; error_code carries the reason
cancelledAn operator force-cancelled it
skippedNo new commits — the last-checked timestamp still advances

Job status

Seven values — the run statuses plus two:

queued · running · paused · skipped · success · error · cancelled

skipped on a job means the capability is unconfigured, and carries a human-readable reason. It is not a failure.

Error codes

Ten values.

CodeCause
checkout_not_foundCheckout path missing
checkout_invalidCheckout present but unusable; for zip sources, a missing archive
embedding_provider_failedEmbedding endpoint failed after its retries
summary_provider_failedCompletion endpoint failed during summaries
wiki_provider_failedCompletion endpoint failed, or no valid plan could be produced
graph_ingest_failedGeneric ingest failure; the job message has detail
parse_db_conflictTwo symbols collided on a qualified name
go_build_constraint_unsupportedBuild tags outside the supported GOOS/GOARCH/cgo matrix
go_build_variant_conflictTwo build variants in genuine conflict
step_timeoutThe step exceeded its PIPELINE_TIMEOUTS__* deadline

Batch kind

repo_sync · confluence_export — the second is enum-only and unimplemented, like the step of the same name.

Graph ingest modes

ModeEntry conditionBehaviour
incrementalNot forced full, last_commit is set, and .git existsChanged files come from git diff. Deletions are applied before insertions — a cross-language rename keeping its qualified name would otherwise collide and lose both sides
fullAnything else: first sync, forced, no .git (so always for zip sources), or a last_commit the remote no longer has after a history rewriteWalks the whole tree, prunes rows for files that disappeared, and builds a repo-wide node cache from one query

Per-node change detection is by content hash, so a full walk is not the same as re-embedding everything: unchanged nodes keep their vectors.

Retrieval modes

Request mode (MCP)

ValueLayers searched
codecode, ast, ast_summary
wikirepo_doc — the repository's checked-in markdown, not the generated wiki
mixedThe broad set: code, ast_summary, repo_doc. Default

An explicit stores list overrides mode.

Layers

ast · code · ast_summary · repo_doc

Broad search deliberately omits bare ast: it returns the same node as code with only the signature, which is pure duplication in a token budget.

Stores

code · repo_docs · md_collections

Streams

vector · lexical · symbol — plus graph as a provenance value on results added by the post-hoc graph pivot. They execute sequentially, not concurrently.

Rerank providers

ValueState
disabledDefault, works
local_cross_encoderWorks; needs the [reranker-local] extra
cohereAccepted by config, raises NotImplementedError
voyageAccepted by config, raises NotImplementedError
jinaAccepted by config, raises NotImplementedError

A reranker that fails to construct degrades silently to none, with a log warning.

Traversal direction

callers · callees · both — depth capped at 2. Every returned edge is labelled calls regardless of the underlying edge kind.

Temporal modes

as_of (state at a timestamp) · since · until. Threaded into every store's SQL; code nodes filter on last-changed from git blame, documents on their update timestamp.

Code graph

Node types

Ten: module · class · struct · interface · function · method · variable · constant · type_alias · attribute

Edge types

Four: declares · imports · inherits · calls

There is no implements edge — Go struct and interface embedding and TypeScript implements all collapse into inherits.

Node roles

Eleven, inferred from decorators and naming: entry_point · service · repository · model · helper · config · test · constant · type_alias · attribute · other

Languages

python · go · typescript · javascript. See Supported languages for what each walker emits and the four independent coverage mechanisms.

Source file kinds

code · markdown · other

Wiki

Generation modes

ModeEntry conditionCost
IncrementalA reusable plan artifact exists — structural hash, schema version, chat model and embedding model all matchSkips stages 2, 1.5 and 3 (three LLM calls)
Full re-planNo reusable artifact, structural hash changed, or coverage collapsed past 0.5Re-runs planning; still re-checks per-page dirtiness so clean pages are not re-paid for
Steering-driven.cograph/wiki.json declares pagesSkips clustering and planning entirely; the file is the plan

Dirty volume alone never triggers a re-plan. There is no manual rebuild button in the app; the CLI is the only non-incremental entry point.

Per-page modes

ModeEntry condition
Clean reuseAll three stamps match, cited sources still exist, quality is not degraded. Zero LLM calls
EditDirty, has a stored pre-resolve body, an edit-eligible reason, churn ≤ 0.5, and fewer than 3 consecutive prior edits. One tool-less call
Full writeAnything else, or any edit gate failing. The agentic loop
Diagram passPage is flagged for a diagram. Separate call; failure is non-fatal

Two-pass writing and the cross-linker exist in the code but are off by default and are not user-facing features.

Page kinds

24 values. Which are permitted depends on the repo kind; index and overview are always available.

index · overview · domain-model · api-reference · configuration · key-flow · service-topology · quick-start · cli-reference · installation · public-api-reference · embedding-guide · compatibility · migration-guide · supported-input-features · generated-output-shape · customization · core-abstractions · extension-points · plugin-guide · troubleshooting · security · examples · concept

Repo kinds

cli · library · service · code_generator · framework · monorepo · hybrid · unknownunknown permits only concept pages beyond the baseline.

Salience tiers

TierTreatment
publicMay get a dedicated page (salience ≥ 0.65, or an auto-qualifying seed)
supportingBecomes a section inside another page
internalCollapsed into the architecture page
test_scaffoldingFiltered out before the model sees it

Candidate kinds

Ten evidence shapes driving contract compilation: docs_topic · cli_command · public_api · generated_output · example · config · runtime · architecture · module_cluster · test_scaffolding

Reader questions

A closed set of five: how-to-run · configuration · use-cases · dependencies · public-api

The planner occasionally invents a sixth; unknown slugs are dropped rather than failing the whole plan.

Quality status

ValueMeaningDirty next sync?
okAll gates passedNo
partialA promised question could not be grounded and was omittedNo
degradedCitations could not be repaired and were downgraded to plain textYes — the page self-heals

Document RAG

Repository document kinds

Repo Doc · Example · Test · Config · Workflow — all five are chunked and embedded. See the matching rules.

Collection visibility

public · private · admin_onlyprivate and admin_only currently behave identically.

Collection job kinds and statuses

Kinds: embed · resolve_links · upload — only the first two can be retried.

Statuses: queued · running · success · error

wiki ([[…]]) · markdown (.md/.mdx target) · absolute (external URL). The parser also classifies anchor and relative before storage.

Access control

Roles

owner · admin · user. Owner and admin are equivalent except for one known exception.

Grant levels

read · write. No row means no access. Deletion is role-gated, not grant-gated — see the action matrix.

Token scopes

api:read · api:write · mcp. MCP needs mcp and api:read. Cookie and bearer-JWT sessions implicitly hold all three.

LLM roles

RoleState
embeddingRequired
completion_writerActive
completion_fastReserved — no consumer
completion_reasoningReserved — no consumer

Reasoning efforts, permitted only on completion_reasoning: minimal · none · low · medium · high · xhigh

Query log sources and statuses

Sources: rest · mcp

Statuses: ok · empty · errorempty exists specifically so operators can find index and wiki gaps.

Deployment modes

ModeTopologyRequires
ComposeAll five services locally, development environment, OpenAPI exposedNothing beyond Docker
Split deployment (Helm default)Backend and worker as separate DeploymentsA ReadWriteMany checkout volume — both write to it
Sidecar (worker.runAsSidecar=true)Worker inside the backend podReadWriteOnce is enough; backend must stay at one replica

LLM capability modes

Assigned rolesYou getYou do not get
embedding onlyGraph, code search, retrieval, MCP, REST, document RAGSummaries, wiki — recorded as skipped steps
embedding + completion_writerEverything
NeitherNothing indexes; the embed step fails with LLM_ROLE_UNCONFIGURED

Documents Cograph 0.1.0 · Apache-2.0 · pre-1.0, so APIs and migrations may change.