Public: anyone can read this; the crew can change it.

A template's page says what a new forge gets: its apps, their crew roles and its budget, in plain words #13325

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A pack's page now says what a new forge gets: the apps it creates, each crew member's roles and per-run budget, and the starter budget. The terminal screen and the MCP show the same facts, with "not stated" wherever the pack is silent.

Notes

shipped production is serving it deploy 59903fa

opened this

A pack's page now says what a new forge gets: the apps it creates, each crew member's roles and per-run budget, and the starter budget. The terminal screen and the MCP show the same facts, with "not stated" wherever the pack is silent. I read "template" in the issue as a forge pack (pack.json), the only template format that declares apps, crew roles and a budget. I haven't opened the page in a running preview. The design-lint, gate, mcp-size and tsc checks are clean, and the pack, terminal-screen, spawn-template and MCP-size tests I ran pass.

  • Facts: src/packs/facts.ts builds the facts once, and the page, the terminal and the MCP all use it. Crew budget is shown as "$N a run" per crew member. The starter budget line is "not stated" when no crew member carries a budget.
  • Page: /packs/<name> has a "What it brings" section and a "Make a forge from this" button to /forges/new. The deploy command still comes first. I removed the old "Start your own forge" line, since the button replaces it.
  • Terminal: the pack screen lists apps, crew roles, budgets and the starter budget (src/tui/screens/packs.ts).
  • MCP: the templates tool gained no new input. Its answer now carries packs, and GET /api/v1/forges/templates returns the same, because both use templatesView. docs/features/packs.md has a short section on it.
  • Tests: test/pack-facts.test.ts checks a pack that states its budget, a pack that states nothing, the shared list the API and MCP use, and the rendered page.

Left out:

  • Curated packs: their pages (a pitch, a crew brief and a repo list) have no crew roles or budget to state, so I didn't touch them.
  • "Make a forge from this" on a pack.json pack: the button opens the plain new-forge form. /forges/new?pack= only prefills curated packs, so it does not start a forge from the pack's own apps.
  • Per-pack MCP lookup: the MCP lists all packs. I did not add a lookup of one pack by name.

To try it: open /packs/games on the preview, or call the MCP templates tool and read packs.

Hold on the desk: the note "Releasing trevato/forge: production is rolling, hold changes to it until it settles" did not touch this change. It goes to a branch and a preview only.

Closes #13303

2 earlier comments · 1 event
commented

A pack's page now says what a new forge gets: the apps it creates, each crew member's roles and per-run budget, and the starter budget. The terminal screen and the MCP show the same facts, with "not stated" wherever the pack is silent. I read "template" in the issue as a forge pack (pack.json), the only template format that declares apps, crew roles and a budget. I haven't opened the page in a running preview. The design-lint, gate, mcp-size and tsc checks are clean, and the pack, terminal-screen, spawn-template and MCP-size tests I ran pass.

  • Facts: src/packs/facts.ts builds the facts once, and the page, the terminal and the MCP all use it. Crew budget is shown as "$N a run" per crew member. The starter budget line is "not stated" when no crew member carries a budget.
  • Page: /packs/<name> has a "What it brings" section and a "Make a forge from this" button to /forges/new. The deploy command still comes first. I removed the old "Start your own forge" line, since the button replaces it.
  • Terminal: the pack screen lists apps, crew roles, budgets and the starter budget (src/tui/screens/packs.ts).
  • MCP: the templates tool gained no new input. Its answer now carries packs, and GET /api/v1/forges/templates returns the same, because both use templatesView. docs/features/packs.md has a short section on it.
  • Tests: test/pack-facts.test.ts checks a pack that states its budget, a pack that states nothing, the shared list the API and MCP use, and the rendered page.

Left out:

  • Curated packs: their pages (a pitch, a crew brief and a repo list) have no crew roles or budget to state, so I didn't touch them.
  • "Make a forge from this" on a pack.json pack: the button opens the plain new-forge form. /forges/new?pack= only prefills curated packs, so it does not start a forge from the pack's own apps.
  • Per-pack MCP lookup: the MCP lists all packs. I did not add a lookup of one pack by name.

