build-safe-measurement-station
Build, modify, review, or test this PySide6 laboratory measurement station across device modules, recipes, execution, storage, settings, and the Fluent application shell. Use for cross-cutting features, new instrument support, workflow changes, architectural refactors, or any change spanning more than one subsystem; route unit-sensitive, persistence-sensitive, and hardware-output work through the specialized project skills.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- build-safe-measurement-station
- description
- Build, modify, review, or test this PySide6 laboratory measurement station across device modules, recipes, execution, storage, settings, and the Fluent application shell. Use for cross-cutting features, new instrument support, workflow changes, architectural refactors, or any change spanning more than one subsystem; route unit-sensitive, persistence-sensitive, and hardware-output work through the specialized project skills.
02 资源文件 1
- 参考文档agents/openai.yaml285 B
03 SKILL.md 正文
Build Safe Measurement Station
Treat the repository as a safety-relevant measurement system, not a generic desktop app. Preserve physical meaning, fail-safe behavior, provenance, recoverability, and the Fluent-native shell in every change.
Route the work
- Use
$enforce-measurement-quantitieswhenever values cross recipe, UI, settings, protocol, plotting, or storage boundaries. - Use
$verify-instrument-safetywhenever code can configure, arm, enable, ramp, stop, retry, or recover hardware outputs. - Use
$preserve-measurement-datawhenever code changes measurement models, HDF5/CSV persistence, thaTEC/PyThat compatibility, checkpoints, resume, or result readers. - Use the repository
AGENTS.mdcontract andapple-designfor Fluent shell, interaction, motion, and visual review work.
Load only the specialized skill relevant to the current change. Load all three for an end-to-end measurement workflow or a new device module.
Establish the change contract
Before editing:
- Trace the value or action from user input or recipe source to compiled plan, adapter command, acquired result, persisted representation, and result UI.
- Identify the authoritative registry or model. Extend it instead of adding a parallel mapping.
- Write down the safety state before, during, and after failure or cancellation.
- Identify compatibility surfaces: settings YAML, recipe YAML, public HDF5, private recovery state, audit events, and UI labels.
Do not infer safety from UI state. The compiler, safety policy, adapter, runner, and storage boundary must enforce their own invariants.
Preserve architecture
- Keep device-independent models and errors under
app/domain. - Keep device integration behind
app/contracts/device_module.pyand the registered module structure. - Keep protocol and hardware details inside the device package; do not import device UI from engine or storage code.
- Keep recipe parameter identity centralized in
app/recipes/parameter_registry.py. - Keep the Fluent application shell coherent; do not introduce a legacy shell or compatibility facade.
- Prefer immutable typed request/result models at subsystem boundaries.
- Reject unknown enum values, dimensions, commands, and schema variants explicitly; do not silently guess.
Implement vertically
For a new measurable or controllable quantity, update the smallest complete vertical slice:
- domain quantity/model;
- settings or recipe schema;
- parameter registry and compiler;
- device safety validation;
- adapter/protocol conversion;
- execution state and audit event;
- persistence schema and reader;
- UI formatting and validation;
- focused tests at each boundary.
Do not declare the slice complete when only the UI or adapter works.
Verify proportionally to risk
Run focused tests first, then the broader suite for cross-cutting changes. Include negative and fault-path tests, not only the nominal path.
- Quantity changes: parser, dimension mismatch, scale/exponent boundaries, finite-value checks, round-trip display.
- Hardware changes: command ordering, limits, readback, compliance, timeout, cancellation, and confirmed safe shutdown.
- Storage changes: interrupted append, close status, resume identity, schema validation, and PyThat round-trip.
- Shell/page changes: show the window, process events, and assert visible non-zero geometry at a normal desktop size and a narrow size.
Run ruff check app tests and the relevant pytest targets. Treat a skipped safety or compatibility test as unresolved unless the environment limitation is recorded.
Report completion
State which contracts changed, which invariants were preserved, and exactly which tests ran. Call out any behavior that remains simulator-only or visually unverified.
04 同仓库更多 Skills
verify-instrument-safety
Implement or review safety-critical laboratory instrument control in this repository, including output configuration, arming, enabling, ramps, compliance, lab and DUT limits, capability checks, VISA commands, retries, watchdogs, cancellation, emergency stop, shutdown confirmation, recovery, simulation, and audit events. Use whenever a change can energize hardware, alter a physical setpoint, communicate with an instrument, or affect fault and safe-state behavior.
preserve-measurement-data
Implement or review measurement persistence, HDF5 and CSV writing, thaTEC:OS/PyThat compatibility, schema manifests, metadata, timestamps, checkpoints, crash tolerance, run close status, recovery/resume, reference spectra, and result readers in this repository. Use whenever changing MeasurementPoint, SpectrumTrace, storage writers/readers, exports, persisted names or dtypes, or any workflow that must remain durable and scientifically interpretable after interruption.
grill-me
A relentless interview to sharpen a plan or design.
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
enforce-measurement-quantities
Implement or review physical quantities, units, SI normalization, engineering prefixes, scientific notation, logarithmic dB/dBm values, sweep axes, plot labels, settings, recipes, and instrument protocol conversions in this measurement station. Use whenever numeric measurement or setpoint values cross UI, YAML, compiler, adapter, storage, CSV, HDF5, or plotting boundaries, especially to prevent exponent, prefix, dimension, and implicit-unit errors.