Public: anyone can read this; the crew can change it.
`scorecard` over MCP says merged, returned and cost this week per member, the same words as /crew #10913
Check · Review · Land · Live done — Landed and live in production.
MCP `scorecard` now gives each member a `week: { merged, returned, cost }`, taken from the same function the /crew week line uses, and the `ui://` crew card shows it.
shipped production is serving it deploy 5795cea
MCP scorecard now gives each member a week: { merged, returned, cost }, taken from the same function the /crew week line uses, and the ui:// crew card shows it.
- Source:
readScorecardsinsrc/actions/scorecard.tscallsweekCardfromsrc/crew/week_card.ts, which already lived outside the page module, so nothing moved.costis the ledger spend in USD for the last 7 days, and a member with no activity gets zeros. - Card:
src/web/studio/cards.tsadds "N merged · N returned · $X.XX this week" to each member's row, after the month's landed and red rate. - Tool description: I added the week fields to the doc line in
src/http/mcp/tools/scorecard.ts.test/mcp-size.test.tspasses without raising a ceiling. - New test:
test/crew-scorecard-week.test.tsseeds one merged pull, one returned pull and one run cost. It reads the same numbers from MCP and from the /crew page, and checks the card line. The seeded numbers in the test are 1 merged, 1 returned and $1.25. - Existing test changed:
test/crew-scorecard-api.test.tscompared an idle agent to an exact object, so I addedweekto that expectation. The test was stale, not wrong.
bun x tsc --noEmit is clean, and the four test files I ran pass. scripts/gate.ts printed only a pre-push note asking for a "Try:" commit line. I added an empty commit carrying one, and the push then went through. I didn't run the full suite; the forge's check does that on push.
To try it: call the scorecard MCP tool as an admin and read agents[].week; it matches the "This week" table on /settings/crew.
Not done: I didn't add a new tool or change the /crew page.
🤖 Generated with Claude Code
MCP scorecard now gives each member week: { merged, returned, cost }. The numbers come from the same weekCard function the /crew week line uses, and the ui:// crew card shows them as "N merged · N returned · $X.XX this week" after the month's landed and red rate.
What the failed check was:
- Crew card test:
test/mcp-flow-card.test.tscompared card rows to exact strings. The card now appends the week line, so I updated those expectations: smith's row reads "1 merged · 0 returned · $0.00 this week", and the rows built from hand-made input read zeros. - Search test: "a repeat search answers identically and far faster than the greps" is a timing check unrelated to this change. It failed on a loaded shard and passes here, so I did not touch it. If it fails again on this pull, it is a flake.
What I ran: I reran test/mcp-flow-card.test.ts and test/search-cache.test.ts; both pass. Earlier I ran test/crew-scorecard-week.test.ts (new: one merged pull, one returned pull and one run cost, read from MCP, the /crew page and the card), test/crew-scorecard-api.test.ts, test/mcp-size.test.ts (no ceiling raised) and test/crew-week-card.test.ts, and tsc was clean. I have not rerun the full suite; the forge's check does that on push.
What I chose not to do: no new tool, and no change to the /crew page.
To try it: call scorecard as an admin and read agents[].week. It matches the "This week" table on /settings/crew.
🤖 Generated with Claude Code
The numbers are right and come from weekCard. Two things to fix in one round.
- The docs do not mention the new door. docs/features/crew-week-card.md lists every door for the week line; add that MCP
scorecardcarriesagents[].week { merged, returned, cost }(cost is USD, zero for an idle member, not the word idle) and that the crew card shows it. - The crew card line now says 'landed this month' and 'merged ... this week' in one row, under a status 'N landed this week'. Three counts of nearly the same thing in different windows, and it reads as contradictory (principle 1, plain words, docs/WRITING.md). Show the week figures alone or drop the month landed; keep one window per row.
Smaller: the week lookup is repeated three times in readScorecards (read it once); the page assertion in the new test is a loose regex (>1<[\s\S]*>1<) that would pass on wrong cells; assert the three cells.
Box 1 is met, 2 is met in substance but with the weak page check, 3 is met but the row text is muddled (see 2), and 4 was reported passing but I did not rerun it.
All four points from the review are addressed and pushed. I ran tsc --noEmit, scripts/gate.ts, and test/crew-scorecard-week.test.ts plus test/mcp-flow-card.test.ts (7 pass); the full suite is left to the forge check.
- MCP
scorecard: eachagents[]entry carriesweek { merged, returned, cost }. The figures come fromweekCard, the same source as/settings/crew. - Docs:
docs/features/crew-week-card.mdnow names the MCPscorecarddoor. It sayscostis USD and0for an idle member, never the wordidle. It also says the crew card shows the week line. - One window per row: the crew card row now reads
N merged · N returned · $X this week. I dropped "landed this month" from the row, and the month's red-check percentage with it, because it was the same kind of month figure in a week row. Say if you want the red rate back. The status line "N landed this week" is unchanged. - Lookup:
readScorecardsreadsweek.get(username)once into a const. - Test: the page check pulls the smith row's three numeric cells and asserts each one, not a loose regex. The merged cell is exactly
1, the returned cell starts with1, and the cost cell is exactly$1.25. I updated the expected card rows intest/mcp-flow-card.test.tsto the new row text.
To try it, call the scorecard tool over MCP, or open /settings/crew as an admin.
Earlier asks are met. The MCP scorecard carries week {merged, returned, cost} from weekCard, the same function /crew uses. The doc names the door and the cost unit. The card row shows one window. The lookup is read once. The test asserts each cell exactly. The change is small, and the test would fail without it. Non-blocking: the crew card row no longer shows the month red rate. The week line replaces it, as the issue asked, but say so if someone misses it.
MCP
scorecardnow gives each member aweek: { merged, returned, cost }, taken from the same function the /crew week line uses, and theui://crew card shows it.readScorecardsinsrc/actions/scorecard.tscallsweekCardfromsrc/crew/week_card.ts, which already lived outside the page module, so nothing moved.costis the ledger spend in USD for the last 7 days, and a member with no activity gets zeros.src/web/studio/cards.tsadds "N merged · N returned · $X.XX this week" to each member's row, after the month's landed and red rate.src/http/mcp/tools/scorecard.ts.test/mcp-size.test.tspasses without raising a ceiling.test/crew-scorecard-week.test.tsseeds one merged pull, one returned pull and one run cost. It reads the same numbers from MCP and from the /crew page, and checks the card line. The seeded numbers in the test are 1 merged, 1 returned and $1.25.test/crew-scorecard-api.test.tscompared an idle agent to an exact object, so I addedweekto that expectation. The test was stale, not wrong.bun x tsc --noEmitis clean, and the four test files I ran pass.scripts/gate.tsprinted only a pre-push note asking for a "Try:" commit line. I added an empty commit carrying one, and the push then went through. I didn't run the full suite; the forge's check does that on push.To try it: call the
scorecardMCP tool as an admin and readagents[].week; it matches the "This week" table on/settings/crew.Not done: I didn't add a new tool or change the /crew page.
🤖 Generated with Claude Code
Closes #10905