DEV Community

canonical
canonical

Posted on

Beyond Harness Engineering: Understanding Attractor-Guided Engineering through Nonlinear Dynamical System Control

This article is aimed at readers who are already familiar with Harness Engineering but not yet familiar with Attractor-Guided Engineering (AGE).

Harness Engineering focuses on how to constrain, verify, and audit AI-generated outputs; AGE asks further: what long-term structure should these control mechanisms eventually pull the repository trajectories back to?

For a detailed introduction to AGE, see my previous article: Attractor Before Harness: A Methodology for AI-Scale Development. This article focuses on a methodological analogy: using the language of nonlinear dynamical system control—in particular the structure-preserving terminology of port-Hamiltonian systems (PHS) and the target-manifold image of Immersion and Invariance—to explain some structures that already exist in AGE but have not yet been fully named: how semantic commitments are conserved, how change obligations are transformed, how document topology preserves structure, and how AI sessions recover the same system reality in a repository across time.

1. Why This Analogy Is Needed

AGE already has a core language:

State space → attractor → trajectory → control

This basic AGE vocabulary precisely captures a core problem in AI-scale development: when AI perturbs the repository at high frequency and amplitude with no persistent memory, how do we describe whether the system is still converging to a stable structure over the long term?

More precisely, AGE examines AI-driven software engineering through the mental image of a dynamical system. A single AI task can be seen as one perturbation and correction on the repository trajectory; a single input-output is only a local cross-section of that trajectory. The repository is a state space that evolves over time; AI, humans, CI, audits, and documentation updates all change the trajectory; owner docs define the attractor the system should repeatedly return to; plans, tests, audits, and logs provide local calibration mechanisms.

Nonlinear dynamical system control is the theoretical branch that systematically studies “states, trajectories, stability, manifolds, feedback, observation, and structure preservation.” PHS (port-Hamiltonian systems) is a representative example of the structure-preserving approach. It decomposes a complex system into four structural classes: the Hamiltonian records how much energy is stored in the system; the interconnection matrix records how energy is transferred losslessly among internal variables; damping records irreversible losses such as resistance or friction; ports record the boundaries where the system exchanges energy with the external world. The key role of PHS modeling is to classify the coupling terms in the equations by function: some coupling terms only move energy internally, some represent true dissipation, and some come from external ports. Once these structures are distinguished, control design knows which terms should be preserved and which should be compensated or suppressed.

This article does not try to equate AGE with PHS, but rather borrows the representative vocabulary of PHS to further identify conserved quantities, phase variables, interconnection topology, dissipation mechanisms, and port boundaries in AGE.

Terminology conventions used in this article:

  • AGE: Attractor-Guided Engineering. The core hierarchy is “state space → attractor → trajectory → control.”
  • Harness Engineering: the engineering practice of building execution scaffolding around AI generation, such as guardrails, verification, review, audit, and diagnostics.
  • PHS: port-Hamiltonian systems, the representative language of the structure-preserving approach in nonlinear dynamical system control, describing complex systems using an energy function, interconnection, dissipation, and ports.
  • Hamiltonian: the system’s stored energy function, describing how much energy the system currently holds.
  • Immersion and Invariance: a method that handles nonlinear control, observation, and adaptation problems by constructing a target invariant manifold.
  • owner docs: long-term documents that hold the ultimate interpretive authority for certain categories of facts in the repository, such as architecture baselines, feature designs, or component contracts.
  • closure audit: an audit that re-checks the closure evidence along requirements, owner docs, code, tests, and logs before a task is considered complete.

Compared with PHS, the basic language of AGE still has an underexplored layer:

Between repeated inputs, plans, implementations, verifications, audits, and logs, what exactly is being preserved, transformed, routed, and dissipated?

If we answer in ordinary process language, it is easy to fall back into a linear pipeline:

input → requirement → design → plan → code → test → log
Enter fullscreen mode Exit fullscreen mode

This image misleads the reader. Real development does not simply read the output of the previous stage and generate the next artifact. When writing and reviewing code, the AI typically needs to reference simultaneously: the current requirement, owner docs, live code, tests, a known-good baseline, bugs, logs, the plan, audit results, external contracts, and the reading routes given by the document index and architecture hierarchy.

In other words, AGE is more like a multi-port coupled system; the unidirectional cascade pipeline only describes a local projection of it.

