- Python 96.2%
- Shell 2.2%
- PLpgSQL 1.1%
- Dockerfile 0.5%
| .claude | ||
| mcp_server | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| API.md | ||
| CLAUDE.md | ||
| DASHBOARD.md | ||
| DEPLOY_SCALEWAY.md | ||
| Dockerfile | ||
| main.py | ||
| MCP_ANALYTICS.md | ||
| README.md | ||
| requirements.txt | ||
| SECURITY.md | ||
| source_database.csv | ||
| VERYDISCO_PIPELINE_DESIGN.md | ||
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
- Read
CLAUDE.mdfor the architecture, conventions, and migration invariants. - Read
VERYDISCO_PIPELINE_DESIGN.mdfor the full rationale, the pgvector decision, the maturity scorecard, and the Scaleway deployment plan. - 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/agentsinterface 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.pysource registry (source_database.csv) + model ids + tuningsrc/iscc.pyStage 1b ISCC anchoring (deterministic, local)src/enricher.pyStage 2 Scaleway chat model, JSON-schema metadatasrc/provenance/Stage 2b FAIA/CommonsDB/RSL adapters behind the adapter contractsrc/embedder.pyStage 3 orchestrates provenance + storage.upsert over the corpussrc/api.pyFastAPI sidecar over storage.search (bearer auth, mode filters)src/mcp_analytics.pyMCP-only analytics, retentie en clicktrackingredirectsmcp_server/FastMCP server, attribution in every tool response, served skill.mdsrc/state.pyObject 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.allowlets safe commands (pytest, ruff, reads, search) run without asking;permissions.denyis 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.