<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Building Hope-Driven Products</title>
  <subtitle>Writing about AI-native building, games, open source, and trade.</subtitle>
  <link href="https://favoyang.com/feed.xml" rel="self" />
  <link href="https://favoyang.com/" />
  <updated>2026-07-25T00:00:00Z</updated>
  <id>https://favoyang.com/</id>
  <author>
    <name>Favo Yang</name>
  </author>
  <entry>
    <title>A Two-Layer Project Structure for AI Coding Agents</title>
    <link href="https://favoyang.com/a-two-layer-project-structure-for-ai-coding-agents/" />
    <updated>2026-06-18T00:00:00Z</updated>
    <id>https://favoyang.com/a-two-layer-project-structure-for-ai-coding-agents/</id>
    <content type="html">&lt;p&gt;I have been using a two-layer project structure for AI coding agents.&lt;/p&gt;
&lt;p&gt;The pattern is straightforward: keep the source code in focused repositories, but run the agent from a higher-level workspace that understands how those repositories fit together. That top-level folder operates above the source repositories and holds the work around the code: saved plans, internal notes, private instructions, and cross-repo context.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;project-workspace/
  repo              # main repo, open source
  repo-devops       # server deployment stuff, closed source
  related-repo1
  related-repo2
  related-repo3
  ...
  AGENTS.md         # knowledge about how each sub-repo works
  plans/            # agent plans
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each sub-repo can still have its own &lt;code&gt;AGENTS.md&lt;/code&gt;. But in practice, I rarely enter the individual repo folder to prompt the agent. Most of the time, I work from the workspace root and use it as the starting point.&lt;/p&gt;
&lt;h2&gt;Why the workspace exists&lt;/h2&gt;
&lt;p&gt;A project quickly grows beyond one codebase. A real product often has the main app, deployment scripts, infrastructure configuration, documentation, marketing material, support tools, experiments, and private operational notes. These pieces are connected, but they should not always live in the same public repository.&lt;/p&gt;
&lt;p&gt;From the workspace, I can ask the agent something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;/goal implement this feature, then write a blog post, and schedule a tweet about it
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That request does not belong cleanly inside a single repo. The implementation may happen in the app repo, the deployment change in the DevOps repo, the product explanation in docs or a blog draft, and the launch message in a publishing plan.&lt;/p&gt;
&lt;p&gt;From the workspace level, the agent can plan the sequence before dropping into any one folder.&lt;/p&gt;
&lt;h2&gt;What gets better&lt;/h2&gt;
&lt;p&gt;Project memory gets one place to live. Saved plans, internal notes, and workflow instructions can sit above the repos instead of being copied into each one.&lt;/p&gt;
&lt;p&gt;Private context also stays private. For open-source projects, deployment details and internal planning notes do not need to sit inside the public codebase.&lt;/p&gt;
&lt;p&gt;Cross-repo work feels more natural from this level. A feature may need code, deployment changes, docs, changelog entries, and launch notes. Starting from the workspace keeps those related tasks visible.&lt;/p&gt;
&lt;p&gt;The prompt can start at the project level too. Instead of asking, &amp;quot;What file should I edit in this repo?&amp;quot;, I can ask, &amp;quot;What needs to happen across the project?&amp;quot;&lt;/p&gt;
&lt;h2&gt;Tradeoff&lt;/h2&gt;
&lt;p&gt;The risk is that the agent can see too much. It may search across too many folders, pull in unrelated context, or treat every task as a whole-project problem.&lt;/p&gt;
&lt;p&gt;That makes the workspace-level &lt;code&gt;AGENTS.md&lt;/code&gt; important. It should describe what each sub-folder is for, which repos are public or private, where plans belong, and when the agent should stay inside a single repo instead of searching the whole workspace.&lt;/p&gt;
&lt;p&gt;For example, a workspace-level &lt;code&gt;AGENTS.md&lt;/code&gt; might look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;# Project Workspace Agent Notes

This directory is an operator workspace that groups multiple independent Git
repositories. Treat each child directory with its own `.git/` as a separate
repository, not as source owned by this root workspace repository.

