Skip to content

feat(schemas): bundled semantic rules with evals - #233

Open
mindsocket wants to merge 5 commits into
mainfrom
claude/project-thread-ipaubt
Open

mindsocket wants to merge 5 commits into
mainfrom
claude/project-thread-ipaubt

Conversation

@mindsocket

Copy link
Copy Markdown
Owner

Requested by Rog · project thread

Slice 3 of reusable semantic rules: the primitives as plain rules, plus rules researched for each bundled schema, each with an eval in the #228 harness.

Rules

Schema Rule Primitive Scope Verdicts
strict_ost outcome-product-outcome right type – product-outcome · business-outcome (info) · traction-metric (info) · output (warning)
strict_ost opportunity-refines-parent refines parent parent refines · weak-link (info) · misplaced (warning)
strict_ost opportunities-distinct mutually exclusive children distinct · overlapping · duplicate (warning)
strict_ost solution-addresses-opportunity refines parent parent addresses · tangential (info) · misplaced (warning)
strict_ost solution-serves-outcome faithful to ancestors ancestors pass/fail
strict_ost assumption-category-fits – – pass/fail
strategy_general goals-distinct mutually exclusive children as opportunities-distinct
strategy_general goals-cover-parent collectively exhaustive children, bodies pass/fail (info)
strategy_general goal-advances-parent refines parent parent advances · weak-link · misplaced
strategy_general opportunity-serves-ancestors faithful to ancestors ancestors, bodies pass/fail
strategy_general problem-statement-names-no-solution – own body pass/fail
knowledge_wiki concept-or-entity right type – pass/fail
knowledge_wiki synthesis-connects – own body pass/fail
okf okf-description-informative – – pass/fail

Set-level rules sit on the parent with a when that needs two or more children of the type, so they cost one call per such parent. No verdict reports error, so none gate.

Sources. strict_ost type descriptions, rule wording and the assumption categories follow Torres: Continuous Discovery Habits and producttalk.org (opportunity mapping: "a child opportunity … is a subset of a parent opportunity", siblings are "distinct—you can address one without addressing another"; defining product outcomes: business vs product outcomes, traction metrics, outputs in outcome language). strategy_general has no single source, so its descriptions are plain definitions of vision, mission and goal; collectively exhaustive is from MECE (Minto) and complete refinement (KAOS), as in the plan doc.

Evals

14 new evals, 247 cases, 15 to 20 per rule. About a third are near-misses or mixed framings, with a comment on each: an output worded as an outcome, a solution that addresses its opportunity but works against the outcome (a daily email digest that keeps people out of the product), "the lack of a solution" worded as a problem, a named method that is still a concept. Scenarios come in contrast pairs where one detail flips the label.

Four new fixtures in fixtures.json5: ost-trees, strategy-trees, knowledge-wiki, okf. Children-scope rules get one small tree per scenario. Parent- and ancestor-scope rules share parents, since their input holds no siblings. A few labels accept two verdicts where both are defensible; --check passes on all.

Not run live yet: the container has no provider keys. To run on your MacBook:

bun run eval:semantic --provider openrouter-jev --provider openai

Other changes

  • Fix: the judge now gets a type's description when its oneOf entry is a $ref. Before, strategy_general and knowledge_wiki sent no type descriptions at all.
  • Base fields title, summary and tags no longer have descriptions that only restate their names ("Short summary"), so they drop out of item_types. Their values still reach the judge. parent keeps "Parent node", because otherwise the wikilink def's "An Obsidian wikilink, e.g. [[Parent Node]]" shows instead.
  • A test assumed one judge input per node. That's no longer true once a node has rules with different scopes, so it now checks one judgement per rule and node, and one input per scope.
  • Docs: a table of the three scope patterns in semantic-rules.md, a line in schemas.md, and a pointer in schema-authoring.md.

Out of scope: rule templates (slice 4, which needs your agreement on the dialect), and harder cases for the existing opportunity-customer-voice eval.


Generated by Claude Code

Type descriptions for strict_ost (from Continuous Discovery Habits) and
strategy_general, and semantic rules on all four bundled schemas:

- strict_ost: outcome-product-outcome, opportunity-refines-parent,
  opportunities-distinct, solution-addresses-opportunity,
  solution-serves-outcome, assumption-category-fits
- strategy_general: goals-distinct, goals-cover-parent,
  goal-advances-parent, opportunity-serves-ancestors,
  problem-statement-names-no-solution
- knowledge_wiki: concept-or-entity, synthesis-connects
- okf: okf-description-informative

Each rule has an eval with near-misses and contrast pairs; rules that
judge children get one small tree per scenario.

The judge now gets a type's description when its oneOf entry is a
$ref (strategy_general, knowledge_wiki). Base fields whose description
only restated the name (title, summary, tags) drop theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpcQHEAB9KwJ5Ltiomb
@claude

claude Bot commented Nov 13, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

mindsocket and others added 4 commits November 14, 2026 12:04
- Merge the duplicate verdict into overlapping on opportunities-distinct
  and goals-distinct: every provider confused the two, and they shared a
  severity.
- Rubrics for the parent-fit rules, assumption-category-fits and
  okf-description-informative, so a related or reworded node no longer
  passes.
- Narrow traction-metric to the use of one named feature, so behaviour
  in one flow stays a product outcome.
- Fix labels and scenarios that the stronger providers rightly disputed,
  and drop cases with no clear answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpcQHEAB9KwJ5Ltiomb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpcQHEAB9KwJ5Ltiomb
Drop the financial independence goals-distinct case, whose label was
arguable. Reword two OST fixture nodes so the intended verdict is clear,
accept either non-pass verdict for the Kindle goal, and say in the
weak-link description that restating the parent counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpcQHEAB9KwJ5Ltiomb

This branch has not been deployed

No deployments
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.

2 participants