Before the kitchen
planning
Make a plan. Put the work in one class from a closed list. Make a kitchen. This routine does not build the product.
ganda task work --routine planning
Select a node, or run the path that the host uses.
How you write it
You write the routine in C#. Each call adds one node. Build makes the intermediate representation.
public static RoutineDefinition Build()
{
return Routine.Named(RoutineId)
.Oracle<TaskWork.Continue>("plan", schema: "Continue.ClosedEnum", pack: Pack.None, budget: Budget.Small)
.Oracle<TaskWork.Classify>("classify", schema: "Classify.ClosedEnum", pack: Pack.None, budget: Budget.Small)
.Switch<TaskWork.Classify>(sw => sw
.When(TaskWork.Classify.Rfc)
.When(TaskWork.Classify.Debate)
.When(TaskWork.Classify.Advisor)
.When(TaskWork.Classify.Implement)
.When(TaskWork.Classify.Trivial))
.Compute("mint", Mint)
.Build();
}The file is source/timewarp-taratibu/routines/planning/planning.cs. Taratibu master 53de8c4.
Why this shape
A worker used to start an RFC, a debate, or an implementation in the middle of a sentence. Planning makes the route a closed list. The host can switch on that list. Each result goes to mint. The chosen routine is a later run. It is not an oracle further down this graph.
What you get
- The only answers are Rfc, Debate, Advisor, Implement, and Trivial. A bad answer cannot make a sixth path.
- Mint is a compute node. Ganda reserve or claim gives the id. The library does not number kitchens by hand.
- There is no gate. Planning is complete when the kitchen exists.
Rules
- If plan is Blocked, the host stops the run. There is no Blocked line.
- Done on plan is the line with no label. That line goes to classify.
- You can give a parent id. That id is the brief. This routine does not do that task.
This routine starts
The drawing follows the D2 file in the repo. Node ids do not change. Ganda connects the commands. Ganda does not change the graph.