Codex for efficient development
Repository design, durable tasks, visual proof and steering from anywhere.
Two repository shapes. Three practical demonstrations. One operating method.
Session shape
Fifteen slides and three practical demonstrations.
- A small Deno and Fresh website pattern
- An anonymized Nx and pnpm monorepo pattern
- Mobile preview and steering
Code is a step, not the system.
Implementation became faster. Architecture, visual quality, verification and release confidence did not solve themselves.
What moves after coding gets cheaper?
- Ambiguity becomes more expensive.
- Test and review capacity become constraints.
- Preview infrastructure becomes normal development infrastructure.
- Architecture rules need mechanical enforcement.
- Visual inspection remains a browser and human problem.
Research first. Framework later.
Start with the product behavior and the target device.
Data, authorization, integrations and background processing.
Rendering, deployed behavior, databases and external services.
Runtime, framework, database, identity and deployment topology.
Agent familiarity is one input
Useful signals include clear official documentation, strong conventions, deterministic generators, typed interfaces, fast tests, inspectable configuration and preview support.
Recommendation frequency may reflect training frequency. Product fit and maintainability still decide.
One method. Two repository shapes.
Same operating discipline
- Source-of-truth documents live with the work.
- Agents receive durable repository constraints.
- Repeated work becomes a skill.
- Meaningful changes receive automated and rendered checks.
- Production remains an explicit boundary.
Small product, small repository.
routes/Pages and API endpointscomponents/Server-rendered UIislands/Interactive browser leavescontent/Markdown articlesstatic/Public assetsimport { App, staticFiles, trailingSlashes } from "fresh"; export const app = new App() .use(staticFiles()) .use(trailingSlashes("never")) .fsRoutes();
import MobileMenu from "./MobileMenu.tsx"; export default function Header() { return <header>...<MobileMenu /></header>; }
Why this repository stays small
The runtime already supplies the essential development tools, there is one primary deployable, and browser JavaScript is limited to the components that need it.
When the graph becomes architecture.
Applications compose and deploy
web appFramework entrypoints and compositionAPI serviceHTTP startup and dependenciesbackground workerBackground processing runtimebrowser testsPlaywright acceptancePackages own testable behavior
feature and UIComponents, feature logic and data accessAPI and domainRoutes, use cases and domain logicshared coreContracts, configuration and shared rulesadaptersDatabase, storage and external servicesIllustrative project graph
web application API service background worker browser tests feature packages shared contracts UI and configuration infrastructure adapters
The names are illustrative. The architectural point is that applications compose behavior while packages own testable responsibilities.
Nx is useful when it pays rent.
What the agent can query
pnpm nx show projects --json pnpm nx show project <project> --json pnpm nx affected -t lint,typecheck,test,build pnpm nx graph
Resolved metadata is safer than guessing commands from folder names.
The repository is the prompt you keep.
Rules and boundaries
Commands, architecture, safety and what the agent must not silently change.
Nearest app or package guidance
Reusable workflows
Focused instructions, references and scripts for recurring work.
Migrations
Deployment review
Content production
Project truth
Architecture, design, framework, product and business material.
Constitution
Official docs
Marketing guide
Representative skills
- Architecture governance
- Project generation
- Database migration workflow
- Deployment review
- Design governance
- Test harness review
- CI monitoring
A long feature needs three artifacts.
spec.mdWhat must be true?
Users, scenarios, requirements, measurable outcomes and exclusions.
plan.mdHow will this repository deliver it?
Verified technology, ownership, interfaces, paths and validation.
Orchestration -> feature package
tasks.mdWhat happens next?
Stable IDs, exact paths, observable completion and executable checks.
ExecPlan.mdGeneralized specification example
Acceptance: a user can export an approved report and print it without clipping.
Placement: aggregation stays in the data layer, browser queries stay in data access, and presentation stays in UI.
New corrective tasks can be appended without renumbering completed work.
Small tasks keep long work steerable.
[x] T014 [US2]
Align the report with the application shell.
Add an exact edge-alignment assertion.
Then pass:
UI checks
web build
visual E2E
architecture checks
diff checksStable IDs survive multiple sessions, context compaction, handoffs and recovery.
Reusable validation pattern
pnpm nx show project <project> --json pnpm nx run <project>:test pnpm nx affected -t lint,typecheck,test,build git diff --check
Safe demonstration rule
Use sanitized repository state. Never display secrets, environment values, private URLs, customer data or internal credentials.
Every repository gets a tested UI system.
shared UI
Build the foundation
Tokens, typography and reusable components belong to one project-owned layer.
/design-manual
Render the states that matter
The dedicated page grows whenever feature work produces a component worth keeping.
Playwright
Catch visual drift early
Fast E2E checks cover the page, responsive layout and screenshots of interactive states.
Generic Playwright example
await page.goto('/design-manual');
await page.evaluate(() => document.fonts.ready);
await expect(dialog).toHaveScreenshot(
'dialog-open.png',
{ animations: 'disabled', caret: 'hide' },
);
The suite can check manual sections and horizontal overflow before taking state-level screenshots.
Green code is not a finished product.
Tests prove known behavior. They do not prove that the rendered product looks right.
Defects that survive green tests
- Production-shaped labels wrap where fixtures did not.
- Phone navigation works but hides the primary action.
- Print output contains everything but has poor page breaks.
- Cached CSS makes a fixed implementation appear broken.
- A chart is accessible but visually too dense to interpret.
Use the cheapest preview that answers the question.
Local tunnel
Does this task look right?
- Seconds to inspect
- HMR and rapid steering
- Current worktree
- Applications, decks and documents
Pull request preview
Does the deployed feature work correctly?
- Production-like build
- Stable review checkpoint
- Environment integration
- Preview database and authentication
Operational details
- The development machine, tunnel connector and local server must be running.
- Allowed hosts, HMR, CORS, callbacks, cookies and caching must match the public hostname.
- Use PR previews when deployed behavior, isolated data or a stable URL matters.
Your phone is for steering, not coding.
Application UI, HTML presentations, PDFs, documents, reports and dashboards.
A useful steering message is observable
The report overflows on a 390 px phone viewport. Keep the information hierarchy. Stack the content and shorten only the example text. Recheck the same preview after the change.
This identifies the surface, viewport, invariant, allowed simplification and verification path.
Six rules to take home.
Choose technology from the problem.
Use the smallest honest repository shape.
Encode durable constraints in AGENTS.md.
Turn repeated work into skills.
Break large features into verifiable tasks.
Combine checks, browser inspection and human review.
The agent can write the implementation. Your leverage comes from keeping the work understandable, verifiable and steerable.
Dataworkers articles
- Fast Code, Slow Delivery
- AI Coding Did Not Fix Slow Delivery. It Exposed It.
- AI-Native Delivery Is a Team Sport
- From formula to production in a few hours: what a tiny mortgage app taught me about AI-assisted delivery
- The Interviewer Problem: Why Better Questions Get Better Answers from People, Experts, and AI