The inspiration from nonlinear control lies exactly here: complex coupling terms are not necessarily noise; many coupling terms are themselves the way the system preserves structure. In motor control, the d-q coordinates—direct-axis and quadrature-axis coordinates that rotate with the rotor—are commonly used; under these coordinates, certain speed-dependent, skew-symmetric cross-coupling terms can represent lossless flow of energy between different coordinates. Similarly, in AGE the cross-references among requirements, architecture, plans, code, tests, and logs bear the topological function of keeping semantic commitments recoverable across different carriers—not just document redundancy.

2. The Structure-Preserving Language of PHS

The basic starting point of PHS is to view a physical system as a combination of “energy storage, interconnection, dissipation, and port exchange.” A common finite-dimensional form can be written as:

dx/dt = (J(x) − R(x)) ∇H(x) + G(x) u
y = G(x)ᵀ ∇H(x)
Enter fullscreen mode Exit fullscreen mode

This formula shows how several core symbols are organized:

  • H measures the energy currently stored in the system;
  • J only moves energy; it neither creates nor destroys energy;
  • R dissipates the system’s internal energy;
  • u is the port input, y is the port output; the pair forms the port power yᵀu;
  • G describes how the ports couple to the internal state.

We can borrow this vocabulary to express three methodological principles from nonlinear control:

  1. First find quantities that tend to be conserved, then judge which errors need to be eliminated.
  2. Distinguish lossless routing from true dissipation; do not mistake “information moved” for “the system converged.”
  3. View “transport, dissipation, and external injection/extraction” separately, and avoid flattening all coupling into a linear task chain.

3. The Feedback-Linearization–Style Software Engineering Fallacy

In control theory, exact feedback linearization attempts to cancel nonlinear terms using coordinate transformations and feedback so that the system behaves as a linear object. This works in some systems, but it can also be highly dependent on exact parameters and destroy the system’s original energy structure.

There is a similar impulse in software engineering: to make things easier for the AI, flatten all knowledge into a single unified artifact—a spec, a change request, a task list, an issue, a pull request description, or some master plan document.

This practice appears to reduce complexity, but it is actually performing an engineering version of “linearization”:

  • Context in raw input is flattened into requirement entries;
  • The long-term structure of owner docs is flattened into this iteration’s task description;
  • Architecture precedence is flattened into a checklist;
  • Historical judgments in logs, bugs, and analysis are flattened into “known items”;
  • Tests and audits are flattened into “completed proof.”

Locally, this makes it easier for the AI to execute. Over the long term, it destroys the semantic topology of the repository. After different types of facts are squeezed into the same coordinate system, the AI no longer knows which material answers “what is,” which material answers “where we should converge,” and which material is only “why we did it that way at the time.”

AGE can use specs and checklists, but it should not forcibly compress all knowledge into the same execution form. docs/architecture/, docs/components/, docs/plans/, docs/logs/, docs/bugs/, docs/analysis/ need to retain distinct responsibilities, because they are different energy ports and different state coordinates within the same repository system.

4. Semantic Commitment as the Energy Storage Function of AGE

In PHS, the Hamiltonian is the system’s stored energy function, answering “how much energy does the system currently hold.” When applied to AGE, we can regard the semantic commitments that must be recovered, preserved, and used to constrain future evolution across sessions as the repository system’s “stored energy”:

H_repo = total amount of semantic commitment in the repository that remains valid
         and must be recoverable across sessions to constrain future evolution.
Enter fullscreen mode Exit fullscreen mode

Here “semantic commitment” means facts, contracts, and judgments that the system has accepted and that should not be casually lost; file word count or number of document entries is not equivalent to semantic commitment. For example:

  • A certain user-visible behavior must exist;
  • A certain schema field has a definite meaning;
  • A certain package dependency direction must not be reversed;
  • A certain renderer contract needs to be stable;
  • The root cause of a certain historical bug must not be reintroduced;
  • A certain audit finding has been falsified and should no longer drive corrective action;
  • A certain owner doc defines the current specification baseline, not a future aspiration.

These commitments can be roughly decomposed as:

H_repo = H_intent + H_requirement + H_owner + H_contract + H_behavior + H_proof + H_memory
Enter fullscreen mode Exit fullscreen mode

These components correspond to:

