feat(recipes): introduce the recipe layer — behaviour bundles with communication contracts#136
Open
spashii wants to merge 4 commits into
Open
feat(recipes): introduce the recipe layer — behaviour bundles with communication contracts#136spashii wants to merge 4 commits into
spashii wants to merge 4 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: arecipe.mdmanifest declaring connectors, triggers, a communication contract, and optional scope deltas — plus the skills that behaviour owns. Three recipes exist as of this PR:notion.pystays insrc/runtime/unchangedSubstrate skills (slack-dynamic-messaging, slack-files, exa-search, caveman-mode, _template) stay in
src/skills/.Runtime changes (Tier 3, deliberately minimal):
prompts.py: assembler hot-loads recipe manifests after capabilities and catalogs each recipe's skills under its section; substrate catalog unchangeddaemon.py: cron discovery walkssrc/recipes/*/skills/*/skill.mdtoo, and the SCHEDULED SKILL template now names the discovered path instead of assumingsrc/skills/(the PR refactor(skills): migrate to nested layout + lift skill-creator #40 glob lesson, applied ahead of time)config.py: optionalNOTION_API_KEY(from feat(notion): integrate notion client runtime, capability, and core skills #126)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.mdmanifests = 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.pyfiles 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