Add deterministic import-policy compatibility classifier#5
Open
rsuresh-retool wants to merge 1 commit into
Open
Add deterministic import-policy compatibility classifier#5rsuresh-retool wants to merge 1 commit into
rsuresh-retool wants to merge 1 commit into
Conversation
Self-contained, runnable Node ESM mirror of Retool's appImportClassifier (rules.ts + classifier.ts). Walks a repo's manifest files and prints a hard_no / soft_no / supported verdict, so the retool-import skills can block unsupported app types locally before handing off to the R2 agent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
frankyj3578
approved these changes
Jun 5, 2026
frankyj3578
left a comment
There was a problem hiding this comment.
Quick question: Did you auto-generate this? How do we keep it in sync with the upstream once we start introducing gated vs free 2-tier approach, for example?
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.
What
Adds
plugins/retool-import/references/import-policy.mjs— a self-contained, runnable Node ESM module that is a faithful mirror of Retool's pre-agentappImportClassifier(rules.ts+classifier.ts).mapToVerdict, and user-facing copy as upstream.classifyImportedApp()stays verbatim (pass/hard_no, Next.js carve-out).localGateVerdict()layers a three-way verdict on top:hard_no/soft_no/supported.node_modules/ build dirs), inspects manifest files only (package.jsondeps,app.jsonshape, config-file presence — never source code), and prints{ verdict, identifiedAs, reasons }as JSON.This is the deterministic engine; the skill wiring that consumes it is in the stacked PR on top of this one.
Why
Lets the
retool-importskills block unsupported app types locally, before any discovery work or handoff to the R2 agent — parity with the browser import's pre-agent validation. The R2 agent'sevaluate_app_compatibilityremains the second line of defense for the non-skills path.Testing
node --checkpasses.app.json-key disambiguation, andnode_modulesexclusion.🤖 Generated with Claude Code