From 116bc1ef0163b11df23b025b94e6a2e66668e42f Mon Sep 17 00:00:00 2001 From: reachableceo Date: Mon, 10 Aug 2026 09:53:42 -0500 Subject: [PATCH] refactor(docs): invoke redmine-cli via docker run, not bin/ wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite all Redmine CLI references to use raw docker run with --env-file ~/.creds/redmine.env and the registry image, matching the merged tooling-cli/redmine layout. Removes dependence on the deleted ~/daytoday/redmine workspace. Marks Q2 fully resolved. πŸ’˜ Generated with Crush Assisted-by: Crush:glm-5.2 --- AGENTS.md | 42 +++++++++++++++++++++++++----------------- questions-v1.md | 4 ++-- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ca2f0b8..fa0a886 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,7 @@ 1. **Set up the environment:** `bash scripts/setup-hooks.sh` (installs git hooks β€” idempotent). 2. **Read this file** (`AGENTS.md`) β€” project policy and domain knowledge. 3. **Read [questions-v1.md](questions-v1.md)** β€” open questions awaiting human input. -4. **Check Redmine** β€” `~/daytoday/redmine/bin/redmine list --assigned-to-me -p 55` for active work. +4. **Check Redmine** β€” `docker run --rm --env-file ~/.creds/redmine.env git.knownelement.com/reachableceo/redmine-cli:latest list --assigned-to-me -p 55` for active work. 5. **Check current state:** `git log --oneline -10`. 6. **Run rule audit:** `bash scripts/check-rules.sh --fast`. @@ -138,23 +138,30 @@ checklists, or TODOs in repo files. Use Redmine tickets instead. ### CLI access (read + write) -Tickets are managed via the `redmine` CLI wrapper in the `~/daytoday/redmine` -workspace (external to this repo). Full command reference, patterns, and -the subtask escape hatch live in `~/daytoday/redmine/AGENTS.md` β€” read it for -anything beyond the basics. +Tickets are managed via the `redmine-cli` container, invoked directly +with `docker run` (no wrapper script). Full command reference, patterns, and +the subtask escape hatch live in the CLI's own `AGENTS.md` +(`~/projects/KNEL-AIMiddleware/tooling-cli/redmine/AGENTS.md`) β€” read it +for anything beyond the basics. ```bash # Connection sanity check (run first in any session): -~/daytoday/redmine/bin/redmine whoami +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest whoami # Your queue (project 55): -~/daytoday/redmine/bin/redmine list --assigned-to-me -p 55 +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest list --assigned-to-me -p 55 # Show / create / update / close: -~/daytoday/redmine/bin/redmine show 367 -~/daytoday/redmine/bin/redmine create -p 55 -s "Subject" -d "desc" -~/daytoday/redmine/bin/redmine update 367 -n "Done: committed in abc123" --done-ratio 100 -~/daytoday/redmine/bin/redmine close 367 +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest show 367 +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest create -p 55 -s "Subject" -d "desc" +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest update 367 -n "Done: committed in abc123" --done-ratio 100 +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest close 367 ``` Key IDs: project **55** (`technicaloperations`), user **5** (`reachableceo`). @@ -162,10 +169,10 @@ Statuses: New(1), In Progress(2), Resolved(3,closed), Feedback(4), Closed(5), Rejected(6). New subtasks go to **Feedback (4)**. Tracker **3** = Support. **Gotcha:** `create` has no `--parent` flag β€” to make a subtask, use the `python-redmine` escape hatch inside the container (see -`~/daytoday/redmine/AGENTS.md`). Always `show` a ticket before updating it. +`tooling-cli/redmine/AGENTS.md`). Always `show` a ticket before updating it. -The `.env` holding `REDMINE_URL`/`REDMINE_API_KEY` lives (gitignored) at -`/home/reachableceo/projects/KNEL-AIMiddleware/redmine-cli/.env`. +Credentials (`REDMINE_URL`/`REDMINE_API_KEY`) live in the centralized store +at `~/.creds/redmine.env`. ## Documentation Workflow @@ -228,7 +235,7 @@ live in the centralized store at `~/.creds/discourse.env`. | [`scripts/setup-hooks.sh`](scripts/setup-hooks.sh) | Install git hooks (pre-commit, pre-push) | | [`tests/remote.sh`](tests/remote.sh) | **SSH chokepoint** β€” all Proxmox host + sandbox VM access routes here | | [`netinfra/dns-cluster-setup/remote-dns.sh`](netinfra/dns-cluster-setup/remote-dns.sh) | SSH chokepoint for DNS infra hosts (netinfra-01/02, tsrouter, netboot) | -| `~/daytoday/redmine/bin/redmine` | Redmine CLI wrapper (ticket read/write via Docker container) | +| `redmine-cli` container | Redmine CLI (ticket read/write via `docker run`; see `tooling-cli/redmine/`) | | `discourse-cli` container | Discourse CLI (wiki topic read/write via `docker run`; see `tooling-cli/discourse/`) | | `~/daytoday/dns/bin/dns` | Technitium DNS CLI (zones, list, add, delete, search, flush) | | [`tests/vm-validation.sh`](tests/vm-validation.sh) | Deploy + validate on sandbox VM | @@ -298,7 +305,7 @@ Required for EVERY infrastructure change: `koalaman/shellcheck:stable`). ALL scripts must pass including info-level. - For raw API calls not covered by the Redmine/Discourse CLIs, use `python3` inside the CLI Docker containers (escape hatch pattern in - `~/daytoday/redmine/AGENTS.md` and `tooling-cli/discourse/AGENTS.md`). + `tooling-cli/{discourse,redmine}/AGENTS.md`). - `curl`/`wget`/`httpie` may be blocked by some harnesses. Use the CLIs or the python-in-Docker escape hatch for HTTP writes. @@ -312,7 +319,8 @@ bash tests/shellcheck.sh # shellcheck whole repo bash tests/shellcheck.sh path/to/*.sh # shellcheck specific files # Redmine + Discourse sanity checks (run first in any session): -~/daytoday/redmine/bin/redmine whoami +docker run --rm --env-file ~/.creds/redmine.env \ + git.knownelement.com/reachableceo/redmine-cli:latest whoami docker run --rm --env-file ~/.creds/discourse.env \ git.knownelement.com/reachableceo/discourse-cli:latest whoami diff --git a/questions-v1.md b/questions-v1.md index 6b266a2..8e4c921 100644 --- a/questions-v1.md +++ b/questions-v1.md @@ -20,8 +20,8 @@ Go with option a. The tea command is setup on this workstation (and on ultix-off - **Context:** PFVCluster's operational.md and AGENTS.md referenced `~/daytoday/redmine/bin/redmine` and `~/daytoday/discourse/bin/discourse` as the entrypoints β€” thin shortcut wrappers around the real CLI containers. The actual CLI source lived in `~/projects/KNEL-AIMiddleware/{redmine,discourse}-cli/`. - **Question:** Are the `bin/` wrappers something that should exist, or is the documentation aspirational? Should the template reference these CLIs at all, or stay tool-agnostic? - **Answer:** Reference the real container invocation (full path/container name/invoke notes); no duplicate code via shortcut wrappers. -- **Decision:** No `bin/` wrappers. Invoke the real container with `docker run`. The discourse-cli source has been merged into `~/projects/KNEL-AIMiddleware/tooling-cli/discourse/` and PFVCluster's AGENTS.md now invokes it via `docker run --env-file ~/.creds/discourse.env`. The old `~/daytoday/discourse` workspace and `discourse-cli/` subdir were removed. Redmine still pending the same treatment. -- **Synthesized to:** PFVCluster `AGENTS.md` Β§CLI access; `tooling-cli/discourse/` +- **Decision:** No `bin/` wrappers. Invoke the real container with `docker run`. Both CLI sources have been merged into `~/projects/KNEL-AIMiddleware/tooling-cli/{discourse,redmine}/` and PFVCluster's AGENTS.md now invokes them via `docker run --env-file ~/.creds/{discourse,redmine}.env`. The old `~/daytoday/{discourse,redmine}` workspaces and the `{discourse,redmine}-cli/` subdirs were removed. +- **Synthesized to:** PFVCluster `AGENTS.md` Β§CLI access; `tooling-cli/{discourse,redmine}/` ### Q3. Should the template ship the Discourse pointer-header pattern? - **Context:** PFVCluster migrated 36 in-repo `.md` files to 10-line pointer stubs citing `https://community.turnsys.com/t/`. The template currently has `scripts/garden.sh` that *warns* about oversized non-Discourse `.md`, but doesn't enforce the pointer-header format.