Skip to content

feat(framework): architect stack rationale with PROS/CONS + alternatives (#210)#213

Merged
suleimansh merged 1 commit into
mainfrom
feat/stack-rationale-pros-cons
Jul 4, 2026
Merged

feat(framework): architect stack rationale with PROS/CONS + alternatives (#210)#213
suleimansh merged 1 commit into
mainfrom
feat/stack-rationale-pros-cons

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #210. Part of #209 (the MVP dashboard).

The website's edge over the CLI is showing why the AI chose the stack. Today the architect returns decisions: [{choice, why}] (a one-line why). This makes the stack choice self-justifying.

What changed

  • ArchitectPlan gains optional pros, cons, and alternatives ({option, whyNot}). Both agentArchitect (ai-sdk) and driverArchitect (framework) request and parse them; absent fields are omitted, so existing producers are unaffected.
  • New exported STACK_TRADEOFFS gives the architect objective, reusable Vike-vs-Next reasons (edge/Cloudflare deploy, renderer-agnostic, ecosystem size), so the justification is grounded rather than invented per run. Both architect prompts embed it.
  • Bootstrap emits pros/cons/alternatives on the architect event and records the rejected alternatives to the decisions ledger as rejections, so the ledger shows what was weighed.
  • The dashboard's Stack & rationale panel renders the pros, cons, and "Considered instead" alternatives. The --fake demo populates them.

Checks

  • Repo typecheck (21) + both builds green.
  • ai-autopilot 284/284, framework 70/70 (new tests: schema parse, event emission + ledger rejections, prompt asks for pros/cons grounded in tradeoffs, backward-compatible omission).
  • framework --fake end to end: the architect event carries pros/cons/alternatives; the dashboard page embeds the render path.
  • Changeset added (minor, both packages).

Not in scope: persistence (#211), live session link (#212).

The web dashboard's edge over the CLI is showing why the AI chose the
stack. The architect now returns that rationale, not just a one-line why.

- ArchitectPlan gains optional pros/cons/alternatives; agentArchitect and
  driverArchitect both request and parse them, omitting absent fields so
  existing producers are unaffected.
- New exported STACK_TRADEOFFS gives the architect objective Vike-vs-Next
  reasons (edge/Cloudflare deploy, renderer-agnostic, ecosystem) so the
  justification is grounded, not invented. Both architect prompts embed it.
- Bootstrap emits pros/cons/alternatives on the architect event and records
  rejected alternatives to the ledger as rejections.
- The dashboard 'Stack & rationale' panel renders pros, cons, and
  'Considered instead'. The --fake demo populates them.

Part of #209. Closes #210.
@suleimansh suleimansh added enhancement New feature or request priority: high Should be addressed soon labels Jul 4, 2026
@suleimansh suleimansh self-assigned this Jul 4, 2026
@suleimansh suleimansh merged commit f1d11d9 into main Jul 4, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/stack-rationale-pros-cons branch July 4, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high Should be addressed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack rationale: PROS/CONS + alternatives considered

1 participant