RolebookDocs

Write roles

The rolebook-write-roles agent skill.

Writes and tests Rolebook roles and rules in the app’s policy file, including deny rules, conditions, and field restrictions, with table-driven tests that prove who can and cannot do each action. Use when the user asks to add or change a role, a permission, an action, a deny, a condition such as only the owner or only while not archived, a field that some roles cannot see, or tests for roles.

Skill name: rolebook-write-roles. Ask your agent for the task in your own words, or invoke the skill by name where your tool supports it.

Packages it needs

RequirementPackage and supported versions
Alwaysrolebook >=4.0.0 <5.0.0

The skill checks the installed versions against these ranges before it uses each part, and stops rather than up- or downgrading without your consent.

What it does

  1. Before you start
  2. Read the current policy
  3. Write the change
  4. Prove it with tests
  5. Show the user
  6. Check your work

Reference files

The skill loads these files from its references/ folder when a step needs them:

  • policy.md
  • security-rules.md
  • testing.md