Component Meaning Typical carriers
Hintent Genuine intent brought by external input User requests, PM explanations, external material
Hrequirement Requirement commitments that the current slice must fulfill requirement, plan goals
Howner Long-term stable structural commitments architecture docs, component design docs
Hcontract Contracts that can be relied upon externally or downstream schema, API, public types, renderer contracts
Hbehavior Actual running behavior in the live repo code, examples, playground
Hproof Re-examinable proof tests, verification, audit evidence
Hmemory Trajectory judgments that should not be forgotten in the future logs, bugs, retrospectives, analysis

An implementation changes the carrier shape of a commitment: the same semantic commitment transforms from “a change obligation not yet fulfilled” into “a stable, recoverable fact in code, tests, owner docs, and logs.”

Hrepo describes only the commitments that have been accepted by the system and need to be retained and recovered. It excludes free uncertainty that has not yet been clarified, assigned, or verified. The latter is recorded separately as:

F_repo = free semantic uncertainty in the repository not yet bound
         to a stable commitment, owner, or proof.
Enter fullscreen mode Exit fullscreen mode

Therefore, Frepo is not a component of Hrepo. It is more like unbound energy floating around the semantic commitments: when requirements are not yet clear, owners not yet determined, tests not yet proven, audits not yet closed—the commitment has emerged but has not yet settled into a stable repository structure.

5. Energy Redistribution Is About Authority Weight, Not File Count

Each folder should not be naively viewed as a separate energy bin. After a requirement is turned into code, the requirement file does not disappear; after an owner doc is updated, the input file still exists. What truly changes is the active authority of the same semantic commitment across different carriers—the redistribution of interpretive power, constraining power, and proving power.

For example, a commitment initially appears in raw input:

"Hidden form fields should not participate in submission."
Enter fullscreen mode Exit fullscreen mode

After it enters the requirement, the raw input is still retained, but the direct interpretive authority for the current implementation transfers to the requirement. After it enters an architecture owner doc, long-term baseline interpretive authority transfers to the owner doc. After it enters code and tests, behavioral execution and proving authority transfer to implementation and verification. After it enters a bug note or log, historical judgment becomes a recoverable memory for future sessions.

Therefore, a more accurate statement is:

Files are not conserved.
The effective weight of semantic commitments is redistributed among multiple carriers.
Enter fullscreen mode Exit fullscreen mode

Within a closed slice, unless an explicit human decision changes the scope, Hrepo should not increase or decrease out of nowhere. What truly should decrease is Frepo—the free semantic uncertainty that has not yet been bound, assigned, or verified.

The goal of AGE can be written as:

preserve H_repo while reducing F_repo.
Enter fullscreen mode Exit fullscreen mode

Requirement clarification, owner-doc alignment, tests, verification, and closure audits bind commitments from a free, vague, driftable state into a stable, recoverable, provable form.

In PHS, R dissipates physical energy H; in AGE, Hrepo represents the total semantic commitment that should be preserved as much as possible, and should not be treated as an object of dissipation. Later, the term R-flow will refer to reducing Frepo—that is, reducing the free uncertainty generated when the same semantic commitment is not yet bound, assigned, or verified.

6. q and p: Stable State Representation and Change Obligation Representation

If we view Hrepo as a scalar defined on some phase space, that phase space requires at least two classes of conjugate variables.

It can be written as:

H_repo(q, p).
Enter fullscreen mode Exit fullscreen mode

Here I borrow the notation q and p to represent two complementary semantic dimensions in AGE, not to treat them as physical position and momentum.

q is the stable state representation:

q_i = the current form in which a certain semantic commitment exists
      within the stable structure of the repository.
Enter fullscreen mode Exit fullscreen mode

It answers: what the system is now.

p is the change obligation representation:

p_i = the directional pressure that a certain semantic commitment exerts
      on future evolution.
Enter fullscreen mode Exit fullscreen mode

It answers: why the system needs to move next, and in which direction.

A simple example explains why the q/p duality is still needed even in one-dimensional cases. Suppose the semantic commitment is:

c = "administrators can export CSV (comma-separated value) files."
Enter fullscreen mode Exit fullscreen mode

When the code currently has no CSV export, two completely different situations can exist:

Situation qc pc AI's expected action
CSV explicitly out of scope currently unsupported no change obligation should not implement
CSV is the top-priority active requirement currently unsupported strong change obligation should implement per plan

