Skip to content

docs(skill): add "keep related scenarios in one tree" guidance#23

Merged
stepan-romankov merged 1 commit into
masterfrom
skill/group-related-scenarios
May 21, 2026
Merged

docs(skill): add "keep related scenarios in one tree" guidance#23
stepan-romankov merged 1 commit into
masterfrom
skill/group-related-scenarios

Conversation

@stepan-romankov
Copy link
Copy Markdown
Contributor

What

Adds a new sub-section to the samurai skill's "File layout" guidance: Keep related scenarios in one tree.

When one scenario mutates state another reads back (grant → read-shows-present vs. revoke → read-shows-absent), consolidate into a single RunWith tree instead of fragmenting one-file-per-action. Independent features still get their own files.

Why this wording

Chosen via an A/B eval — 5 skill configs (baseline + 4 candidate wordings) × 3 prompts (write-from-scratch, review-and-defragment, independent-features-boundary):

  • The section works: the discriminating prompt was review-defragment. Baseline (no section) read three single-leaf fixture files and removed samurai entirely; all four wordings instead recognized the shared mutating prefix and merged into one tree.
  • Behavior was tied across all four wordings — all consolidated correctly, none over-merged the independent features (boundary clause holds).
  • The decision-first phrasing won the tie-breaker: leanest (100 words vs. 130 for the prose candidate), opening with the exact question the reader must answer. Token cost across configs was within ~1.5% noise.

🤖 Generated with Claude Code

When one scenario mutates state another reads back (grant -> read-shows-present
vs. revoke -> read-shows-absent), consolidate into a single RunWith tree instead
of fragmenting one-file-per-action. Independent features still get their own files.

Wording chosen via A/B eval (5 configs x 3 prompts): all four candidate wordings
produced the correct one-tree consolidation and none over-merged independent
features; the decision-first phrasing won as the leanest (100 words) while opening
with the exact question the reader must answer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@stepan-romankov stepan-romankov merged commit e901ab8 into master May 21, 2026
2 checks passed
@stepan-romankov stepan-romankov deleted the skill/group-related-scenarios branch May 21, 2026 09:35
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