c-04-capstone-assistant
Capstone Assistant
Route, retrieve, gate spicy verbs, trace everything, and stop before your pretend tokens bankrupt the pretend budget.
boss
python
~55 minREADME
# c-04-capstone-assistant Production-shaped assistant: route to RAG vs direct, gate sensitive verbs behind HITL, keep a trace, enforce a budget. ## Validator From repo root: ```bash npm run challenge -- capstone-assistant --track langchain ``` Or from this package directory: ```bash cd challenges/langchain/c-04-capstone-assistant uv run python tests/validate.py ```
Hints
- Sensitive verbs include delete/wipe/exfil/password/dump — broad enough to be annoying, small enough to test.
- RAG spends budget on retrieve then synthesize; exhaust early to prove you handle `budget_exhausted`.
- HITL approval spends a single `hitl_exec` chunk before returning the canned execution line.
Acceptance
- `npm run challenge -- capstone-assistant --track langchain` exits 0
- `run_turn` returns `need_human` until `human_approved` is provided for sensitive routes
- Trace includes `rag:doc-*`, `direct:replied`, and `hitl:executed` where appropriate
- Budget monotonically decreases on successful spends and blocks overspend