feat(framework): AI meta-select for the domain preset + modes + build kind (#270)#271
Merged
Conversation
… 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.--preset/yml preset is set, live only, it runs a single short-lived routing turn and feeds the pick into the sameresolveDomainPresetpath a flag would.--no-auto-presetopts out;--fakeskips it (stays deterministic). Mode flags still OR in on top of an inferred preset.Verified live (real Claude, one routing turn each, no build)
web-development, major-changeweb-development, technical, bug-fix (read the deps and the fix intent)data-science, major-change134 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-presetis 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.