---
name: academic-support
description: The Academic Support data source skill — which students carry a learning-risk category (out of work, stuck, wrong working grade, below MAP level, ignoring the test, too hard, too easy, unproductive time, not enough time) in which subject on which day, who owns the fix (system · investigate · guide), whether anyone is acting on the student, what campus DRIs are asked and what it costs in hours. Use it for any question about learning risk, DRI work or service coverage at campus, brand or whole-of-system level, read through the production read API. Not for ticket latency (edu-support), support agent-hours (ticket_support_effort) or the DRI work log's own meaning (alpha_dri_interventions).
---

# Academic Support — data source skill

You are reading the skill's own instructions. Everything you need to answer a question is in this folder and in the production read API;
you need no local database.

## Setup — once per machine

1. Credentials live in `~/.claude/academic-support-api.env`, never in this folder:
   ```
   ACADEMIC_SUPPORT_API_URL=<base URL of the read API, ending in /prod>
   ACADEMIC_SUPPORT_API_KEY=<the x-api-key issued to this person>
   ```
   or, for someone with TimeBack admin access, their TimeBack client ID and secret instead of the key (or only a TimeBack access token,
   which they refresh themselves):
   ```
   ACADEMIC_SUPPORT_API_URL=<base URL of the read API, ending in /prod>
   TIMEBACK_CLIENT_ID=<their TimeBack client ID>
   TIMEBACK_CLIENT_SECRET=<their TimeBack client secret>
   # or TIMEBACK_TOKEN=<a TimeBack access token>
   ```
   With the key, send `x-api-key: <key>`. With TimeBack credentials, read the same routes under `{URL}/timeback/…` and send
   `Authorization: Basic base64(client_id:client_secret)` (the API gets and refreshes the TimeBack token) or
   `Authorization: Bearer <token>` (401 once it expires: get a new one). The credentials need TimeBack admin access (403 otherwise).
   If the file is missing, ask the person for the values, write the file with mode 600, and continue.
2. Check the pack: `python3 datasource/pack_check.py --quiet` must end with `All pack checks passed.` (offline; needs only Python 3).
3. Check the wire: `GET {URL}/health` (no key) answers `{"status":"ok"}`; `GET {URL}/runs` with the key (or `{URL}/timeback/runs` with
   TimeBack credentials) lists every loaded ledger day with its
   `rules_version`, `reader_version` and `code_commit`.

## Verify the install

`python3 datasource/smoke.py` — reads the latest served day and recomputes its headline figures (at risk, every category's students, the
exclusive owner split) from the student walk; the last line must be `Smoke test passed. (N PASS)`. It proves the credentials work, the day names its
versions, and the wire's figures agree with the rules a reader applies. Run it after installing and whenever an answer looks wrong.

## Reading order

1. [skill.json](skill.json) — the front door: what this is good for, when to reach for it, how to reach the wire, how to give feedback.
2. [DICTIONARY.md](DICTIONARY.md) — the one dictionary. §§1–8 define every term in the business's words; §10 the ledger's columns; §10a the rules in the order that decides a row; §10b every figure on the page; §10c the read API as served (routes, parameters, shapes, errors, what is not served).
3. [ENABLEMENT.md](ENABLEMENT.md) — worked compositions. Composition 0 reads the ledger through the API; compositions 1–8 are the reference implementation's and run on its reference stores.
4. [BRAINLIFT.md](BRAINLIFT.md) — the opinion layer: what we believe about the data and why, with every dated ruling. Read it before disagreeing with a definition.

## How to answer

- Name the day and the versions you read (`/runs`: `as_of_date`, `rules_version`, `reader_version`). Two days are comparable only under the same rules version and reader.
- Take figures from `/summary?as_of=<day>&scope=<scope>`; check any figure by recounting it over `/students` (composition 0 shows how). Scopes: `all`, `b:<brand>`, `y:<modality>`, `m:<brand · modality>`, `c:<campus_id>`.
- A category is a fact about a student × subject × day; a state (graduated, not started) is not a problem. Owners: system · investigate · guide (§10a step 10). "No one working on the problem" = `help_status = 'nobody'`.
- Say which kind a number is: a category is computed by the rules; a help status is a record match; an ask is a model reading (§13); hours are a model.
- Never write a student's name into anything that leaves the person's machine; use ids. Names travel to keyed readers only (§10c).
- If the documents and the wire disagree, the wire is the fact and the document has a defect: report it (below).

## Giving feedback

File a report when the documents and the wire disagree, a figure cannot be reproduced from its rule, or a question this skill
should answer cannot be. Anyone can file, with no key; the tracker is public, and each report is fixed where the data is born.

```
FEEDBACK=https://4cnfu40x26.execute-api.us-east-1.amazonaws.com/prod/feedback
curl -s "$FEEDBACK?state=open"        # first: is it already reported? (the same title and body again within a day returns the first one, 200)
curl -s -X POST "$FEEDBACK" -H 'Content-Type: application/json' -d '{
  "title": "P2 [data] <the field or figure, and what is wrong with it>",
  "reporter": "<who or what is filing>",
  "kind": "report",
  "body": "From: <the question you were answering>\nProblem (dated evidence, counts or structure, never a person): <day, route, count, the rule it breaks>\nAsk: <the fix>\nAcceptance (a falsifiable test): <the query or recount that must pass>"
}'                                     # 201 {number, url}
curl -s "$FEEDBACK/<number>"          # the report, its state, and its resolution once closed
```

- `kind`: `report` (a defect) or `ask` (a question the skill should answer); title priority P0 (a wrong answer served now) ·
  P1 (a real defect, workable) · P2 (minor).
- `title`, `body` and `reporter` are required (400 when missing); limits: title 200 characters, body 65,536, reporter 200 (413 over).
- Evidence is a count, a field, a rule or a query. Never a student's name or an email address (such a report is refused, 422),
  and never a row that identifies a child: say what you found; do not paste student rows.
- The listing (`GET $FEEDBACK`, `?state=open|closed|all`) is how you see the loop: a closed report carries its resolution.

## Not in this pack

The production job's internal manual is not part of the pack, nor is the scheduled overnight processing that builds the reference ledger and pushes the Slack store; the skill reads the production API.
