From e65fb9ed66d8b5aeca06bcd74a215b3209a06405 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Wed, 1 Apr 2026 01:21:48 +0200 Subject: [PATCH] update --- .claude/commands/changelog.md | 33 +++++++++++++++++++++++++++++++++ CLAUDE.md | 12 ++++++++++-- changelog/2026-04-01.md | 20 ++++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .claude/commands/changelog.md create mode 100644 changelog/2026-04-01.md diff --git a/.claude/commands/changelog.md b/.claude/commands/changelog.md new file mode 100644 index 00000000..7b9a2104 --- /dev/null +++ b/.claude/commands/changelog.md @@ -0,0 +1,33 @@ +Generate or update the project changelog. + +Arguments (optional): $ARGUMENTS + +Instructions: +1. Parse arguments: first argument is optional date (YYYY-MM-DD), remaining text is semicolon-separated description of changes. + - If no date provided, use today's date. + - If no description provided, summarize changes from the current conversation or use "Aktualizacja projektu". +2. Detect changed files using `git status --porcelain`. +3. Read the existing changelog file `changelog/.md` if it exists. +4. Merge new entries with existing ones (deduplicate both "Co zrobiono" points and file list). +5. Write/update the file with this structure: + +``` +# YYYY-MM-DD + +## Co zrobiono + +- point 1 +- point 2 + +## Zmienione pliki + +- `path/to/file` +``` + +6. Show the user what was written. + +Rules: +- Never overwrite existing entries — only append and deduplicate. +- File list should include both git-detected changes AND files touched in the current conversation. +- Use Polish section headers as shown above. +- Keep descriptions concise but informative. diff --git a/CLAUDE.md b/CLAUDE.md index 36ec1367..75ca6020 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,8 +68,16 @@ When creating or modifying overrides, PrestaShop also needs to rebuild the class - PrestaShop hooks are the integration point — prefer hooks over direct core edits. - The `admin658c34/` directory is the custom admin panel path (security through obscurity). -## Custom Assistant Command +## Custom Assistant Commands -- If the user writes `zapisz-changelog`, create or update monthly changelog file `changelog/YYYY-MM-DD.md` (based on current date). +### `zapisz-changelog` +- Create or update daily changelog file `changelog/YYYY-MM-DD.md` (based on current date). - Add an entry for the current day with a concise summary of code changes made in the current session. - Include touched file paths and relevant line references where possible. + +### `$changelog` (slash command: `/changelog`) +- Registered as Claude Code command in `.claude/commands/changelog.md`. +- Usage: `$changelog [YYYY-MM-DD] [opis1;opis2;...]` +- Creates/updates `changelog/YYYY-MM-DD.md` with sections `## Co zrobiono` and `## Zmienione pliki`. +- Detects changed files via `git status --porcelain`, deduplicates entries. +- Shell scripts (globalne): `~/.claude/scripts/changelog.ps1` (PowerShell) i `~/.claude/scripts/changelog.cmd` (Windows wrapper). diff --git a/changelog/2026-04-01.md b/changelog/2026-04-01.md new file mode 100644 index 00000000..d1d2e0dc --- /dev/null +++ b/changelog/2026-04-01.md @@ -0,0 +1,20 @@ +# 2026-04-01 + +## Co zrobiono + +- Dodano komende changelog +- Utworzono scripts/changelog.ps1 i changelog.cmd +- Zarejestrowano komende w .claude/commands/ +- Dodano globalna komende changelog +- Utworzono ~/.claude/scripts/changelog.ps1 i changelog.cmd +- Zarejestrowano komende w .claude/commands/changelog.md + +## Zmienione pliki + +- `.claude/commands/` +- `.claude/commands/changelog.md` +- `changelog/2026-04-01.md` +- `CLAUDE.md` +- `scripts/` +- `scripts/changelog.cmd` +- `scripts/changelog.ps1`