/osprey:design-philosophyfrom osprey
Defines OSPREY's design and architecture principles for safety-critical control systems. Guides code structure decisions, anti-pattern prevention, and feature reviews for connectors, MCP servers, providers, CLI, and runtime.
Ships in osprey. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Working draft. Principles are still being collected and refined with the maintainer. The eight below are confirmed. Each states a rule, its rationale, and the guidance an agent should apply. Principles are written generically: do not hard-code lists of current features or subsystems into this document — they go stale. Refer to "existing peer subsystems" and let the reader inspect the code.
OSPREY runs agentic AI in safety-critical control systems (accelerators, fusion experiments, beamlines), where an incorrect hardware write can damage equipment or endanger people. These principles exist to keep the framework trustworthy on real machines and adaptable as the field changes. Apply judgment: principles guide decisions, they are not mechanical rules to satisfy.
The cautious behavior is what happens unless configuration explicitly enables the riskier one.
ControlSystemConnector.__init_subclass__
(packages/osprey-connectors/src/osprey_connectors/control_system/_base.py).Code in src/osprey must run unchanged at a different facility. Anything tied to one accelerator,
detector, or beamline lives behind a connector, in config, or in a preset/template — never in the
framework.
When building a new subsystem, follow the structure that existing peer subsystems already use before inventing a new one. Consistency lowers design cost, shortens the learning curve, and makes later refactoring tractable because subsystems resemble each other.
Separate a feature from the dependencies it relies on so either can be replaced independently. In a fast-moving field, tight coupling to a volatile dependency is technical risk, not convenience.
src/osprey/agent_runner/ is the Claude Code adapter. The
SDK calls, the CLI launcher, the provider environment, the first-run state seed, the build-artifact
catalog and the tool-name lists live there, and a ruff rule (TID251) plus tests/test_harness_fence.py
refuse an SDK import anywhere else in src/ or packages/. There is no harness-swap layer; Claude Code
is the harness OSPREY ships. New code reaches the agent through osprey.agent_runner, and a
Claude-specific need goes into the adapter, not inline.If a change alters what an operator or deployer sees or does, the user-facing surface ships with it: a
docs how-to, CLI --help text, and a changelog fragment in changelog.d/. Code that works but cannot
be found is incomplete, not done.
A datum — which channels exist, which providers are registered, what a limit is — is produced in exactly one place, and every other consumer derives from that place rather than keeping its own enumeration. Parallel lists do not stay in sync; they diverge silently and the divergence surfaces as a wrong answer on a real machine, not as a failing test.
Every example, preset, demo, and doc page OSPREY ships is a promise to keep it working. A surface the development loop does not exercise day to day rots silently: its config drifts, its docs lie, and its tests pin yesterday's behavior. So the set of shipped surfaces must stay small enough that the ordinary development cycle touches all of them.
Every integration point is designed from the end product, never merged from the status quo.
An integration point is any place two lines of work meet: a merge conflict, a branch joining an integration branch, a re-cut, a re-plan, a spec or plan written against an older tree. At such a point the question is never "how do these two combine" but "what does the finished OSPREY need here".
This prevents the resolution that treats the two sides as the only candidates: the conflict settled by keeping both, the old plan replayed onto a moved tree, the compromise that splits the difference. Each looks cheap at the seam and leaves the product carrying two half-designs where it needed one.
/osprey:design-philosophy skill
(plugins/osprey/skills/design-philosophy/SKILL.md in the repository; docs: Contributing → Development Setup →
Design Principles) — and professional software-engineering practice. The principles are the growing list; this
rule is how they are applied wherever work meets.When a feature feels wrong but the reason is hard to name, identify which principle it violates and state it plainly: name the principle, point at the specific drift, and propose the change that brings the work back in line. The questions behind the principles: Is the unsafe path harder to reach than the safe one? Would this be wrong at another facility? Does this follow the shape of its peers? Can this dependency be swapped later without a rewrite? Could a user discover and use this without reading the source? Does this fact have exactly one producer? Which existing workflow will exercise this next month? What does the finished OSPREY need at this seam?
At a merge, a rebase, a re-cut, or a plan written against an older tree, apply Principle 8 before resolving anything.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
design-principles, architecture, safety-critical, code-review, osprey
npx claudepluginhub als-apg/osprey --plugin osprey12 skills in this plugin
/build-appBuild an OSPREY app: a panel in the web terminal's sidebar, the backend container behind it, and the agent tools that reach the same backend, all declared in one app.yml. Use whenever someone wants to create, scaffold, extend or fix an OSPREY app or application, runs or asks about `osprey app new` / `osprey app check`, edits an app.yml, adds a tool, a route, a write with an approval card, or a skill or subagent to an app, or wants an operator screen that the agent can also read and drive, even when they only say "panel with a backend" or "give the agent a tool for X". Works in a facility deployment repo with OSPREY installed and in an OSPREY checkout. Starts by checking itself against the installed OSPREY's app contract. For a static themed page with no backend and no tools, use the panel skill instead.
/contributeGuides a contributor through the OSPREY GitHub Flow contribution journey from a working-tree change to a merged PR on main. Use when someone says "I want to contribute X to osprey", "help me commit/push this", "prep this branch for a PR", "open a PR", "my CI is failing on this branch", "rebase onto main", or wants help following the contributing workflow. Auto-detects whether they have push access to als-apg/osprey or are contributing from a fork. Composes with /osprey:pre-commit and /osprey:release, and with the external commit-organize skill when it is installed — invoke this whenever someone is contributing code to OSPREY, even if they haven't named the workflow explicitly.
/doc-syncUse when a maintainer wants to know where a page under docs/source says something the code no longer does — before cutting a release, after a long stretch of merges, or when one page is suspected of describing a flag, key, default, or procedure that has moved on. Triggers: "run doc-sync", "sync the docs", "do the docs match the code", "is this page still right", "check the how-to guides", "validate the docs", "doc drift", "audit the docs", "which pages went stale". Prefer it over reading a page and forming an opinion whenever the question is "is what this page says still true". Config comments, shipped prompts, runtime messages, and pinned versions are not doc pages; those are osprey:housekeeping.
/facility-reviewResolves what the OSPREY facility build flags, with the person who maintains the facility repository: runs `osprey facility validate`, investigates every stop and warning it prints, groups the ones that share a cause, asks one evidence-backed question per group, writes each confirmed answer into `fixes.yaml` or `policy.yaml` (or proposes a diff to an authored facility file), rebuilds, and shows the finding gone. Use whenever a facility build stops or warns, whenever someone pastes a `facility: <kind>: ...` line, after `osprey facility import` brings in a cable schedule, rack layout, MML export or channel list, and when someone says "review my facility", "clean up the facility warnings", "two sources disagree", "contested relations", "layer-conflict", "which source wins", or asks why a relation is contested or superseded, even if they do not name this skill.
/housekeepingUse when a maintainer wants to know where OSPREY tells its users something that is no longer true — before cutting a release, after a long stretch of merges without one, or when the generated project, a shipped skill, a runtime message, or a pinned version is suspected of having fallen behind the code — or when the shipped presets, which are supposed to agree (hello-world and demo), may have drifted apart. Triggers: "run housekeeping", "check for drift", "what has rotted", "is anything stale", "housekeeping report", "sweep the repo", "preset parity", "do the presets still agree", "what maintainer chores are outstanding", "pre-release drift check". Prefer it over ad-hoc grepping whenever the question is "has anything drifted" rather than "fix this one thing". Doc-page prose is not this skill's job; that is osprey:doc-sync.
/panelAuthor a new OSPREY web-terminal panel — a self-contained, themed HTML mini-app the terminal mounts beside the chat. Use whenever someone wants to create, author, add, scaffold, or build an OSPREY panel, a design-system panel, or a standalone themed surface for the web terminal. Produces a token-only panel that passes the panel validator.
Other plugins' skills for the same job