Skip to content

[Command] AI Policy Creation #69

@gemanor

Description

@gemanor

This command allows developers to create a full policy schema using AI prompts. The command generates a whole Permit terraform template from a natural language prompt and then runs the permit env template apply to apply the policy to the active environment.

Implementation Details

  • The command is permit policy create ai
  • Prompt can be promotable (input) or as an argument (--prompt)
  • After the prompt runs and the TF is generated, the CLI should show a human-readable output of the created policy.
  • A --dry-run flag will print the terraform code to the console instead of creating it in Permit
  • The system prompt and LLM work shouldn't be part of the command or run locally but run on a tiny server endpoint. The endpoint should be placed in the terraform_server template. The name should change to server
  • System prompt should have Permit's TF in its context to minimize errors and wrong syntax/model
  • The system prompt should support at least RBAC and ABAC, with a stretch goal to ReBAC with role derivation

💡 Before participating in the issue or offering a bounty, please make sure you carefully read the contribution guidelines. PRs that do not adhere to the guidelines will be closed with no further notice.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions