View on GitHub

AICTX

Repo-local continuity runtime for coding agents

Strategy Memory

Strategy Memory stores successful execution patterns that may be reused in similar future tasks.

It answers:

What worked before in this repo?

It is not a planner, task runner, or autonomous decision system. It is repo-local memory of observed successful work.


Artifact

.aictx/strategy_memory/strategies.jsonl

Each row is an inspectable record of a previously successful execution pattern.


What it can store

A strategy record may include:

The exact fields may evolve, but the purpose is stable:

preserve useful successful execution patterns

How it is created

Strategy Memory is updated during finalize_execution() when an execution provides enough useful evidence.

Good candidates include executions with:

AICTX should not store empty or noisy executions as useful strategies.


How it is used

Strategy Memory can be used in three places.

During prepare

prepare_execution() may select a related prior successful strategy and include it in the prepared continuity context.

Through aictx suggest

aictx suggest --request "fix startup banner" --json

This can return suggested entry points, files, related commands/tests, and why a strategy matched.

Through aictx reuse

aictx reuse --request "fix startup banner" --json

This exposes a reusable successful strategy when one is available.


Selection signals

Strategy selection can consider:

The result is a hint, not an instruction.


Strategy Memory vs Failure Memory

Strategy Memory = what worked before.
Failure Memory = what failed before.

This distinction is important.

A failed execution may be valuable, but it should not become a positive strategy hint. Failed paths belong in Failure Memory and debugging context.


Strategy Memory vs Work State

Work State = current suspended task state.
Strategy Memory = reusable successful historical pattern.

If active Work State exists, it usually matters more than a historical strategy because it represents live unfinished work.


Agent behavior

Agents should treat Strategy Memory as guidance.

Good usage:

A prior successful strategy touched these files and ran these tests. Start there if relevant.

Bad usage:

Repeat the previous strategy blindly.

Limits