-
Notifications
You must be signed in to change notification settings - Fork 284
Add AGENTS.md (comprehensive agent guide) #1490
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,91 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Repository Guidelines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Dos and Don’ts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Do export `LAZARUS_DIR` before running `make` or `lazbuild`; builds fail when Lazarus is not discoverable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeterDaveHello marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Do keep `.pas` and `.lfm` changes synchronized through Lazarus; update `lang/transgui.template` plus locale files together. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Do run only the CI steps relevant to touched files, mirroring the commands in `.travis.yml`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Don’t edit generated artifacts such as `Makefile` or commit outputs under `Release/`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Don’t modify third-party sources in `synapse/` or bundled libraries in `setup/win/openssl/` unless you are porting an upstream fix. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Project Structure and Module Organization | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transmission Remote GUI is a Lazarus/Free Pascal desktop client for Transmission’s RPC API. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `transgui.lpi`, `transgui.lpr`, and the root `.pas`/`.lfm` pairs implement the application UI and logic. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `lang/` contains key-value locale files; `transgui.template` is the canonical English resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `synapse/` bundles the Synapse networking library; treat it as vendor code. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `setup/` hosts packaging assets for Unix, macOS, and Windows builds (e.g., `unix/build.sh`, `macosx/create_app_new.sh`, `win/make_zipdist.bat`). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `snap/` stores `snapcraft.yaml` and the desktop entry used for Snap builds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `.github/workflows/` and `.travis.yml` define automation; `VERSION.txt`, `history.txt`, and the various README files document releases. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Build, Test, and Development Commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Install Lazarus (≥2.2.6) and FPC (≥3.2.2); most scripts assume `lazbuild` is on PATH or pointed to by `LAZARUS_DIR`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 'Core workflow' commands are Linux-specific (hard-coded /usr/lib/lazarus path and use of nproc) but are presented as generic. Please label them as Linux-only or provide macOS/Windows equivalents (e.g., avoid hard-coding LAZARUS_DIR, and replace -j$(nproc) with platform-appropriate alternatives or omit -j). Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### Core workflow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `cat VERSION.txt` shows the release number consumed by build scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `./setup/unix/debian-ubuntu-install_deps.sh` installs Debian/Ubuntu prerequisites (requires sudo and network access). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `LAZARUS_DIR=/usr/lib/lazarus/default/ lazbuild -B transgui.lpi` regenerates Lazarus resources before compiling. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) all` builds the desktop binary without packaging; expect `transgui` (or `transgui.exe`) in the repository root. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) zipdist` builds the Linux zip bundle into `Release/`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+30
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example path
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `./setup/unix/build.sh` produces compressed txz releases and temporarily rewrites `about.lfm`; the script restores the backup at the end. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `make clean` (with `LAZARUS_DIR` set) removes generated objects after a build. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+29
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 'Core workflow' commands are Linux-specific (hard-coded /usr/lib/lazarus path and use of nproc) but are presented as generic. Please label them as Linux-only or provide macOS/Windows equivalents (e.g., avoid hard-coding LAZARUS_DIR, and replace -j$(nproc) with platform-appropriate alternatives or omit -j).
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### Platform packaging | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `setup/win/make_zipdist.bat <lazarus_dir>` creates the Windows portable zip and optionally compresses `transgui.exe` with UPX. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `setup/win/make_setup.bat <lazarus_dir> "<Inno Setup dir>"` builds the Windows installer, honoring an optional `CODECERT` for signing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `setup/win/install_deps.bat` bootstraps Chocolatey-based dependencies (run in an elevated Windows shell). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prompt for AI agents
✅ Addressed in |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `setup/macosx/create_app_new.sh [/Library/Lazarus/]` emits a signed DMG and resets `about.lfm` afterward. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `snapcraft` (run from the repository root) packages the app using `snap/snapcraft.yaml`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### Static checks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:3.4.0 shfmt -sr -i 2 -l -w -ci .` formats shell scripts like the Travis job. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `find . -type f -name "*.sh" -print0 | xargs -0 shellcheck` runs ShellCheck on all shell scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- `npx markdown-link-check README.md` validates README links after documentation edits. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeterDaveHello marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
- `npx markdown-link-check README.md` validates README links after documentation edits. | |
- `find . -type f -name "*.md" | xargs -n 1 npx markdown-link-check` validates links in all Markdown files. |
✅ Addressed in 39562b2
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document is quite comprehensive and would benefit from a Table of Contents for easier navigation. You could extend the doctoc
command to generate a ToC for AGENTS.md
as well, similar to how it's done for README.md
.
- `doctoc --title "## Table of Contents" --github README.md` refreshes the README ToC; rerun until the diff is clean. | |
- `doctoc --title "## Table of Contents" --github README.md AGENTS.md` refreshes the ToC in Markdown files; rerun until the diff is clean. |
PeterDaveHello marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Copilot
AI
Sep 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This statement about "No automated Pascal tests are present" could become outdated if tests are added in the future. Consider rephrasing to "Currently no automated Pascal tests are present" or similar to indicate this is the current state.
- No automated Pascal tests are present; perform manual regression on features affected (torrent list, dialogs, localization paths). | |
- Currently, no automated Pascal tests are present; perform manual regression on features affected (torrent list, dialogs, localization paths). |
Copilot uses AI. Check for mistakes.
Uh oh!
There was an error while loading. Please reload this page.