Rewrite SPEC.md as a full normative system specification (+ v0.2 production-hardening spec) - #2
Closed
mosesman831 wants to merge 24 commits into
Closed
Rewrite SPEC.md as a full normative system specification (+ v0.2 production-hardening spec)#2mosesman831 wants to merge 24 commits into
mosesman831 wants to merge 24 commits into
Conversation
- Hero section with centered title, tagline, and by LatticeAG - shields.io badges: CF Workers, TypeScript, MIT, Open Source - ASCII architecture diagram showing proxy + 3 layers + belief graph - Quick start: clone, install, run, configure base_url, deploy - Three layers table (Lens/Loop/Gate with phase and description) - Integration examples: Claude Code, Codex, Cursor, Hermes - Tech stack, roadmap (Phase 1-3), project structure - Monospace-forward, no emoji, minimal monochrome aesthetic - Footer: LatticeAG — Agents, together. with GitHub link
- CF Worker proxy with SSE streaming (zero added latency) - Belief extraction engine (regex patterns: causal, assumption, intention, evidence) - Durable Object session state (belief DAG in memory) - React dashboard with LatticeAG dark-theme branding - Belief timeline with type colors, confidence bars, filters - wrangler.toml, tsconfig, vitest config, package.json By LatticeAG — Agents, together.
- README rewritten to match PolyGnosis premium structure - TECHNICAL.md deep-dive: architecture, data flow, module details, type system - MIT License added - Subagent fixes: lens extraction, proxy routes, stream test
- README.md: badge link, clone URL, and footer link now point to LatticeAG/Axion - TECHNICAL.md: provenance author/GitHub updated to LatticeAG/Axion - src/dashboard/app.js: footer link updated to LatticeAG/Axion - package.json: add author=LatticeAG, license=MIT, and repository URL
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>
…ion-plan-3949 docs: Axion + PolyVerdict production readiness plan
Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
Co-authored-by: Moses Man <mosesman831@users.noreply.github.com>
…s to SPEC.md Co-authored-by: Moses Man <mosesman831@users.noreply.github.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.
What
Replaces the previous high-level
SPEC.md(a ~150-line brand/architecture overview) with a complete, normative specification of every aspect of the Axion Worker, written against the actual code insrc/, then extends it with a fully specified v0.2 production-hardening milestone and a conformance-invariants appendix. No code changes.Part 1 — full normative spec of the shipped system (spec 1.0.0)
x-axion-session; SSE detection, tee semantics,SseLineParserrecord/field rules, and UTF-8 decoder flush requirements; the background-extraction never-break-the-proxy contract.Part 2 — v0.2 production-hardening specification (spec 1.1.0, §27)
A new major section specifying the next milestone to implementation precision — normative when built, nothing implemented today. Governed by five explicit rules (default-off, additive-only, invariant-preserving, fail-open on infra / fail-closed on auth, invalid config never breaks requests):
DELETE /api/beliefs/:id.x-axion-ratelimit-*headers.truncateddisclosure, TTL via DO alarms, lazy idempotent v1→v2 migration, and privacy controls (AXION_STORE_RAW_TEXT,x-axion-no-store).since/type/minConfidencefilters, O(page) reads./healthz; a structured log-event schema with a full event table and redaction rules; Analytics Engine metrics; HMAC-signed webhook export with at-least-once semantics and an OTel attribute mapping.Part 3 — Appendix C: conformance checklist
Twenty testable invariants (I1–I20) of the shipped system — zero-buffering, no
Bearer undefined, header allowlist, session-header echo rules, enforce idempotency, DO-id non-leakage, UTF-8/SSE correctness, log redaction, no-invalidation-claims — each cross-referenced to its normative section and suitable as a standing regression test.Companion doc updates
TECHNICAL.mdandSPEC-PolyVerdict.mddefer toSPEC.mdas the normative source;README.mdpoints to it.BUILD-SPEC.mdremains untouched as the locked product-decision record; the spec is consistent with D1–D8, and §27 explicitly notes that BUILD-SPEC non-goals bind the current build while §27 defines the next milestone's contract.