Skip to content

Commit 0936acf

Browse files
hyperpolymathclaude
andcommitted
feat(rsr): add setup.sh, .desktop, Groove help-me, desktop integration templates
- Universal setup.sh with 20+ shell autodetection (incl. vsh/valence) - Platform detection (Linux/macOS/Windows/FreeBSD) with pkg manager mapping - Post-install security snapshot (firewall, SELinux) - .desktop file template with doctor/help actions - install-shortcuts/remove-shortcuts Justfile recipes - help-me now probes Groove endpoints and POSTs diagnostics - Updated ADJUST.contractile template with i18n section + LOL cross-ref - UX test harness updated for ADJUST naming Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4e1aed4 commit 0936acf

4 files changed

Lines changed: 403 additions & 15 deletions

File tree

rhodium-standard-repositories/templates/ADJUST.contractile.template

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@
9494
(adjust "docs use clear language, short sentences, logical structure")
9595
(adjust "code examples include comments explaining non-obvious steps")
9696
(adjust "diagrams have text descriptions or alt text")
97+
98+
; ── Internationalisation (i18n) ──
99+
(adjust "all user-facing strings externalisable for translation")
100+
(adjust "no hardcoded English in error messages — use message keys")
101+
(adjust "date/time/number formats locale-aware")
102+
(adjust "RTL (right-to-left) layout support where applicable")
103+
(adjust "Unicode handled correctly throughout (UTF-8 everywhere)")
104+
)
105+
106+
(related-resources
107+
; LOL — super-parallel corpus crawler for 1500+ languages
108+
; Use for linguistic data, translation coverage, and i18n validation
109+
(lol "standards/lol — multilingual NLP corpus, see README.adoc")
110+
(polyglot-i18n "polyglot-i18n — i18n framework and WASM translation engine")
97111
)
98112

