Skip to content

FE-843: Toolchain profile expansion — TS runtimes + live profile selection#198

Open
kostandinang wants to merge 5 commits into
ka/fe-841-pi-sdk-embedfrom
ka/fe-843-toolchain-profiles
Open

FE-843: Toolchain profile expansion — TS runtimes + live profile selection#198
kostandinang wants to merge 5 commits into
ka/fe-841-pi-sdk-embedfrom
ka/fe-843-toolchain-profiles

Conversation

@kostandinang

@kostandinang kostandinang commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Stack Context

Expands the FE-829 toolchain contract so brunch cook can build on more technologies than bun, and so the profile selection path actually works.

What?

  • Data-driven profile registry (project-profile.ts) -- profiles are data literals (path templates + argv template + conventions prose) compiled into the unchanged Toolchain interface. Adds node-vitest, node-test, node-jest, deno alongside bun/brunch; registry invariants pinned enumerably over every entry. Adding a runtime = one data entry.
  • Live + strict selection -- brunch plan --profile=<id> (validated); the emitter resolves the chain once (--profile flag >> spec profile >> architect-classified >> bun) and stamps the resolved id into plan.yaml on both the authored and fallback paths, so cook always reads the profile the emitter used (I130-K). resolveToolchain now throws UnknownProfileError on a typo'd id instead of silently running bun; absent stays lenient for hand-authored fixtures.
  • Architect classifies the stack from spec prose -- optional profile enum on the architectPlan schema (null when the spec is silent); a hallucinated id fails schema parse and rides the existing deterministic fallback. No host introspection (D160-K intact).

Why?

Before this branch both implemented profiles were TypeScript and the selection path was dead -- nothing populated snapshot.profile, so every cook run silently resolved to bun, and a typo'd profile id silently defaulted rather than erroring. Adding profiles without live selection changes nothing at runtime; live selection without strictness hides real misconfiguration.

Deliberately not included (recorded in PLAN as follow-ons): a harness install verb (the cook agent scaffolds + installs per A98), fail/infra test-outcome split, brownfield drift-check at cook open, brunch detect. Outer-loop validation outstanding: a greenfield cook smoke with --profile=node-vitest as the conventions-prose oracle.

kostandinang commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kostandinang kostandinang changed the title FE-843: Frontier setup — toolchain-profile-expansion plan entry + 3-card queue FE-843: Toolchain profile expansion — TS runtimes + live profile selection Jun 10, 2026
@kostandinang kostandinang marked this pull request as ready for review June 15, 2026 11:12
@cursor

cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Plan/cook CLI and profile registry changes with broad unit test coverage; behavior change is mainly failing fast on bad profile ids instead of silently using bun.

Overview
FE-843 expands cook/plan toolchain support beyond implicit bun defaults: profiles become data literals compiled into the existing Toolchain interface, with new ids node-vitest, node-test, node-jest, and deno (plus existing bun / brunch).

Live selection wires brunch plan --profile=<id> through parseProfileIdplan-runneremitPlanFromSnapshot. The emitter resolves the profile once with precedence --profile ≫ snapshot.profile ≫ architect-classified ≫ bun, stamps it on plan.yaml on both success and architect-fallback paths, and derives verification targets from that toolchain.

Strict vs lenient: resolveToolchain(undefined) still defaults to bun for hand-authored fixtures; any present but unknown id throws UnknownProfileError (replacing silent bun fallback)—so typos in emitted plans fail loudly when brunch cook loads them.

The build architect gains an optional profile field in its Zod schema and prompt (classify from spec prose only; invalid/hallucinated ids fail parse and trigger deterministic projection fallback). memory/PLAN.md documents the completed toolchain-profile-expansion frontier.

Reviewed by Cursor Bugbot for commit e4e3afe. Bugbot is set up for automated code reviews on this repo. Configure here.

@kostandinang

Copy link
Copy Markdown
Contributor Author

Follow-on work tracked in FE-864 — Orchestrator enhancements: brownfield feature delivery from spec. This branch's deferred items (structured spec-profile field, outstanding --profile=node-vitest greenfield cook smoke, install-verb / fail-infra split / brownfield drift-check / brunch detect) will be evolved there.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b84fbda. Configure here.

Comment thread src/orchestrator/src/project-profile.ts
kostandinang and others added 5 commits June 17, 2026 00:51
…ard queue

Co-authored-by: Claude <noreply@anthropic.com>
…t/deno profiles

Profiles are now data literals (path templates + argv template + conventions
prose) compiled into the unchanged Toolchain interface — adding a runtime is
one data entry. Registry invariants pinned enumerably across all profiles.

Co-authored-by: Claude <noreply@anthropic.com>
…d into plan.yaml

brunch plan gains --profile=<id> (validated via parseProfileId); the emitter
resolves the chain once and stamps the id on both the authored and fallback
plans, so cook always reads the profile the emitter used. resolveToolchain
now throws UnknownProfileError on a typo'd id instead of silently running
bun; absent stays lenient for hand-authored fixtures.

Co-authored-by: Claude <noreply@anthropic.com>
architectPlan's schema gains an optional profile enum (registry ids,
null when the spec is silent); the emitter chain becomes flag ≫ spec
profile ≫ architect-classified ≫ bun. A hallucinated profile fails the
schema parse and rides the existing deterministic fallback. D160-K
intact — classification reads projected spec prose only.

Queue exhausted: CARDS.md retired; PLAN frontier marked branch-complete.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang kostandinang force-pushed the ka/fe-843-toolchain-profiles branch from b84fbda to e4e3afe Compare June 16, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant