Skip to content

feat: add Jev decision and tree SDK - #1

Merged
rhighs merged 2 commits into
mainfrom
feat/typed-decision-sdk
Sep 19, 2026
Merged

rhighs merged 2 commits into
mainfrom
feat/typed-decision-sdk

Conversation

@rhighs

@rhighs rhighs commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

Jev Code is now a reusable, Jev-only decision harness instead of a coding CLI with optional LLM generation bolted on. Consumers can build typed routers, composable decision programs, and bounded formal trees, while Jev Code itself uses those public contracts for action routing and Bash AST construction.

The old generation-provider, proposal, mapping, OAuth, and recovery surfaces are removed rather than hidden behind flags. The remaining system has one policy authority: Jev chooses among finite alternatives supplied and validated by deterministic host code.

Design decisions

Decision Why
Immutable DecisionProgram definitions with isolated runs Programs can be reused concurrently while nested work shares budgets, deadlines, cancellation, and provider concurrency.
Lazy typed tree slots and finite productions Consumers can construct recursive, data-dependent structures without eager graph expansion or code-specific AST assumptions.
Host-owned effects The SDK selects and assembles values; files, shell commands, authorization, persistence, and UI remain application concerns.
Jev-only package surface No LLM candidate producer, proposal tool, program mapper, provider credential flow, or fallback generator remains.
Deliberate package contract Root ESM exports preserve the existing language Program type and expose the runtime as DecisionProgram; deep implementation imports are blocked.

What is now possible

  • Build a typed router in one screen of TypeScript and receive the selected value plus normalized decision metadata.
  • Compose sequential, parallel, and data-dependent decision programs with exhaustive outcomes and ordered events.
  • Define validated formal-tree grammars with lazy child slots, bounded recursion, parallel child expansion, and deterministic assembly.
  • Run and test every SDK flow with local deterministic Jev providers.
  • Install the packed package in clean NodeNext and bundler consumers while retaining the jev-code CLI binary.

Compatibility and migration

This advances the private package from 0.1.0 to 0.2.0. The language-AST Program export remains available; the new runtime is DecisionProgram.

Removed APIs and commands include generation providers, propose, program/action mapping, provider login/setup, and their credential/wire types. Existing saved config may contain obsolete generation fields; they are ignored. Legacy JEV_GENERATION_API_KEY values remain scrubbed from subprocesses.

Verification

  • pnpm test — 309 tests pass
  • pnpm run typecheck — passes
  • pnpm run build — passes
  • pnpm run test:package — packed ESM, NodeNext, bundler, CLI, deep-import, stale-artifact, and example contracts pass
  • Node 22 and Node 24 CI matrices cover the full suite and package contract
  • Plan-aware multi-agent review completed with no residual actionable findings
  • Browser gate: not applicable; no browser or frontend route changed

Post-Deploy Monitoring & Validation

No additional production monitoring service is required because this repository ships a local SDK/CLI rather than a hosted runtime.

  • Validation window: first 24 hours after merge and the next package dry run
  • Owner: repository maintainer
  • Healthy signals: Node 22/24 CI stays green; packed examples execute; CLI --help, decide, and a Jev-only coding run behave normally
  • Failure signals: declaration-consumer failures, deep-import leakage, provider concurrency exceeding configured limits, duplicate terminal events, or CLI references to removed provider/proposal commands
  • Mitigation trigger: revert the merge if CI or packed-consumer checks fail; otherwise patch the affected SDK contract before any registry publication

Planning artifacts

  • docs/brainstorms/2026-09-19-typed-decision-program-sdk-requirements.md
  • docs/plans/2026-09-19-002-feat-typed-decision-sdk-plan.md

Compound Engineering
Codex

@rhighs
rhighs merged commit a7585c9 into main Sep 19, 2026
4 checks passed
@rhighs
rhighs deleted the feat/typed-decision-sdk branch September 19, 2026 19:44
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