Skip to content

Rename methodology "recipe" to "Playbook" across code and docs - #2897

Merged
mstomar125 merged 2 commits into
mainfrom
issue-2851-rename-playbook
Sep 23, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-2851-rename-playbook

Conversation

@mstomar125

@mstomar125 mstomar125 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The methodology feature (#2777) named its central concept "recipe" — MethodologyRecipe, install_recipe, recipe_by_id, all_recipes, references/linear-recipe.md — a second word for something the codebase already names: NodeSpace's domain language is Play (one automation rule-set) and Playbook (an installable bundle, ADR-075's PlaybookNode). This renames the methodology "recipe" concept to Playbook consistently, so it reads correctly beside play/playbook/PlaybookEngine rather than introducing a second, unrelated word for the same layer.

  • packages/core/src/methodology/: MethodologyRecipe -> MethodologyPlaybook, install_recipe -> install_playbook, recipe_by_id -> playbook_by_id, all_recipes -> all_playbooks, InstallReport.recipe_id -> playbook_id (wire key recipeId -> playbookId), plus doc comments throughout. SchemaStep/FieldValueExtension/PlayStep are unchanged, per the issue's stated scope.
  • references/linear-recipe.md -> references/linear-playbook.md, its GeneratedRegion id, and gen_skill_md.rs's source_note/render function (packages/cli/examples/gen_skill_md.rs, plus the test pinning its output in packages/cli/tests/skill_md_generation.rs). SKILL.md's pointer follows. packages/agent/src/agent_catalog/context_assembly.rs's SKILL_LINEAR_RECIPE embed constant and its include_str!/staged-filename follow the file rename too — otherwise the PTY-session skill embed would point at a path that no longer exists. bun run skill:check confirms the generated content is byte-identical to what the renamed generator produces.
  • Daemon service, Tauri command layer, and the desktop-app TS/Svelte layer follow the InstallReport field rename end to end (recipeId -> playbookId) — verified with a full round trip through the_install_report_serializes_to_the_shape_clients_decode and the frontend test suite.
  • packages/proto/proto/node_service.proto: comments only — no field or message rename, wire contract unchanged, per the issue's explicit instruction.
  • packages/core/src/playbook/validation.rs: three comments referencing "the Linear recipe" now say "the Linear Playbook".
  • nodespace-docs/architecture/playbook-system.md gains a short "Playbook vs. Play" section distinguishing the two, since that distinction was previously only implicit in code (pushed directly to nodespace-docs main, per that repo's docs-only workflow).

Deliberately left untouched, per the issue's own scope:

No user-visible UI string changes — the Settings panel still reads "Work Tracking" and the wizard step "How do you track work?"; the recipeId/playbookId field only carries a data value ("linear") that was already displayed, not a change to what renders.

This unblocks #2570 (PlaybookNode bundle record) landing on a single, consistent naming rather than needing a second rename later.

Update after /pragmatic-code-review (see PR comments): reviewed as APPROVE with no critical/blocking findings. Addressed the one nitpick — playbook_by_id, every_playbook_has_a_unique_id, and play_ids_are_unique still used |r|/let r bindings left over from the pre-rename MethodologyRecipe type; renamed to |p|/let pb. No re-review needed (cosmetic-only, zero behavior change).

Test plan

  • cargo test -p nodespace-core methodology — 17 unit tests pass
  • cargo test -p nodespace-core --test methodology_linear_execution_test --test methodology_linear_install_test — 25 integration tests pass, including the wire-shape test (json["playbookId"])
  • bun run test -- methodology (frontend) — 17 tests pass (onboarding wizard + methodology-service)
  • bun run skill:check — generated references/linear-playbook.md matches its source, no drift
  • bun run quality:fix — eslint, tsc, svelte-check, design-tokens, cargo fmt, cargo clippy --all-targets -D warnings -D clippy::unused-async all clean across the full workspace, including nodespace-app
  • Full pre-push gate (test:all, cargo build --bin nodespaced, test:e2e, cargo test -p nodespace-app) — all green

Closes #2851

🤖 Generated with Claude Code

The methodology feature (#2777) named its central concept "recipe" —
MethodologyRecipe, install_recipe, recipe_by_id, all_recipes — a second
word for something the codebase already calls Playbook (an installable
bundle, distinct from a Play's single rule-set). Renamed consistently:

- packages/core/src/methodology/: MethodologyRecipe -> MethodologyPlaybook,
  install_recipe -> install_playbook, recipe_by_id -> playbook_by_id,
  all_recipes -> all_playbooks, InstallReport.recipe_id -> playbook_id
  (wire key recipeId -> playbookId), plus doc comments throughout.
  SchemaStep/FieldValueExtension/PlayStep are unchanged per scope.
- references/linear-recipe.md -> references/linear-playbook.md, its
  GeneratedRegion id, and gen_skill_md.rs's source_note/render fn;
  SKILL.md's pointer follows.
- Daemon, Tauri command layer, and the desktop-app TS/Svelte layer follow
  the InstallReport field rename end to end (recipeId -> playbookId).
- proto: comments only, no field/message rename — wire contract unchanged.
- packages/core/src/playbook/validation.rs: three comments referencing
  "the Linear recipe" now say "the Linear Playbook".

Deliberately left alone: the ADRs (#73/#74/#78/#79, descriptive prose
written before this feature existed), the GTM research files under
strategy/ (unrelated sense), and literal-cooking-recipe test fixtures in
packages/core/src/ops/skill_ops.rs, packages/agent/src/local_agent/agent_loop.rs
and packages/daemon/src/services/local_agent_service.rs (unrelated word
sense, not the methodology concept).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Clean, well-scoped mechanical rename. I checked out the PR's own worktree (.claude/worktrees/issue-2851-rename-playbook, commit 44f1f6ce, single commit) and verified every claim in the PR body and the issue's acceptance criteria against the actual repo state rather than the diff text alone — full-repo grep for leftover identifiers, all three claimed exclusions, the wire-shape triangle, and the entire test plan (Rust + frontend + skill:check + clippy/fmt). Everything checked out. This is a net positive with no blocking issues.

Findings

Critical Issues

None found.

Suggested Improvements

  • PR body's file list vs. actual diff: the summary's enumerated file list omits packages/agent/src/agent_catalog/context_assembly.rs, packages/cli/examples/gen_skill_md.rs, and packages/cli/tests/skill_md_generation.rs. All three are correctly and necessarily updated (the include_str!/GeneratedRegion machinery tracks the renamed linear-recipe.md → linear-playbook.md path, and would fail to compile / skill:check would fail otherwise), and I verified packages/agent/src/local_agent/ itself has zero diff — the ownership-boundary constraint holds. But a future reviewer skimming only the PR description could miss that packages/agent/ and packages/cli/ are touched at all; worth a one-line mention next time a rename has these generated-doc side effects.

Nitpicks

  • Nit: packages/core/src/methodology/mod.rs, playbook_by_id — the closure parameter is still named r (all_playbooks().into_iter().find(|r| r.id == id)), a leftover from when it abbreviated "recipe." Purely cosmetic; p would read slightly cleaner post-rename.

Verification performed

  • Completeness: grep -rIni "recipe" packages/ (excluding the three intentionally-untouched fixture files) → zero hits. Clean rename, no aliasing, no deprecated re-exports (matches CLAUDE.md's no-backward-compatibility rule).

  • Scoped exclusions: packages/core/src/ops/skill_ops.rs, packages/agent/src/local_agent/agent_loop.rs, packages/daemon/src/services/local_agent_service.rs — zero diff, still contain their original literal cooking-recipe test strings. ADRs (Phase 2.1: Implement BacklinkService Foundation #73/Phase 2.2: Rich Link Decorations and Context System #74/Phase 1.3: Migrate Core Logic Components from nodespace-core-logic #78/Epic: Text Editor Architecture Enhancement #79) and strategy/ — zero diff.

  • packages/agent/src/local_agent/ ownership lane: zero diff, confirmed via git diff origin/main...HEAD --stat -- packages/agent/src/local_agent/. The lone packages/agent/ change is agent_catalog/context_assembly.rs (8 lines, outside local_agent/), required by the file rename.

  • Wire-shape consistency: InstallReport.playbook_id/playbookId verified consistent across the three independently-declared types (packages/core/src/methodology/mod.rs, packages/desktop-app/src-tauri/src/commands/methodology.rs, packages/desktop-app/src/lib/services/methodology-service.ts) by actually running the tests that pin the JSON shape, not just reading the diff.

  • Proto: every changed line in node_service.proto is a // comment; no field or message renamed.

  • SchemaStep/FieldValueExtension/PlayStep: type definitions unchanged (only surrounding doc-comment prose touched).

  • Naming collision check: MethodologyPlaybook/install_playbook/playbook_by_id/all_playbooks vs. the pre-existing playbook::PlaybookEngine/PlaybookLifecycleManager — no file imports raw types from both modules in a way that would collide; names read distinctly (Methodology-prefixed vs. bare Playbook*).

  • nodespace-docs: confirmed commit 902ce89 ("Document the Playbook vs. Play distinction in playbook-system.md") is live on origin/main, with the exact "Playbook vs. Play" section the issue's acceptance criteria call for.

  • Test suite, actually run (not just trusted from the PR body):

    • cargo test -p nodespace-core methodology → 17 passed
    • cargo test -p nodespace-core --test methodology_linear_execution_test --test methodology_linear_install_test → 8 + 17 = 25 passed
    • Tauri commands::methodology tests → 1 passed (install_report_deserializes_the_shape_core_emits)
    • bun run test -- methodology (frontend) → 7 + 10 = 17 passed
    • bun run skill:check → "Skill content is up to date."
    • cargo fmt --check → clean
    • cargo clippy -p nodespace-core -p nodespace-daemon -p nodespace-agent -p nodespace-cli --all-targets -- -D warnings, and the same in packages/desktop-app/src-tauri → clean

    All counts match the PR body's test-plan claims exactly.

  • No new/weakened test assertions: every changed test string literal exercises the same behavior under the new name (spot-checked several, e.g. json["playbookId"] == "linear", "camelCase, not playbook_id", which is the same assertion the old test made about recipeId/recipe_id, just renamed).

Recommendation: APPROVE

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

…ions

playbook_by_id, every_playbook_has_a_unique_id, and play_ids_are_unique
still used |r|/let r bindings left over from when the type was named
MethodologyRecipe. Renamed to |p|/let pb to match the Playbook rename
throughout, per pragmatic-code-review's nitpick on PR #2897.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Address-review summary

Per /pragmatic-code-review's findings on this PR (posted above, verdict APPROVE, no critical/important issues):

Addressed:

  • 🟢 Nitpick — playbook_by_id, every_playbook_has_a_unique_id, and play_ids_are_unique in packages/core/src/methodology/{mod,linear}.rs still used |r|/let r bindings left over from when the type was MethodologyRecipe. Renamed to |p|/let pb for consistency with the rest of the rename. Verified: cargo test -p nodespace-core methodology (17 passed), cargo fmt --all + cargo clippy --all-targets -- -D warnings -D clippy::unused-async clean across the whole workspace.

Skipped:

  • The suggestion that the PR description undersold its own footprint (omitted context_assembly.rs, gen_skill_md.rs, skill_md_generation.rs from the summary) isn't a code change — updated the PR description directly instead of a commit.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: The only code change was a cosmetic local-variable/closure-parameter rename inside two test-adjacent functions (|r|/let r -> |p|/let pb) — zero behavior change, zero new logic, zero risk surface. Full test suite re-run green, cargo fmt/clippy clean. The PR description update is documentation-only.

The PR is ready for merge (pending final approval).

@mstomar125
mstomar125 merged commit ab05d1f into main Sep 23, 2026
@mstomar125
mstomar125 deleted the issue-2851-rename-playbook branch September 23, 2026 08:56
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.

Rename methodology "recipe" to "Playbook" across code and docs

1 participant