Skip to content
Back to skills

Api Design

ASecurity

Design rules for new public headers and APIs in Pulp: layering of the audio core, strong types for quantities, small composable processors, separation of processing, model and presentation, lean includes, and docs order. Consult before adding or reshaping a public header under core/*/include/, a new pulp::signal processor, or a new top-level API.

  • 23 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added December 1, 2026
toolsapi

Works with

  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add danielraffel/pulp --skill api-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielraffel-api-design/badge)](https://www.skillsdirectory.com/skills/danielraffel-api-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-design
description: >-
  Design rules for new public headers and APIs in Pulp: layering of the audio
  core, strong types for quantities, small composable processors, separation of
  processing, model and presentation, lean includes, and docs order. Consult
  before adding or reshaping a public header under core/*/include/, a new
  pulp::signal processor, or a new top-level API.
---

# Public API and Header Design

The full guide is [docs/guides/api-design.md](../../../docs/guides/api-design.md).
Read it before adding a public header or API. The design lessons draw on
cycfi/q (MIT), credited as inspiration only; copy no code from it.

## Checklist

- **Layering.** The header includes only the standard library and small infra
  (`pulp/runtime`, `pulp/simd`) plus its own layer. No format, I/O or UI types
  in a DSP header.
- **Strong types.** A new API passes frequency, time and gain as strong types
  or literals, not adjacent bare floats. Leave stable signatures alone.
- **Small processors.** One job per class, composed inside `Processor::process()`
  from `pulp::signal` helpers. Reach for `SignalGraph` only for runtime routing.
- **Separation of concerns.** `Processor` processes, `StateStore` and
  parameters hold the model, `editor_factory()` and `format::Editor` present it.
- **Expose the pipeline.** Anything a widget or test could draw or verify is a
  public pure function (see "Expose the Pipeline, Not Just the Endpoints" in
  `CLAUDE.md`).
- **Lean headers.** Minimal includes, forward declarations where enough, no
  reliance on transitive includes. `tools/scripts/header_fanout_guard.py` checks
  fan-out growth.
- **Docs.** Fundamentals first, then graduated examples, then reference.
  Examples compile or are marked illustrative.

## When to deviate

A stable signature keeps its shape. A genuine layering exception needs a
stated reason in the PR description.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.