rojects/workspace/actions/update-history/index.html

149 lines
5.7 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update History — Roject</title>
<link rel="stylesheet" href="../../_assets_/styles.css">
<link rel="stylesheet" href="../../_assets_/nav.css">
</head>
<body>
<div class="page">
<header>
<h1>Update History</h1>
<p class="subtitle">How to write and register a session summary at the end of a working session.</p>
</header>
<section>
<h2>Summary</h2>
<div class="card">
<p>
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.
</p>
</div>
</section>
<section>
<h2>Steps</h2>
<div class="card">
<h3>Step 1 — Determine the date</h3>
<p>
Check whether a day entry already exists for today
(i.e. <code>workspace/history/YYYY/MM-Month/DD-Day/index.html</code>
for the current calendar date).
</p>
<p style="margin-top:0.75rem">
<strong>If no entry exists for today:</strong> 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:
</p>
<pre><code>There is no entry for today (Monday, 6 July 2026) yet.
Should I create one for today, or update an existing day?</code></pre>
<p style="margin-top:0.75rem">
<strong>If an entry already exists for today:</strong> skip this question —
you will be updating that entry.
</p>
</div>
<div class="card">
<h3>Step 2 — Create or update the day entry</h3>
<p><strong>Creating a new entry:</strong></p>
<p>
Create the file at the path matching the chosen date:
</p>
<pre><code>workspace/history/YYYY/MM-Month/DD-Day/index.html</code></pre>
<p style="margin-top:0.75rem">
Use <code>workspace/_assets_/styles.css</code> and <code>nav.css</code>.
The relative path from a day entry is:
</p>
<pre><code>../../../../_assets_/styles.css
../../../../_assets_/nav.css</code></pre>
<p style="margin-top:0.75rem">
Set <code>NAV_ROOT</code> to <code>'../../../../'</code> for day entries.
Cover: what was built, key decisions made, and any structural changes to the project.
</p>
<p style="margin-top:1rem"><strong>Updating an existing entry:</strong></p>
<p>
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.
</p>
</div>
<div class="card">
<h3>Step 3 — Update the history index</h3>
<p>
Open <code>workspace/history/index.html</code>.
</p>
<p style="margin-top:0.75rem">
<strong>New day:</strong> add a new card at the top of the list with a
relative link — always include <code>index.html</code> explicitly:
</p>
<pre><code>&lt;div class="card"&gt;
&lt;h3&gt;&lt;a href="2026/07-July/06-Monday/index.html"&gt;Monday, 6 July 2026&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One-line summary of the session.&lt;/p&gt;
&lt;/div&gt;</code></pre>
<p style="margin-top:0.75rem">
<strong>Existing day:</strong> update the one-line summary in the existing card.
</p>
</div>
<div class="card">
<h3>Step 4 — Update nav-data.js (new day only)</h3>
<p>
Skip this step if you are updating an existing day entry.
</p>
<p style="margin-top:0.75rem">
Open <code>workspace/_assets_/nav-data.js</code> and add the new entry to the
History children array at the top of the list (most recent first):
</p>
<pre><code>{ title: 'Monday, 6 July 2026', path: 'history/2026/07-July/06-Monday/index.html' },</code></pre>
</div>
<div class="card">
<h3>Step 5 — Confirm then commit and push</h3>
<p>
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.
</p>
<p style="margin-top:0.75rem">Example prompt:</p>
<pre><code>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?</code></pre>
<p style="margin-top:0.75rem">
The commit message should be a useful one-liner that summarises the session.
Only after the user confirms, run:
</p>
<pre><code>git add .
git commit -m "MESSAGE"
git push</code></pre>
<p style="margin-top:0.75rem">
If the push fails (e.g. remote has diverged), stop and report the error to
the user. Do not attempt to resolve it automatically.
</p>
</div>
</section>
<footer>
Roject &mdash; update history
</footer>
</div>
<script>var NAV_ROOT = '../../';</script>
<script src="../../_assets_/nav-data.js"></script>
<script src="../../_assets_/nav.js"></script>
</body>
</html>