Skill architecture

Table of Contents

1. Summary

This document is the working index into the compass skill framework. It carries the vocabulary a reader needs to navigate the cluster, the dispatch mechanism by which a target resolves to the operations available on it, the three entry points into the model, and a map of the pages treating each part in detail.

The Cybernetic Skills Framework specifies the framework: it derives the regulatory functions from the primitives of a control loop, states which things the framework models and which it leaves to the agent, and gives the criterion by which a skill is retired. Read it for what the framework is and why. Read this page to find your way around it.

The framework rests on academic foundations, principally Cybernetics and MASD, and on empirical foundations drawn from skill collections published by other developers. We have attributed provenance as fully as we can, but please report any we may have missed.

2. Detail

2.1. Key Concepts

A skill in agent tooling is "a document that an assistant loads to perform a kind of work" (c.f. Agent skills). The compass framework refines that general notion: a skill is one action applied to one typed target. Compass represents a skill as a document type, one of many defined by the documentation ontology; that same ontology supplies some of the types the targets are drawn from. A comparative analysis was performed across academic and industrial literature (c.f. Skills in the Compass Skill Framework), and resulted in the action model that follows.

2.1.1. The Dispatch Model

The model is a dispatch system. A target has a type. A type implements one or more regulatory functions, each declaring the operations available on it. An action implements an operation for a type, and where behaviour is the same across every implementing type, a single action serves them all. Dispatch resolves a target's type, finds the regulatory functions that type implements, and offers the operations those regulatory functions declare. The session's scope decides which of those operations it is offered.

For programmers. A regulatory function behaves like a trait in Rust or Scala, and the analogy is close enough to be worth stating.

A target is an object. Its type is the class. A regulatory function is an interface the class implements, and a class may implement several: a recipe implements both loading and execution, which is why the classification cannot be a class hierarchy. An operation is a method the function declares, and an action is its implementation. Because an action is registered against a type rather than written inside it, this is closer to a generic function with multiple dispatch, or to a Rust trait, than to a method on a class; an operation that does not vary across types is written once as a default implementation.

Dispatch is then what you would expect: given an object, ask what it implements and offer the methods of those interfaces. The one departure is scope, which has no counterpart in an ordinary trait system. There an interface belongs to the class and every caller sees the same methods; here the caller's role decides which methods it is offered, so the same object presents a smaller surface to a session at S1 than to one at S3* (c.f. cybernetic levels).

The three sections below take those parts in turn: what a thing is and what it participates in, what may be done to it and what does the doing, and how the operation is found and who may be offered it.

2.1.2. Types and Regulatory Functions

A regulatory function classifies artefacts (c.f. Physical Space) by the relation an agent bears to them: the agent loads a source, cites a stance, sequences a method, executes an action, declares a specification, convenes a deliberation, and records against an artefact carrying a lifecycle.

A type may implement several regulatory functions, which is why the classification is by regulatory function rather than by class. A recipe implements both loading, since it is consulted for its command, and execution, since its script is run. The regulatory functions document treats the taxonomy, the criterion behind it, and which document type implements what.

2.1.3. Operations and Actions

An operation is declared by a regulatory function; an action implements it for a type. The distinction matters because it is what keeps the catalogue small.

Actions are registered against a target's type rather than written into it, which makes this closer to multiple dispatch than to methods on a class. An operation whose behaviour does not vary across implementing types is written once and inherited by all of them, in the way a regulatory function carries a default implementation, and only genuinely type-specific behaviour is specialised. A catalogue that instead paired every operation with every type by hand would grow as the product of the two, and every pairing left unwritten would be a capability that could not be found.

2.1.4. Dispatch and Scope

Dispatch resolves a target's type and offers the operations its regulatory functions declare, so the applicable operations are computed rather than remembered. An agent holding an artefact can therefore ask what may be done with it, rather than needing to know the name of the action it wants.

Scope narrows that offer. An actor declares a System, whose cybernetic level determines which operations are in scope for it. At most levels the narrowing is a default: an agent is offered less but may reach outside its scope on request. At the audit level it is a constraint, since an auditor that can be persuaded to modify what it observes is not an auditor.

Scope is also where this model departs from a trait system in a typed language. There a trait belongs to the type alone, and every caller sees the same operations. Here what a target offers depends on the type and on the actor engaging it, and the level is what carries that dependence.

2.1.5. Application

The framework applies these concepts to carry a unit of work, most often a task, from an unverified beginning to a verified end. A method governs the flow, and its phases are determined dynamically as the work proceeds rather than fixed in advance. Each phase cites the principles that govern its judgement and calls the actions that operate on the relevant artefacts, preferring generated structure wherever generation is possible. The extent to which the work must climb the verification ladder follows from what it changed. An agent may be configured and left running against a checkable finish condition.

2.2. Entry Points

The composition model is independent of any particular way of using it. Three entry points are supported. The first is to invoke an action, where both the operation and its target are already known. The second is to dispatch on a target with compass-act, where the target is known and the operation is not. The third is to enter the mode with compass-helm, which declares a System, matches the work to a method, and routes to the other two as the method's phases fire.

The mode is a convenience over methods rather than a precondition for them: a method may be invoked directly, as may an action. Separating the three in this way allows each to be exercised and tested on its own.

2.3. Terminology

The framework uses a fixed vocabulary. The glossary is the register of record; the table below fixes usage within the framework.

Term Concept
unit of work A discrete piece of work; usually, but not always, a task
story A body of related tasks
capture A recorded idea, not yet work
method The approach to a kind of work
mode The sticky posture for a session
principle A rule that is cited, not run
knowledge A durable fact about the domain
spec Intended behaviour, checkable
System The role a session acts as
agent Any LLM process doing work
session The agent a human talks to
delegate An agent spawned by another
target The typed thing acted upon
action The operation applied to it

Three terms admit a misreading and are worth stating negatively. Spec denotes an Allium specification and nothing else; a story's plan is a plan. Persona denotes a Council member and nothing else; the role a session adopts is a System. Agent is the general term for any process of this kind and therefore names no role: the level designated S1 is called Agent, but it is a System, acted as by a session or a delegate.

2.4. The Framework in Detail

The detail is distributed across several pages, each answering a question a reader may arrive at independently.

Page Answers
Skills in the framework What is a skill here, and why is the received notion deemed insufficient.
Regulatory Functions What kinds of artefact exist, and how do they differ.
Principles Which rules are cited, grouped for use, and which a check carries instead.
Skill dispatch Given a thing in hand, what may be done to it.
Systems and levels Who is acting, and what may they see and do.
Running agents How is an agent configured, isolated and left to run.
Methods and the mode How is a unit of work driven from start to finish.
Verification and evaluation How do we establish that it worked.
Generated artefacts How is generated structure kept correct.

The order above suits a first reading. Methods and the mode presents the same material in the order a session encounters it.

3. See also

Emacs 29.3 (Org mode 9.6.15)