Skip to content

docs: Axion + PolyVerdict production readiness plan - #1

Merged
mosesman831 merged 10 commits into
mainfrom
cursor/axion-polyverdict-production-plan-3949
Jul 16, 2026
Merged

docs: Axion + PolyVerdict production readiness plan#1
mosesman831 merged 10 commits into
mainfrom
cursor/axion-polyverdict-production-plan-3949

Conversation

@mosesman831

@mosesman831 mosesman831 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Locked BUILD-SPEC.md and implemented Axion Phase 1 + PolyVerdict v1 for OSS production readiness.

Locked decisions (implemented)

  • Auth: caller key passthrough → optional UPSTREAM_API_KEY → else 401 (never Bearer undefined)
  • Data model: flat chronological belief timeline (DAG types remain @planned only)
  • Providers: OpenAI /v1/chat/completions + Anthropic /v1/messages
  • Dashboard: paste session id (?session= / localStorage)
  • PolyVerdict: opt-in enforce mode (x-axion-schema or response_format.json_schema); syntax validate + coerce + retry ≤3

What shipped

Area Change
Proxy Provider adapters, passthrough auth, content-normalized extraction
Lens because of fix, evidence field, additive confidence [0.1,1.0], session stamp
State DO flattens batches; returns human sessionId
Dashboard Paste session UX; "Low confidence" filter
PolyVerdict Minimal JSON Schema subset + enforce loop wired in Worker
OSS npm test / npm run check, CI, CONTRIBUTING, SECURITY, .dev.vars.example
Docs README / SPEC / TECHNICAL / PLAN truth-aligned

Verification

npm run check  →  tsc clean, 100 tests passed

Intentionally not built

Belief DAG / root-cause, /api/sessions registry, Loop, Gate tool blocking, semantic PolyVerdict, schema-registry DO.

Docs

  • BUILD-SPEC.md — locked build contract (acceptance checklist checked)
  • PLAN.md — waves marked implemented
  • Updated README / SPEC / TECHNICAL / SPEC-PolyVerdict
Open in Web Open in Cursor 

cursoragent and others added 10 commits July 16, 2026 15:04
Spec the highest-priority fixes for OSS deploy of Phase 1 Lens,
with PolyVerdict sequenced as opt-in enforce mode after the observe
path is honest and usable. No runtime code changes yet.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
All product decisions locked: passthrough auth, flat timeline,
OpenAI+Anthropic adapters, paste-session dashboard, PolyVerdict
opt-in enforce mode (syntax+coerce+retry). Ready to build.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Replace the session <select> with a text input + Load button. Prefill
from ?session= query or the axion.sessionId localStorage key on mount.
Rename the 'Wrong beliefs only' filter to 'Low confidence only'
(confidence < 0.4) and guard BeliefCard against missing confidence.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Add 'test' (vitest run) and 'check' (tsc --noEmit && vitest run) npm
scripts, a GitHub Actions CI workflow running npm run check on Node 20
for pull_request and push to main, plus .dev.vars.example,
CONTRIBUTING.md, and SECURITY.md. SECURITY documents that the beliefs
API is unauthenticated in Phase 1 and the session id is a capability URL.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
- Split because-of / because into two patterns (group 1) so causal beliefs
  are extracted from "Because of ..." sentences
- Set evidenceGroup: 1 on all evidence patterns (belief + evidence hold cited text)
- Replace midpoint confidence interpolation with additive delta modifiers,
  clamped to [0.1, 1.0]
- Allow end-of-string as a clause terminator in patterns
- Add thorough extract.test.ts (vitest)

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
…helpers

Implements BUILD-SPEC section 7 (opt-in enforce path):
- schema.ts: zero-dep JSON Schema subset validator + type coercion
  (type/properties/required/items/enum, nested, unknown keywords ignored),
  plus stripMarkdownFences and parseJsonFromAssistant.
- enforce.ts: detectSchemaTrigger (x-axion-schema header + response_format
  json_schema), enforceOnce, OpenAI/Anthropic retry-hint injection,
  MAX_ENFORCE_ATTEMPTS=3, and a pure runEnforceLoop driver.
- types.ts, index.ts: shared types and re-exports.
- schema.test.ts: valid/missing-required/coerce/enum/nested/fence-strip (28 tests).

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
- content.ts: extractOpenAIAssistantText, extractAnthropicAssistantText,
  extractAssistantText (transport-aware dispatcher)
- stream.ts: parseAnthropicSseData, final TextDecoder flush,
  provider-aware tee (backward-compatible openai default)
- providers/: ProviderAdapter interface, openai + anthropic adapters,
  matchProvider registry
- content.test.ts + stream.test.ts coverage

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
DO stores sessionName and returns flat ExtractedBelief[]; extraction
passes sessionId into the lens. Includes pure flatten helpers + tests.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Integrate OpenAI + Anthropic observe paths with passthrough auth,
content-normalized Lens extraction, and opt-in PolyVerdict schema
enforcement. Truth-align README/SPEC/TECHNICAL/PLAN with shipped code.

Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
@mosesman831
mosesman831 marked this pull request as ready for review July 16, 2026 15:41
Copilot AI review requested due to automatic review settings July 16, 2026 15:41
@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@mosesman831
mosesman831 merged commit 0f16331 into main Jul 16, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

3 participants