diff --git a/dot_config/gamemode/executable_gamemode-end.sh b/dot_config/gamemode/executable_gamemode-end.sh --- a/dot_config/gamemode/executable_gamemode-end.sh +++ b/dot_config/gamemode/executable_gamemode-end.sh @@ -1,15 +1,8 @@ #!/bin/sh +# Restore llama-swap only if GameMode stopped a previously running service. +marker="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/llama-swap-gamemode.was-active" -PID_FILE="${XDG_RUNTIME_DIR:-/tmp}/gamemode-inhibit.pid" - -if [ -f "$PID_FILE" ]; then - pid=$(cat "$PID_FILE" 2>/dev/null) - if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then - kill "$pid" >/dev/null 2>&1 || true - fi - rm -f "$PID_FILE" +if [ -f "$marker" ]; then + rm -f "$marker" + /usr/bin/systemctl --user start llama-swap.service fi - -/home/misti/.cargo/bin/wp mode random >/dev/null 2>&1 || true -swaync-client -df -sw >/dev/null 2>&1 || true -systemctl --user thaw llama-server.service >/dev/null 2>&1 || true diff --git a/dot_config/gamemode/executable_gamemode-start.sh b/dot_config/gamemode/executable_gamemode-start.sh --- a/dot_config/gamemode/executable_gamemode-start.sh +++ b/dot_config/gamemode/executable_gamemode-start.sh @@ -1,24 +1,10 @@ #!/bin/sh - -PID_FILE="${XDG_RUNTIME_DIR:-/tmp}/gamemode-inhibit.pid" - -if [ -f "$PID_FILE" ]; then - pid=$(cat "$PID_FILE" 2>/dev/null) - if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then - : - else - rm -f "$PID_FILE" - fi -fi +# Stop the router itself so background clients cannot reload models while gaming. +marker="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/llama-swap-gamemode.was-active" -if [ ! -f "$PID_FILE" ] && command -v systemd-inhibit >/dev/null 2>&1; then - systemd-inhibit --what=idle:sleep --who="gamemode" --why="GameMode active" /usr/bin/sleep infinity >/dev/null 2>&1 & - pid=$! - if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then - printf '%s\n' "$pid" > "$PID_FILE" - fi +if /usr/bin/systemctl --user is-active --quiet llama-swap.service; then + : > "$marker" + /usr/bin/systemctl --user stop llama-swap.service +else + rm -f "$marker" fi - -/home/misti/.cargo/bin/wp mode static >/dev/null 2>&1 || true -swaync-client -dn -sw >/dev/null 2>&1 || true -systemctl --user freeze llama-server.service >/dev/null 2>&1 || true diff --git a/dot_config/opencode/AGENTS.md b/dot_config/opencode/AGENTS.md --- a/dot_config/opencode/AGENTS.md +++ b/dot_config/opencode/AGENTS.md @@ -1,3 +1,7 @@ ## Skill Creation After a verified task in a Git repository, optionally propose a skill only when a concise reusable workflow would clearly save future effort, such as non-obvious repository work, repeated failed attempts, or substantial clarification. Skip trivial, generic, one-off, unresolved, or temporary environment problems; if approved, load `generate-skill`. + +## Progress Tracking + +For bigger tasks, track your progress in plane. Its a jira alternative. Use the `plane-workboard` skill to learn more. Use that to safe TODOs that we might want to do later. Or get historical context about existing problems. I want to make lots of use of this please. diff --git a/dot_config/opencode/skills/plane-workboard/SKILL.md b/dot_config/opencode/skills/plane-workboard/SKILL.md --- a/dot_config/opencode/skills/plane-workboard/SKILL.md +++ b/dot_config/opencode/skills/plane-workboard/SKILL.md @@ -19,8 +19,22 @@ Use Plane as durable shared state for work spanning agents or sessions. Do not use it as a transcript of internal reasoning or every tool call. ## Configuration -- Default project ID: `b987cd75-93c3-4671-b892-252e9fd3fc09` -- Use another project only when the user or current task explicitly identifies one. +### Known projects + +| Project | Identifier | Project ID | +| ---------- | ---------- | -------------------------------------- | +| Default | `UNKNOWN` | `b987cd75-93c3-4671-b892-252e9fd3fc09` | +| Kubernetes | `K8S` | `43add642-70fe-44f1-b715-ef2794b4f785` | +| Road | `ROAD` | `955a3557-d01c-48d2-bba2-7ff84059eefd` | + +- Default project: `UNKNOWN` (`b987cd75-93c3-4671-b892-252e9fd3fc09`). +- Use a known project when the user identifies it by name or identifier. Use the + default project only when no project is specified. +- When an unknown project must be identified, use + `agentgateway_plane_search_work_items` with the supplied project identifier + or concrete project terms, then obtain its `project_id` from a match. Report + this limitation if no matching work item exists: the configured Plane tools + have no project-list endpoint. - Use the exact `agentgateway_plane_*` MCP tools named in this skill. Do not guess aliases or shortened tool names. - Resolve opaque IDs instead of copying them from examples: - states: `agentgateway_plane_list_states` @@ -429,25 +443,6 @@ Use for duplicates, invalid findings, obsolete work, superseded approaches, or an explicit decision not to proceed. Add a reason and link the canonical or superseding item when applicable. Do not silently reopen Done. Comment with the failed criterion or regression, then move to an appropriate active state or create a linked bug when it is meaningfully separate work. - -## Multi-agent claim protocol - -Plane may be accessed through one shared MCP identity, so assignment alone may not identify the real agent. Use a stable agent name and run/session ID in coordination comments. - -Before claiming: - -1. Retrieve the item with `agentgateway_plane_retrieve_work_item` and read `agentgateway_plane_list_work_item_comments`. -2. Confirm it is Todo, ready, and not already claimed or blocked. -3. Check project members with `agentgateway_plane_get_project_members` only when assignment must be resolved, then inspect the current assignee and latest claim/handoff comment. - -To claim: - -1. Set the assignee when meaningful with `agentgateway_plane_manage_work_item_assignee`. -2. Resolve In Progress with `agentgateway_plane_list_states` and move the item with `agentgateway_plane_update_work_item`. -3. Add one claim comment with `agentgateway_plane_create_work_item_comment`, including agent identity, run ID, intended outcome, and immediate plan. -4. Retrieve the item again with `agentgateway_plane_retrieve_work_item`. If another agent claimed it concurrently, do not duplicate work; coordinate or back out. - -Do not take over an In Progress item merely because it appears idle. Take over only after explicit handoff, user instruction, or a configured stale-claim policy. Record why takeover is safe. ## Asking for more information