USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAI Agent Book
HomeAI Agent BookClaude Agent SDK
PreviousHost and Securely Deploy Claude AgentsNextDesign a Provider-Neutral AI Harness Contract
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

11 sections

Progress0%
1 / 11

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Capstone: Build a Claude Repository Maintenance Agent

This capstone builds a Claude repository-maintenance agent that inspects an isolated checkout, proposes a plan, edits only approved paths, runs allowlisted verification, asks a read-only reviewer subagent for evidence, and returns a structured report. The workflow never pushes, merges, deploys, or reaches production systems; humans retain those release decisions.

What will you be able to do?

You will assemble the Claude-specific runtime controls into a verifiable job and demonstrate that it cannot escape its workspace or exceed its authority.

What is the architecture?

Rendering diagram...

Use separate phases so a planning agent cannot silently gain edit authority.

Which capabilities should each phase have?

PhaseToolsOutput
InspectRead, Glob, Grepevidence and candidate files
Planread-only + structured outputproposed changes and tests
EditRead, Edit, constrained toolsworkspace patch
Verifynarrow test/lint commandscommand, exit code, summary
Reviewread-only subagentfindings with file/line evidence
Publish artifacthost code, not agent shellpatch/report stored durably

How should you implement it?

  1. Create a disposable checkout at an exact commit.
  2. Scan for forbidden paths and secrets before agent start.
  3. Run a read-only planning query with a strict budget.
  4. Validate plan schema and policy.
  5. Start an edit-enabled isolated run using only approved paths/tools.
  6. Execute tests through a wrapper that accepts a named test target, not shell text.
  7. Delegate read-only review with a bounded subagent.
  8. Produce a structured result: changed files, test evidence, findings, usage, and trace/session IDs.
  9. Destroy the workspace after artifact export.

How do you verify it?

  • Editing a forbidden path is blocked by hook and filesystem permission.
  • Network egress to an unapproved host fails.
  • A malicious repository instruction cannot enable Bash or a plugin.
  • Test timeout kills child processes.
  • Subagent cannot edit.
  • Max turns/budget produce an explicit incomplete outcome.
  • No secret appears in result, logs, or telemetry.
  • The original repository and remote remain unchanged.

Production checkpoint: A human should be able to answer: which commit entered, which files were readable/writable, which commands ran, what changed, which tests passed, what the reviewer found, and why the job stopped.

How does it fail safely?

Seed path traversal, a symlink to a forbidden file, a hanging test, an injected CLAUDE.md, a flaky test, and a fake credential. Each must yield a classified, auditable outcome without escape or secret exposure.

What mistakes should you avoid?

  • Letting the agent push a branch as part of the first capstone.
  • Passing raw user text into a shell wrapper.
  • Loading unreviewed repository plugins/skills automatically.
  • Treating “tests passed” prose as evidence instead of exit records.
  • Reusing writable workspaces across tenants.

Check your understanding

  1. Why separate plan and edit phases?
  2. Which verification should be host-controlled?
  3. What makes the final report auditable?

Expert extension

Run the capstone against a seeded benchmark of ten repository faults. Score fix correctness, unnecessary edits, sandbox violations, test evidence, review precision, latency, and cost.

Official references

  • Claude Agent SDK overview
  • Claude Agent SDK permissions
  • Securely deploying Claude agents