Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .claude/skills/ezhuthachan/assets/narration/stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
LEAD = 0.25 # silence before the voice, from the start of the caption
GAP = 0.5 # silence after the voice, before the next caption may start
MAX_CUE = 84 # characters in one subtitle: two lines of about 42
PEAK_CAP = -1.5 # dB: a trimmed clip that peaks above this is turned down to it (check.py allows -1.0)
PLAN = json.load(open(os.path.join(HERE, "plan.json"), encoding="utf-8"))
FRAME = 1 / 30

Expand Down Expand Up @@ -96,6 +97,15 @@ def trimmed(slug, cue):
sr = "silenceremove=start_periods=1:start_threshold=-45dB:start_silence=0.03"
run(["ffmpeg", "-y", "-i", clip(slug, cue), "-af", f"{sr},areverse,{sr},areverse",
"-ar", "48000", "-ac", "1", dst])
# Some clips come from the service with peaks above check.py's limit: turn those down to PEAK_CAP.
log = subprocess.run(["ffmpeg", "-nostdin", "-i", dst, "-af", "volumedetect", "-f", "null", "-"],
capture_output=True, text=True).stderr
peak = float(re.search(r"max_volume: (-?[\d.]+) dB", log).group(1))
if peak > PEAK_CAP:
hot = dst + ".hot.wav"
os.replace(dst, hot)
run(["ffmpeg", "-y", "-i", hot, "-af", f"volume={PEAK_CAP - peak:.2f}dB", "-ar", "48000", "-ac", "1", dst])
os.remove(hot)
return dst


Expand Down
15 changes: 15 additions & 0 deletions .claude/skills/ezhuthachan/references/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ curl -s -m 15 -o /dev/null -w '%{http_code}\n' "<SNOWSTORM_DEPLOYMENT_URL>/metad

If it does not, record the other flows and come back to these later.

Several sessions often run stacks on the same machine at once. Before you start one, claim its ports and its Redis index, and check that no other session holds them:

```bash
ls "$EZ/locks" # ports-<backend>-<frontend>-redis-<n> files are other sessions' claims
nc -z 127.0.0.1 <backend port> || nc -z 127.0.0.1 <frontend port> && echo busy
redis-cli -n <index> dbsize # must be 0 for an index nobody uses
echo "$ID" > "$EZ/locks/ports-<backend>-<frontend>-redis-<n>"
```

On 26 November 2026 two sessions picked the same ports and Redis index within minutes; one stack's fixture load then failed with `ObjectLocked`, because Care takes a lock in Redis while it syncs roles. Keep the claim file while the stack runs.

Another session may be told to reuse your running stack instead of starting its own. It then creates its own users and records in your database, and they can show in your recordings. Note in `session.md` which sessions use your stack, and at wrap-up never stop a stack another session still uses: ask in that session, or leave it running and say so.

### One recording at a time per environment

Two sessions recording against the same database spoil each other's data. Take a lock before recording and release it after:
Expand Down Expand Up @@ -131,6 +144,8 @@ Name it `<flow-slug>.demo.ts`. Start from `example.demo.ts`.
- Each flow creates what it changes. Do not rely on what another recording left behind.
- Respect the data policy. Under "create allowed", name records so they are recognisably yours.
- Use invented people, the same small cast in every recording. If `$EZ/personas.md` exists, use it. If not, propose a few clearly fictional names that suit the deployment's region, get the user's agreement, and save them there.
- `$EZ/personas.md` is shared, and other sessions rewrite it. When you set up the cast, copy the names you use into `session.md`, and brief recorders from that copy, so one session's videos do not mix two casts.
- Care's fixtures leave the government organizations without a level type, so every area dropdown and every address row is labelled "State" or "Government". Before recording, set the type on the organizations your patients live in (in November 2026: the state `{"govt_org_type": "state", "govt_org_children_type": "district"}` and the district `{"govt_org_type": "district"}`, the values Care's own loader writes). Check the fixture facility's phone number too: a made-up number can belong to someone, so clear it.

**Keep it watchable.** Aim for under a minute per flow; split a longer flow into two pages. Assert only what you need in order to wait for the screen to settle.

Expand Down
2 changes: 2 additions & 0 deletions .claude/skills/ezhuthachan/references/narration.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ cd "$S/media/narration"
python3 make_plan.py --draft # script/<slug>.txt for each flow: one caption-only line per caption
```

The scripts read `../out/<slug>.mp4` and `.vtt`. When the recorders wrote to their own folders (`EZ_OUT=out/<slug>`), point them at a folder of links instead of moving the recordings: `mkdir rec && for s in <slugs>; do ln -s ../../out/$s/$s.mp4 ../../out/$s/$s.vtt rec/; done`, and set `SRC` to `rec` in the session's copies of `make_plan.py` and `stitch.py`. A re-recording is then picked up with no copying.

Write the script of each flow in `script/<slug>.txt`: extend each line with its context, as "What the voice says" describes, and keep one line per caption, in order. Send the scripts to the user before you make any speech: a changed line costs a new clip. Then make the plan:

```bash
Expand Down
4 changes: 4 additions & 0 deletions .claude/skills/ezhuthachan/references/research.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ Send one researcher to the backend and one to the frontend, in parallel. Give ea

A researcher's report is a lead until you have checked it. Open the cited lines for every permission, role and label it reports before the fact goes into `facts.md`. Spot-check the rest.

A small script that reads each fact's `Source` and checks that every line of its `Quote` appears at those lines in the checkout catches wrong line numbers and invented quotes in seconds; run it on every researcher's file before merging. Give each researcher its own range of fact numbers (E1-E499, E500-E999, ...) so parallel files never collide. Some tools refuse to let a subagent write a file whose name suggests a report of findings; ask researchers to return their suspected bugs as text, and write `report.md` yourself.

After the recordings, read each flow's API log against its path. In November 2026 the recordings of eleven patient flows turned up a dozen calls the static trace had missed (area pickers, a duplicate-phone check on the edit form, the profile's own load), three of which added rows to Permissions tables.

## Before you leave research

- Every fact in `facts.md` has a source you opened in this session, at the pinned commit.
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/ezhuthachan/references/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This skill differs from those files in three places, each on the team's instruct
- **Versions.** Those files say every version is identical and mirrored. Here a page goes only to the versions whose code has the module; see `publishing.md`.
- **Permissions.** The Permissions table covers the whole path to the action, as `permissions.md` describes, not only the final permission.

Where those files disagree with one another, follow the review checklist, because that is what the reviewer applies, and tell the user about the disagreement. One known case: the concept guide asks for permission slugs in backticks, while the checklist forbids slugs in concept and flow pages.
Where those files disagree with one another, follow the review checklist, because that is what the reviewer applies, and tell the user about the disagreement. One known case: the concept guide asks for permission slugs in backticks, while the checklist forbids slugs in concept and flow pages. Another: `care-flow-doc/SKILL.md` asks for a `# How to <action>` H1 in one place and a plain sentence-case H1 matching the slug in another. Every flow page on the 3.1 site (192 of 192 in November 2026) uses the plain one, `# Close an encounter`; follow the site.

## Two kinds of page

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading