nextlevelbuilder/ui-ux-pro-max-skill · error

Agent guide validation failed:

Error message

Agent guide validation failed:

What it means

Terminal failure message from validate-agent-guide.py: the validate() function returned a non-empty problems list, so one or more locked examples or platform checks failed. It prints each problem on its own bulleted line to stderr and exits 1. The locked examples shown are a focused UX domain search and a `--stack react-native` search for 'virtualized list' — both must return results with the expected domain/stack field.

Source

Thrown at scripts/validate-agent-guide.py:190

                errors.append(f"{label}: missing {phrase!r}")
        errors.extend(validate_commands(label, text))
    design = run_json("beauty spa wellness service", "--design-system")
    if design["design_system"]["category"] != "Beauty/Spa/Wellness Service":
        errors.append("design-system example resolved wrong product category")
    ux = run_json("keyboard focus modal", "--domain", "ux")
    if ux.get("domain") != "ux" or not ux.get("results"):
        errors.append("focused UX example did not return an explicit UX match")
    stack = run_json("virtualized list", "--stack", "react-native")
    if stack.get("stack") != "react-native" or not stack.get("results"):
        errors.append("React Native stack example did not return a stack match")
    return errors


if __name__ == "__main__":
    problems = validate()
    if problems:
        print("Agent guide validation failed:\n- " + "\n- ".join(problems), file=sys.stderr)
        raise SystemExit(1)
    print(
        f"Agent guide validation passed: {PLATFORM_COUNT} platforms "
        "and 3 locked examples checked."
    )

View on GitHub (pinned to a38d04c3d5)

Solutions

  1. Read the bulleted lines under the message — they name exactly which example failed; fix that specific data or code path first.
  2. If the UX example fails, run `python3 src/ui-ux-pro-max/scripts/search.py "<the locked ux query>" --domain ux` and inspect the JSON: ensure domain and results fields are present and non-empty.
  3. If the stack example fails, run the same with `--stack react-native` for 'virtualized list' and verify stacks/react-native.csv still contains matching rows and the output includes "stack": "react-native".
  4. If you intentionally changed the locked examples, update validate-agent-guide.py's locked queries and the agent guide doc in the same commit so they stay in sync.
  5. Re-run `npm run sync:assets` in cli/ if you edited src scripts, since the validator may execute mirrored copies.

Example fix

# before: Agent guide validation failed:
# - focused UX example did not return an explicit UX match

# inspect what the engine now returns
python3 src/ui-ux-pro-max/scripts/search.py "accessible forms" --domain ux

# after: restore/keep the ux.csv rows the locked query relies on
# (or update the locked query in scripts/validate-agent-guide.py and the guide together)
Defensive patterns

Strategy: validation

Validate before calling

# Reproduce the locked examples before shipping ranking/data changes:
import json, subprocess, sys
def run_json(*args):
    out = subprocess.run([sys.executable, "src/ui-ux-pro-max/scripts/search.py", *args],
                         capture_output=True, text=True, check=True)
    return json.loads(out.stdout)
ux = run_json("<locked ux query>", "--domain", "ux")
assert ux.get("domain") == "ux" and ux.get("results"), ux
stack = run_json("virtualized list", "--stack", "react-native")
assert stack.get("stack") == "react-native" and stack.get("results"), stack

Prevention

When it happens

Trigger: Any run of `python3 scripts/validate-agent-guide.py` where: the UX query's top JSON lacks domain=='ux' or empty results (BM25 ranking changed, ux.csv edited); the react-native stack example lacks stack=='react-native' or returns no results (stacks/react-native.csv edited or search.py CLI output schema changed); or platform file checks fail (platform config JSON invalid or PLATFORM_COUNT mismatches).

Common situations: After editing search.py's JSON output shape, refactoring core.py's ranking, or pruning rows from ux.csv / stacks/react-native.csv, the documented agent-guide examples stop matching reality and CI validation fails.

Related errors


AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14). Data as JSON: /api/errors/dc263730bfac19c3. Report an issue: GitHub.