Skip to content

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

Merged
kenngkz merged 5 commits into
mainfrom
kenneth/policies-skill
Dec 2, 2026
Merged

kenngkz merged 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, 10 policy scenarios with 5 runs each. Rounds 1 and 2 ran against the mock MCP at stackone-agent develop 1ee934f8. Round 3 reran both setups against develop b77fac92, whose mock matches staging's /mcp from 30 November.

Setup Mock Score (of 50)
Without the skill 1ee934f8 14
With the skill, round 1 (14ac0b7) 1ee934f8 17
With the skill, round 2 (fdca132) 1ee934f8 23
Without the skill b77fac92 8
With the skill, round 3 (9d1e2c1) b77fac92 22
  • 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).
  • Round 3 changes: 9d1e2c1 drops an unverified claim that an admin can copy ids from the dashboard. Per-scenario moves between rounds 2 and 3 trace to run-to-run variance, not to the mock or that change.
  • Not tested: a live run. On 2026-12-01 staging lists the policy tools, but this session's connection token lacks the policies.read scope, so stackone_get_policies is refused. 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

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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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 <noreply@anthropic.com>
@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

@kenngkz
kenngkz merged commit 54258ee into main Dec 2, 2026
8 checks passed
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