前端测试
- 作者仓库星标 3,367
- 许可证 MIT
- 作者更新于 实时读取
- 作者仓库 atopile
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @atopile · MIT
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: dev
description: LLM-focused workflow for working in this repo: compile Zig, run the orchestrated test runner, co…
category: 工程开发
runtime: Python
---
# dev 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Quick Start / Relevant Files / Dependants (Call Sites)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Quick Start / Relevant Files / Dependants (Call Sites)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、读取环境变量、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、读取环境变量;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、读取环境变量。
先用一个小任务确认它会围绕“Quick Start / Relevant Files / Dependants (Call Sites)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: dev
description: LLM-focused workflow for working in this repo: compile Zig, run the orchestrated test runner, co…
category: 工程开发
source: atopile/atopile
---
# dev
## 什么时候使用
- 用于组织测试、定位失败并形成修复闭环 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Quick Start / Relevant Files / Dependants (Call Sites)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、读取环境变量;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "dev" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Quick Start / Relevant Files / Dependants (Call Sites)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件、读取环境变量 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Dev Module
This skill is written for LLMs working inside this repo. It focuses on the fastest, most reliable inner loop:
- rebuild Zig bindings when needed
- run the repo’s orchestrated test runner (
ato dev test --llm, not raw test output) - use the generated test reports (
artifacts/test-report.json,artifacts/test-report.html,artifacts/test-report.llm.json) - discover and use
ConfigFlags correctly (and inventory them repo-wide)
Quick Start
source .venv/bin/activate
ato dev compile
ato dev test --llm -k solver
ato dev test --llm --view HEAD --open
ato dev test --reuse --baseline HEAD~1
ato dev flags
Relevant Files
- CLI commands:
src/atopile/cli/dev.pyato dev compile(triggers Zig build viaimport faebryk.core.zig)ato dev test --llm(runstest/runner/main.pywith args; supports baseline/CI report helpers)
- Zig build-on-import glue:
src/faebryk/core/zig/__init__.py(ZIG_NORECOMPILE,ZIG_RELEASEMODE) - Config flags utility:
src/faebryk/libs/util.py(ConfigFlag,ConfigFlagInt, …) - Test runner + reports:
test/runner/main.py(artifacts/test-report.json,artifacts/test-report.html,artifacts/test-report.llm.json) - CI artifacts definition:
.github/workflows/pytest.yml(test-report.json,test-report.html)
Dependants (Call Sites)
- CI/CD: The
devcommands are the primary interface for GitHub Actions workflows. - Local Development: Developers use
ato dev compileafter modifying Zig code.
How to Work With / Develop / Test
Core Commands
ato dev compile: compile native extensions (graph/typegraph/sexp bindings).ato dev test --llm: runs the orchestrated test runner (defaults to-p test -p src); supports:-kfilter (-- -k ...also works via passthrough args)--baselinecomparisons (commit hash orHEAD~Nstyle)--view/--opento fetch and open thetest-report.htmlartifact from GitHub Actions (requiresghCLI)--cito apply the CI marker expression (not not_in_ci and not regression and not slow)--direct -k <testname>to run a single test viatest/runtest.py(tight single-test loops)
Test Reports (JSON as source of truth)
Local test runs write:
artifacts/test-report.json(single source of truth; outcomes/durations/memory/baseline compare status + stdout/stderr/logs/tracebacks; seetests[].output_full)artifacts/test-report.html(human dashboard; derived from JSON; controlled byFBRK_TEST_GENERATE_HTML=1)artifacts/test-report.llm.json(LLM-friendly; derived from JSON; ANSI stripped logs)
CI uploads both artifacts (see .github/workflows/pytest.yml):
test-report.jsontest-report.html
Notes for LLM debugging:
- Prefer
artifacts/test-report.jsonorartifacts/test-report.llm.jsonover raw output; they include structured failures, logs, baseline compare, and collection errors. - The HTML is best for quickly scanning long-running tests, worker crashes, and per-test output.
Remote/baseline behavior:
ato dev test --llm --baseline <commit>uses the CItest-report.jsonartifact as the baseline (requiresghCLI).ato dev test --llm --view <commit> --opencurrently fetches/opens only the HTML artifact; for JSON, download thetest-report.jsonartifact viagh run download.ato dev test --reuse --baseline <commit>rebuilds JSON/HTML/LLM against a baseline without rerunning tests.ato dev test --keep-openkeeps the live report server running after tests finish.
Useful test-runner environment variables (see test/runner/main.py):
FBRK_TEST_REPORT_INTERVAL(seconds; report refresh cadence)FBRK_TEST_LONG_THRESHOLD(seconds; “long test” threshold)FBRK_TEST_WORKERS(0= cpu count, negative scales workers)FBRK_TEST_GENERATE_HTML(1/0)FBRK_TEST_PERIODIC_HTML(1/0)FBRK_TEST_OUTPUT_MAX_BYTES(truncate preview output used by HTML;tests[].output_fullremains complete)FBRK_TEST_OUTPUT_TRUNCATE_MODE(headortail)FBRK_TEST_BIND_HOST(orchestrator bind host; default0.0.0.0)FBRK_TEST_REPORT_HOST(host used in printed report URL; default bind host)FBRK_TEST_PERF_THRESHOLD_PERCENT(default0.30)FBRK_TEST_PERF_MIN_TIME_DIFF_S(default1.0)FBRK_TEST_PERF_MIN_MEMORY_DIFF_MB(default50.0)
LLM quick usage:
artifacts/test-report.llm.jsonis always generated (ANSI stripped, full tests + logs).ato dev test --llmprints a concise summary + schema + jq hints (stdout only).- jq recipes are embedded in the report under
llm.jq_recipes. - Auto-LLM:
ato dev testenables the summary automatically when running under claude-code/codex-cli/cursor. - Force on/off via
FBRK_TEST_LLM=1orFBRK_TEST_LLM=0.
ConfigFlags (how to use + how to inventory)
ConfigFlag is the repo’s “toggle-by-env-var” mechanism. The environment variable name is the first argument to ConfigFlag(...).
Usage:
export SOME_FLAG=1
Inventory all ConfigFlags in-tree (preferred over trying to maintain a manual list):
ato dev flags
Prefer using ato dev flags when you want the full picture (types/defaults/descriptions + callsite counts) in one place.
High-leverage flags you’ll use often:
- Zig build:
ZIG_NORECOMPILE,ZIG_RELEASEMODE - Solver debug:
SLOG,SVERBOSE_TABLE,SPRINT_START,SMAX_ITERATIONS,SSHOW_SS_IS - Logs:
COLOR_LOGS,LOG_TIME,LOG_FILEINFO
Development Workflow
- Zig Changes: Edit files under
src/faebryk/core/zig/src/-> Runato dev compile. - Profiling: If something is slow, use
ato dev profile <command>to generate a flamegraph or stats.
Testing
- Main test entrypoint:
ato dev test --llm. - If you change CLI behavior, add/adjust tests under
test/that exercise the command surface.
Best Practices
- Use ConfigFlags: For experimental features or verbose debugging, use a
ConfigFlaginstead of commenting out code. - Compile often: Zig errors won’t be caught by Python tooling.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核