## Workspace Shape

Known child repositories:

- `&amp;lt;app-repo&amp;gt;`: application codebase. Read `&amp;lt;app-repo&amp;gt;/AGENTS.md` before
  changing application, docs, package, job, or shared library code.
- `&amp;lt;deploy-repo&amp;gt;`: deployment and operations. Read `&amp;lt;deploy-repo&amp;gt;/AGENTS.md`
  before changing deployment, infrastructure, service, or production
  verification behavior.
- `&amp;lt;pipeline-repo&amp;gt;`: build and publish pipelines. Read
  `&amp;lt;pipeline-repo&amp;gt;/AGENTS.md` before changing pipeline scripts or YAML.
- Other child directories with their own `.git/`: independent repositories.
  Check for repo-local guidance before editing.
- `plans/`: workspace planning notes and cross-repo coordination material.

## Working Rules

- Do not add child repositories, their contents, or embedded repo gitlinks to
  the root workspace Git repository.
- Make source changes inside the owning child repository and use that
  repository&#39;s Git history for commits and branches.
- Use this root only for workspace-level guidance, notes, and coordination
  files.
- Before cross-repo changes, inspect the relevant child repo status with
  `git -C &amp;lt;repo&amp;gt; status --short` so unrelated local work is not disturbed.
- Never revert or overwrite changes in a child repository unless the user
  explicitly asks for that exact repo and change.
- Prefer repo-local commands from the repo root, for example
  `cd &amp;lt;repo&amp;gt; &amp;amp;&amp;amp; npm test` or `cd &amp;lt;deploy-repo&amp;gt; &amp;amp;&amp;amp; npm run verify`.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The exact names do not matter. What matters is that the agent understands the boundary between the root workspace and the child repositories: where instructions live, where plans belong, which Git history owns a change, and which local or secret state must not leak into public work.&lt;/p&gt;
&lt;h2&gt;Where this can go&lt;/h2&gt;
&lt;p&gt;A few directions are worth testing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A workspace-level agent could act as an orchestrator instead of doing everything itself. It could pass a goal to a sub-agent running inside the relevant repo folder, then let that sub-agent handle the focused implementation.&lt;/li&gt;
&lt;li&gt;The same structure could become a personal vault for loosely connected knowledge: notes, relationships, blog drafts, high-level projects, and other information that does not fit cleanly into one repo.&lt;/li&gt;
&lt;li&gt;At the extreme, the workspace could become a project root for all projects: one local operating layer for many projects, with enough memory to understand how they relate.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The workspace layer turns the project folder into more than a collection of repositories. It gives the agent one place to understand the product before choosing where to act.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>AI Plan Mode Is Good. Saved Plans Make It Better.</title>
    <link href="https://favoyang.com/ai-plan-mode-is-good-saved-plans-make-it-better/" />
    <updated>2026-06-20T00:00:00Z</updated>
    <id>https://favoyang.com/ai-plan-mode-is-good-saved-plans-make-it-better/</id>
    <content type="html">&lt;p&gt;Plan mode forces the agent to slow down before coding. Before editing files, the agent has to understand the task, inspect the codebase, break the work into steps, surface risks, and ask for feedback.&lt;/p&gt;
&lt;p&gt;That helps, but plan mode has one limitation: the plan usually lives inside the session.&lt;/p&gt;
&lt;p&gt;For short tasks, that is enough. Longer work gets messy. I may switch machines. Another agent may need to continue the work. The original agent session is not always available, and even when it is, the transcript is rarely the clearest project artifact.&lt;/p&gt;
&lt;p&gt;At that point, a plan inside a chat transcript is not enough. I want the plan to become part of the project.&lt;/p&gt;
&lt;h2&gt;Saved plans make plan mode better&lt;/h2&gt;
&lt;p&gt;A practical next step is to save the plan into the repo. That is why I made &lt;a href=&quot;https://github.com/favoyang/planrock&quot;&gt;Planrock&lt;/a&gt;, a small agent skill and CLI that stores plans as Markdown files in a local &lt;code&gt;plans/&lt;/code&gt; folder.&lt;/p&gt;
&lt;p&gt;A plan is just a Markdown file with frontmatter and a checklist:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;---
title: Improve release workflow
state: open
priority: P1
created_at: 2026-06-20
agent_sessions:
  - codex:session-id
---

## Goal

Improve the release workflow so the agent can run tests, open a PR,
fix review comments, deploy after approval, verify production, and close the plan.

## Tasks

- [ ] Audit current release flow
- [ ] Update scripts
- [ ] Run lint and tests
- [ ] Open PR
- [ ] Address review comments
- [ ] Deploy after approval
- [ ] Verify shipped result
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is intentionally boring. The goal is durable planning without adding another project management system.&lt;/p&gt;
&lt;p&gt;A saved plan is readable by humans and agents. Git tracks it. The CLI can list it. It becomes a small local memory layer for agent work.&lt;/p&gt;
&lt;p&gt;In practice, it feels like a tiny repo-local GitHub Issues system for coding agents.&lt;/p&gt;
&lt;p&gt;The agent can query open plans. I can review them. Another session can continue from them. When the work is done, the plan can be marked closed and committed with the implementation.&lt;/p&gt;
&lt;p&gt;That is already a big improvement over a plan that only exists in a chat.&lt;/p&gt;
&lt;h2&gt;Why not use a spec framework?&lt;/h2&gt;
&lt;p&gt;There are more formal solutions for this problem. For example, OpenSpec is a spec-driven development workflow. It is designed to lock down intent before implementation and organize work through structured requirements, design notes, and task files.&lt;/p&gt;
&lt;p&gt;That works when you want a real spec workflow. I do not always want to start from a formal spec.&lt;/p&gt;
&lt;p&gt;Most of my agent sessions start much more casually:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Maybe the bug is here.
Can you inspect this module?
What if we split the deployment step?
Actually, make a plan from what we discussed.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That workflow needs a saved plan before it needs a full spec system.&lt;/p&gt;
&lt;p&gt;The difference is roughly this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;OpenSpec:
Use a spec workflow to define and govern implementation.

Planrock:
Save the plan that came out of the agent conversation.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OpenSpec is better when the work is product-level, team-level, or behavior-driven. Planrock is better when I want a lightweight memory layer for personal or small-project agent work. It keeps the agent&#39;s plan alive outside the chat without enforcing a full process.&lt;/p&gt;
&lt;h2&gt;A quick Planrock demo&lt;/h2&gt;
&lt;p&gt;Install the Planrock skill:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx skills add favoyang/planrock -g
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or simply ask your agent to install it for you:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Install the favoyang/planrock skill
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that, you can start with prompts like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Create a saved plan to implement &amp;lt;feature prompt&amp;gt;.

Make a plan to &amp;lt;feature prompt&amp;gt;, and track it locally.

Summarize what we just discussed in a saved plan.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you are already in plan mode, you can say:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Track this in a saved plan.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The skill will save the plan into the &lt;code&gt;plans/&lt;/code&gt; folder with unified frontmatter. During implementation, the agent can update the checklist, record progress, and mark the plan closed when the work is done.&lt;/p&gt;
&lt;h2&gt;Use the Planrock CLI&lt;/h2&gt;
&lt;p&gt;To see the progress of local open and closed plans, you can ask the agent to list them. You can also try the CLI manually.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npm install -g @favoyang/planrock
planrock
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or use &lt;code&gt;npx&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx @favoyang/planrock
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A repo using Planrock may look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;my-project/
  AGENTS.md
  plans/
    improve-release-workflow.md
    fix-auth-callback.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To check the current plan status:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;planrock
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example output:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Working dir: /Users/alex/projects/my-project

Planrock Status
Open:   1
Closed: 1

Top Open Plans (top 10)
Priority  Title                      Created     Done/Total  Percent  Agent Sessions
--------  -------------------------  ----------  ----------  -------  --------------
P1        Improve release workflow   2026-06-20  3/7         43%      codex:7f3a9c21

