04 / 10Builder18 min lesson + 60 min lab

Read the Project Editor

Understand files, commands, processes, logs, and previews well enough to inspect an app before asking Agent to fix it.

By the end

A working map of the generated codebase, the ability to start and inspect the app, and a repeatable evidence-first debugging routine.

01

Files are organized responsibilities

A generated project can feel like a wall of unfamiliar names. Do not begin by memorizing the framework. Ask which file starts the application, which files define user-facing pages or components, which code runs on the server, where data access lives, and which manifests describe dependencies and scripts. You are building a responsibility map, not studying every line.

Folders are conventions rather than magic. A file called package.json commonly describes a JavaScript project's scripts and dependencies; a pyproject.toml can serve a similar role in Python. Source folders, public assets, configuration files, migrations, and tests each answer different questions. Use Agent to explain them, then verify by opening the referenced paths.

02

Commands start processes

The Shell is an interactive terminal. It can list files, inspect version control, install packages, run tests, and start programs. A command may finish immediately or launch a process that keeps running. The Run control usually invokes a configured command for you. Learn which command it runs and which network port the application listens on.

The Console shows output from the running application: startup messages, warnings, request logs, and crashes. The Shell shows output from commands you run yourself. If Preview is blank, look upstream: is the process running, did it bind to the expected host and port, did compilation fail, or is the page failing in the browser?

03

Read errors from first cause

Long error output often contains one useful first cause followed by many consequences. Capture the exact action, timestamp, first error line, relevant stack frame, and affected URL or record. Ask Agent to explain the failure using those observations and point to the code path responsible. Avoid paraphrasing an error into 'it doesn't work.'

Separate compile errors, startup errors, server-request errors, browser-rendering errors, and wrong-business-result errors. They occur at different layers and require different evidence. A server can be healthy while a browser component crashes; a form can submit successfully while storing the wrong status.

  • Compile: source cannot be transformed into a runnable program.
  • Startup: the process cannot initialize, bind, or load configuration.
  • Request: a running server fails while handling a specific action.
  • Client: browser code, layout, or network calls fail after the page loads.
  • Domain: the software runs but produces the wrong business state.
04

Trace one journey through the stack

Choose one action, such as submitting a request. Trace it from the visible control to validation, the request sent to the server, server-side authorization and logic, the database write, the response, and the refreshed interface. The exact framework changes, but these responsibilities persist across web apps.

Ask Agent for paths and function names, then open them. Add temporary, nonsensitive logs only when existing evidence is insufficient, and remove noisy debugging output afterward. A trace turns an opaque app into a chain of inspectable contracts.

05

Make small, safe edits

Use the Visual Editor for a direct copy, color, image, or spacing correction when the change is truly visual. Use Agent when a change spans behavior, data, or hidden structure. Use the text editor when you understand the exact narrow edit and can verify it. The best tool is the one that produces the smallest correct diff with the clearest proof.

Before editing, record the current checkpoint and working behavior. After editing, inspect changed files, run the narrowest relevant check, and repeat the journey. Small changes build literacy because cause and effect remain visible.

Working reference

Commands and patterns

Orient without changing the project

pwd
find . -maxdepth 2 -type f | sort | head -120
git status --short
git log -5 --oneline

This establishes location, a shallow file map, uncommitted work, and recent history before diagnosis.

Discover available project scripts

node -e "const p=require('./package.json'); console.log(p.scripts ?? {})" 2>/dev/null || true

Read the project's declared scripts before guessing whether the correct check is dev, build, test, lint, or something else.

Inspect listening processes

ps -ef | grep -E '[n]ode|[p]ython|[v]ite|[n]ext'

A quick read-only check can confirm whether the expected runtime is alive; process names vary by project.

When the happy path breaks

Failure modes

01

Symptom

Preview is blank, so the builder repeatedly asks Agent to redesign the page.

Likely cause

A runtime or compilation failure was misclassified as a visual problem.

Recovery

Check Run status, Console output, first error, browser errors, and network responses in that order before changing design.

02

Symptom

A diagnostic command reveals credentials in chat or a screenshot.

Likely cause

The builder printed all environment values instead of only variable names or selected safe fields.

Recovery

Never print, paste, or log secret values; inspect names and presence, rotate any exposed credential, and redact evidence.

03

Symptom

Agent fixes the symptom, but the same defect returns in a different path.

Likely cause

The request targeted visible output without tracing the shared data or logic contract.

Recovery

Trace one complete journey, identify the earliest incorrect boundary, fix there, and add a regression check.

Hands-on lab

Explain one click end to end

Use the Chapter 2 app to trace one user action from the screen through code and state, then make one reversible copy change.

  1. 01Create a responsibility map for entry point, interface, server route, data access, configuration, and tests.
  2. 02Run the app and record the exact start command, process status, port, and Preview URL.
  3. 03Submit one known record and ask Agent to identify every file and function involved, then verify the paths yourself.
  4. 04Trigger one invalid case and classify its error as compile, startup, request, client, or domain behavior.
  5. 05Change one label with the Visual Editor or text editor, inspect the diff, and repeat the critical journey.

Deliverable: A code-path trace, a classified error capture, and a tiny reviewed diff whose effect is visible in Preview.

Reusable artifact

Evidence-first bug report

Give this to Agent before asking for a fix.

ENVIRONMENT: [development Preview or published URL]
CHECKPOINT / COMMIT: [identifier]
JOURNEY: Given [...], when [...], then expected [...].
OBSERVED: [exact visible behavior]
REPRODUCTION: 1. [...] 2. [...] 3. [...]
FIRST ERROR: [exact text, secrets removed]
CONSOLE / BROWSER / NETWORK EVIDENCE: [safe excerpt]
AFFECTED RECORD: [synthetic ID, no private data]
MUST PRESERVE: [working behavior that cannot regress]
DONE WHEN: [specific checks]

Before you move on

Receipt checklist

  • The project responsibility map points to real files for interface, server, data, configuration, and tests.
  • The recorded Run command and process evidence explain how Preview is produced.
  • One user action is traced from interface through validation, server logic, persistence, and response.
  • A small edit has a reviewed diff and a repeated workflow check.

Primary sources

Continue with the source

Home
Book
Blog
Calugaru Labs
GitHub
LinkedIn
Email
Theme