1.3 KiB
1.3 KiB
AGENTS.md
Architecture
This repository contains a Python SDK for FedCatOpt.
Core modules:
models.py- Typed DSL primitives for
LocalProblem,SharedVariables,PlanDelta,DualVariables,PrivacyBudget,AuditLog, andPolicyBlock. solver.py- Deterministic ADMM-lite consensus solver with delta generation and optional privacy budget consumption.
registry.py- Graph-of-Contracts registry for contract nodes and deterministic topology queries.
adapters.py- Starter adapters for
rover_planneranddrone_controllerinto the canonical IR. identity.py- Governance ledger and short-lived certificate skeleton.
sdk.py- Thin orchestration façade tying the registry, solver, audit log, and policy checks together.
Tech Stack
- Python 3.11+
pydanticfor runtime validation of DSL modelsnumpydeclared for numerical extensibilitypytestfor testspython -m buildfor packaging verification
Rules
- Keep contract ordering deterministic.
- Prefer minimal, explicit changes.
- Do not add new dependencies unless the code uses them directly.
- Preserve the canonical IR and DSL model names.
- Do not overwrite user changes elsewhere in the worktree.
Testing
Run:
bash test.sh
That script installs the package in editable mode, runs pytest, and then runs python3 -m build.