AGENT SKILL

bubbles-capability-foundation-design

Enforce capability-first design when work introduces a reusable foundation, adds a second provider/component/variant, references adapter/provider/strategy/plugin/channel/driver/connector/variant patterns, or shares UI/data/contract surfaces across two or more screens, features, or services.

License 许可
MIT
最近更新
2026-11-07
Stars
★ 1
Forks
0

01 前言 Front Matter

name
bubbles-capability-foundation-design
description
Enforce capability-first design when work introduces a reusable foundation, adds a second provider/component/variant, references adapter/provider/strategy/plugin/channel/driver/connector/variant patterns, or shares UI/data/contract surfaces across two or more screens, features, or services.

03 SKILL.md 正文

Bubbles Capability Foundation Design

Goal

Design the reusable capability first, then plug concrete implementations into it. The point is not abstraction for its own sake; it is preventing provider-, screen-, or class-specific designs from becoming the hidden foundation.

Use This Skill When

  • A feature introduces a brand-new capability with no existing foundation.
  • A second or later provider, adapter, connector, channel, driver, strategy, plugin, component, screen, or variant is being added.
  • Two or more screens, features, or services will share the same UI, data, or contract surface.
  • A design already uses words like adapter, provider, strategy, plugin, channel, driver, connector, or variant.

Do not use this skill for one-off utilities, bug fixes inside an existing foundation, single-screen UI work, or narrow refactors with no new shared surface.

Decision Tree

  1. Is the work a bug fix, one-off script, or narrow refactor inside an existing foundation?
    • Yes: keep it concrete. If capability-trigger keywords appear, add a short single-implementation justification.
    • No: continue.
  2. Is this the first version of a new capability?
    • Yes: model the foundation before implementations.
    • No: continue.
  3. Is this the second or later implementation/provider/screen/variant?
    • Yes: model or extend the shared foundation first.
    • No: continue.
  4. Will two or more screens, services, or features share a contract or UI/data surface?
    • Yes: define reusable primitives and composition rules.
    • No: avoid premature abstraction.

Section Templates

spec.md Domain Capability Model

## Domain Capability Model

### Capability
[Name the capability in domain language.]

### Domain Primitives
| Primitive | Purpose | Lifecycle |
|-----------|---------|-----------|
| [Entity/value/event] | [why it exists] | [states/transitions] |

### Relationships
- [Primitive A] relates to [Primitive B] by [business rule].

### Business Policies
- [Policy that every concrete implementation must obey.]

design.md Capability Foundation

## Capability Foundation

### Foundation Contract
| Contract | Responsibility | Consumers |
|----------|----------------|-----------|
| [interface/service/type] | [what it guarantees] | [who depends on it] |

### Extension Points
- [Adapter/provider/strategy hook]: [what implementers must provide]

### Foundation-Owned Behavior
- [Behavior shared by all implementations]

design.md Concrete Implementations

## Concrete Implementations

### [Implementation 1]
- Foundation contract used: [name]
- Implementation-specific behavior: [details]

### [Implementation 2]
- Foundation contract used: [name]
- Implementation-specific behavior: [details]

### Variation Axes
| Axis | Options | Owned By Foundation? |
|------|---------|----------------------|
| Provider protocol | HTTP publish, SMTP, webhook | No |
| Delivery policy | immediate, digest, retryable | Yes |

spec.md UI Primitives

## UI Wireframes

### UI Primitives
| Primitive | Used By Screens | Composition Rule |
|-----------|-----------------|------------------|
| [component/control/state] | [screen list] | [reuse rule] |

scopes.md Foundation Ordering

## Scope 1: Notification Capability Foundation
**Tags:** foundation:true
**Depends On:** none

## Scope 2: ntfy Notification Adapter
**Depends On:** Scope 1 - Notification Capability Foundation

## Scope 3: Email Notification Adapter
**Depends On:** Scope 1 - Notification Capability Foundation

Right And Wrong

