agentleFS
wxxb789wxxb789/hoa/skills/engineering/gdd-route-dsh/SKILL.md

gdd-route-dsh

Skill2 starsChanged 11 days agoMITView on GitHub

Configure the DeepSeek Harness (`dsh`) headless route for gdd's shared runner. Covers route configuration and troubleshooting, not interactive sessions or the overall delivery protocol.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not for choosing the increment (goal contract / define-goal), and not for OMP/Paseo route details (read GDD transport for those).

    line 28
  2. Very specific:

    Keep experiments call-level (--patch <overlay>.yml), not in the harness's global configuration.

    line 51
  3. Very specific:

    Verify independently: check git status --porcelain for scope, run the repository's gates on the final tree, and inspect stderr.log for did …

    line 97
  4. Very specific:

    Use session.sessionId, status.phase/turn/step/usage, tool_call, tool_result, final, and error for progress.

    line 103
  5. Very specific:

    Stop through uv run ../gdd/scripts/agent_run.py kill <slug>.

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

gdd-route-dsh

dsh --profile headless answers one task per invocation, streams NDJSON events, and can resume a persisted session. The delivery protocol stays in gdd, which this skill requires. Install both in the same skills root.

When to Use

  • Dispatching a stage to DSH: set GDD_AGENT=dsh and run uv run ../gdd/scripts/gdd.py stage …, or pass --agent dsh to the runner directly.
  • Diagnosing a dsh stage that exited 0 but did not do the work, refused to resume, or stalled.
  • Not for choosing the increment (goal contract / define-goal), and not for OMP/Paseo route details (read GDD transport for those).

Read when needed

WhenRead
Setting up or changing the route, checking unsupported flags or deadlines, or using the raw CLIConfiguration
Changing permissions, overlays, tool execution, credentials, or compaction; diagnosing an activation warning or a corrupt sessionHarness quirks
Estimating round cost, deciding where to split an increment, or comparing native and programmatic tool callsCost notes
A runner script command fails (for example uv is not found)Runner troubleshooting

For shared settings see GDD config; for detach modes see platform rules.

Route safety

  • --cwd selects the working directory; the permission mode sets the write boundary. Where dsh enforces a sandbox, workspace-write allows writes inside that boundary and denies writes outside it even where Unix modes permit them. Reads outside are allowed. Re-confirm the boundary before dispatch if the profile or DSH_PERMISSION_MODE changes; never use full access to unblock a task.
  • Detached runs require --approval-policy never: there is no approval channel, so a call needing approval is rejected. Never put credentials in a prompt, repository file, or run artifact.
  • Keep experiments call-level (--patch <overlay>.yml), not in the harness's global configuration.
  • Budget: two corrective rounds per stage, then stop and escalate (different model, narrower contract, or abandon).

The runner supervises; the raw CLI is for one-offs

The shared runner owns start|status|result|answer|tail|kill: it creates the run directory, detaches, keeps state.json current, recovers dead runs, and stops through a control file. Raw dsh --profile headless … is for manual one-offs only: no detach, state.json, stale recovery, or stop file.

The runner's equivalent, which is what a GDD stage uses:

uv run ../gdd/scripts/agent_run.py start --agent dsh --name example --prompt task.md --cwd .
uv run ../gdd/scripts/agent_run.py status example
uv run ../gdd/scripts/agent_run.py answer example

One goal, one worktree, one session

  • New increment → new session. Reusing an unrelated session re-sends its accumulated context.
  • A session is anchored to its recording directory. Resuming elsewhere is refused (was recorded in "<A>", not "<B>"). A permitted same-increment revision or verification can use the runner's start --resume <session-id> in the same cwd (--session-id is a compatibility alias); it repeats permission and approval flags. GDD's fresh-stage rule still applies. For a resumed run, say where it was interrupted, that the tree is mid-flight, and that the prompt continues rather than restarts.
  • Parallel goals use separate worktrees and sessions, even in the same repository. Dsh refuses two writers to one session (already owned by an active write handle); the runner refuses a second start on a live slug. Neither prevents two sessions from writing one worktree. Keep one writer per worktree so edits, gates, and reviewer inspection do not interleave.

Prompt with repository context by file path, an observable done-when, and the rules: writable paths, no commits/pushes, orchestrator-owned tests. Require command, exit code, count line, changed files, and unmet criteria in the report.

Completion is two conditions, then your own gates

success = exit_code == 0, and the last `final` event carries reason.kind == "completed"

The runner, gdd.py, and the observer read the same states: done needs both conditions above; killed means a runner stop (143) or a signal-style exit (130/137/143/-2/-9/-15, raw code retained); everything else settled is failed, including exit 0 without the success marker and stale recovery. A runner-level failure emits error instead of final; a killed run has no final.

Verify independently: check git status --porcelain for scope, run the repository's gates on the final tree, and inspect stderr.log for did not activate / pending (waiting for service: …). A composition row can fail to load with exit 0. tool_result.status == "completed" means the tool returned, not that the shell command inside it succeeded.

Poll state.json with agent_run.py status: no heartbeat event or detached notification exists. Use session.sessionId, status.phase/turn/step/usage, tool_call, tool_result, final, and error for progress; tool-call count is not a completion percentage.

Stopping and recovering

  • Stop through uv run ../gdd/scripts/agent_run.py kill <slug>. It writes <run_dir>/stop; the runner ends the process tree (POSIX group TERM, 5 s, KILL; Windows taskkill /T /F) and finalizes killed/143. Without the runner, kill only signals a recorded PID when the live start time matches the recorded one. If it cannot prove that, it signals nothing and exits 1 naming each PID and why; end the process tree by hand, then run kill (or status) again. start --replace stops the live run before moving it aside.
  • The next status/result/list/answer finalizes a dead, unfinalized run as failed with exit −1 and stale_recovered: true, idempotently while no finalized marker exists. Recovery uses only the worktree, the harness session log, and run artifacts; there is no task database, checkpoint framework, or WAL. For session-log recovery, read Harness quirks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.