Documentation
¶
Overview ¶
Package icm implements the nexus.workflows.icm plugin: a file-driven multi-stage workflow runner inspired by the Interpretable Context Methodology (Van Clief & McDermott, arXiv:2603.16021).
A workspace is a folder on disk. Stages live under stages/NN_slug/, each with a contract.md (YAML frontmatter + role body) and an optional grounding/ folder. The plugin loads + validates the workspace at Init, registers a derived AgentPosture per stage at Ready, and dispatches each stage as a sub-agent via a private delegate.Runtime when an io.input arrives.
All comms flow through the bus. The plugin owns no LLM client directly — every model call routes through delegate (sub-agents + LLM judges) and every human interaction through hitl.requested.
Index ¶
- Constants
- func New() engine.Plugin
- type ConditionResult
- type Config
- type ICMFanoutItem
- type ICMPredicateFailed
- type ICMRunCompleted
- type ICMRunHalted
- type ICMRunStarted
- type ICMStageCompleted
- type ICMStageFailed
- type ICMStageIteration
- type ICMStageStarted
- type ICMTurn
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
Constants ¶
const ( ICMRunStartedVersion = icmtypes.ICMRunStartedVersion ICMRunCompletedVersion = icmtypes.ICMRunCompletedVersion ICMRunHaltedVersion = icmtypes.ICMRunHaltedVersion ICMStageStartedVersion = icmtypes.ICMStageStartedVersion ICMStageCompletedVersion = icmtypes.ICMStageCompletedVersion ICMStageFailedVersion = icmtypes.ICMStageFailedVersion ICMStageIterationVersion = icmtypes.ICMStageIterationVersion ICMTurnVersion = icmtypes.ICMTurnVersion ICMFanoutItemVersion = icmtypes.ICMFanoutItemVersion )
const ICMPredicateFailedVersion = icmtypes.ICMPredicateFailedVersion
ICMPredicateFailedVersion re-exports the canonical version constant from icmtypes for callers used to the icm.ICMPredicateFailedVersion name.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConditionResult ¶
type ConditionResult = icmtypes.ConditionResult
ConditionResult is re-exported from icmtypes so existing icm.ConditionResult references in this package and its sub-packages keep working. The canonical definition lives in icmtypes to avoid a cycle with the session sub-package.
type Config ¶
type Config struct {
Workspace string
DefaultJudgePosture string
DefaultWorkflowPosture string
CacheSize int
InlineArtifactLimitBytes int
LoopMaxRestarts int
InputFilename string
TreatInputAsPathIfExists bool
WorkspaceInputsDir string
AutoIncludeSkillReferenceTool bool
PredicateCommandTimeoutSecs int
EmitProgressThinkingSteps bool
}
Config is the resolved plugin config (subset of schema.json relevant at runtime). Loaded once at Init.
type ICMFanoutItem ¶
type ICMFanoutItem = icmtypes.ICMFanoutItem
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMPredicateFailed ¶
type ICMPredicateFailed = icmtypes.ICMPredicateFailed
ICMPredicateFailed is re-exported from icmtypes. The predicates sub-package emits values of this type; subscribers can keep using the short icm.ICMPredicateFailed name.
type ICMRunCompleted ¶
type ICMRunCompleted = icmtypes.ICMRunCompleted
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMRunHalted ¶
type ICMRunHalted = icmtypes.ICMRunHalted
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMRunStarted ¶
type ICMRunStarted = icmtypes.ICMRunStarted
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMStageCompleted ¶
type ICMStageCompleted = icmtypes.ICMStageCompleted
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMStageFailed ¶
type ICMStageFailed = icmtypes.ICMStageFailed
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMStageIteration ¶
type ICMStageIteration = icmtypes.ICMStageIteration
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMStageStarted ¶
type ICMStageStarted = icmtypes.ICMStageStarted
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type ICMTurn ¶
Lifecycle event payload re-exports. The runtime sub-package emits these directly; the icm package surfaces the type aliases for ergonomic consumer code.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is the nexus.workflows.icm plugin instance. Multiple instances coexist via the instance-suffix mechanism (nexus.workflows.icm/script, nexus.workflows.icm/research) — each pinned to its own workspace.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
Capabilities advertises workflow.runner so other plugins can detect the presence of a workflow runner without string-matching plugin IDs.
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
Dependencies declares ordering-only deps. None: ICM resolves all required capabilities through Requires().
func (*Plugin) Init ¶
func (p *Plugin) Init(ctx engine.PluginContext) error
Init parses config, resolves the posture registry, builds the private delegate runtime, and subscribes to bus events. Workspace loading + posture registration happen in Ready (after every other plugin has initialized).
func (*Plugin) Ready ¶
Ready registers per-stage output schemas, derives + registers a posture per stage and verifier, then registers the LLM-facing icm_validate tool. Halts boot on any failure so an invalid workspace contract never reaches dispatch.
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
Requires declares the capabilities ICM must have active.
func (*Plugin) Shutdown ¶
Shutdown unsubscribes from the bus and deregisters any postures the plugin owns. Schemas are not deregistered here — the engine teardown drops the SchemaRegistry wholesale, and there is no per-source removal in the public surface.
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription
Subscriptions lists the events ICM consumes.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package icmtypes holds tiny shared value types used by both the nexus.workflows.icm plugin (events.go) and its session and predicates subpackages (artifact sidecars, run state, predicate failure events).
|
Package icmtypes holds tiny shared value types used by both the nexus.workflows.icm plugin (events.go) and its session and predicates subpackages (artifact sidecars, run state, predicate failure events). |
|
Package predicates implements the ICM workflow predicate evaluator.
|
Package predicates implements the ICM workflow predicate evaluator. |
|
builtins
Package builtins ships the four baked-in native predicate handlers for the ICM workflow plugin: word_count_under, word_count_over, contains_required_ids, and json_path_exists.
|
Package builtins ships the four baked-in native predicate handlers for the ICM workflow plugin: word_count_under, word_count_over, contains_required_ids, and json_path_exists. |
|
Package runtime — top-level ICM orchestrator.
|
Package runtime — top-level ICM orchestrator. |
|
Package session owns the on-disk layout of a single ICM workflow run.
|
Package session owns the on-disk layout of a single ICM workflow run. |
|
Package workspace is the pure-Go loader and validator for an ICM workspace folder.
|
Package workspace is the pure-Go loader and validator for an ICM workspace folder. |