Principle:AMAP ML SkillClaw Session Aggregation
| Knowledge Sources | |
|---|---|
| Domains | Data_Aggregation, Skill_Evolution |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
A session aggregation pattern that groups session recordings by the skills they reference, enabling targeted per-skill evolution and new skill creation from unreferenced sessions.
Description
Session aggregation addresses the problem of routing session evidence to the appropriate evolution target. The SkillClaw pattern uses a simple but effective rule: if ANY interaction in a session references a skill, the entire session is included in that skill's evolution group. A session referencing multiple skills appears in each skill's group. Sessions referencing no skill go into a special `NO_SKILL_KEY` group used for creating entirely new skills. This many-to-many grouping ensures that overlapping skill improvements can benefit from the same session evidence.
Usage
Use this principle when designing systems that need:
- Many-to-many grouping of evidence to targets
- Discovery of new skill opportunities from unreferenced sessions
- Simple, deterministic aggregation without LLM calls
Theoretical Basis
The aggregation is a set-membership partition:
Failed to parse (syntax error): {\displaystyle \text{group}(s) = \text{skills\_referenced}(s) \cup \{\text{NO\_SKILL}\}} if empty
# Abstract algorithm (NOT real implementation)
def aggregate_by_skill(sessions):
groups = defaultdict(list)
for session in sessions:
skills = session._skills_referenced
if not skills:
groups[NO_SKILL_KEY].append(session)
else:
for skill in skills:
groups[skill].append(session)
return groups