You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The policy documentation within this repository lacks a standardized structure, which negatively impacts readability, discoverability, and long-term maintainability.
Existing documents vary significantly in both section naming and organization.
Some policy documents adhere to a minimal structure (e.g., Overview, Features, Configuration, Examples, Use Cases), while others introduce additional or alternative sections such as How It Works, Configuring System Parameters in config.toml, Similarity Threshold Guidelines, Policy Behavior, etc. These sections are often semantically overlapping but inconsistently named or positioned.
Configuration-related content is particularly fragmented, appearing under disparate headings such as Parameters, User Parameters (API Definition), System Parameters (config.toml), and Policy Parameters, with no clear or consistent distinction between user-facing and system-level configuration.
Example content is presented under varying section titles, including API Definition Examples, Examples, and MCP Proxy Definition Examples.
Proposed Solution:
Adopt a standardized documentation structure for policy docs. Establishing and aligning on such a standard would improve documentation consistency, ease of navigation, and contributor onboarding. This should explicitly specify:
Required versus optional sections
Canonical section names
Recommended ordering of sections
Document Structure
Every policy doc follows this 9-section structure. Required sections must always be present; optional sections are included only when they add value.
#
Section
Required
Purpose
1
Overview
Yes
What the policy does and when to use it
2
Features
Yes
Bullet list of capabilities
3
Configuration
Yes
All parameters, nested structures, and concept-specific subsections
4
Reference Scenarios
Yes
List of typical scenarios and working configs, error response examples, before/after transformations
5
Internal Architecture
No
In-depth explanation of the internal behavior (only for non-trivial policies)
6
Limitations
No
Constraints, non-goals, what the policy doesn't do
7
Notes
No
Caveats, best practices, security tips, performance guidance, troubleshooting
8
Related Policies
No
Links to related policies
Why have optional sections:
Simple policies (e.g., add-headers, remove-headers) don’t require architectural or operational sections; optional sections keep documentation concise and focused while complex policies (e.g., semantic-cache, model-round-robin) might benefit from architectural, performance, and operational detail without imposing that overhead universally.
A fixed set of core sections guarantees baseline completeness, while optional sections allow depth only where it meaningfully adds value.
Template
Overview:
<!-- Explains what the policy does, what problem it solves. -->
Features:
- <!-- Feature 1 -->
- <!-- Feature 2 -->
- <!-- ... -->
Configuration:
- User Parameters (API Definition)
<!-- Use when params are set per-API/route -->
- System Parameters (Comes from config.toml)
<!-- Use when the policy has gateway-level configuration -->
Reference Scenarios:
<!-- Sample Use Case 1 --><!-- Sample Use Case 2 -->
Internal Architecture:
<!-- Optional. Include this section only if the internal operation requires explanation. -->
Limitations:
<!-- OPTIONAL. -->
- <!-- Limitation 1 -->
- <!-- Limitation 2 -->
Notes:
<!-- OPTIONAL. Consolidate best practices, security tips, performance guidance, troubleshooting here. -->
- <!-- Note 1 -->
- <!-- Note 2 -->
Related Policies
<!-- OPTIONAL. -->
- [Related Policy Name](../related-policy/v0.1/docs/related.md)
documentationImprovements or additions to documentationArea/PoliciesIssues related to any policy, policy hub, policy engine etc
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem:
The policy documentation within this repository lacks a standardized structure, which negatively impacts readability, discoverability, and long-term maintainability.
Configuration-related content is particularly fragmented, appearing under disparate headings such as Parameters, User Parameters (API Definition), System Parameters (config.toml), and Policy Parameters, with no clear or consistent distinction between user-facing and system-level configuration.
Example content is presented under varying section titles, including API Definition Examples, Examples, and MCP Proxy Definition Examples.
Proposed Solution:
Adopt a standardized documentation structure for policy docs. Establishing and aligning on such a standard would improve documentation consistency, ease of navigation, and contributor onboarding. This should explicitly specify:
Document Structure
Every policy doc follows this 9-section structure. Required sections must always be present; optional sections are included only when they add value.
Why have optional sections:
Simple policies (e.g., add-headers, remove-headers) don’t require architectural or operational sections; optional sections keep documentation concise and focused while complex policies (e.g., semantic-cache, model-round-robin) might benefit from architectural, performance, and operational detail without imposing that overhead universally.
A fixed set of core sections guarantees baseline completeness, while optional sections allow depth only where it meaningfully adds value.
Template
Overview: <!-- Explains what the policy does, what problem it solves. --> Features: - <!-- Feature 1 --> - <!-- Feature 2 --> - <!-- ... --> Configuration: - User Parameters (API Definition) <!-- Use when params are set per-API/route --> - System Parameters (Comes from config.toml) <!-- Use when the policy has gateway-level configuration --> Reference Scenarios: <!-- Sample Use Case 1 --> <!-- Sample Use Case 2 --> Internal Architecture: <!-- Optional. Include this section only if the internal operation requires explanation. --> Limitations: <!-- OPTIONAL. --> - <!-- Limitation 1 --> - <!-- Limitation 2 --> Notes: <!-- OPTIONAL. Consolidate best practices, security tips, performance guidance, troubleshooting here. --> - <!-- Note 1 --> - <!-- Note 2 --> Related Policies <!-- OPTIONAL. --> - [Related Policy Name](../related-policy/v0.1/docs/related.md)Migration Path for Existing Docs
## How It Works## Internal Architecture## Use Cases## Examples## Error Handling/## Error Response## Examples## Request/Response Flow Examples## Examples## Policy Behavior## Notesor## Internal Architecture## Best Practices## Notes## Security Considerations## Notes## Performance Considerations## Notes## Troubleshooting## Notes## System Configuration Example## Configuration## JSONPath Support)## ConfigurationBeta Was this translation helpful? Give feedback.
All reactions