The audited source is Bhaskar-Kurasala/deep-research-multi-agent-system at
commit bc20020110a45874fd1ab7dfd62d831a605fcb9e (main). The remote contains one
large commit, ARIA — governed multi-agent research platform.
Before AgentFoundry was initialized, two complete independent Git backups were created:
/tmp/agentfoundry-aria-original.git— mirror clone containing all refs./tmp/aria-original.bundle— verified bundle; Git reported complete history.
A separate working source snapshot exists at
/tmp/agentfoundry-aria-source. These temporary paths are deliberately outside
the new repository so future-stage code cannot leak into early commits.
The source SHA is recorded in ARIA_ORIGINAL_HEAD.txt. A durable remote copy
continues to exist at the original GitHub repository; the temporary backups are
reconstruction working artifacts, not committed binaries.
The audit enumerated README.md, pyproject.toml, all 630 repository files,
the aria, tests, specs, docs, chaos, gateway, observability,
charts, scripts, and .github trees, and searched implementations and tests
for the mechanisms named in the reconstruction brief.
Observed source facts:
- 337 Python files, including 19718 lines under
aria/. - 150
test_*.pymodules with approximately 820 test functions. - 55 ADRs and phase-oriented EARS/spec/plan/notes/break-script sets.
- A single Git commit contains the full platform.
- The default dependency set is heavy and couples baseline execution to LangGraph, PostgreSQL, Redis, MinIO, LiteLLM, Cedar, and telemetry packages.
- Several tests are deliberately live or infrastructure-backed; gVisor and provider tests use explicit markers and documented skips instead of false success.
The full source test run was split during audit because the monolithic default suite starts infrastructure-sensitive integration paths and does not complete inside a bounded hermetic window. Contract and selected hermetic suites were run independently; final results are recorded in the reconstruction completion report. AgentFoundry therefore does not treat test presence as proof of a locally executable control.
| Classification | Existing area | Current responsibility and evidence | AgentFoundry target |
|---|---|---|---|
| KEEP | docs/adr/**, failure scripts |
Strong decisions, explicit failure surfaces, honest local/cloud boundary | Curated ADRs and lab scenario provenance |
| KEEP | contracts/subagents.py |
Typed SubAgentSpec; contract and fan-out tests |
multiagent contract |
| KEEP | policy/cedar_pdp.py, pip.py, pap.py, risk.py, compliance/pep.py |
Four-valued, fail-closed Cedar path with real-engine integration tests | Policy seam plus optional Cedar adapter |
| KEEP | memory/signing.py, trust.py, promote.py |
Ed25519 canonical signing, read verification, trust-gated promotion tests | Governed memory lab |
| KEEP | graph/checkpointer.py, ambient/run_store.py, worker.py |
PostgreSQL checkpoint/resume and durable run lifecycle | Durability adapters after in-memory model |
| KEEP | ambient/sandbox_gvisor.py |
Rootless gVisor seam with explicit availability behavior | Optional sandbox provider |
| KEEP | cost/** |
Reserve/commit/release budget mechanics and fail-closed tests | Hierarchical FinOps admission |
| KEEP | eval/**, flywheel/eval/** |
Deterministic dimensions, judge seam, replay/shadow/drift, promotion gates | Evaluation and learning labs |
| EXTRACT | ambient/research_graph.py, nodes.py |
Native LangGraph Send, bounded fan-out, disjoint step ranges |
Minimal specialist topology after T0/T1 |
| EXTRACT | ambient/approval_queue.py, harness/hitl_gate.py |
Durable approval lifecycle and resume | Exact-action approval contract |
| EXTRACT | ambient/admission.py, stream.py, dlq_admin.py |
Redis stream admission, reclaim, dead-letter behavior | Async job lab behind queue protocol |
| EXTRACT | llm/client.py, gateway/litellm-config.yaml |
Provider seam, tier routing and fallback | Observable model gateway adapter |
| EXTRACT | telemetry/otel.py, observability/** |
OTel spans and local collector/Langfuse stack | Trace model plus optional OTel exporter |
| EXTRACT | db/migrations/**, db/rls.py |
Tenant-scoped schema and PostgreSQL RLS checks | Tenancy adapter and isolation integration test |
| REFACTOR | runtime/server.py, gateway/app.py, control_plane/app.py |
Multiple large FastAPI entry points own unrelated concerns | Thin API over job/runtime services |
| REFACTOR | ambient/gateway.py, wiring.py |
Broad service wiring combines policy, budget, memory, sandbox and tools | Explicit composition root built after contracts |
| REFACTOR | contracts/** |
Useful types but ARIA phase coupling and broad Pydantic dependency | Small capability-owned contracts |
| REFACTOR | stores/cache_store.py |
Generic cache behavior lacks a complete tenant/policy/version key model | Safe cache key contract and adversarial tests |
| REFACTOR | harness/idempotency.py, runtime/write_thread.py |
Dedupe exists, but ambiguous provider outcomes are not a first-class state machine | Effect ledger with UNKNOWN reconciliation |
| REFACTOR | ambient/versioning.py, migration.py |
Run version pin/upcast behavior exists but authority version rules are implicit | Per-component PIN/MIGRATE/LATEST policy |
| RETIRE | phase-number branding and activation toggles | Encodes build chronology instead of reusable mechanisms | Capability-oriented labs and scenarios |
| RETIRE | generated caches, local outputs, binary artifacts | No architectural value | Ignored |
| RETIRE | mega-platform startup as the default learning path | Requires the entire stack before one mechanism can be studied | Dependency-light, independently runnable labs |
| RETIRE | unsupported hosted-cloud implications | Local emulation cannot prove hosted WORM, IAM or regional failover guarantees | Explicit limitation statements |
| Capability | Existing implementation / dependencies | Existing contracts, tests and invariant | Disposition / target commit |
|---|---|---|---|
| Minimal model call | llm/client.py; LiteLLM/httpx |
client contract/live tests; no clean T0 | Build dependency-free fake/direct seam; C02 |
| Typed tools and MCP | ambient/tools.py, mcp/server.py; MCP/FastAPI |
malformed/egress/capability tests | Extract registry, validation, timeout; optional MCP adapter; C03 |
| Planning | embedded in research graph/nodes | loop and budget guards exist; no standalone planner | Build bounded versioned planner; C04 |
| Retrieval/evidence | findings/vector/object stores | provenance appears across store tests; no isolated lexical baseline | Build immutable evidence and retrieval benchmark; C05 |
| Context engineering | summarizer and vFS | preservation/re-read tests; policies not compared in isolation | Build explicit strategies and metrics; C06 |
| Governed memory | memory/**; pgvector/crypto/LiteLLM |
signing, store, promotion, poisoning tests | Adapt contracts and canonical signing; C07 |
| Async jobs | ambient lifecycle/stream/worker; Redis | admission, reclaim, cancel, DLQ tests | Queue protocol plus deterministic in-memory implementation; C08 |
| Checkpoints | LangGraph Postgres saver, run store | durable/crash/resume tests | Checkpoint seam then Postgres adapter; C09 |
| Leases/fencing | stream reclaim contains ownership concepts | zombie reclaim tests; no explicit fencing-token model | Add first-class monotonic fence; C10 |
| Transactional progress | durable stores and Redis flow | several atomicity claims, no isolated outbox lab | Build state/outbox atomic store; C11 |
| Effects/idempotency | idempotency store/write thread | dedupe tests | Build fingerprinted action ledger; C12 |
| UNKNOWN reconciliation | not a first-class contract | gap | Add provider lookup reconciler, never blind retry; C13 |
| Policy | Cedar PDP/PIP/PAP/PEP; CedarPy | strong fail-closed and real-Cedar tests | Extract protocol and deterministic baseline, optional Cedar; C14 |
| Human authority | HITL gate and approval queue | pause/resume/reaper tests | Bind approval to action hash, version and expiry; C15 |
| Sandbox | subprocess and gVisor providers | seam, egress, resource and real-gVisor tests | Preserve explicit skip/unavailable behavior; C16 |
| Governed single agent | distributed across wiring/runtime | no isolated comparable production T0 | Compose established seams and capture benchmark; C17 |
| Independent verifier | judge/eval mechanisms | judge and safety tests; not information-isolated producer flow | Add typed artifact/verifier interface; C18 |
| Parallel subagents | SubAgentSpec, native Send, research graph |
fan-out/e2e/disjoint id tests | Adapt bounded native topology; C19 |
| Topology experiments | multiagent eval/profile | many dimensions and trajectory tests | Build T0/T1/T2 comparable runner; C20 |
| Shared workspace | findings, todos, VFS | per-store tests; no unified typed concurrency model | Add optimistic typed workspace; C21 |
| Pattern lab | supervisor is embedded; Deep Agents adapter optional | adapter and graph tests | Add interchangeable bounded patterns; C22 |
| Cache lab | cache store | cache tests do not cover complete authority/version key | Build safe keys, revocation and stampede tests; C23 |
| Model routing | LiteLLM client/config | fallback/live tests | Add routing manifest and cost attribution; C24 |
| Budget admission | cost/**, Redis |
strong reserve/commit/reconcile tests | Adapt hierarchical fail-closed reservations; C25 |
| Multi-tenancy | PostgreSQL RLS migrations | real isolation tests | Add storage contract and RLS adapter; C26 |
| Evaluation | eval/** |
broad deterministic/live suites | Extract manifest, component/trajectory/outcome metrics; C27 |
| Observability | OTel/Langfuse config | span contract and coherence tests | Add in-memory reconstructable trace first; C28 |
| Reliability | retries/DLQ, resilience stores | retry, backup/restore tests | Add bounded retry/breaker/bulkhead/degraded-result lab; C29 |
| Adversarial security | redteam/middleware/policy/memory tests | broad but dispersed | Compose explicit fail-closed attack suite; C30 |
| Compliance | compliance/**; MinIO/crypto/Postgres |
audit, erasure, evidence and e2e tests | Adapt hash chain, erasure and evidence pack; C31 |
| Learning | feedback/flywheel/LoRA | stubbed default plus optional GPU path; honest blocked result | Compare proposal kinds under eval gate; C32 |
| Release | replay/shadow/drift/model lifecycle | gate and shadow tests | Add replay/shadow/canary/rollback controller; C33 |
| Version compatibility | ambient version/migration/eval baseline | pin/migrate/resume tests | Add PIN/MIGRATE/LATEST per component and current-policy rule; C34 |
| Chaos | chaos_router.py, break scripts |
scenarios exist, report is not a portable core artifact | Deterministic injector and generated report; C35 |
| ARIA reference app | entire current composition | rich e2e tests but tight coupling | Recompose without duplicating core; C36 |
| Portfolio guide | README/specs/RA | detailed but platform-first | Publish capability matrix, labs, limits and history guide; C37 |
No ARIA implementation file is copied into C01. The original commit, verified bundle, mirror, and source snapshot preserve every byte. The only unchanged value brought into the new tree is the original HEAD SHA. This prevents future capabilities from appearing in early commits while retaining exact recovery.
- The original has no standalone planning, retrieval, context, verifier, outbox, fencing-token, or UNKNOWN-effect laboratory.
- The default suite mixes hermetic and infrastructure-dependent tests; test counts alone overstate what a clean machine proves.
- Redis/PostgreSQL/MinIO/gVisor/LiteLLM implementations require explicit local services. AgentFoundry must never convert absence into a green control test.
- The new package namespace changes from
ariatoagentfoundry; blind file copying would retain hidden coupling. - A 37-capability history can become performative. Closely dependent mechanisms may be combined only when the commit remains independently reviewable and the reconstruction plan is updated.
- GitHub repository creation and push depend on authenticated
gh/Git credentials and an available repository name.
git clone --mirror https://github.com/Bhaskar-Kurasala/deep-research-multi-agent-system.git /tmp/agentfoundry-aria-original.git
git --git-dir=/tmp/agentfoundry-aria-original.git bundle create /tmp/aria-original.bundle --all
git -C /tmp/agentfoundry-aria-original.git bundle verify /tmp/aria-original.bundle
git clone /tmp/agentfoundry-aria-original.git /tmp/agentfoundry-aria-sourceAgentFoundry itself starts in the user-specified empty destination. No original
.git directory is removed.