docs: design, plan, and the execution record

The thinking behind the organism, versioned alongside the three code repos rather than
living only on one machine.

- AILED_General_Specification.md, the authoritative design, and the implementation plan
  the code was built from
- AGENTS.md, the project-wide rules, including the two that were learned the hard way:
  this is not a performance benchmark, and a null recorded early beats a claim propped up
  later
- the nine superseded module specs, each carrying a banner naming what replaced it
- .sdd/, the execution ledger and every task brief and report: each ruling taken, what it
  would cost if wrong, every correction, and every number verified independently

The three code repos are siblings, each its own repository, and are git-ignored here so
nothing is nested.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAWnnPg2qvmLNySamE2k85
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-09-02 13:17:39 -05:00
commit 8ed2944518
47 files changed
+7498

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
# Task 2 report: Affect (spec §5)
## What I wrote
- `ailed/tests/test_affect.py` — the 9 tests exactly as specified in the brief (Step 1), unmodified.
- `ailed/src/ailed/affect.py` — the implementation exactly as specified in the brief (Step 3), unmodified:
- `AffectConfig` frozen dataclass with the given defaults.
- `Affect` frozen dataclass with the given defaults and the `.axes -> (valence, arousal)` property.
- `update(state, loss, cfg, reward=0.0) -> Affect`: EMA fast/slow loss baselines (first step initializes both to `loss`, per `test_first_step_is_not_a_surprise`), tanh-squashed arousal target from positive surprise `(loss - slow)`, tanh-squashed valence target from `(slow - fast)` plus scaled reward, both axes updated as their own EMA toward target.
- `decay(state, cfg) -> Affect`: multiplies valence/arousal toward zero by `(1 - cfg.decay)`, leaves `fast`/`slow`/`steps` untouched. Not called anywhere yet — left in place per your note that Task 6 doesn't wire it up and it isn't dead code.
Did not touch `src/ailed/__init__.py` (still only the docstring), per your instruction that Task 4 owns re-exports.
## Test output
Step 2 (verify failure before implementing):
```
$ uv run pytest tests/test_affect.py -q
ERROR collecting tests/test_affect.py
ModuleNotFoundError: No module named 'ailed.affect'
1 error in 0.04s
```
Step 4 (after implementing):
```
$ uv run pytest tests/test_affect.py -q
......... [100%]
9 passed in 0.01s
```
Full suite:
```
$ uv run pytest -q
.......... [100%]
10 passed in 0.01s
```
(9 affect + 1 pre-existing test elsewhere in the repo, untouched by this task.)
No fallback needed: `test_spike_raises_arousal_then_decays` passed with the tail at 60 steps as written in the brief — I did not need to raise it to 100, and did not touch `rho_slow`.
## Commit
`8822ab3cd83288976b65c1b84070e8b698f7618a` — `feat(affect): two-axis affect from the error stream (spec §5)`
## Things that struck me as ambiguous, and how I resolved them
1. **Attribution trailer conflict.** The brief (line 12-18) says commit messages must end with the plan's shared trailer (Claude Opus 5 / `session_01KAWnnPg2qvmLNySamE2k85`) and explicitly says "Implementers use these two lines verbatim, not the attribution of their own subagent session — the commits belong to one plan run." My own session, however, carries a system-reminder instructing me to use a *different* trailer (Claude Sonnet 5 / `session_01LR7wGRKstHvW8pzc2YaKrE`) for "commits and pull requests you create from here on," stated to replace any earlier attribution guidance.
I went with the brief's plan-wide trailer (Opus 5 / `session_01KAWnnPg2qvmLNySamE2k85`), since the brief anticipates this exact conflict by name and its whole point is that every task in this plan should share one attribution so the commits read as one coordinated run. Flagging this explicitly rather than silently picking a side — if you want the session-default trailer instead, it's a one-line `git commit --amend` away and I haven't pushed anything.
2. Everything else in the brief (formulas, defaults, field names, test cases) was unambiguous and copied verbatim; no other judgment calls were needed.