/sd0x-dev-flow:agentctl-setupfrom sd0x-dev-flow
Installs and configures the agentctl mod for task scoping, pre-execution refusal, stale evidence detection, and model-free handover. Run `/agentctl-setup` to opt in.
Ships in sd0x-dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
/codex-review-fast, /precommit) — the mod is a control and a display, never a gate/install-rules, /install-hooks, /install-scripts)Hand a task to Claude and leave; when you come back, three questions:
| Question | What the mod does |
|---|---|
| Did it stay in scope? | You declare the task once (what may be edited, which test command may run). A call outside it — git push, kubectl rollout, an edit outside the allowed directories — is refused before it runs, with the rule named. Only a line you type changes the scope |
| Did Claude ask for more than it needs? | Claude drafts the scope from the ticket; the mod previews it and binds it only when you type /agentctl accept. Recognized direct git push, gh pr merge and production writes are refused even with no task; anything the mod cannot classify goes to Claude Code's own permission prompt or auto mode |
| Is "tests pass" true? | A test run is recorded with a Git-derived fingerprint of the tree; a later change to a tracked or untracked file reads stale within 30 s, not "passed" (ignored files, submodule contents and the environment are outside it) |
| Where is it, do I need to step in? | A one-line band above the prompt; /agentctl for detail; /agentctl handoff writes a hand-over from records with no model call |
It is not a security boundary: production stays protected by credentials. It ships in this
repository under mods/agentctl/ and is never installed by installing sd0x-dev-flow — this skill
is the opt-in.
| Invocation | Does |
|---|---|
/agentctl-setup | Steps 1 → 5, in order |
/agentctl-setup --task | Step 4b (a proposal) only, then stop |
/agentctl-setup --status | Step 2's doctor report only — no install, enable or task question — then stop |
/agentctl-setup --uninstall | Step 6 only, then stop |
Dispatch on the flag before step 1: each flagged mode runs only its row and returns.
SETUP below is node "${CLAUDE_PLUGIN_ROOT}/skills/agentctl-setup/scripts/agentctl-setup.js". Every
subcommand prints one JSON document; read ok, problems / errors from it, never guess.
Show the table above in a few lines, then one AskUserQuestion: Install · Not now. On
Not now, stop.
Run SETUP doctor. Report claudeVersion, installed, and every entry of problems in plain words:
| Field | Meaning | Response |
|---|---|---|
problems non-empty | Mods cannot run here | Say why (old Claude Code, no git, disableAllHooks), how to fix it, and stop |
installed.enabled is true | Installed and on | Skip to step 4 |
installed.enabled is false | Installed but disabled — /agentctl does not exist until it is enabled | Say so; one AskUserQuestion naming claude plugin enable <installed.id>; run it after approval, then step 4. It takes effect in the next session |
installed: false | Not installed | Step 3 |
installed: null | claude plugin list could not be read | Say so; step 3 is still safe — installing an installed plugin changes nothing |
One AskUserQuestion naming the exact command, then run it:
claude plugin install agentctl@sd0xdev-marketplace
On failure (for example sd0x-dev-flow was loaded with --plugin-dir and the marketplace was never
added), report the error and offer the per-session alternative, which changes no setting:
claude --plugin-dir "${CLAUDE_PLUGIN_ROOT}/mods/agentctl". The mod loads in the next Claude Code
session; say so.
Ask with AskUserQuestion (free text through "Other" where noted):
| Question | Becomes |
|---|---|
| What is the task? (free text) | --goal |
Which directories may be edited? src,tests · none (read-only) · other | --edit |
Which test or check command may run? npm test · none · other | --check |
| Anything else to forbid? none · other | --forbid |
The answers are free text, so they never go on a command line — a shell would expand $(…),
backticks or $VAR inside them before the helper could refuse them. Instead:
SETUP alloc → prints input, a fresh file in a private temporary directory{"goal": "…", "edit": "src,tests", "check": "npm test", "forbid": "terraform apply"} (omit a key the user answered "none")SETUP task-line --input <that path> — it reads the file once and deletes itOn ok: false, show errors and ask again for that answer — task-line runs each command through the
mod's own classifier, so a form the mod would refuse (an inline VAR=value, a wildcard, shell
operators) is caught here, not after the user has left. On ok: true, show line in a fenced block
and say:
Send this line yourself in the session where the mod runs. The mod accepts a task only from a line you type — a command run by Claude is refused, so nothing Claude reads can widen the scope.
Do not send the line yourself, and do not paraphrase it: the user copies it as printed.
--task, and the workflow skills)When the mod is installed, Claude drafts the scope and the user only accepts it. Follow
references/workflow-integration.md § Drafting a proposal: the
same alloc + Write answers file, then SETUP propose --input <path>, which validates with the
mod's own rules and writes one private file under ~/.claude/agentctl/proposals/. While a task is
bound, the Write to the answers file is refused by agentctl; use the reference's --stdin form. Show preview,
then say the mod shows its own preview, with the digest, at the end of this turn and that they
type /agentctl accept <first 8 of that digest> (or /agentctl discard); digest is null unless a
base was given. Accept binds exactly the previewed
scope; a later change to the file needs a new preview.
The mod refuses only while it runs. Offer native permissions.deny rules as a second layer:
AskUserQuestion, multiSelect, over the rules SETUP deny-rules --settings <path> lists as missing,
plus where to write: this project, personal (.claude/settings.local.json) · every project
(~/.claude/settings.json) · Skip. After the choice, run
SETUP deny-rules --settings <path> --rules "<chosen,comma-separated>" --write and report written.
git push is not offered: /push-ci runs it, and a native deny would block that workflow.
--uninstall)AskUserQuestion naming claude plugin uninstall agentctl@sd0xdev-marketplace; run it after approval.
Then say the mod's own data stays in ~/.claude/plugins/store/agentctl_*.json, and drafted proposals in
~/.claude/agentctl/proposals/, until deleted, and that
deny rules added in step 5 stay in the settings file they were written to.
Putting any free-text answer on a command line — answers go through alloc + Write + --input
Installing, uninstalling or writing settings without that step's AskUserQuestion approval
Sending /agentctl task set or /agentctl accept on the user's behalf, or editing the printed line
Describing the mod as a security boundary, a gate, or an approval
Offering Bash(git push:*) as a deny rule
doctor ran (default and --status), and every problems entry was reportedtask-line --input (or the proposal from propose --input) with ok: true, and the user was told to send or accept it themselvesInput: /agentctl-setup
Action: explain → doctor (ok, not installed) → approve → claude plugin install → four questions →
task-line → "send this line yourself" → deny rules for this project → written
Input: /agentctl-setup --task
Action: draft from the ticket → propose → preview shown → "type /agentctl accept <digest>" yourself
What SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
102 skills in this plugin
/adrWrite an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature>/adr-<NNN>-<title>.md with a 3-digit zero-padded number. Handles the Superseded case: bidirectional linking when a new ADR replaces an old one. Use when: recording why an architectural approach was chosen, documenting a decision so it doesn't get re-litigated, marking a prior decision as superseded. Not for: feature-level technical design (use /tech-spec), task progress tracking (use /create-request), bulk backfill of historical decisions (a separate request — this skill writes one ADR at a time)./architectureArchitecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and architecture decisions. Reads existing tech-spec as input. Use when: designing system architecture, documenting component interactions, creating architecture docs, producing 3-architecture.md. Not for: tech spec writing (use tech-spec), code implementation (use feature-dev), architecture consulting only (use codex-architect)./askContext-aware Q&A with auto context gathering. Use when: user has a quick question about codebase, git history, rules, docs, or skills during development. Not for: code changes (use feature-dev), code review (use codex-review-fast), deep research (use deep-research), full code trace (use code-explore). Output: structured answer with source attribution./best-practicesIndustry best practices conformance audit with mandatory adversarial debate. Produces audit artifact: verdict (OK/WARN/FAIL) + gap roadmap + debate proof. Use when: auditing current implementation against industry standards, checking compliance with best practices, benchmarking implementation quality, verifying a codebase meets a standard. Not for: broad research/discovery without audit target (use /deep-research), code review (use /codex-review), architecture design (use /codex-architect)./bug-fixBug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate./bump-versionBump package and plugin version in sync. Updates package.json, .claude-plugin/plugin.json, and install-state manifest to the same version. Use when: user says 'bump version', 'update version', '更新版本', '版本 +1', or /bump-versionnpx claudepluginhub sd0xdev/sd0x-harness --plugin sd0x-dev-flowOther plugins' skills for the same job