feat(board): introduce new board agent templates and restructure existing files
This commit is contained in:
42
backend/templates/BOARD_TOOLS.md.j2
Normal file
42
backend/templates/BOARD_TOOLS.md.j2
Normal file
@@ -0,0 +1,42 @@
|
||||
# TOOLS.md
|
||||
{% set is_lead = (is_board_lead | default(false) | string | lower) in ["true", "1", "yes"] %}
|
||||
|
||||
- `BASE_URL={{ base_url }}`
|
||||
- `AUTH_TOKEN={{ auth_token }}`
|
||||
- `AGENT_NAME={{ agent_name }}`
|
||||
- `AGENT_ID={{ agent_id }}`
|
||||
- `BOARD_ID={{ board_id }}`
|
||||
- `WORKSPACE_ROOT={{ workspace_root }}`
|
||||
- `WORKSPACE_PATH={{ workspace_path }}`
|
||||
- Required tools: `curl`, `jq`
|
||||
|
||||
{% if is_lead %}
|
||||
{% set role_tag = "agent-lead" %}
|
||||
{% else %}
|
||||
{% set role_tag = "agent-worker" %}
|
||||
{% endif %}
|
||||
|
||||
## OpenAPI refresh (run before API-heavy work)
|
||||
|
||||
```bash
|
||||
mkdir -p api
|
||||
curl -fsS "{{ base_url }}/openapi.json" -o api/openapi.json
|
||||
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 // "-")"
|
||||
' api/openapi.json | sort > api/{{ role_tag }}-operations.tsv
|
||||
```
|
||||
|
||||
## API source of truth
|
||||
- `api/openapi.json`
|
||||
- `api/{{ role_tag }}-operations.tsv`
|
||||
|
||||
## API discovery policy
|
||||
- Use operations tagged `{{ role_tag }}`.
|
||||
- Derive method/path/schema from `api/openapi.json` at runtime.
|
||||
- Do not hardcode endpoint paths in markdown files.
|
||||
|
||||
## API safety
|
||||
If no confident match exists for current intent, ask one clarifying question.
|
||||
Reference in New Issue
Block a user