Most Recent Closed Plans (top 10)
Closed      Created     Title
----------  ----------  -------------------------
2026-06-19  2026-06-19  Fix auth callback
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To list open plans:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;planrock open
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To list completed plans:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;planrock closed
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The CLI is not the most important part. The Markdown files are. There is no hidden database, no remote service, and no heavy workflow to learn. The agent can read and update normal files in the repo.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Human-in-the-Loop, Not Human-as-the-Loop</title>
    <link href="https://favoyang.com/human-in-the-loop-not-human-as-the-loop/" />
    <updated>2026-06-21T00:00:00Z</updated>
    <id>https://favoyang.com/human-in-the-loop-not-human-as-the-loop/</id>
    <content type="html">&lt;p&gt;In &lt;a href=&quot;https://favoyang.com/ai-plan-mode-is-good-saved-plans-make-it-better/&quot;&gt;AI Plan Mode Is Good. Saved Plans Make It Better&lt;/a&gt;, I introduced Planrock as a small saved-plan layer for coding agents. The core distinction is:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Plan mode gives structure.
Planrock gives memory.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once the plan exists as a file, the next question is whether the agent can execute it without me typing &amp;quot;continue&amp;quot; again and again. That is where &lt;code&gt;/goal&lt;/code&gt; fits.&lt;/p&gt;
&lt;h2&gt;My manual loop before &lt;code&gt;/goal&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;In my normal workflow, the agent often already knows the next step. I even have this rule in &lt;code&gt;AGENTS.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;When working from a plan, after finishing any item, always state the next
concrete step. Continue doing this until the plan is genuinely complete so
the user does not need to ask &amp;quot;what&#39;s next?&amp;quot;.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This helps. After finishing one item, the agent states what it will do next. If it stops, I type:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;go
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For me, &lt;code&gt;go&lt;/code&gt; is just a short alias for:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;continue
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the agent continues. This works, but it reveals the weakness of the workflow: if the agent already knows the next step, and my only contribution is typing &lt;code&gt;go&lt;/code&gt;, I am not supervising. I am keeping the loop alive.&lt;/p&gt;
&lt;p&gt;In that setup, the human keeps the loop running instead of supervising it.&lt;/p&gt;
&lt;h2&gt;What &lt;code&gt;/goal&lt;/code&gt; changes&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;/goal&lt;/code&gt; keeps the agent focused on the objective. Instead of stopping after each local task, the agent can re-check the objective and continue until the work is done or blocked.&lt;/p&gt;
&lt;p&gt;In my test, &lt;code&gt;/goal&lt;/code&gt; reduced a lot of dumb pauses.&lt;/p&gt;
&lt;p&gt;The session still stopped, but the stops made sense:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;1. Missing auth blocked progress.
2. I manually interrupted it because it was going in the wrong direction.
3. My AGENTS.md policy required manual approval before deployment.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those are reasonable pauses. I do not expect the agent to ignore real blockers. I just do not want it to stop when the next step is already clear.&lt;/p&gt;
&lt;h2&gt;Why saved plans pair well with &lt;code&gt;/goal&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;A short &lt;code&gt;/goal&lt;/code&gt; prompt can work for small tasks. The human gives up some control over detailed planning in exchange for a more autonomous run at the objective.&lt;/p&gt;
&lt;p&gt;For larger tasks, I still want to provide more context:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;goal
constraints
tasks
approval boundaries
test expectations
deployment rules
current state
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A saved plan already contains that context:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Planrock stores the plan.
/goal keeps execution moving.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The saved plan gives the agent durable memory. &lt;code&gt;/goal&lt;/code&gt; gives the agent momentum.&lt;/p&gt;
&lt;h2&gt;Workflow A: &lt;code&gt;/goal&lt;/code&gt; first, saved plan during execution&lt;/h2&gt;
&lt;p&gt;This works when the task is clear.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;/goal Implement X. Create and maintain a saved plan while working.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The agent can create the plan, save it, execute it, update the checklist, run tests, and close the plan when the work is done. This fits implementation tasks where the agent can mostly plan and execute alone.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;/goal Add GitHub login to this app. Create and maintain a saved plan while working. Run tests, update docs if needed, and mark the plan closed only after the implementation is verified.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives the agent the objective and the instruction to keep a durable plan.&lt;/p&gt;
&lt;h2&gt;Workflow B: saved plan first, &lt;code&gt;/goal&lt;/code&gt; second&lt;/h2&gt;
&lt;p&gt;This is the workflow I prefer when the task needs discussion first:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;1. Use plan mode or normal chat to design the approach.
2. Save the result as a saved plan.
3. Turn the saved plan into a /goal command.
4. Let the agent execute while referencing the plan.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This fits my natural workflow because I do not always start with a clean objective. Sometimes I start with messy exploration:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Maybe the bug is here.
Can you inspect this module?
What if we split the deployment step?
Actually, make a plan from what we discussed.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once that discussion becomes clear enough, I save it as a saved plan. Then I can use the saved plan as the execution source.&lt;/p&gt;
&lt;p&gt;Planrock can generate the &lt;code&gt;/goal&lt;/code&gt; command. It scans the plan, pulls the &lt;code&gt;## Goal&lt;/code&gt; section, and constructs a &lt;code&gt;/goal&lt;/code&gt; command.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;planrock goal plans/improve-release-workflow.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The generated command can look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;/goal Follow plans/improve-release-workflow.md and complete the implementation. Keep the plan updated, run lint and tests, open a PR, address review comments, deploy only after approval, verify the shipped result, and mark the plan closed when complete.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the bridge I wanted: the saved plan keeps the context durable, and &lt;code&gt;/goal&lt;/code&gt; keeps the execution loop running.&lt;/p&gt;
&lt;h2&gt;The human role changes&lt;/h2&gt;
&lt;p&gt;I still want human involvement. I want to review architectural decisions, approve risky changes, and keep final shipping control when it matters. I do not want to be the person typing &lt;code&gt;go&lt;/code&gt; forever.&lt;/p&gt;
&lt;p&gt;That is the distinction:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Without /goal:
The human keeps the loop alive.

With Planrock plus /goal:
The human defines or reviews the plan.
The agent runs the loop.
The human steps in for judgment.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Plan mode helps the agent think before coding. Planrock saves that thinking as repo-local memory. &lt;code&gt;/goal&lt;/code&gt; uses that memory to keep execution moving, without taking away review, control, or shipping boundaries.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Loop Engineering Reduced to Two Patterns</title>
    <link href="https://favoyang.com/loop-engineering-reduced-to-two-patterns/" />
    <updated>2026-07-01T00:00:00Z</updated>
    <id>https://favoyang.com/loop-engineering-reduced-to-two-patterns/</id>
    <content type="html">&lt;h2&gt;From prompting to loop engineering&lt;/h2&gt;
&lt;p&gt;Prompting has been moving toward longer-running loops.&lt;/p&gt;
&lt;p&gt;With &lt;strong&gt;human in the loop&lt;/strong&gt;, the human stayed close to the model, reviewed outputs, corrected mistakes, and decided the next step. This gave control, but it also created many interruptions.&lt;/p&gt;
&lt;p&gt;With &lt;strong&gt;goal-driven prompting&lt;/strong&gt;, we stop asking the model to do one small step at a time. We give it a clearer goal: what to achieve, what constraints to follow, and when to ask for help. The point is to reduce unnecessary interruptions without removing the human.&lt;/p&gt;
&lt;p&gt;With &lt;strong&gt;loop engineering&lt;/strong&gt;, we design the cycle around the prompt. The model takes an action, checks the result, updates what it knows, and tries again. This repeats until the goal is reached or something blocks progress.&lt;/p&gt;
&lt;h2&gt;Filter and improve&lt;/h2&gt;
&lt;p&gt;Most loops I care about reduce to two patterns: &lt;strong&gt;filter&lt;/strong&gt; and &lt;strong&gt;improve&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;filter loop&lt;/strong&gt; reduces many possibilities into a smaller set of stronger candidates.&lt;/p&gt;
&lt;p&gt;It starts with a list, processes each item, evaluates the results, and keeps only the best ones. For example, a loop may collect high-performing thumbnail examples, analyze each one, score their visual patterns, keep the top few, then use those patterns to generate and score new caption ideas.&lt;/p&gt;
&lt;p&gt;In short: many items go in, only the strongest few come out.&lt;/p&gt;
&lt;p&gt;An &lt;strong&gt;improve loop&lt;/strong&gt; makes one thing good enough.&lt;/p&gt;
&lt;p&gt;It starts with a current artifact, applies a change, verifies the result, and repeats until it passes. For example, a coding loop runs tests, reads the failure, edits the code, runs tests again, and continues until all tests pass. An SEO loop runs a speed test, optimizes the website, reruns the test, and repeats until the score is above 95.&lt;/p&gt;
&lt;p&gt;In short: keep changing one thing until it passes.&lt;/p&gt;
&lt;p&gt;Most practical loops are one of these two shapes, or a combination of both. A content workflow may filter many ideas down to a few strong candidates, then improve the best one until it meets a clear quality standard.&lt;/p&gt;
&lt;p&gt;Loop engineering gets easier when you reduce the workflow to filter or improve.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Short Automation Prompts, Long-Lived Skills</title>
    <link href="https://favoyang.com/short-automation-prompts-long-lived-skills/" />
    <updated>2026-07-04T00:00:00Z</updated>
    <id>https://favoyang.com/short-automation-prompts-long-lived-skills/</id>
    <content type="html">&lt;p&gt;When I schedule an automation, I can paste a long prompt into the schedule, with every rule, preference, example, and edge case spelled out there. That works, but it makes the automation feel like a hidden little program. If I want to improve it later, I have to find the schedule, edit the prompt, and hope I did not break the parts that already worked.&lt;/p&gt;
&lt;p&gt;For anything I expect to maintain, I increasingly prefer a shorter shape:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Use the $personal-skill-maintenance skill.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The automation prompt stays small. The skill carries the real behavior.&lt;/p&gt;
&lt;p&gt;That matters because a skill is a file. I can version it. I can review diffs. I can keep it in &lt;code&gt;~/.agents/skills&lt;/code&gt; when it is personal, or move it into a repo when the workflow belongs to that project. The root skill set stays cleaner, and the scope is easier for the agent to understand.&lt;/p&gt;
&lt;p&gt;The bigger benefit is self-improvement. If the automation runs a retrospective and learns a better way to do the work, it can update the skill itself. The next run uses the improved behavior without me rescheduling the automation or copying a new wall of text into a cron entry.&lt;/p&gt;
&lt;p&gt;I think of it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Cron prompt: short and stable.
Skill file: specific, versioned, and improvable.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verbose prompts are fine for one-off jobs. If I expect the automation to live for a while, I would rather maintain a skill than maintain a paragraph trapped inside a scheduler.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>agentsnippet: Reuse AGENTS.md and CLAUDE.md instructions</title>
    <link href="https://favoyang.com/agentsnippet-reuse-agents-md-and-claude-md-instructions/" />
    <updated>2026-07-19T00:00:00Z</updated>
    <id>https://favoyang.com/agentsnippet-reuse-agents-md-and-claude-md-instructions/</id>
    <content type="html">&lt;p&gt;Most reusable coding-agent instructions should be packaged as skills, but &lt;code&gt;AGENTS.md&lt;/code&gt; still has a job. It tells the agent which skills the project expects it to use and when to use them. A repository may have a rule like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;Before committing, use the `$branch-review-subagent-loop` skill to review the
