Skip to content

canon: model operating contract + mode discipline; public template#104

Merged
klappy merged 1 commit into
mainfrom
canon/model-operating-contract-and-mode-discipline
Apr 19, 2026
Merged

canon: model operating contract + mode discipline; public template#104
klappy merged 1 commit into
mainfrom
canon/model-operating-contract-and-mode-discipline

Conversation

@klappy
Copy link
Copy Markdown
Owner

@klappy klappy commented Apr 18, 2026

What this adds

Three new docs + one link patch.

New canon

canon/bootstrap/model-operating-contract.md (tier:1)

The evolving operating contract that any LLM running in an oddkit-powered project fetches on first substantive turn. Consolidates posture (creed + axioms), tool rhythm, mode discipline, bottleneck respect, search-before-asking, canon-unreachable protocol, failure signals, and a statement that the contract itself evolves in canon rather than in prompts. Model-agnostic throughout — applies to Claude, GPT, Gemini, Llama, or any future LLM with tool-use capabilities.

canon/constraints/mode-discipline-and-bottleneck-respect.md (tier:1)

Operationalizes canon/definitions/epistemic-modes and docs/appendices/mode-separated-conversations for the specific case of LLM behavior during substantive work. Names the non-collapse contract (exploration/planning/execution do not mix), the reversion protocol (one sentence, one reason, one question), and the Theory of Constraints framing (operator attention is the bottleneck; asking unnecessary questions during execution is a throughput violation disguised as caution).

New public example

docs/examples/project-instructions-template.md

The actual template Klappy uses as the project-instructions layer, credentials stripped. Shows how the prompt-over-code pattern from canon/constraints/oddkit-prompt-pattern works in practice: creed, axioms, time rule, mode discipline, bottleneck respect, search-before-asking, and oddkit tool reference live in the prompt (load-bearing, always in context); the evolving contract is fetched from canon at runtime. Model-agnostic so the same template works for any LLM with MCP support.

Onramp patch

writings/getting-started-with-odd-and-oddkit.md

Added one sentence to the Bootstrap section linking readers who want "the actual template I use" to the new docs/examples/project-instructions-template. Immediately after the existing proactive-bootstrap link, so the ecosystem is navigable in either direction.

Why this PR exists

This body of work came out of a two-day session where an LLM instance (me) repeatedly asked questions during execution mode, violating canon/definitions/epistemic-modes's "Execution must not pretend to explore alternatives retroactively" rule. The operator (Klappy) spent hours answering questions that should have been extracted during planning — a direct Theory of Constraints violation, attacking the system bottleneck while feeling like caution.

The root cause was diagnosable but not preventable: the canon said one thing, the system prompt did not reinforce it, and the LLM treated canon as decoration rather than contract. The fix is architectural, not behavioral:

  • Mode discipline is now canon as a tier-1 constraint, operationalizing what epistemic-modes already defined
  • The bootstrap contract carries the full operating posture as canon, so any model in any session can fetch the current contract
  • The public example shows the prompt-over-code pattern applied: prompts carry load-bearing posture, canon carries evolving contract

The prompt-over-code pattern (canon/constraints/oddkit-prompt-pattern) now applies to its own prompts.

What's intentionally NOT in this PR

  • Changes to the tool implementations (those are the governance anti-pattern sweep, which is a separate sequence of PRs already in motion on klappy/oddkit)
  • Changes to canon/definitions/epistemic-modes itself (this PR operationalizes it, does not redefine it)
  • A migration of existing system prompts in Klappy's other projects (those get updated separately)

Verification

  • Writing Canon 5-tier check passed on both canon docs (title, blockquote, frontmatter, Summary section, descriptive headers)
  • Frontmatter conforms to canon/meta/frontmatter-schema (booleans/integers/dates/simple identifiers unquoted, strings with special chars quoted)
  • Both canon docs derive_from and complements fields resolve to existing canon
  • Model-agnostic grep: no remaining "Claude" references in either canon doc or the public example (all rewritten to "the model" / "any LLM")
  • Getting-started link patch is surgical (one added paragraph, no other changes to the onramp)

Related

  • klappy/oddkit#105 — the governance anti-pattern audit this work operationalizes a fix for at the architecture level
  • klappy/oddkit#106 — canary refactor (telemetry_policy headers from canon) — in progress
  • klappy/klappy.dev#101 — core-governance-baseline contract (draft) — companion architectural work

Note

Low Risk
Low risk documentation-only change that adds new canon guidance and a public template; no runtime code paths or tooling behavior are modified.

Overview
Introduces a new Tier-1 canon Model Operating Contract (canon/bootstrap/model-operating-contract.md) that centralizes the session bootstrap posture (time via oddkit_time, tool rhythm, search-before-asking, canon-unreachable behavior) and explicitly codifies mode discipline (exploration/planning/execution non-collapse with named reversion).

Adds a new Tier-1 constraint (canon/constraints/mode-discipline-and-bottleneck-respect.md) that formalizes no questions during execution and frames operator attention as the bottleneck, plus a public docs/examples/project-instructions-template.md showing how prompts carry only load-bearing rules while pointing to the evolving contract.

Updates the onboarding article (writings/getting-started-with-odd-and-oddkit.md) to link readers to the new project-instructions template.

Reviewed by Cursor Bugbot for commit 18b509d. Bugbot is set up for automated code reviews on this repo. Configure here.

Three additions + one link patch in the getting-started onramp.

New canon:
  - canon/bootstrap/model-operating-contract.md (tier:1)
    The evolving operating contract fetched at session start by any
    LLM operating in oddkit-powered projects. Model-agnostic.
    Project instructions point at this URI; depth and evolution
    live here. Derives from the existing epistemic-modes,
    oddkit-prompt-pattern, dry-canon-says-it-once, and
    time-blindness-axiom-violation canon.

  - canon/constraints/mode-discipline-and-bottleneck-respect.md (tier:1)
    Operationalizes canon/definitions/epistemic-modes and
    docs/appendices/mode-separated-conversations for the specific
    case of LLM behavior during substantive work. Names the
    non-collapse contract, reversion protocol, and Theory of
    Constraints bottleneck framing. Written after a two-day incident
    in which an LLM instance asking execution-mode questions
    consumed ~10x the operator attention the work warranted.

Public example:
  - docs/examples/project-instructions-template.md
    The actual template Klappy uses as project-instructions layer
    for oddkit-powered projects, with credentials stripped. Shows
    how creed + axioms + time rule + mode discipline + bottleneck
    respect + search-before-asking live in the prompt itself,
    while the evolving contract is fetched from canon at runtime.
    Implements the prompt-over-code pattern from
    canon/constraints/oddkit-prompt-pattern.

Onramp patch:
  - writings/getting-started-with-odd-and-oddkit.md
    One sentence added to the Bootstrap section linking readers
    who want 'the actual template I use' to the new
    docs/examples/project-instructions-template. Model-agnostic
    framing: Claude, GPT, Gemini, or any LLM with tool-use + MCP.

Origin: this body of work came out of a two-day session where an
LLM repeatedly asked questions during execution mode, violating
canon/definitions/epistemic-modes ('Execution must not pretend
to explore alternatives retroactively'). The root cause was the
system prompt not carrying mode discipline as a load-bearing
rule. This PR fixes that at the architecture level (prompt +
canon) rather than as a single-session correction.
@klappy klappy merged commit 485c71d into main Apr 19, 2026
1 check passed
@klappy klappy deleted the canon/model-operating-contract-and-mode-discipline branch April 19, 2026 00:28
klappy added a commit that referenced this pull request Apr 19, 2026
Adds validation as a first-class epistemic mode, peer to exploration,
planning, and execution. Prior canon described validation extensively
(oddkit_validate tool, qa-validation case study, many process refs)
but never named it as a distinct mode with its own truth conditions
and non-collapse obligations. The three-mode framing implicitly
treated validation as a phase of execution, which produced the
'validating mid-build' failure pattern — noticing concerns during
execution and surfacing them as inline pivots instead of carrying
them to a dedicated post-execution review.

This is the second half of the mode-collapse pattern documented in
canon/constraints/mode-discipline-and-bottleneck-respect. The first
half is planning-into-execution (inline clarifying questions). The
second half is validation-into-execution (inline concerns). Both
externalize cost to the operator's attention. Both feel like care
to the agent performing them. Both are the same throughput violation.

New canon:
- canon/definitions/validation-as-epistemic-mode.md (tier:1)
  Full contract for validation as a fourth mode. Names purpose,
  characteristics, truth condition, obligations, primary risk,
  valid/invalid moves. Defines the exec→val→(accept|iterate|pivot)
  rhythm. Extends the non-collapse rule to cover all six pairings.

Revisions:
- canon/definitions/epistemic-modes.md — blockquote and section
  heading updated from three to four modes; validation added as
  mode #4; non-collapse rule extended to name validation-specific
  collapses.
- canon/constraints/mode-discipline-and-bottleneck-respect.md —
  'Three Modes' section becomes 'Four Modes'; non-collapse contract
  extended with 'execution pretending to validate', 'validation
  pretending to plan', 'validation pretending to execute'; the
  rhythm named explicitly.
- canon/bootstrap/model-operating-contract.md — summary and Mode
  Discipline section updated to four modes; validation-mode invalid
  moves listed; exec→val→iter rhythm named.
- docs/appendices/mode-separated-conversations.md — adds Validation
  Conversations section mirroring Planning and Execution sections.
- docs/examples/project-instructions-template.md — public template
  updated to four modes with validation-mode invalid moves list.

Sequencing: this PR layers on top of klappy.dev#104 (merged), which
introduced the mode-discipline canon and model-operating-contract
bootstrap in their original three-mode framing. Landing validation
as a separate PR keeps the delta reviewable and preserves the
commit history of the original #104 work.

Origin: this work came out of a post-canary review session. The
gauntlet-then-fix rhythm (execution produces → validation reviews →
iteration pivots) worked cleanly in practice while the canon had no
name for the middle step. Naming validation as its own mode closes
the gap between how the system actually works and how it is
documented.
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