Looking only at q, both are “currently unsupported.” But p is completely different.

Conversely, if the current code supports CSV but an owner doc decides to remove it, qc remains “currently supported” while pc becomes a reverse change obligation. Without p, the AI cannot distinguish “stable existence” from “should be deleted but not yet deleted.”

In the AGE documentation system, q is primarily carried by these materials:

  • Current baselines in docs/architecture/;
  • Component contracts in docs/components/*/design.md;
  • Live code and exported types;
  • Passing tests and examples;
  • Schema, public contracts, runtime behavior.

p is primarily carried by these materials:

  • Active plan;
  • Backlog or audit findings;
  • Failing test;
  • Bug report;
  • Open question;
  • Stale-doc conflict;
  • Closure gate;
  • Human decision pending.

This is only a tendency of responsibility, not a fixed directory mapping. The same file may simultaneously carry both q and p. A requirement describes both the target state and the implementation obligation; a plan records both the current baseline and the closure pressure; a bug note records both historical facts and imposes constraints on future changes.

7. Development Is Converting Legitimate p into Stable q

A correct implementation in AGE converts legitimate change obligations into stable state commitments. “Completing the task” is only the surface narrative; what really matters is whether this change has entered a recoverable, provable repository structure.

Again take CSV export as an example.

In the table below, T(p) denotes the total tension or pressure of change obligations—not a new physical energy, but a marker for “why the system still needs to evolve.”

Before implementation:

Component State
Hrequirement high, requirement carries "CSV support needed"
Howner low or needs update, owner doc hasn't absorbed the capability
Hbehavior low, code not yet implemented
Hproof low, no tests or verification
T(p) high, plan/backlog holds change pressure

After implementation:

Component State
Hrequirement still present, but unclosed obligation decreases
Howner increases if it becomes a stable capability
Hbehavior increases, code carries behavior
Hproof increases, tests and verification carry evidence
Hmemory increases, log/audit records closure
T(p) decreases, change obligation released

In engineering language, this is:

active requirement / plan pressure
→ owner baseline / code behavior / proof / memory
Enter fullscreen mode Exit fullscreen mode

The commitment did not disappear; it only transformed from “an obligation to be fulfilled in the future” into “a stable fact the current system already supports.”

This also explains why a closure audit should not merely look at checkboxes. - [x] only indicates that the executor claims something is done. The real question is: has this p been transformed into stable q, or has it merely been moved from plan to summary, from summary to log, from log to the next round of follow-ups?

8. J-flow and R-flow: Routing Is Not Dissipation

In PHS, J represents the lossless interconnection structure, and R represents dissipation. AGE likewise needs to distinguish two completely different classes of actions.

J-flow and R-flow here are engineering labels created in this article by borrowing cybernetic language; they are not standard control-theory terms.

J-flow is the transport and transformation of semantic commitments along the correct topology.

Examples:

  • Raw input is recorded in docs/input/;
  • Requirements are synthesized into a requirement;
  • Stable rules enter an owner doc;
  • A plan references owner docs and the live baseline;
  • Traceable links are established among code/test/log/audit.

These actions themselves do not necessarily reduce uncertainty. They mainly let commitments flow along the correct topology and avoid being stuffed into wrong positions.

R-flow is what truly reduces Frepo:

  • A human explicitly cuts scope;
  • A requirement writes testable acceptance criteria;
  • An owner doc absorbs a stable baseline;
  • Automated tests prove behavior;
  • Focused verification exercises real paths;
  • An independent closure audit overthrows or confirms a completion narrative;
  • A bug note records a non-obvious root cause, reducing the risk of future drift.

This distinction is critical. A great deal of seemingly diligent documentation work is actually only J-flow:

  • Moving ambiguity from input to discussion;
  • Writing an undecided design into a plan;
  • Writing a plan summary into a log;
  • Turning preliminary audit findings directly into a backlog;
  • Writing “should test” as a closure gate, but never truly executing it.

These may be necessary steps, but they mainly change the location of free semantic energy without truly eliminating it. The real danger is mistaking J-flow for R-flow—mistaking “information moved” for “the system converged.”

9. Park Transformation: From Chat Coordinates to Repo Coordinates

From the nonlinear control perspective, the significance of the Park transformation is that it converts the rotational couplings hidden in time-varying three-phase coordinates into d-q coordinates, where power relationships and interconnection structure are easier to identify.

A similar move exists in AGE. The raw chat, PM materials, and discussions in a long context constitute a time-varying, strongly coupled, implicit coordinate system. Requirements, architecture, execution, proof, history, and assumptions are all mixed together. In this coordinate system, the AI can easily mistake exploration for baseline, plans for facts, and historical judgments for current contracts.

The docs/ system performs the function of transforming this mixed semantic field into more stable repo coordinates:

Coordinate Responsibility
docs/architecture/ Current canonical architecture and owner precedence
docs/components/ Component-level contracts and schema semantics
docs/plans/ How this round of work will close
docs/logs/ What happened and short-term context
docs/bugs/ Non-obvious defects and regression risks
docs/analysis/ Exploration, comparison, rejected directions
docs/testing/ Manual or exploratory proof
live code/tests Current implementation facts and executable evidence

This step is more like a coordinate transformation: it turns a hidden semantic interconnection structure into a routable, auditable, recoverable topology. Document classification is only the external form of this coordinate transformation.

One could say:

AGE's document system resembles a Park-style re-coordinatization:
it expresses the time-varying, implicit, strongly coupled semantic quantities
in chat into more stable, routable, auditable responsibility coordinates
in the repository. This process is not lossless transformation; it is a
structured transcription that includes interpretation, assignment, and
evidence binding.
Enter fullscreen mode Exit fullscreen mode

10. Space, Time, and Conservation

If we continue unfolding the energy-function language, “space” and “time” in AGE can also receive a clearer explanation.

Here space refers to the semantic responsibility space, not the filesystem path itself:

space = the set of positions where a commitment can be placed,
        interpreted, constrained, and proven.
Enter fullscreen mode Exit fullscreen mode

It can also be called:

space ≃ semantic ownership topology.
Enter fullscreen mode Exit fullscreen mode

For example, the same commitment “should hidden form fields participate in submission” might simultaneously reside in:

  • docs/architecture/form-validation.md;
  • docs/architecture/data-domain-owner.md;
  • runtime code;
  • validation tests;
  • a historical bug note;
  • plan closure evidence.

These positions are more like coordinate axes; together they define the spatial distribution of this commitment in the repository, rather than forming a before-and-after sequence of stages.

Here time refers to the discrete evolution sequence of the repository state, not the natural calendar:

time = sequence of repository state transitions across sessions.
Enter fullscreen mode Exit fullscreen mode

A plan closure, an audit overturn, a commit, a full-green baseline, an owner-doc update—these are all events in AGE time.

AI does not have human continuous memory. Therefore, AGE time is not psychological time but externalized, recoverable repository time. If a decision exists only in chat and never enters the repository, it barely existed in AGE time at all.

From this, we can define two important homogeneities.

Temporal homogeneity: When the same repository state is re-read on different dates, in different AI sessions, and in different context windows, the same set of effective commitments and execution rules should be recovered.

This is the deep meaning of file-in/file-out:

temporal homogeneity = session translation invariance.
Enter fullscreen mode Exit fullscreen mode

If the AI knows today that a feature is out of scope, but tomorrow in a different session does not know it because it was only written in chat, then temporal homogeneity is broken and Hrepo suffers a semantic leak.

Spatial homogeneity: The same type of semantic commitment, no matter in which local feature it appears, should follow the same ownership, routing, and proof rules.

For example, a permission commitment should not bypass the permission owner doc just because it appears inside a CSV export button; schema authoring semantics should not bypass compiler/runtime contracts just because they appear in an example; a complex host capability should not leak directly into the core scope just because the current implementation makes it convenient.

AGE space is not a uniform Euclidean space but a responsibility space with topology and curvature:

  • Protected areas are high-curvature zones; entering them requires a change in trajectory;
  • Owner docs are centers of a potential field; nearby changes will be pulled back toward the baseline;
  • Stale docs are coordinate singularities and should not be taken at face value;
  • External integrations are open ports that may inject or extract commitments;
  • Audits are observation surfaces, not sources of fact.

Therefore, AGE does not require all spatial points to be homogeneous. It requires homogeneity within the same type of responsibility region, and that cross-region transitions obey clear topology.

11. Immersion and Invariance: From Attractor to Target Manifold

The core idea of Immersion and Invariance is to first construct a target manifold, rather than estimating all unknown parameters accurately. Immersion means embedding the desired low-dimensional target dynamics into the original system’s state space so that the target behavior becomes a set of state relationships the system can reach. Invariance means that once the trajectory lands on this set of relationships, the system evolution will not take it off the manifold. The task of the controller or observer is to make the trajectory converge to this manifold and maintain self-consistent evolution on it.

The relationship to the attractor concept can be understood this way: the attractor answers “what structure the system should converge to in the long term,” while Immersion and Invariance answers “when unknown parameters and local unobservability exist, how to construct a convergent, maintainable target manifold.” The former defines the long-term structure; the latter gives a control-design image for making the trajectory enter and stay near that structure.

In AI development there are also massive “parameters” that can never be fully known:

  • The product manager’s complete true intent;
  • Future user behavior;
  • The full boundaries of external systems;
  • All the historical reasons in legacy code;
  • What the next AI session will misunderstand;
  • The real evolutionary pressure on a certain abstraction six months later.

Traditional approaches easily fall into two extremes: either try to clarify all unknowns before acting, or swallow all unknowns and code directly.

AGE is closer to the Immersion and Invariance compromise:

Do not require knowing all parameters; only require that the current slice
be embedded into, and converge to, a closable invariant manifold.
Enter fullscreen mode Exit fullscreen mode

Corresponding to AGE, owner docs define the long-term attractor; the current plan’s goals, non-goals, accepted assumptions, verification gates, and closure audit define the local target manifold for this slice. A slice does not have to resolve all unknowns, but it needs to state which local manifold it is embedded into, and why it will not escape this manifold after completion.

This manifold is jointly defined by the following materials:

  • goals;
  • non-goals;
  • owner-doc invariants;
  • accepted assumptions;
  • blocking assumptions;
  • verification gates;
  • closure audit;
  • live code baseline.

What a plan should really spell out is:

This slice is permitted to ignore X because X is orthogonal to this closure.
This slice needs to resolve Y because Y changes current contracts or
user-visible behavior.
Enter fullscreen mode Exit fullscreen mode

This does not give a green light to vague requirements. On the contrary, it demands the classification of uncertainty: which unknowns can remain unknown, and which must be eliminated first through human decisions or owner-doc alignment.

12. Structure-Preserving Observer: Audit Is Not Another Narrative Source

The key inspiration from structure-preserving PHS observer design is: an observer can preserve the system’s original structure rather than constructing a separate estimator disconnected from the system topology.

AGE’s audit should be the same. A good closure audit re-observes the system state along the same set of owner-doc precedence, live code, tests, logs, and plan gates; the implementer’s completion narrative is merely material to be verified.

This is also why a closure audit in AGE should not merely ask “is the task done,” but should ask:

  • Has the live behavior truly landed;
  • Does the owner doc still describe the current baseline;
  • Do the tests protect the commitment rather than an accidental implementation;
  • Are the plan’s Goals/Non-Goals still honest;
  • Does the closure evidence exist in the repository, not just in a summary;
  • Have in-scope defects been downgraded to vague follow-ups;
  • Has J-flow been misreported as R-flow.

If an audit does not preserve structure, it becomes another high-density narrative source. It may create new findings, new backlogs, a new sense of completion, without actually reducing Frepo.

Thus, the audit in AGE should resemble a structure-preserving observer: it re-estimates the system state according to the existing fact topology, and calibrates its estimation with live repo evidence; it does not create a separate fact topology.

13. Implications for AGE Practice

The value of this nonlinear control analogy for AGE practice lies in pointing out several directly improvable methodological points. New terminology is meaningful only when it helps distinguish real engineering actions.

1. Plans Should Explicitly Write the Reference Set

Writing and reviewing code both require materials beyond the previous-stage file. A plan can more explicitly require listing the reference constellation for this slice:

## Reference Set

- Context / routing:
- Active owner docs:
- Live code routes:
- Tests / verification baseline:
- Logs / bugs / known regressions:
- External contracts:
- Plan / audit evidence:
Enter fullscreen mode Exit fullscreen mode

This can prevent the AI from treating the plan as the sole source of truth.

2. Plans Should Explicitly Write the Commitment Phase State

Current plans already emphasize baseline, goals, non-goals, and closure gates. The nonlinear control perspective further asks to spell out q/p:

## Commitment Phase State

- Stable state now (`q`):
- Active change pressure (`p`):
- Target stable state after closure:
- Proof that `p` was converted into stable `q`:
- Remaining pressure and why it is non-blocking:
Enter fullscreen mode Exit fullscreen mode

This can distinguish “the behavior currently does not exist because it is stably unnecessary” from “the behavior currently does not exist but needs to be implemented.”

3. Closure Audit Should Check Semantic Conservation

One more question can be added:

Did any in-scope commitment disappear, weaken, or move to a non-authoritative artifact?
Enter fullscreen mode Exit fullscreen mode

This is more accurate than “were the documents updated.” What we truly need to avoid is commitments leaking during transformation.

4. Owner Docs Should Write Stable Commitments

For important owner docs, structures like the following can be gradually added:

## Stable Commitments

## Allowed Variation

## Drift / Leakage Signals

## Correction Path
Enter fullscreen mode Exit fullscreen mode

This makes owner docs more like structural equations than instruction manuals.

5. Audit Prompts Should Distinguish J-flow and R-flow

During an audit, one should ask:

Which changes merely routed commitments between artifacts?
Which changes actually reduced free semantic uncertainty through
decision, proof, or owner-doc alignment?
Enter fullscreen mode Exit fullscreen mode

This avoids mistaking “more documents were written” for “the system has become more convergent.”

14. Conclusion: The Nonlinear Dynamical System Control Image of AGE

If AGE is reinterpreted under the lens of nonlinear dynamical system control, it can be seen as a structure-preserving AI engineering control system. PHS provides the representative vocabulary of energy, interconnection, dissipation, and ports; Immersion and Invariance supplements the image of a target manifold, unknown parameters, and trajectory convergence.

This image can be summarized as:

  • Hrepo is the total semantic commitment that should be conserved across sessions;
  • q is the stable state representation of commitment;
  • p is the change obligation representation of commitment;
  • Development is the conversion of legitimate p into stable q;
  • J-flow is responsible for routing commitments along the correct ownership topology;
  • R-flow is responsible for reducing free semantic energy that is unbound, unverified, and unassigned;
  • The docs system is a Park transformation from chat coordinates to repo coordinates;
  • File-in/file-out maintains temporal homogeneity, i.e., session translation invariance;
  • Owner docs, plans, tests, audits, and logs together form a multi-port coupled convergence mechanism.

The core judgment is:

The disorder in AI development is not just noise; it is often semantic energy that has not yet been correctly coordinatized. The next step for AGE is to more clearly model how these semantic commitments are injected, routed, stored, transformed, proven, and conserved, rather than simply piling on more processes.

Therefore, AGE can be understood as:

A nonlinear dynamical system control image for software engineering under high-speed AI perturbation: use owner docs to define the attractor, use plans to embed the current slice into a local target manifold, use routing to preserve structure, use verification/audit to reduce free semantic energy, and use logs/bugs to preserve the trajectory memory across time.

Appendix: PHS Mathematical Background

PHS is a structured modeling framework developed by van der Schaft, Maschke, and others around the 1990s around nonlinear systems, generalized bond graphs, and port interconnections, and is closely intertwined with the passivity-based control and energy shaping work of Ortega and others. Its difference from ordinary state-space models lies in putting the energy function and interconnection topology first. Mechanical systems, electrical circuits, motors, power networks, and fluid networks can all be viewed under this perspective as combinations of energy-storage elements, dissipative elements, and port interconnections.

Interconnection and Damping Assignment Passivity-Based Control further applies this approach to control design: the controller does not simply cancel nonlinearities, but reconfigures the closed-loop system’s interconnection structure and damping distribution so that the closed-loop energy function has the desired shape. Structure-preserving observers, PHS network stability, and passive interconnection of microgrids all inherit the same judgment: preserving structure is often more robust than flattening it.

A common form of finite-dimensional PHS is:

dx/dt = (J(x) − R(x)) ∇H(x) + G(x) u
y = G(x)ᵀ ∇H(x)
Enter fullscreen mode Exit fullscreen mode

where:

Symbol Meaning
x System state, e.g., mechanical position/momentum, circuit flux linkage/charge
H(x) Total energy function of the system
∇H(x) Gradient of energy with respect to state, also often called co-energy variables; under specific port choices can correspond to conjugate quantities like force, voltage, current
J(x) Skew-symmetric interconnection matrix, satisfying J(x)ᵀ = −J(x), represents lossless energy routing
R(x) Positive semidefinite dissipation matrix, satisfying R(x) = R(x)ᵀ ≽ 0, represents dissipation such as resistance, friction
G(x) How external ports couple into the system
u Port input, e.g., applied voltage, external force
y Port output, usually paired with u to form input power yᵀu

Taking the derivative of H along system trajectories:

dH/dt = (∇H)ᵀ ẋ = (∇H)ᵀ J ∇H − (∇H)ᵀ R ∇H + (∇H)ᵀ G u.
Enter fullscreen mode Exit fullscreen mode

Since J is skew-symmetric, for any vector a we have aᵀ J a = 0. Therefore:

dH/dt = − (∇H)ᵀ R ∇H + yᵀ u.
Enter fullscreen mode Exit fullscreen mode

If there is no dissipation and no external input, i.e., R = 0 and u = 0, then dH/dt = 0—energy is conserved. If u = 0 but R ≽ 0, then dH/dt ≤ 0—the system energy is non-increasing. This is the fundamental reason why passivity-based control and energy shaping can work.

Integrating the above from 0 to t gives the passivity inequality:

H(x(t)) − H(x(0)) ≤ ∫₀ᵗ y(τ)ᵀ u(τ) dτ.
Enter fullscreen mode Exit fullscreen mode

It expresses that the increase in stored energy will not exceed the total energy injected through the external ports. The system can store energy, release energy, and dissipate energy, but cannot create energy out of nothing.

This inequality explains why PHS is particularly suitable for network systems. If two passive systems are interconnected in a power-conserving way, for example:

u₁ = −y₂, u₂ = y₁,
Enter fullscreen mode Exit fullscreen mode

then the sum of the two port powers is:

y₁ᵀ u₁ + y₂ᵀ u₂ = y₁ᵀ (−y₂) + y₂ᵀ y₁ = 0.
Enter fullscreen mode Exit fullscreen mode

The interconnection itself neither injects nor dissipates energy; it only moves energy between the two subsystems. Therefore, lossless interconnection of passive systems remains passive. This property is key to extending PHS from single motors, robot arms, and circuits to microgrids, networked systems, and large-scale physical systems modeling.

The minimal canonical Hamiltonian system can be written as:

x = (q, p),

[ dq/dt ]   [ 0  I ] [ ∂H/∂q ]
[ dp/dt ] = [ −I 0 ] [ ∂H/∂p ].
Enter fullscreen mode Exit fullscreen mode

Here q is a position-like variable, p is a momentum-like variable, and the matrix in the middle is the most basic symplectic structure. Its role is not to dissipate energy, but to let energy reciprocally convert between “positional potential energy” and “momentum kinetic energy.”

If dissipation and ports are added, we obtain a more general form:

[ dq/dt ]   [ 0  I ] [ ∂H/∂q ]
[ dp/dt ] = [ −I 0 ] [ ∂H/∂p ] − damping terms + port input terms.
Enter fullscreen mode Exit fullscreen mode

The reason the Park transformation is important in electric motors is that it converts the time-varying rotational relationships in stationary three-phase coordinates into d-q coordinates, making speed-dependent cross-couplings easier to identify as part of the interconnection structure. From the energy perspective, such a cross-term is not an ordinary disturbance, but a structural channel through which energy flows among the d-axis, q-axis, and mechanical momentum.

This fact can be seen from a two-dimensional skew-symmetric matrix:

S = [ 0  −1 ]
    [ 1   0 ],  Sᵀ = −S.
Enter fullscreen mode Exit fullscreen mode

For any 2D vector z, we have zᵀ S z = 0. If a local dynamic contains a term ω S z, it will cause the two components of z to rotate mutually and exchange energy forms, but it will not change the quadratic energy ½ zᵀ z:

d/dt (½ zᵀ z) = zᵀ ż = zᵀ (ω S z) = ω zᵀ S z = 0.
Enter fullscreen mode Exit fullscreen mode

This is why the PHS perspective cautions against the intuition to “cancel all cross-coupling terms.” Some cross-terms are not errors, but the manifestation of system topology in local coordinates.

AGE Application Development Template

Top comments (0)