Choreo.Lab.DSL.Planner (Choreo v0.12.0)

Copy Markdown View Source

Experimental Livebook-friendly DSL for sketching project plans.

This Lab DSL compiles to the stable, pipe-first Choreo.Planner builders and returns an ordinary %Choreo.Planner{}. It is useful for interview planning, release sketches, dependency conversations, and quick Kanban/Gantt artifacts.

Examples

iex> import Choreo.Lab.DSL.Planner
...> plan = planner "Launch v1" do
...>   v1 = milestone("V1 Launch")
...>   design = task("Design API", status: :done, estimate_hours: 8)
...>   build = task("Build Gateway", priority: :high)
...>   alice = user("Alice")
...>   backend = label("backend")
...>
...>   contains v1 ~> design
...>   contains v1 ~> build
...>   design ~> build |> depends_on()
...>   build ~> alice |> assigned_to()
...>   build ~> backend |> tagged_with()
...> end
iex> Enum.sort(Choreo.Planner.children(plan, :v1))
[:build, :design]
iex> Choreo.Planner.dependencies(plan, :build)
[:design]
iex> Choreo.Planner.assignee(plan, :build)
:alice

Edges use the same sketch grammar as the other Lab DSLs:

design ~> build
design ~> build |> depends_on("finish design first")
blocks blocker ~> blocked
contains milestone ~> task
assigned_to task ~> user
tagged_with task ~> label

Planner edge labels are accepted for grammar consistency, but the stable Choreo.Planner model currently stores typed relationships rather than display labels on those edges.

Summary

Functions

after(arg1 \\ nil, arg2 \\ nil, opts \\ [])

assign(arg1 \\ nil, arg2 \\ nil, opts \\ [])

assigned_to(arg1 \\ nil, arg2 \\ nil, opts \\ [])

blocks(arg1 \\ nil, arg2 \\ nil, opts \\ [])

bug(arg1 \\ nil, arg2 \\ nil, opts \\ [])

contains(arg1 \\ nil, arg2 \\ nil, opts \\ [])

depends(arg1 \\ nil, arg2 \\ nil, opts \\ [])

depends_on(arg1 \\ nil, arg2 \\ nil, opts \\ [])

label(arg1 \\ nil, arg2 \\ nil, opts \\ [])

milestone(arg1 \\ nil, arg2 \\ nil, opts \\ [])

owner(arg1 \\ nil, arg2 \\ nil, opts \\ [])

person(arg1 \\ nil, arg2 \\ nil, opts \\ [])

phase(arg1 \\ nil, arg2 \\ nil, opts \\ [])

planner(list)

(macro)

Builds a %Choreo.Planner{} from a compact Lab DSL block.

planner(name_or_opts, list)

(macro)

relates(arg1 \\ nil, arg2 \\ nil, opts \\ [])

relates_to(arg1 \\ nil, arg2 \\ nil, opts \\ [])

release(arg1 \\ nil, arg2 \\ nil, opts \\ [])

story(arg1 \\ nil, arg2 \\ nil, opts \\ [])

tag(arg1 \\ nil, arg2 \\ nil, opts \\ [])

tagged(arg1 \\ nil, arg2 \\ nil, opts \\ [])

tagged_with(arg1 \\ nil, arg2 \\ nil, opts \\ [])

task(arg1 \\ nil, arg2 \\ nil, opts \\ [])

taxonomy()

@spec taxonomy() :: %{
  nodes: [atom()],
  edges: [atom()],
  modifiers: [atom()],
  options: [atom()]
}

Returns the vocabulary supported by the planner DSL.

iex> taxonomy = Choreo.Lab.DSL.Planner.taxonomy()
iex> :task in taxonomy.nodes
true
iex> :depends_on in taxonomy.edges
true
iex> :assigned_to in taxonomy.modifiers
true

todo(arg1 \\ nil, arg2 \\ nil, opts \\ [])

user(arg1 \\ nil, arg2 \\ nil, opts \\ [])

verbs()

@spec verbs() :: map()

Compatibility alias for taxonomy/0.

work(arg1 \\ nil, arg2 \\ nil, opts \\ [])