Anonymous View
Skip to content

Document the @Guard decorator and branching rules in the workflows fundamentals #197

@jakobklippel

Description

@jakobklippel

Context

build/fundamentals/workflows.md covers @Transition, wait: true, state typing, and priority — but does not mention @Guard. Branching is a first-class concept (every non-trivial workflow has it) and the only way readers learn the @Guard('methodName') pattern is by querying the docs a second time with a guard-specific prompt or reading source. The priority field is shown but its semantics (higher first; unguarded transition acts as fallback) aren't explained on the main page.

What to do

Add a top-level "Branching with guards" section to build/fundamentals/workflows.md covering the decorator, the priority + fallback rules, and a complete example.

Affected area

  • Docs: build/fundamentals/workflows.md

Acceptance criteria

  • The fundamentals page has a "Branching with guards" section right after "Standard Transition".
  • The rules are stated explicitly: guards are boolean methods, higher priority is evaluated first, an unguarded transition is the fallback.
  • A complete example with two competing transitions is shown.

Additional context

Surfaced during a benchmark agent session. See todo-docs.md#6.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpriority:p1High prioritytaskGeneral task / chore

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions