{"slug": "aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing", "title": "AURA v0.1.0: Deterministic Trigger Extraction, Auditable Math & a Self-Healing Analytics Engine", "summary": "The AURA project released v0.1.0, an open-source LLM guardrail engine that replaces heuristic keyword filters with deterministic trigger extraction, ordered-within-window token matching, and an auditable non-linear risk score computed as confidence = 1 − e^(−α × confidence_raw). The release also adds a GitHub Actions workflow that persists daily clone and view metrics to analytics/traffic-history.json, working around GitHub's silent 14-day deletion of repository traffic data.", "body_md": "If you follow AI safety, you know the uncomfortable truth: modern LLM guardrails are failing not because of complex zero-day exploits, but because of sloppy heuristics, brittle filters, and naive prompt-matching.\n\nWe built **AURA** to be pragmatic: deterministic, testable, fully auditable, and completely immune to the hallucination of its own telemetry.\n\nToday, we’re unpacking **AURA v0.1.0** — explaining our architectural decisions, showing real code excerpts, diving into non-linear risk scoring math, and solving the silent problem of lost repository analytics on GitHub.\n\nData flow in AURA is intentionally simple, pipeline-driven, and fully reproducible:\n\n`public_cases/*.json`) → Cleaned, validated, and normalized via `scripts/normalize-percases.ts` `scripts/extract-triggers.ts`) → Contextual regex and sliding-window token analysis. `config/signal-mapping.json` and saved to `config/trigger-weights.json`.` scripts/recalc_confidence.ts`) → Non-linear math transform + cross-check audit logic via `scripts/policy/crossCheckAdapter.ts`.` analytics/traffic-history.json` via GitHub Actions.\nWe compute a transparent raw evidence sum (`confidence_raw`) and convert it into a bounded score via a diminishing‑returns exponential:\n\n`confidence = 1 − e^(−α × confidence_raw)`\n\nThis keeps scores in [0...1] and avoids noisy amplification from many weak cues. Implementation (excerpt from `scripts/recalc_confidence.ts`):\n\n```\n// computedRaw is the honest sum of trigger weights + cross-check contributions\nconst alpha = (typeof cfg.normAlpha === 'number') ? cfg.normAlpha : 1.0;\nconst normalized = 1 - Math.exp(-alpha * computedRaw);\nlet newVal = Math.round(normalized * 100) / 100;\nif (newVal < minFloor) newVal = minFloor;\ne.confidence_raw = Math.round(computedRaw * 100) / 100;\ne.confidence = newVal;\n```\n\n`confidence_raw = 3.0` yields `≈ 0.59`, requiring compounding signals for a hard policy block.\nKeyword lists are a recipe for false positives. Matching a naive string like `\"generate 500\"` catches harmless test cases alongside malicious payloads.\n\nTo balance precision and recall, AURA v0.1.0 introduces **ordered-within-window token matching**.\n\nExcerpt from `scripts/extract-triggers.ts` showing how AURA tolerates small syntactic noise without matching scattered words across an entire prompt:\n\n```\nfunction containsOrderedWithinWindow(haystack: string[], needle: string[], window = 5): boolean {\n  if (needle.length === 0) return false;\n  if (needle.length === 1) return haystack.indexOf(needle[0]) !== -1;\n  for (let i = 0; i < haystack.length; i++) {\n    if (haystack[i] !== needle[0]) continue;\n    let idx = i + 1;\n    let matched = 1;\n    for (let k = 1; k < needle.length && idx < Math.min(haystack.length, i + window + 1); idx++) {\n      if (haystack[idx] === needle[k]) { matched++; k++; }\n    }\n    if (matched === needle.length) return true;\n  }\n  return false;\n}\n```\n\nIn `config/trigger-extraction.json`, bulk asset creation explicitly requires a deception target:\n\n```\n{\n  \"trigger\": \"non-consensual pattern generation\",\n  \"pattern\": \"\\\\bgenerate\\\\s+\\\\d+\\\\s+(?:deceptive\\\\s+assets|phishing\\\\s+emails|fake\\\\s+documents|fake\\\\s+profiles|fake\\\\s+accounts|malicious\\\\s+payloads|spam\\\\s+emails|synthetic\\\\s+attacks)\\\\b\",\n  \"description\": \"Bulk-generation demand with deception-specific targets.\"\n}\n```\n\nFor generic terms like `\"audit\"`, we mandate multi-token co-occurrence:\n\n```\n{\n  \"trigger\": \"unauthorized audit camouflage\",\n  \"cues\": [\"audit\", \"unauthorized\", \"independent\", \"bypass\", \"without permission\"],\n  \"description\": \"Require co-occurrence of 'audit' with authorization‑bypass phrasing.\"\n}\n```\n\nI don't know about you, but I got tired of seeing my project's growth through the lens of GitHub’s default 14-day window. GitHub silently wipes daily clone and view metrics after two weeks, leaving open-source maintainers completely blind to long-term adoption trends unless they buy third-party analytics dashboards.\n\nTo solve this, AURA `v0.1.0` includes an automated, self-healing snapshot pipeline in `.github/workflows/traffic-history.yml`.\n\n```\n- name: Auto-merge PR and delete branch\n  uses: actions/github-script@v6\n  with:\n    github-token: ${{ secrets.TRAFFIC_TOKEN }}\n    script: |\n      const head = `auto/traffic-report-${process.env.GITHUB_RUN_ID}`;\n      const { data: prs } = await github.rest.pulls.list({ owner: context.repo.owner, repo: context.repo.repo, head: `${context.repo.owner}:${head}`, state: 'open' });\n      if (prs && prs.length > 0) {\n        await github.rest.pulls.merge({ owner: context.repo.owner, repo: context.repo.repo, pull_number: prs[0].number, merge_method: 'squash' });\n        await github.rest.git.deleteRef({ owner: context.repo.owner, repo: context.repo.repo, ref: `heads/${head}` });\n      }\n```\n\nOne of the best parts of open-sourcing AURA is having sharp contributors look at the edge cases. Our contributor [Amirhossein Agrest](https://github.com/AmirhosseinAgrest) spotted a subtle async race condition in how case state is updated before disk serialization.\n\n`updateCase()` awaits cross-check evaluation internally. However, in certain batch execution flows, calling scripts invoked it across collections without awaiting the return promise before writing JSON files to disk.\n\nThe result? CLI logs proudly claimed success, while disk artifacts still contained pre-audit state.\n\n``` js\n// ❌ Potential Race: Fire-and-forget async invocation\nfor (const entry of entries) updateCase(entry);\n\n// ✅ Fix Pattern: Await all async mutations before serializing to disk\nconst promises = entries.map(entry => updateCase(entry));\nawait Promise.all(promises);\n```\n\nWe’ve logged this issue (shoutout to Amirhossein!) and are pairing it with artificial network-delay adapters in our test suite to guarantee filesystem persistence never outruns in-memory state in the upcoming patch.\n\nAURA is not magic, and it doesn't pretend to be. It's a pragmatic stack: deterministic rules, auditable math, and CI that refuses to forget its history.\n\nIf you're looking for a silver bullet, good luck! But if you want a system that is testable, inspectable, and built on sound software engineering principles, welcome aboard.\n\n⭐ **Check out the repository, inspect the code, and give us a star:**\n\n👉 **GitHub:** [kate8382/AURA](https://github.com/kate8382/AURA)\n\nOpen an issue, or even better — submit a PR with a failing unit test to help us catch edge cases faster.", "url": "https://wpnews.pro/news/aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing", "canonical_source": "https://dev.to/kate8382/aura-v010-deterministic-trigger-extraction-auditable-math-a-self-healing-analytics-engine-17ge", "published_at": "2026-09-26 16:18:50+00:00", "updated_at": "2026-09-26 16:29:04.077581+00:00", "lang": "en", "topics": ["ai-safety", "large-language-models", "ai-tools", "developer-tools"], "entities": ["AURA", "GitHub", "GitHub Actions"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing", "markdown": "https://wpnews.pro/news/aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing.md", "text": "https://wpnews.pro/news/aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing.txt", "jsonld": "https://wpnews.pro/news/aura-v0-1-0-deterministic-trigger-extraction-auditable-math-a-self-healing.jsonld"}}