Urjasoft - Software, AI & SaaS Engineering Urjasoft - Software, AI & SaaS Engineering
Prototype ID: LAB-01 Category: Autonomous Agents & LLMs

Autonomous Multi-Agent Code Verification Pipeline

Prototype exploring AST static analysis and LLM-assisted test generation.

An experimental architecture evaluating whether combining AST parsing with LLM reasoning can synthesize deterministic regression suites without manual authoring.

The Architectural Problem

Legacy enterprise software architectures often suffer from insufficient unit test coverage, making refactoring, dependency upgrades, or framework modernization high-risk and labor-intensive.

Working Hypothesis

Coupling deterministic AST-based boundary detection with LLM reasoning agents can synthesize executable, deterministic PHPUnit assertions without hallucinated APIs.

System Topology

Prototype Architecture & Data Pipeline

Multi-stage execution model separating probabilistic reasoning from deterministic state mutations.

1

01. AST Analysis

nikic/PHP-Parser parses source files into Abstract Syntax Trees, mapping methods, parameters, and branch conditions.

Static Analysis
2

02. Context Prompting

Structured AST context formats method contracts and parameter boundaries for model reasoning.

Prompt Modeling
3

03. Code Synthesis

Candidate PHPUnit test cases are generated following strict project typing and assertion rules.

Test Generation
4

04. Verification Loop

Generated test classes are executed in an isolated runner to filter syntax and assertion failures.

Execution Harness
Data Boundary Rule: No non-deterministic agent loop is permitted to execute writes directly to transactional databases without an intermediate policy gatekeeper.
Implementation Methodology

How We Engineered the Prototype

1. AST Traversal: nikic/PHP-Parser analyzes source code into Abstract Syntax Trees, mapping methods, parameters, and branch conditions.
2. Agent Prompting: An LLM prompt formats extracted execution paths and establishes input-output boundary assertions.
3. Code Synthesis: Test generator synthesizes candidate PHPUnit test classes adhering to strict project typing conventions.
4. Sandboxed Verification: Candidate tests run in an isolated test environment to evaluate assertion validity.
Current Working Capabilities
  • ✓ [Implemented] Automated AST traversal and public method boundary extraction (nikic/PHP-Parser)
  • ✓ [Implemented] LLM prompt formatting targeting typed PHPUnit 11 test conventions
  • ✓ [Planned] Sandboxed automated test execution and regression pruning harness
Known Limitations & Unsolved Cases
  • × Cannot infer business logic requiring multi-service database state or external API mocks
  • × Requires developer review before committing synthesized test suites to source control
Engineering Takeaways & Architectural Findings

“Observed Finding: In initial test runs, unconstrained LLMs generated plausible-looking assertions against non-existent method signatures. Supplying structured AST nodes directly eliminated method hallucination, though semantic assertions still require manual developer verification.”

Experiment Parameters
Maturity Status
Prototype
Research Discipline
Autonomous Agents & LLMs
Experiment Identifier
LAB-01
Repository / Artifact
Inspect Codebase ↗
Tested Technologies
PHP 8.4 nikic/PHP-Parser PHPUnit Python OpenAI API
Related Commercial Capability
Enterprise Software Development

Findings from this research area inform our engineering capabilities in enterprise software development.

Explore Related Capability →
Need a custom proof of concept built for your company?
Request Technical Consultation
Additional Explorations

Related Lab Experiments

View All Initiatives →
Engineering Collaboration

Translating research into production software.

Our engineering team can evaluate your technical roadmap, suggest architecture patterns, and partner with you on high-assurance system execution.