Skip to content

docs(skill): allow a shared setup with read-only leaves - #27

Open
stepan-romankov wants to merge 1 commit into
masterfrom
skill/shared-setup
Open

stepan-romankov wants to merge 1 commit into
masterfrom
skill/shared-setup

Conversation

@stepan-romankov

Copy link
Copy Markdown
Contributor

Summary

The skill now allows a shared setup: a parent Test writes state, and 3 or more nested Tests read it back. Before, DO NOT rule 1 and detection step 3 rejected such trees, because their leaves do not write.

Changes in cmd/claude-setup/skill/SKILL.md:

  • "When to Use": a new paragraph after the USE list allows the shared-setup case. The ">= 3 leaf paths" rule still applies. The paragraph also says that this is not a reason to convert flat tests that share a setup helper, so the existing insertFixtures() false-positive example still holds.
  • DO NOT rule 1: renamed to "Read-only without a writing parent". It now covers only leaves that read state no parent Test wrote. Get → extract id → Get chains stay out.
  • "Detection protocol", item 3: look for a write in any Test, parent or sibling.
  • "Good For": adds the shared-setup case, so the header matches the rules.

Closes #26

Test plan

  • Only cmd/claude-setup/skill/SKILL.md changes, and only the lines above.
  • No other skill file (api.md, naming.md, pitfalls.md) restates the old read-only rule.

🤖 Generated with Claude Code

A parent Test that writes state, with >= 3 nested Tests that read it back, is now an allowed samurai use. DO NOT rule 1 and detection step 3 no longer reject it.

Closes #26
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.

Skill: allow a shared setup with read-only leaves

1 participant