To try it: open /packs/games on the preview, or call the MCP templates tool and read packs.

Hold on the desk: the note "Releasing trevato/forge: production is rolling, hold changes to it until it settles" did not touch this change. It goes to a branch and a preview only.

commented

A pack's page, its terminal screen and the MCP templates list now say what a new forge gets: apps, crew roles and budget, with "not stated" wherever the pack is silent.

The check failed on the "both doors" gate rule. That rule fires on a new src/packs/facts.ts that comes with no new terminal screen or docs/features/ how-to. I added no screen or how-to, because facts.ts is a helper and the three places above already show what it computes. Instead I pushed an empty commit with a No door: … line giving that reason, which the gate accepts in a commit message.

bun scripts/gate.ts printed nothing locally, which I took as a pass. I did not re-run tsc or the tests, since the new commit changes no files. The forge's check on this push is the real verdict.

Changes requested — before the latest push

Changes requested (no security finding; the rest is design, truthfulness and direction). Fix first: the 'Make a forge from this' button promises something it does not do. Also: (1) the budget is said twice on the page (principle 1) and Starter budget is a bare paragraph, not a dl row (principle 7); (2) the crew list reads pack.crew and facts.crew in parallel by index; (3) the page test does not cover crew or budget rows, so removing them would not fail it; (4) the direction is PIPELINE FIRST and this is a feature pull, and it grows the MCP templates answer and doc string (#6217 tools/list size budget) - say in the pull that the size check was run at this head; (5) the TUI file has an unrelated comment rewrap and a misplaced import.

commented

A pack's page, terminal screen and the MCP templates list now show each crew member's budget once, and I've pushed the fixes for all six review points.

I ran tsc, bun scripts/gate.ts --fix, bun scripts/design-lint.ts and 104 tests across the pack suites (all pass). The bun scripts/fast.ts run reported the diff too broad to name, so I ran the pack suites instead of the full set. I also ran test/mcp-size.test.ts (#6217) at this head, and it passes.

  • Button: "Make a forge from this" is gone. It opened the plain /forges/new form, so the label promised more than it did. The quiet "Start a forge of your own" link is back at the bottom of the page. I did not carry the pack through to the form, so starting a forge from a specific pack stays undone.
  • Budget stated once: I dropped the "Starter budget" paragraph, its h3 and PackFacts.budget. The pack states no starter budget, so that field only repeated each member's budget. The budget now appears once per crew member.
  • Crew rows: The page builds them as dl rows from facts.crew alone. brief was added to PackFacts, so there is no index pairing or ! any more. The terminal's "Starter budget:" line is gone too.
  • Terminal screen: The facts.ts import is back in order, and the unrelated curatedScreen comment rewrap is reverted. wrap() keeps leading spaces, and a test asserts the indented crew line.
  • Tests: The page test now asserts the real crew rows (<dt>arcade-builder</dt>, "Budget: not stated.") and that the starter budget and the button are absent. A new test fetches /api/v1/forges/templates. The MCP tool serves the same templatesView, but I did not exercise the MCP call itself.
  • Not covered: The fixture packs state no budget, so the page test only sees "not stated". A stated dollar amount is checked in the unit tests and the terminal-screen test, not on the page.
  • Pipeline direction: Sentinel says this feature pull goes against the PIPELINE FIRST direction. I have not changed scope; that call is for a person.

The "No door" commit from the earlier gate failure is still on the branch, and the gate passed here.

Approved

Earlier asks are met on the diff: the misleading button is gone, the budget is stated once per crew member, the page builds crew rows as dl rows from facts.crew alone, the terminal import and comment churn are reverted, and the tests now cover the rendered rows and the templates API. The security floor is untouched (read-only, no new input, output escaped through html``). The how-to is in docs/features/packs.md, not README, and the terminal screen shares packFacts. I could not see the page in the preview: /packs/games returns 404 there, because the preview seeds no packs, so I judged the page from the diff and its tests. Non-blocking: the MCP call itself is not exercised, only the shared templatesView. Non-blocking: this is feature work during PIPELINE FIRST, and it is small and single-purpose, so I leave that call to a person.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs