ai-gains 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/package.json +1 -1
- package/src/dashboard.html +4 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Track the time you save using AI in your development workflow. AI Gains automati
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
7
7
|
1. **Hooks** record each Claude Code session — start time, author, end time
|
|
8
|
-
2. **A skill**
|
|
8
|
+
2. **A skill** reminds you to log achievements at natural stopping points; run `/ai-gains` whenever you want to capture what was done and estimate how long it would have taken without AI
|
|
9
9
|
3. **A dashboard** visualises sessions, time saved, and speedup across your project
|
|
10
10
|
|
|
11
11
|
## Setup
|
|
@@ -32,17 +32,15 @@ To use a different port:
|
|
|
32
32
|
PORT=4000 npx ai-gains
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
## Logging
|
|
35
|
+
## Logging achievements
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
After completing a meaningful piece of work — a feature, a bug fix, a refactor — run:
|
|
38
38
|
|
|
39
39
|
```
|
|
40
40
|
/ai-gains
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Claude will reflect on
|
|
44
|
-
|
|
45
|
-
You can also run `/ai-gains` mid-session to log a checkpoint.
|
|
43
|
+
Claude will reflect on what was done, estimate how long it would have taken a human, and write the achievement to the session log. Run it as many times as you like within a session to capture checkpoints, or once at the end to log everything in one go. The hooks handle start and end time automatically — `/ai-gains` is purely for recording what was accomplished.
|
|
46
44
|
|
|
47
45
|
## Dashboard features
|
|
48
46
|
|
|
@@ -74,7 +72,7 @@ Each session file (`.ai-gains/<session-id>.json`) contains:
|
|
|
74
72
|
|
|
75
73
|
## Committing session logs
|
|
76
74
|
|
|
77
|
-
Add `.ai-gains/` to your repository to share gains across your team. Each file is named
|
|
75
|
+
Add `.ai-gains/` to your repository to share gains across your team. Each file is named `<timestamp>_<session-id>.json` so files sort chronologically and concurrent sessions never conflict.
|
|
78
76
|
|
|
79
77
|
## Requirements
|
|
80
78
|
|
package/package.json
CHANGED
package/src/dashboard.html
CHANGED
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
const branchPill = s.branch ? `<span class="pill branch">⎇ ${esc(s.branch)}</span>` : '';
|
|
704
704
|
|
|
705
705
|
return `
|
|
706
|
-
<div class="session-card" onclick="showSession('${esc(s.uuid)}')">
|
|
706
|
+
<div class="session-card" onclick="showSession('${esc(s.uuid || s.session_id)}')">
|
|
707
707
|
<div class="session-icon">⚡</div>
|
|
708
708
|
<div class="session-body">
|
|
709
709
|
<div class="session-top">
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
// ── Session detail ──────────────────────────────────────────────────────────
|
|
726
726
|
|
|
727
727
|
function showSession(uuid) {
|
|
728
|
-
const s = sessions.find(x => x.uuid === uuid);
|
|
728
|
+
const s = sessions.find(x => (x.uuid || x.session_id) === uuid);
|
|
729
729
|
if (!s) return;
|
|
730
730
|
const sp = speedup(s);
|
|
731
731
|
const ht = humanTime(s);
|
|
@@ -750,7 +750,7 @@
|
|
|
750
750
|
const authorStat = s.author ? `
|
|
751
751
|
<div class="detail-stat">
|
|
752
752
|
<div class="detail-stat-label">Author</div>
|
|
753
|
-
<div class="detail-stat-value" style="font-size:13px;font-weight:500;color:var(--muted)">${esc(s.author)}</div>
|
|
753
|
+
<div class="detail-stat-value" style="font-size:13px;font-weight:500;color:var(--muted);word-break:break-all;overflow-wrap:anywhere">${esc(s.author)}</div>
|
|
754
754
|
</div>` : '';
|
|
755
755
|
const branchStat = s.branch ? `
|
|
756
756
|
<div class="detail-stat">
|
|
@@ -761,7 +761,7 @@
|
|
|
761
761
|
|
|
762
762
|
document.getElementById('detail-content').innerHTML = `
|
|
763
763
|
<div class="detail-title">${esc(fmtDate(s.start_time))}</div>
|
|
764
|
-
<div class="detail-uuid">${esc(s.uuid)}</div>
|
|
764
|
+
<div class="detail-uuid">${esc(s.uuid || s.session_id)}</div>
|
|
765
765
|
|
|
766
766
|
<div class="detail-stats">
|
|
767
767
|
<div class="detail-stat">
|