Conversation
Server now follows klappy://odd/encoding-types/how-to-write-encoding-types section 'Context vs Input': input generates artifacts; context only informs quality scoring. Before this change, fullInput (input + context) was passed to both the parser and the scorer, causing context paragraphs to become separate standalone artifacts. The governance says context is metadata, not content. Changes: - runEncodeAction: parsers receive input only (not fullInput) - runEncodeAction: scoring receives input + context per artifact so background information still counts toward quality - scoreArtifactQuality: accepts optional scoringText parameter that defaults to artifact.body when not provided - Inline comments cite the governance doc to prevent regression Closes the gap between governance and code surfaced during PR #96 testing.
…t from corrupting negative/positive checks
The non-empty check in scoreArtifactQuality was using text (which includes appended context) instead of artifact.body. This meant an artifact with an empty body would pass the non-empty check whenever context was supplied, defeating the purpose of the validity check. Restored the check to use artifact.body.length so context informs quality scoring but cannot substitute for actual artifact content.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
oddkit | 760f613 | Commit Preview URL Branch Preview URL |
Apr 16 2026, 03:19 AM |
klappy
added a commit
that referenced
this pull request
Apr 17, 2026
Mirrors the PR #96 encode pattern. Extracts challenge behavior from live governance articles (landed in klappy.dev canon via PR #99) rather than hardcoded source logic. New functions in workers/src/orchestrate.ts: - discoverChallengeTypes — per-canonUrl cached type discovery - fetchBasePrerequisites — universal prerequisite checks - fetchNormativeVocabulary — RFC 2119 + architectural load-bearing terms - fetchStakesCalibration — mode-to-depth filter - extractPrereqTable / extractKeywordsFromCheck — shared helpers Refactored: - runChallengeAction — replaces hardcoded detectClaimType / generateChallenges / findTensions / findMissingPrerequisites with governance extraction. Supports multi-match. Filters output by stakes calibration based on mode parameter. - runCleanupStorage — clears all four new caches on invalidation Invariant: voice-dump mode suppresses all challenge output regardless of matched types. Load-bearing per stakes-calibration governance — some modes exist for raw capture and pressure-testing at that stage damages the mode. Graceful degradation: missing governance articles fall back to minimal built-in behavior with warnings, rather than failing. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotion PR bringing the governance-driven encode architecture to production.
What's included
PR #96 — Governance-driven encode architecture
Replaced hardcoded
detectEncodeType()with governance-driven encoding:discoverEncodingTypes()searches canon forencoding-typetagged docsartifacts[]array + backward-compatartifactfieldgovernance[]in response teaches the model discovered typesPR #98 — Context vs input governance compliance
Closed the gap between governance and code:
inputgenerates artifacts;contextonly informs quality scoringinputonly (notfullInput)scoreArtifactQualityaccepts optionalscoringTextparameterartifact.bodyVerification
input + contextproduces 1 artifact (not 3), scored with context informing qualityGovernance baseline
The klappy.dev baseline (PR #97 + #98 in klappy.dev) has the encoding-type governance docs that this server now discovers:
odd/encoding-types/decision.md(D)odd/encoding-types/observation.md(O,fallback: true)odd/encoding-types/learning.md(L)odd/encoding-types/constraint.md(C)odd/encoding-types/handoff.md(H)odd/encoding-types/how-to-write-encoding-types.md(protocol spec)odd/encoding-types/serialization-format.md(TSV format spec)No oddkit deploy needed when canon changes.
Note
Medium Risk
Changes
encodeartifact generation and quality scoring behavior, which can affect downstream consumers expecting prior artifact counts or scores. Scope is limited to encoding/scoring logic with no auth or persistence changes.Overview
Updates
encodesocontextno longer gets concatenated into the text passed toisStructuredInput/parsers, preventing context paragraphs from being turned into extra artifacts.Extends
scoreArtifactQualitywith an optionalscoringTextand, when context is provided, scores each artifact againstartifact.body + contextwhile keeping structural checks (e.g., non-empty/keywords) anchored to the artifact’s own fields/body; adds inline governance comments to lock in this behavior.Reviewed by Cursor Bugbot for commit 760f613. Bugbot is set up for automated code reviews on this repo. Configure here.