Skip to content

Create AGENTS.md, fix total-counter anchor bug, update README for repo rename, add score/roadmap#2

Merged
nitrocode merged 1 commit into
mainfrom
copilot/update-readme-and-create-agents-md
Apr 14, 2026
Merged

Create AGENTS.md, fix total-counter anchor bug, update README for repo rename, add score/roadmap#2
nitrocode merged 1 commit into
mainfrom
copilot/update-readme-and-create-agents-md

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Addresses three issues surfaced during repo review: stale URLs from the gametoken-deathclock rename, a logic bug in the live counter, and missing AI-agent context.

Bug fix — getCurrentTokens() anchor (script.js)

The total token counter was computing elapsed time from pageLoadTime instead of the BASE_DATE_ISO data anchor, so the counter always reset to BASE_TOKENS on every page load rather than reflecting true running totals.

// Before — always starts counting from zero at page load
const elapsed = (Date.now() - pageLoadTime) / 1000;

// After — counts from the calibrated data anchor
const baseDateTime = new Date(BASE_DATE_ISO).getTime();
const elapsed = (Date.now() - baseDateTime) / 1000;

BASE_DATE_ISO is now destructured from window.DeathClockCore alongside the other constants. pageLoadTime is retained for the session counter only.

README updates

  • Replaced all three occurrences of old repo name gametoken-deathclock (clone URL, cd command, GitHub Pages URL).
  • Added Repo Score & Roadmap section: scored 72/100 (C+) across code quality, tests, docs, CI/CD, a11y, security, bugs, and community files, with a prioritised improvement checklist.

New file — AGENTS.md

Provides AI coding agents with repo layout, architecture invariants (core/DOM split, dual-export pattern, escHtml requirement, counter anchor rule), key constants, test instructions, per-task change guides, and a prohibited-actions list.

…d add score/roadmap

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/2793fefa-41e1-4bd8-803f-2632f18cb5f6

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@nitrocode nitrocode marked this pull request as ready for review April 14, 2026 13:21
@nitrocode nitrocode merged commit f357c15 into main Apr 14, 2026
2 checks passed
Copilot AI added a commit that referenced this pull request Apr 27, 2026
nitrocode added a commit that referenced this pull request Apr 27, 2026
* feat: implement AI Guilt-O-Meter (Phase 3 PRD #2)

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/26d4dab7-c844-4225-b1f6-3530f6167a53

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* docs: add LEARNINGS entry for AI Guilt-O-Meter PR

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/26d4dab7-c844-4225-b1f6-3530f6167a53

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* fix: apply CodeRabbit auto-fixes

Fixed 2 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

---------

Signed-off-by: RB <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants