# Code

## Patches and side projects

Patches sent upstream, and side projects published because they turned out to
be useful to someone other than me. None of this is a product and none of it
is anyone's roadmap. The upstream work comes first because it is the part that
only counts once it merges — a patch carried in an upstream project is a harder
claim than a repository of my own.

Canonical: https://anivar.net/code/

## decern

Proven authorization for agentic systems.

Authorization kernel · anivar/decern: https://github.com/anivar/decern

Identity asks who is acting. Security asks what they were allowed to do. Observability asks what actually happened. When software acts on someone's behalf those are one question, and it can only be answered afterwards if someone wrote the answer down at the time. That written answer is the provenance of the action.

decern is the part that decides, and the part that writes it down. One set of rules covers people, AI agents and services: nothing is allowed unless a rule allows it, authority handed on can only get smaller, and access stops the moment it expires. Every decision goes into a record that cannot be edited without the edit showing, so anyone can check what was decided without trusting whoever runs the system.

- 9 rules it can never break, checked against every possible input
- 3 kinds of actor under one set of rules: people, agents, services
- 0 trust in the operator needed to check a decision yourself

- Checks: Nine rules proven to hold for every possible input, by the cvc5 solver
- Does not claim: The proof covers decern's own rules. It cannot tell you whether the policy you wrote says what you meant.
- Ships as: A command-line tool to prove, decide and verify, and a policy service that refuses by default when anything goes wrong
- Licence: Apache-2.0 · v0.1.1

- decern.anivar.net ↗: https://decern.anivar.net/

## Upstream

### ECMAScript in Rhino

JavaScript engine · mozilla/rhino: https://github.com/mozilla/rhino

Language features implemented in Mozilla's JavaScript engine, and a specification-conformance fix where Rhino preferred array-like objects over iterables and TC39 says otherwise. Some features arrived the other way: a maintainer picked up the work and carried it in, which counts the same once it ships.

Merged:
- Promise.try: https://github.com/mozilla/rhino/pull/2025
- Set methods: https://github.com/mozilla/rhino/pull/2029
- ArrayBuffer transfer: https://github.com/mozilla/rhino/pull/2030
- Error.isError: https://github.com/mozilla/rhino/pull/2048
- Math.f16round: https://github.com/mozilla/rhino/pull/2049
- Array.from conformance: https://github.com/mozilla/rhino/pull/2077

Carried in by a maintainer, crediting this work:
- Resizable ArrayBuffers and typed arrays: https://github.com/mozilla/rhino/pull/2273
- WeakRef: https://github.com/mozilla/rhino/pull/2431

### Math.sumPrecise in Hermes

JavaScript engine · facebook/hermes: https://github.com/facebook/hermes

Exact floating-point summation for React Native's engine, implemented with compensated summation so a sum of many doubles does not drift. Meta lands contributions by importing them, so the pull request reads closed while the commit carries the authorship — and the feature has been maintained by their engineers since.

- Landed: Imported and merged; refined afterwards by Meta engineers

Merged:
- Math.sumPrecise: https://github.com/facebook/hermes/commit/c918da9b86fb4ecd02c64aa065e1f39e216f41a0

### Instrumentation in Open Policy Agent

Policy engine · open-policy-agent/opa: https://github.com/open-policy-agent/opa

Instrumentation for a policy engine running in production: a benchmarking harness for the WebAssembly path, a counter for the network calls a policy makes, and documentation for metrics that had none. The project credits contributors by name in its release notes, which is how a fix acquires a date and a version rather than just a merge.

Merged:
- WASM benchmarking: https://github.com/open-policy-agent/opa/pull/7841
- http.send counter: https://github.com/open-policy-agent/opa/pull/7851
- Metrics documented: https://github.com/open-policy-agent/opa/pull/8103

Named in the release notes:
- v1.9.0: https://github.com/open-policy-agent/opa/releases/tag/v1.9.0
- v1.14.0: https://github.com/open-policy-agent/opa/releases/tag/v1.14.0
- v1.16.0: https://github.com/open-policy-agent/opa/releases/tag/v1.16.0

- CNCF contributor card ↗: https://contribcard.cncf.io/anivar

### Auth and sync fixes in Amplify

Client SDK · aws-amplify/amplify-js: https://github.com/aws-amplify/amplify-js

Bugs found by running it at scale and fixed upstream: users logged out at random because token clearing was too aggressive, GraphQL sockets that never reconnected after an auth error, and DataStore queries that could not express membership until they could.

Merged:
- in / notIn operators: https://github.com/aws-amplify/amplify-js/pull/14544
- Random logouts fixed: https://github.com/aws-amplify/amplify-js/pull/14568
- Socket reconnection: https://github.com/aws-amplify/amplify-js/pull/14569

### any-llm and any-agent at Mozilla AI

Contributions · mozilla-ai: https://github.com/mozilla-ai

Merged into any-llm and any-agent — the model-agnostic client and agent framework Mozilla publishes.

### IETF contributions

Internet-Drafts · anivar/ietf-contributions: https://github.com/anivar/ietf-contributions

Canonical source for the Internet-Drafts and specification text, with the toolchain that builds them. draft-aravind-oauth-decision-subject defines dsub, naming the party a decision is about; draft-aravind-oauth-operator-of-record defines opr, marking who operated when key binding cannot distinguish a human from an agent acting for one. Section 10.2 of draft-ranjbar-dane-did, Continuity of Holding, was merged in full, with co-authorship from -01.

- Drafts: dsub · opr — JWT claims for agent authorization, -00 posted 19 Jul 2026
- Co-authored: draft-ranjbar-dane-did — Continuity of Holding, merged in -01
- Verifies: Rebuilt text diffed against every posted revision

- The drafts →: /research/#protocol

## Skills

### Agent-native test infrastructure

Testing skills · skills.sh/anivar: https://skills.sh/anivar

A testing stack proven in production, encoded as rules a coding agent follows rather than documentation it has to interpret: Zod for contracts, Faker for data, Jest for units, Maestro for flows, with MSW and Redux-Saga alongside. Each skill pairs an implementation guide with its testing counterpart.

- zod: https://skills.sh/anivar/zod-skill/zod
- zod-testing: https://skills.sh/anivar/zod-testing/zod-testing
- jest: https://skills.sh/anivar/jest-skill/jest
- msw: https://skills.sh/anivar/msw-skill/msw
- redux-saga: https://skills.sh/anivar/redux-saga-skill/redux-saga
- redux-saga-testing: https://skills.sh/anivar/redux-saga-testing/redux-saga-testing

- Stack: Zod for contracts · Faker for data · Jest for units · Maestro for flows

### Diátaxis, made enforceable

Authoring skill · anivar/developer-docs-framework: https://github.com/anivar/developer-docs-framework

Diátaxis as something enforceable rather than aspirational: the four documentation modes with rules an agent applies while writing, and style guides it checks itself against.

- diataxis-docs-framework: https://skills.sh/anivar/developer-docs-framework/diataxis-docs-framework

- Basis: Diátaxis — tutorial, how-to, reference, explanation
- Enforces: Rule set and style guides, applied during authoring

### Reading a codebase before contributing

Review skill · anivar/contributor-codebase-analyzer: https://github.com/anivar/contributor-codebase-analyzer

The deep read a reviewer needs before touching unfamiliar code: what a contribution actually changes, which conventions the repository already holds, and where the change sits against them — done as analysis rather than as a diff summary.

- contributor-codebase-analyzer: https://skills.sh/anivar/contributor-codebase-analyzer/contributor-codebase-analyzer

- Reads: Repository conventions, contribution history, change surface

### Corrigibility assessment

Skill · schema · anivar/corrigibility-schema: https://github.com/anivar/corrigibility-schema

The framework as something an agent installs and runs: the assessment schema packaged so a system can be scored against the five conditions without reading the paper first.

- corrigibility-assess: https://skills.sh/anivar/corrigibility-schema/corrigibility-assess

- Protocol: corrigibility-schema — manifest and audit, RFC 8785 canonical, Ed25519 signed
- Paper: Corrigibility as a Structural Precondition — doi 10.2139/ssrn.6059075 — https://doi.org/10.2139/ssrn.6059075

- The framework →: /corrigibility/

### India income-tax toolkit

Skill · package · anivar/india-tax-guru: https://github.com/anivar/india-tax-guru

A computation engine rather than a chat assistant: every figure it reports traces to a function, and every rule is versioned by assessment year so nothing drifts silently across Budgets. Old-versus-new regime comparison, HRA and capital-gains computation, CTC restructuring, and the advance-tax interest nobody enjoys estimating by hand. Installable as a Python package or as an agent skill that reads the documents and asks only what they cannot answer.

- india-tax-guru: https://skills.sh/anivar/india-tax-guru/india-tax-guru

- Computes: Regime comparison · HRA · capital gains · house property · 234B/234C interest
- Ships as: Python package on PyPI, with a CLI — and the same engine as an agent skill
- Licence: MIT

- PyPI ↗: https://pypi.org/project/india-tax-guru/

## Libraries

### react-native-ai-gateway

React Native TurboModule · anivar/react-native-ai-gateway: https://github.com/anivar/react-native-ai-gateway

On-device AI for React Native, wrapping the frameworks the phone already ships — Apple Vision, NaturalLanguage, Speech and Foundation Models on iOS, Google ML Kit on Android — behind one API instead of two. Nothing leaves the device, and CI fails the build if a networking symbol appears in the native sources at all.

The part that isn't cosmetic: availability is read from each platform's own signal, not guessed from which classes compiled in, so a caller can tell a device that will never run a feature from one that just hasn't fetched the model yet.

- Licence: MIT · zero JS runtime dependencies

### Campaign infrastructure, pro bono

Rebuilds · rethinkaadhaar.in: https://rethinkaadhaar.in

A campaign site rebuilt as maintainable static infrastructure: content recovered verbatim from a decade of exports, an editor's CMS that non-technical staff can actually publish from, and CI that catches a broken build before a volunteer sees it.

- Rebuilt: rethinkaadhaar.in
- Stack: Astro · Decap CMS · auth worker · deploy gates

### react-native-turbo-toast

React Native TurboModule · anivar/react-native-turbo-toast: https://github.com/anivar/react-native-turbo-toast

A toast library for React Native built on TurboModules instead of the bridge, with a priority queue underneath so messages don't just stack up and overwrite each other. Grouping, deduplication and multi-action buttons all work through the same queue, on iOS and Android alike.

- Licence: MIT

Machine index: https://anivar.net/llms.txt · Full text of everything: https://anivar.net/llms-full.txt
