Gherkin that tests philosophy.md. Each Rule maps to a principle. Simulate a structural decision against these scenarios when an edge case is unclear.
Feature: Note-taking philosophy
How knowledge is shaped, tagged, linked, and accreted in a personal
knowledge base. These scenarios are what good practice looks like; the
prose rationale lives in philosophy.md.
Rule: A note is about one concept
Scenario: Authoring a new evergreen note
Given a finding worth keeping durably
When the note is created
Then its title names a single concept
And another page could link to that concept by name without ambiguity
Scenario: An existing page covers several distinct concepts
Given a page whose sections each describe a distinct concept
And each section could plausibly be a link target from another page
When the page is next edited
Then it is split into one page per concept
And a hub note may remain in its place linking to the new pages
Scenario: A page covers several aspects of one concept
Given a page with multiple sections
And the sections are facets of the same underlying concept
When the page is reviewed
Then the page is left as one page
Rule: Working knowledge stays in todos; durable knowledge is extracted
Scenario: A reusable lesson emerges during a todo
Given a todo's work log uncovers a fact useful beyond this todo
When the work log entry is written
Then a separate concept-oriented page is created or updated for the lesson
And the work log links to that page from where the discovery happened
And the work log does not duplicate the lesson's content
Scenario: A finding is specific to this todo only
Given a finding emerges that has no value outside this todo
When the work log entry is written
Then the finding is recorded in the work log
And no separate page is created
Scenario: A todo's work is still in progress
Given durable insights are accumulating during active work
When a stopping point has not yet been reached
Then extraction may be deferred until the work concludes
But extraction is not skipped permanently
Rule: Density lives in the link graph
Scenario: A page mentions a concept that has its own page
Given a page being written or edited
When it mentions a concept that has a page in the space
Then the mention is wikilinked inline
Even if the link feels obvious
Scenario: A page mentions a concept that does not yet have a page
Given a page being written
When it mentions a concept that lacks a page
And the concept seems likely to recur
Then a stub page may be created and linked to
Or the absent page is noted as a follow-up
Scenario: A section needs to enumerate items in the space
Given items that can be queried by tag, path, or front-matter attribute
When the enumeration is added to the page
Then a structured query is written instead of a static list
Rule: A tag must fit one of the four axes
Scenario: A candidate tag is being considered
Given a candidate tag for a page
When the tag does not fit any of: type, topic-as-object, sensitivity, or faceted sub-aspect
Then the tag is not added
Scenario: A page mentions a subject without being about it
Given a page that mentions a topic in passing
And the page would remain substantially intact with the topic removed
When tags are being chosen
Then the topic is not used as a tag
And the mention is wikilinked instead
Scenario: A page is centrally about a topic
Given a page whose primary subject is a topic
And removing the topic would gut the page
When tags are being chosen
Then the topic is used as a tag
Scenario: A faceted sub-tag is being considered
Given a candidate slash-tag refining a topic
When at most one page in the space would share that facet
Then the facet tag is not introduced
And the topic tag is used alone
Rule: Tags converge over time
Scenario: An existing tag would convey the same meaning
Given a candidate tag for a page
When an existing tag fits the meaning, even imperfectly
Then the existing tag is used
Scenario: A new tag would only apply to one page
Given a candidate tag
When no existing tag fits
And only this page would carry the tag
Then no new tag is created
And a wikilink is added in body text instead
Scenario: Near-duplicate tags exist
Given two tags that mean the same thing under slightly different spellings
When the situation is noticed
Then one is chosen and the others are updated to match
Rule: Tags don't echo the hierarchy
Scenario: A page lives at a path that names its topic
Given a page at `<area>/<topic>/<title>`
When tags are being chosen
Then the topic is not added as a tag
Unless the topic-as-object test would still apply with the page moved elsewhere
Rule: Look before writing
Scenario: A new page is about to be created
Given an intent to add a new page
When the page is created
Then full-text search has been consulted for related existing pages first
And structured queries have been consulted for structurally similar pages where applicable
And the new page either does not duplicate an existing one
Or it explicitly subsumes and supersedes the existing one
Scenario: An existing page is the right home
Given a search returns a page whose concept matches the new content
When the new content is added
Then it is added to the existing page rather than to a new page
Rule: Hubs link, but don't substitute for atomicity
Scenario: A hub note is healthy
Given a page that links to constituent pages with prose around them
When the prose is short and serves to orient
Then the page is a structure note and stays as one
Scenario: A hub note has accumulated content
Given a hub note whose prose has grown to dominate the page
When the prose covers concepts that could each be their own page
Then the prose is extracted into concept pages
And the hub retains only orienting prose and links