diff --git a/.agents/skills/make-bot-ui/SKILL.md b/.agents/skills/make-bot-ui/SKILL.md index fac4df6..091398c 100644 --- a/.agents/skills/make-bot-ui/SKILL.md +++ b/.agents/skills/make-bot-ui/SKILL.md @@ -41,7 +41,6 @@ const server = createServer(async (req, res) => { return } if (req.method !== 'POST' || req.url !== '/wake') return res.writeHead(404).end() - if (req.headers.authorization !== `Bearer ${KEY}`) return res.writeHead(401).end() let raw = '' for await (const chunk of req) raw += chunk let body @@ -69,23 +68,20 @@ Keep these properties: ## 3. Write the page -`index.html` sends `POST /wake` with `Authorization: Bearer ` and a JSON body. +`index.html` posts to this same-origin server at `POST /wake` with a JSON body and no key. Only the server holds `BOT_UI_KEY`. ```html ``` -The key in `sessionStorage` is a UI action key, not the model credential. It never reaches `dsh headless`; the CLI uses the user's stored DSH credentials. If the user does not want a key in the browser at all, bind to `127.0.0.1` and use a local browser profile, or put Tailscale Serve in front with its own identity check. State the tradeoff before choosing. - Never put a provider API key, a DSH credential, or a Tailscale auth key in the page. ## 4. Request the key @@ -105,7 +101,6 @@ Start the server in the background with `bash`, then probe once with a harmless ```bash node server.mjs & curl -sS -o /dev/null -w '%{http_code}\n' -X POST http://127.0.0.1:8787/wake \ - -H "authorization: Bearer $BOT_UI_KEY" \ -H 'content-type: application/json' \ -d '{"action":"review","payload":{"probe":true}}' ``` @@ -121,7 +116,7 @@ If `tailscale status` shows an online node, read the hostname from `tailscale st - `http://..ts.net:` - `http://<100.x.x.x>:` -Use HTTP. Do not add HTTPS unless the user asks. Bind the server to `0.0.0.0` only when the user accepts that anyone on the tailnet can reach the page, and keep the UI action key on. +Use HTTP. Do not add HTTPS unless the user asks. Bind the server to `0.0.0.0` only when the user accepts that anyone on the tailnet can reach the page. The page still posts with no key. If Tailscale is not installed, install it: diff --git a/.agents/skills/poteto-mode/SKILL.md b/.agents/skills/poteto-mode/SKILL.md index 3822db0..76a3fb6 100644 --- a/.agents/skills/poteto-mode/SKILL.md +++ b/.agents/skills/poteto-mode/SKILL.md @@ -31,7 +31,7 @@ Remaining triggers: - Before review → the **no-comments** skill (`/no-comments`). - Shipping UI / IDE / CLI → the matching control skill (`control-cli` for CLIs and TUIs, `control-ui` for browser / Electron / web UIs). For bug fixes, reproduce first on the same surface yourself. Hand to the user only under the narrow Bug fix step 1 exception. - Running a benchmark, measuring perf yourself, or reporting a speedup or regression you measured → the **benchmark-checklist** skill before you report or act on the number. -- Any PR-status request ("babysit this", "get it green", "address the bot comments", and most often "check on PR X" or "anything outstanding on X") → the **Babysit** playbook (`playbooks/babysit.md`). Never triggered by merely opening a PR. Declare its mode before polling. The playbook's step 1 owns the request-to-mode mapping. Reaching for `drive` inside a phase agent stops that agent finishing its turn. +- Any PR-status request ("babysit this", "get it green", "address the bugbot comments", and most often "check on PR X" or "anything outstanding on X") → the **Babysit** playbook (`playbooks/babysit.md`). Never triggered by merely opening a PR. Declare its mode before polling. The playbook's step 1 owns the request-to-mode mapping. Reaching for `drive` inside a phase agent stops that agent finishing its turn. - Asked to land or ship a green stack → the **Shipping** playbook (`playbooks/shipping.md`). Green is not safe. Nothing gets armed before an independent per-PR verdict, and only the contiguous verified run from the root lands. - An agentic review bot or the security review commented → skeptical posture. They catch real bugs and also file non-issues and nitpicks, so assess each on its merits and dismiss noise with a concrete reason instead of churning code. Triage fix / dismiss / ask per `references/review-bot-triage.md`. - Broken skill mid-task → fix it in its own PR. Don't block. Don't silently work around it. diff --git a/.agents/skills/poteto-mode/playbooks/babysit.md b/.agents/skills/poteto-mode/playbooks/babysit.md index cffeea3..f0eaebc 100644 --- a/.agents/skills/poteto-mode/playbooks/babysit.md +++ b/.agents/skills/poteto-mode/playbooks/babysit.md @@ -17,7 +17,7 @@ Babysitting starts when the user asks for it, which is normally once a phase or Answer a user question mid-loop and continue. Only an explicit stop ends the loop before the active forge's stop condition. On GitHub, that is `READY` in single or stack mode, or a `WAITING`/`merge-queue` report or `COMPLETE` in queued mode. On Origin, that is the merge-ready state defined above. For a GitHub queued stack, capture the PR list bottom-to-top once and pass the same frozen list to every rearm. Revise the list only for the sanctioned follow-up PR from step 4. Append it at the end, drop the merged owner, and rearm with the corrected snapshot. 7. **Classify CI before any retrigger.** Flake or infrastructure earns one fresh build, never a job retry. One retry only. An identical second failure means it was never flake, so reclassify and read the child logs instead of retrying blind. A failure in code the diff never touches means a stale base, so check with `git merge-base --is-ancestor` before assuming flake. Report a stale base as needing a rebase instead of burning retries. Only a failure in the diff's own code gets a commit. -8. **The review bot is triaged skeptically, always.** Verify each claim against the code per `../references/review-bot-triage.md`. Fix real findings with a red-first proof in the lowest PR that owns the code, never at the tip unless the owning PR has merged. In that case, use step 4's sanctioned follow-up PR. Per step 2, upstack fixes wait for step 5's next frontier-driven push wave. Push that wave before replying so the reply cites the commit. On Origin, reply with `origin pr thread reply --body-file `. On GitHub, call `gh api --method POST "repos///pulls//comments//replies" --input ` and put the reply body in the JSON file as data. Never interpolate comment text or a reply into a shell command. Dismiss noise with the concrete disproof on the thread. On GitHub, use the watcher's review-bot pass count. On Origin, derive the pass count from `origin pr thread list` and the review history. From the third pass on, lean toward dismissing documented patterns, still escalating anything touching security, auth, billing, data, or migrations rather than dismissing it yourself. Never churn code to quiet a bot. +8. **The review bot is triaged skeptically, always.** Verify each claim against the code per `../references/review-bot-triage.md`. Fix real findings with a red-first proof in the lowest PR that owns the code, never at the tip unless the owning PR has merged. In that case, use step 4's sanctioned follow-up PR. Per step 2, upstack fixes wait for step 5's next frontier-driven push wave. Push that wave before replying so the reply cites the commit. On Origin, reply with `origin pr thread reply --body-file `. On GitHub, call `gh api --method POST "repos///pulls//comments//replies" --input ` and put the reply body in the JSON file as data. Never interpolate comment text or a reply into a shell command. Dismiss noise with the concrete disproof on the thread. On GitHub, use the watcher's Bugbot pass count. On Origin, derive the pass count from `origin pr thread list` and the review history. From the third pass on, lean toward dismissing documented patterns, still escalating anything touching security, auth, billing, data, or migrations rather than dismissing it yourself. Never churn code to quiet a bot. 9. **Stop at the human's line.** Owner approval is a wait, not a blocker to fix. Babysitting never authorizes merging. Only an explicit request to merge, land, ship, or merge when ready does. Route that request to Shipping. Surface the escalation and keep working the rest. After GitHub reports `READY`, a queued `WAITING`/`merge-queue` stop, or `COMPLETE`, or after Origin reports the frontier merge-ready, sweep the run's triage decisions once. Offer any team-useful dismissal pattern as a candidate entry in the shared rubric (`../references/review-bot-triage.md`) and its own PR. Never keep it only in private memory. `drive` ends at merge-ready. Landing the stack is `playbooks/shipping.md`. diff --git a/.agents/skills/poteto-mode/playbooks/eval.md b/.agents/skills/poteto-mode/playbooks/eval.md index e40d2ea..295ae4c 100644 --- a/.agents/skills/poteto-mode/playbooks/eval.md +++ b/.agents/skills/poteto-mode/playbooks/eval.md @@ -17,8 +17,8 @@ 1. **Frame.** State what variant is under test and what behavior counts as success. Write the rubric (3-6 concrete criteria) for the judge only. Hold it back from candidates. 2. **Set up sanitized environments.** Per-candidate working dir with the variant in place. Plant any context an organic task would have: a project skeleton, the skills the candidate would naturally read. 3. **Author one organic prompt.** What a user would type. No leakage of what's being measured. -4. **Spawn N parallel candidates** with `subagent` calls in one assistant message, using the `arena runners` route from `~/.agents/pstack-models.md` when one is configured. Each works in its own sanitized dir passed as `cwd`. Same prompt to each. Pass `provider`, `model`, and `reasoning_effort` only when the `subagent` tool exposes them; otherwise omit route fields. -5. **Spawn one blinded judge** with the `arena cross-judge pool` route when one is configured, otherwise a fresh `subagent` on the parent model. Judge sees outputs by sanitized label and the rubric, never a model name. +4. **Spawn N parallel candidates** on different models per the **arena** skill's Phase B. Each works in its own sanitized dir passed as `cwd`. Same prompt to each. +5. **Spawn one blinded judge** on a different model family per the **arena** skill's Phase C. Judge sees outputs by sanitized label and the rubric, never a model name. 6. **Verify the chain from session logs, not self-report.** Each candidate returns a child session id. Read it with `../scripts/session-log.sh ` from this playbook's directory. Do not read another project's session slug. That crosses workspace boundaries and reads private chats from unrelated projects. Look at which files each candidate actually opened. Grade chain-following from the files it really read plus the shape of the code, never from the candidate's own claims. 7. **Read every candidate output yourself** end to end. Compare to the judge's verdict. Disagreement means a model is biased or the rubric is ambiguous. Synthesize. diff --git a/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md b/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md index e63ac7f..406ee8c 100644 --- a/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md +++ b/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md @@ -75,7 +75,7 @@ Each live lane runs in its own git worktree on this machine, checked out at the - [ ] - [ ] Save every screenshot to `/tmp/swarm-/worker-/.png` and return the paths with the report. -## () +## () **Depends on.** diff --git a/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md b/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md index a050349..e83b1e0 100644 --- a/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md +++ b/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md @@ -1,11 +1,11 @@ ### Worktree and simulator cleanup -1. Snapshot and audit. Record `df -h /`, then run `scripts/worktree-audit.sh [-b ] [repo-path]` (principle-build-the-lever). Without `-b` it checks `MERGED` against `origin/HEAD`, so pass `-b origin/` when PRs target another branch. It reads paths from `git worktree list`, never hand-typed, since a hand-typed `myrepo-worktrees/x` misses one that lives under `.dsh/worktrees/myrepo/x` or another agent's tree (principle-encode-lessons-in-structure). It classifies each worktree by size, age, merge state, uncommitted work, PR state, and the newest DSH session that touched it, then suggests a bucket. The session-log scan is slow, so background it. +1. Snapshot and audit. Record `df -h /`, then run `scripts/worktree-audit.sh [-b ] [repo-path]` (principle-build-the-lever). Without `-b` it checks `MERGED` against `origin/HEAD`, so pass `-b origin/` when PRs target another branch. It reads paths from `git worktree list`, never hand-typed, since a hand-typed `myrepo-worktrees/x` misses one that lives at `.agents/worktrees/` inside the checkout (principle-encode-lessons-in-structure). It classifies each worktree by size, age, merge state, uncommitted work, PR state, and the newest DSH session that touched it, then suggests a bucket. The session-log scan is slow, so background it. 2. The bucket is advice, not permission. The pinned and active chats are the real artifact (principle-prove-it-works). Get that set from the user or sidebar and cross-check every candidate. The lever has marked `safe` a worktree the user had pinned, so the pinned set wins. 3. Verify usage before deleting. For every `verify-recent-chat` row, or anything you doubt, fan subagents out to read the session logs and report whether the session is pinned or ongoing and which worktrees it touches (principle-guard-the-context-window, logs are bulk). A pinned chat spawns arena and repro trees into sibling worktrees via background subagents, and those are in use even when their names never hit the sidebar. Pass `provider`, `model`, and `reasoning_effort` only when the `subagent` tool exposes them and `~/.agents/pstack-models.md` configures a route. 4. Pause on irreversible loss. `wip:N` is N tracked uncommitted edits. Show the diff and get a decision first, since removing a clean worktree is recoverable from its branch but uncommitted work is gone. `scratch:N` is untracked throwaway, safe to drop, but name the files. Per Autonomy, clean and merged and not-in-use proceeds. `wip` and in-use pause. 5. Prune the confirmed set. Per path, `git worktree remove --force `. If the dir survives on ignored build artifacts, `rm -rf` it, then `git worktree prune`. Branch refs survive, so no commits are lost. Confirm with `df -h /` and re-list. -6. Simulators and other reclaimers. Simulators are usually the next-biggest win. `xcrun simctl --set testing delete all` (XCTestDevices clones), `xcrun simctl delete unavailable`, and `xcrun simctl runtime list` then `runtime delete ` for old runtimes. More when needed: Xcode `DerivedData` and `iOS DeviceSupport`, `~/Library/Application Support/DeepSeek Harness` (caches and snapshots), package caches (pnpm, uv, brew, yarn). Clear only caches the user has not said to keep. +6. Simulators and other reclaimers. Simulators are usually the next-biggest win. `xcrun simctl --set testing delete all` (XCTestDevices clones), `xcrun simctl delete unavailable`, and `xcrun simctl runtime list` then `runtime delete ` for old runtimes. More when needed: Xcode `DerivedData` and `iOS DeviceSupport`, `$DSH_HOME` (default `~/.dsh`, including `cache/` and `logs/`), package caches (pnpm, uv, brew, yarn). Clear only caches the user has not said to keep. This is the one playbook that deletes user state with no code review to catch a slip, so the gates above are the review. diff --git a/.agents/skills/poteto-mode/scripts/session-log.sh b/.agents/skills/poteto-mode/scripts/session-log.sh index f976114..252531b 100755 --- a/.agents/skills/poteto-mode/scripts/session-log.sh +++ b/.agents/skills/poteto-mode/scripts/session-log.sh @@ -9,14 +9,45 @@ # # search the newest n sessions, default 10 # session-log.sh --all # with --list or --grep, search every project # -# DSH stores each session as $DSH_HOME/sessions///session*.jsonl.zstd. -# The project slug is the cwd with its leading slash removed, every "/" replaced -# by "-", wrapped in "--". Plain .jsonl logs are supported too. +# DSH stores each session as $DSH_HOME/sessions///session*.jsonl.zstd. +# projectKey (@deepseek-ai/dsh-session-persistence-jsonl): separators (/ \ :) +# become "-", runs collapse to one "-", a code unit outside [A-Za-z0-9._-] +# or "~" becomes "~" plus 4 uppercase hex, leading hyphens are stripped +# (empty becomes "root"), then cut at 251 chars and wrapped in "--". +# /Users/you/My Projects/repo -> --Users-you-My~0020Projects-repo--. +# Plain .jsonl logs are supported too. set -euo pipefail home="${DSH_HOME:-$HOME/.dsh}" sessions="$home/sessions" -slug="--$(printf '%s' "${PWD#/}" | tr '/' '-')--" + +# Same directory name as dsh-session-persistence-jsonl projectKey. +project_key() { + PROJECT_KEY_CWD="$1" node -e ' +const cwd = process.env.PROJECT_KEY_CWD ?? "" +if (cwd.length === 0) throw new Error("empty cwd") +let readable = "" +let separatorRun = false +for (let i = 0; i < cwd.length; i++) { + const code = cwd.charCodeAt(i) + const ch = String.fromCharCode(code) + if (ch === "/" || ch === "\\" || ch === ":") { + if (!separatorRun) readable += "-" + separatorRun = true + } else if (ch !== "~" && /^[A-Za-z0-9._-]$/.test(ch)) { + readable += ch + separatorRun = false + } else { + readable += "~" + code.toString(16).toUpperCase().padStart(4, "0") + separatorRun = false + } +} +const body = (readable.replace(/^-+/, "") || "root").slice(0, 251) +process.stdout.write("--" + body + "--") +' +} + +slug="$(project_key "$PWD")" die() { printf 'session-log: %s\n' "$*" >&2; exit 2; } diff --git a/.agents/skills/poteto-mode/scripts/worktree-audit.sh b/.agents/skills/poteto-mode/scripts/worktree-audit.sh index c77f31d..689f290 100755 --- a/.agents/skills/poteto-mode/scripts/worktree-audit.sh +++ b/.agents/skills/poteto-mode/scripts/worktree-audit.sh @@ -69,8 +69,19 @@ elif raw=$(gh pr list --author "@me" --state all --limit 1000 \ fi [ -s "$prs" ] || echo "[]" > "$prs" -# DSH session logs: $DSH_HOME/sessions///session*.jsonl.zstd. +# DSH session logs: $DSH_HOME/sessions///session*.jsonl or session*.jsonl.zstd. transcripts="${DSH_HOME:-$HOME/.dsh}/sessions" + +# Same reader as session-log.sh: zstd -dc for .zstd, cat otherwise. +read_session_log() { + case "$1" in + *.zstd) + command -v zstd >/dev/null 2>&1 || return 1 + zstd -dc "$1" 2>/dev/null + ;; + *) cat "$1" ;; + esac +} now=$(date +%s) echo "# base: $base" @@ -110,10 +121,10 @@ git worktree list --porcelain | awk '/^worktree /{print $2}' | while read -r wt; # Most recent DSH session whose log names this worktree. Match the path # followed by "/" or a quote so glint-482 does not match glint-482-r37. last="-"; last_ts=0 - if [ -d "$transcripts" ] && command -v zstd >/dev/null 2>&1; then - f=$(find "$transcripts" -type f -name 'session*.jsonl.zstd' -mtime -14 2>/dev/null \ + if [ -d "$transcripts" ]; then + f=$(find "$transcripts" -type f \( -name 'session*.jsonl' -o -name 'session*.jsonl.zstd' \) 2>/dev/null \ | while IFS= read -r log; do - if zstd -dc "$log" 2>/dev/null | grep -q -F -e "${wt}/" -e "${wt}\""; then + if read_session_log "$log" | grep -q -F -e "${wt}/" -e "${wt}\""; then stat "${stat_fmt[@]}" "$log" 2>/dev/null fi done \ diff --git a/.agents/skills/recall/SKILL.md b/.agents/skills/recall/SKILL.md index 269692a..1e6ad2b 100644 --- a/.agents/skills/recall/SKILL.md +++ b/.agents/skills/recall/SKILL.md @@ -12,7 +12,7 @@ Keep it tight and on-topic. Read only what the in-scope threads need, then stop. Your context lives in two records. Your own chat history holds what you did and decided. The shared record holds everything that happened around the same code under other names: the symptoms users keep reporting, the fixes that shipped and got reverted, the errors still firing in prod. That second record is what the **why** skill searches, across source control, the issue tracker, chat and issue channels, long-form docs, and error tracking. A feature with a long bug tail keeps most of its story there, so don't reconstruct it from your transcripts alone. -Session logs live under `$DSH_HOME/sessions///session*.jsonl.zstd`. The project slug is the cwd with its leading slash removed, every "/" turned into "-", wrapped in `--` (so `/Users/you/proj` becomes `--Users-you-proj--`). Use `../poteto-mode/scripts/session-log.sh --list` and `--grep `; pass a session id to decompress one log. Each line is one JSONL record, not one chat message. +Session logs live under `$DSH_HOME/sessions///session*.jsonl.zstd`. The project key replaces separators (`/`, `\`, `:`) with `-`, collapses a run to one `-`, encodes a code unit outside `[A-Za-z0-9._-]` or `~` as `~` plus 4 uppercase hex, strips leading hyphens, cuts at 251 characters, and wraps the result in `--` (so `/Users/you/My Projects/repo` becomes `--Users-you-My~0020Projects-repo--`). Use `../poteto-mode/scripts/session-log.sh --list` and `--grep `; pass a session id to decompress one log. Each line is one JSONL record, not one chat message. 1. Classify, then route. One specific prior chat to resume is the `session-pickup` playbook, not this. Turning habits into a durable skill is `automate-me`. A human-readable summary of your work is a different task. Recall loads working context across recent chats before you act. If the user already gave you a full state capsule (paths, branch, the change), use it and skip the mining. 2. Lock the scope before searching. Pin the window ("recent" is a real range, default the last 7 days), the topic if named, and the workspace (default the active one. Never read another project's transcripts without being asked). State the scope back. Never quietly turn "all" into "recent N". diff --git a/.agents/skills/reflect/SKILL.md b/.agents/skills/reflect/SKILL.md index c16d16b..575fa65 100644 --- a/.agents/skills/reflect/SKILL.md +++ b/.agents/skills/reflect/SKILL.md @@ -53,8 +53,8 @@ Never edit a skill inside an installed bundle. Before approval, show its destina Follow each approved row's Routing exactly: - Trivial existing-skill edit (a one-line bullet, a tightened sentence, a stale fact corrected): the parent does it directly. -- Substantive existing-skill edit (a new section, a new pattern table, more than ~10 lines): follow the **authoring-a-skill** playbook at `../poteto-mode/playbooks/authoring-a-skill.md` and run its draft / test / iterate loop. -- `tune description: ` (the skill exists but didn't trigger when it should have): tune the frontmatter description with the same playbook's description guidance. +- Substantive existing-skill edit (a new section, a new pattern table, more than ~10 lines): follow the steps in the **authoring-a-skill** playbook at `../poteto-mode/playbooks/authoring-a-skill.md`. +- `tune description: ` (the skill exists but didn't trigger when it should have): follow that playbook's steps for the frontmatter description. - `new skill via authoring playbook: `: create the skill with that playbook. Do not invent the shape ad hoc. Run `node scripts/validate.mjs` from the pstack repository on every touched pstack skill before declaring done. For another repo, validate its frontmatter and links by hand. diff --git a/.agents/skills/setup-pstack/SKILL.md b/.agents/skills/setup-pstack/SKILL.md index fa7247d..c65f22a 100644 --- a/.agents/skills/setup-pstack/SKILL.md +++ b/.agents/skills/setup-pstack/SKILL.md @@ -29,12 +29,12 @@ The default role table is step 5's shape. If `~/.agents/pstack-models.md` exists **(a) Ask for a budget.** Use `ask_user_question` with these four options. Name the current budget when the file records one. With no file, say `large` is the default. -- `unlimited - highest reasoning effort` -- `large - high reasoning effort` -- `medium - medium reasoning effort` -- `small - low reasoning effort` +- `unlimited - the top reported effort` +- `large - one step down` +- `medium - two steps down` +- `small - three steps down` -**(b) Apply it.** Set the effort token of every non-`inherit` route to the highest available effort at or below the budget target. Effort ladders differ per model, so use the ids `list_subagent_models` reports for that exact route. If the route has no matching effort, use its nearest lower effort. If the route has no efforts at all, leave it bare. `inherit` does not change. +**(b) Apply it.** Rank the efforts `list_subagent_models` reports for that exact route from highest to lowest. `unlimited` is the top reported effort, `large` is one step down, `medium` is two steps down, and `small` is three steps down. Set every non-`inherit` route's effort token to that rank. If the ladder is shorter than the step, use its lowest effort. If the route has no efforts at all, leave it bare. `inherit` does not change. **(c) Pick two base routes.** Ask which detected route code delegates should use and which route judgment and prose should use. Offer `inherit` and every detected route. The defaults are `inherit` for both, which means "let the parent model do it". Panels use the two base routes as their starting seats. diff --git a/.agents/skills/why/references/synthesizer-prompt.md b/.agents/skills/why/references/synthesizer-prompt.md index bceaeb2..287a350 100644 --- a/.agents/skills/why/references/synthesizer-prompt.md +++ b/.agents/skills/why/references/synthesizer-prompt.md @@ -62,7 +62,7 @@ File paths, line ranges, key symbols. Two or three lines to orient a cold reader Claims with textual evidence, each quoted or paraphrased and cited precisely: -- **[Direct]** {Claim}. Source: [PR #123](https://github.com/owner/repo/pull/123) / ticket ID / file:line. {Brief quote or paraphrase.} +- **[Direct]** {Claim}. Source: [PR #123](url) / ticket ID / file:line. {Brief quote or paraphrase.} - **[Supported]** {Claim}. Evidence: {list of items and what each contributes}. `[Direct]` is single-source, explicit evidence. `[Supported]` is multiple indirect items converging on a conclusion. diff --git a/assets/logo.png b/assets/logo.png index d41ba36..3754e87 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/automations/benny/skills/setup-benny/SKILL.md b/automations/benny/skills/setup-benny/SKILL.md index e2cef2c..a203c97 100644 --- a/automations/benny/skills/setup-benny/SKILL.md +++ b/automations/benny/skills/setup-benny/SKILL.md @@ -170,42 +170,10 @@ For each automation: 2. Turn `FOR_AGENTS.md`, the finished Benny configuration, and the template intent into a complete natural-language request. 3. Tell the live prompt to read and follow its exact committed operational file under `.agents/automations/benny/`. 4. Use the stable repository-relative path, not a plugin source or cache path. Do not copy the operational file contents into the live prompt. -5. Read and follow the built-in `automate` skill. -6. Let `automate` discover Slack channels, the repository, and connected integrations. -7. Let `automate` confirm that the copied pack and any referenced configuration files are committed in the same repository where the automation will run. -8. Let `automate` show its draft table, obtain approval, ask readiness, and open the Automations editor. -9. Finish the editor handoff for this automation before starting the next one. - -Give `automate` this complete triage intent, filled from configuration: - -- Name `benny-triage`. -- Read and follow `.agents/automations/benny/skills/triage-issue-reports/SKILL.md` for every run. -- Trigger on each new top-level report in the configured source Slack channel. -- Read the triggering thread and reply only inside it. -- Use the configured issue-tracker integration. -- Classify, inspect evidence, trace cause, dedupe, and create only clear new bugs. -- End one thread-only verdict with the configured `[benny:bug]`, `[benny:performance]`, or `[benny:other]` marker and optional tracker URL. -- Never post a source-channel root message. - -After the triage editor handoff is complete, give `automate` this complete repro and fix intent: - -- Name `benny-reproduce`. -- Read and follow `.agents/automations/benny/skills/reproduce-and-fix-issues/SKILL.md` for every run. -- Trigger on the same new top-level reports in the configured source Slack channel. -- Use the configured repository and default branch. -- Read the source thread and reply only inside it. -- Include pull request creation and the configured tracker, control-adapter, and feature-map requirements. Paraphrase mapped user paths and states unless `automate` confirms an eligible committed file in the same repository. -- Wait for a trusted triage marker before acting. -- Reproduce the exact symptom twice through the mapped real UI and capture evidence. -- Verify an existing fix without authoring over it. -- Attempt an optional bounded fix only after confirmed repro, then open a draft pull request when proof and checks pass. -- Never post a source-channel root message. - -Do not duplicate `automate`'s Slack, repository, integration, completeness, authentication, draft-review, approval, readiness, or editor-handoff work. -### Existing automations +Create the job with `schedule_create` as Creation boundary describes. Finish this job before starting the next one. -The built-in `automate` skill is creation-only. Do not use it to search for, inspect, or update existing automations. +### Existing automations Finish configuration, routing, control-adapter, and feature-map validation. Then give the user this concise editor checklist. diff --git a/automations/benny/templates/reproduce-automation-prompt.md b/automations/benny/templates/reproduce-automation-prompt.md index f0e20d3..afda662 100644 --- a/automations/benny/templates/reproduce-automation-prompt.md +++ b/automations/benny/templates/reproduce-automation-prompt.md @@ -1,6 +1,6 @@ # Reproduce automation prompt -> Source material for the copied setup workflow. Paraphrase this intent into a scheduled DSH job after `automate` confirms that the copied pack is committed in the repository where the automation will run. +> Source material for the copied setup workflow. Paraphrase this intent into a scheduled DSH job after confirming that the copied pack is committed in the repository where the automation will run. Read and follow `.agents/automations/benny/skills/reproduce-and-fix-issues/SKILL.md` for this run. diff --git a/automations/benny/templates/triage-automation-prompt.md b/automations/benny/templates/triage-automation-prompt.md index 97e5edc..8889edb 100644 --- a/automations/benny/templates/triage-automation-prompt.md +++ b/automations/benny/templates/triage-automation-prompt.md @@ -1,6 +1,6 @@ # Triage automation prompt -> Source material for the copied setup workflow. Paraphrase this intent into a scheduled DSH job after `automate` confirms that the copied pack is committed in the repository where the automation will run. +> Source material for the copied setup workflow. Paraphrase this intent into a scheduled DSH job after confirming that the copied pack is committed in the repository where the automation will run. Read and follow `.agents/automations/benny/skills/triage-issue-reports/SKILL.md` for this run. diff --git a/docs/guide/01-setup.md b/docs/guide/01-setup.md index b047315..732543b 100644 --- a/docs/guide/01-setup.md +++ b/docs/guide/01-setup.md @@ -34,7 +34,7 @@ DSH only lets a subagent pick a model when you turn on **Plugins → Subagent With model selection off, every role uses `inherit`, which means the child keeps the parent model. That still gives you independent contexts and the full workflow. Turn model selection on when you want a review panel or a code delegate on a different route. -The budget sets the starting effort. `unlimited` picks the highest effort the route advertises, `large` the next step down, and `medium` and `small` lower it further. The exact effort ids come from `list_subagent_models` for that route. +The budget sets the starting effort. `unlimited` is the top reported effort, `large` is one step down, `medium` is two steps down, and `small` is three steps down. The exact effort ids come from `list_subagent_models` for that route. You only override what you care about. A role with no line in the file keeps `inherit`. To restore a default, delete that role's line. A rerun of `/setup-pstack` keeps any role whose route differs from `inherit`. diff --git a/docs/harness/dsh.md b/docs/harness/dsh.md index 941dfbb..905855f 100644 --- a/docs/harness/dsh.md +++ b/docs/harness/dsh.md @@ -76,7 +76,7 @@ DSH's setup skill differs from Cursor's in three ways: | `.agents/skills/`, `~/.agents/skills/` | `.agents/skills/` in the project, `~/.agents/skills/` for the user, `~/.dsh/skills/` for DSH-specific skills. | | `~/.cursor/plugins/`, `.cursor-plugin/plugin.json` | An installed bundle under the profile's `node_modules`, declared by `package.json` and `cordis.patch.yml`. | | `.cursor/rules/*.mdc`, always-applied rules | `AGENTS.md` files, which DSH loads automatically. The pstack route file is separate and read on demand. | -| Transcripts in `~/.cursor/projects//agent-transcripts/` | Session logs under `$DSH_HOME/sessions///session*.jsonl.zstd`. Use `.agents/skills/poteto-mode/scripts/session-log.sh` to list, search, or decompress one. The project slug is the cwd with its leading slash removed, every `/` replaced by `-`, wrapped in `--`. | +| Transcripts in `~/.cursor/projects//agent-transcripts/` | Session logs under `$DSH_HOME/sessions///session*.jsonl.zstd`. Use `.agents/skills/poteto-mode/scripts/session-log.sh` to list, search, or decompress one. The project key replaces separators (`/`, `\`, `:`) with `-`, collapses a run to one `-`, encodes a code unit outside `[A-Za-z0-9._-]` or `~` as `~` plus 4 uppercase hex, strips leading hyphens, cuts at 251 characters, and wraps the result in `--` (so `/Users/you/My Projects/repo` becomes `--Users-you-My~0020Projects-repo--`). | | `https://github.com/cursor/plugins/blob/main/pstack/` | `https://github.com/pstack-ports/dsh-pstack/blob/main/`. | ## Cursor-only features diff --git a/scripts/validate.mjs b/scripts/validate.mjs index 290a887..2868a54 100644 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -122,6 +122,8 @@ function checkLinks(file) { for (const match of raw.matchAll(/\]\(([^)\s]+)(?:\s+"[^"]*")?\)/gu)) { const target = match[1] if (/^(?:[a-z][a-z0-9+.-]*:|#|\/\/)/iu.test(target)) continue + // synthesizer-prompt.md uses `(url)` as a citation placeholder, not a file. + if (target === 'url') continue const pathPart = decodeURIComponent(target.split('#')[0].split('?')[0]) if (pathPart === '') continue const resolved = resolve(dirname(file), pathPart)