Spaces:
Running
Running
Commit Β·
94f9b26
1
Parent(s): 0b53109
Refine sync spec: in-repo skill, Teams webhook TBD, .claude/skills tracking
Browse files- Skill lives in-repo at .claude/skills/sync-nowai-leaderboard/ (versioned)
- .gitignore: ignore .claude/* but track .claude/skills/
- Notification: Teams incoming webhook (URL TBD), PushNotification fallback
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
.gitignore
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
.claude/
|
|
|
|
| 2 |
.env
|
| 3 |
*.png
|
| 4 |
.DS_Store
|
|
|
|
| 1 |
+
.claude/*
|
| 2 |
+
!.claude/skills/
|
| 3 |
.env
|
| 4 |
*.png
|
| 5 |
.DS_Store
|
docs/superpowers/specs/2026-06-02-leaderboard-sync-design.md
CHANGED
|
@@ -35,7 +35,7 @@ Two parts.
|
|
| 35 |
|
| 36 |
### Part B β Sync skill + schedule
|
| 37 |
|
| 38 |
-
- New skill `sync-nowai-leaderboard`
|
| 39 |
- `sync.mjs` Node script: fetch both raw upstream URLs β parse β transform to our schema β diff against committed `data/leaderboard.json`.
|
| 40 |
- On change: rewrite `data/leaderboard.json`, commit to `main`, push to `origin` (staging) only, notify.
|
| 41 |
- On no change: exit quietly.
|
|
@@ -97,7 +97,7 @@ Each board carries 5 rows (rank 1β5). Renderer tolerates fewer.
|
|
| 97 |
|
| 98 |
## Skill layout
|
| 99 |
|
| 100 |
-
`
|
| 101 |
- `SKILL.md` β when/how to run, decision rules, staging-only push guardrail.
|
| 102 |
- `sync.mjs` β fetch β parse β transform β diff. Flags:
|
| 103 |
- `--check` β dry-run: print diff, no writes.
|
|
@@ -121,7 +121,7 @@ Each board carries 5 rows (rank 1β5). Renderer tolerates fewer.
|
|
| 121 |
|
| 122 |
- Commit straight to `main`; push `origin` (staging) only. **Never `prod`.**
|
| 123 |
- Commit message: `Sync leaderboard: EOG <date>, EVA <date>` plus a one-line summary of rank/score changes.
|
| 124 |
-
- Notify via
|
| 125 |
|
| 126 |
## Testing
|
| 127 |
|
|
@@ -129,6 +129,15 @@ Each board carries 5 rows (rank 1β5). Renderer tolerates fewer.
|
|
| 129 |
- **Render test (Chrome DevTools MCP):** load page, assert exactly 5 rows per card, bars present, no console errors.
|
| 130 |
- **`--check` dry-run** doubles as the manual smoke test.
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
## Out of scope
|
| 133 |
|
| 134 |
- Auto-promotion to prod.
|
|
|
|
| 35 |
|
| 36 |
### Part B β Sync skill + schedule
|
| 37 |
|
| 38 |
+
- New skill `sync-nowai-leaderboard`, located **in the project repo** at `.claude/skills/sync-nowai-leaderboard/` (version-controlled alongside the data it syncs; auto-discovered by Claude Code in this repo). The `CronCreate` schedule itself lives in user-level Claude Code config, not the repo.
|
| 39 |
- `sync.mjs` Node script: fetch both raw upstream URLs β parse β transform to our schema β diff against committed `data/leaderboard.json`.
|
| 40 |
- On change: rewrite `data/leaderboard.json`, commit to `main`, push to `origin` (staging) only, notify.
|
| 41 |
- On no change: exit quietly.
|
|
|
|
| 97 |
|
| 98 |
## Skill layout
|
| 99 |
|
| 100 |
+
`.claude/skills/sync-nowai-leaderboard/` (in the project repo)
|
| 101 |
- `SKILL.md` β when/how to run, decision rules, staging-only push guardrail.
|
| 102 |
- `sync.mjs` β fetch β parse β transform β diff. Flags:
|
| 103 |
- `--check` β dry-run: print diff, no writes.
|
|
|
|
| 121 |
|
| 122 |
- Commit straight to `main`; push `origin` (staging) only. **Never `prod`.**
|
| 123 |
- Commit message: `Sync leaderboard: EOG <date>, EVA <date>` plus a one-line summary of rank/score changes.
|
| 124 |
+
- Notify via **Teams incoming webhook** (TBD β webhook URL not yet provisioned). Until provisioned, fall back to the scheduled-run summary / `PushNotification`. Message: "Leaderboard synced to staging, N changes. Review + promote to prod." Webhook URL stored as a secret (env var / not committed), never hardcoded.
|
| 125 |
|
| 126 |
## Testing
|
| 127 |
|
|
|
|
| 129 |
- **Render test (Chrome DevTools MCP):** load page, assert exactly 5 rows per card, bars present, no console errors.
|
| 130 |
- **`--check` dry-run** doubles as the manual smoke test.
|
| 131 |
|
| 132 |
+
## Repo tracking / deployment
|
| 133 |
+
|
| 134 |
+
- `.gitignore` ignores `.claude/*` but un-ignores `.claude/skills/` (`!.claude/skills/`), so the skill (`SKILL.md`, `sync.mjs`, fixtures) is version-controlled and travels with the repo, while personal `.claude/` config stays out.
|
| 135 |
+
- Consequence: skill files ride along to the HF Space on push. Harmless β the Space serves only the static site and ignores them.
|
| 136 |
+
|
| 137 |
+
## Open items / TBD
|
| 138 |
+
|
| 139 |
+
- **Teams webhook URL** β not yet provisioned. Notification falls back to scheduled-run summary / `PushNotification` until the webhook secret is available; then wire it in.
|
| 140 |
+
|
| 141 |
## Out of scope
|
| 142 |
|
| 143 |
- Auto-promotion to prod.
|