WEEK 1 · LESSON 3 · TOPIC 3 OF 17 · Self-Modifying and Self-Correcting Instructions

Self-Modifying and Self-Correcting Instructions

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

The more valuable pattern is to make the persistent file update itself when important feedback occurs.

A self-modifying instruction system tells the agent to read the rule file at the beginning of every task and append a new rule when one of the following events occurs:

  • The user explicitly corrects the output.
  • The user rejects an approach, file structure, design pattern, or method.
  • The agent encounters a bug caused by an incorrect assumption.
  • The user states a durable preference.

The rule should be written as a clear imperative. A useful structure is:

Category: Always or never perform X because Y.

The reason matters because it helps the agent interpret the rule in future situations instead of following an isolated command without context.

Consider a website example. The agent creates a dark-mode portfolio. The user says, "Quit doing things in dark mode." A normal system changes the current site. A self-correcting system performs two actions:

  1. It changes the current site to a light design.
  2. It appends a durable rule stating that applications should not be created in dark mode because the user prefers light interfaces.

When a later session begins, the rule is already present. The agent no longer has to make the same mistake and receive the same correction.

This creates cumulative improvement. The first session may contain very few preferences, so the probability of preference-related errors is high. After several sessions, the rule set contains more knowledge. The agent begins to anticipate what the user wants rather than rediscovering it.

The pattern is high leverage because it converts ordinary feedback into persistent system improvement.