Skip to content

Repository files navigation

MapperAPP

MapperAPP is an experimental Chrome extension for mapping the structure of arguments in written texts. It extracts the main text from the page you are reading, asks a language model to identify what follows from what, and displays the result as a navigable hierarchical map beside the source.

MapperAPP argument-map interface

The illustration uses original synthetic text and contains no model output or third-party source material.

Important

MapperAPP is a research prototype, not an authority on what a text means. Its output can omit, flatten, or invent relationships. Check every map against the highlighted source passages.

Features

  • Progressive views of one map: Spine, Argument, As written, and As required.
  • Quick and Careful model modes with streaming first-pass results.
  • Verbatim passage anchors connecting map nodes to source sentences.
  • Visible warnings for nodes that cannot be anchored in the text.
  • Pan, zoom, branch expansion, and a node inspector.
  • A second pass that distinguishes inferred premises from unstated requirements.
  • No hosted MapperAPP API: you deploy your own Worker and pay your own model-provider charges.

Architecture and privacy

Chrome tab
  -> Manifest V3 extension (Readability extraction and dagre rendering)
  -> your Cloudflare Worker (access-controlled by APP_TOKEN)
  -> Anthropic Messages API (using your ANTHROPIC_API_KEY)

The extension has only activeTab, scripting, and storage permissions. It runs when you click its toolbar icon. The extracted article title and text are sent to your Worker and then to Anthropic for analysis; the page URL is not sent. The Worker URL and app token are stored locally in the current Chrome profile, not Chrome Sync.

Do not analyze confidential, legally privileged, personal, or otherwise sensitive text unless your use of Cloudflare and Anthropic is appropriate for that material. This repository contains no shared endpoint, API key, or account identifier that can generate charges for the maintainer.

Prerequisites

  • Google Chrome or another Chromium browser supporting Manifest V3 unpacked extensions.
  • Node.js 20 or newer and npm.
  • A Cloudflare account with Wrangler access.
  • An Anthropic API account and key. API usage is billed by Anthropic.

Installation

1. Deploy your Worker

git clone https://github.com/millermanmichael/mapperapp-public.git
cd mapperapp/worker
npm install
npm run build:prompts
npx wrangler login
npx wrangler secret put ANTHROPIC_API_KEY
npx wrangler secret put APP_TOKEN
npm run deploy:safe

Use a long random value for APP_TOKEN, for example openssl rand -hex 32. Do not reuse your Anthropic key as the app token. Wrangler stores both values as Worker secrets; never place working values in .env.example, wrangler.toml, source code, issues, or screenshots.

For local Worker development only, copy worker/.dev.vars.example to worker/.dev.vars and replace the placeholders. .dev.vars is ignored by Git.

The default models and request limits are non-secret variables in worker/wrangler.toml. Change them to model identifiers available to your Anthropic account if necessary.

2. Load the extension in Chrome

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Select Load unpacked.
  4. Choose this repository's extension/ directory.
  5. Open MapperAPP's Details, then Extension options.
  6. Enter the Worker URL printed by Wrangler and the same random APP_TOKEN.
  7. Pin MapperAPP to the toolbar if desired.

3. Use MapperAPP

Open a substantial essay or article and click the MapperAPP toolbar icon. Pass 1 maps the argument as written. Pass 2 adds what the argument appears to require. Esc returns to the page; clicking the toolbar icon again also closes the overlay.

The four detail levels are projections of the same analysis:

  • Spine: conclusion and load-bearing premises.
  • Argument: all premises and sub-conclusions.
  • As written: stated evidence, objections, and replies.
  • As required: inferred and required but unstated premises from pass 2.

Development

npm install --prefix worker
npm run check
  • npm run build embeds prompts/*.md into the Worker module.
  • npm run lint runs JavaScript syntax checks.
  • npm test runs Worker behavior and privacy tests.
  • npm run validate:extension validates the manifest, permissions, assets, and privacy invariants.
  • npm --prefix worker run dev starts the Worker locally.
  • npm --prefix worker run deploy:safe rebuilds prompts and deploys.

When changing the reading procedure, edit prompts/pass1-as-written.md or prompts/pass2-as-required.md; do not hand-edit generated worker/src/prompts.js.

Current limitations

  • Model output is probabilistic and can misread irony, dialogue, compressed prose, unstated context, or esoteric writing.
  • The default input cap is 10,000 words; longer texts are refused, not silently truncated.
  • Article extraction depends on page structure and may fail on applications, PDFs, paywalls, or unusual layouts.
  • Chromium only; Firefox and Safari are untested.
  • No persistence, export, comparison mode, provider abstraction, or automated interpretive-fidelity benchmark yet.
  • Accept/Edit/Unsupported changes affect only the in-memory map.
  • Self-deployment is intentionally required, so setup is more involved than a store-installed extension.

See ROADMAP.md and CONTRIBUTING.md.

Third-party components

The extension vendors Mozilla Readability under Apache-2.0 and dagre (including bundled dependencies) under their included permissive licence notices. See THIRD_PARTY_NOTICES.md.

Licence

MapperAPP's original code and documentation are released under the MIT Licence. Vendored dependencies remain under their respective licences.

About

An experimental Chrome extension for mapping the structure of arguments in written texts.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages