Skip to content

feat: add stackone-policies agent skill (ENG-3937) - #16

Open
kenngkz wants to merge 5 commits into
mainfrom
kenneth/policies-skill
Open

kenngkz wants to merge 5 commits into
mainfrom
kenneth/policies-skill

Conversation

@kenngkz

@kenngkz kenngkz commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds a stackone-policies skill that teaches an agent to read, write, test and retire runtime policies (Cedar rules) through the StackOne management tools.

  • What the skill does: it reads the connector's enabled actions first, lists each action it will stop by exact id, saves only after the user confirms, and tests before and after saving.
  • Scope of a rule: it blocks only what the user asked to stop and never matches by name glob.
  • Policy tools: stackone_get_policies, stackone_create_policy, stackone_update_policy, stackone_replace_policy_assignments, stackone_set_policy_enforcement_level, stackone_delete_policy, stackone_get_policy_labels and stackone_evaluate_policy. All names are checked at unified-cloud-api develop 7a7fd30.
  • Availability: the policy tools sit behind the flag feat_mcp_tool_policies and need a project admin. When the tools are absent, the skill sends the user to the dashboard.
  • Other changes: validate.yml now expects three skills in the plugin details check, and the README layout lists the new skill.
  • Follow-up: the stackone-agent gating (SKILL_REQUIRED_TOOLS, EXPOSED_SKILLS) is a separate change in that repo after release.
  • Ticket: ENG-3937

Testing

Agent runs used Haiku 5.5 on Bedrock against the mock MCP at stackone-agent develop 1ee934f8, 10 policy scenarios with 5 runs each.

Setup Score (of 50)
Without the skill 14
With the skill, round 1 (14ac0b7) 17
With the skill, round 2 (fdca132) 23
  • Cedar: every example is checked with checkText from @stackone/policy 0.24.3.
  • Still failing: 08 and sk-po-held-1 (which reads count as allowed lookups), 23 (account work, outside the skill), and sk-po-held-5 (a Jira priority given as a name and as an id).
  • Not benchmarked: 9dc4cb6 (CI count), caf58cd (README line) and 9d1e2c1, which drops an unverified claim that an admin can copy ids from the dashboard.
  • Not tested: a live run, since the staging MCP lists no policy tools for the test project on 2026-11-30. scripts/check-manifests.py passes.

Risks

  • Wrong rule: a rule that matches a value by name but not by id can leave a gap the user believes is closed.
  • Rollback: revert this PR. Nothing deploys from this repo on merge, and release-please only opens a release PR.

🤖 Generated with Claude Code


Summary by cubic

Adds a stackone-policies skill that teaches agents to read, write, test, and retire Cedar runtime policies through the StackOne management tools.

  • Reads the connector's enabled actions first, lists each action it will stop by exact id, waits for confirmation before every save, and dry-runs with stackone_evaluate_policy before and after saving.
  • Rules target exact tool ids and never match by name glob, so they stop only what was asked and don't miss or over-catch similarly named actions.
  • Policy tools sit behind the feat_mcp_tool_policies flag and need a project admin; when they're unavailable, the skill sends the user to the dashboard.
  • CI now expects three skills in the plugin details check, and the README lists the new skill.
  • Benchmarked 10 policy scenarios on Bedrock Haiku 5.5: scores rose from 14 (no skill) to 23 (with skill) of 50.

Written for commit 9d1e2c1. Summary will update on new commits.

View guided diff Turn on auto-fix

kenngkz and others added 5 commits November 27, 2026 16:28
Teaches reading, writing, testing and retiring runtime policies with the
management MCP's policy tools (ENG-4648). Cedar examples checked with
@stackone/policy checkText.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Writes-only requests list the write action ids so reads keep working;
  the connector-wide condition is only for stopping every action.
- Before writing, go through every enabled action on the connector's
  profiles, including generic update-any-record style actions.
- When asked about future actions, answer that the rule lists today's
  ids and offer to add new ones later; change no connector or profile
  settings to keep the rule complete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…m the dashboard

unified-cloud develop has no control that shows a group id, and shows a
user id only in platform logs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kenngkz
kenngkz requested a review from glebedel as a code owner November 30, 2026 14:30

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Requires human review: Adds a new agent skill that guides assistants to create, update, and retire Cedar runtime policies, plus README/CI updates; it expands authorization-sensitive agent behavior and the tool contract is asserted but not live-verified.

View guided diff | Turn on auto-fix | Re-trigger cubic

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