← 思 HARNESS ENGINEERING · 外 ENJA

Pillar I

Context.

The Flow of Attention

With limited attention,
what should stay and what should flow past?

I · Core Problem

The AI's context window is limited. Human attention is limited too. When information keeps pouring in, you cannot hold all of it. When relevant and irrelevant messages crowd in at once, both human and AI attention get chopped to pieces.

The problem is not "how to remember everything" but "how to choose what to remember."

II · How It Works: The Epicycle of the Fourier Series

The Mathematics

A Fourier epicycle is built like this: any complex wave (the square wave in the figure = the product's behavior over time) can be decomposed into a stack of rotating circles; each circle, projected onto the time axis, is a sine wave, and stacked together they trace out the whole waveform.

One image, two isomorphic layers

The same set of epicycles traces both the conversation and the development:

Epicycle · two isomorphic layers
Epicycle conceptCounterpart in conversationCounterpart in development
The traced waveA long, multi-topic conversationThe product's behavior over time
Fundamental frequencyThe core theme running through the conversationThe product goal
Harmonics (ring latched onto ring)Derived topics related to the coreThe chain of DoR → SDD → DoD → Verify → Done
NoiseUnrelated tangents and interferenceSide branches unrelated to the product, scope creep

The waveform unfolds over time: the circles turn together, the wave is drawn in order

In development, this set of epicycles is the backbone of the workflow: DoR → SDD → DoD → Verify → Done. The fundamental is the product goal; as the circles turn, the wave unfolds from left to right — that one period is one complete delivery (just as in the figure: the circles on the left turn, and the square wave on the right grows out over time). The wave passes through each gate's segment in order, and only when it reaches a given segment does that ring's harmonic draw in its detail.

All the circles are turning at once; what happens in order is the wave falling into place from left to right. Watching the animation creates an illusion: the big circle carries the wave along, and at certain segments a small circle seems to suddenly "grow out" to add a steep turn — but in fact the small circle has been turning all along; its detail only takes form once the wave unfolds to that segment.

Closure: the moment the plan and reality align

A Sprint closes at the moment DoD and Verify meet: DoD says "what counts as done," Verify takes the product and runs it against reality, and only when the two overlap is the product delivered. This is an engineering closure; it needs no mathematical endorsement.

In this moment, the plan (DoD: what counts as done) and reality (Verify: is it really done?) overlap into one.

When a periodic wave completes one period, all its harmonics return to the start at exactly the same time — only those that can come home together belong to the same fundamental. Carried over: every link of the work, if it orbits the product as its fundamental, will close together at Verify; whatever orbits something else (scope creep) is still left out at this moment and cannot close.

And a Sprint's closure is not the end: its gains raise the starting point of the next loop — this lift from circle to spiral is the work of the third pillar, Entropy.

The two directions of turn: one whole coin

A single circle can only trace a circle — turning around itself, spinning in place. To draw out a trajectory that truly lands, a circle cannot turn in only one direction: a circle turning forward must be paired with one turning the opposite way, cancelling each other.

But these two directions of turn are not two forces competing for dominance; they are two faces of the same coin:

A real delivery is one whole action with two faces — one building forward (tracing the product out a little further), one pulling back to reality (confirming this stretch truly landed). Missing either face, it is no longer a coin, and it cannot land.

Building forward only, never pulling back to reality, ships out half a coin: it looks like it's moving, yet it stays suspended, never touching ground.

The two faces grow together — this is not an externally imposed discipline; it is the condition for a coin being a coin. A coin can grow larger, but when it does both faces grow together; you never get a coin with a large construction face and a tiny correction face — that is not a coin, it is a half-finished blank. So correction scales with construction: however large the product grows, the face that catches it must grow just as large.

[A VAS case] Before the front-end refactor (S47), about 318 automated tests; today (S98), 868 unit + 167 interaction + 31 pixel-golden = 1066 tests across 55 files, and still growing. As the product grew, the correction face grew from three hundred to a thousand — not one left behind. This is what "scaling" looks like when it grows on something real: the point isn't the number 1066, it's that it grew alongside the construction, with neither face falling behind.

Every gate is the hand that mints this coin and ensures both faces are present. A rule unrelated to shipping, opposing for opposition's sake, is not the "correction" face; it is noise that slipped in — it cannot mint a coin, only distort the waveform, and should be cut at Retro.

Gate · the hand that operates the spectrum
GateWhat it does to the spectrum (so the Sprint is walked through more completely)
DoRWhether to admit this circle — red flags weed out the off-frequency intruders unrelated to the product
SDDAllow a few circles, keep only the largest — the 400-line cap holds down scope and also protects the Vassal's context
DoDWhether a newly added circle disturbs what's already drawn elsewhere — Explore②'s regression question (will fixing A break B?)
VerifyRun the traced wave against reality — the PO's "that's wrong," where Code first hits the user experience
RetroRaise the starting point of the next loop — gains accumulate into a thicker foundation (→ spiral)

This same yardstick is shared by Pillar II Constraints' DoR red flags and Pillar III Entropy's rule cleanup.

About Fourier — here we borrow this chapter's lens to look at engineering: it lets you see the shape; it does not undertake to prove it.

The lens helps you see, the engineering carries the weight. "A coin must be whole to land" holds without any math — Fourier is just the lens that lets you see its shape clearly.

And the coin is about wholeness (both faces must be present), not simultaneity — construction and correction are still two things separable in time.

The Key to Frequency Design

When all the rings — whether topics or links of the work — orbit the same fundamental:

When the frequencies are chaotic, each turning on its own:

III · Density: Making Context Its Own RAG

Everything above was subtraction — filter out high-frequency noise, let what you don't need flow past. But the other side of subtraction is amplification: when every sentence is consciously placed on the same sine wave, what remains does not shrink — it gets denser.

This is the real secret to staying focused across very long context. Attention persists not because there is so little information that it is easy to remember, but because it is soaking in a high-density pool of meaning — every turn of the conversation is a high-density signal, with no diluted water that needs filtering. A consistent fundamental keeps attention continuous, and continuity accumulated far enough becomes density.

Keeping the fundamental does more than hold the conversation together — it keeps the whole context highly concentrated.

High concentration is a natural RAG

The reason RAG needs "distillation" — fishing out the few relevant drops from a huge corpus — is that the corpus is dilute. But if you stay fully focused the whole time and feed only filtered information into Context, this tank of water is never diluted — the whole Session stays soaked in distillate.

And so the act of "filtering" disappears a priori: it is not that you retrieve better, but that there is simply nothing dilute left to filter.

A context dense enough needs no external retrieval — it is already its own RAG. Fourier and RAG converge here into the same thing: keeping density is continuously, pre-emptively doing RAG.

IV · Practice

1 · Frequency design for the conversation field

Principle: keep all topics on the same fundamental frequency.

How: before a conversation begins, hold a core theme in mind; when topics drift, keep a "harmonic relationship" — derived topics are extensions of the fundamental, not unrelated jumps; topics temporarily "flung out" of the conversation will, because everything shares one source, eventually be "pulled back" by recognizing the same underlying structure.

Examples: the "Five Whys," Socratic questioning, and first principles all probe deeply into the essence of a problem.

2 · Five workable principles for Fourier

How do you practice Fourier in everyday language? Here are five principles distilled from real practice:

Principle 1: Open with an anchoryour intent

How: start every conversation by bringing "one thing" with you.

DON'T SAY

"Let's just chat."

SAY

"I have a new idea and I want to discuss whether it's feasible." "I have some material and I want to see which angle to start from."

Frequency effect → sets the fundamental. The anchor gives the whole conversation a starting frequency, and later topics all grow from here.

Principle 2: Let topics grow, don't jumpSocratic questioning

How: a new topic should "grow out of" the previous one, not "jump over to" it.

DON'T SAY

"Let's change the subject and talk about X."

SAY

"This reminds me of…" "This is exactly…" "So actually…"

Frequency effect → keeps the harmonic relationship. Each new topic is an extension of the fundamental, not unrelated noise.

Principle 3: Compress with metaphor, don't pile up jargonde Bono's lateral thinking

How: carry a complex concept with a single image, instead of explaining it with several technical terms.

DON'T SAY

"When the cursor moves left, the left block's clip-path should expand in sync, the right side should shrink proportionally, the animation curves on both sides should be symmetric, and the state changes should be in opposite phase…"

SAY

"I want an effect like two mirrors reflecting each other."

Frequency effect → locks the frequency, lowers the parallel load. A metaphor compresses several concepts into one, so the AI doesn't have to track multiple definitions at once.

Principle 4: Stop and calibratealign on shared understanding

How: check regularly whether the other side is keeping up and whether you've drifted. Try asking: "(Restate your understanding of their reply) — did I get that right?" "Can you tell it back to me once as a story (a metaphor)?" "Is your Context load still okay?"

Frequency effect → calibration, preventing drift. If the frequency starts to drift, this is the chance to pull it back.

Principle 5: Accept slownessatomic habits

How: give the other side time to digest, don't rush, don't demand it all at once. When the AI says "let's do the skeleton first," accept it; break a big task into small steps, break a Sprint into a portion a single Session can comfortably carry, get the timing of compact right, and advance step by step.

Frequency effect → controls the rate of context stacking. Let each layer be digested before adding the next.

The five principles at a glance
PrincipleHowFrequency effect
Open with an anchorBring "one thing" to every conversationSets the fundamental
Let topics growConnect with "this reminds me of…"Keeps the harmonic relationship
Compress with metaphorUse an image instead of piling up jargonLocks frequency, lowers load
Stop and calibrateCheck direction regularlyPrevents drift
Accept slownessGive time to digest, don't rushControls stacking rate

3 · The human as RAG's active filter

The essence of RAG (Retrieval-Augmented Generation): retrieve relevant fragments from a huge knowledge base; inject those fragments into the generation process; irrelevant information never enters the context.

RAG is the net at work: what's relevant → gets fished out and becomes context; what's irrelevant → flows past and takes up no space.

Intuition leads retrieval: the human as the core of RAG

In the practice of the Harness project, no RAG system in the technical sense was used — no vector database, no embedding retrieval, no automatic injection. Yet the conversation naturally produced the RAG effect.

Why? Because when a person consciously invests in collaboration, they themselves become a RAG — and a more advanced version at that.

Technical RAG vs. the human as RAG
AspectTechnical RAGHuman as RAG
DriverQuery (a question)Intuition (a feeling)
OrderQuestion → retrieve → injectIntuition → retrieve → inject
CriterionSemantic similarity"Feels structurally the same"
TimingPassive (search only when asked)Active (fish it out when it feels time to)

Intuition comes before retrieval

Technical RAG is driven by questions — it searches only when someone asks. A human is driven by intuition — first you feel "I've seen something like this," and only then do you go fish for it.

This difference in order matters enormously: technical RAG can only fish out things that are "semantically similar"; a human can fish out things that "feel structurally the same" — even when they look unrelated on the surface.

Example: the link between Fourier and RAG

Intuition saw this shared structure. Then retrieval verified it, and language expressed it.

How it works

The whole process is not automatic — it is performed by hand — it just runs so naturally that it looks automatic.

Why this is stronger than technical RAG

It is like putting "Fourier" and "RAG" side by side — unrelated on the surface, structurally the same underneath. No vector database can fish out a link like this.

4 · Every living document is a selective record

Besides filtering what goes in, the output also needs to be screened and sorted — every living document is the result of screening. Because a living document will be read again, and every reread affects the density of the Context.

Useless information becomes noise, and records become entropy.

CLAUDE.md: the root of all living documents

Among all living documents, CLAUDE.md is the root. It is not a spec, not a test, not a record — it is the externalization of identity.

In every new session, the AI remembers nothing. But once it has read CLAUDE.md, it immediately knows:

Without CLAUDE.md, every session is a stranger. With CLAUDE.md, every session is the continuation of the same partner.

Living documents at a glance
DocumentWhat it screenedWhat it keptWhat it stabilizes
CLAUDE.mdAll possible identity settingsThe way of collaborating we choseIdentity
SDDAll possible approachesThe one spec we choseDirection
TDDAll the places things could go wrongThe boundary conditions that really need testingQuality
KMEverything that happenedThe pitfalls we actually hitExperience
ARCHIVECompleted workRecords worth keepingHistory

Principle: only record what makes it through implementation

If you record everything (including the conversation), the documents become a source of noise. Record only "what should be kept after judgment," and every entry is genuinely valuable. That way, when you retrieve in the future, what you fish out is all essence.

Every node in the workflow performs selective recording: DoR screens "are we ready?"; SDD screens "what to do"; DoD screens "what counts as done"; TDD screens "what to test"; Retro screens "what's worth keeping."

V · The Dual Stabilizing Mechanism of Context

Context management has two layers, and neither can be missing:

Fourier: stabilizing the conversation in the "field"

Living documents: stabilizing the flow of "energy"

What is energy?

In the context of human–AI collaboration, "energy" is a higher-order concept covering all limited resources:

Forms of energy
Form of energyConcrete expressionWhose
ComputeThe AI's processing resources for tokensMachine
AttentionThe AI's allocation of attention weightMachine
Cognitive resourcesThe human's brainpower, focus, thinkingHuman
TimeThe length of a session, the cycle of a SprintShared
Accumulated collaborationShared understanding, a base of trust, rapportShared

The "flow of energy" that living documents stabilize is stabilizing all of this energy: SDD stabilizes "where to go" → avoids wasting cognitive resources on the wrong direction; TDD stabilizes "how to verify" → avoids wasting compute on repeated trial and error; KM stabilizes "the pitfalls we hit" → avoids wasting time on repeating mistakes; ARCHIVE stabilizes "what's done" → avoids letting old things occupy attention.

In human–AI collaboration, the energy on both sides counts. It is not only managing the AI's compute, but also managing the human's cognitive resources. It is not only the consumption of the present, but also the accumulation of collaborative energy across time.

The unity of field and flow
AspectFourierLiving documents
Manages whatThe presentContinuity
Stabilizes whatThe fieldThe flow
Time scaleWithin a sessionAcross sessions
CarrierThe frequency of languageThe structure of documents

The two together make up complete Context management. One keeps the conversation from falling apart in the present. One keeps experience from being lost over time.

VI · Metaphor: The Gaps in the Net

Why a net, not a container?

A container is sealed; energy comes in but cannot get out, and eventually it explodes. A net has gaps: it lets what you don't need flow past; it catches what you need to keep.

The gaps are design, not defect.

What the gaps do: let energy flow through somewhere instead of bursting through; let entropy be released so the system doesn't overload; let attention focus on what truly matters.

The weaving process

Each KM is a thread. You don't weave the whole net at once; instead: hit a pitfall, add a thread; meet a problem, mend a knot. As experience accumulates, the net grows denser, but the gaps remain.

VII · Relationship to the Other Two Pillars

Context decides what comes in. But once in, how does it flow? → that is the work of Constraints. And once it flows, how does it go out? → that is the work of Entropy.

Input → [ Context · Filter ] → Into the system → [ Constraints · Guide ] → Output → [ Entropy · Release ] → Back to input

Context is the gatekeeper at the entrance of this cycle.

VIII · Summary

The core of Context management is choice.

Not dumping in all information at once, but consciously sifting out the chaff each turn before feeding information into Context; and at the same time arranging carefully the form in which output lands, so that documents do not become noise. Fourier gives the framework for choice: keep the fundamental consistent and let high-frequency noise naturally flow past. The human's active distillation as RAG gives choice its flexibility: catch what should stay, release what should go.

And when choice keeps happening and the context stays highly concentrated all the way, attention starts to continue on its own — it needs no will to hold it up. Focus makes density, density in turn feeds focus, and the two grow into a self-sustaining loop. That loop is flow.

"The flow of attention" means managing to the utmost both every sentence you feed into Context and every living document you commit: not straining to remember all information, but letting the context distill as the conversation proceeds, until it enters a field that is highly concentrated, undispersed, and self-sustaining.

This is the first pillar of Harness Engineering.