AI-Native Code Generation
Amarnath Prasad
Founder of Cralo AI Unacademy · JioHotstar · Memfold AI
AI-Native Code Generation
Amarnath Prasad
Founder of Cralo AI Unacademy · JioHotstar · Memfold AI
You hire a brilliant engineer
Now imagine their first day.
No access. No feedback.
No repository access
No CI. No logs. No shell.
No context. No verification.
No docs, JIRA, or Slack history
No way to run the tests
You do the handoff over calls
That’s how most teams use AI agents today.
Prompting isn’t enough. Engineer the system.
The talk, in five beats
- 01What AI-native development actually is
- 02Prompt → context → loop engineering
- 03A live walkthrough of an AI-native product
- 04Large codebases, then software factories
- 05Five principles to take home
AI-native development
The familiar lifecycle
The software development lifecycle
PRD
Architecture
Modules
Tasks
Code
Review
QA
Ship
Monitor
AI-native development
The AI-native lifecycle
Same flow. New execution.
PRD
Agent drafts spec.md.
You correct and approve.
Architecture
Agent suggests an approach. You decide.
Plan once. Build in parallel.
Tasks
Agent writes plan.md.
Build
Agents in git worktrees. One branch per task.
Verify first. Review the PR.
Review
Agents verify first. You review the PR.
Ship
Automated. Agents watch the signals.
What stays human
Humans
Stack. Architecture. Product. Merge. Release.
Agents
Draft. Build. Verify. Iterate until checks pass.
Humans: decisions and gates. Agents: execution.
From prompts to autonomous loops
Prompt
Craft the ask
Context
Give it the knowledge
Loop
Act, verify, learn
Context engineering
Give the agent the right information.
Performance = intelligence × context
Right context, right time — not a dump.
Connect everything
Retrieve just-in-time. Connected ≠ pre-loaded.
Let the agent retrieve it
jira issue view PROJ-123
rg "invoice" packages/billing
Search at runtime. Pull only what the task needs.
MCP: structured tool servers
- 01Register in Cursor / Claude Code
- 02Jira, Slack, docs as typed tools
- 03Schemas the agent discovers
Context Engineering
Keep context in the repo
AGENTS.md
# how this repo works
pnpm test --filter payments
# never
# edit generated files in gen/
# raw SQL — use make db-migrate
# deploy
main → prod · feature/* → preview
Always loaded. Keep it small.
Skills load on demand
AGENTS.md is always on. Skills are not.
- 01Point to the source of truth
Don’t duplicate docs.
- 02Be opinionated about workflows
- 03Security rules stay always-loaded
Keep context in the repo
Small root file. Skills on demand. Package-specific detail.
Loop engineering
Give the agent a way to act, check, and improve.
The whole idea, in one line
while :; do
cat PROMPT.md | claude-code
done
Fresh context each iteration. Progress lives in the repo.
Run until the work is done
Re-read spec
Work one task
Check tasks.md
Exit when fully checked off. Failing checks keep the loop alive.
Close the feedback loop
CI fails
Read logs
Hypothesize
Fix
Re-run
A failed check becomes the next action.
Loop Engineering
Verification
Verification is the exit condition
Test suite + CI
Exit code 0
Playwright
Screenshot → compare → fix
Staging smoke
Real deploy, end to end
The verification pyramid
Loop Engineering
Runtime
Remote Docker container
Isolated. Reproducible. Disposable.
Give the run only what it needs
- 01Scoped tokens from your vault
- 02Only the connectors this task needs
- 03Staging-only deploy credentials
Jira · Slack · GitHub · database
One disposable run
docker run --rm \
-e JIRA_API_TOKEN -e GITHUB_TOKEN \
agent-loop:latest
Inject scoped credentials. Keep secrets out of logs.
Set boundaries before the run
- 01Restrict commands, paths, and network access
- 02Set time, retry, and cost limits
- 03Stop and escalate when progress stalls
- 04Tag agent PRs. Keep human merge approval.
Loop Engineering
Event triggers
Machines initiate. Humans approve.
Event
GitHub · Jira Sentry · Slack
Agent loop
Plan · build · verify
Human at merge
Reviews the PR
Loop Engineering
Make the next loop better
Teach the system, not the session
Ship a task
Capture the lesson
Encode it
Save the lesson in AGENTS.md or a skill.
Turn lessons into checks
- 01eslint-plugin / no-raw-sql
- 02Pre-commit hook
- 03Codemod
- 04CI gate
Repeated mistakes become repeatable checks.
Design loops that prompt your agents
“You shouldn’t be prompting coding agents anymore.” — Peter Steinberger, creator of OpenClaw
A live example
Large-codebase playbook
The same loop needs a repo it can navigate.
Make the repo answer questions
- 01Fast whole-repo search
Grep at this scale is infrastructure.
- 02Make the repo structured
Clear modules. Obvious boundaries.
- 03Rules beside the code
Local AGENTS.md, not a dump.
Navigability is your job. Retrieval is the agent’s.
Keep the codebase maintainable
- 01Characterization tests before refactoring
- 02Human gates on architecture and merge
Agents fail silently on cross-cutting change.
Make “done” mean something
- 01Tests + perf budgets in the definition of done
- 02Target 2–3× faster, safely — not 10× without review
Time to an accepted change — not time to generate code.
Software factories
Extend the loop until the operating process is the product.
Most teams: inline AI + agent mode
- 01Accept / reject every line
- 02Review plans and diffs
- 03A human still sits in every loop
The frontier: triggered, autonomous
PRs involve agents
Uber
With nobody watching
Anthropic
Claude Code and the CLIs
Extend the loop → the factory
Signals → triage
Plan → build
Verify → ship
Monitor → production feedback → back into the queue
Take home
Five principles to carry into Monday.
Don’t assume capabilities
Your agent is ultra capable. Don’t underestimate it.
Give as much autonomy as possible
Don’t sit in every loop.
Guardrailed access to real tools
Logs, CI, shell — in a sandbox.
Connect everything. Retrieve just-in-time.
Right context, right time.
Let the agent test its own work
Run tests. Use the browser. Check it the way a human would.
Five principles to take home
- 01Don’t underestimate the agent
- 02Give it autonomy
- 03Provide guardrailed access to tools
- 04Connect context. Retrieve when needed.
- 05Let it test its own work
Be in the room where it happens
Follow the practitioners and the labs
Questions?
Engineer the system
@amrnth0 amrnth.com