Naresh logo
naresh.dev_
  • Home
  • Projects
  • Certifications
  • Blogs
  • Services
  • Resume
  • Contact
Naresh B A logo

Naresh B A

AI Systems Engineer

Building intelligent software on reliable systems.

Navigation

  • Home
  • Projects
  • Certifications
  • Blogs
  • Services
  • Contact

Quick Links

  • Resume
  • X
  • GitHub
  • LinkedIn
  • Kaggle
  • LeetCode
  • Email

Currently

  • Open to opportunities
  • Chennai, India
  • 1.5+ Years Experience
  • B.Tech IT
World map illustration with Turn ideas into real-world impact message

© 2026 Naresh B A. Built with care.

    Back to Projects
    AI EngineeringSoftware ArchitectureDeveloper Experience

    ContractGraph

    GITHUB-ONLY

    A contract-driven workflow framework for Claude Code that compiles structured inputs into verifiable task graphs, scoped subagents and targeted repair workflows.

    2026
    Creator and Developer
    Independent open-source work
    Agent Workflow Framework
    View Case StudyGitHub
    Screenshot 1
    Screenshot 1

    Executive Summary

    Project Overview

    ContractGraph is an open-source workflow-engineering framework built around the idea that an AI-generated deliverable should have an explicit contract. It organizes multi-step work into a dependency graph of bounded tasks, where every node has a defined responsibility, an expected output structure, and a clear relationship to the rest of the workflow. The framework separates the preparation of a workflow from its execution. A compilation stage processes canonical context, JSON Schema contracts and policies into a graph, context packets, and skill and agent manifests. Claude Code acts as the reasoning and execution host, while small Python utilities handle deterministic work such as validation, hashing, reference checks and aggregation. During execution, node results pass through verification stages before being accepted. Failures can be routed back to the relevant node for targeted repair instead of automatically restarting an entire workflow. The repository also contains synthetic examples and offline evaluations for the deterministic mechanics of the framework.

    Project Objectives

    • Specify machine-checkable contracts for multi-step agent outputs.
    • Compile declared dependencies into a bounded, inspectable workflow DAG.
    • Give each agent only its node-relevant context and output responsibilities.
    • Independently verify node artifacts before they become accepted inputs downstream.

    The Problem

    Long agent conversations can make multi-step work difficult to inspect: a plausible section may violate an expected structure, supporting evidence may be missing, and one bad output may cause unnecessary regeneration of otherwise acceptable work. A reusable workflow needs enforceable artifact contracts and scoped task boundaries without embedding each new use case into orchestration code.

    Approach & Solution

    Use JSON Schema-based contracts to define deliverables and node requirements, then compile their dependencies into an auditable DAG. Construct minimal per-node context packets and generate agent/skill manifests for execution within Claude Code. Run independent structural, semantic and evidence-oriented checks; return path-specific feedback when a node needs repair. Use deterministic Python tooling for graph integrity, hashing, aggregation and finalization while keeping domain-specific workflows in separate contract bundles.

    Outcomes

    Built a reusable contract-to-DAG workflow with scoped agent artifacts, deterministic offline validation, targeted repair, traceable run outputs and CI checks for framework integrity.

    Target Personas

    Developers using Claude Code for complex tasks
    Active PersonaCore User

    Developers using Claude Code for complex tasks

    Leona builds complex, multi-step AI agent workflows but struggles with unpredictable execution, hidden failures, and difficult debugging. She needs contract-driven workflows with clear validation, traceability, and reliable recovery.

    System Architecture

    Contract Compilation, Scoped Execution and Verification
    Click to View Full Blueprint

    Architecture Blueprint

    Contract Compilation, Scoped Execution and Verification

    Contract Compilation, Scoped Execution and Verification

    Canonical context, node JSON Schemas and policies enter a compile-time initialization stage. The compiler assembles a checked DAG, manifests and scoped packets for Claude Code subagents. At execution time, each node produces its artifact, undergoes deterministic and independent checks, and may be selectively repaired. Finalization aggregates accepted sections and verifies completion under the top-level contract. Python implements non-agentic validation utilities; Claude Code owns reasoning and dispatch.

    Contract and Context Inputs
    Canonical context, per-node output schemas, declared dependencies and policies define the workflow.
    Compile-Time Initialization
    Generate graph, node packets, skill/agent manifests and a compilation report.
    Execution and Node Production
    Claude Code dispatches agents with scoped contracts and context, respecting dependency acceptance.
    Validation and Repair
    Deterministic checks and independent verification route rejected nodes to targeted repair.
    Finalization and Trace
    Accepted node outputs are aggregated, globally checked and recorded with a run verdict.

    Technologies & Stack

    PythonPython
    JSON Schema
    JSON
    YAML
    Claude Code
    GitHub ActionsGitHub Actions

    Engineering Deep Dive

    Production architecture, telemetry evidence, quality verification, and governance.

    Testing Strategy & Quality Assurance

    Comprehensive automated test suite with unit, integration, and end-to-end regression prevention.

    Verified

    The repository includes an offline deterministic evaluation runner, explicit public-bundle validators and GitHub Actions jobs for Python 3.11/3.12 on Ubuntu and Windows. Its README reports passing cases for integrity scenarios; those reported counts are not represented here as independently rerun execution metrics.

    Performance, Benchmarks & Latency

    Latency profiling, concurrency stress bounds, and optimization under peak traffic.

    Verified
    Latency (P99)
    <350ms
    Benchmark / SLO
    Top 600
    Accuracy Score
    1.5

    Observability & Metrics

    Full-stack observability with OpenTelemetry, Prometheus exporters, and incident telemetry.

    Verified
    Throughput
    24.8K
    +18%
    Error Rate
    0.12%
    -42%

    Deployment & Infrastructure

    Containerized workloads, cloud resource isolation, and automated GitOps release stages.

    Verified

    Used by cloning the GitHub repository inside a Claude Code workflow. Commands and agent definitions live in repository files; there is no hosted API, persistent database service, npm package or standalone Python agent server.

    Security, Auth & Data Governance

    Least-privilege authorization, token lifecycle governance, and auditable event logging.

    Verified

    The context model distinguishes canonical, derived, private and synthetic material. Repository hygiene checks are configured to exclude private context and run artifacts from source control. These are workflow- and path-level controls rather than a claim of operating-system sandbox isolation.

    >_

    Build better. Reuse smarter.

    A collection of reusable blocks that accelerate development.

    Project AI Explorer

    Grounded • contractgraph

    Interactive system architecture, trade-offs & production metrics assistant

    Explore ContractGraph with AI

    Select a technical question below or ask anything about this project's codebase, database models, or performance bottlenecks.