CodeVetter · Repo Unpack · Behavior traces
nextlevelbuilder/ui-ux-pro-max-skill
Three primary flows were traced end-to-end. (1) Domain search: argparse -> search() -> identity/auto-detect -> _search_csv_detailed -> BM25 -> calibrated abstention -> format_output. (2) Design system: generate_design_system -> DesignSystemGenerator.generate -> product search -> reasoning rules -> 5-domain fan-out -> mode-aware palette -> formatter -> optional atomic persist. (3) Install: uipro init -> detectAIType -> prompt -> templateInstall -> renderSkillFile + copyDataAndScripts + copySubSkills. A fourth maintenance flow (sync/check-assets and the relevance gate) is also traced.
- Domain search order: __main__ argparse -> search(query, domain, max_results) -> _valid_max_results -> if domain omitted, _load_rows_or_empty(styles.csv) + _style_identity(allow_contained=False), else detect_domain -> _search_csv_detailed -> _load_csv_snapshot -> _get_bm25 -> BM25.score -> threshold abstain -> _project_row -> format_output.
- Zero-result path: abstained search -> out['suggestions'] from _suggest_terms/_suggest_identities -> format_output prints 'No matches...' plus closest terms, instructing the agent to retry once and label fallbacks — matching SKILL.md's 'do not fabricate' contract.
- Deprecated-style redirect path: _style_identity exact match -> _style_search_destination -> Parent Style ID lookup or Replacement Domain/ID -> either the parent row is projected or a redirect object is emitted that format_output renders as 'modeled in the <domain> domain as <id>'.
- Design-system trace order: generate_design_system -> DesignSystemGenerator.__init__ (_load_reasoning, _load_styles, _build_style_lookup, _load_landing_patterns) -> generate -> search(query,'product',1) -> _apply_reasoning -> _find_reasoning_rule -> parse_decision_rules -> apply_decision_rules -> _multi_domain_search -> _select_best_match -> _resolve_color_mode/_select_palette_for_mode -> dict assembly.
- Persistence trace: persist_design_system -> safe_slug -> mkdir design-system/<slug>/pages -> format_master_md -> _write_persisted_file (NamedTemporaryFile + fsync + os.link) -> FileExistsError -> status 'skipped_exists' unless --force (os.replace); --page additionally runs format_page_override_md -> _generate_intelligent_overrides -> _detect_page_type.
- Install trace: uipro init -> initCommand -> detectAIType(cwd) probes ~20 marker dirs -> prompts select -> (dry-run: planPlatformInstallActions/planAllPlatformInstallActions, write nothing) -> templateInstall -> generatePlatformFiles -> loadPlatformConfig(AI_TO_PLATFORM) -> resolveInstallPaths -> renderSkillFile -> writeFile -> copyDataAndScripts -> copySubSkills.
- Asset-sync check trace: `npm run check:assets` -> sync-assets.mjs --check -> checkAssets -> diffDir over {data,scripts,templates} vs cli/assets, 6 sub-skills vs cli/assets/skills, and {data,scripts} vs .claude/skills/ui-ux-pro-max -> fileHash (LF-normalized sha256) -> any missing/extra/stale file exits 1.
- Relevance-gate trace: evaluate-relevance.py -> load_json(cases/thresholds/baseline) -> runtime_fingerprint + oracle_fingerprint (sha256 over code+data) -> validate_fixture/validate_identities -> per case: search/search_stack/DesignSystemGenerator.generate -> precision@k, MRR, nDCG, routing accuracy, negative abstention -> check_thresholds -> SystemExit with suspect-case diff on failure.
- Update trace: uipro update -> getLatestRelease (GitHub API with optional UI_PRO_MAX_GITHUB_TOKEN/GITHUB_TOKEN bearer) -> semver-gate the tag -> execFileSync npm install -g -> else fall through to initCommand(force:true) to refresh skill files in place.
- Skill-runtime trace (as installed): agent reads SKILL.md -> invokes `python <skill>/scripts/search.py` -> UTF-8 stdout wrapper -> search/design-system output -> agent synthesizes; references/quick-reference.md and pro-rules.md are read on demand, not loaded eagerly.