complete branch diff.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The skill holds the review workflow. &lt;code&gt;AGENTS.md&lt;/code&gt; connects that workflow to the repository&#39;s delivery policy. When the same rule applies to several projects, I end up copying it into each instruction file. The duplication grows when repositories share several skill invocations and approval rules.&lt;/p&gt;
&lt;p&gt;That works until one copy changes. I improve the rule in one project, forget the others, and eventually have several versions of what was supposed to be the same instruction.&lt;/p&gt;
&lt;p&gt;Plain Markdown is part of the appeal of &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;CLAUDE.md&lt;/code&gt;, but Markdown has no standard include mechanism. I wanted to reuse source text while keeping the instruction files that coding agents already understand.&lt;/p&gt;
&lt;h2&gt;Generate instruction files from snippets&lt;/h2&gt;
&lt;p&gt;I made &lt;a href=&quot;https://github.com/favoyang/agentsnippet&quot;&gt;agentsnippet&lt;/a&gt; for this job. It reads &lt;code&gt;AGENTS.template.md&lt;/code&gt; and &lt;code&gt;CLAUDE.template.md&lt;/code&gt;, expands snippet directives, and writes ordinary &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;CLAUDE.md&lt;/code&gt; files beside the templates.&lt;/p&gt;
&lt;p&gt;The template holds the source text, while the coding agent reads the generated file. agentsnippet uses the template itself instead of a separate configuration file. The coding agent needs no special support for includes.&lt;/p&gt;
&lt;h2&gt;A small example using the magic folder&lt;/h2&gt;
&lt;p&gt;Create a personal snippet at &lt;code&gt;~/.agents/agentsnippets/review.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;## Review gate

Before committing, use the `$branch-review-subagent-loop` skill to review the
complete branch diff.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then create &lt;code&gt;AGENTS.template.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;# Project instructions

This repository contains the application source.

&amp;lt;!-- @agentsnippet &amp;quot;@/review.md&amp;quot; --&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;@/&lt;/code&gt; prefix points to the agentsnippet magic folder at &lt;code&gt;~/.agents/agentsnippets&lt;/code&gt;, so the same personal snippet can be included from templates in different projects.&lt;/p&gt;
&lt;p&gt;Run agentsnippet from the project directory:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx agentsnippet
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It writes &lt;code&gt;AGENTS.md&lt;/code&gt; with the directive replaced by the contents of &lt;code&gt;review.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;# Project instructions

This repository contains the application source.

## Review gate

Before committing, use the `$branch-review-subagent-loop` skill to review the
complete branch diff.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same command also handles &lt;code&gt;CLAUDE.template.md&lt;/code&gt;. If both templates exist in a directory, it generates both outputs in one run.&lt;/p&gt;
&lt;p&gt;For a repository with templates in several folders, use recursive discovery:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx agentsnippet -r
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also check whether generated files are current without changing them:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx --yes agentsnippet@latest --check -r
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In CI, that command catches a changed template or snippet whose generated instruction file was not updated.&lt;/p&gt;
&lt;h2&gt;Let your coding agent manage agentsnippet&lt;/h2&gt;
&lt;p&gt;The repository also has an optional agentsnippet skill for coding agents. Install it globally for Codex:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;npx skills add favoyang/agentsnippet -g -a codex -y
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The skill teaches the agent to work from authoritative templates, generate the output files, and verify that they are current. When setting up agentsnippet in a repository, the agent can use the skill to decide whether an instruction belongs in the local template, the magic folder, or a remote source. It also checks for direct edits before generation so existing work is preserved.&lt;/p&gt;
&lt;h2&gt;Choose where shared snippets live&lt;/h2&gt;
&lt;p&gt;Use a relative path such as &lt;code&gt;./.agents/testing.md&lt;/code&gt; when the snippet belongs to the repository. agentsnippet resolves it from the file containing the include. Absolute paths and paths beginning with &lt;code&gt;~/&lt;/code&gt; point to snippets elsewhere on the same machine, while the &lt;code&gt;@/&lt;/code&gt; magic folder gives personal snippets a shorter name. If the instructions need to travel with a team or across machines, use an HTTP or Git source. Snippets can include other snippets too.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/favoyang/agentsnippet#readme&quot;&gt;agentsnippet README&lt;/a&gt; documents installation, source formats, recursive discovery, CI checks, and the optional agent skill. The &lt;a href=&quot;https://github.com/favoyang/agentsnippet/blob/main/SPEC.md&quot;&gt;v1 specification&lt;/a&gt; covers the exact directive grammar, limits, error behavior, and security model.&lt;/p&gt;
&lt;p&gt;Each project keeps a plain &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;CLAUDE.md&lt;/code&gt; that compatible coding agents can read. The shared instructions have one home in reusable Markdown snippets. When a rule changes, I regenerate the ordinary instruction files instead of hunting down every copy by hand.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>When the Model Eats the Harness</title>
    <link href="https://favoyang.com/when-the-model-eats-the-harness/" />
    <updated>2026-07-25T00:00:00Z</updated>
    <id>https://favoyang.com/when-the-model-eats-the-harness/</id>
    <content type="html">&lt;p&gt;This is a reading note on Thariq Shihipar&#39;s article, &lt;a href=&quot;https://claude.com/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models&quot;&gt;The new rules of context engineering for Claude 5 generation models&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Anthropic removed over 80% of Claude Code&#39;s system prompt for its newest models without a measurable loss on coding evaluations. Rules that once kept older models out of trouble had become constraints that newer models had to reason around. The new advice is looser: let the model use judgment, make tool interfaces expressive enough that they explain themselves, and load detailed guidance only when the work calls for it.&lt;/p&gt;
