Skip to content

A graph starts from a question, and a hunch is a source - #26

Merged
BY571 merged 2 commits into
masterfrom
graph/starts-with-a-question
Aug 19, 2026
Merged

A graph starts from a question, and a hunch is a source#26
BY571 merged 2 commits into
masterfrom
graph/starts-with-a-question

Conversation

@BY571

@BY571 BY571 commented Aug 19, 2026

Copy link
Copy Markdown
Owner

The documented shape started at source. That left two things unsaid and one thing wrong.

The question had nowhere to live

graph.yaml: description held the research question as prose, so nothing could cite
it
— a finding could not be traced back to the question it serves, and a graph with a
second sub-question had nowhere to put it.

knoten init now scaffolds question-<name>.md beside the gate example, with prompts for
why it matters and what would count as an answer, and question joins the declared
vocabulary.

question was in the wrong place — a bug I shipped

viz.FLOW listed it third, after source and idea: behind the two things that
derive from it. So the column order contradicted the research order it exists to display.
Fixed in viz.py and viz.html.

A source was defined too narrowly

"External material the work starts from" excludes where a lot of research actually
begins — somebody's own intuition. Now:

  source:     where the work came from — a paper, blogpost, dataset, search, or your
              own intuition (write that one down too; a hunch you cite is auditable)

with the convention of writing source-own-intuition and citing it like any paper. That
keeps one rule instead of two — an idea always names where it came from — and it makes
an uncomfortable question answerable: how much of this graph rests on hunches rather than
on having read anything?

The shape now

question ─▶ source ─▶ idea ─▶ hypothesis ─▶ experiment ─▶ finding
                       ▲                                     │
                       └────── findings open new ideas ──────┘

gate    stands outside the loop: the bar every claim must survive

Documented in SKILL.md, the MCP INSTRUCTIONS, README.md and SPEC.md.

Verified

266 passed, 6 skipped, plus a real walkthrough: knoten init demo writes the question,
knoten validate passes on the fresh graph, knoten index lists both scaffolded nodes.
New tests cover the scaffold, question being the leftmost column, and a hunch recorded as
a source validating.

BY571 added 2 commits August 19, 2026 15:30
The documented shape began at `source`, which left two things unsaid and one thing
wrong.

WHAT A GRAPH IS FOR HAD NOWHERE TO LIVE. `graph.yaml: description` held the research
question as prose, so nothing could cite it: a finding could not be traced back to the
question it serves, and a graph with a second sub-question had nowhere to put it.
`knoten init` now scaffolds `question-<name>.md` beside the gate example, and
`question` joins the declared vocabulary. Everything else descends from it.

`question` WAS IN THE WRONG PLACE. `viz.FLOW` listed it third — after `source` and
`idea`, behind the two things that derive from it — so the column order contradicted
the research order it exists to show. It goes first now, in both `viz.py` and the
template's own legend.

A SOURCE WAS DEFINED TOO NARROWLY. "External material the work starts from" excludes
the case a lot of research actually begins in: somebody's own intuition. It is now
"where the work came from — a paper, blogpost, dataset, search, or your own intuition",
with the convention of writing `source-own-intuition` and citing it like any paper.
That keeps one rule rather than two — an idea always names where it came from — and it
makes an uncomfortable question answerable: how much of this graph rests on hunches
rather than on having read anything?

Verified end to end: init writes the question, the fresh graph validates, `question` is
the leftmost column, and a hunch recorded as a source passes.
…e package

A simplifier pass found that the headline claim of this branch was not true.

THE REORDER DID NOT DELIVER QUESTION-FIRST. `roles()` sorted SHELVES ahead of
everything, and a shelf is any type that is cited and never cites. A `source` an idea
derives from, on a graph where nothing happens to cite the question back, is a shelf —
so `source` overtook `question` and the column order contradicted the loop it exists to
show. Reproduced both ways before fixing. A type FLOW names is now placed by FLOW
whatever its edges look like; shelf/flow detection only decides where the types FLOW
does NOT name go.

AND THE TEST COULD NOT HAVE CAUGHT IT. Its fixture had no edges, so there were no
shelves, so the rule that actually decides ordering never ran and `cols[0] ==
"question"` passed vacuously. It now builds the real chain — an idea deriving from a
source, nothing citing the question — which is exactly the arrangement that failed.

Also from the review:

- TEMPLATE_QUESTION's closing paragraph was three lines of documentation — a fourth
  copy of a sentence already in SKILL, INSTRUCTIONS, README and SPEC — committed
  verbatim into every graph anyone creates, where it would outlive its own accuracy.
  One line now, in the register TEMPLATE_GATE already uses.
- `knoten init` never named the file it just wrote, so the single most important next
  action was invisible on the onboarding surface.
- README's `node_types` example was a stale copy of the template: no `question`, and
  the exact "external material" wording this branch set out to broaden. `test_docs`
  extracts that block but only checks it loads, so the drift sailed through.
- The `source:` meaning was 141 chars, twice its longest sibling, and wrapped to four
  lines in a legend panel that is a definition list. The argument for writing hunches
  down belongs in the README paragraph, not in every graph's config.
- `examples/llm-research` had no question node, so the shipped example contradicted the
  shipped doctrine. It has one now, and `knoten path` traces question -> hypothesis ->
  the gate that killed it, which is the whole reason the question is a node.
- `build/lib/knoten/` was TRACKED: twelve files, a stale copy of the package still
  carrying the old FLOW order and no TEMPLATE_QUESTION. Pre-existing, but this branch
  widened the divergence, and grep in a codebase whose value is reading it in one
  sitting was returning two contradictory answers.
@BY571
BY571 merged commit dd3ba70 into master Aug 19, 2026
2 checks passed
@BY571
BY571 deleted the graph/starts-with-a-question branch August 19, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant