feat(docs): enhance BOARD_HEARTBEAT.md.j2 and BOARD_TOOLS.md.j2 with additional endpoint selection criteria

This commit is contained in:
Abhimanyu Saharan
2026-02-15 02:07:10 +05:30
parent 0e8c47abb8
commit 730d80e422
2 changed files with 8 additions and 3 deletions

View File

@@ -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 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 %} {% if is_lead %}
Lead-focused operation filter: Lead-focused operation filter:
@@ -95,7 +98,7 @@ jq -r '
| .value | to_entries[] | .value | to_entries[]
| select((.value.tags // []) | index("agent-lead")) | select((.value.tags // []) | index("agent-lead"))
| ((.value.summary // "") | gsub("\\s+"; " ")) as $summary | ((.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 ' /tmp/openapi.json | sort
``` ```
{% else %} {% else %}
@@ -107,7 +110,7 @@ jq -r '
| .value | to_entries[] | .value | to_entries[]
| select((.value.tags // []) | index("agent-worker")) | select((.value.tags // []) | index("agent-worker"))
| ((.value.summary // "") | gsub("\\s+"; " ")) as $summary | ((.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 ' /tmp/openapi.json | sort
``` ```
{% endif %} {% endif %}

View File

@@ -25,16 +25,18 @@ jq -r '
.paths | to_entries[] as $p .paths | to_entries[] as $p
| $p.value | to_entries[] | $p.value | to_entries[]
| select((.value.tags // []) | index("{{ role_tag }}")) | 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/openapi.json | sort > api/{{ role_tag }}-operations.tsv
``` ```
## API source of truth ## API source of truth
- `api/openapi.json` - `api/openapi.json`
- `api/{{ role_tag }}-operations.tsv` - `api/{{ role_tag }}-operations.tsv`
- Columns: METHOD, PATH, OP_ID, X_LLM_INTENT, X_WHEN_TO_USE, X_ROUTING_POLICY
## API discovery policy ## API discovery policy
- Use operations tagged `{{ role_tag }}`. - 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. - Derive method/path/schema from `api/openapi.json` at runtime.
- Do not hardcode endpoint paths in markdown files. - Do not hardcode endpoint paths in markdown files.