99113
(enforcement
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# XDG Desktop Entry for {{REPO}}
3+
# Install: just install-shortcuts
4+
# Remove: just remove-shortcuts
5+
[Desktop Entry]
6+
Version=1.5
7+
Type=Application
8+
Name={{DISPLAY_NAME}}
9+
GenericName={{GENERIC_NAME}}
10+
Comment={{DESCRIPTION}}
11+
Exec={{EXEC_PATH}} %U
12+
Icon={{ICON_PATH}}
13+
Terminal={{TERMINAL}}
14+
Categories={{CATEGORIES}};
15+
Keywords={{KEYWORDS}};
16+
StartupNotify=true
17+
StartupWMClass={{WM_CLASS}}
18+
MimeType={{MIME_TYPES}}
19+
Actions=doctor;help;
20+
21+
[Desktop Action doctor]
22+
Name=Run Diagnostics
23+
Exec={{EXEC_PATH}} --doctor
24+
25+
[Desktop Action help]
26+
Name=Get Help
27+
Exec={{EXEC_PATH}} --help

rhodium-standard-repositories/templates/justfile.template

Lines changed: 84 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -446,30 +446,63 @@ llm-context role="user":
446446
*) echo "Usage: just llm-context [user|dev|maintainer]" ;;
447447
esac
448448
449-
# Pre-fill diagnostic context and open feedback channel
449+
# Pre-fill diagnostic context and open feedback channel (Groove-aware)
450450
help-me:
451451
#!/usr/bin/env bash
452452
echo "=== Generating diagnostic report ==="
453-
REPORT="/tmp/{{project}}-help-$(date +%Y%m%d-%H%M%S).txt"
453+
REPORT="/tmp/{{project}}-help-$(date +%Y%m%d-%H%M%S).json"
454+
REPORT_TXT="/tmp/{{project}}-help-$(date +%Y%m%d-%H%M%S).txt"
455+
# Collect diagnostics
456+
DOCTOR_OUT="$(just doctor 2>&1 || true)"
457+
GIT_LOG="$(git log --oneline -5 2>/dev/null || echo '(not a git repo)')"
458+
# JSON report for Groove
459+
cat > "$REPORT" <<ENDJSON
454460
{
455-
echo "Project: {{project}}"
456-
echo "Version: {{version}}"
457-
echo "Date: $(date -Iseconds)"
458-
echo "Platform: $(uname -srm)"
459-
echo "Shell: $SHELL"
461+
"type": "feedback",
462+
"source": "help-me",
463+
"project": "{{project}}",
464+
"version": "{{version}}",
465+
"timestamp": "$(date -Iseconds 2>/dev/null || date)",
466+
"platform": "$(uname -srm 2>/dev/null || echo unknown)",
467+
"shell": "$SHELL",
468+
"doctor": $(echo "$DOCTOR_OUT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))' 2>/dev/null || echo '"(could not encode)"'),
469+
"git_log": $(echo "$GIT_LOG" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))' 2>/dev/null || echo '"(could not encode)"')
470+
}
471+
ENDJSON
472+
# Also plain text for manual use
473+
{
474+
echo "Project: {{project}} {{version}}"
475+
echo "Date: $(date -Iseconds 2>/dev/null || date)"
476+
echo "Platform: $(uname -srm 2>/dev/null || echo unknown)"
460477
echo ""
461478
echo "--- Doctor Output ---"
462-
just doctor 2>&1 || true
479+
echo "$DOCTOR_OUT"
463480
echo ""
464481
echo "--- Recent Git Log ---"
465-
git log --oneline -5 2>/dev/null || echo "(not a git repo)"
466-
} > "$REPORT"
467-
echo "Report saved: $REPORT"
482+
echo "$GIT_LOG"
483+
} > "$REPORT_TXT"
484+
echo "Report saved: $REPORT_TXT"
468485
echo ""
469-
echo "To get help:"
470-
echo " 1. Open an issue: https://github.com/hyperpolymath/{{project}}/issues"
471-
echo " 2. Attach the report above"
472-
echo " 3. Or paste it to your LLM assistant"
486+
# Try to send to Groove (probe known ports for /.well-known/groove)
487+
GROOVE_SENT=false
488+
for port in 7700 7701 7702 8080 8090 3000 4000 5000; do
489+
GROOVE_CHECK=$(curl -sf --connect-timeout 1 "http://127.0.0.1:${port}/.well-known/groove" 2>/dev/null || true)
490+
if echo "$GROOVE_CHECK" | grep -q '"name"' 2>/dev/null; then
491+
echo "[Groove] Found service on port $port — sending report..."
492+
curl -sf --connect-timeout 3 \
493+
-H "Content-Type: application/json" \
494+
-d @"$REPORT" \
495+
"http://127.0.0.1:${port}/.well-known/groove/message" >/dev/null 2>&1 \
496+
&& { echo "[Groove] Report sent successfully"; GROOVE_SENT=true; break; } \
497+
|| echo "[Groove] Send failed — falling back to manual"
498+
fi
499+
done
500+
if [ "$GROOVE_SENT" = "false" ]; then
501+
echo "No Groove endpoint found. Manual options:"
502+
echo " 1. Open an issue: https://github.com/hyperpolymath/{{project}}/issues"
503+
echo " 2. Attach: $REPORT_TXT"
504+
echo " 3. Or paste the report to your LLM assistant"
505+
fi
473506
474507
# Uninstall with tier selection
475508
uninstall tier="parameter":
@@ -522,6 +555,42 @@ stapeln-run:
522555
exit 1
523556
fi
524557
558+
# === Desktop Integration ===
559+
560+
# Install desktop shortcuts (Linux .desktop, offered not forced)
561+
install-shortcuts:
562+
#!/usr/bin/env bash
563+
if [ "$(uname -s)" = "Linux" ]; then
564+
DESKTOP_FILE="{{project}}.desktop"
565+
if [ -f "$DESKTOP_FILE" ]; then
566+
DEST="${XDG_DATA_HOME:-$HOME/.local/share}/applications/$DESKTOP_FILE"
567+
cp "$DESKTOP_FILE" "$DEST"
568+
echo "[OK] Installed: $DEST"
569+
# Update desktop database
570+
update-desktop-database "${XDG_DATA_HOME:-$HOME/.local/share}/applications" 2>/dev/null || true
571+
else
572+
echo "[SKIP] No .desktop file found for {{project}}"
573+
fi
574+
elif [ "$(uname -s)" = "Darwin" ]; then
575+
echo "[INFO] macOS: Create an alias in /Applications manually or use 'ln -s'"
576+
else
577+
echo "[INFO] Desktop shortcuts not supported on this platform from CLI"
578+
fi
579+
580+
# Remove desktop shortcuts
581+
remove-shortcuts:
582+
#!/usr/bin/env bash
583+
if [ "$(uname -s)" = "Linux" ]; then
584+
DEST="${XDG_DATA_HOME:-$HOME/.local/share}/applications/{{project}}.desktop"
585+
if [ -f "$DEST" ]; then
586+
rm "$DEST"
587+
echo "[OK] Removed: $DEST"
588+
update-desktop-database "${XDG_DATA_HOME:-$HOME/.local/share}/applications" 2>/dev/null || true
589+
else
590+
echo "[SKIP] No shortcut installed"
591+
fi
592+
fi
593+
525594
# === Help ===
526595
527596
# Show detailed help

0 commit comments

Comments
 (0)