Skip to main content

Module actions

Module actions 

Source
Expand description

What a person can do now, and taking it. The list comes from the project as it stands: the report, what waits for a decision, the planning files not yet committed and the installed planning skills. Interfaces render the list; perform is the one place an action’s Runnable becomes runtime calls, for every interface.

§Adding a kind

Every new person-initiated action — a model run or a plain write — lands in one change with all of:

  1. a Runnable variant with typed fields (speccoder_core::actions);
  2. its ActionKind, its identity arm and its subject rule (same file);
  3. exactly one arm in perform_in (input rules, needs(..) messages, the dispatch’s via passed through);
  4. its result payload: an existing CommandData variant, or a new one with a unique name in PAYLOADS;
  5. that payload’s published schema (SPECCODER_BLESS=1);
  6. its generated UI type (crates/speccoder-web/ui/src/lib/schema.gen.ts);
  7. a decision for every interface in offered (no wildcard: the build fails until each interface has one);
  8. a golden for its arm (tests/fixtures/perform/);
  9. if the web app shows it, its verb and icon in the UI’s kind table (ui/src/lib/actions.ts).

No feature adds a web job kind, a web route that writes, a terminal prompt, an editor command or a dashboard key that maps a kind to runtime calls itself, nor a marker on an existing variant meaning another action: it adds a kind. Only the interfaces of Interface call perform — never a model tool, a hook, a gate or the engine — so nothing but a person’s command approves, rejects, accepts, rules or ticks through it. specs/089-action-contract/quickstart.md walks through one such change.

Structs§

Dispatch
An action to take: what runs, the person’s input, the interface it came through and how that interface runs it (who it asks, where progress goes, its cancel flag).

Enums§

Interface
An interface that takes actions, and so decides which kinds it offers.
Offer
Whether an interface takes a kind.

Functions§

allow_always_inline
The calls a person answered Always Allow inline: each one’s exact argv joins the allow list through perform with the interface it was answered through. What each did, as notices.
available
What can be done now in the project at path (feature as for every command), with selected the task an interface has selected.
available_with
available with the waiting calls already listed (an interface that lists them anyway): the journal is not opened again.
journey
Where the feature is on its journey (spec → plan → tasks → commit → run → review); the report’s, or the start of it.
list
speccoder actions: what can be done now in the project at path (with selected the task an interface has selected) and where the feature is on its journey — the list every interface renders. Outside a project: what report says there, with an empty list.
offered
Which kinds each interface takes: every pair decided, no default, so a new kind does not build until each interface has a decision.
perform
Takes the action: the only place a Runnable becomes runtime calls. It never prompts and never confirms (an interface has, before); what an interface does not offer it refuses before calling this (offered).
perform_for
perform, if interface offers the action’s kind; None, with nothing run, if it does not.
perform_in
perform with the state directory given (None: there is none).