Skip to content

feat: type write-sessions as decision in the memory loop (decision journal v0) #143

Closed

Description

@ajianaz

What (description of the change)

Upgrade the harness memory loop so that any session which performed at least one Write/Destructive tool call is stored to uteke with --type decision and an extra wrote tag, instead of today's hardcoded --type context (memory.rs, remember_session, --type context + tags tole,session).

  • drive() (turn.rs) tracks a wrote: bool flag, set when settle_ok lands for a tool with risk() != ReadOnly.
  • TurnOutcome::Final gains a wrote: bool field; the host's remember() (main.rs) passes it through.
  • remember_session picks --type decision + tags tole,session,wrote when wrote=true; behavior otherwise unchanged.
  • Content stays first_prompt + last_answer — no raw tool output, no extra LLM call (v0 scope). This keeps the prompt-injection-into-memory surface closed (ToxicSkills lesson); threat-model.md gets a short note.
  • With --memory off: byte-identical behavior.

Mechanical fallout: ~6–8 match sites destructure TurnOutcome::Final { .. } (main.rs, tests, evals) — additive field update only.

Design agreed in the 2026-10-01 CTO/owner discussion (v0 without a summarizing LLM call; content-quality upgrade deliberately parked).

Why (the problem you're solving)

Software-factory research (Oct 2026): comprehension debt — the gap between code a team ships and code it understands — is countered organizationally by decision journals ("design-decision summary required on every PR"). tole's memory loop already persists per-session summaries; typing write-sessions as decision makes "recall every decision made in this repo" a first-class uteke retrieval instead of an undifferentiated context stream. Smallest possible change, and it lands before the stop-gate PR (#145: turn.rs, main.rs) per the stacked-PR pattern.

Testing (how you verified this works)

  • Unit (fake-binary pattern already in memory.rs tests): read-only session → --type context, tags unchanged; session with one write → --type decision + wrote tag.
  • TurnOutcome::Final destructure sites compile; full suites green on both feature profiles (default + --no-default-features).
  • Live E2E: one real tole run that writes a file → uteke recall in the session namespace returns the entry typed decision.

Activity

  1. added
    enhancement
    harness
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementharness

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions