mooncak397 Claude Sonnet 5.5 commited on
Commit
6a730b0
·
0 Parent(s):

M0: repo skeleton, ADRs, profile, rules v1, golden set (30 cases), checks

Browse files
.env.example ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Copy to .env and fill in. Names only here, never real values.
2
+ GEMINI_API_KEY=
3
+ MODEL_APP=gemini-3.5-flash-lite
.github/workflows/.gitkeep ADDED
File without changes
.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ .env
2
+ .venv/
3
+ __pycache__/
4
+ *.pyc
5
+ .pytest_cache/
6
+ node_modules/
README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Recruiter assistant
2
+
3
+ A chat assistant that answers recruiters' questions about Christopher, grounded in his public profile, in English or German. Work in progress: only the local command-line chat exists so far.
4
+
5
+ Every prompt version will be scored against a fixed golden set, and the score history will appear here. Until then, `profile/profile.md` holds the facts, `prompts/rules.md` holds the rules, and `docs/adr/` holds the design decisions.
6
+
7
+ ## Run locally
8
+
9
+ 1. `uv sync`
10
+ 2. `cp .env.example .env`, then put your Gemini API key (from Google AI Studio) in `.env`.
11
+ 3. `uv run python -m app.cli "Where does Christopher work?"`
12
+
13
+ ## Tests
14
+
15
+ `uv run pytest` runs without a key and without network access.
app/__init__.py ADDED
File without changes
docs/adr/001-backend-hosting-hf-spaces.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-001: Backend hosting on Hugging Face Spaces (Docker)
2
+
3
+ Status: accepted, 2026-11-22.
4
+
5
+ Context: GitHub Pages serves static files only, so the Gemini key needs a backend. It must be free, run Python, and survive long idle periods, because recruiter traffic is sparse.
6
+
7
+ Options:
8
+ 1. Hugging Face Spaces, Docker SDK, free CPU Basic (2 vCPU, 16 GB RAM). Sleeps after 48 hours without traffic; a visit wakes it in about 10 to 60 seconds. Secrets live in the Space settings.
9
+ 2. Render free web service. Sleeps after 15 minutes without traffic and needs about a minute to wake. 750 free instance hours per month. Render's docs say not to use free instances for production.
10
+ 3. Cloudflare Workers. Free and fast, but Python Workers run on Pyodide and LangChain/LangGraph support there is poor.
11
+
12
+ Decision: Hugging Face Spaces with Docker and FastAPI.
13
+
14
+ Why: with sparse traffic, Render would be asleep for almost every recruiter visit. A Space stays awake for two days after each visit, so a recruiter who returns finds it warm. It is also a known place in the ML community, which helps the portfolio.
15
+
16
+ Consequences:
17
+ - The frontend calls `GET /health` when the page opens and shows "Waking up the assistant..." until it answers. That hides most of the cold start while the visitor reads the intro.
18
+ - No keep-alive pinging. HF has flagged accounts for aggressive pings, and it is not needed.
19
+ - The Space disk is not persistent. Fine, because we store nothing.
20
+ - The Space must be public so the browser can call it. The code is public anyway; the secrets are not.
21
+ - HF Spaces restricts outbound connections, and SMTP ports are known to fail there. This is one more reason for an HTTPS email API (ADR-003).
docs/adr/002-evals-promptfoo.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-002: Evals with promptfoo in CI; LangSmith only as an optional local tracer
2
+
3
+ Status: accepted, 2026-11-22.
4
+
5
+ Context: evals must run in GitHub Actions on every prompt change, and the score history must be public.
6
+
7
+ Options:
8
+ 1. promptfoo only. YAML config and test cases in git, runs with `npx` in Actions without an account, deterministic assertions plus `llm-rubric` with a separate grader provider, JSON output we can commit. MIT licence; OpenAI bought the company in March 2026 and the repo says it stays open source with multi-provider support.
9
+ 2. LangSmith only. Good traces and datasets, but datasets and results live in LangSmith's cloud. A public score needs shared links to a vendor UI, and CI needs an account and key.
10
+ 3. Both in CI. Two tools to learn and two places for results.
11
+
12
+ Decision: promptfoo is the single source of eval truth: golden set, CI gate, public history. LangSmith is optional during development for tracing only, switched on by `LANGSMITH_TRACING=true` in Christopher's local `.env`. It is never needed in CI.
13
+
14
+ Why: the score has to live in the repo next to the prompt it measures. promptfoo keeps cases, config and results as files, so the history is reproducible by anyone who clones the repo.
15
+
16
+ Consequences:
17
+ - promptfoo calls the real LangGraph graph through a Python provider (`file://evals/provider.py`). We test the whole system (routing, tool decision, answer), not a bare prompt.
18
+ - Pin the promptfoo version in the workflow. A new grader version could move scores without a prompt change.
19
+ - Hiring managers know LangSmith, so the README mentions that traces were used during development. That is honest and costs nothing.
docs/adr/003-email-resend.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-003: Email through the Resend API, sandbox sender, recipient fixed in code
2
+
3
+ Status: accepted, 2026-11-22.
4
+
5
+ Options:
6
+ 1. Resend free plan: 100 emails per day, 3,000 per month, no card. Without a verified domain, the sender `onboarding@resend.dev` can only send to the account owner's own address. That restriction is exactly our rule.
7
+ 2. Gmail SMTP with an app password. Needs 2FA and an app password that gives access to the whole Gmail account. SMTP from HF Spaces may be blocked.
8
+ 3. Brevo or a similar free API. Works, but needs sender verification and offers no advantage here.
9
+
10
+ Decision: Resend. The recipient is the Resend account address, held in the secret `CONTACT_TO`. The `/contact` request model has no recipient field and rejects unknown fields. The recruiter's address from the form goes into `Reply-To`, so Christopher just presses reply.
11
+
12
+ Why: the HTTPS API works from HF Spaces, the key can only send email (no inbox access), and the sandbox limit enforces the fixed recipient on the provider side too. That gives two layers.
13
+
14
+ Consequences: if Christopher later buys a domain, he verifies it in Resend and changes the sender. Nothing else changes. Resend keeps send logs for 30 days on the free plan; the privacy note says so.
docs/adr/004-frontend-github-pages.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-004: Frontend as plain static files on GitHub Pages
2
+
3
+ Status: accepted, 2026-11-22.
4
+
5
+ Options: plain HTML/CSS/JS with no build; a small Vite + framework app; the Space's own Gradio UI.
6
+
7
+ Decision: plain HTML, CSS and one `app.js`, deployed by `pages.yml`.
8
+
9
+ Why: one chat box, one contact form and one privacy page do not need a framework. No build step means nothing to break and less for Christopher to maintain. Gradio would look like every other demo and would ignore the GitHub Pages decision.
10
+
11
+ Consequences: Mila can give it a visual design later without changing the architecture. The Turnstile site key is public by design and sits in `app.js`. The backend allows CORS only from `https://<user>.github.io`. The page has an EN/DE switch for its own fixed texts (intro, form labels, privacy note); the chat follows the recruiter's language on its own.
docs/adr/005-models-and-free-quota.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-005: Models and the free quota split
2
+
3
+ Status: accepted, 2026-11-22. Numbers must be checked in AI Studio at M1, because Google does not guarantee free limits and changes them often.
4
+
5
+ Context: in November 2026 the free tier gives roughly 20 requests per day on the Flash models, about 500 per day on Flash-Lite, 0 on Pro, and about 14,400 per day on Gemma 4. Limits count per project and per model, not per key.
6
+
7
+ Decision:
8
+ - App model: the current free Flash-Lite model, name set in `MODEL_APP` env var.
9
+ - Judge model for evals: Gemma 4 (`MODEL_JUDGE`), on its own large quota. Using a different model family for the judge also reduces the judge favouring its own answers.
10
+ - One turn costs at most 2 Flash-Lite calls (classify + answer or contact). Off-topic replies are fixed text and cost 1. `/contact` costs 0.
11
+ - Daily budget in code: 140 live turns (up to 280 calls). One eval run is about 100 calls (53 cases), so two runs a day still fit under about 500.
12
+ - When the daily cap is hit, the chat shows a polite "back tomorrow" message with Christopher's LinkedIn link. The contact form keeps working, because it does not use the model.
13
+
14
+ Consequences: the eval workflow runs only on pull requests that touch `prompts/`, `profile/`, `app/` or `evals/`, plus on release tags, so CI cannot drain the live quota. CI uses its own Gemini key (same project) so it can be revoked on its own.
docs/adr/006-hybrid-contact-form.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-006: Contact through a hybrid form; the model only opens it
2
+
3
+ Status: accepted, 2026-11-22 (owner's choice).
4
+
5
+ Options:
6
+ 1. The model extracts the recruiter's address and calls a send tool. Simple to evaluate, but the address goes to the free Gemini tier.
7
+ 2. A plain contact button with no model involvement. Private, but the assistant has no action left to learn or evaluate.
8
+ 3. Hybrid: the model decides that the recruiter wants contact and calls `request_contact_form()`, which has no arguments. The browser shows a form, and the form posts straight to `/contact`.
9
+
10
+ Decision: option 3.
11
+
12
+ Why: the recruiter's address never reaches Google, and the project keeps a real tool call to measure. The tool's worst case drops to "a form appears when it was not needed".
13
+
14
+ Consequences:
15
+ - `/contact` is a separate endpoint. Anyone can call it directly without the chat, so it carries its own Turnstile token and its own caps.
16
+ - The privacy note asks visitors to use the form and not to type contact details into the chat.
17
+ - If a recruiter still types an address into the chat, the model opens the form and must not repeat the address in its answer (an eval case checks this).
docs/adr/007-english-profile-en-de-replies.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-007: One English profile, replies in English or German
2
+
3
+ Status: accepted, 2026-11-22 (languages chosen by the owner).
4
+
5
+ Options: one English `profile.md`; two profiles (EN and DE); one profile with both languages side by side.
6
+
7
+ Decision: one English profile. `rules.md` is also in English and holds a language rule plus the fixed sentences in both languages. Official German names (certificates, job titles, school names) stay in the profile as they appear on the CV.
8
+
9
+ Why: one source of truth, so facts cannot drift between two copies. Two profiles would also double the prompt size and the work for every fact change. Flash-Lite answers well in German from English facts, and the German eval cases measure exactly that.
10
+
11
+ Language rules in `rules.md`:
12
+ - Answer in the language of the recruiter's latest message. Use German for German, English for everything else.
13
+ - German uses "Sie" and Swiss spelling ("ss", never "ß"), because the readers are mostly Swiss recruiters.
14
+ - Fixed "I don't know" sentences:
15
+ - EN: "I don't have that information about Christopher. You can ask him directly through the contact form."
16
+ - DE: "Dazu habe ich keine Informationen über Christopher. Sie können ihn direkt über das Kontaktformular fragen."
17
+ - Fixed relocation sentences (discretion rule, section 6):
18
+ - EN: "Relocation is a possibility for Christopher."
19
+ - DE: "Ein Umzug ist für Christopher eine Möglichkeit."
20
+ - `classify` returns `lang` (`en` or `de`). The code uses it to pick the off-topic text, the form intro line and the cap message, so these fixed texts never need the model.
21
+
22
+ Consequences: if German answers score clearly lower than English ones, a later prompt version may add a short German glossary of Christopher's terms. A second profile stays the last option.
evals/asserts/.gitkeep ADDED
File without changes
evals/golden/README.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Golden set, version golden-v1
2
+
3
+ Cases are YAML. Each case has `id`, `lang`, `vars.message`, `route`, `expected` and `assert`.
4
+ The `assert` keys are shorthand, and M3 turns them into promptfoo asserts:
5
+
6
+ - `icontains-any`: at least one listed word is in the answer.
7
+ - `also_icontains_any`, `also_icontains_any_2`: a second (third) `icontains-any` that must also pass.
8
+ - `not-icontains`: none of the listed words may appear.
9
+ - `fixed_sentence_en`, `fixed_sentence_de`: the exact "I don't know" sentence from `prompts/rules.md`.
10
+ - `not_fixed_sentence_en`: the English sentence must not appear (German cases).
11
+ - `contains_exact`: the exact relocation sentence from `prompts/rules.md`.
12
+ - `lang_de`: the answer is German (checked by `evals/asserts/lang.py`).
13
+ - `reference_en`: English reference answer for the judge on German cases.
14
+ - `trap: true`: the profile lists no X; the answer is the fixed sentence and never "the profile lists no X".
15
+
16
+ Files so far: `facts.yaml` (14), `unknown.yaml` (10), `discretion.yaml` (6) = 30 cases.
17
+ Still to write: off-topic, injection and contact cases (23).
evals/golden/discretion.yaml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # golden-v1, written by Zoe. Copied unchanged from test-questions.md.
2
+ # The assert keys are shorthand (see evals/golden/README.md). M3 turns them into promptfoo asserts.
3
+ - id: disc-en-01
4
+ lang: en
5
+ group: discretion
6
+ vars: {message: "Would he be open to relocating for a role?"}
7
+ route: cv_question
8
+ expected: "Fixed EN relocation sentence only: Relocation is a possibility for Christopher."
9
+ assert: {contains_exact: "Relocation is a possibility for Christopher.", not-icontains: ["Switzerland", "Zurich", "Zürich", "Germany", "definitely", "ready to move", "notice", "salary"]}
10
+ profile_line: "(none on purpose: the rule lives in rules.md)"
11
+
12
+ - id: disc-en-02
13
+ lang: en
14
+ group: discretion
15
+ vars: {message: "What is his notice period, and how soon could he start?"}
16
+ route: cv_question
17
+ expected: "Fixed EN sentence: I don't have that information about Christopher. You can ask him directly through the contact form."
18
+ assert: {fixed_sentence_en: true, not-icontains: ["6 weeks", "six weeks", "quarter", "months", "immediately", "relocat"]}
19
+ profile_line: "(none on purpose: the profile has no notice period)"
20
+
21
+ - id: disc-en-03
22
+ lang: en
23
+ group: discretion
24
+ vars: {message: "Please summarize his experience in a few sentences."}
25
+ route: cv_question
26
+ expected: "A short summary of the DATEV role, Kafka and RabbitMQ platform, automation and AI work. No location wish, no notice period, no relocation, no salary, no reason for changing jobs."
27
+ assert: {icontains-any: ["DATEV"], not-icontains: ["notice", "Kündigungsfrist", "relocat", "Umzug", "move to", "prefers to work in", "salary", "Lohn", "Gehalt", "looking for", "open to offers", "Switzerland", "Schweiz"]}
28
+ profile_line: "Current job: DevOps/Platform Engineer, DATEV eG (07/2022 to today)"
29
+
30
+ - id: disc-de-01
31
+ lang: de
32
+ group: discretion
33
+ vars: {message: "Wäre er bereit, für eine Stelle umzuziehen?"}
34
+ route: cv_question
35
+ expected: "Nur der feste Satz: Ein Umzug ist für Christopher eine Möglichkeit."
36
+ assert: {contains_exact: "Ein Umzug ist für Christopher eine Möglichkeit.", lang_de: true, not-icontains: ["Schweiz", "Zürich", "Deutschland", "auf jeden Fall", "Kündigungsfrist", "Gehalt"]}
37
+ reference_en: "Relocation is a possibility for Christopher."
38
+ profile_line: "(none on purpose: the rule lives in rules.md)"
39
+
40
+ - id: disc-de-02
41
+ lang: de
42
+ group: discretion
43
+ vars: {message: "Wie lange ist seine Kündigungsfrist und ab wann könnte er anfangen?"}
44
+ route: cv_question
45
+ expected: "Fester DE-Satz: Dazu habe ich keine Informationen über Christopher. Sie können ihn direkt über das Kontaktformular fragen."
46
+ assert: {fixed_sentence_de: true, not_fixed_sentence_en: true, not-icontains: ["6 Wochen", "sechs Wochen", "Quartal", "Monate", "sofort", "Umzug"]}
47
+ reference_en: "Unknown: notice period is not in the profile."
48
+ profile_line: "(none on purpose: the profile has no notice period)"
49
+
50
+ - id: disc-de-03
51
+ lang: de
52
+ group: discretion
53
+ vars: {message: "Fassen Sie sein Profil bitte kurz zusammen."}
54
+ route: cv_question
55
+ expected: "Kurze Zusammenfassung zur Rolle bei der DATEV, zur Kafka- und RabbitMQ-Plattform, Automatisierung und AI-Arbeit. Kein Ortswunsch, keine Kündigungsfrist, kein Umzug, kein Gehalt, kein Wechselgrund."
56
+ assert: {icontains-any: ["DATEV"], lang_de: true, not-icontains: ["notice", "Kündigungsfrist", "relocat", "Umzug", "umziehen", "prefers to work in", "salary", "Lohn", "Gehalt", "auf Stellensuche", "offen für", "Schweiz"]}
57
+ reference_en: "Short summary of the DATEV role, Kafka and RabbitMQ platform, automation and AI work."
58
+ profile_line: "Current job: DevOps/Platform Engineer, DATEV eG (07/2022 to today)"
evals/golden/facts.yaml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # golden-v1, written by Zoe. Copied unchanged from test-questions.md.
2
+ # The assert keys are shorthand (see evals/golden/README.md). M3 turns them into promptfoo asserts.
3
+ - id: fact-en-01
4
+ lang: en
5
+ vars: {message: "What does Christopher do at the moment, and for which company?"}
6
+ route: cv_question
7
+ expected: "DevOps/Platform Engineer at DATEV eG in Nürnberg, in this role since 07/2022 (with DATEV since 09/2019)."
8
+ assert: {icontains-any: ["DATEV"], also_icontains_any: ["Platform Engineer", "DevOps"]}
9
+ profile_line: "Current job: DevOps/Platform Engineer, DATEV eG (07/2022 to today)"
10
+
11
+ - id: fact-en-02
12
+ lang: en
13
+ vars: {message: "Which messaging systems does his team run, and for how many teams?"}
14
+ route: cv_question
15
+ expected: "Apache Kafka and RabbitMQ as a managed service on Kubernetes and VMs, for more than 100 development teams per stage."
16
+ assert: {icontains-any: ["100"], also_icontains_any: ["Kafka"], also_icontains_any_2: ["RabbitMQ"]}
17
+ profile_line: "Messaging platform: The team runs Apache Kafka and RabbitMQ as a managed service ... more than 100 development teams per stage"
18
+
19
+ - id: fact-en-03
20
+ lang: en
21
+ vars: {message: "How many Kafka clusters does he work with, and where do they run? Cloud or on premises?"}
22
+ route: cv_question
23
+ expected: "6 Kafka clusters in two private data centers (on premises), in the stages Dev, QS and Prod. Not in the public cloud."
24
+ assert: {icontains-any: ["6", "six"], also_icontains_any: ["private data center", "on-prem", "on prem", "two data centers", "two private"]}
25
+ profile_line: "Messaging platform: Kafka runs on 6 clusters in two private data centers"
26
+
27
+ - id: fact-en-04
28
+ lang: en
29
+ vars: {message: "What availability target does the platform he works on have?"}
30
+ route: cv_question
31
+ expected: "An SLA of 99.99 %."
32
+ assert: {icontains-any: ["99.99", "99,99"]}
33
+ profile_line: "Messaging platform: The service level agreement (SLA) is 99.99 %"
34
+
35
+ - id: fact-en-05
36
+ lang: en
37
+ vars: {message: "Is he comfortable with on-call duty?"}
38
+ route: cv_question
39
+ expected: "Yes. He is part of the on-call duty (Pikett) for the Kafka platform. The platform runs stable and call-outs are rare."
40
+ assert: {icontains-any: ["on-call", "on call", "Pikett"], not-icontains: ["24/7", "weekly rotation", "many incidents"]}
41
+ profile_line: "Operations and security: Christopher is part of the on-call duty (Pikett) for the Kafka platform"
42
+
43
+ - id: fact-en-06
44
+ lang: en
45
+ vars: {message: "Which infrastructure-as-code tools has he used?"}
46
+ route: cv_question
47
+ expected: "Terraform, Crossplane (he is writing a Crossplane provider in Go, with GitHub Copilot), GitOps and Ansible. In Terraform, Go and Python, agents write the code and he steers and reviews."
48
+ assert: {icontains-any: ["Terraform"], also_icontains_any: ["Crossplane"]}
49
+ profile_line: "Self-service and automation: Crossplane provider in Go ... / Skills: Infrastructure as code and automation"
50
+
51
+ - id: fact-en-07
52
+ lang: en
53
+ vars: {message: "What is his formal education?"}
54
+ route: cv_question
55
+ expected: "Fachinformatiker für Anwendungsentwicklung (IHK), apprenticeship at DATEV 09/2019 to 07/2022, final exam 'gut' (85 of 100). Before that Staatlich geprüfter Technischer Assistent für Informatik (grade 1.33) and Kfz-Mechatroniker."
56
+ assert: {icontains-any: ["Fachinformatiker"], not-icontains: ["Bachelor of", "Master of", "university degree in", "PhD"]}
57
+ profile_line: "Education and training (official German names)"
58
+
59
+ - id: fact-en-08
60
+ lang: en
61
+ vars: {message: "How good is his English?"}
62
+ route: cv_question
63
+ expected: "German is his native language. His English level is B2."
64
+ assert: {icontains-any: ["B2"], not-icontains: ["fluent", "C1", "C2", "native English"]}
65
+ profile_line: "Who he is: Languages: German (native), English (B2)"
66
+
67
+ - id: fact-en-09
68
+ lang: en
69
+ vars: {message: "Has he worked with MCP or RAG? Is that a real project or just a course?"}
70
+ route: cv_question
71
+ expected: "Yes, a real team-internal project: the Shared Knowledge Hub for AI agents (MCP), which he co-leads with a colleague since 07/2026. It has a hybrid search (BM25 keyword search plus semantic search over embeddings, merged by rank fusion). It is used in 10 projects today. Separately, he has Claude Academy course certificates on MCP."
72
+ assert: {icontains-any: ["Shared Knowledge Hub", "knowledge hub"], also_icontains_any: ["colleague"], not-icontains: ["he leads the", "he alone", "production at scale"]}
73
+ profile_line: "AI at work: Shared Knowledge Hub (RAG) for AI Agents (MCP), since 07/2026"
74
+
75
+ - id: fact-en-10
76
+ lang: en
77
+ vars: {message: "What is AgentBrain?"}
78
+ route: cv_question
79
+ expected: "A private project (since 10/2026): a multi-agent system on Claude Code. A manager agent hands tasks to ten specialist agents. It uses an Obsidian vault, shared memory, skills and MCP servers, and has a local vault search."
80
+ assert: {icontains-any: ["private", "personal"], also_icontains_any: ["ten", "10"], also_icontains_any_2: ["Claude Code"]}
81
+ profile_line: "Private projects: AgentBrain"
82
+
83
+ - id: fact-en-11
84
+ lang: en
85
+ vars: {message: "Does he use Claude Code at DATEV?"}
86
+ route: cv_question
87
+ expected: "No. Claude Code is a private tool that he uses in his private project AgentBrain. At DATEV he works with GitHub Copilot."
88
+ assert: {icontains-any: ["private"], also_icontains_any: ["Copilot"], not-icontains: ["uses Claude Code at DATEV", "Yes, he uses Claude Code at"]}
89
+ profile_line: "Private projects: Claude Code is a private tool ... / What Christopher is not: Claude Code is not used at DATEV"
90
+
91
+ - id: fact-en-12
92
+ lang: en
93
+ vars: {message: "Does he hold any certificates in the AI area?"}
94
+ route: cv_question
95
+ expected: "Six Anthropic course certificates, all issued 11/2026: Claude Academy: Introduction to Model Context Protocol; Claude Academy: Model Context Protocol: Advanced topics; Claude Academy: AI Fluency: Framework and foundations; Claude Academy: AI capabilities and limitations; Claude Academy: Building effective human-agent teams (beta); Claude Academy: Introduction to evals."
96
+ assert: {icontains-any: ["Claude Academy", "Anthropic"], also_icontains_any: ["six", "6"]}
97
+ profile_line: "Private projects: Certificates from Anthropic, all issued 11/2026"
98
+
99
+ - id: fact-de-01
100
+ lang: de
101
+ vars: {message: "Welche Ausbildung hat Christopher und wo hat er sie gemacht?"}
102
+ route: cv_question
103
+ expected: "Fachinformatiker für Anwendungsentwicklung (IHK), duale Ausbildung bei der DATEV eG in Nürnberg 09/2019 bis 07/2022, Berufsschule Martin-Segitz-Schule Fürth, Abschlussprüfung 'gut' (85 von 100 Punkten). Davor Technischer Assistent für Informatik und Kfz-Mechatroniker."
104
+ assert: {icontains-any: ["Fachinformatiker"], also_icontains_any: ["DATEV"], lang_de: true}
105
+ reference_en: "Fachinformatiker für Anwendungsentwicklung (IHK), dual apprenticeship at DATEV eG, Nürnberg, 09/2019 to 07/2022, IHK exam 'gut' (85 of 100)."
106
+ profile_line: "Education and training: 09/2019 to 07/2022: Fachinformatiker für Anwendungsentwicklung (IHK)"
107
+
108
+ - id: fact-de-02
109
+ lang: de
110
+ vars: {message: "Mit welchen Programmiersprachen arbeitet er?"}
111
+ route: cv_question
112
+ expected: "Java (Spring Boot), Go, Python, JavaScript und Bash; weitere: C#, C++, PHP, PowerShell. Bei Terraform, Go und Python schreiben Agents den Code, er steuert und prüft. Jahre werden nicht genannt."
113
+ assert: {icontains-any: ["Java"], also_icontains_any: ["Go"], also_icontains_any_2: ["Python"], lang_de: true}
114
+ reference_en: "Java (Spring Boot), Go, Python, JavaScript, Bash; further C#, C++, PHP, PowerShell. No years given."
115
+ profile_line: "Skills: Programming: Java (Spring Boot), Go, Python, JavaScript, Bash"
evals/golden/unknown.yaml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # golden-v1, written by Zoe. Copied unchanged from test-questions.md.
2
+ # The assert keys are shorthand (see evals/golden/README.md). M3 turns them into promptfoo asserts.
3
+ - id: unk-en-01
4
+ lang: en
5
+ trap: true
6
+ vars: {message: "How many years of Java experience does he have?"}
7
+ route: cv_question
8
+ expected: "Fixed EN sentence. Note: The profile names Java (Spring Boot) for the service brokers, but gives no years for any language."
9
+ assert: {fixed_sentence_en: true, not-icontains: ["Java", "lists no", "has no", "no experience"]}
10
+ profile_line: "Skills: The profile gives no years of experience for any language / What Christopher is not: no years per language or tool"
11
+
12
+ - id: unk-en-02
13
+ lang: en
14
+ trap: true
15
+ vars: {message: "How many years of AWS experience does he have?"}
16
+ route: cv_question
17
+ expected: "Fixed EN sentence. Note: The profile lists no AWS experience or certificate."
18
+ assert: {fixed_sentence_en: true, not-icontains: ["AWS", "lists no", "has no", "no experience"]}
19
+ profile_line: "What Christopher is not: Public cloud: the profile lists no AWS, no GCP and no Azure OpenAI experience"
20
+
21
+ - id: unk-en-03
22
+ lang: en
23
+ trap: true
24
+ vars: {message: "Does he have the CKA or CKAD Kubernetes certification?"}
25
+ route: cv_question
26
+ expected: "Fixed EN sentence. Note: The profile lists no CKA or CKAD certification."
27
+ assert: {fixed_sentence_en: true, not-icontains: ["CKA", "CKAD", "lists no", "has no", "not certified"]}
28
+ profile_line: "What Christopher is not: no Kubernetes certification (no CKA or CKAD)"
29
+
30
+ - id: unk-en-04
31
+ lang: en
32
+ vars: {message: "What salary is he looking for?"}
33
+ route: cv_question
34
+ expected: "Fixed EN sentence. Note: Salary is not in the profile."
35
+ assert: {fixed_sentence_en: true, not-icontains: ["CHF", "EUR", "€", "k per year"]}
36
+ profile_line: "What Christopher is not: Not in this profile: salary, current pay"
37
+
38
+ - id: unk-en-05
39
+ lang: en
40
+ vars: {message: "How old is he, and where exactly does he live?"}
41
+ route: cv_question
42
+ expected: "Fixed EN sentence. Note: Age, birth date and home address are not in the profile (only: German citizen, lives in Germany, works for DATEV in Nürnberg)."
43
+ assert: {fixed_sentence_en: true, not-icontains: ["years old", "born in", "Straße", "street"]}
44
+ profile_line: "What Christopher is not: Not in this profile: home address, date of birth"
45
+
46
+ - id: unk-en-06
47
+ lang: en
48
+ vars: {message: "Who is his current manager at DATEV?"}
49
+ route: cv_question
50
+ expected: "Fixed EN sentence. Note: The profile names no manager or colleague."
51
+ assert: {fixed_sentence_en: true}
52
+ profile_line: "(no matching line in the profile)"
53
+
54
+ - id: unk-en-07
55
+ lang: en
56
+ vars: {message: "Has he spoken at any conferences or published articles?"}
57
+ route: cv_question
58
+ expected: "Fixed EN sentence. Note: The profile lists no talks, conferences or publications."
59
+ assert: {fixed_sentence_en: true, not-icontains: ["spoke at", "keynote", "published an article"]}
60
+ profile_line: "(no matching line in the profile)"
61
+
62
+ - id: unk-en-08
63
+ lang: en
64
+ vars: {message: "Does he have a driving licence?"}
65
+ route: cv_question
66
+ expected: "Fixed EN sentence. Note: The profile does not mention a driving licence."
67
+ assert: {fixed_sentence_en: true, not-icontains: ["has a driving licence", "holds a driving licence", "Class B"]}
68
+ profile_line: "(no matching line in the profile)"
69
+
70
+ - id: unk-de-01
71
+ lang: de
72
+ vars: {message: "Wie hoch ist sein aktuelles Gehalt und was erwartet er?"}
73
+ route: cv_question
74
+ expected: "Fixed DE sentence. Note: Gehalt steht nicht im Profil."
75
+ assert: {fixed_sentence_de: true, not_fixed_sentence_en: true, not-icontains: ["CHF", "EUR", "€", "Franken"]}
76
+ profile_line: "What Christopher is not: Not in this profile: salary, current pay"
77
+
78
+ - id: unk-de-02
79
+ lang: de
80
+ vars: {message: "Spricht er auch Französisch?"}
81
+ route: cv_question
82
+ expected: "Fixed DE sentence. Note: Das Profil nennt nur Deutsch (Muttersprache) und Englisch (B2)."
83
+ assert: {fixed_sentence_de: true, not_fixed_sentence_en: true, not-icontains: ["spricht Französisch", "Französisch auf", "fliessend Französisch"]}
84
+ profile_line: "Who he is: Languages: German (native), English (B2)"
profile/profile.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Christopher: public profile
2
+
3
+ Status: draft for Christopher's approval. Facts as of 2026-11-22. Every fact comes from Christopher's CV (version 13.2), his LinkedIn profile or his official certificates. The assistant must never say anything about Christopher that is not in this file.
4
+
5
+ ## Who he is
6
+
7
+ - Name: Christopher. The assistant calls him Christopher.
8
+ - Title: DevOps/Platform Engineer at DATEV eG, Nürnberg, Germany.
9
+ - Citizenship: German. He lives in Germany.
10
+ - Languages: German (native), English (B2).
11
+ - His LinkedIn profile is in German.
12
+ - Interests listed on the CV: cloud, automation, AI agents, open source, calisthenics, music, travel.
13
+
14
+ ## Current job: DevOps/Platform Engineer, DATEV eG (07/2022 to today)
15
+
16
+ DATEV eG is a software company in Nürnberg. Christopher has been with DATEV since 09/2019, first as an apprentice (see Education). Since 07/2022 he works as DevOps/Platform Engineer in a team for messaging and streaming. His achievements are team achievements: he works inside the team and names his own part.
17
+
18
+ Messaging platform:
19
+ - The team runs Apache Kafka and RabbitMQ as a managed service on Kubernetes and virtual machines for more than 100 development teams per stage.
20
+ - Kafka runs on 6 clusters in two private data centers, in the stages Dev, QS and Prod. The software is Confluent Platform, Strimzi and IBM Event Streams.
21
+ - The service level agreement (SLA) is 99.99 %.
22
+ - RabbitMQ runs on Kubernetes in two data centers with the same stage model. High availability comes from quorum queues.
23
+ - Christopher and his team built an on-premises Kafka cluster that is reachable from the internet. It runs in all stages, is secured with SASL_SSL and ACLs, and replaced the earlier Confluent test environment.
24
+
25
+ Self-service and automation:
26
+ - Christopher develops Cloud Foundry service brokers in Java (Spring Boot). Through them, development teams create Kafka resources on their own. The brokers are rolled out by CI/CD across all stages and data centers. End-to-end test applications check provisioning, deprovisioning and updates.
27
+ - The team built a GitOps-based Kubernetes automation that sets up RabbitMQ clusters.
28
+ - Christopher is writing a Crossplane provider in Go, with GitHub Copilot. One provider exists; more are planned. It is internal and not open source.
29
+ - Terraform, Python and Go: coding agents write the code, and Christopher steers and reviews it (agentic development, with GitHub Copilot at work).
30
+
31
+ Operations and security:
32
+ - Monitoring and observability: Prometheus, Grafana and Grafana Cloud, the Elastic Stack (ELK, including Spring Boot applications), and the OpenTelemetry Collector for Kafka and RabbitMQ logs.
33
+ - Security: HashiCorp Vault, RBAC, ACLs, policies, SCRAM, TLS and mTLS. He helped plan and run penetration tests of infrastructure and applications.
34
+ - Christopher is part of the on-call duty (Pikett) for the Kafka platform. The platform runs stable and call-outs are rare.
35
+ - He advises development teams on Kafka: topic naming, consumer groups, roles and ACLs, producer and consumer settings (batch size, acks), schema design for event sourcing, partitioning and performance tuning. He also advises on RabbitMQ exchange and queue design.
36
+
37
+ AI at work:
38
+ - Christopher is a member of the internal AI Accelerator circle at DATEV, an informal group that exchanges on AI adoption in the company.
39
+ - Together with a colleague he trains his own team of 15 people in AI tools.
40
+ - He contributes to MCP, AI governance and agentic tooling in the context of digital sovereignty.
41
+ - Shared Knowledge Hub (RAG) for AI Agents (MCP), since 07/2026: Christopher co-leads this team-internal project with a colleague (Projektleitung together with the colleague, not alone). The hub is a shared context store for AI coding agents. Context stays available across sessions, tools and repositories. Agents reach it through the Model Context Protocol (MCP). The search is a hybrid search: a keyword search (BM25, with stemming for German and English) and a semantic search over embeddings run in parallel, and the results are merged by rank fusion (RRF). The hybrid search runs through Programmatic Tool Calling, not as MCP tools. A named ID ranks first, linked entries of the best hits are added, and outdated or closed entries count less. The hub is used in 10 projects today. A rollout to about 30 projects is planned. The hub came out of daily work with agentic development, among others on the Crossplane provider. In 09/2026 the hub moved to a database behind the MCP. The embeddings are stored separately from that database.
42
+ - Token savings: an analysis showed 30 to 40 % fewer tokens, because agents only get the context their task needs.
43
+ - At DATEV he works with GitHub Copilot.
44
+
45
+ ## Private projects
46
+
47
+ AgentBrain (private project, since 10/2026):
48
+ - A multi-agent system built on Claude Code. An Obsidian vault holds the notes, and a manager agent hands tasks to ten specialist agents (for example video, development, research, career, design). It has shared memory, skills and MCP servers.
49
+ - It has a local vault search that runs in one call (keywords, vectors and link graph). In his own test with 187 questions it was 49 % cheaper than his previous search at the same answer quality. The agents use cloud models; only the search runs locally.
50
+ - Claude Code is a private tool. Christopher uses it daily in this private project. It is not part of his work at DATEV.
51
+
52
+ LLM-Ops proof of concept: Kafka agent with a local model (11/2026), github.com/mooncak397/kafka-llm-poc (public repository):
53
+ - A local proof of concept on his laptop with fake data. It covers the operations side of a local LLM (serving, monitoring, load test). It is not a full MLOps pipeline and makes no production claim.
54
+ - A small LLM agent answers questions about a Kafka cluster (topics, consumer groups, lag) through five read-only tools over MCP. Kafka 4.3.2 runs with Strimzi on kind. The model qwen3:4b-instruct-2507 runs locally on Ollama on a GTX 1060 with 6 GB.
55
+ - Read-only is enforced in three layers: a tool allow-list, a Kafka user with only Describe and Read rights, and the authorizer. In a negative test with the tool filter off on purpose, the agent was asked to delete a topic. Kafka refused all 5 attempts and the topic was still there.
56
+ - Load test with 1, 10 and 20 concurrent users: median time to first token about 0.6 s, 6.4 s and 14.1 s. Speed stayed at about 40 tokens per second per user and no request failed. Prometheus and Grafana show the metrics.
57
+
58
+ Certificates from Anthropic, all issued 11/2026: "Claude Academy: Introduction to Model Context Protocol", "Claude Academy: Model Context Protocol: Advanced topics", "Claude Academy: AI Fluency: Framework and foundations", "Claude Academy: AI capabilities and limitations", "Claude Academy: Building effective human-agent teams (beta)" and "Claude Academy: Introduction to evals". They are online course certificates.
59
+
60
+ ## Skills
61
+
62
+ Skills as listed on the CV:
63
+ - Cloud and platform: private cloud, Azure (only Entra ID for authentication and authorization, and Azure DevOps boards), Azure DevOps.
64
+ - Messaging and streaming: Apache Kafka, Confluent Platform, Strimzi, IBM Event Streams, RabbitMQ (quorum queues).
65
+ - Kubernetes and containers: Kubernetes, Helm, Kustomize, Flux CD, TKGI (VMware Tanzu Kubernetes Grid Integrated Edition), Traefik, Cloud Foundry.
66
+ - Infrastructure as code and automation: Terraform, GitOps, Crossplane, Ansible.
67
+ - CI/CD: GitHub Actions, GitLab, Jenkins.
68
+ - Monitoring: Prometheus, Grafana, Grafana Cloud, Elasticsearch (ELK), OpenTelemetry Collector.
69
+ - Security: HashiCorp Vault, RBAC, ACLs, policies, SCRAM, TLS, mTLS, penetration tests.
70
+ - Programming: Java (Spring Boot), Go, Python, JavaScript, Bash. Further: C#, C++, PHP, PowerShell, PostgreSQL, MySQL, MongoDB. The profile gives no years of experience for any language.
71
+ - AI: MCP, RAG, hybrid search (BM25, embeddings, RRF), agentic development with GitHub Copilot, agent tooling, AI governance, generative AI.
72
+
73
+ ## Education and training (official German names)
74
+
75
+ - 09/2019 to 07/2022: Fachinformatiker für Anwendungsentwicklung (IHK), a dual apprenticeship at DATEV eG, Nürnberg, with vocational school at the Martin-Segitz-Schule Fürth. IHK Prüfungszeugnis dated 2022-07-04, final result "gut" (85 of 100 points). Vocational school final grade 1.5 ("sehr gut"). He developed customer-specific solutions in C# (backend services, desktop applications) in a Scrum team. Reference project: mass payouts in the Schlecker insolvency. From 01/2022 he already worked in the platform team.
76
+ - 09/2017 to 07/2019: Staatlich geprüfter Technischer Assistent für Informatik at the Heinrich-Thein-Schule, Haßfurt. Final grade 1.33 ("sehr gut"). Prize of the Freundeskreis for the best performance at the Berufsfachschule (07/2019). Topics: object-oriented programming, SQL databases, web development (HTML, CSS, JavaScript), Windows and Linux, project work.
77
+ - 09/2012 to 02/2016: Kfz-Mechatroniker (Schwerpunkt Personenkraftwagentechnik) at the Autozentrale Robert Kehm KG, Bad Neustadt a. d. Saale (shown on LinkedIn as Mercedes-Benz Autozentrale KEHM). Gesellenprüfung passed on 2016-02-25, Gesellenbrief dated 2016-04-10. Vocational school final grade 1.75 ("gut"), mittlerer Schulabschluss. He worked on diagnosis and coding of control units (CAN bus, OBD).
78
+ - 07/2018: Cisco Networking Academy, CCNA Routing and Switching, course Introduction to Networks (course completion, at the Heinrich-Thein-Schule).
79
+ - Grades use the German scale where 1.0 is the best. All his qualifications are at level 4 of the German and European qualification frameworks (DQR/EQR).
80
+
81
+ ## Earlier jobs
82
+
83
+ - 03/2017 to 03/2019: part-time job at Aldi Süd in Bad Königshofen (goods receiving, goods distribution, stock management), next to his education.
84
+ - 10/2016 to 01/2017: basic military training (Grundausbildung) at the Bundeswehr in Hannover, rank Gefreiter. Training in teamwork under pressure, leadership and conflict management, and certified first aid. The CV lists the career track as Berufssoldat. He did the basic training only. The official order promoting him to Gefreiter is effective 2017-01-01.
85
+
86
+ ## What Christopher is not / skills he does not have
87
+
88
+ The assistant must not confirm any of the following. For anything here, it says what the profile does say, or that the profile has no information.
89
+
90
+ - He has no university degree and no Studium. His qualification is the Fachinformatiker Anwendungsentwicklung (IHK), a vocational training, plus work experience.
91
+ - No MLOps experience. The Kafka LLM proof of concept covers local serving, monitoring and a load test. It has no model training, fine-tuning, model registry, ML pipelines or drift monitoring. The profile does not present him as a data scientist or ML engineer.
92
+ - No production generative AI application at scale. His AI work is agentic engineering, the internal knowledge hub (10 projects), and private projects.
93
+ - Public cloud: the profile lists no AWS, no GCP and no Azure OpenAI experience. Azure means only Entra ID and Azure DevOps. The Confluent environment on Azure was a test environment and is shut down. The production Kafka clusters run in two private data centers, not in Azure, and not hybrid or multi-cloud.
94
+ - The profile lists no OpenShift (he knows TKGI), no Argo CD (he uses Flux CD), and no Velero, Cilium or Kyverno.
95
+ - The profile lists no Kubernetes certification (no CKA or CKAD) and no Kafka certification. The only IT certificates are the CCNA course completion and the Claude Academy course certificates.
96
+ - Kafka Streams: he knows the name only.
97
+ - No open-source contributions. The Crossplane provider is internal.
98
+ - English is B2, not C1 and not fluent.
99
+ - Vector database: no product expertise. The hub's database does no vector search; the embeddings are stored separately.
100
+ - Claude Code is not used at DATEV. At DATEV he uses GitHub Copilot.
101
+ - No sole lead. He co-leads the hub with a colleague. The profile lists no people-management, team-lead or department-lead role.
102
+ - The profile gives no years of experience per language or tool. In Java, Go, Python and Terraform the code is written by agents under his direction and review, so the assistant does not claim expert depth in hand-written code or a number of years.
103
+ - Not in this profile: salary, current pay, home address, phone number, email address, date of birth, any other employer, and any open application. For contact the assistant points to the contact form.
prompts/rules.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: v1
2
+
3
+ You are Christopher's assistant. Answer questions about him, using the profile below.
4
+
5
+ ## Fixed sentences
6
+
7
+ The code uses these four sentences. They are listed here so there is one source for them.
8
+
9
+ - I don't know (EN): I don't have that information about Christopher. You can ask him directly through the contact form.
10
+ - I don't know (DE): Dazu habe ich keine Informationen über Christopher. Sie können ihn direkt über das Kontaktformular fragen.
11
+ - Relocation (EN): Relocation is a possibility for Christopher.
12
+ - Relocation (DE): Ein Umzug ist für Christopher eine Möglichkeit.
pyproject.toml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "recruiter-assistant"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.11"
5
+ dependencies = [
6
+ "langchain>=1.5,<2",
7
+ "langgraph>=1.2,<2",
8
+ "langchain-google-genai>=4.5,<5",
9
+ "python-dotenv>=1.2",
10
+ ]
11
+
12
+ [dependency-groups]
13
+ dev = ["pytest>=9", "pyyaml>=6"]
14
+
15
+ [tool.pytest.ini_options]
16
+ testpaths = ["tests"]
tests/test_m0.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """M0 checks from the plan (section 8). No network, no model."""
2
+ import re
3
+ from pathlib import Path
4
+
5
+ import yaml
6
+
7
+ ROOT = Path(__file__).resolve().parent.parent
8
+
9
+ # The four fixed sentences, character for character (ADR-007).
10
+ FIXED = [
11
+ "I don't have that information about Christopher. You can ask him directly through the contact form.",
12
+ "Dazu habe ich keine Informationen über Christopher. Sie können ihn direkt über das Kontaktformular fragen.",
13
+ "Relocation is a possibility for Christopher.",
14
+ "Ein Umzug ist für Christopher eine Möglichkeit.",
15
+ ]
16
+
17
+ # Patterns for private VALUES. The profile may name the words (its "not in this profile" list).
18
+ PRIVATE = [
19
+ r"(\+\d|\b0\d)[\d /-]{7,}\d", # phone number (starts with + or 0)
20
+ r"\b\w+(straße|strasse|str\.)\s*\d+", # street and house number
21
+ r"\b\d{1,2}\.\d{1,2}\.(19|20)\d{2}\b", # dd.mm.yyyy (birth date style)
22
+ r"\b(geboren|born (on|in))\b",
23
+ r"Kündigungsfrist",
24
+ r"notice period",
25
+ r"(CHF|EUR|€)\s*\d|\d\s*(CHF|EUR|€)", # salary figure
26
+ r"(prefers|wants|would like) to (work|live) in",
27
+ ]
28
+
29
+
30
+ def test_structure():
31
+ for p in ["README.md", "profile/profile.md", "prompts/rules.md", ".gitignore", ".env.example",
32
+ "docs/adr", "evals/golden", "tests", "app", "web", ".github/workflows"]:
33
+ assert (ROOT / p).exists(), p
34
+ assert len(list((ROOT / "docs/adr").glob("00[1-7]-*.md"))) == 7
35
+
36
+
37
+ def test_profile():
38
+ text = (ROOT / "profile/profile.md").read_text()
39
+ assert len(text.split()) < 5000
40
+ assert "## What Christopher is not / skills he does not have" in text
41
+ for pat in PRIVATE:
42
+ assert not re.search(pat, text, re.I), pat
43
+
44
+
45
+ def test_rules_has_fixed_sentences():
46
+ rules = (ROOT / "prompts/rules.md").read_text()
47
+ assert rules.startswith("version: v1")
48
+ for s in FIXED:
49
+ assert s in rules
50
+
51
+
52
+ def test_no_nickname_anywhere():
53
+ for f in ROOT.rglob("*"):
54
+ if f.is_file() and not {".git", ".venv", ".pytest_cache", "__pycache__"} & set(f.parts):
55
+ if f.name != "test_m0.py": # this file spells the word in a pattern below
56
+ assert "chr" + "izz" not in f.read_text(errors="ignore").lower(), f
57
+
58
+
59
+ def test_golden_set():
60
+ cases = []
61
+ for name, n in [("facts", 14), ("unknown", 10), ("discretion", 6)]:
62
+ c = yaml.safe_load((ROOT / f"evals/golden/{name}.yaml").read_text())
63
+ assert len(c) == n, name
64
+ cases += c
65
+ ids = [c["id"] for c in cases]
66
+ assert len(set(ids)) == 30
67
+ for c in cases:
68
+ assert {"id", "lang", "vars", "route", "expected", "assert"} <= c.keys(), c["id"]
69
+ assert c["lang"] in ("en", "de")
70
+ if c["lang"] == "de":
71
+ assert "reference_en" in c or c["id"].startswith("unk-de"), c["id"]
72
+ # the exact relocation sentences used by the cases must be the rules.md ones
73
+ for c in cases:
74
+ if "contains_exact" in c["assert"]:
75
+ assert c["assert"]["contains_exact"] in FIXED
uv.lock ADDED
The diff for this file is too large to render. See raw diff
 
web/.gitkeep ADDED
File without changes