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

KE
7h ago
+159-1

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.

SetupScore (of 50)
Without the skill14
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.