Syntology Docs

File / module catalog

Important paths with role, receives, ships, interacts with, and risks. Grouped by area. Invented nothing: if a consumer is unknown, it is listed as a gap. Fresher local main may add files not yet on this branch.

Serving

PathRoleReceivesShipsInteracts withRisks
main.pyFastAPI query APIHTTP (via Worker / direct origin), Neo4j reader, corpus dir, BedrockJSON answers, reviewer artifacts, MCP mountquery_engine/*, mcp_server.py, reviewer_bot*.py, bedrock_client.pyMonolith; fail-open internal key; ensure_indexes on first request; ephemeral logs/counters (F-06)
mcp_server.pyMCP ASGI + KV authBearer tokens, KV REST, graph_askMCP tools / SSEoauth-trial.js (same KV), mcp-proxy.js origin shieldBudget PUT may silently no-op if token is read-only (F-17)
query_engine/router.pyNL slot routerQuestion textTemplate id or declinegates, templates, mainDivergence from candidate registry until promotion
query_engine/linker.pyEntity resolution + index helperMentions / idsLinked entitiesNeo4jensure_indexes() CREATE on request path
query_engine/gates.pyPre-spend coverageTemplate id, live countsBlock or allowcoverage.py, /graph/askHistorically incomplete table (F-15; fixed at source on later trees)
query_engine/templates.pyT1–T17 Cypher executorsParams, sessionRows / preview Cyphermain, MCP toolsLarge file; keep in sync with REST handlers
query_engine/text2cypher.pyFreeform CypherNL + schema snapshotValidated Cyphersyntology_schema.pyStale schema → silent unreachability of code lane (F-07 historically)
query_engine/logging.pyRequest/proposal logsPipeline tracesrequest_log.jsonlCost/pricing plansContainer FS — lost on deploy
reviewer_bot.py / _grounding.py / _pdf.pyReviewer productPDF/text, Bedrock, graphReview JSON/PDFStripe reviewer-billing pathNot fully public per llms.txt “not yet live” caveats
Dockerfile.apiServing imageCOPY list, requirements-apiApp Runner imagedeploy/deploy_api_to_aws.shCOPY drift → rollback (F-02)

Edge / Cloudflare

PathRoleReceivesShipsInteracts withRisks
worker.jsSingle-domain router + security headersAll site trafficProxied/static responsesEvery *.js module, public/Route vs Custom Domain; run_worker_first required
wrangler.tomlWorker + KV + assets confign/aDeploy bindingsWrangler CLIDo not add [[routes]] without zone grant; never commit secret values
graph-agent-proxy.jsReverse proxy to App RunnerBrowser/agent RESTUpstream /graph/*Turnstile, internal key, App RunnerOrigin must stay shielded
mcp-proxy.jsStreaming /mcp proxyMCP HTTPSSE/chunkedmcp_server.py, origin-shield headerBuffering would break MCP
oauth-trial.jsTrial tokensTurnstile / sessionKV token:*MCP verifier, graph-agent-proxyBudget accounting dual-path with MCP
billing.js + billing-session.jsStripe + signed cookieCheckout/webhooksEntitlementKV BILLING, Stripe secretsSession cookie HMAC; tax_code product requirement (README)
graph-pulse.js (and slice/neighborhood/atlas-api/code-library)Fixed Cypher over Aura HTTPPublic GETsAggregates / graph JSONsyntology_webParameterisation discipline; cache TTLs
correction.jsUser correctionsPOSTKV pending recordsHuman reviewMust never auto-write Neo4j
agent-telemetry.jsToken/auth eventsWorker eventsAnalytics EngineAE bindingRead token for AE query may be unprovisioned

Ingestion

PathRoleReceivesShipsInteracts withRisks
05_incremental_paper_sweep.pyDiscoveryOpenReview vs graphNew-papers JSON06Interactive token (F-09)
06_process_new_papers.pyChain orchestratorDiscovery JSON, staging envStaging dirs, subprocess productsStages 01–04c, methods, loaderChain itself vs per-stage tests; exit 3/4 continue
01_grobid_extract.py / 09_binned_parse.pyPDF→TEIPDFs, GROBID URLTEI trees; 09 may delete PDFs per binDocker GROBIDLocal SPOF (F-19); bin state files
02_parse_tei.pyTEI→JSON + review queueTEIparsed JSON, _needs_review.jsonreview_queue.pyQueue without consumer historically loaded anyway (R4 lesson)
02b_backfill_from_s2.pyHeader repairparsed JSON, S2*_backfilled/S2 clientRate limits / quoted keys
04_resolve_citations.py / 04c_resolve_citations_s2ag.pyCitation resolvebackfilled JSON*_cited*S2, acceptance gatesIdentity spaces / stubs
03_openreview_sync.pyReviews ingestOpenReviewreviews_synced.jsonvenue registry gateLarge artifact; anonymity rules
acquire_*.pyVenue acquisitionVenue sitesmetadata + PDFscorpus dirsSite HTML churn
run_methods_full_corpus.py + apply_name_shape_veto.pyMethod/dataset/concept extractcited JSONextraction JSONBedrock llamaOwn-client ratchet (F-04)
pipeline_stages.pyHand-written flow descriptionn/aDocs/scan inputscan_corpus_*Can lag 07–22 (F-10)

Graph / ledger

PathRoleReceivesShipsInteracts withRisks
load_papers_into_neo4j.pyPrimary paper loadercited JSON, methods, reviewsMERGE graph writesWriteLedger, review_queue_gateDual identity stubs; must use writer + intent
groundwork/19_structured_provenance/write_ledger.pyWrite ledger + lockintent, sessionwrite_ledger.jsonl, lock fileAll bulk writersLives in experiments dir (F-08); tests write prod (F-05)
16_load_s2_reference_edges.pyCITES gap-fillS2 refsCITES edgesS2 cachesStub identity
stream_paper_loader.pyContinuous TEI→graphTEI dir, state JSONPaperslaunchdState file; writer creds
arxiv_ids.pyarXiv id shapestringsbool / normalized idsMany consumersThree identity spaces
provenance.pyStamp derived filespayloads, inputsstamped JSON / sidecarsQC ratchetUnstamped writers still exist
review_queue.pyR4 queueparse flagsqueue files02, 02b, 04, loaderQueue must have a consumer

Code harvest

PathRoleReceivesShipsInteracts withRisks
stream_harvest_follower.pyContinuous CodeSample harvestclassified repos, GitHubCodeSample, state JSONlaunchd KeepAliveContinuous writer
probe_harvested_contracts.py / synthesize_*Contract probessamplesprobe reportscontract loopGPU/Lambda paths exist separately
assign_roles_harvested.py / attach_harvested_to_methods.pyRole + method attachharvest graphIMPLEMENTS / HAS_HARVESTED_IMPLgraph_write_guardRole downgrade guard
groundwork/13_impl_generation_verification/V-ladder generationpapers, Bedrockreports, HAS_REFERENCE_IMPLloaders in 14Huge artifact tree in git
groundwork/14_code_ontology_surface/graph_write_guard.pyRefuse regressionsproposed writesallow/denyloadersPath coupling

Frontend / Atlas

PathRoleReceivesShipsInteracts withRisks
public/index.html et al.Marketing siteASSETSHTMLgraph-pulse widgetsIllustrative vs live confusion
public/llms.txtAgent-facing truthn/aPolicy/API mapdevelopers.htmlCan lag live graph coverage
public/app/Atlas mapatlas-api, local dataWebGL UIatlas_build.pydata/ gitignored; large bundles
atlas-api.jsAtlas CypherHTTPJSONAura HTTPAuth/rate at Worker

Modular kernel (if present)

PathRoleReceivesShipsInteracts withRisks
syntology/Additive kernelenv, graph, corpusdoctor/qc/parity/censusRe-exports ONE-way modulesNot production until promotion
syntology/serving/Strangler routerssame HTTPsubset of routesparity harnessDual tables until main.py switched
syntology/config.pyOne env parser.env pathredacted explain()all future callersAdmin password naming

Ops

PathRoleReceivesShipsInteracts withRisks
deploy/deploy_api_to_aws.shApp Runner deployDocker contextservice updateECR, secretsIAM grants; ONNX staging
joblog.shJob registry sidecarwrapped commandlogs/*.statusQC dropped-jobsWrapper pid vs child; JOB_DETACH
backup_corpus_to_s3.shNightly corpus synclocal dirsS3 prefixeslaunchd 03:00Must fail if live dirs absent (F-01 class)
ensure_grobid.shLocal GROBIDDockerTEI serviceparse stagesRestartPolicy historically none
ops_dashboard/Local monitorcloud APIs, logslocalhost:8790.env sourceRead-only intent; broad env source
qc_*.pyExecutable checksrepo + optional graphexit codessession protocolRatchets can be red by design

Root docs (trust ranking)

See Reading order. Do not treat CURRENT_STATUS.md as the first-read for “what is still true.”