j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan/addons/agentkit
deepworkplan-addon-agentkit
VerifiedOptional DeepWorkPlan addon that integrates coding-agents-kit (the `ak` command, DailybotHQ/coding-agents-kit pinned at v1.0.1, interface 1) as the headless delegation transport - a thin integrator that detects the kit through `ak doctor --json`, offers it (never imposes it) from onboard Phase 7b, documents the install from a clone of the pinned tag plus the kit's install.sh, records the acceptance in the .dwp/config.json addon registry, and maps a v7 plan's delegation operations (launch, observe, collect, cancel) onto one `ak run` per delegate in a dedicated git worktree. Never required, never a conformance gate. The kit launches agents in autonomy by default and its opt-out (--ask or AGENTKIT_PERMISSIONS=ask) always wins; the pack spells no CLI autonomy flag, never passes --auto, and passes --ask always for a read-only delegate and for writing delegates when a plan records the opt-out.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.9 KB |
| SPEC.md | markdown | 9.4 KB |
| addon.json | config | 414 B |
| templates/INTEGRATION.md | markdown | 3.4 KB |
templates/INTEGRATION.md
View on GitHub# Template — one headless delegate through `ak` (reason, don't copy-paste)
Reasoning guidance for running ONE delegate of a v7 plan through
coding-agents-kit. Fill every `<placeholder>` from the plan and the
machine; never guess. Preconditions are in `../../../execute/delegation.md`
(grant, `parallel_safe` or read-only, `addon:agentkit` in the effective
`subagents` sources). If any fails, do not delegate.
## 1. Prepare the worktree (writing delegate)
```bash
git worktree add ../<repo>-<delegation_id> -b dwp/<plan>/<delegation_id>
```
A read-only delegate gets no worktree: `--cwd` is the repository and the
prompt says "do not modify files"; record `"worktree": null`, and always
launch it with `--ask` (read-only intent means ask: autonomy in the
repository itself would approve writes to the developer's checkout).
## 2. Compose the prompt (data the delegate reads)
- The task objective and its `AC-*` criteria, verbatim.
- "Work only inside `<worktree>`; commit nothing outside it."
- What to return: a short summary of what changed and why.
- Never a secret value, never a broader scope than the task.
`prompt_digest` = `sha256:` + the SHA-256 of exactly that prompt text.
## 3. Record, then launch
```bash
python3 <pack>/shared/ledger.py --plan <dir> delegate launch --task <T-id> \
--json '{"delegation_id": "<id>", "transport": "headless", "via": "agentkit",
"kind": "<kind>", "profile": "<@profile, @default when the plan names none>", "target": "<worktree>",
"worktree": "<worktree>", "prompt_digest": "sha256:<hex>"}'
mkdir -p <dir>/analysis_results/delegations/<id>
ak run <kind> @<profile> --cwd <worktree> --timeout <seconds> --output-format json [--ask] \
-- "<prompt>" > <dir>/analysis_results/delegations/<id>/result.json &
```
A **read-only** delegate always gets `--ask`, with `--cwd` the repository
and `"worktree": null` (and `"target"` the repository) in the launch
record — read-only intent means ask:
```bash
ak run <kind> @<profile> --cwd <repo> --timeout <seconds> --output-format json --ask \
-- "<prompt>" > <dir>/analysis_results/delegations/<id>/result.json &
```
A writing delegate launches in the kit's autonomy by default, inside its
worktree. Add `--ask` when the plan records the developer's opt-out; an
inherited `AGENTKIT_PERMISSIONS=ask` already wins without it, so never
unset it.
Never add `--auto` or spell a CLI autonomy flag; `--ask` is the only flag
the pack passes.
## 4. Observe
`ledger.py … delegate observe` and the background job's state. Check at the
pace the work changes; a timeout is already bounded by `--timeout`.
## 5. Collect and verify here
1. Read `result.json` — one object; `exit` 0 → `completed`, else `failed`
(3 = CLI missing / not logged in; 4 = timeout; 5 = cancelled).
2. `ledger.py … delegate collect --task <T-id> --json '{"delegation_id":
"<id>", "state": "<completed|failed>", "result_path":
"analysis_results/delegations/<id>/result.json"}'`.
3. Review the worktree diff like any contribution; merge what is right.
4. Run the task's gates here through `ledger.py gate` — only that is
`observed` evidence. Then `complete` as usual.
5. `git worktree remove ../<repo>-<delegation_id>` once merged or abandoned.
## 6. Cancel
Send SIGTERM to the `ak run` job (the kit kills the process tree, exit 5),
then `ledger.py … delegate cancel --task <T-id> --json '{"delegation_id":
"<id>"}'`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |