Created by Ayk Martirosyan | Youtube | Tiktok

image.png

Prompt

# Starter prompt: have your AI agent build a second-brain harness

I want you to set up a file-based "second brain" that YOU will maintain for me. It is a folder of plain markdown files: one always-loaded index, one state file per project, and rules that make you keep them current. No Notion, no Obsidian, no database.

## Step 1 — Interview me (do this first, in ONE message)

Ask me:
1. Where should the system live? (Default: the folder where your global instructions file lives — `~/.claude/` for Claude Code, `~/.codex/` for Codex.)
2. My active projects: for each one — name, type (client / product / personal), one-line current status, and the path to its code repo if it has one.
3. Anything I'm tracking that isn't a project (learning goals, job search, content pipeline)? Those count as projects too.

Wait for my answers before creating anything.

## Step 2 — Create the structure

For each project, create `context/projects/<project-slug>/STATE.md` from this template:

```markdown
# {Project Name}

> **Type**: client | product | personal
> **Status**: {one line}
> **Code repo**: {path or N/A}
> **Updated**: {today}

## What & Why

{2-4 sentences: what this project is and why it exists}

## Current Focus

## Blockers

## Next Actions

1.

## Recent Progress

- {today}: Project set up

## Key Documents

| Document | Purpose |
|----------|---------|

Fill in what you learned from the interview. Leave honest gaps blank rather than inventing content.

Step 3 — Add this to my global instructions file

Append to your global instructions file (CLAUDE.md for Claude Code, AGENTS.md for Codex). If sections like these already exist, merge instead of duplicating:

## Projects (context/projects/)

| Project | Type | Status | Path |
|---------|------|--------|------|
{one row per project}

> **When a project comes up**, read its `STATE.md` first — it is the single
> hub file (identity, current focus, next actions, key documents). Load
> deeper files only as needed. Keep this table current when statuses change.

**Close the loop (every session)**: if a session materially advances a
project, update its `STATE.md` before finishing — Current Focus, Next
Actions, Recent Progress, and the `Updated:` date.

**Capture tasks when they appear**: when a new task or follow-up surfaces
mid-session, add it to that project's `STATE.md` Next Actions immediately,
in the same turn. A task that only lives in conversation is lost when the
session closes.

Step 4 — Optional: git backup and multi-machine sync

Ask me if I want this. If yes:

  1. Initialize a git repository in the folder (if there isn't one) and connect it to a PRIVATE GitHub repository.
  2. Claude Code only: offer to add a SessionStart hook that runs git pull and a SessionEnd hook that auto-commits and pushes. Explain that this means the system syncs itself with zero manual steps.

Step 5 — Verify and hand off

  1. List every project folder and confirm each has a STATE.md.
  2. Show me the final projects table.
  3. Tell me the one habit that matters: nothing. The rules you added mean YOU maintain this system, not me. My only job is to work with you normally.

Rules for this whole setup: never delete or overwrite existing files without showing me first; merge with anything that already exists; keep every file plain markdown.