Wrong:

Add ntfy notifications directly to the booking workflow.

Right:

Create a notification capability with delivery intent, provider adapter contract, retry policy, and audit lifecycle. Implement ntfy as the first adapter.

Wrong:

Create a plugin framework for one one-off export script.

Right:

### Single-Implementation Justification
This export is a one-time operator utility with no second provider, screen, service, or shared contract. A foundation would add maintenance cost without reducing real complexity.

Proven Precedent

bubbles-deployment-target-adapter applies this same shape to deployment: the project owns a target-agnostic contract, and per-target adapters own concrete host knowledge. Capability-first design generalizes that proven foundation-plus-overlay pattern to product, UI, service, and integration capabilities.

Validation Links

  • AN5: domain capability model when proportionality applies.
  • DE4: foundation/overlay split with at least two variation axes.
  • UX9: UI primitives for multi-screen or cross-feature UI reuse.
  • P4: foundation scopes precede overlay scopes.
  • G094: mechanical capability foundation gate for new specs.

04 同仓库更多 Skills

pkirsanov
pkirsanov/smackerel

smackerel-trace-capture

Wire Smackerel's concrete validate-plane stack into the framework trace-driven defect-discovery method. Use when running live-category tests (integration/e2e/e2e-ui/stress) against the ephemeral test stack; capturing SLO or trace evidence; hunting latency/error/perf bugs from spans; querying the test-stack Jaeger or Prometheus; or touching `.specify/runtime/observability`. Concrete smackerel endpoints + the exact `capture-slo.sh` command; do NOT duplicate `bubbles-observability-adapter` — this only adds the wiring.

★ 1
pkirsanov
pkirsanov/smackerel

smackerel-no-defaults

Enforce Smackerel's NO-DEFAULTS / fail-loud SST policy. Use when editing config, Docker Compose, deploy adapters, docs, instructions, skills, env handling, host bind addresses, or any runtime value that could be hidden by fallback syntax.

★ 1
pkirsanov
pkirsanov/smackerel

bubbles-workflow-mode-resolution

Resolve a Bubbles workflow mode against `bubbles/workflows.yaml`, including template inheritance, status ceilings, gate wiring, and decision policy. Use when picking a mode for a request, when a guard reports a mode-related failure, or when extending workflows.yaml with a new mode or template. Covers natural-language intent routing and the workflow registry consistency rules.

★ 1
pkirsanov
pkirsanov/smackerel

bubbles-workflow-execution-loops

Run per-round synchronous workflow execution loops correctly. Use when orchestrating a multi-round workflow, dispatching specialist subagents, handling round-based remediation, or interpreting a workflow mode's execution policy. Covers authorized direct execution, dispatch-and-wait, batch-then-summarize prohibition, and mapped-mode execution.

★ 1
pkirsanov
pkirsanov/smackerel

bubbles-vscode-agent-constraints

Design agents that fit the VS Code Copilot Chat runtime instead of fighting it. Use when authoring or editing any `*.agent.md`; when adding `tools:`, `agents:`, `handoffs:`, `model:`, `user-invocable:`, or `disable-model-invocation:` frontmatter; when designing an orchestrator that dispatches specialists; when a design implies agent-calls-agent-calls-agent chaining; when a subagent dispatch silently no-ops or an agent cannot be selected in the dropdown; or when writing a governance rule about delegation that the runtime cannot actually enforce. Prevents multi-level-subagent designs, prose-only dispatch laws, and frontmatter/body contradictions.

★ 1
pkirsanov
pkirsanov/smackerel

bubbles-upkeep-cadence

How to schedule, dispatch, and record recurring operational upkeep tasks (backup, restore-drill, BCDR-drill, patch-cycle, secret-rotation, flag-cleanup, compliance-sweep). Use when authoring or modifying `config/upkeep-calendar.yaml`, when investigating a missed task, when reading the upkeep ledger, or when adding a new task type.

★ 1