idea177-fedcatopt-federated.../AGENTS.md

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, and PolicyBlock.
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_planner and drone_controller into 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+
  • pydantic for runtime validation of DSL models
  • numpy declared for numerical extensibility
  • pytest for tests
  • python -m build for 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.