Skip to content

feat(experience): self-evolution line 2 — capture & reuse concrete findings (re-target to main)#43

Merged
ignorejjj merged 17 commits into
mainfrom
feat/skill-distill
Jun 30, 2026
Merged

feat(experience): self-evolution line 2 — capture & reuse concrete findings (re-target to main)#43
ignorejjj merged 17 commits into
mainfrom
feat/skill-distill

Conversation

@ignorejjj

Copy link
Copy Markdown
Member

Re-targets the line-2 work to main. PR #42 was merged into its stacked base feat/trajectory-export after that branch had already merged to main via #41, so line 2 never actually landed in main. This PR brings it in (16 commits; the line-1 trajectory commits are already in main via #41, so the diff is line 2 only).

What lands

  • RecordFinding tool (agent logs concrete discoveries mid-run) + finalize mining.
  • Per-session EXPERIENCE.md; intake recall → LLM selection → ask user → compose+inject into the launched instruction; cross-session [xN] merge.
  • LLM abstraction (thread-safe in the finalize loop), placeholder-leak fix, live-capture insight fix.
  • News entry (en + zh).

Verified on a real run (claude/4141): agent autonomously logged a macOS-taskset pitfall and an argpartition 28x→40x trick; mining added GEMM-vs-cKDTree and a GIL dead-end. Off by default (coordinator.distill_skills).

ignorejjj added 17 commits June 29, 2026 14:22
Adds ~/.arbor/skills/<domain>/ as a library tier (built-in < library < project)
and a deterministic distiller: at finalize, merged/done node insights + the root
global insight become a learned-<run>.md, auto-loaded by future runs via the
existing LoadSkill flow. Off by default (coordinator.distill_skills); LLM-level
abstraction + dedup are later refinements.
Distiller now emits altitude-tagged fragments: meta (cross-domain strategy from
tree shape/pruned dead-ends) and domain (verified idea-class wins/losses).
Task-specific findings stay in REPORT/trajectory, out of the library. Stored
under skills/<level>/<domain>/; registry walks recursively. Recall can weight by
altitude so high-level transfers widely, domain only on match.
Recover the project name from the session path when tree meta lacks a domain, so
domain-layer skills file under skills/domain/<project>/ and recall can match by
domain. Meta-layer stays general (cross-domain).
meta/ skills load everywhere; domain/<d>/ skills load only when <d> matches the
current project name. A run reuses its own domain's lessons + cross-domain
strategy, never an unrelated domain's task tricks. Deterministic, no LLM, no prompt.
…alize

Two halves: append_experience logs a lesson each time the coordinator updates a
node (status/insight) so the research *process* is kept, not just the surviving
tree; the distiller then folds experience.jsonl into the cross-domain meta skill
alongside tree shape. Sources = interaction-driven node updates + hypothesis tree.
One learned.md per (level,domain) that reinforces instead of one file per run.
Dedup by normalized text; [xN] count = confidence, recurring lessons rank first.
Repeated runs bump counts rather than pile up. Cross-run accumulation, no LLM.
… skill library

Drop the global ~/.arbor/skills tier (was bloating the curated skill menu).
Each run writes EXPERIENCE.md in its session; recall.find_similar scans past
sessions and ranks by topic-term coverage. Intake surfaces strong matches and
asks the user; accepted ones get composed for the agent (compose step next).
Intake system prompt lists past runs that left EXPERIENCE.md and tells the agent
to offer the relevant one and ask the user (default yes) when the goal matches.
compose_for_topic assembles a tailored block from topic-matched sessions for the
agent. Closes the loop: store -> recall -> ask -> compose. No skill-menu bloat.
…le principles

distill_to_session takes a provider; when coordinator.distill_abstract is on, it
lifts task-specific bullets ('argpartition at d=16') to principles ('prefer
partial selection over full sort'). Any failure falls back to deterministic
bullets, so distillation never breaks. Off by default.
…instruction

LaunchExperiment gains apply_experience: when the user agreed at intake, matched
prior lessons are composed and prepended to the instruction the coordinator runs
on. Off -> unchanged. store->recall->ask->compose->inject is now closed.
…n + fixes

- Distill into transferable sections (Try first / Avoid / Key lever / Pitfalls /
  How to approach) via an LLM pass, with a clean deterministic fallback — what a
  next run actually needs to decide, not a win/loss dump.
- Fix abstraction never firing: run the provider call in a thread so it works
  inside the live finalize loop (asyncio.run no longer raises).
- Drop the heading-as-bullet wart; live capture now grabs the node's real insight.
- Recall selection is LLM-driven: intake names experience_sessions it judged
  relevant; keyword match is only a fallback.
…l + B: mine)

Replace the rigid 5-section template with what was actually wanted: specific,
situational findings worth remembering next time on the same dataset/task/harness
-- a dataset quirk that helps the metric, a trap an executor or harness fell into.
- A: RecordFinding tool lets the agent log a finding the moment it hits one.
- B: finalize mines the run for concrete findings that were never logged.
EXPERIENCE.md is now free-form '[leverage|pitfall] about: note', deduped.
…bject

The literal 'about:' in the format example made the model echo 'about' as the
subject. Use SUBJECT in the template and blank any leaked about/subject placeholder.
…ence count

Compose now dedups findings across the selected sessions and tags each [xN] =
seen in N runs, ranking recurrent (more trustworthy) findings first. Cross-session
confidence without a global library — fits the per-session storage model.
@ignorejjj ignorejjj merged commit 01c9dd4 into main Jun 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant