{"_id":"@anthony-mini/mirai","_rev":"4-f3b740586c8872325a5ed7892aa88622","name":"@anthony-mini/mirai","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@anthony-mini/mirai","version":"0.1.0","keywords":["human-centered-ai","appropriate-trust","ai-coding","verification-hygiene","over-reliance","privacy-by-design","cli","claude-code","zero-dependency"],"author":{"name":"anthony-mini"},"license":"MIT","_id":"@anthony-mini/mirai@0.1.0","maintainers":[{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"}],"homepage":"https://github.com/anthony-mini/mirai#readme","bugs":{"url":"https://github.com/anthony-mini/mirai/issues"},"bin":{"mirai":"bin/cli.js"},"dist":{"shasum":"3cd87e1e4d055a9d029d6d601a0c752d1023574e","tarball":"https://registry.npmjs.org/@anthony-mini/mirai/-/mirai-0.1.0.tgz","fileCount":23,"integrity":"sha512-mKgH9XmSZpvHn3NgeEghHByUg4ZQEbzGGXAeJKvbhmi4l0su1U0qP8UZUdVUxSee6wN4RDwmSYhbujfjSnrAEw==","signatures":[{"sig":"MEUCIQCQgrS2j5bSBiMlwK0veZI6N5R+jc1tay2lxMJg2b7fKQIgPqY8GgnJqMbty3YUB1YbS9JtctSM/grWWirc7kKM6o0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71839},"main":"bin/cli.js","type":"module","engines":{"node":">=22"},"gitHead":"f5dbe6e8f3ba6de9c7b759016af11c3dd0b616bb","scripts":{"test":"node --test","mirai":"node bin/cli.js"},"_npmUser":{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"},"repository":{"url":"git+https://github.com/anthony-mini/mirai.git","type":"git"},"_npmVersion":"10.9.7","description":"MirAI is a local mirror of your AI-assisted coding practice (Human-Centered AI). It reports a verification-hygiene index and a conservative lower bound on over-reliance, fully local, with zero network and zero dependencies.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mirai_0.1.0_1784401158747_0.9746208278903035","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anthony-mini/mirai","version":"0.1.1","keywords":["human-centered-ai","appropriate-trust","ai-coding","verification-hygiene","over-reliance","privacy-by-design","cli","claude-code","zero-dependency"],"author":{"name":"anthony-mini"},"license":"MIT","_id":"@anthony-mini/mirai@0.1.1","maintainers":[{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"}],"homepage":"https://github.com/anthony-mini/mirai#readme","bugs":{"url":"https://github.com/anthony-mini/mirai/issues"},"bin":{"mirai":"bin/cli.js"},"dist":{"shasum":"434a8c239b4b6713193c322737238fa26b0e40a0","tarball":"https://registry.npmjs.org/@anthony-mini/mirai/-/mirai-0.1.1.tgz","fileCount":23,"integrity":"sha512-5+kiAGx+eg6MqBC3209bt55Mju3WPL0uc0QpmvIJt70ce4aq3XSYbrq/Rl+qmWgLaMd2ldcZ5NXjzjJ8WHUyRg==","signatures":[{"sig":"MEQCIF7msnBOxlwPkjxkiD129ANYC2pxMr42ypnBhD0X/Xc8AiApPkYcuDfkbtCmOnHS8YhZ1mnoVa3LFaj+pG9Bj6deJw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74292},"main":"bin/cli.js","type":"module","engines":{"node":">=22"},"gitHead":"d19c0d8a9f4c06aba1eb7a12f3596964274fa549","scripts":{"test":"node --test","mirai":"node bin/cli.js"},"_npmUser":{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"},"repository":{"url":"git+https://github.com/anthony-mini/mirai.git","type":"git"},"_npmVersion":"10.9.7","description":"MirAI is a local mirror of your AI-assisted coding practice (Human-Centered AI). It reports a verification-hygiene index and a conservative lower bound on over-reliance, fully local, with zero network and zero dependencies.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mirai_0.1.1_1784404080472_0.2754939051334824","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anthony-mini/mirai","version":"0.2.0","keywords":["human-centered-ai","appropriate-trust","ai-coding","verification-hygiene","over-reliance","privacy-by-design","cli","claude-code","zero-dependency"],"author":{"name":"anthony-mini"},"license":"MIT","_id":"@anthony-mini/mirai@0.2.0","maintainers":[{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"}],"homepage":"https://github.com/anthony-mini/mirai#readme","bugs":{"url":"https://github.com/anthony-mini/mirai/issues"},"bin":{"mirai":"bin/cli.js"},"dist":{"shasum":"8f08d14c0b453aba716c371a1763f1fe9fecf72d","tarball":"https://registry.npmjs.org/@anthony-mini/mirai/-/mirai-0.2.0.tgz","fileCount":37,"integrity":"sha512-todmxsKGHy/ext6HfhkFYNB/lq5ke3iExyFjnHY9EHm4SAlltqnYsMtT6+/ETC2VtMdFI4Jk3B57RJe417tclw==","signatures":[{"sig":"MEYCIQCKnlVGPF6NczxuEKKTso2guJzuqqmcK/a+wCK/Jz7cUwIhAKPmcVWLdrusrltRNxpsSGcg812ZoR+VpGxPrjWwBR7+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180609},"main":"bin/cli.js","type":"module","engines":{"node":">=22"},"gitHead":"31ff987adb3f94404ed16ed4679045e87859dfd5","scripts":{"lint":"eslint .","test":"node --test","mirai":"node bin/cli.js","format":"prettier --write .","lint:fix":"eslint . --fix","format:check":"prettier --check ."},"_npmUser":{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"},"repository":{"url":"git+https://github.com/anthony-mini/mirai.git","type":"git"},"_npmVersion":"10.9.7","description":"MirAI is a local mirror of your AI-assisted coding practice (Human-Centered AI). It reports a verification-hygiene index and a conservative lower bound on over-reliance, fully local, with zero network and zero dependencies.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"10.7.0","globals":"17.7.0","prettier":"3.9.5","@eslint/js":"10.0.1","eslint-config-prettier":"10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/mirai_0.2.0_1784472578107_0.5918902337813212","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@anthony-mini/mirai","version":"0.3.0","description":"MirAI is a local mirror of your AI-assisted coding practice (Human-Centered AI). It reports a verification-hygiene index and a conservative lower bound on over-reliance, fully local, with zero network and zero dependencies.","type":"module","bin":{"mirai":"bin/cli.js"},"main":"bin/cli.js","engines":{"node":">=22"},"scripts":{"test":"node --test","mirai":"node bin/cli.js","format":"prettier --write .","format:check":"prettier --check .","lint":"eslint .","lint:fix":"eslint . --fix","prepublishOnly":"npm test && npm run lint && npm run format:check"},"keywords":["human-centered-ai","appropriate-trust","ai-coding","verification-hygiene","over-reliance","privacy-by-design","cli","claude-code","zero-dependency","self-assessment"],"author":{"name":"anthony-mini"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anthony-mini/mirai.git"},"homepage":"https://github.com/anthony-mini/mirai#readme","bugs":{"url":"https://github.com/anthony-mini/mirai/issues"},"publishConfig":{"access":"public"},"devDependencies":{"@eslint/js":"10.0.1","eslint":"10.7.0","eslint-config-prettier":"10.1.8","globals":"17.7.0","prettier":"3.9.5"},"gitHead":"d1a7c8c24b63fa8e620621f258b24b4193d0c98e","_id":"@anthony-mini/mirai@0.3.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-LNByu06d48k0Po7Ank+FVCCceV2udcFKqY9bD1wUkoSIeiMfjcx2TxTlafWUvsMAI8/VP+8RpcSNL2EXoZNy8A==","shasum":"6e8a34254f00b5fa15f44ca6c3ce8e367528ca28","tarball":"https://registry.npmjs.org/@anthony-mini/mirai/-/mirai-0.3.0.tgz","fileCount":41,"unpackedSize":270036,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDaPMTlQ+9aAszMsPeK8hPFsbNmtfee4vV4Yy/YMSv6eAiBodOmTDUjJ/9AyxN+kFh84YSxoVVgXeT6hcy8NhcYSVA=="}]},"_npmUser":{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"},"directories":{},"maintainers":[{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mirai_0.3.0_1787816488323_0.7125021265816109"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-18T18:59:18.565Z","modified":"2026-08-27T07:41:28.616Z","0.1.0":"2026-07-18T18:59:18.882Z","0.1.1":"2026-07-18T19:48:00.614Z","0.2.0":"2026-07-19T14:49:38.239Z","0.3.0":"2026-08-27T07:41:28.484Z"},"bugs":{"url":"https://github.com/anthony-mini/mirai/issues"},"author":{"name":"anthony-mini"},"license":"MIT","homepage":"https://github.com/anthony-mini/mirai#readme","keywords":["human-centered-ai","appropriate-trust","ai-coding","verification-hygiene","over-reliance","privacy-by-design","cli","claude-code","zero-dependency","self-assessment"],"repository":{"type":"git","url":"git+https://github.com/anthony-mini/mirai.git"},"description":"MirAI is a local mirror of your AI-assisted coding practice (Human-Centered AI). It reports a verification-hygiene index and a conservative lower bound on over-reliance, fully local, with zero network and zero dependencies.","maintainers":[{"name":"anthony-mini","email":"anthony.mini@hotmail.fr"}],"readme":"# MirAI\n\n[![npm version](https://img.shields.io/npm/v/@anthony-mini/mirai.svg)](https://www.npmjs.com/package/@anthony-mini/mirai)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![Node >= 22](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](.nvmrc)\n\n**A local mirror of your AI-assisted coding practice.** MirAI reads your coding-assistant session\ntraces and, on demand, reports a _verification-hygiene index_ and a _conservative lower bound on\nover-reliance_ — without ever exposing the content of your transcripts.\n\n> **100% local · zero network · zero dependencies.** MirAI runs on Node alone. Nothing is uploaded,\n> nothing is installed, and the report is built from a whitelist of counters — so no fragment of a\n> transcript can leak, even by accident.\n\nThe name is a play on words: MirAI = _mirror_ + _AI_ (the \"AI\" of Human-Centered AI), and _mirai_\nmeans \"future\" in Japanese.\n\nMirAI is a research instrument, **not** a productivity score and **not** a valid measurement of\nover-reliance (that comes from a controlled study). Its real engineering contribution is the privacy\ncontract, not the counting.\n\n## What it does\n\n- Reads a coding-assistant session (a local `.jsonl` transcript) **in a streaming, structural way** —\n  it counts events, it does not read the meaning of your messages.\n- Reports a **verification-hygiene index** in qualitative bands (not a number to game).\n- Reports a **conservative lower bound** on over-reliance: it only counts _detected_ slips, never the\n  ones that went unnoticed, so the figure is explicitly a floor.\n- Suggests **task-oriented tips** (never person-oriented, never a metric sent to management).\n\n## Quick start\n\n**Prerequisite:** Node ≥ 22 (an `.nvmrc` is provided).\n\n```bash\n# Try it on the bundled demo session — no setup, touches no real trace:\nnpx @anthony-mini/mirai demo\n\n# Analyze the current session:\nnpx @anthony-mini/mirai run --scope current\n\n# Analyze a specific transcript, as JSON:\nnpx @anthony-mini/mirai run --session ./session.jsonl --json\n```\n\nThe report (Markdown + JSON) is written to `_mirror_output/`.\n\n### Run from source (contributors)\n\n```bash\ngit clone https://github.com/anthony-mini/mirai.git\ncd mirai\nnode bin/cli.js demo\nnpm test          # node --test\n```\n\n## Commands\n\n| Command          | What it does                                                                                                                                                                                                                                                          |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `demo`           | Runs the bundled synthetic session and then a **live privacy proof** (planted secrets never appear in the report). Fully reproducible — ideal for a demo.                                                                                                             |\n| `run [workflow]` | Runs a workflow (default `hygiene`) and writes the report to `_mirror_output/`.                                                                                                                                                                                       |\n| `sessions`       | Lists your recent local sessions with their signals (acceptances/reads/churn/band) — see which have activity, and get a ready command to analyze one. `--project` filters to the current project, `--limit N` caps the list.                                          |\n| `aggregate`      | Analyzes **all** your local sessions into one fleet report (totals, active vs query-only, hygiene bands, over-reliance-floor concentration, tool-usage signature, per-project rollup, weekly timeline). Counters only; cached in `~/.mirai` for instant re-runs.      |\n| `insights`       | Reads the **assistant's own self-assessment** of your sessions (what Claude Code's `/insights` wrote) and puts it beside MirAI's structural counters. Two proxies, side by side; MirAI never runs `/insights` for you. `--open` prints where Claude's HTML report is. |\n| `learn`          | Turns this session into a **learning companion**: next-session tips to use your Claude Code tools more deliberately, plus optional 60-second refresher cards for concepts (e.g. a Singleton) found in the code you accepted. An offer to improve, not a grade.        |\n| `list`           | Lists the pre-configured workflows.                                                                                                                                                                                                                                   |\n| `status`         | Shows install status.                                                                                                                                                                                                                                                 |\n| `install`        | Installs the `/mirai` command into a coding assistant (`--scope user` or `--scope project`).                                                                                                                                                                          |\n\nIn Claude Code, `mirai install` lays down five slash commands: **`/mirai`** (this session's report),\n**`/mirai-fleet`** (a report across all your sessions), **`/mirai-sessions`** (list your recent\nsessions), **`/mirai-learn`** (the learning companion for this session), and **`/mirai-insights`**\n(what the assistant says about itself, beside what your traces show).\n\nPre-configured workflows (declarative JSON in `src/skills/mirai/workflows/`):\n\n- `hygiene` (default): the main report — hygiene band, tips, over-reliance lower bound.\n- `resume`: a factual structural summary of the session (counts by type/tool), with no signal and no\n  interpretation.\n- `learn`: the learning companion — next-session guidance + concept refresher cards.\n- `insights`: the assistant's own self-assessment, cross-read against the traces.\n\n### Insights × mirror (`mirai insights` / `/mirai-insights`)\n\nSince 2026, the assistant does more than count: Claude Code's `/insights` asks Claude to **grade its own\nsessions** (\"very helpful\", \"goal mostly achieved\") and writes the result next to your transcripts.\nThat grade is a _self-report_, and a self-report is exactly what this instrument refuses to take at face\nvalue — a system can be _trusted_ without being _trustworthy_ (Shneiderman, 2022), and the aim is to\ncalibrate trust on real reliability, not to maximize it (Lee & See, 2004).\n\nSo `mirai insights` reads that assessment, keeps only its closed vocabularies and counters (never its\nfree text), joins it to MirAI's own signals session by session, and reports **where the two readings\npart**: sessions Claude graded well while the traces show a deficit. Two kinds, never merged into one\nsentence — _no verification act at all and fewer reads than acceptances_, and _a large diff applied\nwithout reading that file first_ (which can happen inside a session that checked plenty elsewhere).\n\nThree refusals make it usable rather than reassuring:\n\n- **It cannot congratulate you.** The count is one-directional: a harsh self-grade is never credited\n  back. Zero gap is reported as _an absence in the traces_, never as a clean bill of health.\n- **It disqualifies bad joins.** A session whose transcript grew materially after it was graded, or whose\n  two readings differ by more than a factor (the assistant re-reads what survives a context compaction;\n  MirAI streams the whole file), is **set aside and said so** — comparing two states of one session\n  would be a bug, not a finding.\n- **It never runs `/insights` for you.** Producing that assessment means asking a model to re-read your\n  transcripts. That stays your decision; MirAI reads files that already exist, and stays offline.\n\n```bash\nnpx @anthony-mini/mirai insights          # or /mirai-insights in Claude Code\n```\n\n### Learning companion (`mirai learn` / `/mirai-learn`)\n\nThe mirror measures; the companion helps you _act_. The durable antidote to over-reliance is competence —\na developer who understands the concept behind the AI's code can **verify** it instead of deferring to it.\nSo `mirai learn` turns one session into two optional, self-directed outputs:\n\n- **Next-session guidance** — from the session's signals, concrete Claude Code habits for next time (ask\n  for a diff walkthrough, run the tests and ask \"what could break?\", try plan mode, refresh `CLAUDE.md`),\n  plus the one habit worth repeating: _give Claude a way to verify its work_.\n- **Learning roadmap** — short, generic refresher cards (what it is · when not to use · pitfalls · a\n  self-check) for concepts detected in the code you accepted, so you understand what you accepted.\n\n**Privacy by construction.** Concept detection is local and emits only a fixed vocabulary of concept\n_labels_; the cards are bundled, generic text. No code, diff, or transcript content ever leaves your\nmachine — the same whitelist guarantee as the rest of MirAI.\n\n## Sample output\n\nA single session (`mirai demo`, on a synthetic session):\n\n```text\n# MirAI — session report\n\n8 acceptance(s) analyzed, verification hygiene low.\n\n**Verification hygiene: low**\n\nSignals: 8 acceptance(s) · 1 read(s) · 6 blind diff(s) · 3 re-edit(s)\n\n## Tips\n- 6 large diff(s) accepted without reading the file first: reading before accepting, or running the\n  tests right after, helps catch side effects.\n\n## For information: over-reliance lower bound\nAt least 1 acceptance(s) out of 8 were followed by a re-prompt signal (floor).\n```\n\n`mirai aggregate` (or `/mirai-fleet`) reports across **all** your local sessions — the telling part is\nwhere the over-reliance floor **concentrates** (e.g. \"~73% of the floor is on one project\"), plus a\nper-project rollup, the hygiene band distribution, and your tool-usage signature.\n\n## Privacy & guarantees\n\nPrivacy is the point, so it is enforced by construction rather than by promise:\n\n- **Redaction before reading.** Secrets, credentials and denylisted terms are masked before any line\n  is parsed (`src/skills/mirai/config/denylist.txt`, overridable).\n- **Whitelist output contract.** The report is assembled from an explicit whitelist of fields — all\n  counters or a hashed session id — so no transcript fragment can transit, even accidentally.\n- **Zero network.** MirAI never opens a socket. There is no update check, no telemetry, nothing. A\n  test (`test/no-network.test.js`) guards this on every change.\n- **Conservative by design.** The lower bound _under_-counts on purpose: an error accepted and never\n  noticed leaves no trace, so it cannot be counted. The report always says so.\n- **Adversarial test.** Secrets planted on purpose in every plausible field of a session (free text,\n  file paths, command output…) are checked, on every change, to never surface in the report.\n\n## How it works\n\n`redact` (mask before reading) → `reader` (structural streaming read) → `signals` (acceptance,\ncorrective re-prompt, blind diff, churn) → `report` (aggregate into a hygiene band + conservative\nlower bound) → `contract` (whitelist the output) → written to `_mirror_output/`. The analysis core is\n`node:` only — no third-party code — so it stays auditable on the privacy side.\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md). In short: Node ≥ 22, run\n`node --test`, and keep the non-negotiable invariants (zero dependency, zero network, whitelist\noutput, conservative bound, task-oriented and non-judgmental restitution).\n\n## License\n\n[MIT](./LICENSE) © 2026 anthony-mini\n","readmeFilename":"README.md"}