Skip to content

feat(framework): AI meta-select for the domain preset + modes + build kind (#270)#271

Merged
suleimansh merged 2 commits into
mainfrom
feat/ai-meta-select
Jul 5, 2026
Merged

feat(framework): AI meta-select for the domain preset + modes + build kind (#270)#271
suleimansh merged 2 commits into
mainfrom
feat/ai-meta-select

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #270. Part of #204 (Open Loop).

Rom's "meta-meta prompt": a live run with no preset chosen now infers the best-fit domain preset (+ modes + build event kind) from the prompt + the workspace, so framework "add a login page" in a web app picks Web Development on its own. No flag, no the-framework.yml needed.

What it does

  • New meta-select.ts: a router prompt listing the shipped presets (name/title/description + their build kinds) + modes, and a strict parser. Everything is validated against what actually ships, so a loose reply can only narrow to a safe selection (worst case: no preset = plain flow). Never throws.
  • CLI seam: when no --preset/yml preset is set, live only, it runs a single short-lived routing turn and feeds the pick into the same resolveDomainPreset path a flag would. --no-auto-preset opts out; --fake skips it (stays deterministic). Mode flags still OR in on top of an inferred preset.
  • Degrades safely: an agent error or junk reply falls back to the plain flow with a note, never blocks the run.

Verified live (real Claude, one routing turn each, no build)

  • empty workspace + "landing page with a signup form + accessibility" -> web-development, major-change
  • existing React/Vite app + "fix the crash when the cart total is negative" -> web-development, technical, bug-fix (read the deps and the fix intent)
  • "train a churn model and evaluate it reproducibly" -> data-science, major-change

134 framework tests green (+12). Typecheck clean.

Note for Rom

Auto-select is on by default for preset-less live runs (that is the "it just works" behavior from your sketch), which means such a run now always gets a domain preset unless the router returns "none". --no-auto-preset is the escape hatch. Say if you'd rather it be opt-in (--auto-preset) instead.

Follow-up (not in this PR): dashboard mode checkboxes reflecting the selected modes.

… kind (#270)

On a live run with no --preset (and none in the-framework.yml), infer the
best-fit Open Loop domain preset, its modes, and the build event kind from the
intent + workspace, then run under it. --no-auto-preset opts out; --fake stays
deterministic; a failed or empty pick falls back to the plain flow.

New meta-select module (router prompt + validated parse) plus a CLI seam that
feeds the pick into the same resolve path a flag would. Closes #270.
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 5, 2026
@suleimansh suleimansh self-assigned this Jul 5, 2026
A bad --preset name is a usage error independent of the environment, so it must
fail the same way whether or not the agent is installed. Moving preflight ahead
of preset resolution made a bad --preset report a preflight failure on a machine
without Claude Code (e.g. CI) instead of the unknown-preset usage error. Resolve
an explicit preset up front; only auto-select runs after preflight.
@suleimansh suleimansh merged commit cc6a8db into main Jul 5, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/ai-meta-select branch July 5, 2026 18:21
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: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI meta-select: auto-pick the domain preset + modes from the prompt + workspace

1 participant