feat(docs): enhance BOARD_HEARTBEAT.md.j2 and BOARD_TOOLS.md.j2 with additional endpoint selection criteria
This commit is contained in:
@@ -86,6 +86,9 @@ Use OpenAPI for endpoint/payload details instead of static endpoint assumptions.
|
||||
curl -fsS "$BASE_URL/openapi.json" -o /tmp/openapi.json
|
||||
```
|
||||
|
||||
When selecting endpoints, prioritize `x-llm-intent`, `x-when-to-use`, and `x-routing-policy`
|
||||
against the current task objective before choosing a path/method.
|
||||
|
||||
{% if is_lead %}
|
||||
Lead-focused operation filter:
|
||||
|
||||
@@ -95,7 +98,7 @@ jq -r '
|
||||
| .value | to_entries[]
|
||||
| select((.value.tags // []) | index("agent-lead"))
|
||||
| ((.value.summary // "") | gsub("\\s+"; " ")) as $summary
|
||||
| "\(.key|ascii_upcase)\t\($path)\t\($summary)"
|
||||
| "\(.key|ascii_upcase)\t\($path)\t\(.value.operationId // "-")\t\(.value.\"x-llm-intent\" // "-")\t\(.value.\"x-when-to-use\" // [] | join(\" | \"))\t\(.value.\"x-routing-policy\" // [] | join(\" | \"))\t\($summary)"
|
||||
' /tmp/openapi.json | sort
|
||||
```
|
||||
{% else %}
|
||||
@@ -107,7 +110,7 @@ jq -r '
|
||||
| .value | to_entries[]
|
||||
| select((.value.tags // []) | index("agent-worker"))
|
||||
| ((.value.summary // "") | gsub("\\s+"; " ")) as $summary
|
||||
| "\(.key|ascii_upcase)\t\($path)\t\($summary)"
|
||||
| "\(.key|ascii_upcase)\t\($path)\t\(.value.operationId // "-")\t\(.value.\"x-llm-intent\" // "-")\t\(.value.\"x-when-to-use\" // [] | join(\" | \"))\t\(.value.\"x-routing-policy\" // [] | join(\" | \"))\t\($summary)"
|
||||
' /tmp/openapi.json | sort
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
@@ -25,16 +25,18 @@ jq -r '
|
||||
.paths | to_entries[] as $p
|
||||
| $p.value | to_entries[]
|
||||
| select((.value.tags // []) | index("{{ role_tag }}"))
|
||||
| "\(.key|ascii_upcase)\t\($p.key)\t\(.value.operationId // "-")"
|
||||
| "\(.key|ascii_upcase)\t\($p.key)\t\(.value.operationId // "-")\t\(.value.\"x-llm-intent\" // "-")\t\(.value.\"x-when-to-use\" // [] | join(\" | \") )\t\(.value.\"x-routing-policy\" // [] | join(\" | \"))"
|
||||
' api/openapi.json | sort > api/{{ role_tag }}-operations.tsv
|
||||
```
|
||||
|
||||
## API source of truth
|
||||
- `api/openapi.json`
|
||||
- `api/{{ role_tag }}-operations.tsv`
|
||||
- Columns: METHOD, PATH, OP_ID, X_LLM_INTENT, X_WHEN_TO_USE, X_ROUTING_POLICY
|
||||
|
||||
## API discovery policy
|
||||
- Use operations tagged `{{ role_tag }}`.
|
||||
- Prefer operations whose `x-llm-intent` and `x-when-to-use` match the current objective.
|
||||
- Derive method/path/schema from `api/openapi.json` at runtime.
|
||||
- Do not hardcode endpoint paths in markdown files.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user