feat: add PR interest classifier schema#2
Merged
Conversation
Member
Author
|
Final report:
Validation:
|
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.
Summary
Updates the PR classifier example to use the slimmer interest-based shape.
The schema now drops
relevance,evidence, andmetadata, and usesinterestwithi0throughi4instead.It also adds a reusable checked-in schema file so the workflow no longer depends on
/tmpschemas.What Changed
The localagent structured-output machinery is unchanged.
This only updates the reusable classifier contract and the docs/tests around it.
schemas/pr-local-model-classifier.schema.json.schemas/**in the npm package files.relevancetointerest.Testing
I ran local checks and a real LM Studio/Gemma smoke test against the original PR-classification use case.
npm run checknode dist/src/cli/main.js --session-dir /tmp/localagent-smoke-interest-schema --final-schema schemas/pr-local-model-classifier.schema.json --tools bash -p "Read the PR contents before answering. Use gh to inspect https://github.com/openclaw/openclaw/pull/80568, including title, body, changed files, and enough diff/context to classify it. Classify whether this PR is about local models or not. Use interest i0 to i4, where i0 is highest interest and i4 is lowest interest. Return the final answer only by calling final_json." | tee /tmp/localagent-pr-80568-interest.json | jq -e '.is_local_model_related == true and (.interest | test("^i[0-4]$")) and (has("relevance") | not) and (has("evidence") | not) and (has("metadata") | not)'The smoke output classified PR 80568 as local-model related with
interest: "i0"and norelevance,evidence, ormetadatafields.Risks
This changes the example classifier schema shape, not localagent's generic schema feature.
Existing users with their own schema files are unaffected.