Skip to content

feat(recipes): introduce the recipe layer — behaviour bundles with communication contracts#136

Open
spashii wants to merge 4 commits into
mainfrom
sam/recipes-layer
Open

feat(recipes): introduce the recipe layer — behaviour bundles with communication contracts#136
spashii wants to merge 4 commits into
mainfrom
sam/recipes-layer

Conversation

@spashii

@spashii spashii commented Jul 3, 2026

Copy link
Copy Markdown
Member

What is this change?

Implements the layers-and-recipes architecture (diagram now in the README). A recipe (src/recipes/<name>/) packages one behaviour as a vertical slice: a recipe.md manifest declaring connectors, triggers, a communication contract, and optional scope deltas — plus the skills that behaviour owns. Three recipes exist as of this PR:

  • software-delivery — github-pr-workflow, github-webhook-events (all sub-pages), linear-issue-workflow, retrofit-checklist, external-repo-audits
  • self-improvement — skill-creator, consult-opus, daily-maintenance (cron)
  • workspace-ops — absorbs and supersedes feat(notion): integrate notion client runtime, capability, and core skills #126: the six Notion skills get a behaviour home with their own communication contract (confirmation-first, no PR/CI vocabulary) instead of landing in the flat catalog; notion.py stays in src/runtime/ unchanged

Substrate skills (slack-dynamic-messaging, slack-files, exa-search, caveman-mode, _template) stay in src/skills/.

Runtime changes (Tier 3, deliberately minimal):

Prose changes: scope.md names what recipes may and may never override; self-maintenance.md adds recipe homes to the tier table (recipes/*/skills/ = Tier 1, recipe.md manifests = Tier 2); README gets the architecture section + diagram.

Guards (tests/eval/, tests/runtime/): all parametrized skill invariants (frontmatter, name-match, cron validity, catalog presence) now cover recipe skills automatically; new invariants pin manifest frontmatter, the communication-contract section, manifest hot-loading, recipe skills cataloged under their recipe, cron paths resolving, and no .py files inside recipes (connector code stays in the runtime, enforced not hoped). 339 tests pass locally.

What motivated it?

The behaviours Sam is designed for cut across every layer of the stack, and the repo organized by layer meant one behaviour lived in six places with nothing naming the slice. The forcing case was #126: six workspace-ops skills — a different behaviour with a genuinely different Slack posture — heading into the same flat catalog as the delivery skills (and #99 before it reaching for multi-profile, which is the wrong abstraction: it's the same identity, different behaviour bundle). The communication contract is the heart of it: incident response needs a very different kind of Slack usage than development, and one global policy can't serve both.

Deliberately out of scope (next steps, each its own PR): declarative webhook: trigger frontmatter, an incident-response recipe, per-recipe agent-tier selection.

Note for review: the assembled system prompt grows ~13k chars (manifests + workspace-ops catalog entries). Supersedes #126 — that PR can be closed if this shape is preferred.

Tier

1 (skills moves, manifests, docs) + 2 (scope.md) + 3 (prompts/daemon/config) — bundled intentionally per operator request for a single PR.

Confidence

High on mechanics: full suite passes, prompt assembly render-checked, repo-wide sweep for dangling old paths is clean, cron discovery covered by a path-resolution test. Judgment calls worth a second look: daily-maintenance under self-improvement (it also reconciles Linear blockers), slack-dynamic-messaging kept substrate, and the workspace-ops confirmation-first scope delta wording.

🤖 Generated with Claude Code

sam-dembrane and others added 4 commits July 3, 2026 11:57
…mmunication contracts

recipes are vertical slices across the stack: a hot-loaded recipe.md
manifest (connectors, triggers, communication contract, scope deltas)
plus recipe-owned skills, cataloged under their recipe. three recipes:
software-delivery, self-improvement, and workspace-ops (absorbs PR #126
— the notion connector stays in src/runtime/, the six notion skills get
a behaviour home instead of polluting the flat catalog).

connector code lives only in the runtime; identity and scope stay
outside recipes and cannot be overridden by them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…grams

stack, vertical-slice recipes, the activation truth table (which trigger
types are routed vs model-judged), blackboard composition, and the
journal/ledger attribution status. linked from the README architecture
section. mermaid renders on github natively; the pages site picks it up
once spashii/folder2website#4 lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
diagram labels carry one or two words; detail moves to prose and tables.
no punctuation soup inside nodes. README architecture section cut from
five paragraphs to three.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
the drawing is the main image; the redundant layers flowchart and the
meta line pointing at it go.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant