cli
Guides safe modification and operation of the Observal Python CLI, including Typer registration, output and error contracts, noninteractive behavior, bundled skill synchronization, and CLI-focused tests.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cli
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides safe modification and operation of the Observal Python CLI, including Typer registration, output and error contracts, noninteractive behavior, bundled skill synchronization, and CLI-focused tests.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/bundled-skills.md9.5 KB
- 参考文档references/cli-architecture.md12.0 KB
- 参考文档references/command-workflows.md12.3 KB
- 参考文档references/troubleshooting.md12.1 KB
- 脚本scripts/check_cli_contract.py5.3 KB
03 SKILL.md 正文
Observal CLI Sub-skill
Use this sub-skill when the task touches the Python observal CLI surface: Typer command registration, command groups, command help, table or JSON output, categorized errors, noninteractive automation, CLI/API client behavior, bundled Observal skill synchronization, or CLI-specific tests.
Route the task
| Task | Read |
|---|---|
| Understand where a command is registered, which module owns it, or how output/errors flow | CLI architecture |
Add, rename, remove, or use commands under auth, config, scan, doctor, registry, agent, ops, admin, server, or related groups |
Command workflows |
| Change CLI paths, flags, examples, docs, or agent-facing behavior that must be reflected in bundled skills | Bundled skills |
| Debug install/import failures, dirty JSON mode, API failures, config issues, optional dependency failures, telemetry/harness command failures, or unsafe retries | Troubleshooting |
| Quickly inspect the imported CLI app and bundled-skill presence | Run scripts/check_cli_contract.py --help |
Read the selected reference before editing. Do not depend on repository docs or tests for the operating contract; this sub-skill distills the relevant rules and names.
Operating rules
- Keep the canonical CLI entry point as
observal_cli.main:app; add new top-level groups only when no existing group fits. - Use the existing Typer app for the relevant domain module and verify the final command path with help or static introspection before documenting it.
- Structured commands support
--output table|jsonusingOutputMode; JSON mode must write machine JSON only and must not print Rich tables, prompts, spinners, banners, or progress text. - API-backed commands use the shared
observal_cli.clientfunctions and the shared error contract inobserval_cli.errors; add audited labels inobserval_cli.error_contextfor every new client call site. - Agent and CI workflows must be noninteractive: expose required inputs as arguments or options, require explicit confirmation flags for destructive JSON mutations, and use dry-run when a multi-resource preview is meaningful.
- Mutations are sent once. After a timeout or connection failure following a mutation, read current state before retrying.
- When a path, flag, output shape, example, or behavior changes, update the matching
docs/clipage and every affected bundled skill underobserval_cli/skills, then regenerate the generated command reference. - Verify with the narrow CLI tests plus static contract checks before declaring the change complete.
Boundaries
- The root
observalrepo skill owns high-level routing, installation summary, provenance, and cross-cutting smoke checks. - This
clisub-skill owns the Python CLI hierarchy and bundled Observal skill behavior. serverowns FastAPI routes, data models, migrations, jobs, insights, and server-side auth/admin implementation.harness-telemetryowns harness registry entries, adapters, hook specs, session parsers, and telemetry delivery internals.webowns the Vite/React/TanStack Router frontend and Playwright guidance.repo-developmentowns contributor policy, lint/test/release/compliance workflows, and change-review mechanics.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).