<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sai Ram</title>
    <description>The latest articles on DEV Community by Sai Ram (@sai_ram_7b5680265c7ad5ea1).</description>
    <link>https://dev.to/sai_ram_7b5680265c7ad5ea1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4096782%2F338d7be1-c5b3-420a-bd9f-287db1428b46.png</url>
      <title>DEV Community: Sai Ram</title>
      <link>https://dev.to/sai_ram_7b5680265c7ad5ea1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sai_ram_7b5680265c7ad5ea1"/>
    <language>en</language>
    <item>
      <title>STEADY: your breathing moves the crosshair</title>
      <dc:creator>Sai Ram</dc:creator>
      <pubDate>Wed, 18 Nov 2026 06:04:56 +0000</pubDate>
      <link>https://dev.to/sai_ram_7b5680265c7ad5ea1/steady-your-breathing-moves-the-crosshair-24mk</link>
      <guid>https://dev.to/sai_ram_7b5680265c7ad5ea1/steady-your-breathing-moves-the-crosshair-24mk</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Your breathing moves the crosshair, the way it moves a rifle.&lt;/strong&gt; STEADY is a seated breath-timing trainer for rifle and pistol shooters. Your webcam reads your chest breathing trace through Presage SmartSpectra, and that trace physically offsets the crosshair: zero sway in your natural respiratory pause (the still point after a normal exhale), maximum sway at full inhale. Fire in the pause and you hit; fire mid-breath and you miss red.&lt;/p&gt;

&lt;p&gt;Shooters are coached to release the shot in the natural respiratory pause. Beginners can't see whether they do it; they only feel unsteady. Today that feedback needs a coach watching or a chest strap. A webcam is something every shooter already owns.&lt;/p&gt;

