# Coding Lesson of the Day: Give Your AI a Project State File

> **Series:** Coding Lesson of the Day  
> **Learning outcome:** the reader can create a tiny project-memory file that helps an AI agent restart without re-explaining everything.  
> **Time:** 5 minutes

## TLDR

If you are new to coding with AI, do not start by asking the agent to build the whole app. Start by giving it one clear memory file.

Create a file named:

```text
PROJECT_STATE.md
```

Then write three lines:

```md
# Project State

**What I am building:** A simple personal website.
**Who it is for:** Friends, clients, and people who want to understand my work.
**Next useful result:** A homepage with my name, one paragraph, and a contact link.
```

That is enough to make the agent less forgetful.

## Why This Matters

AI agents are fast, but they are not automatically organized. A chat can grow long, restart, or lose the thread. A project-state file gives the agent a small source of truth it can inspect before acting.

This is the beginner version of local-first project memory: your project knowledge lives in a file you own, not only in a chat window.

## Tiny Example

Bad starting prompt:

```text
Build me a website.
```

Better starting prompt:

```text
Inspect PROJECT_STATE.md first. Then tell me the smallest useful next step. Do not build yet.
```

The better prompt gives the agent:

- context
- a boundary
- a smaller task
- a chance to explain before editing

## Try This Now

1. Make a new folder for one small idea.
2. Create `PROJECT_STATE.md`.
3. Add:
   - what you are building
   - who it is for
   - the next useful result
4. Ask your AI agent to inspect the file.
5. Ask for one next task, not the whole project.

## Agent Prompt

```text
Read PROJECT_STATE.md and summarize what you understand about this project.

Then answer:
1. What is the smallest useful next task?
2. What should wait?
3. What would you need me to decide before building?

Do not edit files yet.
```

## Human Check

After the agent answers, ask yourself:

- Did it understand the project without me re-explaining everything?
- Did it suggest one task instead of a giant plan?
- Did it tell me what I still need to decide?

If yes, you just created your first project memory loop.

## Trinity Check

- **Outcome:** you have a working project-memory file.
- **Agency:** you still own the goal and decisions.
- **AI Hygiene:** the agent has bounded context and is not editing before inspection.

## Learn Next

- Read the free manual: `../Agentic Coding Starter Manual.html`
- Try the next file: `TODO.md`
- Then learn basic Git so you can checkpoint your project before risky edits.
