- This file is the working guide for coding agents operating in this repository.
- Keep changes minimal, readable, and consistent with the current no-build static app setup.
- Prefer improving existing patterns over introducing new frameworks or tooling.
- App type: single-page static web app.
- Main runtime file:
index.html(contains HTML, CSS, and Vue logic). - Static assets:
assets/(dark.svg,light.svg,favicon.svg). - Dependency loading: Vue is loaded from CDN (
vue.global.prod.js) inindex.html. - Package/tooling manifests: none found (
package.json,pyproject.toml,go.mod, etc. are absent). - Existing AGENTS/assistant docs are minimal placeholders; this file is the primary actionable guide.
- There is no configured build step.
- There is no configured linter or formatter command.
- There is no configured automated test runner.
python3 -m http.server 4173- Then open
http://localhost:4173. - This is the safest default workflow for development and manual validation.
- None.
- Do not invent a build pipeline unless explicitly requested.
- None.
- If style cleanup is needed, follow the conventions in this file manually.
- None.
- Automated tests are not currently part of this repository.
- Not available right now because no test framework or test files are configured.
- If a test framework is introduced later, document exact single-test commands here immediately.
- Start local server with
python3 -m http.server 4173. - Verify theme toggle works and persists after refresh.
- Verify event name editing (click name, edit, blur/Enter to confirm).
- Verify date picker opens and selected date displays correctly.
- Verify timer input validation for hours/minutes/seconds bounds.
- Verify Start button disabled when total time is zero.
- Verify timer start, pause, resume, and reset states.
- Verify completion modal appears when countdown reaches zero.
- Verify keyboard behavior:
Escapecloses modal, focus remains usable. - Verify layout on mobile widths (<= 520px and <= 360px).
- Keep the project lightweight: prefer a single static page unless a split is clearly justified.
- Keep state logic inside Vue Composition API
setup()unless refactoring is requested. - Maintain clear sectioning in HTML/CSS/JS (template blocks, style sections, logic sections).
- Current codebase uses no ES module imports; Vue is consumed via global
Vuefrom CDN. - For CDN scripts, pin exact versions and include
integrity+crossoriginwhen possible. - Avoid adding new third-party dependencies for small tasks that can be solved with native APIs.
- If modularization is requested, prefer native ESM with explicit relative paths.
- Use
constby default; useletonly when reassignment is required. - Use
ref,computed,watch,nextTick,onMounted,onUnmountedpatterns consistently. - Keep reactive values in
camelCaseand return all template-used bindings fromsetup(). - Prefer small, focused functions (
startTimer,pauseTimer,clampMinutes, etc.). - Use guard clauses for invalid state/inputs to keep logic linear.
- Keep timer state values explicit (
idle,running,paused) and avoid hidden transitions. - Preserve semicolons and double-quoted strings to match existing code style.
- Keep trailing commas in multiline arrays/objects/function calls.
- Use semantic structure (
main,header,section,footer) as currently implemented. - Keep indentation at 2 spaces.
- Keep attributes readable; split long tags across lines similar to existing markup.
- Preserve accessibility attributes (
aria-*,role,aria-live,aria-atomic) when editing. - Keep interactive elements keyboard accessible (
buttonover clickablediv).
- Keep styles in the existing
<style>block unless a file split is explicitly requested. - Use CSS custom properties for theming (
--bg-primary,--text-secondary, etc.). - Preserve theme scoping under
[data-theme="dark"]and[data-theme="light"]. - Keep class names in kebab-case.
- Keep transitions subtle and purposeful; do not add gratuitous animation.
- Preserve current responsive breakpoints and extend them carefully.
- Variables/functions:
camelCase. - Booleans: prefix with
is,has, or explicit state adjectives (hoursInvalid). - Computed display values: descriptive prefixes like
display*,formatted*,total*. - Event handlers: verb-led names (
onHoursInput,openDatePicker,confirmName). - CSS classes:
kebab-case.
- Codebase is plain JavaScript (no TypeScript).
- For non-trivial new data shapes, add lightweight JSDoc typedefs if helpful.
- Normalize user input at boundaries (parse, validate, clamp).
- Avoid implicit coercion for user-provided values.
- Use graceful fallbacks for browser APIs (existing
showPicker()+click()fallback is a model). - Use
try/catchonly where runtime failure is expected and recoverable. - Do not silently ignore failures that affect UX; fail soft with a safe fallback.
- Clean up side effects (
clearInterval, event listeners) in lifecycle teardown.
- Preserve live-region announcements for timer state changes.
- Ensure keyboard-only operation remains functional after any UI change.
- Keep focus management for modal interactions.
- Maintain minimum touch target usability for controls.
- Keep text contrast aligned with current dark/light themes.
- Keep assets under
assets/and use descriptive filenames. - Prefer SVG assets for logos/icons where possible.
- Do not embed large binary blobs in source files.
.cursor/rules/: directory exists but is currently empty..cursorrules: not present..github/copilot-instructions.md: not present.- Therefore, there are no additional Cursor/Copilot rule files to merge at this time.
- Before major edits, read
index.htmlsections you will touch to preserve conventions. - Make focused changes; avoid broad reformatting unrelated to the task.
- Do not add infrastructure (bundlers, linters, test runners) unless explicitly requested.
- When introducing new commands/tooling, update this file in the same change.
- Prefer manual verification steps above when no automated tests exist.
- Confirm app still runs via local static server.
- Confirm no regressions in timer core flows.
- Confirm accessibility attributes/keyboard flows remain intact.
- Confirm dark and light themes both still work.
- Confirm documentation updates match actual repository capabilities.