AGENT SKILL

dsl-compilation

Compile and troubleshoot pix2code .gui DSL files into Bootstrap HTML, Android XML layout, or iOS Storyboard scaffold output.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
dsl-compilation
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Compile and troubleshoot pix2code .gui DSL files into Bootstrap HTML, Android XML layout, or iOS Storyboard scaffold output.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

DSL Compilation

Use this sub-skill when the user has a pix2code .gui file or generated DSL text and wants platform scaffold output, token validation, or compiler troubleshooting.

Read first

Quick workflow

  1. Confirm the input is a .gui file or DSL text that uses pix2code tokens.
  2. Choose one target platform: web, android, or ios.
  3. Run the bundled compiler with a deterministic seed when a stable test output matters:
python sub-skills/dsl-compilation/scripts/compile_gui.py --platform web --input screen.gui --output screen.html --seed 7
  1. Inspect the generated file for the platform-specific signal:
    • web: <html>, Bootstrap container/row/column markup.
    • Android: XML declaration plus LinearLayout root.
    • iOS: Storyboard XML document and viewController tags.
  2. If the compiler reports unknown tokens, compare the DSL against references/dsl-reference.md. Platform vocabularies differ; a token valid for web may not exist for Android or iOS.

Route by task

User asks for Do this
"Compile this .gui to HTML" Use compile_gui.py --platform web; read platform reference if the output needs Bootstrap details.
"Compile generated DSL for Android/iOS" Use the same helper with --platform android or --platform ios; warn that generated IDs/text are placeholders.
"Debug a compiler KeyError" Read troubleshooting, validate braces and token names, then rerun the helper for a clearer error.
"Explain pix2code DSL" Read dsl-reference.md; do not send the user back to original mapping JSON files.
"Make exact original compiler behavior" Note that this helper preserves the original mapping semantics but adds deterministic seeds and diagnostics. For checkout maintenance, original scripts assumed they were run from the compiler/ directory.

Boundaries

This sub-skill owns DSL parsing and platform template rendering. It does not own model sampling from screenshots; route screenshot-to-DSL artifact questions to ../sampling-and-generation/SKILL.md. It does not own dataset splitting or model training; route those to ../data-and-training/SKILL.md.

Validation checklist

  • The input path exists and uses .gui content.
  • Braces are balanced and each opening token has a known platform mapping.
  • Leaf tokens separated by commas are valid for the selected platform.
  • Output extension matches the selected platform: .html, .xml, or .storyboard.
  • Runtime instructions use bundled scripts and references only.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351