Codebase Capabilities Report

A non-technical breakdown of the functions and capabilities of key files in the repository.

Module: core/vertical_risk_agent/agents

File: core/vertical_risk_agent/agents/market.py

No general description available.

Component: MarketAgent

Specialized in web search and competitor analysis.

- Action: research_market: Performs market research.

File: core/vertical_risk_agent/agents/analyst.py

No general description available.

Component: QuantAgent

Specialized in extracting tabular data, running calculations, and analyzing Excel models.

- Action: analyze_financials: Extracts financial data and calculates ratios.

File: core/vertical_risk_agent/agents/compliance.py

No general description available.

Component: ComplianceAuditorAgent

Verifies KYC/AML and Basel III capital constraints per the presentation (Slide 5).

- Action: run_compliance_audit: Executes policy checks across constraints.

File: core/vertical_risk_agent/agents/legal.py

No general description available.

Component: LegalAgent

Specialized in RAG over long-context legal documents (Credit Agreements, Indentures).

- Action: analyze_covenants: Extracts covenant definitions and logic.

File: core/vertical_risk_agent/agents/supervisor.py

No general description available.

Component: StateGraph

A specialized component.

- Action: add_node: Performs a specific task.
- Action: add_edge: Performs a specific task.
- Action: add_conditional_edges: Performs a specific task.
- Action: compile: Performs a specific task.
- Action: set_entry_point: Performs a specific task.
Component: CompiledGraphMock

A specialized component.

- Action: invoke: Performs a specific task.
Component: MemorySaver

A specialized component.

File: core/vertical_risk_agent/agents/document_extraction.py

No general description available.

Component: DocumentExtractionAgent

Pulls structured metrics from 10-K/10-Q filings, strictly enforcing Pydantic schemas.

- Action: extract_metrics: Extracts document metrics into a Pydantic structure.

Module: src/pdil

File: src/pdil/flows.py

No general description available.

Component: ExecutionFlow

Overlapping execution pipelines for redundant verifications.

- Action: execute: Performs a specific task.

File: src/pdil/storage.py

No general description available.

Component: DriftStorageBackend

Storage backend for keeping historical drift data.

- Action: save_drift: Performs a specific task.

File: src/pdil/fallbacks.py

No general description available.

Component: CircuitBreaker

Redundant fallback to prevent cascading failures in deterministic systems.

- Action: record_failure: Performs a specific task.
- Action: reset: Performs a specific task.
Component: IndependentGatekeeperCheck

Maintains the entire gatekeeper as a redundant, fallback modular independent check. If primary systems fail or require an additive verification layer, this executes the full governance check.

- Action: perform_redundant_check: Executes an independent validation pass as a complementary check. Returns True if valid, False if it violates governance (does not raise).

File: src/pdil/optimization.py

No general description available.

Component: TokenOptimizer

Manages compute and token optimization for LLM interactions.

- Action: optimize_context: Truncates or summarizes context to fit within token limits.
- Action: record_usage: Tracks cost and compute utilization per model.

File: src/pdil/middleware.py

No general description available.

Component: NoRedirectHandler

A specialized component.

- Action: redirect_request: Performs a specific task.
Component: NoRedirectHandler

A specialized component.

- Action: redirect_request: Performs a specific task.
Component: GovernanceError

Raised when an inference fails governance validation.

Component: JsonLogicGovernanceGatekeeper

A specialized component.

- Action: validate_inference: Validates LLM probabilistic inferences using jsonLogic.
- Action: entry_gate: Performs a specific task.
- Action: exit_gate: Performs a specific task.
Component: SecurityGovernanceGatekeeper

A specialized component.

- Action: validate_inference: Validates LLM probabilistic inferences natively using jsonschema.
- Action: entry_gate: Performs a specific task.
- Action: exit_gate: Performs a specific task.
Component: DriftIntelligenceLayer

A specialized component.

- Action: detect_and_heal_drift: Performs a specific task.
- Action: heal_drift: Performs a specific task.
Component: ProofOfThoughtLogger

A specialized component.

- Action: log_payload: Performs a specific task.
Component: MilestoneLogger

A specialized component.

- Action: add_milestone: Performs a specific task.
- Action: get_most_efficient_process: Performs a specific task.

File: src/pdil/lifecycle.py

No general description available.

Component: ModelLifecycleManager

Manages model and software lifecycle states.

- Action: register_model: Registers a model version in the lifecycle.
- Action: check_lifecycle: Checks if a model is nearing deprecation or obsolete.

File: src/pdil/primitives.py

No general description available.

Component: Primitive

Base class for all PDIL primitives.

Component: DataPrimitive

Primitive for handling data inputs.

File: src/pdil/models.py

No general description available.

Component: ProvenanceHeader

W3C PROV-O compliant metadata header for probabilistic inferences. This ensures that AI context windows can discern *why* a decision was made by tracing data back to its source.

File: src/pdil/system.py

No general description available.

Component: SystemStateManager

Manages meta-state, layer state, and context across the PDIL architecture.

- Action: update_layer_state: Updates the state context of a specific architectural layer.
- Action: get_context: Retrieves combined context for a layer.