[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75VDS8QYP61G7WE2409NFG1":3,"skill-same:01M75VDS8QYP61G7WE2409NFG1":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75VDS8QYP61G7WE2409NFG1","architecture-boundaries",null,"Use when changing or reviewing code that crosses major application boundaries such as settings, Property Inspector, actions, runtime sources\u002Fhelpers, rendering, persistence, validation, generated contracts, IPC, version-skewed helper\u002Fplugin APIs, or adapters. Keep boundaries explicit and avoid over-engineered plumbing, option bags, duplicated models, and defensive code for impossible states.","ShoMetrics\u002Fsho_metrics","ShoMetrics","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286841904?v=4","01M75VDM9S89QVZQZG8P589MVS","Sho Metrics","01M75VDMAE77E47W94V8P60S84",21,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-boundaries\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: architecture-boundaries\ndescription: Use when changing or reviewing code that crosses major application boundaries such as settings, Property Inspector, actions, runtime sources\u002Fhelpers, rendering, persistence, validation, generated contracts, IPC, version-skewed helper\u002Fplugin APIs, or adapters. Keep boundaries explicit and avoid over-engineered plumbing, option bags, duplicated models, and defensive code for impossible states.\n---\n\n# Architecture Boundaries\n\nUse this skill to avoid the problems this repo has already hit: duplicated\nsettings models, UI mirrors, source\u002Fhelper leakage, broad option bags,\ndefensive parser chains, and cross-layer plumbing that hides ownership.\n\n## When To Use\n\nUse this skill when a change crosses or redefines ownership between these\nareas:\n\n- persisted settings, storage codecs, defaults, and validation;\n- Property Inspector panels, controls, bindings, and settings sync;\n- action lifecycle, action-specific view assembly, and shared action helpers;\n- runtime sources, platform helpers, scheduler, background collection, and\n  metric state;\n- rendering contracts, view models, SVG\u002Frasterization, and Stream Deck output;\n- generated contracts, proto schemas, IPC messages, adapters, and wire formats.\n\nDo not use this skill for a purely local implementation detail that stays\ninside one owner and does not add a new model, adapter, compatibility path, or\nshared option surface.\n\n## Core Rule\n\nBefore changing code, name the boundary:\n\n- Who owns persisted data?\n- Who owns runtime defaults and context?\n- Who owns DOM\u002Fcontrol-only values?\n- Who owns rendering contracts?\n- Who owns source\u002Fruntime failures?\n- Who owns helper processes, IPC transport, and wire contracts?\n- Where does generated, storage, or wire data become app-owned data?\n\nIf ownership is unclear, stop and clarify the boundary before adding code.\n\n## AI-Assisted Architecture Guardrails\n\nAI tends to make the shortest local path look like the architecture. Use these\nrules to keep AI changes bounded without turning the codebase into a maze of\ntiny abstractions.\n\n### Before Adding Code\n\nAnswer these during implementation, not only at the end:\n\n- Is this change adding a feature branch, a new owner, or a boundary conversion?\n- Is this axis expected to grow, such as metric domain, widget kind, source kind,\n  layout, or platform?\n- If three similar features arrive later, will this owner become a controller\n  that knows too much?\n- Is the feature cheap because the design is right, or because the edit reuses\n  the wrong shared entry point?\n\n### DO: Name The Owner Before Adding A Branch\n\nGood:\n- A new disk-only render option belongs in `actions\u002Fdisk\u002F` or the disk target\n  resolver, not in a shared action switch.\n- A new persisted setting starts in the stored contract and resolver, then is\n  exposed as resolved settings.\n- Windows `Core` owns hardware access and metric mapping; `Service` owns the\n  IPC server and request handling; the hub source client owns fallback and\n  connection behavior.\n- Direct `if` branches are fine for cases that are few and stable. If the axis\n  is expected to grow, name the owner before adding another branch.\n\nBad:\n- Add another `if (actionKind === \"disk\")` branch inside a shared Property\n  Inspector controller because it is the shortest edit.\n- Pass an options bag through action, Property Inspector, renderer, and runtime\n  because no layer clearly owns the field.\n- Put pipe framing, service lifecycle, or hub fallback policy into Windows\n  `Core` because it already reads hardware.\n\n### DO: Keep Routers Thin\n\nRouters may choose the active owner and dispatch messages. They must not become\nthe place where every feature stores state or knows every downstream detail.\n\nGood:\n- `usePropertyInspectorSettings` owns Stream Deck connection lifecycle and\n  delegates stored settings reading to `settings\u002Fstorage`.\n- `MetricAction` wires action lifecycle and subscriptions, while domain view\n  assembly stays under the action domain folder.\n- Property Inspector components compose UI and write typed sparse patches; they\n  do not own a settings-shaped mirror.\n\nBad:\n- Put widget recovery rules, source fallback rules, panel visibility, and\n  renderer defaults into one Property Inspector hook.\n- Let `MetricAction` understand every disk\u002Fnetwork\u002FGPU view branch instead of\n  calling typed domain builders.\n\n### DO: Keep State Transitions Owned\n\nBackground work may fetch, poll, watch, decode, or validate. It should return a\ntyped result to the owner that mutates state.\n\nGood:\n- Runtime sources return metric snapshots; `MetricStore` owns history mutation.\n- Windows helper\u002Fservice code returns source snapshots or protocol responses;\n  hub runtime code decides how to cache, fall back, and render.\n- The storage codec returns a read result; Property Inspector decides how to\n  show the warning.\n- Defensive code handles real runtime uncertainty: IO, SDK events, missing\n  devices, disappearing actions, source failures, or incomplete DOM input.\n\nBad:\n- A source adapter writes widget settings because it discovered a better\n  default.\n- A parser mutates UI state while also recovering stored settings.\n- Add defensive checks for states a validated stored or resolved contract\n  already makes impossible.\n\n### DO: Keep Data Typed Until The Final Display Boundary\n\nRule: Keep metric text formatting at the owning boundary: `metrics\u002F` formats\nreal value\u002Funit semantics, action view builders pass semantic units through,\n`view-rendering` adapts display text, and primitives only draw supplied strings.\n\nGood:\n- Resolve stored proto into `ResolvedWidgetSettings`, then adapt to renderer\n  contracts.\n- Convert source IPC protobuf messages at the service\u002Fclient boundary before\n  they become runtime source data.\n- Keep metric channels named until the renderer needs SVG text or paths.\n- Stored contracts stay sparse; resolved contracts are complete for callers;\n  renderers receive render-facing data, not storage schema.\n\nBad:\n- Flatten metric values into string arrays early and rely on index positions in\n  panels or renderers.\n- Import generated settings proto into React panels or action view builders\n  because it is already typed.\n- Thread generated IPC proto through hub runtime, action view builders, or\n  rendering because both TypeScript and C# can import it.\n- Put compact render-only unit helpers in `metrics`, import text-content\n  helpers from actions, add action-facing unit-text override options, or\n  convert units inside `widgets\u002Fprimitives`.\n\n\n### PREFER: Small Bounded Contexts With Real Owners\n\nGood:\n- Split a large hook by extracting same-file helpers for loading, subscription,\n  and read-result handling.\n- Move shared metric-view queueing to `view-updates\u002F` because it has a\n  stable owner outside individual actions.\n\nBad:\n- Keep adding prompt rules for a module that repeatedly mixes settings,\n  runtime, and rendering ownership.\n- Create one-use pass-through files or wrappers only to make a file look\n  smaller.\n\nAvoid the overcorrection:\n- Small context does not mean many tiny files. Prefer clear ownership and a\n  narrow public API over aggressive splitting.\n- Same-file helpers are a low-risk first step, not a replacement for a stable\n  owner when responsibility keeps growing.\n\n### STOP: Feature And Invariant Conflict\n\nIf a feature conflicts with a boundary invariant, do not contort code to obey\nboth. Stop and make the choice explicit.\n\nGood:\n- If ownership, persistence, renderer contracts, or runtime source contracts\n  would change, explain the conflict and ask before implementing.\n- Say whether the right answer is to reject the feature, accept a named\n  localized compromise, or revise the invariant.\n- Keep a compromise contained, tested, and away from shared hot paths.\n\nBad:\n- Add a hidden compatibility path because the new storage contract rejects old\n  data.\n- Thread generated proto into renderer code because conversion feels tedious.\n\n### AVOID: Velocity-Driven Scope Creep\n\nGood:\n- Treat a cheap edit as suspicious when it adds another branch to a shared\n  owner.\n- Report the real architecture cost when a feature looks cheap only because it\n  reuses the wrong entry point.\n- Add static guards for repeated, high-risk, mechanically detectable boundary\n  violations.\n\nBad:\n- Accept a feature because \"it is only one more case\" in a central controller.\n- Add brittle tests for every style preference instead of guarding real\n  architectural boundaries.\n\n## Simplicity Guard\n\nDo not turn boundary discipline into a framework.\n\n- Prefer direct code over registries when cases are few and stable.\n- Prefer typed patches over generic field maps.\n- Prefer a small adapter over plumbing a storage type through the app.\n- Prefer deleting old paths over maintaining compatibility code.\n- Prefer comments for future directions until the stored\u002Fruntime contract can\n  actually express the feature.\n\n## Generated Contracts\n\n* **DO: Keep generated schema code at storage or wire boundaries.**\n  Generated schema code may be used at storage or wire boundaries. Do not let it\n  leak into domain rendering, action view building, Property Inspector panels,\n  or platform helper core code.\n\n  Good:\n  - A storage codec reads generated settings proto.\n  - A source IPC client reads generated IPC response messages.\n\n  Bad:\n  - A renderer imports generated settings or source API proto.\n  - Windows `Core` imports generated IPC messages.\n\n* **DO: Convert generated data when it becomes app-owned data.**\n  Settings, rendering, action view models, and PI state are app-owned data.\n  Source IPC\u002FAPI facade types may stay source-runtime contracts, but they must\n  not become UI, action, renderer, or storage models. For source helpers,\n  generated IPC messages belong at the service\u002Fclient edge; hardware core\n  models should remain transport-independent.\n\n  Good:\n  - The settings resolver converts stored proto into `ResolvedWidgetSettings`.\n  - The source IPC adapter normalizes a version-skewed freshness enum before\n    `MetricStore` decides whether to append history.\n  - `runtime\u002Fsources\u002Fsource-client.ts` exports a source-runtime contract derived\n    from generated source API types, while PI and renderers consume app-facing\n    view models.\n\n  Bad:\n  - PI decides how to display generated `UNSPECIFIED`.\n  - Planner, store, actions, and renderer all receive a generated IPC response.\n\n* **DO: Keep settings enum boundary conversions explicit.**\n  Example: read stored proto enums through\n  `settings\u002Fstorage\u002Fresolver\u002Fstored-to-resolved-enum-maps.ts`, and write\n  resolved settings enums through\n  `settings\u002Fstorage\u002Fresolved-to-stored-enum-maps.ts`. Prefer simple explicit\n  maps that keep compile-time exhaustiveness at the boundary. Do not be rigid:\n  use a smaller local conversion when it is truly local and does not create a\n  second source of truth.\n\nThe following rules refine source IPC\u002FAPI boundaries. They do not change the\nstored\u002Fresolved settings ownership rules above.\n\n* **PREFER: Derive source IPC\u002FAPI runtime types from generated message shapes when semantics match.**\n  Do this at a source adapter\u002Ffacade boundary, such as\n  `runtime\u002Fsources\u002Fsource-client.ts`. Strip generator plumbing such as\n  `$typeName` and adjust nested generated payloads there. If the runtime type\n  intentionally changes meaning, convert to an app-owned model instead.\n\n  Good:\n  - Use a type-only alias such as\n    `RawSensorIdentity = Readonly\u003COmit\u003CProtoRawSensorIdentity, \"$typeName\">>`\n    for a pure source-owned string payload.\n  - Derive `MetricValueAttribution` from the generated source API message when\n    it is still source-runtime metadata and the adapter owns enum compatibility.\n  - Let a source IPC adapter helper accept a generated message while it is still\n    validating wire data.\n\n  Bad:\n  - Recreate the same fields as `RawSensorIdentity` or\n    `SourceRawSensorIdentity` only to avoid importing a type.\n  - Reuse a descriptor message with enum fields in Property Inspector UI.\n  - Store generated source API messages with enums, oneofs, presence semantics,\n    or `$typeName` message wrappers in `MetricStore`, planner state, action\n    models, PI state, or renderer contracts.\n  - Reuse a generated name that collides with or shadows an existing app-owned\n    domain type; convert at the boundary instead.\n\n  Bad when applied mechanically:\n  - Derive a resolved settings type from generated stored settings because the\n    fields currently look identical. Stored settings and resolved settings have\n    different owners.\n\n* **DO: Keep app-owned IPC\u002FAPI mirrors aligned with generated names and nesting.**\n  If a source IPC\u002FAPI message needs an app-owned type, use the same noun and\n  nesting unless the app type intentionally changes semantics. Name that\n  semantic change in the adapter or type comment.\n\n  Good:\n  - `ProtoMetricValueAttribution` maps to `MetricValueAttribution`.\n\n  Bad:\n  - Flatten `raw_sensor_identity` into descriptor fields without a runtime-owned\n    reason.\n  - Add broad prefixes such as `Source*` when the generated noun is already\n    accurate.\n\n* **DO: Validate IPC\u002FAPI wire invariants before mutating runtime state.**\n  The adapter owns malformed wire handling: orphan records, conflicting\n  records, missing required nested payloads, and invalid enum defaults should be\n  dropped, rejected, or normalized there with low-noise support logs. Do not\n  silently drop, ignore, or normalize unexpected wire data.\n\n  Good:\n  - Drop an attribution whose metric id is absent from the snapshot and log once\n    per interval.\n  - Return a structured invalid-request response for an unsupported helper IPC\n    request and log a warning that mentions possible version skew.\n\n  Bad:\n  - Store malformed source data and make rendering guess what happened.\n  - Ignore a malformed descriptor, orphan record, or unsupported request without\n    a warning at the IPC\u002FAPI boundary.\n\n* **DO: Treat helper\u002Fplugin IPC version skew as normal.**\n  The helper and plugin are separate programs; users will not always update them\n  together. Field owners must define how unknown future enum values, missing\n  fields, and unsupported request values degrade.\n\n  Good:\n  - Unknown future value freshness becomes display-only\u002Fretained at the source\n    adapter, with a low-frequency warning.\n  - Unknown DEBUG-only unavailable reasons stay diagnostic and do not change\n    render\u002Ffallback behavior; they still get a low-frequency warning.\n  - A request enum is sent only when helper capabilities say it is supported.\n\n  Bad:\n  - Throw `protocolMismatch` and mark the whole helper unusable because one\n    future enum value appeared in a non-critical field.\n  - Let PI, actions, or renderers switch on generated `UNSPECIFIED` or unknown\n    numeric enum values.\n\n## Final Check\n\nBefore finishing, verify:\n\n- no duplicated settings or UI model was introduced;\n- no resolved defaults are persisted;\n- no renderer or ordinary UI imports storage schema;\n- no platform helper core imports IPC\u002Fservice\u002FUI concerns;\n- no legacy compatibility path was added;\n- no broad option bag or pass-through wrapper was added;\n- no defensive parser was added for data already validated at the boundary.\n- tests assert the boundary invariant, not only the generated implementation.\n","# Architecture Boundaries\n\nUse this skill to avoid the problems this repo has already hit: duplicated\nsettings models, UI mirrors, source\u002Fhelper leakage, broad option bags,\ndefensive parser chains, and cross-layer plumbing that hides ownership.\n\n## When To Use\n\nUse this skill when a change crosses or redefines ownership between these\nareas:\n\n- persisted settings, storage codecs, defaults, and validation;\n- Property Inspector panels, controls, bindings, and settings sync;\n- action lifecycle, action-specific view assembly, and shared action helpers;\n- runtime sources, platform helpers, scheduler, background collection, and\n  metric state;\n- rendering contracts, view models, SVG\u002Frasterization, and Stream Deck output;\n- generated contracts, proto schemas, IPC messages, adapters, and wire formats.\n\nDo not use this skill for a purely local implementation detail that stays\ninside one owner and does not add a new model, adapter, compatibility path, or\nshared option surface.\n\n## Core Rule\n\nBefore changing code, name the boundary:\n\n- Who owns persisted data?\n- Who owns runtime defaults and context?\n- Who owns DOM\u002Fcontrol-only values?\n- Who owns rendering contracts?\n- Who owns source\u002Fruntime failures?\n- Who owns helper processes, IPC transport, and wire contracts?\n- Where does generated, storage, or wire data become app-owned data?\n\nIf ownership is unclear, stop and clarify the boundary before adding code.\n\n## AI-Assisted Architecture Guardrails\n\nAI tends to make the shortest local path look like the architecture. Use these\nrules to keep AI changes bounded without turning the codebase into a maze of\ntiny abstractions.\n\n### Before Adding Code\n\nAnswer these during implementation, not only at the end:\n\n- Is this change adding a feature branch, a new owner, or a boundary conversion?\n- Is this axis expected to grow, such as metric domain, widget kind, source kind,\n  layout, or platform?\n- If three similar features arrive later, will this owner become a controller\n  that knows too much?\n- Is the feature cheap because the design is right, or because the edit reuses\n  the wrong shared entry point?\n\n### DO: Name The Owner Before Adding A Branch\n\nGood:\n- A new disk-only render option belongs in `actions\u002Fdisk\u002F` or the disk target\n  resolver, not in a shared action switch.\n- A new persisted setting starts in the stored contract and resolver, then is\n  exposed as resolved settings.\n- Windows `Core` owns hardware access and metric mapping; `Service` owns the\n  IPC server and request handling; the hub source client owns fallback and\n  connection behavior.\n- Direct `if` branches are fine for cases that are few and stable. If the axis\n  is expected to grow, name the owner before adding another branch.\n\nBad:\n- Add another `if (actionKind === \"disk\")` branch inside a shared Property\n  Inspector controller because it is the shortest edit.\n- Pass an options bag through action, Property Inspector, renderer, and runtime\n  because no layer clearly owns the field.\n- Put pipe framing, service lifecycle, or hub fallback policy into Windows\n  `Core` because it already reads hardware.\n\n### DO: Keep Routers Thin\n\nRouters may choose the active owner and dispatch messages. They must not become\nthe place where every feature stores state or knows every downstream detail.\n\nGood:\n- `usePropertyInspectorSettings` owns Stream Deck connection lifecycle and\n  delegates stored settings reading to `settings\u002Fstorage`.\n- `MetricAction` wires action lifecycle and subscriptions, while domain view\n  assembly stays under the action domain folder.\n- Property Inspector components compose UI and write typed sparse patches; they\n  do not own a settings-shaped mirror.\n\nBad:\n- Put widget recovery rules, source fallback rules, panel visibility, and\n  renderer defaults into one Property Inspector hook.\n- Let `MetricAction` understand every disk\u002Fnetwork\u002FGPU view branch instead of\n  calling typed domain builders.\n\n### DO: Keep State Transitions Owned\n\nBackground work may fetch, poll, watch, decode, or validate. It should return a\ntyped result to the owner that mutates state.\n\nGood:\n- Runtime sources return metric snapshots; `MetricStore` owns history mutation.\n- Windows helper\u002Fservice code returns source snapshots or protocol responses;\n  hub runtime code decides how to cache, fall back, and render.\n- The storage codec returns a read result; Property Inspector decides how to\n  show the warning.\n- Defensive code handles real runtime uncertainty: IO, SDK events, missing\n  devices, disappearing actions, source failures, or incomplete DOM input.\n\nBad:\n- A source adapter writes widget settings because it discovered a better\n  default.\n- A parser mutates UI state while also recovering stored settings.\n- Add defensive checks for states a validated stored or resolved contract\n  already makes impossible.\n\n### DO: Keep Data Typed Until The Final Display Boundary\n\nRule: Keep metric text formatting at the owning boundary: `metrics\u002F` formats\nreal value\u002Funit semantics, action view builders pass semantic units through,\n`view-rendering` adapts display text, and primitives only draw supplied strings.\n\nGood:\n- Resolve stored proto into `ResolvedWidgetSettings`, then adapt to renderer\n  contracts.\n- Convert source IPC protobuf messages at the service\u002Fclient boundary before\n  they become runtime source data.\n- Keep metric channels named until the renderer needs SVG text or paths.\n- Stored contracts stay sparse; resolved contracts are complete for callers;\n  renderers receive render-facing data, not storage schema.\n\nBad:\n- Flatten metric values into string arrays early and rely on index positions in\n  panels or renderers.\n- Import generated settings proto into React panels or action view builders\n  because it is already typed.\n- Thread generated IPC proto through hub runtime, action view builders, or\n  rendering because both TypeScript and C# can import it.\n- Put compact render-only unit helpers in `metrics`, import text-content\n  helpers from actions, add action-facing unit-text override options, or\n  convert units inside `widgets\u002Fprimitives`.\n\n\n### PREFER: Small Bounded Contexts With Real Owners\n\nGood:\n- Split a large hook by extracting same-file helpers for loading, subscription,\n  and read-result handling.\n- Move shared metric-view queueing to `view-updates\u002F` because it has a\n  stable owner outside individual actions.\n\nBad:\n- Keep adding prompt rules for a module that repeatedly mixes settings,\n  runtime, and rendering ownership.\n- Create one-use pass-through files or wrappers only to make a file look\n  smaller.\n\nAvoid the overcorrection:\n- Small context does not mean many tiny files. Prefer clear ownership and a\n  narrow public API over aggressive splitting.\n- Same-file helpers are a low-risk first step, not a replacement for a stable\n  owner when responsibility keeps growing.\n\n### STOP: Feature And Invariant Conflict\n\nIf a feature conflicts with a boundary invariant, do not contort code to obey\nboth. Stop and make the choice explicit.\n\nGood:\n- If ownership, persistence, renderer contracts, or runtime source contracts\n  would change, explain the conflict and ask before implementing.\n- Say whether the right answer is to reject the feature, accept a named\n  localized compromise, or revise the invariant.\n- Keep a compromise contained, tested, and away from shared hot paths.\n\nBad:\n- Add a hidden compatibility path because the new storage contract rejects old\n  data.\n- Thread generated proto into renderer code because conversion feels tedious.\n\n### AVOID: Velocity-Driven Scope Creep\n\nGood:\n- Treat a cheap edit as suspicious when it adds another branch to a shared\n  owner.\n- Report the real architecture cost when a feature looks cheap only because it\n  reuses the wrong entry point.\n- Add static guards for repeated, high-risk, mechanically detectable boundary\n  violations.\n\nBad:\n- Accept a feature because \"it is only one more case\" in a central controller.\n- Add brittle tests for every style preference instead of guarding real\n  architectural boundaries.\n\n## Simplicity Guard\n\nDo not turn boundary discipline into a framework.\n\n- Prefer direct code over registries when cases are few and stable.\n- Prefer typed patches over generic field maps.\n- Prefer a small adapter over plumbing a storage type through the app.\n- Prefer deleting old paths over maintaining compatibility code.\n- Prefer comments for future directions until the stored\u002Fruntime contract can\n  actually express the feature.\n\n## Generated Contracts\n\n* **DO: Keep generated schema code at storage or wire boundaries.**\n  Generated schema code may be used at storage or wire boundaries. Do not let it\n  leak into domain rendering, action view building, Property Inspector panels,\n  or platform helper core code.\n\n  Good:\n  - A storage codec reads generated settings proto.\n  - A source IPC client reads generated IPC response messages.\n\n  Bad:\n  - A renderer imports generated settings or source API proto.\n  - Windows `Core` imports generated IPC messages.\n\n* **DO: Convert generated data when it becomes app-owned data.**\n  Settings, rendering, action view models, and PI state are app-owned data.\n  Source IPC\u002FAPI facade types may stay source-runtime contracts, but they must\n  not become UI, action, renderer, or storage models. For source helpers,\n  generated IPC messages belong at the service\u002Fclient edge; hardware core\n  models should remain transport-independent.\n\n  Good:\n  - The settings resolver converts stored proto into `ResolvedWidgetSettings`.\n  - The source IPC adapter normalizes a version-skewed freshness enum before\n    `MetricStore` decides whether to append history.\n  - `runtime\u002Fsources\u002Fsource-client.ts` exports a source-runtime contract derived\n    from generated source API types, while PI and renderers consume app-facing\n    view models.\n\n  Bad:\n  - PI decides how to display generated `UNSPECIFIED`.\n  - Planner, store, actions, and renderer all receive a generated IPC response.\n\n* **DO: Keep settings enum boundary conversions explicit.**\n  Example: read stored proto enums through\n  `settings\u002Fstorage\u002Fresolver\u002Fstored-to-resolved-enum-maps.ts`, and write\n  resolved settings enums through\n  `settings\u002Fstorage\u002Fresolved-to-stored-enum-maps.ts`. Prefer simple explicit\n  maps that keep compile-time exhaustiveness at the boundary. Do not be rigid:\n  use a smaller local conversion when it is truly local and does not create a\n  second source of truth.\n\nThe following rules refine source IPC\u002FAPI boundaries. They do not change the\nstored\u002Fresolved settings ownership rules above.\n\n* **PREFER: Derive source IPC\u002FAPI runtime types from generated message shapes when semantics match.**\n  Do this at a source adapter\u002Ffacade boundary, such as\n  `runtime\u002Fsources\u002Fsource-client.ts`. Strip generator plumbing such as\n  `$typeName` and adjust nested generated payloads there. If the runtime type\n  intentionally changes meaning, convert to an app-owned model instead.\n\n  Good:\n  - Use a type-only alias such as\n    `RawSensorIdentity = Readonly\u003COmit\u003CProtoRawSensorIdentity, \"$typeName\">>`\n    for a pure source-owned string payload.\n  - Derive `MetricValueAttribution` from the generated source API message when\n    it is still source-runtime metadata and the adapter owns enum compatibility.\n  - Let a source IPC adapter helper accept a generated message while it is still\n    validating wire data.\n\n  Bad:\n  - Recreate the same fields as `RawSensorIdentity` or\n    `SourceRawSensorIdentity` only to avoid importing a type.\n  - Reuse a descriptor message with enum fields in Property Inspector UI.\n  - Store generated source API messages with enums, oneofs, presence semantics,\n    or `$typeName` message wrappers in `MetricStore`, planner state, action\n    models, PI state, or renderer contracts.\n  - Reuse a generated name that collides with or shadows an existing app-owned\n    domain type; convert at the boundary instead.\n\n  Bad when applied mechanically:\n  - Derive a resolved settings type from generated stored settings because the\n    fields currently look identical. Stored settings and resolved settings have\n    different owners.\n\n* **DO: Keep app-owned IPC\u002FAPI mirrors aligned with generated names and nesting.**\n  If a source IPC\u002FAPI message needs an app-owned type, use the same noun and\n  nesting unless the app type intentionally changes semantics. Name that\n  semantic change in the adapter or type comment.\n\n  Good:\n  - `ProtoMetricValueAttribution` maps to `MetricValueAttribution`.\n\n  Bad:\n  - Flatten `raw_sensor_identity` into descriptor fields without a runtime-owned\n    reason.\n  - Add broad prefixes such as `Source*` when the generated noun is already\n    accurate.\n\n* **DO: Validate IPC\u002FAPI wire invariants before mutating runtime state.**\n  The adapter owns malformed wire handling: orphan records, conflicting\n  records, missing required nested payloads, and invalid enum defaults should be\n  dropped, rejected, or normalized there with low-noise support logs. Do not\n  silently drop, ignore, or normalize unexpected wire data.\n\n  Good:\n  - Drop an attribution whose metric id is absent from the snapshot and log once\n    per interval.\n  - Return a structured invalid-request response for an unsupported helper IPC\n    request and log a warning that mentions possible version skew.\n\n  Bad:\n  - Store malformed source data and make rendering guess what happened.\n  - Ignore a malformed descriptor, orphan record, or unsupported request without\n    a warning at the IPC\u002FAPI boundary.\n\n* **DO: Treat helper\u002Fplugin IPC version skew as normal.**\n  The helper and plugin are separate programs; users will not always update them\n  together. Field owners must define how unknown future enum values, missing\n  fields, and unsupported request values degrade.\n\n  Good:\n  - Unknown future value freshness becomes display-only\u002Fretained at the source\n    adapter, with a low-frequency warning.\n  - Unknown DEBUG-only unavailable reasons stay diagnostic and do not change\n    render\u002Ffallback behavior; they still get a low-frequency warning.\n  - A request enum is sent only when helper capabilities say it is supported.\n\n  Bad:\n  - Throw `protocolMismatch` and mark the whole helper unusable because one\n    future enum value appeared in a non-critical field.\n  - Let PI, actions, or renderers switch on generated `UNSPECIFIED` or unknown\n    numeric enum values.\n\n## Final Check\n\nBefore finishing, verify:\n\n- no duplicated settings or UI model was introduced;\n- no resolved defaults are persisted;\n- no renderer or ordinary UI imports storage schema;\n- no platform helper core imports IPC\u002Fservice\u002FUI concerns;\n- no legacy compatibility path was added;\n- no broad option bag or pass-through wrapper was added;\n- no defensive parser was added for data already validated at the boundary.\n- tests assert the boundary invariant, not only the generated implementation.\n",{"name":5,"description":7},"main","64d15e4ac8c0ccb361e0eb16586488536cea98d7",".agents\u002Fskills\u002Farchitecture-boundaries",2,"https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics","https:\u002F\u002Fshometrics.github.io\u002F","https:\u002F\u002Fgithub.com\u002FShoMetrics","2026-10-04 14:26:56",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add ShoMetrics\u002Fsho_metrics --skill architecture-boundaries",{"tool":38,"command":39},"bunx","bunx skills add ShoMetrics\u002Fsho_metrics --skill architecture-boundaries",{"tool":41,"command":42},"pnpm","pnpm dlx skills add ShoMetrics\u002Fsho_metrics --skill architecture-boundaries","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-boundaries\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M75VEQBG6NEP2FV89CM1ARJ1","typescript-coding-style","Use when writing, reviewing, or changing TypeScript code in this repo, especially for TypeScript type-safety boundaries, exports, TSDoc, React Property Inspector code, and hub directory placement. Pair with coding-style for language-neutral naming, comments, tests, and ownership rules.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypescript-coding-style\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75VEMY4JDE12D1AVSVPYB4T","technical-architecture","Read this whenever you need to make any high level code changes, understand why a design choice is made.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftechnical-architecture\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75VEK2SJNRYVQB9FNZY0BDR","systeminformation","Refer when you need to use the systeminformation API.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsysteminformation\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75VEH4R5AQHXANPB20P5DJV","stream-deck-sdk-v2","This skill is for stream deck SDK Docs. Refer when you need to make stream deck plugin code changes.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstream-deck-sdk-v2\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75VEF20YS8X10DTR2XYQXTY","proto","Read this before designing\u002Fwriting .proto files. Do not read if you are simply consuming proto.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproto\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75VEC96245QS2T835958R84","performance","Use when changing lifecycle hooks, polling, rendering, caching, startup, IPC, benchmarks, throttling, queueing, or any code that may run often enough to affect responsiveness or resource usage.","https:\u002F\u002Fgithub.com\u002FShoMetrics\u002Fsho_metrics\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperformance\u002FSKILL.md",[],[]]