Skip to content

Commit 3b91f5e

Browse files
committed
Update sidebar to include new 'Developers' documentation on using AI for mod development
1 parent 0120b34 commit 3b91f5e

File tree

2 files changed

+32
-28
lines changed

2 files changed

+32
-28
lines changed

docs/develop/using-ai.md renamed to docs/develop/using-ai-for-mod-development.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Using AI for Control Development
3-
sidebar_label: Using AI for Control Development
2+
title: Using AI for Mod Development
3+
sidebar_label: Using AI for Mod Development
44
---
55

6-
# Using AI for Control Development
6+
# Using AI for Mod Development
77

88
Creating new benchmarks, dashboards, and controls for Powerpipe mods with AI tools and IDEs works remarkably well. At Turbot, we develop these components frequently and use AI for almost every new implementation. The key is working within existing mod repositories - this gives AI tools access to established patterns and conventions to generate consistent, high-quality results.
99

10-
If you're looking to use AI to run Powerpipe controls rather than develop new ones, you can use the [Powerpipe MCP server](../run/mcp), which provides powerful tools for AI agents to inspect and run controls, benchmarks, and queries.
10+
If you're looking to use AI to run Powerpipe benchmarks, dashboards, and controls rather than develop new ones, you can use the [Powerpipe MCP server](../run/mcp), which provides powerful tools for AI agents to inspect and run controls, benchmarks, and queries.
1111

1212
## Getting Started
1313

@@ -22,17 +22,16 @@ While AI often works well with simple requests like "Create a control for [requi
2222

2323
### Create Control
2424

25-
First, create the new control using existing controls and docs as reference.
25+
First, create the complete control and its documentation, using existing controls and documentation as reference.
2626

2727
#### Prompt
2828

2929
```md
30-
Your goal is to create a new Powerpipe control for <service> <resource type> and <check condition>.
30+
Your goal is to create a new Powerpipe control for <resource type> to check for <condition>.
3131

3232
1. Review existing benchmarks and controls and their documentation in the mod to understand the established patterns, naming conventions, and query structure.
3333

3434
2. Create the control and add it to any benchmark with similar controls in it.
35-
3635
```
3736

3837
### Run Control
@@ -42,7 +41,7 @@ Next, verify your control is properly configured and can be executed without err
4241
#### Prompt
4342

4443
```md
45-
Your goal is to verify the <service> <resource type> control compiles and runs correctly.
44+
Your goal is to verify the <resource type> control compiles and runs correctly.
4645

4746
1. Check the Steampipe service status with `steampipe service status`. Start it with `steampipe service start` if not running, or restart it with `steampipe service restart` if already running.
4847

@@ -60,30 +59,35 @@ To test the control's functionality, you'll need resources to query. You can eit
6059

6160
#### Prompt
6261

63-
To test the control's functionality, you'll need resources that will trigger both passing and failing results.
64-
6562
```md
66-
Your goal is to create test resources for validation.
63+
Your goal is to create test resources for <resource_type> to check for <condition> to validate your Powerpipe control implementation.
6764

68-
1. Create resources using provider's CLI, Terraform, or API.
69-
- Use the most cost-effective configuration. If the estimated cost is high, e.g., $50, warn about the expense rather than proceeding.
65+
1. Create test resources with as many properties set as possible.
66+
- Use the provider's CLI if available, Terraform configuration if CLI isn't available, or API calls via shell script as a last resort.
67+
- Create any dependent resources needed.
68+
- Use the most cost-effective configuration. If the estimated cost is high, e.g., $50, warn about the expense rather than proceeding.
7069

7170
2. Verify that all resources were created successfully using the same tool or method used for creation.
7271
```
7372

7473
### Validate Results
7574

76-
Next, run the control to verify it correctly identifies the test resources.
75+
Next, run the control to verify it correctly identifies and evaluates resources.
7776

7877
#### Prompt
7978

8079
```md
81-
Your goal is to verify the control correctly identifies compliant and non-compliant resources.
80+
Your goal is to verify the control correctly evaluates the test resources.
81+
82+
Use the Powerpipe MCP server for running controls if available, otherwise use the `powerpipe` CLI commands directly.
83+
84+
1. Run the control against your test resources.
8285

83-
1. Run the control using the MCP server or `powerpipe control run <control_name>`.
86+
2. Verify the control returns the expected state for each resource.
8487

85-
2. Verify the control returns expected results.
88+
3. Confirm the control's reason field accurately describes the current state of the resource.
8689

90+
4. Share the validation results in raw Markdown format, including the full control output showing resource evaluation.
8791
```
8892

8993
### Cleanup Test Resources
@@ -93,9 +97,9 @@ After testing is completed, remove any resources created for testing.
9397
#### Prompt
9498

9599
```md
96-
Your goal is to remove all test resources created for this control.
100+
Your goal is to clean up all test resources created for <resource type> validation to avoid ongoing costs.
97101

98-
1. Delete all test resources using the same tool used to create them (CLI, Terraform, API).
102+
1. Delete all resources created for testing, including any dependent resources, using the same method that was used to create them.
99103

100-
2. Run the control again to verify no resources are returned.
104+
2. Verify that all resources were successfully deleted, using the same method that was used to delete them.
101105
```

docs/sidebar.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@
6565
"build/mod-dependencies"
6666
]
6767
},
68-
{
69-
"type": "category",
70-
"id": "develop",
71-
"label": "Developers",
72-
"items": [
73-
"develop/using-ai"
74-
]
75-
},
7668
{
7769
"type": "category",
7870
"id": "powerpipe-hcl",
@@ -103,6 +95,14 @@
10395
"powerpipe-hcl/with"
10496
]
10597
},
98+
{
99+
"type": "category",
100+
"id": "develop",
101+
"label": "Developers",
102+
"items": [
103+
"develop/using-ai-for-mod-development"
104+
]
105+
},
106106
{
107107
"type": "category",
108108
"id": "reference",

0 commit comments

Comments
 (0)