Skip to content

Enhance generation rules documentation and examples#807

Open
stewartshea wants to merge 1 commit into
mainfrom
discovery/custom-tool-builder-slxs
Open

Enhance generation rules documentation and examples#807
stewartshea wants to merge 1 commit into
mainfrom
discovery/custom-tool-builder-slxs

Conversation

@stewartshea

@stewartshea stewartshea commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
  • Updated generation-rules-guide.md to clarify platform specifications and resource type matching, including the addition of runwhen as a supported platform.
  • Improved examples in README.md and generation-rules/README.md to reflect new structures and naming conventions for SLXs.
  • Refactored generation rule examples to utilize the new matchRules syntax and clarified the use of resourceTypes.
  • Enhanced documentation for indexed resources, including updates to the Azure resource catalog and the overall structure of indexed resource references.
  • Added new examples demonstrating multi-resource contexts and improved clarity on related resource handling in SLXs.

This update aims to provide clearer guidance for authors creating generation rules and improve the overall usability of the documentation.


Note

Low Risk
Documentation and generated markdown only; the new GHA can push catalog commits to main but does not change runtime discovery or workspace-builder behavior.

Overview
Refreshes authoring docs so they match the current GenerationRules / spec.platform / matchRules / slxs / outputItems model instead of the legacy single-GenerationRule + jsonpath predicates + context pattern. Examples and generation-rules-guide.md now point authors at Workspace Explorer (localhost:8000/explorer/) and generated catalogs rather than filesystem resource dumps.

Adds machine-readable discovery catalogs (AWS, GCP, Kubernetes, RunWhen platform) plus narrative coverage for platform: runwhen. Catalogs are produced by scripts/*/dump_*_resource_catalog.py; a new publish-discovery-catalog workflow runs those dumpers on indexer/registry changes and auto-commits updated *-resource-catalog.md on non-fork pushes to main.

Adds optional publish plumbing: scripts/docs/sync_authoring_to_docs_site.py to sync this tree into the RunWhen docs site, and a thin .cursor/skills/author-generation-rules stub that defers to the bundled MCP skill in runwhen-platform-mcp.

Reviewed by Cursor Bugbot for commit 5ddaefb. Bugbot is set up for automated code reviews on this repo. Configure here.

- Updated `generation-rules-guide.md` to clarify platform specifications and resource type matching, including the addition of `runwhen` as a supported platform.
- Improved examples in `README.md` and `generation-rules/README.md` to reflect new structures and naming conventions for SLXs.
- Refactored generation rule examples to utilize the new `matchRules` syntax and clarified the use of `resourceTypes`.
- Enhanced documentation for indexed resources, including updates to the Azure resource catalog and the overall structure of indexed resource references.
- Added new examples demonstrating multi-resource contexts and improved clarity on related resource handling in SLXs.

This update aims to provide clearer guidance for authors creating generation rules and improve the overall usability of the documentation.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5ddaefb. Configure here.

- type: pattern
pattern: "prod"
properties: [tags]
mode: substring

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prod tag match too broad

Medium Severity

The updated VM example scopes on pattern: "prod" with properties: [tags] and substring mode, which matches any tag key or value containing prod, not specifically environment: prod as the narrative describes. VMs with unrelated tags can still generate disk-health SLXs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5ddaefb. Configure here.

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