Dit project is ontwikkeld binnen de SVDJ Incubator 2026: digitale autonomie en publieksrelaties. De SVDJ Incubator is een innovatieprogramma van het Stimuleringsfonds voor de Journalistiek (SVDJ) gericht op het vinden van oplossingen voor vraagstukken binnen de journalistieke sector. Meer weten over deze editie? Ga naar: https://www.svdj.nl/dossier/svdj-incubator-digitale-autonomie-en-publieksrelaties.
  • Python 96.2%
  • Shell 2.2%
  • PLpgSQL 1.1%
  • Dockerfile 0.5%
Find a file
2026-09-09 15:15:03 +02:00
.claude Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
mcp_server Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
src Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
tests Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
.dockerignore Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
.env.example Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
.gitignore Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
API.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
CLAUDE.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
DASHBOARD.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
DEPLOY_SCALEWAY.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
Dockerfile Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
main.py Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
MCP_ANALYTICS.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
README.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
requirements.txt Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
SECURITY.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
source_database.csv Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00
VERYDISCO_PIPELINE_DESIGN.md Initial import of VeryDisco MCP 2026-09-09 15:15:03 +02:00

Very Disco pipeline

Content pipeline and semantic search for Very Disco. Very Disco is a public search service over journalism from partner publishers: it indexes their WordPress articles and serves snippets plus attribution plus a deep link back to the original, it does not republish full text. The articles belong to the partners; the provenance layer records their rights and credits the original publisher, it does not assert its own. WordPress ingestion, ISCC content anchoring, Scaleway open-weight enrichment + embeddings, pgvector storage, FastAPI + MCP retrieval, machine-readable licensing (ISCC/FAIA/CommonsDB/RSL), and OpenAttribution usage telemetry.

Start here

  1. Read CLAUDE.md for the architecture, conventions, and migration invariants.
  2. Read VERYDISCO_PIPELINE_DESIGN.md for the full rationale, the pgvector decision, the maturity scorecard, and the Scaleway deployment plan.
  3. The .claude/ directory holds the Claude Code skills and subagents that encode this project's domain knowledge. Open the repo in Claude Code and the skills load automatically when relevant; the subagents are available via the /agents interface or by delegation.

What is buildable now

pip install -r requirements.txt
cp .env.example .env          # fill in, or use Scaleway Secret Manager
psql "$VERYDISCO_DB_URL" -f src/schema.sql   # or: python src/storage.py --init
python src/fetcher.py --base-url https://verydisco.press/wp-json/wp/v2 --slug <slug>

Layout

CLAUDE.md                      project memory for Claude Code
VERYDISCO_PIPELINE_DESIGN.md   design + rationale + roadmap
requirements.txt
.env.example
src/
  embedding.py    single source of truth, Scaleway bge client (store-agnostic)
  fetcher.py      WordPress REST ingestion, RO crash-recovery patterns
  storage.py      pgvector persistence + search (replaces ChromaDB)
  schema.sql      Postgres schema: articles, query_log, oa_events
.claude/
  skills/         scaleway-genapi, iscc-provenance, pgvector-schema,
                  faia-commonsdb, mcp-server-build, openattribution-telemetry
  agents/         pipeline-architect, ingestion/enrichment/storage/retrieval
                  workers, code-reviewer, test-runner

Pipeline (built)

Run the whole thing through main.py (stages are idempotent and resumable):

python main.py --init-db                  # apply src/schema.sql
python main.py --all                      # fetch -> iscc -> enrich -> provenance -> embed
python main.py --fetch --author <slug>    # one source
python main.py --embed                    # (re)embed enriched articles into pgvector
python main.py --search "klimaatbeleid"   # test semantic search
  • src/config.py source registry (source_database.csv) + model ids + tuning
  • src/iscc.py Stage 1b ISCC anchoring (deterministic, local)
  • src/enricher.py Stage 2 Scaleway chat model, JSON-schema metadata
  • src/provenance/ Stage 2b FAIA/CommonsDB/RSL adapters behind the adapter contract
  • src/embedder.py Stage 3 orchestrates provenance + storage.upsert over the corpus
  • src/api.py FastAPI sidecar over storage.search (bearer auth, mode filters)
  • src/mcp_analytics.py MCP-only analytics, retentie en clicktrackingredirects
  • mcp_server/ FastMCP server, attribution in every tool response, served skill.md
  • src/state.py Object Storage working-state sync for serverless (env-gated)

Deploy

See DEPLOY_SCALEWAY.md for the step-by-step Scaleway deployment (Managed PostgreSQL + pgvector, Serverless Job with cron for the pipeline, Serverless Containers for the API and MCP, Object Storage for working state, Secret Manager). Build the image for linux/amd64 (see Dockerfile).

No em-dash in any output (house rule, see CLAUDE.md).

Self-verification (hooks + permissions)

.claude/settings.json makes Claude Code check its own work so you approve less by hand. Two mechanisms:

  • permissions.allow lets safe commands (pytest, ruff, reads, search) run without asking; permissions.deny is the never-without-you list (.env, git push, psql, scw, terraform apply, pushing images).
  • Hooks in .claude/hooks/ are deterministic gates:
    • guard-em-dash.sh (PreToolUse Write|Edit): blocks any edit containing an em-dash before it is written.
    • format-and-lint.sh (PostToolUse Write|Edit): runs ruff format + check and a compile check on each edited Python file.
    • verify-before-stop.sh (Stop): runs compile, pytest, and the project invariants (em-dash scan, the <=> operator in storage.py, Scaleway-only inference). If any fail, Claude is sent back to work instead of finishing.
    • session-context.sh (SessionStart): injects the active invariants and current branch.

The hooks use python for JSON parsing, so they do not depend on jq. All four were tested before commit. Run /hooks in Claude Code to inspect them.