Update History

How to write and register a session summary at the end of a working session.

Summary

At the end of every working session, determine the correct day entry, create or update it, keep the history index and nav data in sync, then confirm with the user before committing and pushing everything to main. Always ask before acting — never assume the date and never run git commands without explicit confirmation.

Steps

Step 1 — Determine the date

Check whether a day entry already exists for today (i.e. workspace/history/YYYY/MM-Month/DD-Day/index.html for the current calendar date).

If no entry exists for today: ask the user which day to use. A session may have started on the previous day, so do not assume today is correct. Present the options clearly and wait for an answer before continuing. Example prompt:

There is no entry for today (Monday, 6 July 2026) yet.
Should I create one for today, or update an existing day?

If an entry already exists for today: skip this question — you will be updating that entry.

Step 2 — Create or update the day entry

Creating a new entry:

Create the file at the path matching the chosen date:

workspace/history/YYYY/MM-Month/DD-Day/index.html

Use workspace/_assets_/styles.css and nav.css. The relative path from a day entry is:

../../../../_assets_/styles.css
../../../../_assets_/nav.css

Set NAV_ROOT to '../../../../' for day entries. Cover: what was built, key decisions made, and any structural changes to the project.

Updating an existing entry:

If the session produced enough new distinct changes, append new cards to the "What we built" section and add decisions and structural changes as needed. If the changes are minor (small fixes, wording tweaks, no new features), adjust the existing content in place rather than appending.

Step 3 — Update the history index

Open workspace/history/index.html.

New day: add a new card at the top of the list with a relative link — always include index.html explicitly:

<div class="card">
  <h3><a href="2026/07-July/06-Monday/index.html">Monday, 6 July 2026</a></h3>
  <p>One-line summary of the session.</p>
</div>

Existing day: update the one-line summary in the existing card.

Step 4 — Update nav-data.js (new day only)

Skip this step if you are updating an existing day entry.

Open workspace/_assets_/nav-data.js and add the new entry to the History children array at the top of the list (most recent first):

{ title: 'Monday, 6 July 2026', path: 'history/2026/07-July/06-Monday/index.html' },

Step 5 — Confirm then commit and push

Before running any git command, present a confirmation prompt to the user. State exactly what day is being recorded, what the commit message will be, and where it will be pushed. Wait for the user to approve.

Example prompt:

I would update Monday (06.07.26), commit everything as
"history: file tree rename/delete, locale generator rewrite, workspace nav system"
and push to main. Shall I proceed?

The commit message should be a useful one-liner that summarises the session. Only after the user confirms, run:

git add .
git commit -m "MESSAGE"
git push

If the push fails (e.g. remote has diverged), stop and report the error to the user. Do not attempt to resolve it automatically.