Your First Nodes
Let's create some nodes to see how the decision graph works.
Creating a Goal
Every decision chain starts with a goal—the high-level objective you're trying to achieve:
$ deciduous add goal "Implement user authentication" -c 90 Created node #1: goal "Implement user authentication"
What just happened?
- We created a goal node (a high-level objective)
- The title is "Implement user authentication"
- The
-c 90sets confidence to 90% (we're pretty sure this is what we want) - It was assigned ID #1
Adding a Decision
A decision represents a choice point—somewhere you need to pick between options:
$ deciduous add decision "Choose authentication method" -c 75 Created node #2: decision "Choose authentication method"
The confidence is lower (75%) because we haven't decided yet.
Adding Options
An option represents something you're considering:
$ deciduous add option "JWT tokens" -c 80 Created node #3: option "JWT tokens" $ deciduous add option "Session cookies" -c 70 Created node #4: option "Session cookies"
Now we have two options to consider.
Viewing What We Have
Let's see all our nodes:
$ deciduous nodes ID Type Title Status Confidence ───────────────────────────────────────────────────────────────────── 1 goal Implement user authentication active 90 2 decision Choose authentication method active 75 3 option JWT tokens active 80 4 option Session cookies active 70
We have four nodes, but there's a problem: they're not connected.
The Connection Problem
Right now, our nodes are just floating in space. The decision graph's value comes from showing relationships:
- Which goal does this decision belong to?
- Which decision do these options relate to?
- What led to what?
Important
A decision graph without edges is just a list. The edges are what make it useful. Always connect your nodes!
Let's fix that in the next section.
Node Types Quick Reference
| Type | Purpose | Example |
|---|---|---|
| goal | High-level objective | "Add user authentication" |
| decision | Choice point | "Choose auth method" |
| option | Approach considered | "Use JWT tokens" |
| action | Implementation step | "Adding JWT middleware" |
| outcome | Result | "Auth working in prod" |
| observation | Discovery or insight | "Existing code uses sessions" |