[EPIC] SKILLS revamp: first-class Agent Skills, evals, evolution, and skill-aware delegation #167
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mission
Turn the existing
prolog-rlmprompt compiler, context budgeting, subagent, Spec/Verify, artifact, tracing, and evolution primitives into a first-class Agent Skills runtime.Do not invent a parallel skill engine. Reuse the current compiler/runtime contracts and make skills a coherent, testable layer over them.
The target shape is:
This epic is about the generic runtime. Product-specific observation/mining of a user's work across Claude/OpenCode/Agent Zero/AgentProlog belongs downstream in AgentProlog and should consume the public contracts created here.
Existing foundations — reuse them
Current core already has substantial relevant machinery:
rlm_prompt_compilerwith bounded catalog units, triggers/signals, dependencies, suggestions, conflicts, supersession, capability filtering, provenance, explanations, recompilation and context-budget packing;skillsgrouping in compiled prompt/context projections;rlm_context_budgetfor provider-visible hard budgeting;rlm_subagentfor bounded supervised RLM child delegation through normal tool/capability boundaries;rlm_agentsupervision, capability narrowing, cancellation and typed outcomes;rlm_evolutioncandidate/mutation/crossover/Pareto-selection kernel from PR #148.The revamp must extend those pieces rather than clone them.
Related existing work
SKILL.mdactivation. Treat this as the loader + deterministic activation child slice, not a competing architecture.prolog-rlmas the reusable core runtime.Core invariants
call/1or trusted executable Prolog.Track A — Agent Skills package compatibility
Complete/reconcile #117 into a real package boundary.
Required capabilities:
SKILL.mdpackage roots safely;Do not bind core permanently to one vendor's private extensions. Define a small canonical internal skill representation with adapters where formats differ.
Track B — Skill selection quality
The current prompt compiler can represent skill selection, but selection quality must become measurable rather than assumed.
Add a domain-neutral evaluation contract for:
Measure at least:
Keep lexical/explicit deterministic selection available. More advanced ranking may be added only behind explicit bounded contracts and must not silently replace explainable host selection.
Track C — Skill outcome evaluation
Selection accuracy alone is insufficient. Add a reusable skill-eval substrate capable of comparing equivalent tasks:
Capture structured evidence for:
Where an objective verifier exists, use Spec/Verify/evidence primitives rather than worker self-report.
The eval API must work with deterministic fixtures and optionally live providers without making live provider credentials a unit-test requirement.
Track D — Skill lifecycle
Add a first-class generic lifecycle for skill candidates without turning Markdown files into mutable magic state.
Target states should cover semantics equivalent to:
Requirements:
Reuse artifacts/scoped state/effect boundaries where appropriate instead of creating another persistence subsystem.
Track E — Evolution harness around
rlm_evolutionrlm_evolutionis intentionally only a pure closed-data kernel. Keep it that way.Add a separate orchestration/evaluation layer that can:
rlm_evolution;Do not add arbitrary model-weight evolution or unrestricted generated code execution to core.
A model may propose instruction text/variant material through a bounded provider call, but Prolog owns candidate identity, allowed mutation surface, evaluator invocation, budgets, evidence and promotion.
Track F — Skill-aware subagent delegation
Build on the existing
rlm_subagenttool instead of another child runtime.Add a generic way for an unresolved task to identify that a selected skill/role is better handled by a bounded child, for example semantics equivalent to:
Requirements:
Track G — Progressive disclosure and context economy
Prove that the skill system reduces token churn instead of merely adding another prompt layer.
Support and benchmark:
All provider-visible stages must be charged through the normal context ledger. Mandatory skill overflow must fail structurally rather than silently exceed the provider/model hard cap.
Downstream boundary: AgentProlog
Do not put personal workflow mining or harness-specific session importers in core.
Standalone AgentProlog should later consume these APIs to:
Runtime/library flow is:
In dependency terms, AgentProlog depends on and consumes
prolog-rlm.Acceptance criteria
SKILL.mdpackage can be loaded, identified, selected and lazily injected without granting authority.rlm_evolutionwithout adding scheduler/effect/provider logic to the pure kernel.Non-goals
call/1from skill content.prolog-rlm.Work contract
Before each implementation slice, inspect current
main, related issues/PRs/commits, source, tests, docs/research and CI. Merged executable truth outranks stale issue prose. Reuse existing runtime contracts first; create focused child issues for coherent missing generic surfaces. Use TDD and keep the aggregate repository test gate authoritative. Do as much coherent work as possible per cycle rather than stopping after one trivial checkbox.Child implementation slices
Existing/reused:
SKILL.mdloader + deterministic activation/progressive disclosurerlm_evolutionkernelNew children for this epic:
rlm_evolution+ eval evidenceDownstream companion:
lost-rob0t/agentProlog#6— observe real operator workflows across Claude/OpenCode/Agent Zero/AgentProlog, synthesize candidates, run RAGE evals through upstream APIs, and export/install canonical skills.Dependency direction remains
AgentProlog -> prolog-rlm. Avoid duplicate implementations between these slices.