M/N Malek El Najjarproject system

PROJECT / 01 · AGENTIC SOFTWARE ENGINEERING

CodePilot

Give it a task. Get back a verified patch.

I built CodePilot around one rule: the model can propose code, but it cannot declare its own work correct. The runtime owns the repository boundary, mutation policy, validation commands, repair budget, and final verification state.

ROLEArchitecture · runtime · product · testing
STACKTypeScript · Next.js · PostgreSQL · Prisma · Docker
MODELSOpenAI · Anthropic
CODEPILOT / VERIFIED EXECUTION
DEMO / 001 · demo/customer-analytics Add CSV export to customer analytics and cover edge cases. Human-defined task · bounded workspace

Inspect repositoryrepo.listFiles · repo.readFile

READ ONLY

Edit export pathworkspace.writeFile

2 FILES

Validation failedtests · CSV escaping

EXIT 1

Repair patchbounded repair loop

1 / 3

Validation passedtests + typecheck

EXIT 0

Verifiedrevision + config rebound

HASH MATCH
workspaceRevisionHash62c7e3d19a0b…9af1✓ VERIFIED
WHY I BUILT IT

Most coding-agent demos end at “done.”
I cared about what makes “done” trustworthy.

The interesting work in CodePilot is not the chat interface. It is the boundary between untrusted model intent and trusted runtime code: path confinement, optimistic concurrency, validation authority, repair limits, sandbox trust, and evidence persistence.

DEMO / WHAT YOU CAN SEE

DETERMINISTIC PUBLIC FIXTURE · REAL RUNTIME VOCABULARY

The demo is designed to show the failure path, not hide it.

01Start from a concrete repo task.

The fixture begins with a specific change request instead of a generic chat prompt.

02Watch validation fail.

The demo deliberately surfaces a real CSV escaping failure before any repair can happen.

03See a bounded repair.

The agent gets a limited repair attempt, then validation runs again outside model authority.

04End on evidence, not confidence.

Completion only appears after the workspace revision and validation configuration still match.

Run the CodePilot demo
SYSTEM / ARCHITECTURE

TASK → MODEL → POLICY → WORKSPACE → VALIDATION → EVIDENCE

The model proposes.
Runtime code owns authority.

01TaskNatural-language goal
02ModelOpenAI / Anthropic
03Tool gatewaySchema + policy
04Git workspaceConfined writes
05SandboxTrusted validation
06EvidenceRevision-bound completion
ENGINEERING / DECISIONS
01 / AUTHORITY

Validation stays outside model control.

The model can request tests, typecheck, lint, or build, but cannot choose the actual command. Success criteria stay in trusted workspace configuration.

02 / MUTATION

Writes are bounded before touching disk.

Sensitive paths are denied, stale writes fail hash checks, and patch impact is measured before mutation.

03 / REPAIR

Failures do not unlock unlimited retries.

Repair attempts are explicit, capped, and separate from provider-level transient retries.

04 / EVIDENCE

Completion is bound to the exact code validated.

Workspace revision and validation configuration are rechecked before verification evidence and COMPLETED are persisted.

IMPLEMENTATION / SCARS
core.autocrlf

Host Git settings were changing bytes.

Git apply now pins deterministic line-ending behavior so the same patch means the same thing across environments.

git diff <baseline>

Brand-new files were invisible in review.

New files are staged without committing so the final diff is complete and still fully reviewable.

ENGINEERED BY MALEK EL BADAWI EL NAJJAR

Agentic engineering is useful when the runtime can say why it trusts the result.