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§

Context
How an interface takes a line speccoder printed — a fix or a next step: performed through perform, a view, the person’s own command, or a line for their shell. The one parser every builder’s lines go through (in their serialisation). What a line is about when it does not say: the result’s feature and task.
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).
Step
How an interface takes a line speccoder printed — a fix or a next step: performed through perform, a view, the person’s own command, or a line for their shell. The one parser every builder’s lines go through (in their serialisation). A line with how it is taken.

Enums§

How
How an interface takes a line speccoder printed — a fix or a next step: performed through perform, a view, the person’s own command, or a line for their shell. The one parser every builder’s lines go through (in their serialisation). How an interface takes a line.
Interface
An interface that takes actions, and so decides which kinds it offers.
Offer
Whether an interface takes a kind.
View
How an interface takes a line speccoder printed — a fix or a next step: performed through perform, a view, the person’s own command, or a line for their shell. The one parser every builder’s lines go through (in their serialisation). A read-only place an interface opens instead of running a command.

Constants§

DONE_REASON
The reason an I-did-it tick records when the person gave none.

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.
answered_at_stop
The person’s answer at a stop, given inline at their terminal, taken through perform with the interface it was answered through: I did it (Done, in the run’s in-place session when it has one), the hint (Nudge: the run then attempts the task again, with its own model) or skip (Skip).
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).
runnable_of
How an interface takes a line speccoder printed — a fix or a next step: performed through perform, a view, the person’s own command, or a line for their shell. The one parser every builder’s lines go through (in their serialisation). How line is taken, with ctx filling what it leaves open.