Skip to content

feat: experimental evaluator behind an explicit experimental surface (ADR-0007) - #19

Merged
kikashy merged 2 commits into
mainfrom
feat/experimental-evaluator
Jul 27, 2026
Merged

feat: experimental evaluator behind an explicit experimental surface (ADR-0007)#19
kikashy merged 2 commits into
mainfrom
feat/experimental-evaluator

Conversation

@kikashy

@kikashy kikashy commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

The first of the two independent implementations spec RFC 0006 (Draft) needs for acceptance: the JPS Core §§7–8 experiment, exactly as pinned by the RFC's Specification sketch, behind an explicitly EXPERIMENTAL surface that claims no evaluator conformance (JPS 0.1.0-draft §3.4 forbids such claims).

  • CLI: judgment-pack experimental evaluate <pack> --facts f [--evidence f] [--supported-extension x] — disposition + trace, exit 0 for any produced disposition.
  • MCP: experimental_evaluate — strict argument decoding, labeled in name, description, and payload (experimental: true, conformanceClaim: "none").
  • Semantics: three-valued §7 conditions (RFC 6901 pointers; mathematical number equality that degrades to unknown when undeterminable; §2.2 grammar-string-only ordering), the §8 resolution model with RFC 0006's chosen step-2, §8.1 handoff incl. the no-destination direct-escalation edge. Conflict is never tie-broken.
  • Errors are not dispositions: non-conformant pack, unsupported required extension, malformed/oversized inputs, undeclared evidence keys are refused; the 10 MiB boundary lives in the engine so both surfaces share it.
  • Guardrails (per the spec's tooling-architecture): outside the default validation path, unmistakably labeled everywhere; validation behavior, claims, and exit classes unchanged. Graph/planner explicitly out of scope (ADR-0007).
  • The nine RFC 0006 appendix instances run as acceptance tests — incl. 7a/7b (the divergence the RFC resolved) and the conflict probe.

Also: docs/mcp-clients.md (per-client setup for Claude Code / Codex / GitHub Copilot) and .mcp.json gitignored as personal wiring.

Verification

  • Adversarial workflow (semantics fidelity vs §§7–8 + RFC 0006, guardrails/claims, error boundary, test adequacy): 28 confirmed findings — all fixed, incl. one real semantics bug (unrepresentable JSON numbers silently comparing unequal → now unknown per §7.4).
  • Opus re-check: 31/31 core verdicts FIXED; 21 targeted mutants applied, every one killed; the nine appendix instances reproduce identically on CLI and MCP (structuredContent deep-equal), deterministic across runs; 4 residual stale doc claims found and fixed.
  • gofmt / build / vet / go test ./... (13 packages) / conformance corpus: all green.

ADRs

ADR-0007 (proposed → accepted on merge); amends ADR-0003 narrowly (the validation tools still evaluate nothing; the surface gains exactly one tool that evaluates experimentally and says so).

🤖 Generated with Claude Code

kikashy and others added 2 commits July 27, 2026 11:50
Add docs/mcp-clients.md with copy-paste setup for Claude Code, OpenAI
Codex CLI, and GitHub Copilot (VS Code), the tool table, the PATH and
restart gotchas, and the remote-only-clients boundary (external bridge
or a separately governed hosted distribution; ADR-0004). Gitignore
/.mcp.json: client configuration is personal wiring, not project source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…(ADR-0007)

Implement the JPS Core §§7-8 experiment, exactly as pinned by the
specification's RFC 0006 (Draft), as the first of the two independent
implementations its acceptance requires. It claims NO evaluator
conformance -- JPS 0.1.0-draft §3.4 forbids such claims -- and may change
or be removed without compatibility promise.

- internal/evaluation: three-valued conditions (§7 preamble + 7.1-7.5;
  RFC 6901 pointers; type-preserving equality with mathematical number
  comparison that degrades to unknown when equality cannot be determined;
  §2.2 grammar-string-only ordered comparison), the §8 resolution model
  with RFC 0006's chosen step-2 semantics, and §8.1 handoff incl. the
  no-destination direct-escalation edge.
- Errors are not dispositions: a non-conformant pack, unsupported
  required extension, malformed/oversized input, or undeclared evidence
  key is refused; resource limits keep their JPS-RESOURCE-* codes and the
  10 MiB boundary lives in the engine so both surfaces share it.
- CLI `experimental evaluate <pack> --facts f [--evidence f]
  [--supported-extension x]`: EXPERIMENTAL banner, disposition + trace,
  exit 0 for any produced disposition; stdin/remote-path/empty-evidence
  guards.
- MCP `experimental_evaluate` (strict argument decoding honoring
  additionalProperties: false), labeled experimental in name,
  description, and payload (experimental: true, conformanceClaim: none).
- Tests: the nine RFC 0006 appendix instances (incl. 7a/7b, the resolved
  divergence, and the conflict probe) run as acceptance tests, plus unit
  tables for decimals, pointers, equality, three-valued operators,
  evidence tri-state, §8.1 trigger matching, escalate precedence, and the
  error boundary.
- Docs: ADR-0007 (+ amended-by note on ADR-0003), README, architecture,
  authoring-lifecycle, and agent-testing all name the experimental
  exception instead of claiming the runtime evaluates nothing.

Verified by an adversarial workflow (semantics fidelity vs §§7-8 and
RFC 0006, guardrails, error boundary, test adequacy; 28 findings fixed)
and an Opus re-check (31 verdicts FIXED incl. 21 targeted mutants all
killed; the nine appendix instances reproduce identically on CLI and MCP,
deterministic across runs). All conformance cases pass; validation
behavior, claims, and exit classes unchanged. See ADR-0007.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kikashy
kikashy merged commit 1151773 into main Jul 27, 2026
4 checks passed
kikashy added a commit that referenced this pull request Jul 27, 2026
Status flip only, per the ADR process (proposed -> accepted on merge).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kikashy added a commit to Judgment-Pack/judgment-pack-spec that referenced this pull request Jul 27, 2026
The evaluator now exists:
[judgment-pack-runtime#19](Judgment-Pack/judgment-pack-runtime#19)
implements this RFC's pinned semantics behind an explicitly
experimental, non-conformance-claiming surface (runtime ADR-0007), with
the nine appendix instances as its acceptance tests — reproduced
identically over CLI and MCP.

This amendment records the implementation experience RFC 0000 asks for:
- the restated step 2 was implementable exactly as written (7a/7b
deterministic);
- **number representability** is a real gap — extreme exponents make
equality undeterminable; mapped to §7.4's incomparable→`unknown`, added
as an unresolved question;
- §8.1's no-destination direct escalation shape needs confirming in the
later draft;
- honoring `additionalProperties: false` requires strict wire-argument
decoding.

Also pins the independence bar for implementation #2: derived from the
RFC text, never ported from the first implementation. 45 tests pass;
site builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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