&lt;p&gt;The obvious lesson is to simplify prompts. I think there is a stranger lesson for skills.&lt;/p&gt;
&lt;p&gt;A skill library should sometimes shrink. Once a capability becomes common enough, the model may already know the routine. A long skill can collapse into a short phrase that wakes up behavior learned during training. At that point, the old instructions are scaffolding the model has to climb through before doing something it already knows how to do.&lt;/p&gt;
&lt;p&gt;This is good for users. Nobody wants to remember a wall of prompt text just to trigger a familiar workflow. It also changes the competitive value of the harness.&lt;/p&gt;
&lt;p&gt;A strong harness makes models easier to swap. If the shell handles the planning, tools, memory, and verification, the model underneath can be treated more like a component. A thinner harness moves more of the product&#39;s behavior into the model&#39;s weights. Competitors can inspect the shell, but they cannot see which habits the model learned or which plain words reliably bring those habits out.&lt;/p&gt;
&lt;p&gt;That makes benchmarking harder too. An open-weight model can be tested inside a popular harness today, then look worse tomorrow because the harness was simplified around abilities that another model has absorbed. Part of the benchmark has moved behind the API, where competitors cannot inspect it.&lt;/p&gt;
&lt;p&gt;From a model vendor&#39;s point of view, that is an attractive result. Users get shorter prompts and fewer conflicting rules. The vendor gets a product whose best behavior is harder to reproduce by swapping in another model. I do not know whether this is the strategy behind Anthropic&#39;s changes, but it is a useful side effect.&lt;/p&gt;
&lt;p&gt;The awkward part is compatibility. Instructions that get in Claude 5&#39;s way may still be doing real work for an older Sonnet model. A short trigger that frees the new model could leave the older one guessing. Pruning skills therefore needs the same discipline as adding them: delete something, run the evaluations again, and keep a model-specific layer when the results still depend on it.&lt;/p&gt;
&lt;p&gt;OpenAI has taken a somewhat different route. The open-source Codex CLI supports custom model providers, so the harness still has value when the model changes. It works more like an agent operating layer than a shell for one specific model. If native model judgment keeps improving, I still expect parts of that layer to get simpler.&lt;/p&gt;
&lt;p&gt;My rule for skills is becoming clearer. Keep the ones that carry taste, private knowledge, or an important safety boundary. Cut the ones that merely explain a popular capability the model has already absorbed. The model may eat a popular harness the same way it eats a popular skill: by absorbing its familiar patterns until a much simpler trigger is enough.&lt;/p&gt;
</content>
  </entry>
</feed>