Handbook
Tutorial 201 — Building with LCDL
Developers who finished 101 and need to design governed tasks, wire JSON schemas, compose operators, and follow RAG / verification patterns—still offline-first.
Updated
Audience
Developers who finished 101 and need to design governed tasks, wire JSON schemas, compose operators, and follow RAG / verification patterns—still offline-first.
Tutorial 201 building blocks
How authored contracts become registered, offline-runnable tasks verified with operators and pytest.
- contract.md + contract.jsonDefines task intent and machine-readable input/output schemas.
- TASK_REGISTRY_V1 registrationRegisters the task_id so TaskRunner can resolve the contract.
- TaskRunner + fake_chatExecutes tasks offline with a deterministic fake chat adapter.
- operators → evidence tasks → pytestComposes retries and evidence paths, then proves behavior with pytest.
contract.md + contract.json
|
v
TASK_REGISTRY_V1 registration
|
v
TaskRunner + fake_chat
|
v
operators → evidence tasks → pytestPrerequisites
| Track | Requirement |
|---|---|
| Lessons 201-01–03 | Tutorial 101 complete |
| 201-04–05 | Comfortable reading contract.json and running **pytest |
Final artifact
You can:
- Sketch a new
task_idfolder layout and passaudit_contract_docs.py --strict - Run
fallback_chain/until_okrecipes without LLM calls - Execute
answer_from_evidencewith fake chat + stub evidence - Map a failing
Errto verification vs repair actions
Lesson table
| Step | Page | Focus |
|---|---|---|
| 1 | Author a task contract | Layout + registry mental model |
| 2 | Add a ContractSpec sidecar | contract.json + audits |
| 3 | Use operators | fallback_chain, until_ok, try_catch |
| 4 | RAG and evidence | Fake evidence + answer_from_evidence |
| 5 | Verification and repair | Taxonomy + hooks |
| 6 | SharePoint library reads | Canonical sharepoint_* tasks + strategy guide |
Supporting reference
ContractSpec · Schemas · Operators · RAG · Verification · Repair loops
Next track
Tutorial 301 — architecture, gateways, MCP/Cursor, CI, production readiness.