M1: OSS policy engine, golden fixtures, SPEC v0.5 implementation spec - #4
Merged
Conversation
Remove Cloud/SaaS from MVP scope, replace M6 with docs/polish, simplify GTM to OSS launch, and add an explicit build-readiness go. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Add SPEC §9 feature freeze: exact engine/SDK/CLI/API behaviors, three demos, expression/redaction contracts, full policy pack YAML, 24-intent catalog, and Appendix D acceptance checklist. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Add JSON schemas, policy packs from SPEC Appendix A, golden fixtures, examples, docs skeletons, CI workflow example, and contrib placeholder. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Add packages/engine-ts with ESM build (tsup), vitest, zod schemas for Policy/ToolCallRequest/Verdict/Trace, YAML policy loader stubs, policy engine and classifier pipeline stubs, SPEC §9.6 redaction, Shield SDK surface, and basic tests. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Parallel scaffold of the full monorepo per SPEC v0.1: - Root: MIT LICENSE, uv workspace, pnpm workspaces, README - packages/engine-py: Pydantic models, policy/classifier/server stubs, redaction - packages/cli: Typer CLI (init, check, run, evaluate, traces, challenge, packs) - packages/engine-ts: @latticeag/lexshield with zod types and Shield stubs - schemas/, packs/, fixtures/golden/, examples/, docs/, CI example All Python (10) and TypeScript (10) tests pass; `uv run lexshield version` works. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Add expression parser/evaluator, full policy engine matching (tags, expressions, priority/tie-break, unclassified fallback), deterministic classifier parity with rules.yaml loading, golden and policy-engine tests. Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
OSS-first implementation kickoff: - SPEC v0.5: add §9B detailed implementation spec (module map, algorithms, golden matrix, CLI/API contracts, dev workflow) - Python: real PolicyEngine, rule matching, safe expressions, compiled policies - 10 golden fixtures + pytest harness (deterministic-only) - CLI check/evaluate wired to Shield; trace writes on evaluate - TypeScript golden confidence aligned with Python (0.5 unclassified) - change-window pack priority fix for allow-infra-with-ticket Tests: 35 Python + 26 TypeScript (10 golden scenarios parity) Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
mosesman831
marked this pull request as ready for review
July 11, 2026 13:43
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.
Summary
OSS-first build: expanded SPEC + M1 implementation (policy engine, classifiers, golden tests, CLI wiring).
SPEC v0.5
M1 shipped
match.py, realexpressions.py, priority-basedPolicyEngine, compiled policy loadercheckvalidates policy/rules;evaluateruns real Shield + JSON outputreload_policy(), unclassified @ 0.5 confidenceTests
Still stubbed (M2+)