&lt;p&gt;A session is consent → 45 s calibration → a 60 s &lt;strong&gt;Guided&lt;/strong&gt; round (pause shaded green) → a 60 s &lt;strong&gt;No-HUD&lt;/strong&gt; round (no help) → a report with every shot placed on your breathing curve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffrmjm4zn3fztan9tism2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffrmjm4zn3fztan9tism2.png" alt="Guided round: the crosshair rides the breath; the green band is the pause (app screenshot, synthetic data)" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu0jk7r3vmmp8z7o1vuld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu0jk7r3vmmp8z7o1vuld.png" alt="My real chest trace from the SDK with the pauses STEADY detected (real recording)" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmrer3zcc9bi4avbz6u9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmrer3zcc9bi4avbz6u9.png" alt="Report: every shot on the breathing curve (app screenshot, synthetic data)" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/0zXycnYzffQ" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/sairammr/steady" rel="noopener noreferrer"&gt;https://github.com/sairammr/steady&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install
cp .env.example .env   &lt;span class="c"&gt;# add PRESAGE_API_KEY&lt;/span&gt;
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No key or camera? &lt;code&gt;npm run replay -- recordings/real-session-1.jsonl&lt;/code&gt; runs the whole detector and report on a bundled recording (a real 171 s session of mine: breathing trace, pulse, shots; numbers only, no video).&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Signals used:&lt;/strong&gt; chest breathing trace (&lt;code&gt;breathing.upperTrace&lt;/code&gt;, the core), breathing rate, pulse rate (calm/elevated vs your own baseline only), talking (&lt;code&gt;face.talking&lt;/code&gt;) and SDK validation status.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trace → sway.&lt;/strong&gt; Crosshair offset = &lt;code&gt;clamp((x − trough)/A, 0, 1) × maxOffset&lt;/code&gt;, mostly vertical, drawn about a quarter second behind the newest sample (≈ 250 ms in my session, shown on the HUD), interpolated, because delivery is jittery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trace → pause → score.&lt;/strong&gt; Pause opens after an exhale when the trace is flat for ≥ 300 ms in the bottom 35 % of the breath, closes when the inhale starts or after 5 s. Score = hit accuracy × 1.0 in the pause, × 0.3 mid-breath. Final scores are computed post-round over the final trace with the same function that colours shots live.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Talking / weak signal → grey.&lt;/strong&gt; Shots while talking (+ 2 s) or with an invalid signal are not scored.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Measured honesty&lt;/strong&gt; (method in the README):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delivery delay &lt;code&gt;D&lt;/code&gt; (arrival − sample timestamp, no human in the loop): &lt;strong&gt;105 ms&lt;/strong&gt; median, p95 261 ms (jitter above the fastest sample). The offset between the SDK sample clock and the wall clock differed between my two recordings (−413 ms, +109 ms), so STEADY measures it at calibration instead of assuming one.&lt;/li&gt;
&lt;li&gt;Timing offset &lt;code&gt;L&lt;/code&gt; from a paced guide (3 cycles, scheduled timestamps): &lt;strong&gt;not reliable yet&lt;/strong&gt;: 265 ± 265 ms from 2 usable cycles on my first recording, 0 on the second. STEADY does not depend on it.&lt;/li&gt;
&lt;li&gt;Metrics cadence median 33 ms (p90 44 ms), 1 sample per event (~27.5 Hz), revisions: none (0 repeated timestamps).&lt;/li&gt;
&lt;li&gt;Detector: tuned on one real recording (17 pauses found vs 2 before tuning), then run unchanged on a second real session: 11 pause windows in 171 s. No held-out agreement score yet; two recordings is too few to claim one.&lt;/li&gt;
&lt;li&gt;My results: first full session: 0 % of 22 scored shots in the pause with the HUD (I was firing as fast as targets appeared), &lt;strong&gt;33 % of 6 without it&lt;/strong&gt; once I slowed down. Honest, small, and the point: you can't feel this without feedback.&lt;/li&gt;
&lt;li&gt;Failure cases I saw: 9.5 % of samples invalid: &lt;code&gt;ChestNotVisible&lt;/code&gt; when I leaned in to aim, &lt;code&gt;FrameRateTooLow&lt;/code&gt; in dim light, &lt;code&gt;FaceNotForward&lt;/code&gt;. Early builds paused the round on each one; it now keeps running through short dropouts (1.5 s grace, pause only after 5 s) and greys out shots in weak moments instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Overall Human-Sensing Experience · Most Creative or Delightful Use · Best Thoughtful Real-World Use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consent first:&lt;/strong&gt; a consent screen runs before the camera opens: what is measured (chest breathing motion, breathing rate, pulse, talking, face presence), that processing is on-device, what is stored and what leaves the device. The camera starts only after "I agree"; a Camera off button is always visible; consent can be withdrawn in Settings. The copy asks you to be alone in frame, because the SDK tracks one face and the app cannot detect bystanders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stored (locally only):&lt;/strong&gt; session summaries and raw signal recordings (JSONL: breathing trace, breathing rate, pulse, talking/validity flags, timestamps, shots), used for replay and post-round scoring. &lt;strong&gt;Never stored:&lt;/strong&gt; video frames or images; the webcam picture is display only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared:&lt;/strong&gt; with nobody. No analytics, no crash reporting, no cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaves the device:&lt;/strong&gt; Presage SDK key verification, usage metering and model download (key + device/licence info). SDK telemetry is disabled (&lt;code&gt;enableTelemetry: false&lt;/code&gt;); the SDK forwards the flag to its main process (&lt;code&gt;js/main/index.js&lt;/code&gt;). I have not captured network traffic to prove it. See Presage's &lt;a href="https://smartspectra.presagetech.com/docs/telemetry-and-privacy" rel="noopener noreferrer"&gt;telemetry page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI use:&lt;/strong&gt; no AI or LLM service runs in the app; the coaching insight is rule-based. Presage's on-device models compute the signals. The code was written with Claude Code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not medical:&lt;/strong&gt; a training aid for breath timing; not a medical device; not for diagnosis. Pulse is only calm/elevated relative to your own session baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retention and deletion:&lt;/strong&gt; kept until you delete it. Settings → Delete all data removes every session summary and every raw recording.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Built with an agent
&lt;/h2&gt;

&lt;p&gt;Built with Claude Code: PRD, detector tuning on my real recordings, UI and this post's numbers all came out of agent sessions, with every number re-measured by &lt;code&gt;npm run replay&lt;/code&gt; on the bundled recording.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Seated desk practice only: the SDK needs a still, silent, front-facing subject in even light. Not for a real shooting stance.&lt;/li&gt;
&lt;li&gt;The sway is drawn about a quarter second behind the newest sample; the HUD says so.&lt;/li&gt;
&lt;li&gt;About 2.75 live minutes per session, so ≈ 18 sessions per free key.&lt;/li&gt;
&lt;li&gt;Tested on Apple Silicon only.&lt;/li&gt;
&lt;li&gt;Rifle/pistol natural-pause technique; archery's partial-exhale hold is not modelled.&lt;/li&gt;
&lt;li&gt;Detector thresholds were tuned on 2 of my own recordings; other people may need retuning.&lt;/li&gt;
&lt;li&gt;Real-shooter feedback: none yet.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>typescript</category>
      <category>presagechallenge</category>
      <category>electron</category>
      <category>devchallenge</category>
    </item>
  </channel>
</rss>
