Skip to content

Commit 1d3c016

Browse files
committed
chore: checkpoint automation and agent setup
1 parent 1ae483a commit 1d3c016

File tree

8 files changed

+182
-41
lines changed

8 files changed

+182
-41
lines changed

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
3+
{
4+
"name": "Node.js",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:4-24-trixie",
7+
"features": {
8+
"ghcr.io/devcontainers-extra/features/npm-package:1": {}
9+
},
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
"postCreateCommand": "bash .devcontainer/post-create.sh",
19+
20+
// Configure tool-specific properties.
21+
// "customizations": {},
22+
23+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24+
// "remoteUser": "root"
25+
}

.devcontainer/post-create.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if ! command -v jq >/dev/null 2>&1; then
5+
sudo apt-get update
6+
sudo apt-get install -y jq
7+
fi
8+
9+
if ! command -v nu >/dev/null 2>&1; then
10+
npm install -g nushell
11+
fi
12+
13+
npm ci

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Icon?
4242
# JetBrains IDEs
4343
.idea/
4444

45+
# Codex local workspace data
46+
.codex
47+
4548
# Build output
4649
/dist/
4750
/build/
@@ -60,4 +63,3 @@ coverage/
6063
# Misc
6164
*.sublime-workspace
6265
*.sublime-project
63-

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AGENTS
2+
3+
This repository uses this file as the entry point for future coding agents.
4+
5+
Before starting work:
6+
7+
1. Read [MEMORY.md](./MEMORY.md).
8+
2. Use that file as persistent project context across conversations.
9+
3. Keep `MEMORY.md` updated manually after any relevant change, decision, blocker, or workflow update.
10+
11+
Operational notes:
12+
13+
- Prefer minimal, reversible changes.
14+
- Validate with `npm test` for `themes.json` checks.
15+
- Use `npm run build` when touching generated site assets or source files under `dev/`.
16+
- When automation changes are introduced, document the intent and impact in `MEMORY.md`.
17+
- After implementing relevant changes or new functionality, create a commit and push it so work remains traceable and easy to roll back if needed.
18+
- Never perform a merge without explicit user authorization.
19+
- Never take actions that could affect the repository's production main branch without explicit user authorization.

MEMORY.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Persistent Memory
2+
3+
This file stores durable project context so future conversations can resume work with less re-discovery.
4+
5+
## Project Summary
6+
7+
- Repository: `FirefoxCSS-Store.github.io`
8+
- Purpose: static site that catalogs Firefox `userChrome.css` themes
9+
- Main data source: `themes.json`
10+
- Site source: `dev/`
11+
- Generated site output: `docs/`
12+
13+
## Tooling And Validation
14+
15+
- Package manager: `npm`
16+
- Build command: `npm run build`
17+
- Test command: `npm test`
18+
- Build system: `gulp`
19+
- Theme validation script: `tests/themes.check.js`
20+
- Theme metadata refresh script: `scripts/sort_themes.nu`
21+
- Dev container config: `.devcontainer/devcontainer.json`
22+
- Devcontainer bootstrap script: `.devcontainer/post-create.sh`
23+
- Devcontainer automation now runs `.devcontainer/post-create.sh` from `postCreateCommand` to ensure `jq`, `nu`, and project dependencies are installed after container creation/rebuild
24+
25+
## Automation Context
26+
27+
- Active working branch created for automation improvements: `improve-automation`
28+
- Existing GitHub Actions:
29+
- `.github/workflows/build.yml`
30+
- `.github/workflows/check-themes.yml`
31+
- Current workflows use older action versions and Node 14, which is a likely area for automation modernization
32+
- Build workflow is manual (`workflow_dispatch`) and commits generated `docs/` output back to the branch
33+
- PR validation currently runs only when `themes.json` changes
34+
35+
## Repo Notes
36+
37+
- Local `.codex` file is ignored in `.gitignore`
38+
- Build workflow currently commits generated files back to the branch after `npm run build`
39+
- Pull requests touching `themes.json` trigger validation via `npm test`
40+
- Site pages are generated from Pug in `dev/pug/`
41+
- Client behavior is implemented in `dev/js/main.js`
42+
- Styles are authored in SCSS under `dev/scss/`
43+
- Published site assets live in committed `docs/`
44+
- Local containerized development is configured to install Node, npm, `jq`, and Nushell
45+
- The devcontainer also runs `npm ci` automatically, so rebuilds recreate `node_modules` without manual setup
46+
47+
## Architecture Snapshot
48+
49+
- `themes.json` is the single catalog source used by the client and copied to `docs/themes.json` during build
50+
- The frontend is a mostly static site with a small client-side app that fetches `themes.json`, sorts, filters, and renders cards in the browser
51+
- Gulp handles Pug compilation, SCSS compilation, Babel transpilation, JS minification, image conversion/copy, and config file copying
52+
- Images from `images/` are emitted to `docs/assets/img/`; many local screenshots are converted to WebP
53+
- `scripts/sort_themes.nu` enriches theme entries with `pushed_at`, `stargazers_count`, and `avatar` using GitHub/GitLab/Codeberg APIs or git cloning fallback
54+
55+
## Known Technical Risks
56+
57+
- `dev/js/main.js` has a broken explicit lightbox close path: `removeLightbox` uses `getElementsById`, and the close button does not call the function correctly
58+
- Theme rendering is intentionally throttled with `444ms` per card, which scales poorly for a catalog of 100+ entries
59+
- Search/filter logic depends on client-side fetch and has no visible loading or error handling
60+
- Test coverage is narrow: `tests/themes.check.js` validates only basic key order/types and not richer schema or link/image integrity
61+
- `dev/config/robots.txt` currently disallows all crawlers, which matters if discoverability or SEO becomes a goal
62+
63+
## Working Agreement For Future Sessions
64+
65+
- Read this file before making assumptions about project state
66+
- Update this file manually when there are relevant decisions, branch changes, automation updates, or persistent blockers
67+
- Keep entries concise and durable; avoid transient noise
68+
- Future agents should create a commit and push after implementing relevant changes or new functionality so work stays traceable and reversible
69+
- Future agents must not merge without explicit user authorization
70+
- Future agents must not take actions that could affect the production main branch without explicit user authorization

0 commit comments

Comments
 (0)