trylode 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lode (trylode.io)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PERMISSIONS.md ADDED
@@ -0,0 +1,36 @@
1
+ # trylode: what it reads, writes and sends
2
+
3
+ `npx trylode setup` and `npx trylode remove` run the Lode Integration Check skill's `init` command. They run only inside a project folder (one with `.git`, `package.json` or a similar marker), never in your home folder or the root.
4
+
5
+ ## Writes (only with `--yes`; without it, nothing is written)
6
+
7
+ - `.mcp.json`: one `"lode"` server entry, `https://trylode.io/mcp?src=setup`. Other entries are unchanged.
8
+ - `.cursor/mcp.json`: the same entry for Cursor.
9
+ - `CLAUDE.md` (created if missing) and `AGENTS.md` (only if it already exists): one marked block with the Lode rules line, added at the end. Nothing else in the file changes.
10
+ - `.cursor/rules/lode.mdc`: the rules line as a Cursor rule.
11
+ - `.claude/skills/lode-integration-check/`: a copy of the Lode Integration Check skill.
12
+ - `.claude/lode-init.json`: a note of what was added, so `remove` can undo exactly that.
13
+
14
+ `--no-rules` leaves the rules line out. `--client claude` or `--client cursor` writes for one client only.
15
+
16
+ ### Only with `--gate` (Lode Gate, Claude Code only, off unless you add it)
17
+
18
+ - `.claude/settings.local.json`: one `PreToolUse` hook entry that runs `.claude/skills/lode-integration-check/scripts/gate.mjs` before shell commands. This file is yours only, so nobody who clones the project gets Gate without choosing it. Setup never writes the shared `.claude/settings.json`.
19
+ - `.claude/.gitignore` (only inside a git repository): two lines at the end, a comment and `settings.local.json`, so git never picks up the hook. `remove` takes out exactly those two lines, never a line you wrote.
20
+ - `.claude/skills/lode-integration-check/scripts/gate.mjs` and `gate-packages.json`: the hook and Lode's list of package names it looks for.
21
+
22
+ If a `gate.mjs` or `gate-packages.json` that differs from this package's copy is already in the project, setup refuses (exit 2) rather than point the hook at it.
23
+
24
+ ## Reads
25
+
26
+ Only the files above, to see what is already there. It never follows links, never edits a file it can't parse or couldn't write back exactly (a repeated key, or a number JSON can't keep exactly), and refuses files that are links, hard links, larger than 1 MB or not plain UTF-8.
27
+
28
+ ## Sends
29
+
30
+ Setup and remove make no network requests. The `?src=setup` code in the server address only tells Lode, when your agent later connects, that the connection came from this command. The skill it copies sends requests to Lode only when your agent uses it; what it sends is in `skill/PERMISSIONS.md`.
31
+
32
+ **Lode Gate, if you add it,** runs on your machine before each shell command the agent runs in Claude Code. It sends a request to Lode (`POST https://trylode.io/v1/gate`, 1.5 second limit) only when the command installs a package on Lode's list: those package names, the package manager, Lode platform codes worked out from config file names (never their contents), the mode and a random code for the Claude Code session. Never the command, versions, paths, file contents or the session id. Lode's answer is added to the agent's context as facts; Gate never blocks an install, and if Lode is slow or offline nothing changes. Set `LODE_GATE_LOG=0` to get the facts with nothing kept by Lode. Full detail: `skill/PERMISSIONS.md`.
33
+
34
+ ## Removes
35
+
36
+ `npx trylode remove --yes` takes out only the entries, blocks, rule file, skill copy and Gate hook that setup added, and deletes a file only when nothing else is left in it. `npx trylode remove --gate --yes` takes out only Lode Gate.
package/README.md CHANGED
@@ -1,3 +1,20 @@
1
- # Temporary Holding Version
1
+ # trylode
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One command puts [Lode](https://trylode.io) in your project, so your coding agent checks source-linked integration facts (what syncs, prices, platform plans, regions, limits) before it adds, recommends or builds a third-party service.
4
+
5
+ ```bash
6
+ npx trylode setup # shows what it would add
7
+ npx trylode setup --yes # adds it
8
+ ```
9
+
10
+ It adds:
11
+
12
+ 1. **Lode's MCP server** to `.mcp.json` (Claude Code) and `.cursor/mcp.json` (Cursor). Hosted, no sign-in or API key.
13
+ 2. **The rules line** to `CLAUDE.md`, `AGENTS.md` (if present) and `.cursor/rules/lode.mdc`. This is the step that matters most: agents reliably use a tool their instructions file tells them about.
14
+ 3. **The Lode Integration Check skill** in `.claude/skills/`.
15
+
16
+ Optional (Claude Code only): Lode Gate. Running `npx trylode setup --gate --yes` adds a hook that runs just before the agent installs a package Lode knows (for example, `npm install resend`) and injects Lode's facts into the agent's context: required platform plan, recorded regions, and any SDK deprecation or published security advisory (each with a link and date). It never blocks an install and applies only to you, in this project (`.claude/settings.local.json`, kept out of git). When triggered, it sends only package names and a few codes to Lode—never your full command, source code, or local file paths. See [PERMISSIONS.md](PERMISSIONS.md) for details.
17
+
18
+ Undo it with `npx trylode remove --yes` (or `npx trylode remove --gate --yes` for Gate only). Setup itself sends nothing to Lode. See [PERMISSIONS.md](PERMISSIONS.md).
19
+
20
+ Source: [lode-hq/lode-mcp](https://github.com/lode-hq/lode-mcp). MIT licence. Lode's data is free to use with a link per fact; see [trylode.io](https://trylode.io).
package/bin/cli.mjs ADDED
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ // npx trylode setup (LOD-248, Paul approved 01-12-2026): puts Lode into this project for the coding agents that read it.
3
+ // It is the Lode Integration Check skill's reviewed `init`, packaged: it writes Lode's MCP server (address tagged
4
+ // ?src=setup), the rules line (CLAUDE.md, AGENTS.md if present, .cursor/rules/lode.mdc) and the skill, shows the plan
5
+ // first and writes only with --yes. It sends nothing to Lode. `npx trylode remove --yes` undoes only what it added.
6
+ // With --gate (LOD-262) it also runs the skill's reviewed `init --gate` (warn mode, .claude/settings.local.json only).
7
+ // No dependencies, no install scripts. See PERMISSIONS.md.
8
+
9
+ const USAGE = `Usage:
10
+ npx trylode setup [--yes] [--client claude|cursor|all] [--no-rules] [--gate]
11
+ Shows what it would add to this project, and adds it with --yes:
12
+ .mcp.json and .cursor/mcp.json: one "lode" server entry (other entries unchanged)
13
+ CLAUDE.md, AGENTS.md (only if present), .cursor/rules/lode.mdc: the Lode rules line
14
+ .claude/skills/lode-integration-check/: the Lode Integration Check skill
15
+ --gate Also enables Lode Gate for Claude Code in .claude/settings.local.json (user-local, not shared).
16
+ Injects Lode's facts into the agent's context before installing a known package; never blocks.
17
+ npx trylode remove [--yes] [--gate]
18
+ Takes out only what setup (or the skill's init) added.
19
+ --gate Removes only Lode Gate (leaves the rest of your Lode setup intact).
20
+
21
+ Setup and remove send nothing to Lode. What Lode Gate sends when it runs: PERMISSIONS.md. More: https://trylode.io/agents/`;
22
+
23
+ // LOD-262 (Paul's wording, 02-12-2026): the one line setup adds when Gate is not on.
24
+ const GATE_OFFER = 'Optional for Claude Code: Lode Gate adds Lode\'s facts to your agent\'s context before installing a known package (never blocks). Enable with: npx trylode setup --gate --yes';
25
+
26
+ const argv = process.argv.slice(2);
27
+ const cmd = argv[0];
28
+ // Only these flags are passed on; anything else is ignored. --gate is handled here (warn mode, this person only):
29
+ // --shared and --mode are never passed through, so setup can't put the hook in a committed file (LOD-262).
30
+ const flags = [];
31
+ let gate = false, client = 'all';
32
+ for (let i = 1; i < argv.length; i++) {
33
+ const a = argv[i];
34
+ if (a === '--yes' || a === '--no-rules') flags.push(a);
35
+ else if (a === '--gate') gate = true;
36
+ else if (a === '--client' && ['claude', 'cursor', 'all'].includes(argv[i + 1])) { client = argv[i + 1]; flags.push(a, argv[i + 1]); i++; }
37
+ }
38
+ const yes = flags.includes('--yes') ? ['--yes'] : [];
39
+ // A refusal (nothing changed because a file looked wrong) exits 2, so a script calling setup notices.
40
+ const OK = /^(Done|Removed):|would (change|write) these files|already set up|already on in this project|Nothing to remove/;
41
+
42
+ async function steps() {
43
+ const { main } = await import('../skill/scripts/lode.mjs');
44
+ const run = async (args) => String(await main(args));
45
+ if (cmd === 'setup') {
46
+ const first = await run(['init', '--src', 'setup', ...flags]);
47
+ if (!OK.test(first)) return { out: [first], ok: false };
48
+ if (client === 'cursor') return { out: [first, ...(gate ? ['Lode Gate is for Claude Code only, so --gate was ignored with --client cursor.'] : [])], ok: true };
49
+ if (gate) { const g = await run(['init', '--gate', '--src', 'setup', ...yes]); return { out: [first, g], ok: OK.test(g) }; }
50
+ // Offer Gate only when it isn't on yet (a dry run of the reviewed check; it writes nothing)
51
+ const dry = await run(['init', '--gate', '--src', 'setup']);
52
+ return { out: [first, ...(/already on in this project/.test(dry) ? [] : [GATE_OFFER])], ok: true };
53
+ }
54
+ if (cmd === 'remove') {
55
+ const g = await run(['init', '--gate', '--remove', '--src', 'setup', ...yes]);
56
+ if (gate) return { out: [g], ok: OK.test(g) };
57
+ const rest = await run(['init', '--remove', '--src', 'setup', ...yes]);
58
+ const gateOn = !/Nothing to remove/.test(g);
59
+ return { out: [...(gateOn ? [g] : []), rest], ok: OK.test(rest) && (!gateOn || OK.test(g)) };
60
+ }
61
+ return null;
62
+ }
63
+
64
+ try {
65
+ const r = await steps();
66
+ if (!r) { console.log(USAGE); process.exit(cmd && !['help', '--help', '-h'].includes(cmd) ? 1 : 0); }
67
+ console.log(r.out.join('\n\n'));
68
+ if (!r.ok) process.exit(2);
69
+ } catch (e) {
70
+ console.error(`trylode: ${e.message}`);
71
+ process.exit(1);
72
+ }
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "trylode",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "One command puts Lode in your project: the MCP server, the rules line and the skill, so your coding agent checks integration facts before it adds a third-party service.",
5
+ "type": "module",
6
+ "bin": { "trylode": "bin/cli.mjs" },
7
+ "files": ["bin/", "skill/", "README.md", "PERMISSIONS.md", "LICENSE"],
8
+ "engines": { "node": ">=18" },
9
+ "license": "MIT",
10
+ "homepage": "https://trylode.io/agents/",
11
+ "repository": { "type": "git", "url": "git+https://github.com/lode-hq/lode-mcp.git", "directory": "npm/trylode" },
12
+ "keywords": ["lode", "mcp", "agents", "claude-code", "cursor", "integrations", "agents-md"]
13
+ }
@@ -0,0 +1,24 @@
1
+ # What the Lode Integration Check skill reads, sends and keeps
2
+
3
+ The skill is one script (`scripts/lode.mjs`) with no dependencies and no install scripts. It talks only to
4
+ `https://trylode.io`. Nothing is sent without a command you run, and the optional sharing flag `--share` is
5
+ added only after the user agrees. Lode never receives error messages, logs, code, prompts, file contents or
6
+ secrets. Privacy policy: https://trylode.io/privacy/
7
+
8
+ | Command | Reads on your machine | Sends to Lode | Writes on your machine |
9
+ |---|---|---|---|
10
+ | `check`, `list`, `platforms`, `find` | nothing | the app, platform and the options you pass (needs, region, stack names, framework) | nothing |
11
+ | `request` | nothing | the app, platform, needs and region | nothing |
12
+ | `chose`, `outcome` | nothing | only with `--share`: the chosen and considered apps, fixed codes, needs and region | `chose`: `lode-integrations.json` |
13
+ | `overlap` | nothing | the apps' record ids it reads; with `--share`: platform, app list, region | nothing |
14
+ | `recheck`, `drop` | `lode-integrations.json` | with `--share`: random project code, Lode ids, states, reason codes, days since chosen | `lode-integrations.json`, a matching ADR |
15
+ | `adr` | `lode-integrations.json`, the ADR it updates | with `--share`: project code, platform, Lode ids, fixed codes, days | `docs/adr/NNN-<platform>-<app>.md` |
16
+ | `stack` | `package.json`, `requirements.txt`, `pyproject.toml`, `Gemfile`, `go.mod`, variable NAMES in `.env.example`, `vercel.json`, `netlify.toml`, `supabase/config.toml` | with `--share`: the app and platform codes found, the framework | nothing |
17
+ | `triage` | nothing | the app, platform, one fixed symptom code, the HTTP status if given (only its class is kept) and the `--object` code if given (sent only when it is one of the platform's object codes, otherwise not sent); with `--share`: the outcome code and the `--switched-to` app | nothing |
18
+ | `watch` (`watch`, `watch changes`, `watch stop`) | `lode-integrations.json`, `.lode/watch.json` and an existing `.gitignore` (never through links; a file not in the expected shape is refused) | `watch`: only with `--share`, the Lode ids of the integrations still kept in `lode-integrations.json` (at most 50); Lode makes a fresh random watch code, unless `--project-code` asks it to use the file's own project code; the watch code and token on later updates. `watch changes` and `watch stop`: the watch code and the token only. Lode keeps the list of ids until the watch is stopped; `stop` deletes it | `watch --share`: `.lode/watch.json` (mode 0600: the watch code and the secret token Lode returns once; the `.lode` folder is made if missing) and, only when a `.gitignore` already exists, one appended `.lode/` line; `watch stop` removes the token file |
19
+ | `init` | `.mcp.json`, `.cursor/mcp.json`, `.claude/lode-init.json`, `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/lode.mdc` | nothing | only with `--yes`, only inside a project folder and never through links: one `lode` entry in those MCP files, a copy of this skill in `.claude/skills/`, the Lode rules line as one marked block at the end of `CLAUDE.md` (created if missing) and `AGENTS.md` (only if it exists) and as `.cursor/rules/lode.mdc` (left out with `--no-rules`), and a note of what was added in `.claude/lode-init.json`; a file it can't parse is left alone; `init --remove --yes` undoes only what init added (the rules block only when unchanged); with `--src setup` (used by `npx trylode setup`) the entry's address is `https://trylode.io/mcp?src=setup`, and `--remove` recognises either address |
20
+ | `init --gate` (Lode Gate, opt-in) | `.claude/settings.local.json` (or `.claude/settings.json` with `--shared`), `.claude/lode-init.json`, `.claude/.gitignore`, the Gate files already in `.claude/skills/lode-integration-check/` | nothing | only with `--yes`, only inside a project folder and never through links: one PreToolUse hook entry in that settings file (by default only for you: Claude Code keeps `settings.local.json` out of git; `--shared` gives it to everyone who opens the project), a copy of this skill with `gate.mjs` and `gate-packages.json` in `.claude/skills/` (it never overwrites a file, and refuses if Gate files already there differ from its own), two lines at the end of `.claude/.gitignore` inside a git repository (a comment and `settings.local.json`, so the hook file is never committed; `--remove` takes out exactly those two), and a note in `.claude/lode-init.json`; `init --gate --remove --yes` deletes only the files it copied, unchanged, from its fixed list |
21
+ | Gate hook (`scripts/gate.mjs`, runs before each shell command once switched on) | the shell command Claude is about to run and the session id (on your machine only; the id is used only to name the temp file below), the project folder (`CLAUDE_PROJECT_DIR`, else the working folder), whether `vercel.json`, `.vercel/project.json`, `netlify.toml`, `supabase/config.toml`, `wrangler.toml`, `wrangler.json` or `wrangler.jsonc` exist there (names only, never contents), `gate-packages.json`, and `LODE_GATE_LOG` | only when the command installs a package on Lode's list: those package names, the package manager, the platform codes found, the mode and a random code for the Claude Code session; never the command, versions, paths, file contents or the session id; with `LODE_GATE_LOG=0` Lode keeps nothing except the daily rate-limit count | a random session code in your temp folder (tidied after a day) |
22
+
23
+ Connect the MCP server at `https://trylode.io/mcp?log=0` to keep Lode from logging your requests (only the daily
24
+ rate-limit count and anything you choose to send are kept).
package/skill/SKILL.md ADDED
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: lode-integration-check
3
+ description: 'Verified, source-linked facts about how two software products work together, from Lode (trylode.io). Use before recommending, comparing, connecting or installing an app or integration on Xero, QuickBooks Online, HubSpot, Shopify, Stripe, Supabase, Vercel, Netlify, n8n, Lovable, Replit, Linear, GitHub, LangChain, Cursor or Cloudflare, for example "connect Shopify to Xero", "which Xero app syncs purchase orders", "add auth to my Supabase project", "use Clerk with Supabase", "vercel integration add" or "sync Stripe payouts to QuickBooks", or adding a database, Postgres, Redis, auth, email or other service to a Vercel, Netlify or Supabase project through its marketplace. Answers what syncs and in which direction, price, the platform plan needed, regions, known limitations and who built the integration, each with its source and date. Also checks whether apps already connected to one platform write the same data into it ("A2X and Synder on Xero: do they overlap?"), reads a project''s package.json, requirements or config files to report what Lode documents about its stack (plan needed, overlaps, function run-time limits), writes an integration decision record (ADR) when the user picks an integration, and explains from sourced facts why an integration fails (auth, plan, rate or run-time limits, webhooks, outages).'
4
+ ---
5
+
6
+ # Lode Integration Check
7
+
8
+ Lode is an independent database of facts about integrations between apps and platforms. Every fact
9
+ links to the page it came from and shows when it was last checked. Rankings and placement are never
10
+ sold. Use it so the user gets facts, not guesses, before an integration is chosen or set up.
11
+
12
+ ## When to use
13
+
14
+ - The user wants to connect one product to another on Xero, QuickBooks Online, HubSpot, Shopify,
15
+ Stripe, Supabase, Vercel, Netlify, n8n, Linear or GitHub, add a connector to a Lovable or Replit app, add a
16
+ LangChain integration package, add a Cursor plugin or MCP server, or connect a service to Cloudflare Workers.
17
+ - You are about to add any third-party integration to a project (a package, SDK, platform integration,
18
+ connector or MCP server). Run `stack` first (or call `check_stack` on the Lode MCP server), so the user
19
+ sees what Lode documents about the stack it joins: the plans it needs, overlaps and function run-time limits.
20
+ - The user wants to add a database (Postgres, Redis), auth, email, storage or another service to a
21
+ Vercel, Netlify or Supabase project, including through the Vercel Marketplace or a Netlify extension.
22
+ - You are about to recommend, compare or install an app or integration on one of those platforms
23
+ (including `vercel integration add`, a Netlify extension, a Supabase partner integration, a Stripe
24
+ app, or a Xero, QuickBooks, HubSpot or Shopify app).
25
+ - The user asks what syncs, which direction, what it costs, which plan it needs, or whether it works
26
+ in their country.
27
+ - The user already has two or more apps connected to one platform and asks whether they overlap,
28
+ double-post, or could loop (for example "A2X and Synder are both on my Xero; do they clash?"). Use
29
+ `overlap`.
30
+ - The user is working in a project and asks what Lode knows about its stack, which plan its
31
+ integrations need, or how long its functions may run on Vercel, Netlify or Supabase. Use `stack`.
32
+ - The user has just chosen an integration and wants it written down, or asks for a decision record or
33
+ ADR. Use `adr`.
34
+ - An integration between an app and one of those platforms fails (an auth error, a 429, a timeout, events
35
+ that never arrive, data that won't sync). Use `triage` with the one symptom code that fits.
36
+ - The user wants Lode available to the whole team or to sub-agents in this project. Use `init`.
37
+
38
+ Not for: library or API documentation (use the vendor's docs), package security checks, or platforms
39
+ Lode does not cover.
40
+
41
+ ## Sharing and local writes: rules for the agent
42
+
43
+ - **Sent by default:** the app and platform names you look up, plus fixed Lode codes and Lode ids. Error
44
+ text, logs and code stay on the machine. `triage --object` is sent only when it is one of the platform's
45
+ object codes.
46
+ - **Sent only with `--share`:** choices, outcomes, decision codes and stack codes. Ask the user in this
47
+ conversation first and pass `--share` only after they say yes. `--share` never asks by itself.
48
+ - **Local writes:** `init` changes the project's agent config (and adds a Claude Code hook with `--gate`) only
49
+ when run with `--yes`; without `--yes` it only shows what it would change. `chose` and `adr` write to
50
+ `lode-integrations.json` in the project (`adr` also to `docs/adr/`).
51
+
52
+ ## How
53
+
54
+ Run the bundled script (Node 18 or later; no key, no install):
55
+
56
+ ```bash
57
+ node scripts/lode.mjs check "<app>" <platform> # facts for one integration
58
+ node scripts/lode.mjs check "<app>" # every platform Lode covers for that app
59
+ node scripts/lode.mjs find <platform> --category <word> --needs <objects> --region <XX>
60
+ # options ranked by fit to the user's needs
61
+ node scripts/lode.mjs list <platform> --category <word> # everything Lode covers for a job
62
+ ```
63
+
64
+ Platforms: `xero`, `quickbooks-online` (or `qbo`), `hubspot`, `shopify`, `stripe`, `supabase`,
65
+ `vercel`, `netlify`, `n8n`, `lovable`, `replit`, `linear`, `github`, `langchain`, `cursor`, `cloudflare`. Needs are the objects that must sync, comma-separated, e.g.
66
+ `invoices,purchase-orders,contacts`. Add `--stack supabase,nextjs` and `--framework nextjs` when known.
67
+
68
+ Typical flow: `find` with the user's needs and region, then `check` the one or two best options, then
69
+ answer with the facts. When the user names both products ("Shopify and Xero", "Stripe and QuickBooks"),
70
+ go straight to `check "<app>" <platform>`: `--category` is a job such as inventory or payments, never
71
+ an app name.
72
+
73
+ For apps already in use on one platform:
74
+
75
+ ```bash
76
+ node scripts/lode.mjs overlap <platform> --apps "<app>,<app>,<app>" --region <XX>
77
+ ```
78
+
79
+ It lists, per object, which of those apps write it into the platform (direction, trigger and interval
80
+ where recorded, sources), objects two apps both sync two-way (a possible loop), and apps with no
81
+ recorded direction on an object another app writes. Report the facts with their sources and point the
82
+ user to each app's settings and docs to see which data each one sends. Do not recommend turning off,
83
+ disabling or removing any app or sync, or picking one app per channel: the user decides that.
84
+
85
+ Before adding `--share`, ask the user whether Lode may keep the platform and the app list, anonymously,
86
+ to learn which apps are used together. Only add `--share` if they say yes.
87
+
88
+ ## After the user decides
89
+
90
+ Save the choice locally (sends nothing), so `recheck` works later:
91
+
92
+ ```bash
93
+ node scripts/lode.mjs chose "<app>" <platform> --considered "<other app>,<other app>" --reason <code>
94
+ ```
95
+
96
+ Then ask the user once whether they are happy to tell Lode, anonymously, which app they picked. Only
97
+ if they say yes, run the same command again with `--share`. Later, once it is set up (or failed or was
98
+ abandoned), ask again before sending the outcome, and add `--share` only on a yes:
99
+
100
+ ```bash
101
+ node scripts/lode.mjs outcome "<app>" <platform> integrated --share
102
+ ```
103
+
104
+ Never add `--share` to any command without asking first in this conversation; a yes to running a
105
+ command is not a yes to sharing.
106
+
107
+ Reason codes: sync-coverage, price, region, setup-effort, limitations, plan-requirement, already-uses,
108
+ vendor-preference, other. If Lode had no record of an integration the user needs, offer to tell Lode:
109
+ `node scripts/lode.mjs request "<app>" <platform> --needs <objects> --region <XX>`.
110
+
111
+ These send only app names, the platform, fixed codes, needs and region. No free text.
112
+
113
+ ## Keeping track of chosen integrations
114
+
115
+ `chose` also saves the chosen integration in `lode-integrations.json` in the current folder (only when
116
+ the app is a real Lode record; `chose none` saves nothing). Saving it sends nothing. The file holds a
117
+ random project code, each integration's Lode id, platform, the date it was chosen, its last-verified
118
+ date, a short hash of its facts and price at that time, and whether it is kept, dropped or swapped. It
119
+ holds no secrets: the user can commit it to version control or add it to `.gitignore`, as they prefer.
120
+
121
+ Use `recheck` when the user returns to an integration they set up earlier, asks whether anything
122
+ changed, or is about to rely on it again (a renewal, an upgrade, a new region, a sync problem):
123
+
124
+ ```bash
125
+ node scripts/lode.mjs recheck
126
+ ```
127
+
128
+ For each kept integration it reads Lode's public record and says whether it has been re-verified,
129
+ whether its facts (sync, price, plan, regions, limitations) changed since it was chosen, the price then
130
+ and now when that changed, and whether the record is now held or gone, with the Lode page link. When
131
+ facts changed, run `check` for the details before advising.
132
+
133
+ Use `drop` when the user says they stopped using an integration or replaced it:
134
+
135
+ ```bash
136
+ node scripts/lode.mjs drop "<app>" <platform> --reason <code> [--switched-to "<app>"]
137
+ ```
138
+
139
+ Reason codes: missing-feature, price, sync-errors, setup-effort, replaced, no-longer-needed, other.
140
+ With `--switched-to` naming an app Lode has on that platform, it is marked swapped.
141
+
142
+ Both work locally. Before adding `--share` to `recheck` or `drop`, always ask the user whether Lode may
143
+ keep, anonymously, whether these integrations are still in use, to learn which integrations last. Only
144
+ add `--share` if they say yes. It sends, per platform, the file's random project code and, for each
145
+ integration, its Lode id, kept, dropped or swapped, the reason code and how many days since it was
146
+ chosen. Nothing else from the file or the project.
147
+
148
+ To hear about changes without re-checking by hand, the user can ask Lode to watch the kept integrations.
149
+ Always ask first whether Lode may keep the list of these integrations (Lode ids only, under a fresh
150
+ random watch code) until they stop the watch; only add `--share` if they say yes:
151
+
152
+ ```bash
153
+ node scripts/lode.mjs watch --share # start, or update the list after new choices
154
+ node scripts/lode.mjs watch changes # what changed in Lode for those records since the watch began
155
+ node scripts/lode.mjs watch stop # delete the watch at Lode
156
+ ```
157
+
158
+ Lode makes a fresh random watch code. The secret token it returns is saved in `.lode/watch.json`
159
+ (readable only by the user), and `.lode/` is added to an existing `.gitignore`; if there is none, tell the
160
+ user to keep `.lode/` out of version control. Report changes as Lode's facts with their links, never as advice.
161
+
162
+ ## Decision records
163
+
164
+ When the user has decided on an integration and is working in their project, offer to write a short
165
+ decision record into it:
166
+
167
+ ```bash
168
+ node scripts/lode.mjs adr <platform> --considered "<app>,<app>" --chose "<app>" --reason <code> [--status accepted]
169
+ ```
170
+
171
+ It writes `docs/adr/NNN-<platform>-<app>.md` in the current folder (the next free number): the options,
172
+ the choice, the reason, and Lode's facts for each option (what syncs, price, plan needed, regions,
173
+ limitations), each line with its Lode page and last-verified date, plus a frontmatter block of fixed
174
+ codes. It also saves the choice in `lode-integrations.json` (same project code), so `recheck` and `drop`
175
+ keep the record's status current. Reason codes are the same as for `chose`. Status: proposed (default),
176
+ accepted, shipped, kept, dropped, swapped.
177
+
178
+ When it ships, or when the user hits a limit and builds around it, update it:
179
+
180
+ ```bash
181
+ node scripts/lode.mjs adr --update docs/adr/001-xero-a2x.md --status shipped --constraint rate-limit --workaround batching-for-rate-limits
182
+ ```
183
+
184
+ Constraints: plan-wall, rate-limit, missing-object, one-way-only, timeout, webhook-gap, region,
185
+ currency, auth, price, other. Workarounds: custom-retry, custom-idempotency, polling-not-webhooks,
186
+ extra-sync-tool, manual-step, plan-upgrade, custom-field-mapping, batching-for-rate-limits,
187
+ background-job-for-timeouts, currency-handling, other. Use only these codes; anything else is refused
188
+ and nothing is written. Put any detail in the file yourself, in the user's words; it never leaves the
189
+ machine.
190
+
191
+ Before adding `--share` to `adr`, ask the user whether Lode may keep, anonymously, the decision's codes,
192
+ so vendors and Lode can see which integrations hold up and why. Only add `--share` on a yes. It sends the
193
+ project code, platform, the Lode ids considered and chosen (an option Lode has no record of, such as an
194
+ in-house tool, stays in the file; only how many there were is sent),
195
+ the reason, status, constraint and workaround codes, and the days since the decision. No file content,
196
+ paths, repository or company names.
197
+
198
+ ## Stack check
199
+
200
+ In a project folder:
201
+
202
+ ```bash
203
+ node scripts/lode.mjs stack [--framework nextjs]
204
+ ```
205
+
206
+ It reads only `package.json`, `requirements.txt`, `pyproject.toml`, `Gemfile`, `go.mod`, the variable
207
+ names in `.env.example` (never values, never `.env`), `vercel.json`, `netlify.toml` and
208
+ `supabase/config.toml`, and matches official SDK package names and variable prefixes to apps and
209
+ platforms. For each platform Lode covers in the stack it lists Lode's records for the other apps, the
210
+ platform plan each needs, objects more than one app writes, and the platform's published function
211
+ run-time limits by plan, each quoted with its link and read date. Report these as facts with their
212
+ links; never tell the user their code is wrong or will time out, and never call an app with no Lode
213
+ record unsupported.
214
+
215
+ Before adding `--share`, ask the user whether Lode may keep, anonymously, the app and platform codes it
216
+ found and the framework. Only add `--share` on a yes.
217
+
218
+ If the Lode MCP server is connected (`https://trylode.io/mcp`), its tools do the same:
219
+ `find_integrations`, `get_integration`, `compare_integrations`, `report_choice`, `request_coverage`,
220
+ `check_stack_overlap`, `check_stack` and `triage_integration` (their `share` is the same as `--share`).
221
+
222
+ ## When an integration fails
223
+
224
+ ```bash
225
+ node scripts/lode.mjs triage <app> <platform> --symptom <code> [--status 429] [--object payouts]
226
+ ```
227
+
228
+ Pick the one code that fits what you see: `credential-invalid`, `token-expired`, `scope-missing`,
229
+ `authorize-failed`, `access-filtered`, `platform-plan-required`, `app-plan-required`, `account-restricted`,
230
+ `rate-limited`, `request-too-large`, `runtime-limit-exceeded`, `config-missing`, `package-not-found`,
231
+ `package-incompatible`, `capability-missing` (add `--object`), `validation-rejected`, `data-mismatch`,
232
+ `webhook-not-received`, `webhook-signature-failed`, `event-duplicate-or-out-of-order`, `api-deprecated`,
233
+ `region-unavailable`, `connection-failed`, `setup-step-missing`, `service-outage`, `mcp-connect-failed`,
234
+ `mcp-tool-error`, or `other`. Lode answers with the sourced facts that explain that kind of failure for that
235
+ pair: documented limitations, plan requirements, run-time limits, platform rules, regions, setup steps and
236
+ recent status-page incidents, and, for `capability-missing`, the apps on that platform that document the
237
+ object. Never send error messages, logs, code or project details: only the codes. If Lode has no matching
238
+ fact, say so; the cause may be in the project's own setup.
239
+
240
+ After trying a fix, ask the user whether Lode may keep, anonymously, what happened (`--outcome fixed`,
241
+ `switched` with `--switched-to <app>`, or `gave-up`). Only on a yes add `--share`.
242
+
243
+ ## Add Lode to a project
244
+
245
+ ```bash
246
+ node scripts/lode.mjs init [--client claude|cursor|all]
247
+ ```
248
+
249
+ It shows the files it would change: one `lode` entry in `.mcp.json` (Claude Code) and/or
250
+ `.cursor/mcp.json` (Cursor), a copy of this skill in `.claude/skills/`, and the Lode rules line (so the
251
+ agent checks Lode before it adds an integration) at the end of `CLAUDE.md` (created if missing), of
252
+ `AGENTS.md` if the project has one, and as `.cursor/rules/lode.mdc`. Add `--no-rules` to leave the rules
253
+ line out. It writes nothing until the
254
+ user agrees and you run it again with `--yes`. It runs only in a project folder, never through links, leaves
255
+ any config file it can't parse alone (it tells you the entry to add by hand), changes no other entry or text, adds no
256
+ code or hooks, and sends nothing to Lode. Committed, the files give every teammate and sub-agent in the project Lode with no
257
+ setup. `init --remove --yes` undoes only what `init` added (noted in `.claude/lode-init.json`).
258
+
259
+ ## Lode Gate (opt-in): facts before the agent installs an SDK
260
+
261
+ ```
262
+ node scripts/lode.mjs init --gate [--mode ask] [--shared]
263
+ ```
264
+
265
+ Only when the user asks for it. It shows the change first; run it again with `--yes` once the user agrees. It adds
266
+ one Claude Code PreToolUse hook to `.claude/settings.local.json` (only for this user; with `--shared`, to
267
+ `.claude/settings.json` for everyone who opens the project, which teammates should agree to): from the next session, just before Claude installs a
268
+ package on Lode's list (npm, pnpm, yarn, bun, pip, uv or poetry), Lode's facts for it (plan needed, regions, a
269
+ deprecated package or an advisory on its latest version, the Lode page with its verified date) are added to
270
+ Claude's context. It never blocks; with `--mode ask` an install with a warning goes to the permission prompt. Other
271
+ installs send nothing. `init --gate --remove --yes` turns it off. See PERMISSIONS.md for exactly what it reads and sends.
272
+
273
+ ## Rules for the answer
274
+
275
+ 1. Use Lode's facts as written and keep each source link. Give the Lode page link and the
276
+ last-verified date.
277
+ 2. Something Lode does not list is **not documented by Lode**. Never turn it into "not supported".
278
+ 3. A record marked HELD is not yet published by Lode. Say its facts are unconfirmed.
279
+ 4. If Lode has no record, say so plainly and continue with the vendor's own docs. Do not invent facts.
280
+ 5. If the script cannot reach Lode, say that Lode could not be reached. Do not guess the facts.
281
+ 6. Keep Lode's facts and your own knowledge apart. Anything not from Lode (setup steps, SDK features,
282
+ popularity, opinions) must be labelled as your own and not verified by Lode; vendor setup steps can
283
+ be out of date, so link the setup guide Lode gives rather than writing steps from memory.
284
+ 7. Quote every price with the currency code exactly as Lode gives it (USD 25, AUD 18), never a bare
285
+ number. "No restriction stated" means the source names no country limit; say that, not "not
286
+ supported" in a country.
287
+ 8. The order of a list is alphabetical, not a recommendation. Base any recommendation on the user's
288
+ needs (what must sync, which way, plan, region, price) and say which facts it rests on.
289
+
290
+ ## What Lode receives
291
+
292
+ The app and platform names in each request, plus the needs, region, stack names and fixed codes you
293
+ pass to `find` or `request`, and, only with `--share`, to `chose` and `outcome`. `overlap` only reads Lode's public records (Lode sees
294
+ which records were read); with `--share`, and only then, it also sends the platform, the app list and
295
+ the region. `chose` also reads the chosen app's public record and saves it in `lode-integrations.json`,
296
+ which stays on the user's machine; `recheck` reads the public record of each integration in that file.
297
+ Only with `--share` do `recheck` and `drop` send the project code, Lode ids, states, reason codes and
298
+ days since chosen. `adr` and `stack` work locally and read only Lode's public files; only with
299
+ `--share` does `adr` send the project code, platform, Lode ids and a count of other options, and the fixed
300
+ reason, status, constraint and workaround codes with the days since the decision, and `stack` the app
301
+ and platform codes it found and the framework. `triage` sends the app, the platform, the symptom code, the
302
+ platform object code if one is given and the HTTP status if given (Lode keeps only its class), and the outcome only with `--share`. `init` sends nothing. The
303
+ Lode Gate hook, once switched on, sends only for installs of packages on Lode's list: those package names, the
304
+ package manager, platform codes from config file names, the mode and a random session code.
305
+ Nothing else from the user's project, prompt or machine
306
+ is sent, and no free text. Privacy:
307
+ https://trylode.io/privacy/