-
Notifications
You must be signed in to change notification settings - Fork 0
V0.1: Automated versioning with Reaper-native save #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Zesseth
wants to merge
16
commits into
master
Choose a base branch
from
V0.1_features
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2465b56
Initial plan
Copilot 9714c54
Add archiving UI and functionality
Copilot 7923418
Address code review feedback: clean up unused variables and improve f…
Copilot 943e7a0
(not tested) Enhance archiving functionality: improve version matchin…
Zesseth 65fb591
Versionin options native and custom.
Zesseth dc7d8c4
Use Main_SaveProjectEx flag 2 for atomic save-with-media-copy
Zesseth 988ff6e
Pass explicit project handle to Main_SaveProjectEx
Zesseth a09987e
Address Copilot review: fix archiving ops, conflict handling, and dro…
Zesseth e1fdeba
Remove macOS mentions, add Windows to Future section
Zesseth 367ba09
Publish CLAUDE.md for contributors using Claude Code
Zesseth d9b7474
Fix auto versioning: copy media with cp -r, save .rpp separately
Zesseth c25aefb
Try Main_SaveProjectEx flag 3 for versioning (flag 1 + flag 2)
Zesseth c673125
Add language requirement to CLAUDE.md: English only
Zesseth eb4104e
Fix archiving off-by-one and versioning cancel UX
Zesseth 784095e
Fix outdated docs: roadmap, version format, CLAUDE.md architecture
Zesseth bb1b7e0
Merge master into V0.1_features
Zesseth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # AGENTS.md | ||
|
|
||
| Guidance for AI coding agents (GitHub Copilot CLI and similar) working in this repository. | ||
|
|
||
| ## Project classification | ||
|
|
||
| **Henkilökohtainen projekti.** Sijaitsee polussa `C:\Repos\Omat\RASP`, ei Zuren työprojekti. Zuren default-käytäntöjä (Zure-group org, AI-development-defaults wiki, asiakas-NDA) ei sovelleta. | ||
|
|
||
| - GitHub-org: `Zesseth` (käyttäjän henkilökohtainen) | ||
| - Lisenssi: ks. `LICENSE` (public repo) | ||
| - Kieli: kaikki koodi, kommentit, commitit, issuet, PR:t ja dokumentaatio **englanniksi** (public repo). Tämä AGENTS.md on poikkeus — agent-ohjeet suomeksi. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| RASP (Reaper Archiving System Project) is a Lua ReaScript plugin for the Reaper DAW. It provides automatic project versioning with full media backup and local archiving. No build step — Lua is interpreted directly by Reaper. | ||
|
|
||
| **Installation**: Copy the `RASP/` folder to Reaper's `Scripts/` directory, then load `RASP.lua` via Reaper's Actions menu. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| RASP.lua # Entry point: loads modules, runs reaper.defer() main loop | ||
| modules/ | ||
| config.lua # Settings persistence via Reaper's ExtState API | ||
| gui.lua # Dockable UI using Reaper's gfx rendering API | ||
| versioning.lua # Version number parsing, next-version calculation, file copying | ||
| file_operations.lua # File/directory ops for Linux (cp, rm via os.execute) | ||
| archiving.lua # Find/move old versioned folders to archive destination | ||
| ``` | ||
|
|
||
| **Data flow**: `RASP.lua` polls GUI state each defer cycle → dispatches to versioning or archiving modules → those call `file_operations` for disk work → `config` is read/written at any point. | ||
|
|
||
| **Settings persistence**: All user settings are stored in Reaper's ExtState under section `"RASP"`. There are no config files on disk. | ||
|
|
||
| ## Key Design Patterns | ||
|
|
||
| - **Main loop**: Reaper plugins use `reaper.defer()` for a non-blocking event loop. The loop is in `RASP.lua` and re-registers itself each cycle. | ||
| - **File ops (Linux only)**: `file_operations.lua` provides a unified API using `cp -r` and `rm -rf` via `os.execute`. Windows is not supported — archiving requires shell commands unavailable on Windows. Always go through this module for file/directory operations. | ||
| - **Two versioning modes**: | ||
| - *Native*: Opens Reaper's built-in Save As dialog (user controls the path). | ||
| - *Auto*: Fully automated — calls `reaper.Main_SaveProjectEx(0, path, 3)` (flag 3 = flag 1 "create subdirectory" + flag 2 "copy all media") which saves the `.rpp`, copies all media into the new directory, and rewrites internal path references atomically. This is equivalent to Save As with "Copy all media into project directory" ticked. Do NOT replace this with manual file copying (`cp`) — that approach cannot rewrite `.rpp` internal references and will produce a broken project. | ||
| - **Safety**: Auto mode verifies the `.rpp` file exists after saving. Archiving never touches the currently open version. Destructive operations always show a confirmation dialog. | ||
| - **Version folder naming**: Projects are versioned by suffix on the folder name using a configurable prefix (default `_v`), digit count (default 3), and start number (default 1), e.g. `MyProject_v001/`. | ||
|
|
||
| ## Reaper API Conventions | ||
|
|
||
| - `reaper.*` — core Reaper API functions | ||
| - `gfx.*` — immediate-mode graphics for the UI (gui.lua) | ||
| - `reaper.GetExtState` / `reaper.SetExtState` — persistent key-value storage | ||
| - `reaper.ShowMessageBox` — confirmation dialogs | ||
| - `reaper.GetProjectPath` / `reaper.GetProjectName` — current open project info | ||
|
|
||
| ## Platform | ||
|
|
||
| - **Tuettu:** Linux (Debian), testattu Reaper v7.x:llä. Vaatii Reaper v6.0+. | ||
| - **Ei tuettu:** Windows — archiving käyttää `cp`/`rm` shell-komentoja joita ei ole Windowsissa. | ||
|
|
||
| ## Current Development State | ||
|
|
||
| - **`master`** — stable release. | ||
| - **`V0.1_features`** — active branch, PR #21. Toteuttaa sekä v0.1- että v0.2-roadmap-featuret (UI, auto-versioning, increment, archiving, native/auto-tila, conflict handling). Issue #29 toteaa featurejen olevan tiedostetusti sekaisin samassa branchissa — molemmat mergetään masteriin yhdessä v0.2:na. | ||
| - **`V0.3_features`** — Backblaze B2 cloud archiving, ei aloitettu. | ||
|
|
||
| ## Agent workflow säännöt | ||
|
|
||
| - **Git:** | ||
| - `git add` (staging) ok automaattisesti. | ||
| - `git commit` vasta käyttäjän eksplisiittisen vahvistuksen jälkeen — odota että käyttäjä on katsonut `git diff --staged`. | ||
| - `git push` vain eksplisiittisestä pyynnöstä. | ||
| - **Ei AI-tekijyysmerkintöjä** commit-viesteihin, PR-kuvauksiin tai tuotettuun sisältöön. Kiellettyjä: `Co-authored-by: Copilot`, `Generated with ...`, `🤖 Generated with ...` ja vastaavat. Jos commit-pohja ehdottaa niitä, poista ennen commitia. | ||
| - **Destruktiiviset operaatiot** (poisto, force-push, hard reset remoteen menossa, salaisuuksien paljastaminen) vaativat aina eksplisiittisen luvan. | ||
| - **Konfliktit:** kun mergetään masteria, tarkista että roadmap ja dokumentaatio ovat linjassa toteutettujen featurejen kanssa. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.