Skip to content

feat(selflearn): dedicated /evolve panel with model-decided Auto trigger#311

Open
yanmxa wants to merge 1 commit into
genai-io:mainfrom
yanmxa:enhance-self-learning
Open

feat(selflearn): dedicated /evolve panel with model-decided Auto trigger#311
yanmxa wants to merge 1 commit into
genai-io:mainfrom
yanmxa:enhance-self-learning

Conversation

@yanmxa

@yanmxa yanmxa commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

A dedicated /evolve overlay for self-learning (Skills + Memory tabs), split out of /config and styled like the AutoPilot panel — plus a new Auto (model-decided) trigger.

Skills tab

  • Config drill-downs: per-action permissions (create / update / delete), create cadence, an editable Strategy prompt, and a Learned skills inventory (browse / scroll SKILL.md / prune) with a RECENT activity recap.
  • Triggers:
    • Rule mode (default): update/delete fire on a turn that used a skill; create fires every N tool-iterations of skill-free work.
    • Auto mode (opt-in): “Model decides when to learn” injects an Evolve tool into the main agent. Calling it queues a self-learning review at turn end — scoped by skill use, bounded by the permission gates. Rule triggers are bypassed; toggling Auto rebuilds the agent so the tool appears/disappears.

Memory tab

Gated to a Coming soon placeholder until the arm ships.

Engine

  • Trigger-aware reviewer prompt rewritten from first principles (CASE A: a skill ran → keep/update/delete; CASE B: new work → create; NEVER-a-skill exclusions).
  • Per-arm Strategy override threaded into the review fork; configurable memory path.
  • Evolve is a safe (auto-permitted) signal tool — the L1 review still runs out-of-band in the background fork; the model never writes skills itself.

Testing

  • go build ./..., go vet ./internal/..., go test ./... all green; layercheck clean.
  • New tests: reviewer Auto-mode trigger, Evolve tool gating (main-agent-only), panel Auto toggle, safe-tool classification.
  • Manual Auto-trigger steps documented in docs/packages/2-feature/selflearn.md.

🤖 Generated with Claude Code

@san-ci san-ci Bot added the dco:no label Jul 16, 2026
@san-ci

san-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[DCO NOTIFIER] Hi @yanmxa! Some commits in this PR are missing a Signed-off-by.

What to do:

git commit --amend -s
git push --force

Or to sign off the most recent commit without changing the message:

git commit --amend --no-edit -s
git push --force

Once all commits are signed, the dco:no label will be automatically removed and replaced with dco:true.

@san-ci

san-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[REVIEW NOTIFIER] This PR requires a review from @hchenxa.

Once this PR has been reviewed and has the lgtm label, it will be automatically squash-merged.

Suggested reviewer

Based on OWNERS, @hchenxa is suggested to review this PR.

How to get your PR reviewed:

  • Address reviewer feedback and push changes
  • Reviewer adds lgtm label when satisfied
  • An approving review + lgtm will trigger auto-merge

@san-ci

san-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[REBASE NOTIFIER] Hi @yanmxa! This PR has merge conflicts.

The lgtm label has been removed and the reviewer will need to re-review after you fix this.

How to fix this

resolve the conflicts — Fix the merge conflicts locally, then push the resolved changes.

After fixing:

  • The need-rebase label will be automatically removed
  • Request a new review from the OWNERS file
  • The reviewer can add lgtm once satisfied

@yanmxa yanmxa force-pushed the enhance-self-learning branch from 6382cb2 to e83ba84 Compare July 16, 2026 14:52
@san-ci san-ci Bot removed the need-rebase label Jul 16, 2026
@yanmxa yanmxa force-pushed the enhance-self-learning branch from e83ba84 to 05d39fe Compare July 16, 2026 15:42
Give self-learning its own /evolve overlay, styled like the AutoPilot panel,
and drive it entirely by the model rather than by rules/cadence.

Trigger: one Evolve tool is injected into the main agent when self-learning is
active; calling it queues a background review at turn end. There is no cadence —
the model decides when a turn is worth learning from. The tool's description is
built from the enabled capabilities (tool.SelfLearnToolInfo), so the model is
only invited to flag learnings the review can act on (memory off never mentions
memory; all-off omits the tool entirely).

Review: a background fork reflects on the turn with only skill_manage +
memory_write and writes memory and/or a skill (or nothing). Skills are scoped by
skill use (skill-used → update/delete, skill-free → create); the create/update/
delete gates are pure permissions. Writes go to San's own agent-memory store,
kept separate from user-authored SAN.md / CLAUDE.md.

Panel: one unified panel (no Skills/Memory tabs) — a shared Strategy editor, the
skill permission gates, the memory store settings (enable / max KB / path), and
a "Learned" drill-in that browses & prunes both agent-created skills AND
agent-written memory files (grouped, view/delete each), plus a RECENT recap of
both arms. The reviewer prompt keeps a shared skeleton with per-arm sections and
one shared Strategy override.

Docs: internal/selflearn package doc updated for the model-decided flow and
manual testing steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yanmxa yanmxa force-pushed the enhance-self-learning branch from 05d39fe to f6586b3 Compare July 16, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant