MK / Daily-Log
Build state · main · automation repository HEAD bcf81dd · no published release
Engineering journal / system manual 01

Daily-Log.

A Markdown-first engineering journal. GitHub Actions creates a dated entry, collects repository activity, accepts issue-form notes, and rebuilds a compact portfolio index. The archive—not a database—is the record.

Runtime / current main Node.js 22 · GitHub Actions Public repository · no package dependencies
01 / Interactive pipeline simulation Local state only · no GitHub writes
Issue form inputSimulated issue close

The simulation follows the repository's template headings, issue field labels, archive path and activity markers. It does not call GitHub's write API.

01 · CreateWaiting
02 · CaptureWaiting
03 · ActivityWaiting
04 · IndexWaiting
Generated daily entrylogs/YYYY/MM/YYYY-MM-DD.md
Run the pipeline to create a dated Markdown entry.
The dashboard step generates the schema_version 1 payload.
No events yet.
02 / Source map

What runs where.

Directory and module names below are read from the current repository tree. This is the implemented system, not a proposed architecture.

Repository map / main

.github/ ├── ISSUE_TEMPLATE/ │ └── daily-log.yml └── workflows/ ├── daily.yml ├── issue-log.yml ├── weekly.yml └── validate.yml scripts/ ├── lib/ │ ├── github.mjs │ └── markdown.mjs ├── test/ │ └── markdown.test.mjs ├── collect-activity.mjs ├── create-daily-log.mjs ├── generate-dashboard.mjs ├── issue-to-log.mjs ├── migrate-legacy-logs.mjs └── weekly-summary.mjs logs/YYYY/MM/ daily archive weekly/YYYY-WXX.md weekly rollups template.md entry template latest.json portfolio payload README.md generated dashboard

Runtime responsibilities

github.mjsAuthenticated GitHub REST wrapper; Contents API reads/writes; recursive Git tree; issue retrieval. Uses GH_ACTIVITY_TOKEN for external activity reads when set.
markdown.mjsReplaces a Markdown heading section and removes duplicate headings before writing issue answers.
create-daily-log.mjsUses UTC date, checks target path, counts archived entries, fills template.md.
collect-activity.mjsQueries commits, merged PRs and releases for the last 24 hours; preserves old activity block if all repos fail.
generate-dashboard.mjsReads latest 10 entries; calculates total and streak; rewrites README dashboard and schema v1 latest.json.
migrate-legacy-logs.mjsCopies root-level YYYY-MM-DD Markdown files into the archive, then deletes the source only after the destination write succeeds; conflicts are left untouched.
weekly-summary.mjsFinds current Monday–Sunday UTC window and assembles its daily entries into an ISO-week file.

latest.json / schema_version 1

FieldTypeSource / meaning
generated_atISO timestampTime the dashboard generator ran.
total_logsIntegerCount of distinct dates found under the dated archive path.
current_streakIntegerConsecutive UTC dates, starting today or yesterday, found in the archive.
latest_entryObject or nullNewest dated entry. Null when no archive entries exist.
latest_entry.date, path, urlStringsArchive date, repository-relative Markdown path and canonical GitHub blob URL.
latest_entry.highlightStringFirst non-empty item under Shipped / What I Built / Highlight, limited to 180 characters; otherwise a default label.
latest_entry.tagsString arrayUp to four hashtag tokens extracted from the Markdown.
INPUT / 01Schedule or issue

UTC cron creates an entry; a closed Daily log: issue submits the four text fields.

TRANSFORM / 02Markdown + GitHub API

Template substitution or section replacement writes to logs/YYYY/MM/.

ENRICH / 03Activity + rollup

REST reads collect recent commits, merged PRs and releases; weekly job concatenates daily files.

OUTPUT / 04Portfolio index

README dashboard and latest.json expose the archive's current state.

03 / Execution model

Three paths through Actions.

All dates are UTC. Scheduled workflows can also be run manually where workflow_dispatch is configured.

WorkflowTriggerActual stepsPermissions
Daily log automation
daily.yml
Every day, 00:05 UTC
Manual dispatch
Checkout → Node 22 → migrate legacy root logs → create today's entry → collect activity → rebuild dashboard.contents: write
issues: read
Save daily log issue
issue-log.yml
Issue closed; title begins Daily log:Checkout → Node 22 → parse issue body and update dated entry → rebuild dashboard.contents: write
issues: read
Weekly engineering review
weekly.yml
Sunday, 23:55 UTC
Manual dispatch
Checkout → Node 22 → gather entries from the current Monday–Sunday UTC window → write weekly/YYYY-WXX.md.contents: write
Validate automation scripts
validate.yml
Relevant PRs; pushes to mainNode 22 syntax checks for scripts/**/*.mjs → Node built-in test runner for scripts/test/*.test.mjs.contents: read

Configuration / repository Actions settings

Required by scripts

The shared GitHub client throws at startup unless both variables are present.

GITHUB_TOKEN=...
GITHUB_REPOSITORY=owner/repository

Workflows provide these from secrets.GITHUB_TOKEN and github.repository. They are not committed to the repository.

Automatic cross-repository discovery

GH_ACTIVITY_TOKEN=read-only-token

Add this as an Actions secret: a fine-grained token with read-only Contents, Pull requests, and Metadata access to the repositories to scan. The collector discovers accessible repositories automatically. GH_ACTIVITY_REPOS is optional for extra explicit repositories. Only repositories with at least one commit in the last 24 hours are logged; quiet repositories are skipped. Writes always use GITHUB_TOKEN.

Local invocation / Node.js 22

These are the scripts called by the workflows. They use GitHub's API to read and commit repository files; they are not local-file-only commands.

export GITHUB_TOKEN="ghp_…" export GITHUB_REPOSITORY="owner/repository" node scripts/migrate-legacy-logs.mjs node scripts/create-daily-log.mjs node scripts/collect-activity.mjs node scripts/generate-dashboard.mjs ISSUE_NUMBER=123 node scripts/issue-to-log.mjs node scripts/weekly-summary.mjs node --test scripts/test/*.test.mjs

Use a token with repository contents write access (and issues read access for issue capture). Configure GH_ACTIVITY_REPOS and optional GH_ACTIVITY_TOKEN for external activity reads. The workflows inject the required variables automatically.

There is no package.json, dependency install, local CLI wrapper, database, server process, or separate backend in the current tree. The scripts are Node.js ES modules that use built-in fetch, Buffer and the Node test runner.
04 / Engineering constraints

What it does—and does not.

Constraints visible in source, workflow definitions and repository contents as inspected for this build.

GitHub is the storage layer

Daily and weekly files, README and JSON are committed through the GitHub Contents API. There is no database or local persistent store.

UTC defines the calendar

Daily paths, issue fallback dates, activity windows, streaks and weekly periods are calculated in UTC.

Activity is a 24-hour snapshot

Commits, merged PRs and releases are read from up to 100 returned items per endpoint. It is not a complete analytics/event stream.

Public release state is empty

No GitHub release or binary asset is published at the time this manual was built. A version download cannot be offered yet.

Validation is deliberately small

The current suite has eight Node built-in tests: five Markdown section tests and three manual-document tests (including inline JavaScript parsing). It does not run integration tests against GitHub APIs.

GitHub Actions is the execution host

Workflows use Ubuntu runners and Node.js 22. No Windows, Android, macOS, or self-hosted runtime is defined.

Issue form is a GitHub interface

Capture uses the GitHub Issue Forms schema. The workflow runs when a matching issue is closed—not on draft or every edit.

Dashboard writes are sequential API calls

README and latest.json are separate Contents API writes. The repository does not implement a transaction spanning both files.

05 / Live GitHub wire

Repository, release, commit.

Owner and repository are detected from the GitHub Pages hostname and project path (or github.com path). Public REST API only; no token is embedded here.

Repository
Detecting repository…
Waiting for GitHub REST API.
Latest published release
Checking releases…
The /releases/latest endpoint is queried at page load.
Latest commit
Checking commit…
API status
—
Unauthenticated GitHub REST requests are subject to public API rate limits.

Detecting repository from window.location…