From 5cce0f825a448ea400c426ab1e198c91e56e874f Mon Sep 17 00:00:00 2001 From: Sergio Alexander Florez Galeano Date: Tue, 17 Nov 2026 00:04:27 -0500 Subject: [PATCH] chore(skill): dogfood deepworkplan pack 8.0.2 and herdr-peers 2.2.0 Refresh the vendored deepworkplan pack to v8.0.2 (tag commit 4d3e2f6, DWP standard 8.0.0) and herdr-peers to v2.2.0 (tag commit fc19e77). Every file matches its release SHA256SUMS: 188/188 for the pack (digest 332e8f9a...), 37/37 skill files for herdr-peers (digest 694766b8...), with no extra files. The addon registry moves the herdr addon to v2.2.0; agentkit (v1.5.0) and ai-diff-reviewer (v3.3.16) are already current. AGENTS.md records the new provenance. No runtime change; this repository releases only on a pushed tag, so the merge cuts no release. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/deepworkplan/SKILL.md | 2 +- .agents/skills/deepworkplan/addons/README.md | 4 +- .../deepworkplan/addons/agentkit/SKILL.md | 2 +- .../addons/ai-diff-reviewer/SKILL.md | 2 +- .../deepworkplan/addons/dailybot/SKILL.md | 2 +- .../addons/dependency-upgrade/SKILL.md | 2 +- .../addons/design-system/SKILL.md | 2 +- .../deepworkplan/addons/devcontainer/SKILL.md | 14 +- .../deepworkplan/addons/devcontainer/SPEC.md | 16 +- .../addons/devcontainer/addon.json | 2 +- .../skills/deepworkplan/addons/herdr/SKILL.md | 12 +- .../skills/deepworkplan/addons/herdr/SPEC.md | 10 +- .../deepworkplan/addons/herdr/addon.json | 2 +- .../deepworkplan/addons/herdr/install.md | 8 +- .../deepworkplan/addons/machine-installs.md | 8 +- .../skills/deepworkplan/addons/vim/SKILL.md | 2 +- .agents/skills/deepworkplan/author/SKILL.md | 2 +- .agents/skills/deepworkplan/create/SKILL.md | 2 +- .agents/skills/deepworkplan/create/v6.md | 5 +- .agents/skills/deepworkplan/execute/SKILL.md | 2 +- .agents/skills/deepworkplan/onboard/SKILL.md | 2 +- .agents/skills/deepworkplan/onboard/addons.md | 8 +- .agents/skills/deepworkplan/refine/SKILL.md | 2 +- .agents/skills/deepworkplan/resume/SKILL.md | 2 +- .agents/skills/deepworkplan/shared/queue.py | 2 + .agents/skills/deepworkplan/spec/ADDONS.md | 14 +- .agents/skills/deepworkplan/spec/CONFIG.md | 4 +- .../deepworkplan/spec/LOOP_ENGINEERING.md | 27 +- .../skills/deepworkplan/spec/V7_ROADMAP.md | 2 +- .agents/skills/deepworkplan/status/SKILL.md | 2 +- .agents/skills/deepworkplan/upgrade/SKILL.md | 2 +- .agents/skills/deepworkplan/verify/SKILL.md | 2 +- .../deepworkplan/verify/compliance_audit.py | 21 +- .agents/skills/herdr-peers/SKILL.md | 6 +- .agents/skills/herdr-peers/autopilot.md | 42 +- .agents/skills/herdr-peers/protocol.md | 34 ++ .../skills/herdr-peers/schemas/fleet-v1.json | 6 +- .../herdr-peers/schemas/plan-event-v1.json | 5 +- .../skills/herdr-peers/scripts/autopilot.py | 336 ++++++++++++++- .../herdr-peers/scripts/fleet_report.py | 17 +- .../skills/herdr-peers/scripts/fleet_ui.py | 5 +- .../skills/herdr-peers/scripts/herdr_peers.py | 407 +++++++++++++++++- .dwp/config.json | 2 +- AGENTS.md | 2 +- skills-lock.json | 12 +- 45 files changed, 957 insertions(+), 108 deletions(-) diff --git a/.agents/skills/deepworkplan/SKILL.md b/.agents/skills/deepworkplan/SKILL.md index 9133a91..04fd409 100644 --- a/.agents/skills/deepworkplan/SKILL.md +++ b/.agents/skills/deepworkplan/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan description: DeepWorkPlan — turn any repo AI-first and run Deep Work Plans. Routes to create, execute, refine, resume, status, verify, upgrade, and repo-onboarding sub-skills based on intent. Use when the developer wants to plan, execute, manage, or verify structured multi-task work, or make a repository AI-agent-ready. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/README.md b/.agents/skills/deepworkplan/addons/README.md index cd74bc9..984b2b9 100644 --- a/.agents/skills/deepworkplan/addons/README.md +++ b/.agents/skills/deepworkplan/addons/README.md @@ -78,12 +78,12 @@ An addon MAY additionally ship per-stack presets, examples, or migration notes. | Addon | Folder | Status | |-------|--------|--------| -| Devcontainer support | [`addons/devcontainer/`](devcontainer/SKILL.md) | **Authored** — vendor-neutral thin integrator of devcontainer-kit (`dck`, pinned `v1.3.0`, interface 2): detect with `dck doctor --json`, offer the kit and its tag-pinned `dck-dockerfile` skill, reason service/runtime/ports/agents from the real stack, render the repository's own layout (`.devcontainer/devcontainer.json`, `docker/local//Dockerfile`, `docker/local/docker-compose.yaml`, `dev.sh`) from the official runtime image pinned by digest — no shared base image required; `dck init` reconciles an existing layout (consented diffs, backups — never clobbered), optional Herdr container profile, validation with a real build. Loopback ports, agent forwarding, no host `~/.ssh` mounts (the developer's own `[ssh] copy_keys` opt-in in their host profile aside), no privileged options. Never required. | +| Devcontainer support | [`addons/devcontainer/`](devcontainer/SKILL.md) | **Authored** — vendor-neutral thin integrator of devcontainer-kit (`dck`, pinned `v1.4.0`, interface 2): detect with `dck doctor --json`, offer the kit and its tag-pinned `dck-dockerfile` skill, reason service/runtime/ports/agents from the real stack, render the repository's own layout (`.devcontainer/devcontainer.json`, `docker/local//Dockerfile`, `docker/local/docker-compose.yaml`, `dev.sh`) from the official runtime image pinned by digest — no shared base image required; `dck init` reconciles an existing layout (consented diffs, backups — never clobbered), optional Herdr container profile, validation with a real build. Loopback ports, agent forwarding, no host `~/.ssh` mounts (the developer's own `[ssh] copy_keys` opt-in in their host profile aside), no privileged options. Never required. | | Dailybot integration | [`addons/dailybot/`](dailybot/SKILL.md) | **Authored** — opt-in install of the Dailybot agent skill (**3.23.20**) / CLI (**>= 3.9.0**), auth **deferred** to the Dailybot skill's own consent flow, **four lifecycle events** (kickoff, significant task, blocked, completion) wired as optional best-effort reports via the `report` sub-skill, optional deterministic hook enforcement, and access to the full 17-capability Dailybot skill when invoked directly. The core methodology has **zero** Dailybot dependency. | | Dependency upgrade | [`addons/dependency-upgrade/`](dependency-upgrade/SKILL.md) | **Authored** — **near-default**, **package-manager-agnostic** dependency upgrades: offered for every repo with declared dependencies, with the inert `/lib-upgrade` delegator installed under the onboarding consent unless explicitly declined (an install runs no upgrade). When invoked: detect the repo's real manager (npm/pnpm/yarn + ncu, pip/poetry/uv, cargo, go mod, bundler, composer…), classify by semver, upgrade in safe batches, run the repo's **real** validation gate after each batch, revert a failing batch, summarize. | | Design system | [`addons/design-system/`](design-system/SKILL.md) | **Authored** — opt-in, **interface-surface-scoped** `DESIGN.md` at `docs/DESIGN.md` (indexed from `AGENTS.md`; root only if no `docs/` tree), covering three profiles in one file: **visual-ui** (design tokens from CSS vars / Tailwind config / token files / component styles; WCAG AA contrast), **cli-output** (semantic terminal styles, output components, TTY/`NO_COLOR` degradation), and **conversational** (voice & register, message anatomy, per-platform rendering with plain-text fallbacks). Reason about the repo's **real** design source — never a brand file — and reconcile an existing `DESIGN.md` instead of clobbering it. Offered by `onboard` **only when an interface surface is detected** — the offer is mandatory, not skippable, with the detection rationale recorded — and every profile (**visual-ui** strongly recommended) installs only after explicit acceptance, never auto-applied. | | AI Diff Reviewer | [`addons/ai-diff-reviewer/`](ai-diff-reviewer/SKILL.md) | **Authored** — **required local review** (baseline since 2.3.0): tag-pinned install of the vendored `DailybotHQ/ai-diff-reviewer` skill (currently **v3.3.16**; workflows pin the moving `@v3`; marketplace listing "AI Diff Reviewer") plus a repo-tailored `.review/extension.md`, wired into the Final Review's security pass; the CI Action (Flow B — same prompt bytes as the local pass, methodology and severity parity) and the `apply-review` / `address-review` companions stay an explicit opt-in. | -| Herdr | [`addons/herdr/SKILL.md`](herdr/SKILL.md) | **Authored** — thin integrator, explicit opt-in offered in `onboard` Phase 7b, pinned to `herdr-peers@v2.1.0` (protocol/interface 1 or 2, detected with `herdr-peers --version`; Herdr's official skill pinned `herdrdev/herdr@v0.9.3`): the **interactive** delegation transport of v7 plans — one `herdr-peers ask` to a peer pane on any machine, recorded in the plan journal before it is relied on, the reply asserted until the plan's own gates observe the work. The peer protocol and native debate sub-skill live in herdr-peers; this folder carries no copy. Its default decision mode: a plan settles each consequential decision through a herdr-peers decide debate, planned as an approved decision task, falling back to the agent's own record without blocking (`SPEC.md` §6.4; off with `config.py decisions debate off`). Never required. | +| Herdr | [`addons/herdr/SKILL.md`](herdr/SKILL.md) | **Authored** — thin integrator, explicit opt-in offered in `onboard` Phase 7b, pinned to `herdr-peers@v2.2.0` (protocol/interface 1 or 2, detected with `herdr-peers --version`; Herdr's official skill pinned `herdrdev/herdr@v0.9.3`): the **interactive** delegation transport of v7 plans — one `herdr-peers ask` to a peer pane on any machine, recorded in the plan journal before it is relied on, the reply asserted until the plan's own gates observe the work. The peer protocol and native debate sub-skill live in herdr-peers; this folder carries no copy. Its default decision mode: a plan settles each consequential decision through a herdr-peers decide debate, planned as an approved decision task, falling back to the agent's own record without blocking (`SPEC.md` §6.4; off with `config.py decisions debate off`). Never required. | | agentkit | [`addons/agentkit/SKILL.md`](agentkit/SKILL.md) | **Authored** — thin integrator, explicit opt-in offered in `onboard` Phase 7b, pinned to `coding-agents-kit@v1.5.0` (interface 1, detected with `ak doctor --json`): the **headless** delegation transport of v7 plans — one `ak run` per delegate in a dedicated git worktree, recorded through `ledger.py delegate`, result asserted until the plan's own gates observe it. Install by a clone of the exact tag + `install.sh`. The kit launches agents in autonomy by default and its `--ask` / `AGENTKIT_PERMISSIONS=ask` opt-out always wins; the pack spells no autonomy flag and passes only `--ask` — always for a read-only delegate, and for writing delegates when a plan records the opt-out. Never required. | | DeepWorkPlan Vim | [`addons/vim/SKILL.md`](vim/SKILL.md) | **Authored** — thin integrator, explicit opt-in offered in `onboard` Phase 7b, pinned to `deepworkplan-vim@v1.1.0` (interface 1, read from the product's `addon/surface.json`). Optional machine-level install of DeepWorkPlan Vim, the terminal editor for Deep Work Plan (Neovim 0.12+, GPL-3.0, its own repo `DailybotHQ/deepworkplan-vim`): detect it through the product's surface, offer — never impose — the editor, guide the documented install (macOS/Linux via the product's install page `https://deepworkplan.com/vim` — download, verify the pinned checksum, run, never a remote-installer pipe spelled in this pack's text; Windows `winget install Neovim.Neovim` + a tagged clone, never piped PowerShell), and validate the installed surface (command index, VS Code gestures, plan browser, markdown viewer). Two routes: the full editor now, the Neovim plugin in v7.1. An existing Neovim config is **never** overwritten without explicit consent — non-interactive installs onto an existing config abort with instructions; backups go to `~/.config/previous-deepworkplan-vim`. Never a conformance gate. | diff --git a/.agents/skills/deepworkplan/addons/agentkit/SKILL.md b/.agents/skills/deepworkplan/addons/agentkit/SKILL.md index 99f9cb9..b12b3d0 100644 --- a/.agents/skills/deepworkplan/addons/agentkit/SKILL.md +++ b/.agents/skills/deepworkplan/addons/agentkit/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-agentkit description: Optional DeepWorkPlan addon that integrates coding-agents-kit (the `ak` command, DailybotHQ/coding-agents-kit pinned at v1.5.0, 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. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com/kit/agentkit user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/ai-diff-reviewer/SKILL.md b/.agents/skills/deepworkplan/addons/ai-diff-reviewer/SKILL.md index 7ea4e33..1ee4068 100644 --- a/.agents/skills/deepworkplan/addons/ai-diff-reviewer/SKILL.md +++ b/.agents/skills/deepworkplan/addons/ai-diff-reviewer/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-ai-diff-reviewer description: "DeepWorkPlan addon — required local review (baseline since standard 2.3.0), optional CI surface — connects an AI-first repo to the AI Diff Reviewer. Onboarding installs the vendored coding-agent skill and extension with consent; the Final Review runs the local pass when present or records a missing-reviewer finding without bootstrapping. Flow B CI setup remains an explicit opt-in delegated to upstream. Invocation errors never block, completed-review critical findings still follow the Final Review contract, and all install/auth/wizard details defer to upstream consent flows." -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/dailybot/SKILL.md b/.agents/skills/deepworkplan/addons/dailybot/SKILL.md index 121875b..62fc6e6 100644 --- a/.agents/skills/deepworkplan/addons/dailybot/SKILL.md +++ b/.agents/skills/deepworkplan/addons/dailybot/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-dailybot description: Optional DeepWorkPlan addon that connects an AI-first repo to the developer's Dailybot team — installing (with consent) the Dailybot agent skill (DailybotHQ/agent-skill, currently 3.23.20) and/or the Dailybot CLI (DailybotHQ/cli, >= 3.9.0), wiring the plan lifecycle into best-effort agent updates - kickoff when a plan starts, significant task completions, a blocked report when an unattended run halts, and a milestone on plan completion - with payloads derived from the plan's state layer, and optionally committing the Dailybot skill's deterministic hook enforcement (dailybot hook lifecycle hooks) so the agent harness itself reminds agents about unreported work. Opt-in, never required, never blocks the work, reconciles existing setups instead of clobbering them, and defers all auth to the Dailybot skill's own consent flow. Use when the developer or team already uses Dailybot and wants DWP progress visible to humans. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/dependency-upgrade/SKILL.md b/.agents/skills/deepworkplan/addons/dependency-upgrade/SKILL.md index 9c193e1..0b2ccae 100644 --- a/.agents/skills/deepworkplan/addons/dependency-upgrade/SKILL.md +++ b/.agents/skills/deepworkplan/addons/dependency-upgrade/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-dependency-upgrade description: DeepWorkPlan addon that safely upgrades a repo's dependencies — reasoning about the repo's ACTUAL package manager (npm/pnpm/yarn + ncu, pip/poetry/uv, cargo, go mod, bundler, composer, and more) rather than assuming npm — with a batched, validated, revertible workflow that detects the manager and manifests/lockfiles, classifies upgrades (patch/minor/major), upgrades in safe batches, runs the repo's real validation gate after each batch, reverts a failing batch, and summarizes. Near-default — offered for every repo with declared dependencies, and its delegator installs under the onboarding consent unless declined; upgrades themselves never run automatically, only as explicit, gated work. Never required for baseline conformance; reconciles with the repo's existing tooling. Use when the developer wants to bring dependencies up to date without breaking the build. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/design-system/SKILL.md b/.agents/skills/deepworkplan/addons/design-system/SKILL.md index 6567371..e68cc7c 100644 --- a/.agents/skills/deepworkplan/addons/design-system/SKILL.md +++ b/.agents/skills/deepworkplan/addons/design-system/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-design-system description: Optional DeepWorkPlan addon that gives a repo with a user-facing interface surface a DESIGN.md (under docs/, indexed from AGENTS.md) — a Markdown design-system file any coding agent reads to generate interface output consistent with the repo's OWN conventions. Covers three profiles detected independently from real files — visual-ui (rendered web/mobile/desktop UI), cli-output (styled terminal output — semantic colors, panels, spinners, prompts, TTY/NO_COLOR degradation), and conversational (chat/email messaging — voice and register, message anatomy, per-platform rendering). Reasons about the repo's ACTUAL design source (CSS custom properties, Tailwind config, token files, component styles, a CLI display/theme module, or message-composition helpers) rather than copying a brand file; checks contrast (WCAG AA), color-is-not-the-only-carrier, plain-text fallbacks, and token integrity. A detected interface surface makes the evaluation and offer mandatory (with a clear recommendation), while installation always requires explicit acceptance — no profile is auto-applied, even in trust mode. Never offered for a repo with no interface surface (pure library, headless service, infra-only); never required for baseline conformance; reconciles an existing DESIGN.md instead of clobbering it. Use when the developer wants agents to produce on-brand, consistent interface output — visual UI, terminal output, or outbound messages. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/addons/devcontainer/SKILL.md b/.agents/skills/deepworkplan/addons/devcontainer/SKILL.md index c108373..83572b4 100644 --- a/.agents/skills/deepworkplan/addons/devcontainer/SKILL.md +++ b/.agents/skills/deepworkplan/addons/devcontainer/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-devcontainer -description: Optional DeepWorkPlan addon that gives a repository a reproducible dev container through devcontainer-kit (the `dck` command, DailybotHQ/devcontainer-kit pinned at v1.3.0, interface 2) - a vendor-neutral thin integrator that detects the kit with `dck doctor --json`, offers the kit and its tag-pinned `dck-dockerfile` skill, and lets them render the repository's own layout (.devcontainer/devcontainer.json, docker/local//Dockerfile, docker/local/docker-compose.yaml, dev.sh) from the official runtime image pinned by digest - no shared base image required. Reconciles an existing layout and never clobbers it, keeps loopback ports and agent forwarding, and validates the result with a real build. Opt-in, never required, never a conformance gate. -version: "8.0.1" +description: Optional DeepWorkPlan addon that gives a repository a reproducible dev container through devcontainer-kit (the `dck` command, DailybotHQ/devcontainer-kit pinned at v1.4.0, interface 2) - a vendor-neutral thin integrator that detects the kit with `dck doctor --json`, offers the kit and its tag-pinned `dck-dockerfile` skill, and lets them render the repository's own layout (.devcontainer/devcontainer.json, docker/local//Dockerfile, docker/local/docker-compose.yaml, dev.sh) from the official runtime image pinned by digest - no shared base image required. Reconciles an existing layout and never clobbers it, keeps loopback ports and agent forwarding, and validates the result with a real build. Opt-in, never required, never a conformance gate. +version: "8.0.2" documentation_url: https://deepworkplan.com/kit/devcontainer user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write @@ -28,7 +28,7 @@ file name. | Pin | Value | |-----|-------| | Product | `DailybotHQ/devcontainer-kit` | -| Tag | `v1.3.0` (per-repository Dockerfile, no shared base image; host accounts through `[agents] host_profiles` since `v0.3.0`; the antigravity kind, per-developer CLI choice (`[agents] supported`) and non-shared profiles on the agents volume since `v0.3.6`; coding-agents-kit `v0.7.1` and herdr-peers `v0.3.2` baked in since `v0.3.7`; the first stable release, its interface committed to semantic versioning, baking coding-agents-kit, herdr-peers and deepworkplan-vim `v1.0.0`, `v1.0.0`; coding-agents-kit `v1.0.1` baked in, so `@default` stays the container's own account, and a `dck doctor` warning when a shared `codex@default` mixes host and container Codex versions, since `v1.0.1`; coding-agents-kit `v1.1.0` and DeepWorkPlan Vim `v1.0.1` baked in since `v1.1.1`; herdr-peers `v1.2.1` (autopilot included) baked in since `v1.1.2`; herdr-peers `v1.3.1` (the plan loop) and coding-agents-kit `v1.4.0` (pick-v2) baked in since `v1.2.0`; opt-in container-only named volumes (`[compose] container_only`) since `v1.3.0`) | +| Tag | `v1.4.0` (per-repository Dockerfile, no shared base image; host accounts through `[agents] host_profiles` since `v0.3.0`; the antigravity kind, per-developer CLI choice (`[agents] supported`) and non-shared profiles on the agents volume since `v0.3.6`; coding-agents-kit `v0.7.1` and herdr-peers `v0.3.2` baked in since `v0.3.7`; the first stable release, its interface committed to semantic versioning, baking coding-agents-kit, herdr-peers and deepworkplan-vim `v1.0.0`, `v1.0.0`; coding-agents-kit `v1.0.1` baked in, so `@default` stays the container's own account, and a `dck doctor` warning when a shared `codex@default` mixes host and container Codex versions, since `v1.0.1`; coding-agents-kit `v1.1.0` and DeepWorkPlan Vim `v1.0.1` baked in since `v1.1.1`; herdr-peers `v1.2.1` (autopilot included) baked in since `v1.1.2`; herdr-peers `v1.3.1` (the plan loop) and coding-agents-kit `v1.4.0` (pick-v2) baked in since `v1.2.0`; opt-in container-only named volumes (`[compose] container_only`) since `v1.3.0`; herdr-peers `v2.1.0` (protocol 2: lead appointment, the brain, the plan queue, the fleet UI), coding-agents-kit `v1.5.0` and DeepWorkPlan Vim `v1.1.0` baked in, with the pack dogfooded at `v8.0.1`, since `v1.4.0`) | | Interface | `2` (`dck doctor --json` → `"interface": 2`) | | Skill | `dck-dockerfile`, installed from the same tag | | Registry key | `devcontainer` (`.dwp/config.json` → `addons.devcontainer`) | @@ -307,9 +307,9 @@ are copied in. Declining is complete. ### Step 2 — Install the kit and its skill (pinned; point-don't-run by default) ``` -git clone --branch v1.3.0 https://github.com/DailybotHQ/devcontainer-kit +git clone --branch v1.4.0 https://github.com/DailybotHQ/devcontainer-kit ./devcontainer-kit/install.sh -npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.3.0 --skill dck-dockerfile -y +npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.4.0 --skill dck-dockerfile -y ``` Before running the installer, check the tag and the release's `SHA256SUMS` @@ -333,7 +333,7 @@ then `dck init …` after acceptance. ### Step 4 — Record and validate -`python3 ../../shared/config.py enable devcontainer --version v1.3.0 --repo `, +`python3 ../../shared/config.py enable devcontainer --version v1.4.0 --repo `, then validate what was rendered: - `dck doctor --json` — interface 2, repo config valid, no drift; @@ -376,7 +376,7 @@ plan simply declares the host command instead. ## Validation checklist (component 4 — mirrored from SPEC §8) 1. `SKILL.md`, `SPEC.md`, `addon.json`, `templates/INTEGRATION.md` exist; the - descriptor pins `DailybotHQ/devcontainer-kit` `v1.3.0`, interface 2; no + descriptor pins `DailybotHQ/devcontainer-kit` `v1.4.0`, interface 2; no template, Dockerfile, compose file, entrypoint or `dev.sh` copy ships here. 2. `dck doctor --json` reports interface 2, a valid repo config and no drift. 3. Existing files were changed only through accepted render diffs, each diff --git a/.agents/skills/deepworkplan/addons/devcontainer/SPEC.md b/.agents/skills/deepworkplan/addons/devcontainer/SPEC.md index 66a9392..24e9fa1 100644 --- a/.agents/skills/deepworkplan/addons/devcontainer/SPEC.md +++ b/.agents/skills/deepworkplan/addons/devcontainer/SPEC.md @@ -16,8 +16,8 @@ the kit's options, the registry record and the validation. | Field | Value | |-------|-------| | **Version** | 3.0.0 | -| **Status** | Stable — per-repository Dockerfile, no shared base image (devcontainer-kit `v1.3.0`, interface 2); supersedes 2.x (base-image flavours, interface 1) | -| **Product pin** | `DailybotHQ/devcontainer-kit` `v1.3.0`, interface `2`; skill `dck-dockerfile` at the same tag | +| **Status** | Stable — per-repository Dockerfile, no shared base image (devcontainer-kit `v1.4.0`, interface 2); supersedes 2.x (base-image flavours, interface 1) | +| **Product pin** | `DailybotHQ/devcontainer-kit` `v1.4.0`, interface `2`; skill `dck-dockerfile` at the same tag | | **Companions** | `SKILL.md`, `addon.json`, `templates/INTEGRATION.md`, `../README.md`, `../../spec/ADDONS.md` | ## 1. Conventions @@ -59,11 +59,11 @@ volume, CLI or profile file. - Explicit opt-in (`onboard` Phase 7b); a decline writes nothing. - Install the kit: - `git clone --branch v1.3.0 https://github.com/DailybotHQ/devcontainer-kit` then + `git clone --branch v1.4.0 https://github.com/DailybotHQ/devcontainer-kit` then `./devcontainer-kit/install.sh`. A fetch-and-execute pipeline **MUST NOT** appear in this pack's text. - The addon **SHOULD** offer the skill with - `npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.3.0 --skill dck-dockerfile -y` + `npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.4.0 --skill dck-dockerfile -y` (repo-local, recorded in `skills-lock.json`); the install **MUST** name the exact tag in that tree-URL form. - **The layout.** The render produces exactly @@ -93,7 +93,7 @@ volume, CLI or profile file. same verified release tarball, linked into every agent's skills directory at each start, so a recreate keeps them; the addon installs no second copy. - On acceptance: `addons.devcontainer` = `{"enabled": true, "version": - "v1.3.0"}` via `shared/config.py enable`. + "v1.4.0"}` via `shared/config.py enable`. ## 6. Security Defaults (inherited, never weakened) @@ -225,8 +225,8 @@ addon's container profile): enable the kit's Herdr machine option; `dck up` `~/.ssh/config` include and **MUST** be run only with its own explicit approval. Peers then run the pinned herdr-peers skill inside the container (`../herdr/install.md` §3); every image since `v0.3.5` carries herdr-peers -(`v1.3.0` bakes `v1.3.1`, autopilot and the loop included; the herdr addon -itself pins `v2.1.0`). The +(`v1.4.0` bakes `v2.1.0`: autopilot, the loop, the brain and the fleet UI +included; the herdr addon itself pins `v2.2.0`). The kit's `[herdr] layout` key (`"standard"`: App · Editor · Development · Agents, created by `dck up`; `"none"` skips it) is the kit's choice, and the addon passes the person's preference without adding its own. The optional @@ -257,7 +257,7 @@ kit older than `v0.3.3`, the lead's brief names the value and a Codex pane 1. `SKILL.md`, `SPEC.md`, `addon.json`, `templates/INTEGRATION.md` exist; no layout, Dockerfile, compose, entrypoint, `dev.sh` or image copy ships in - this folder; `addon.json` pins `DailybotHQ/devcontainer-kit` `v1.3.0`, + this folder; `addon.json` pins `DailybotHQ/devcontainer-kit` `v1.4.0`, interface 2. 2. `dck doctor --json`: interface 2; repo config valid; drift reported. 3. Existing files changed only through accepted render diffs with diff --git a/.agents/skills/deepworkplan/addons/devcontainer/addon.json b/.agents/skills/deepworkplan/addons/devcontainer/addon.json index d3afd59..377f1c4 100644 --- a/.agents/skills/deepworkplan/addons/devcontainer/addon.json +++ b/.agents/skills/deepworkplan/addons/devcontainer/addon.json @@ -1,7 +1,7 @@ { "schema": "https://deepworkplan.com/schema/addon-descriptor/v1.json", "key": "devcontainer", - "product": { "repo": "DailybotHQ/devcontainer-kit", "tag": "v1.3.0", "interface": 2 }, + "product": { "repo": "DailybotHQ/devcontainer-kit", "tag": "v1.4.0", "interface": 2 }, "detect": { "command": "dck doctor --json", "interface_from": "json:interface" }, "provides_abilities": [], "requires_grants": [] diff --git a/.agents/skills/deepworkplan/addons/herdr/SKILL.md b/.agents/skills/deepworkplan/addons/herdr/SKILL.md index 44fa0e7..f664c65 100644 --- a/.agents/skills/deepworkplan/addons/herdr/SKILL.md +++ b/.agents/skills/deepworkplan/addons/herdr/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-herdr -description: Optional DeepWorkPlan addon that integrates herdr-peers (DailybotHQ/herdr-peers pinned at v2.1.0, protocol 1 or 2) as the interactive delegation transport - a thin integrator that detects the herdr-peers helper, offers it (never imposes it) from onboard Phase 7b, documents the pinned skill installs (herdr-peers and Herdr's official skill), records the acceptance in the .dwp/config.json addon registry, and maps a v7 plan's delegation operations onto one herdr-peers ask to a peer pane on any machine, with every delegation recorded in the plan journal. The message protocol lives in herdr-peers, never here. Never required, never a conformance gate. -version: "8.0.1" +description: Optional DeepWorkPlan addon that integrates herdr-peers (DailybotHQ/herdr-peers pinned at v2.2.0, protocol 1 or 2) as the interactive delegation transport - a thin integrator that detects the herdr-peers helper, offers it (never imposes it) from onboard Phase 7b, documents the pinned skill installs (herdr-peers and Herdr's official skill), records the acceptance in the .dwp/config.json addon registry, and maps a v7 plan's delegation operations onto one herdr-peers ask to a peer pane on any machine, with every delegation recorded in the plan journal. The message protocol lives in herdr-peers, never here. Never required, never a conformance gate. +version: "8.0.2" documentation_url: https://deepworkplan.com/kit/herdr user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write @@ -26,7 +26,7 @@ the install lines, the transport mapping and the journaling rule. | Pin | Value | |-----|-------| | Product | `DailybotHQ/herdr-peers` | -| Tag | `v2.1.0` (protocols 1 and 2 accepted; the loop since `v1.3.0` and lead appointment, the brain and the plan-queue consumer since `v2.0.0`; native debates since `v1.1.0`, the optional autopilot since `v1.2.0`; the first stable release, `v1.0.0`, committed the interface to semantic versioning) | +| Tag | `v2.2.0` (protocols 1 and 2 accepted; the loop since `v1.3.0` and lead appointment, the brain and the plan-queue consumer since `v2.0.0`; native debates since `v1.1.0`, the optional autopilot since `v1.2.0`; the first stable release, `v1.0.0`, committed the interface to semantic versioning; revive — `autopilot --loop --revive` launches one fresh agent for a plan whose lead and successors are gone, its `via: revive` record adopted only on the daemon's machine — since `v2.2.0`) | | Interface | `1` or `2` (`herdr-peers --version` → `(protocol N)`; `metadata.protocol: N` in its `SKILL.md`; protocol 2 is additive — every protocol-1 surface is intact) | | Depends on | Herdr's official skill, pinned `herdrdev/herdr@v0.9.3` | | Registry key | `herdr` (`.dwp/config.json` → `addons.herdr`) | @@ -97,7 +97,7 @@ its own documented paths, never a piped installer. ### Step 3 — Record -`python3 ../../shared/config.py enable herdr --version v2.1.0 --repo `. +`python3 ../../shared/config.py enable herdr --version v2.2.0 --repo `. Enabling grants nothing: delegation still needs the plan's grant. ### Step 4 — Transport (during execute) @@ -211,7 +211,7 @@ As of v1.2.2 it also answers a question shown with a preview beside its options, and recognises the recommended mark in Spanish, French, German and Italian. Reference: -`https://github.com/DailybotHQ/herdr-peers/blob/v2.1.0/skills/herdr-peers/autopilot.md`. +`https://github.com/DailybotHQ/herdr-peers/blob/v2.2.0/skills/herdr-peers/autopilot.md`. ## Plan loop (herdr-peers `v1.3.0` and later) @@ -288,7 +288,7 @@ cross-cutting, settled by nothing in the repository — through a herdr-peers 1. `SKILL.md`, `SPEC.md`, `install.md`, `addon.json`, `templates/INTEGRATION.md` exist; no protocol copy ships here. -2. The descriptor pins `DailybotHQ/herdr-peers` `v2.1.0`, interface 1 or 2, +2. The descriptor pins `DailybotHQ/herdr-peers` `v2.2.0`, interface 1 or 2, transport `interactive`. 3. Every install line names an exact tag. 4. The registry entry exists only after acceptance. diff --git a/.agents/skills/deepworkplan/addons/herdr/SPEC.md b/.agents/skills/deepworkplan/addons/herdr/SPEC.md index cf1b7df..15fb421 100644 --- a/.agents/skills/deepworkplan/addons/herdr/SPEC.md +++ b/.agents/skills/deepworkplan/addons/herdr/SPEC.md @@ -18,7 +18,7 @@ rule. |-------|-------| | **Version** | 0.3.0 | | **Status** | Stable (DeepWorkPlan 7.0.0) | -| **Product pin** | `DailybotHQ/herdr-peers` `v2.1.0`, protocol/interface `1` or `2`; depends on `herdrdev/herdr@v0.9.3` (skill `herdr`) | +| **Product pin** | `DailybotHQ/herdr-peers` `v2.2.0`, protocol/interface `1` or `2`; depends on `herdrdev/herdr@v0.9.3` (skill `herdr`) | | **Companions** | `SKILL.md`, `addon.json`, `install.md`, `templates/INTEGRATION.md`, `../README.md`, `../../spec/ADDONS.md`, `../../execute/delegation.md` | ## 1. Conventions @@ -46,7 +46,7 @@ recipes — those drift; the pinned skill is the single source. ## 4. Detection - Read-only: `command -v herdr`, `command -v herdr-peers`, - `herdr-peers --version` (expect `herdr-peers 2.1.0 (protocol 2)`; a protocol-1 release also satisfies the descriptor — the accepted set is [1, 2]). + `herdr-peers --version` (expect `herdr-peers 2.2.0 (protocol 2)`; a protocol-1 release also satisfies the descriptor — the accepted set is [1, 2]). - A protocol outside the descriptor's accepted set (`[1, 2]`) **MUST** be one warning and "not available". - The transport is usable only inside Herdr (`HERDR_ENV=1`); outside it the addon is installed but not usable in that session — recorded, not an @@ -56,11 +56,11 @@ recipes — those drift; the pinned skill is the single source. - Explicit opt-in (`onboard` Phase 7b); a decline writes nothing. - Installs (`install.md`) **MUST** name exact tags: - `npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.1.0 --skill herdr-peers -g -y` + `npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.2.0 --skill herdr-peers -g -y` and `npx --yes skills add https://github.com/herdrdev/herdr/tree/v0.9.3 --skill herdr -g -y`. Herdr itself is installed through its own documented paths; a fetch-and-execute pipeline **MUST NOT** appear in this pack's text. -- On acceptance: `addons.herdr` = `{"enabled": true, "version": "v2.1.0"}` +- On acceptance: `addons.herdr` = `{"enabled": true, "version": "v2.2.0"}` via `shared/config.py enable`. Enabling grants no plan any authority. ## 6. The Transport (v7 delegation) @@ -258,7 +258,7 @@ Nothing blocks `onboard`, `create`, `execute` or `verify`. 1. `SKILL.md`, `SPEC.md`, `install.md`, `addon.json`, `templates/INTEGRATION.md` exist; no protocol file ships in this folder. -2. `addon.json`: key `herdr`, product `DailybotHQ/herdr-peers` `v2.1.0`, +2. `addon.json`: key `herdr`, product `DailybotHQ/herdr-peers` `v2.2.0`, interface 1 or 2 (the descriptor's accepted list), transport `interactive`. 3. Every install line pins a tag; no pipeline text. 4. The registry entry exists only after acceptance. diff --git a/.agents/skills/deepworkplan/addons/herdr/addon.json b/.agents/skills/deepworkplan/addons/herdr/addon.json index 6d90dba..c8e42e5 100644 --- a/.agents/skills/deepworkplan/addons/herdr/addon.json +++ b/.agents/skills/deepworkplan/addons/herdr/addon.json @@ -3,7 +3,7 @@ "key": "herdr", "product": { "repo": "DailybotHQ/herdr-peers", - "tag": "v2.1.0", + "tag": "v2.2.0", "interface": [ 1, 2 diff --git a/.agents/skills/deepworkplan/addons/herdr/install.md b/.agents/skills/deepworkplan/addons/herdr/install.md index 02e06f7..95a99ec 100644 --- a/.agents/skills/deepworkplan/addons/herdr/install.md +++ b/.agents/skills/deepworkplan/addons/herdr/install.md @@ -17,7 +17,7 @@ the pinned official skill). ``` npx --yes skills add https://github.com/herdrdev/herdr/tree/v0.9.3 --skill herdr -g -y -npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.1.0 --skill herdr-peers -g -y +npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.2.0 --skill herdr-peers -g -y ``` Both `-y` flags are required in an agent's non-interactive shell (`npx @@ -25,7 +25,7 @@ Both `-y` flags are required in an agent's non-interactive shell (`npx The first is Herdr's official skill (the authority for every `herdr` command; `herdr --skill` prints the copy matching the installed binary). The second installs the herdr-peers skill and its helper script. Verify: -`herdr-peers --version` → `herdr-peers 2.1.0 (protocol 2)`. +`herdr-peers --version` → `herdr-peers 2.2.0 (protocol 2)`. **Plan loop (herdr-peers v1.3.0 and later).** To have open Deep Work Plans run to their end without polling each lead, a human starts the loop daemon @@ -46,7 +46,7 @@ For a scoped trial in one repository without touching `$HOME` (F-10), install the helper skill repo-locally — drop `-g`: ``` -npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.1.0 --skill herdr-peers -y +npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.2.0 --skill herdr-peers -y ``` It lands under the repository's agent skills directory (e.g. @@ -84,5 +84,5 @@ host profile — this addon describes them, never sets them. ## 4. Record the acceptance ``` -python3 /shared/config.py enable herdr --version v2.1.0 --repo +python3 /shared/config.py enable herdr --version v2.2.0 --repo ``` diff --git a/.agents/skills/deepworkplan/addons/machine-installs.md b/.agents/skills/deepworkplan/addons/machine-installs.md index 61fd6fa..e61a454 100644 --- a/.agents/skills/deepworkplan/addons/machine-installs.md +++ b/.agents/skills/deepworkplan/addons/machine-installs.md @@ -27,10 +27,10 @@ echo "d8057636d357ba056ab8c8a7feec58d31b53cb58c91d943109b7f22590b5cca3 cak.SHA2 devcontainer-kit (`devcontainer`): ```bash -git clone --branch v1.3.0 --depth 1 https://github.com/DailybotHQ/devcontainer-kit dck -git -C dck describe --tags --exact-match # must print v1.3.0 -curl -fsSL https://github.com/DailybotHQ/devcontainer-kit/releases/download/v1.3.0/SHA256SUMS -o dck.SHA256SUMS -echo "663b06f3be1108b93d401e8b9ec9da77b1f6953b86a98729bf54a8bfc5fae969 dck.SHA256SUMS" | shasum -a 256 -c # the pinned digest +git clone --branch v1.4.0 --depth 1 https://github.com/DailybotHQ/devcontainer-kit dck +git -C dck describe --tags --exact-match # must print v1.4.0 +curl -fsSL https://github.com/DailybotHQ/devcontainer-kit/releases/download/v1.4.0/SHA256SUMS -o dck.SHA256SUMS +echo "67761d9e45c9238e07f51ee13d67a1dea5f06f668c9cd39a0df66f8a663344f2 dck.SHA256SUMS" | shasum -a 256 -c # the pinned digest (cd dck && shasum -a 256 -c --ignore-missing ../dck.SHA256SUMS) # must exit 0 (cd dck && shasum -a 256 -c --ignore-missing ../dck.SHA256SUMS | grep -c ': OK$') # must print a number above 0 ./dck/install.sh diff --git a/.agents/skills/deepworkplan/addons/vim/SKILL.md b/.agents/skills/deepworkplan/addons/vim/SKILL.md index 022283b..4b5a52e 100644 --- a/.agents/skills/deepworkplan/addons/vim/SKILL.md +++ b/.agents/skills/deepworkplan/addons/vim/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-addon-vim description: Optional DeepWorkPlan addon that offers DeepWorkPlan Vim, the terminal editor for Deep Work Plan (Neovim 0.12+, its own repository DailybotHQ/deepworkplan-vim pinned at v1.1.0), as a machine-level install for the person behind a repository - a thin integrator that reads the product's own addon/surface.json (interface 1) to detect the editor, offers it (never imposes it) from onboard Phase 7b, guides the product's documented, checksum-verified install under an absolute consent gate, and validates the installed surface. Two routes - the full editor today, the Neovim plugin in v7.1. Never required, never a conformance gate, and an existing Neovim config is never overwritten without explicit consent. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com/kit/vim user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/author/SKILL.md b/.agents/skills/deepworkplan/author/SKILL.md index bcaffc5..0df65ec 100644 --- a/.agents/skills/deepworkplan/author/SKILL.md +++ b/.agents/skills/deepworkplan/author/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-author description: Author or update reusable skills, agents, and commands in the current repo — reason about the repo's .agents/ layout, follow the Open Agent Skills frontmatter contract, and keep the .agents/docs/ catalog in sync. Use when a developer wants to create or evolve the repo's agent kit (skills, agents, commands), or runs /skill-create or /agent-create. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/create/SKILL.md b/.agents/skills/deepworkplan/create/SKILL.md index ef0e4b4..1cd50c6 100644 --- a/.agents/skills/deepworkplan/create/SKILL.md +++ b/.agents/skills/deepworkplan/create/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-create description: Create a Deep Work Plan for short or long work. Detect planning intent, materialize a compact Lite proposal first, then retain Lite or expand to Full task files when needed. Supports guided and trust handoff without executing product work. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/create/v6.md b/.agents/skills/deepworkplan/create/v6.md index 66ce236..a390ddc 100644 --- a/.agents/skills/deepworkplan/create/v6.md +++ b/.agents/skills/deepworkplan/create/v6.md @@ -15,8 +15,9 @@ explicit `v7` request writes `https://deepworkplan.com/schema/plan-contract/v7.json` and an explicit `v6` request `https://deepworkplan.com/schema/plan-contract/v6.json`; the rules below apply unchanged to all three. `materialize` derives the manifest and -journal generation from that URL (a v8 plan uses the v7 manifest and -journal line). Existing plans keep their recorded generation. +journal generation from that URL (a v8 plan keeps the v7 manifest line and +writes `journal-event/v8`, projected into `plan-snapshot/v8`). Existing plans +keep their recorded generation. A v6 plan is two authored artifacts plus one guarded sequence: diff --git a/.agents/skills/deepworkplan/execute/SKILL.md b/.agents/skills/deepworkplan/execute/SKILL.md index 6851e5f..1809d20 100644 --- a/.agents/skills/deepworkplan/execute/SKILL.md +++ b/.agents/skills/deepworkplan/execute/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-execute description: Execute Lite or Full Deep Work Plans task-by-task — select validation from the actual surface, preserve state and evidence, recover safely, and finish with the Final Review. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/onboard/SKILL.md b/.agents/skills/deepworkplan/onboard/SKILL.md index 4ae5c5b..7960e3f 100644 --- a/.agents/skills/deepworkplan/onboard/SKILL.md +++ b/.agents/skills/deepworkplan/onboard/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-onboard description: Make any repository AI-first — reason (never template) an adapted AGENTS.md, docs/, per-module docs and .agents/ kit from the real repo, discover and verify its full and scoped validation commands and source-to-test mapping, install the DeepWorkPlan skill, and, for a repository onboarded under an earlier version, perform a targeted, non-destructive, idempotent harness upgrade. Use when the developer wants to onboard or upgrade a repository for AI agents. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/onboard/addons.md b/.agents/skills/deepworkplan/onboard/addons.md index 0436121..7963d29 100644 --- a/.agents/skills/deepworkplan/onboard/addons.md +++ b/.agents/skills/deepworkplan/onboard/addons.md @@ -78,22 +78,22 @@ records its Phase 7a status). Offer the seven optional ones independently: | Addon | Folder | Recommend in trust mode when… | |-------|--------|-------------------------------| -| **Devcontainer support** | [`../addons/devcontainer/`](../addons/devcontainer/SKILL.md) | the repo benefits from a reproducible isolated dev container (most repos with Docker/services). Pinned devcontainer-kit `v1.3.0` plus its `dck-dockerfile` skill; the repository owns its Dockerfile, no shared base image. | +| **Devcontainer support** | [`../addons/devcontainer/`](../addons/devcontainer/SKILL.md) | the repo benefits from a reproducible isolated dev container (most repos with Docker/services). Pinned devcontainer-kit `v1.4.0` plus its `dck-dockerfile` skill; the repository owns its Dockerfile, no shared base image. | | **Dailybot integration** | [`../addons/dailybot/`](../addons/dailybot/SKILL.md) | the developer/team **already uses Dailybot** or asks for team progress reporting — **do NOT auto-install for everyone**. | | **Dependency upgrade** | [`../addons/dependency-upgrade/`](../addons/dependency-upgrade/SKILL.md) | **near-default** — the repo has **declared dependencies** (any manifest or lockfile): offer **always**, and install the **inert** `/lib-upgrade` delegator under the onboarding consent **unless explicitly declined**. Installing the delegator runs **no** upgrade — upgrades are always explicit, gated work. | | **Design system** | [`../addons/design-system/`](../addons/design-system/SKILL.md) | the repo has a **user-facing interface surface**, detected per profile: when any surface is detected — even an ambiguous one — the evaluation and offer are **mandatory, not skippable**, with the detection rationale recorded. **visual-ui** (stylesheet with CSS custom properties, Tailwind config or `@theme` block, UI components, brand/style guide) is **strongly recommended**; **cli-output** (a CLI rendering library + a deliberate display layer) and **conversational** (a chat SDK or message-composition layer) are **recommended**. Every profile **requires explicit acceptance even in trust mode — none is auto-applied**. **Never offer for a repo with no interface surface** (pure library, headless service, infra-only). | | **agentkit** | [`../addons/agentkit/`](../addons/agentkit/SKILL.md) | the developer wants plans to hand bounded `parallel_safe` tasks to other coding agents (claude, codex, cursor, …) — a machine-level install (`git clone --branch v1.5.0` + `install.sh`), never a repo requirement; delegation additionally needs each plan's `agent_delegation` grant. The kit runs agents in autonomy by default; the `--ask` / `AGENTKIT_PERMISSIONS=ask` opt-out always wins. | -| **Herdr** | [`../addons/herdr/`](../addons/herdr/SKILL.md) | the developer runs coding agents in [Herdr](https://herdr.dev) panes (one machine or several) and wants plans to ask a peer agent to take a task or run a native debate panel (by default, consequential plan decisions are debated; `decisions.debate off` turns it off) — a machine-level install of `herdr-peers@v2.1.0` (+ Herdr's official skill, pinned), never a repo requirement; delegation additionally needs each plan's `agent_delegation` grant. | +| **Herdr** | [`../addons/herdr/`](../addons/herdr/SKILL.md) | the developer runs coding agents in [Herdr](https://herdr.dev) panes (one machine or several) and wants plans to ask a peer agent to take a task or run a native debate panel (by default, consequential plan decisions are debated; `decisions.debate off` turns it off) — a machine-level install of `herdr-peers@v2.2.0` (+ Herdr's official skill, pinned), never a repo requirement; delegation additionally needs each plan's `agent_delegation` grant. | | **DeepWorkPlan Vim** | [`../addons/vim/`](../addons/vim/SKILL.md) | a person on this machine uses Neovim ≥ 0.12 or asks for a terminal editor for plans — a **machine-level** install, never a repo requirement; the editor is never imposed and an existing Neovim config is **never** overwritten without explicit consent (non-interactive runs onto an existing config stop at instructions). Pinned `deepworkplan-vim@v1.1.0`, detected through the product's `addon/surface.json`. | | **AI Diff Reviewer** | [`../addons/ai-diff-reviewer/`](../addons/ai-diff-reviewer/SKILL.md) | **not offered here — installed in Phase 7a** (required local review, baseline since 2.3.0). In Phase 7b only confirm the Flow B (CI Action) opt-in decision if it was left open; never install the CI surface unrequested. | The first addon is **devcontainer support** ([`../addons/devcontainer/SKILL.md`](../addons/devcontainer/SKILL.md) + [`SPEC.md`](../addons/devcontainer/SPEC.md)), a thin integrator of -devcontainer-kit (`dck`, pinned `v1.3.0`). If the developer accepts: read +devcontainer-kit (`dck`, pinned `v1.4.0`). If the developer accepts: read that addon's `SKILL.md` and run its flow — detect the kit (`dck doctor --json`, interface `2`), install it and offer its `dck-dockerfile` skill -(`npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.3.0 --skill dck-dockerfile -y`), +(`npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.4.0 --skill dck-dockerfile -y`), then let the skill (or you, from the stack you detected in Phase 1) reason the service, runtime, ports and agents and render the repository's own layout — `.devcontainer/devcontainer.json`, diff --git a/.agents/skills/deepworkplan/refine/SKILL.md b/.agents/skills/deepworkplan/refine/SKILL.md index 3887715..2263141 100644 --- a/.agents/skills/deepworkplan/refine/SKILL.md +++ b/.agents/skills/deepworkplan/refine/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-refine description: Refine a Deep Work Plan — safely edit scope, add, split or reorder tasks, promote a Lite plan to Full task files, recover a partial promotion, or explicitly migrate a legacy plan, always preserving completed evidence. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/resume/SKILL.md b/.agents/skills/deepworkplan/resume/SKILL.md index e0a7aca..9c222ce 100644 --- a/.agents/skills/deepworkplan/resume/SKILL.md +++ b/.agents/skills/deepworkplan/resume/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-resume description: Resume interrupted Lite or Full Deep Work Plans from durable Markdown and state, including safe recovery of promotions without duplicating completed work or gates. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/shared/queue.py b/.agents/skills/deepworkplan/shared/queue.py index c335715..5d34a0a 100644 --- a/.agents/skills/deepworkplan/shared/queue.py +++ b/.agents/skills/deepworkplan/shared/queue.py @@ -286,6 +286,8 @@ def main(argv=None): raise SystemExit("queue.py: --plan is not a plan id") append(args.dwp, args.plan, args.after, args.start, args.lead) return 0 + if not PLAN_ID.fullmatch(args.plan): + raise SystemExit("queue.py: --plan is not a plan id") set_state(args.dwp, args.plan, args.state, args.lead, args.note) return 0 diff --git a/.agents/skills/deepworkplan/spec/ADDONS.md b/.agents/skills/deepworkplan/spec/ADDONS.md index 81a8e32..514ddf1 100644 --- a/.agents/skills/deepworkplan/spec/ADDONS.md +++ b/.agents/skills/deepworkplan/spec/ADDONS.md @@ -133,19 +133,19 @@ form**; only its CI surface is optional. - An optional addon at `skills/deepworkplan/addons/devcontainer/` that gives a repository a reproducible dev container through **devcontainer-kit** (`dck`; `https://github.com/DailybotHQ/devcontainer-kit`, MIT, its own - release cycle) pinned at `v1.3.0` (interface `2`). The kit owns the + release cycle) pinned at `v1.4.0` (interface `2`). The kit owns the Dockerfile template and its render (`dck init`, which reconciles and never clobbers), the pinned images and tools, the entrypoint, the launcher, SSH agent forwarding, Herdr registration and the `dck-dockerfile` skill; the addon owns detection, the offer, the stack → options reasoning, the registry record and validation. - **Per-repository layout, no shared base image (devcontainer-kit - `v1.3.0`):** the render produces `.devcontainer/devcontainer.json`, + `v1.4.0`):** the render produces `.devcontainer/devcontainer.json`, `docker/local//Dockerfile` (plus its entrypoint), `docker/local/docker-compose.yaml` and `dev.sh`. The Dockerfile starts from the official runtime image pinned by digest; the kit's GHCR base image is not required. The addon offers the skill through - `npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.3.0 --skill dck-dockerfile -y` + `npx --yes skills add https://github.com/DailybotHQ/devcontainer-kit/tree/v1.4.0 --skill dck-dockerfile -y` (repo-local), and the pack keeps no copy of the template. - **Vendor-neutral (7.0.0):** the 1.x in-pack templates and their company-specific requirements are retired; no network, volume, CLI or @@ -348,14 +348,14 @@ form**; only its CI surface is optional. ### 6.6 Herdr (sixth addon — interactive delegation transport, thin integrator) An optional addon integrating **herdr-peers** (`DailybotHQ/herdr-peers`, -MIT, its own release cycle) pinned at `v2.1.0` (protocol/interface `1` or `2`), as +MIT, its own release cycle) pinned at `v2.2.0` (protocol/interface `1` or `2`), as the **interactive** transport of v7 delegation ([`V7_CONTRACT.md`](V7_CONTRACT.md)): one `herdr-peers ask` to a peer agent in a [Herdr](https://herdr.dev) pane on any reachable machine, recorded in the plan journal before the reply is relied on, the reply asserted until the plan's own gates observe the work. `onboard` Phase 7b offers it as an **explicit opt-in**; installs are the pinned skills -(`herdr-peers@v2.1.0`, Herdr's official `herdr@v0.9.3`). +(`herdr-peers@v2.2.0`, Herdr's official `herdr@v0.9.3`). Placement decision (revised for 7.0.0): the peer protocol — stamp, grant, reply, loop guard, depth limit 1, fan-out cap, scope — moved out of the @@ -454,8 +454,8 @@ The shipped set: | `dailybot` | `DailybotHQ/agent-skill` `v3.23.20` | `telemetry` (reporting only, consent-gated) | — | — | | `dependency-upgrade` | in-pack only | — | — | — | | `design-system` | in-pack only | — | — | — | -| `devcontainer` | `DailybotHQ/devcontainer-kit` `v1.3.0`, interface 2 | — | — | — | -| `herdr` | `DailybotHQ/herdr-peers` `v2.1.0`, interface 1 or 2 | `subagents`, `cancel_children` | `agent_delegation` | `interactive` | +| `devcontainer` | `DailybotHQ/devcontainer-kit` `v1.4.0`, interface 2 | — | — | — | +| `herdr` | `DailybotHQ/herdr-peers` `v2.2.0`, interface 1 or 2 | `subagents`, `cancel_children` | `agent_delegation` | `interactive` | | `vim` | `DailybotHQ/deepworkplan-vim` `v1.1.0`, interface 1 | — | — | — | A descriptor is **data**: the pack executes nothing it names except its diff --git a/.agents/skills/deepworkplan/spec/CONFIG.md b/.agents/skills/deepworkplan/spec/CONFIG.md index 5ebfd07..a51631e 100644 --- a/.agents/skills/deepworkplan/spec/CONFIG.md +++ b/.agents/skills/deepworkplan/spec/CONFIG.md @@ -34,9 +34,9 @@ Both files share one shape: "benchmark": { "enabled": true, "learnings": true }, "addons": { "ai-diff-reviewer": { "enabled": true, "version": "v3.3.16" }, - "herdr": { "enabled": true, "version": "v2.1.0" }, + "herdr": { "enabled": true, "version": "v2.2.0" }, "agentkit": { "enabled": false }, - "devcontainer": { "enabled": true, "version": "v1.3.0" }, + "devcontainer": { "enabled": true, "version": "v1.4.0" }, "vim": { "enabled": true, "version": "v1.1.0" }, "dailybot": { "enabled": true, "version": "v3.23.20" } } diff --git a/.agents/skills/deepworkplan/spec/LOOP_ENGINEERING.md b/.agents/skills/deepworkplan/spec/LOOP_ENGINEERING.md index 902804e..588c6b8 100644 --- a/.agents/skills/deepworkplan/spec/LOOP_ENGINEERING.md +++ b/.agents/skills/deepworkplan/spec/LOOP_ENGINEERING.md @@ -1,7 +1,8 @@ # Loop Engineering (normative, v8) > Status: normative for the v8 generation. The loop's machinery lives in -> herdr-peers (`autopilot --loop --appoint --brain`, the fleet map and UI, +> herdr-peers (`autopilot --loop --appoint --brain`, optionally `--revive`, +> the fleet map and UI, > the plan-queue consumer); this section defines what a **plan** records so > the loop can carry it to the end, and nothing more. The key words MUST, > MUST NOT, SHOULD and MAY are used as in RFC 2119. @@ -28,7 +29,7 @@ within the plan's recorded authority. If the lead pane is gone, the daemon MAY prompt the first reachable successor to run `lead takeover`; the helper MUST check whether takeover is allowed. The daemon MUST NOT write the lead record. A peer outside the recorded succession MAY become lead only through -Appointment below, by its own takeover, never by the daemon. +Appointment or Revive below, by its own takeover, never by the daemon. **Human-started daemon and authority.** A human MUST start autopilot. The background daemon MAY cover enabled machines and sends fixed prompts; a prompt @@ -43,6 +44,17 @@ daemon MAY prompt the first eligible live lane to request appointment; the helper MUST check the conditions again. A new lead MUST run `lead verify` before a merge, tag, or release. +**Revive.** Revive MUST require a human start of the daemon with +`--revive`; that start is the grant. When a plan's lead and every member of +its succession and lanes are gone and none can take over, the daemon MAY +launch one fresh agent in the plan's checkout and brief it to run `lead +takeover --reason revive`. The helper MUST accept that takeover only with the +daemon's one-time ticket and only after its own checks find every member +gone, and the record is adopted only on the daemon's machine. A stalled plan +whose lead is live MUST NOT be taken over: the daemon MAY ask that lead once +to hand over. Revive is capped per plan and fleet-wide, and a revived lead, +like an appointed one, MUST run `lead verify` before a merge, tag, or release. + **Queue, events, and fleet map.** When a queued item is ready (its `after` plan is completed, or it has none) and its start is `prompt-lead`, the daemon MAY prompt its named lead to start it through the plan tool's execute flow; @@ -52,8 +64,8 @@ plans, and their roles; `fleet ui` shows the map live. The daemon MAY read the queue and MUST NOT write it. These behaviors are the optional Herdr integration, documented in -[herdr-peers v2.1.0 `autopilot.md` §§1–9](https://github.com/DailybotHQ/herdr-peers/blob/v2.1.0/skills/herdr-peers/autopilot.md) -and [herdr-peers v2.1.0 `protocol.md` §12](https://github.com/DailybotHQ/herdr-peers/blob/v2.1.0/skills/herdr-peers/protocol.md#12-leadership-lead-notices-and-fencing). +[herdr-peers v2.2.0 `autopilot.md` §§1–9](https://github.com/DailybotHQ/herdr-peers/blob/v2.2.0/skills/herdr-peers/autopilot.md) +and [herdr-peers v2.2.0 `protocol.md` §12](https://github.com/DailybotHQ/herdr-peers/blob/v2.2.0/skills/herdr-peers/protocol.md#12-leadership-lead-notices-and-fencing). ## 2. The `autonomy` block (plan-contract/v8) @@ -172,3 +184,10 @@ shape and its contract pointer do not change, so a new manifest URL would add a generation without a difference. A conformance checker MUST pair a v7 manifest with a v8 contract. v6 and v7 plans keep their records byte for byte. + +**Erratum (8.0.1).** The `description` of the frozen +`schema/plan-contract-v8.schema.json` says the journal-event set is unchanged +from v7. That sentence predates the structured blocker (§3): this section and +`schema/journal-event-v8.schema.json` are normative, and a v8 journal carries +the `blocker` event. The schema's bytes stay frozen; only the prose of its +description is superseded. diff --git a/.agents/skills/deepworkplan/spec/V7_ROADMAP.md b/.agents/skills/deepworkplan/spec/V7_ROADMAP.md index ee2c261..eb86c55 100644 --- a/.agents/skills/deepworkplan/spec/V7_ROADMAP.md +++ b/.agents/skills/deepworkplan/spec/V7_ROADMAP.md @@ -27,7 +27,7 @@ number), and the pack carries a **thin integrator** for it — never a copy. | **Addon-provided abilities** | effective abilities = host ∪ abilities of enabled, valid, detected, interface-compatible addons; computed per call, never persisted; an ability is never authority or consent ([`V7_ABILITIES.md`](V7_ABILITIES.md)). | | **v7 contract generation** | `plan-contract/v7` (v6 + `parallel_safe`), `journal-event/v7` (v6 + `delegation`), `plan-manifest/v7`; default for new plans; v6 plans unchanged ([`V7_CONTRACT.md`](V7_CONTRACT.md)). | | **Delegation** | `ledger.py delegate launch|observe|collect|cancel` behind a recorded gate (grant, marker, ability); `execute/delegation.md`; a delegate's result stays `asserted` until the plan's own gates observe it. | -| **Thin integrators** | `agentkit` → `coding-agents-kit@v1.5.0` (headless transport, `ak run`; autonomy by default with an always-winning opt-out since `v0.2.0`); `herdr` → `herdr-peers@v2.1.0` (interactive transport and native debate panels; stamp `[herdr-peers]`, protocol owned by herdr-peers); `devcontainer` → `devcontainer-kit@v1.3.0` (`dck init` and the `dck-dockerfile` skill, interface 2, per-repository Dockerfile, vendor-neutral); `vim` → `deepworkplan-vim@v1.1.0` (surface-driven editor offer). | +| **Thin integrators** | `agentkit` → `coding-agents-kit@v1.5.0` (headless transport, `ak run`; autonomy by default with an always-winning opt-out since `v0.2.0`); `herdr` → `herdr-peers@v2.2.0` (interactive transport and native debate panels; stamp `[herdr-peers]`, protocol owned by herdr-peers); `devcontainer` → `devcontainer-kit@v1.4.0` (`dck init` and the `dck-dockerfile` skill, interface 2, per-repository Dockerfile, vendor-neutral); `vim` → `deepworkplan-vim@v1.1.0` (surface-driven editor offer). | | **Pre-release channel** | `prerelease.yml` cuts `X.Y.Z-beta.N` on dispatch (never `latest`, with `SHA256SUMS`); stable releases ignore pre-release tags and graduate only on `[graduate]`. | | **Standard** | DWP standard **7.0.0** (normative additions above); `6.0.0` declarations stay valid. | diff --git a/.agents/skills/deepworkplan/status/SKILL.md b/.agents/skills/deepworkplan/status/SKILL.md index d0f6d7a..36c35d6 100644 --- a/.agents/skills/deepworkplan/status/SKILL.md +++ b/.agents/skills/deepworkplan/status/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-status description: Report Lite or Full Deep Work Plan status — format, approval, readiness, progress, checkpoint, blockers and Markdown/state consistency — without modifying anything. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob diff --git a/.agents/skills/deepworkplan/upgrade/SKILL.md b/.agents/skills/deepworkplan/upgrade/SKILL.md index 064abad..0871653 100644 --- a/.agents/skills/deepworkplan/upgrade/SKILL.md +++ b/.agents/skills/deepworkplan/upgrade/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-upgrade description: Check whether a newer DeepWorkPlan skill and DWP standard exists and — only after the developer explicitly accepts — install the latest published tag through the documented channel and re-run onboarding exactly as if https://deepworkplan.com/init.md were executed fresh, preserving every plan under .dwp/ and surfacing local adaptations instead of silently overwriting them. Use when the developer asks to upgrade, update, or refresh DWP in a repository that already has it installed. Do not use it to onboard a repo for the first time (that is the onboard sub-skill) or to migrate an old plan's shape (that is refine migrate, and plans are never migrated by an upgrade). -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob, Edit, Write diff --git a/.agents/skills/deepworkplan/verify/SKILL.md b/.agents/skills/deepworkplan/verify/SKILL.md index a7f8687..3fc12d3 100644 --- a/.agents/skills/deepworkplan/verify/SKILL.md +++ b/.agents/skills/deepworkplan/verify/SKILL.md @@ -1,7 +1,7 @@ --- name: deepworkplan-verify description: Verify that a repository is DeepWorkPlan-conformant (AI-first) and that its plans are well-formed, producing an objective pass/fail report. Use when the developer asks to verify, audit, or check conformance of a repo or a plan. -version: "8.0.1" +version: "8.0.2" documentation_url: https://deepworkplan.com user-invocable: true allowed-tools: Bash, Read, Grep, Glob diff --git a/.agents/skills/deepworkplan/verify/compliance_audit.py b/.agents/skills/deepworkplan/verify/compliance_audit.py index d525096..0dd45b1 100644 --- a/.agents/skills/deepworkplan/verify/compliance_audit.py +++ b/.agents/skills/deepworkplan/verify/compliance_audit.py @@ -37,6 +37,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, 'shared')) import ledger # noqa: E402 (read-side helpers only: PlanRecords, snapshot) +import contract_v6 # noqa: E402 (contract_generation only) RECORD_SCHEMAS = ('plan-manifest/v6.json', 'plan-manifest/v7.json') _FINAL_REVIEW = re.compile(r'final[-_ ]?review', re.IGNORECASE) @@ -58,7 +59,12 @@ def _has_human_note(plan_dir): def generation(plan_dir): - """'v6' / 'v7' for a record-layer plan, else None (never judged here).""" + """'v6' / 'v7' / 'v8' for a record-layer plan, else None (never judged). + + The manifest says whether the plan is on the record layer at all; the + contract names its generation, because a v8 plan keeps the v7 manifest + line (spec/LOOP_ENGINEERING.md section 5). + """ manifest = os.path.join(plan_dir, 'manifest.json') if not os.path.isfile(manifest): return None @@ -66,10 +72,17 @@ def generation(plan_dir): schema = _read_json(manifest).get('schema', '') except (OSError, ValueError): return None + gen = None for suffix in RECORD_SCHEMAS: if schema.endswith(suffix): - return suffix.split('/')[-1][:2] - return None + gen = suffix.split('/')[-1][:2] + if gen is None: + return None + try: + return contract_v6.contract_generation( + _read_json(os.path.join(plan_dir, 'contract.json'))) or gen + except (OSError, ValueError): + return gen def audit_plan(plan_dir): @@ -79,7 +92,7 @@ def audit_plan(plan_dir): gen = generation(plan_dir) if gen is None: return {'plan': name, 'generation': None, - 'skipped': 'not a v6/v7 record-layer plan'} + 'skipped': 'not a v6/v7/v8 record-layer plan'} # The same read side the verifier uses: the live contract (highest # revision under contracts/) and a snapshot derived from the journal, # computed without the lock and without writing. diff --git a/.agents/skills/herdr-peers/SKILL.md b/.agents/skills/herdr-peers/SKILL.md index bc64d33..64e6879 100644 --- a/.agents/skills/herdr-peers/SKILL.md +++ b/.agents/skills/herdr-peers/SKILL.md @@ -1,11 +1,11 @@ --- name: herdr-peers description: "Ask another coding agent in a Herdr pane — on this machine or another one — and get exactly one authorized reply back, with a loop guard, depth limit 1, a fan-out cap and a record of every delegation; send one-way notices; keep a plan's lead with epochs and succession; lead a multi-agent debate to decide, research the state of the art, stress-test or verify (rounds, angles, red teams, counted ballots and claims, a panel seated from idle panes or agentkit accounts); run autopilot, a human-started daemon that accepts the recommended option for every waiting agent, keeps every open plan running (a plan queue, a brain for what rules cannot decide, a lane appointed when a lead and its successors are gone). Use only when the user mentions Herdr, peers, autopilot, a debate, panel or research by several agents, or another agent, pane or machine, or when a plan you are executing delegates a task through Herdr. Do not use merely because parallel work could help. Requires HERDR_ENV=1 and Herdr's official herdr skill." -version: "2.1.0" +version: "2.2.0" license: MIT allowed-tools: Bash, Read metadata: - version: "2.1.0" + version: "2.2.0" protocol: 2 --- @@ -81,7 +81,7 @@ opinion nobody asked for, or to avoid doing the work yourself. | `lead takeover --plan P --as-lane` | A lane of a granted plan takes the lead when the lead, every successor and every earlier lane are gone, probed twice; never with `--reason`; at most two appointments per plan. | | `lead verify --plan P` | **Before any merge, tag or release.** Are you still the lead, here and on the plan's other machines (read-only reports)? Exit 4 when not, or when any machine shows a higher epoch or an earlier lead at the same epoch; exit 5 when a machine could not be reached (unless `--allow-unreached`, recorded). Writes nothing remotely. | | `cancel [--reason R]` | Closes an open ask (yours, or one you decline). | -| `autopilot [run\|start\|stop\|status\|logs]` | **Started by a human only** ([autopilot.md](autopilot.md)). `start` (alias `on`) runs it in the background, detached from the pane, logging to `autopilot.out` in the state directory; `stop` (alias `off`) stops it and waits; `status` shows whether it runs, since when, how, its options and last ten actions; `logs [--lines N] [-f]` prints or follows the background log; no verb runs it in the foreground. Watches every agent on every enabled machine and accepts the option that lets a waiting one go on — a question (the recommended option, then the pre-selected one, then the first), a tool approval, plan approval, folder trust, an update prompt (skipped); follows a dialog of several steps to its end; tells an agent that stopped by asking in prose to continue; retries a pane at its usage limit every 30 minutes. Never touches a login or Claude's bypass acknowledgement, never picks a refusal, free text or a row that widens permissions, never keys a pane without a recognised menu or with a human draft on its input line. Options: `--dry-run`, `--once`, `--passes N` (foreground only), `--interval S` (default 60, minimum 15), `--exclude :`, `--scope`, `--no-nudge`, `--catch-up`. One per server; records every action. With `--loop` it also keeps every open plan running: each enabled machine reports the plans that have a lead record, the idle lead of a plan that is not finished gets one fixed prompt to continue it (after 5 unchanged minutes, never while its lanes work or it awaits a reply), a blocked plan is left, three prompts without progress stop it (`plan_stalled`), and a lead that is gone has its first reachable successor asked to take over; `--notify ""` runs a command (no shell) with a `plan-event-v1` object when a plan stalls, is blocked, loses its lead or completes. With `--loop --brain` it also launches and keeps a dedicated decision agent (ask mode, a Claude account with quota by default via coding-agents-kit 1.3.0+ (1.5.0+ recommended), `--brain-kinds` for others, `--brain-model kind=model`), asks it only what its rules cannot decide, and acts only on one action from a closed list, answered with `autopilot answer ` from the brain's own pane ([autopilot.md](autopilot.md) §6). With `--loop --appoint` (on the human's word) a plan whose lead record carries the appointment grant and whose lead and every successor have been gone 15 minutes, with no progress, gets its first live lane asked to take the lead (`lead takeover --as-lane`; [autopilot.md](autopilot.md) §7). With `--loop` it also starts the next approved plan of a repository's queue (`queue.json` beside its plans, written by the plan tool, read only) by one fixed prompt to its lead ([autopilot.md](autopilot.md) §5.4). | +| `autopilot [run\|start\|stop\|status\|logs]` | **Started by a human only** ([autopilot.md](autopilot.md)). `start` (alias `on`) runs it in the background, detached from the pane, logging to `autopilot.out` in the state directory; `stop` (alias `off`) stops it and waits; `status` shows whether it runs, since when, how, its options and last ten actions; `logs [--lines N] [-f]` prints or follows the background log; no verb runs it in the foreground. Watches every agent on every enabled machine and accepts the option that lets a waiting one go on — a question (the recommended option, then the pre-selected one, then the first), a tool approval, plan approval, folder trust, an update prompt (skipped); follows a dialog of several steps to its end; tells an agent that stopped by asking in prose to continue; retries a pane at its usage limit every 30 minutes. Never touches a login or Claude's bypass acknowledgement, never picks a refusal, free text or a row that widens permissions, never keys a pane without a recognised menu or with a human draft on its input line. Options: `--dry-run`, `--once`, `--passes N` (foreground only), `--interval S` (default 60, minimum 15), `--exclude :`, `--scope`, `--no-nudge`, `--catch-up`. One per server; records every action. With `--loop` it also keeps every open plan running: each enabled machine reports the plans that have a lead record, the idle lead of a plan that is not finished gets one fixed prompt to continue it (after 5 unchanged minutes, never while its lanes work or it awaits a reply), a blocked plan is left, three prompts without progress stop it (`plan_stalled`), and a lead that is gone has its first reachable successor asked to take over; `--notify ""` runs a command (no shell) with a `plan-event-v1` object when a plan stalls, is blocked, loses its lead or completes. With `--loop --brain` it also launches and keeps a dedicated decision agent (ask mode, a Claude account with quota by default via coding-agents-kit 1.3.0+ (1.5.0+ recommended), `--brain-kinds` for others, `--brain-model kind=model`), asks it only what its rules cannot decide, and acts only on one action from a closed list, answered with `autopilot answer ` from the brain's own pane ([autopilot.md](autopilot.md) §6). With `--loop --appoint` (on the human's word) a plan whose lead record carries the appointment grant and whose lead and every successor have been gone 15 minutes, with no progress, gets its first live lane asked to take the lead (`lead takeover --as-lane`; [autopilot.md](autopilot.md) §7). With `--loop --revive` (the human's standing grant) a plan on this machine whose lead is gone (or at a usage limit resetting more than 30 minutes away) and whom nobody in its record can take over gets one fresh agent launched (ak, ask mode, the plan's checkout) that takes it with `lead takeover --reason revive` against the daemon's one-time ticket; a stalled plan's live lead is asked to hand over to it; capped, recorded, never adopted by other machines ([autopilot.md](autopilot.md) §7b). With `--loop` it also starts the next approved plan of a repository's queue (`queue.json` beside its plans, written by the plan tool, read only) by one fixed prompt to its lead ([autopilot.md](autopilot.md) §5.4). | | `autopilot answer ` | **The brain's own verb, for the brain only** — run in the brain's pane, under the key file the daemon names; the daemon checks it and acts only on an allowed action. Never run it as a person or another agent ([autopilot.md](autopilot.md) §6.2). | | `plans [--json]` | The plans led on this machine (`herdr-peers/plans-v1`): lead, epoch, succession, lanes, class (`open`, `blocked`, `completed`, `unreadable`), progress digest. Read-only; works outside a Herdr pane. | | `fleet [--json]` | The map the autopilot loop keeps (`herdr-peers/fleet-v1`): every machine, its agents with repository and branch, the plans and each agent's role. Read-only, from this machine's copy, with its age; exit `7` without one, `5` when stale. Works outside a pane. | diff --git a/.agents/skills/herdr-peers/autopilot.md b/.agents/skills/herdr-peers/autopilot.md index 6e15490..4e48241 100644 --- a/.agents/skills/herdr-peers/autopilot.md +++ b/.agents/skills/herdr-peers/autopilot.md @@ -388,7 +388,8 @@ the brain is never nudged in prose and never treated as a plan's lead. On `autopilot stop` its lease is released and its workspace closed. The fleet map and `fleet ui` show it: state, account, questions in the last hour and its last decision; when a brain was retired, -why (`gone`, `usage_limit`, `start_timeout`, `permission_mode`) and which +why (`gone`, `usage_limit`, `start_timeout`, `permission_mode`, or +`misbehaving` after three denied requests in an hour) and which profiles are excluded. Each retirement is recorded with `why=`, and `autopilot status` prints the brain's line. @@ -503,6 +504,45 @@ Nothing is ever written to git or to another machine. **Residual risk:** during a partition a returning lead and the appointee may both work until it heals; `lead verify` cannot see a machine it cannot reach. +## 7b. Revive (`--revive`) + +With `--loop --revive` — your starting it so is the grant — the daemon carries +on a plan **on its own machine** that has lost its lead and whom nobody in its +record can take over, by launching **one** fresh agent: + +- **When.** The lead is gone (its pane vanished, or no agent) — or at a usage + limit whose own banner says it resets more than 30 minutes away (read by the + daemon and again by the helper; weak evidence, recorded) — and every + successor and lane is gone or at its limit, after the successor prompt and the + appointment (§7) found nobody. A member on another machine, or a plan with no + repository here, is left to today's notice (`plan_no_lead`). +- **How.** An account with quota (`ak pick`, ask mode, the old lead's kind + first, else Claude), leased for six hours with `--purpose revive`; a + workspace of its own whose shell starts in the plan's checkout. Once the agent + is up the daemon writes a one-time ticket and sends one fixed prompt: run + `herdr-peers lead takeover --plan P --reason revive`, then `lead verify`, then + resume the plan from its state. The helper checks the ticket, that the pane is + in the workspace the daemon created, the running `--revive` daemon, the caps in + the lead record and its own two probes (protocol.md §12, *Revive*). +- **A stalled plan whose lead is alive** is never taken from it: the fresh agent + is launched and the stalled lead is asked once to `lead handover` to it; when + it does, the new lead is told to resume. +- **Caps.** One revive per plan per 6 hours, two per plan in all (then only you + are told), two an hour across the fleet. Every launch counts — takeover or + handover, taken, failed or timed out — in a private launch log under the + state dir, so a restart resets no cap; an agent that is not up in 3 minutes, + a takeover not done in 10, a handover not done in 15 is given up: its lease and + its workspace are released. The old lead's pane is never closed and never + sent keys; in handover mode it receives one typed prompt (the handover + request), and only when it is idle with no dialog, limit or human draft on it. +- **Recorded.** `plan_revive_launched`, `plan_revive_briefed`, + `plan_handover_asked`, `plan_revived` and `revive_failed`, each with `why=`; + one `plan_revived` event reaches `--notify`; the map marks the revived lead + and `fleet ui` shows `↻ revived`. + +Login and consent screens stay yours: a revived agent that meets one is left +there and you are told, like any pane. + ## 8. Telling you (`--notify`) diff --git a/.agents/skills/herdr-peers/protocol.md b/.agents/skills/herdr-peers/protocol.md index c4d4fd4..e0d672a 100644 --- a/.agents/skills/herdr-peers/protocol.md +++ b/.agents/skills/herdr-peers/protocol.md @@ -410,6 +410,7 @@ first matching rule decides: | F6 | The sender is the stored lead, epoch = stored + 1, the record names another pane as lead (or none: a release) — a lead never moves itself to the next epoch — and does not widen the appointment grant. | adopted (handover, or release when `lead` is `null`) | | F7 | The sender is in the stored `succession[]`, epoch = stored + 1, the record names the sender as lead, does not widen the appointment grant, and every earlier successor is gone (the receiver checks). | adopted (takeover) | | F8 | **Two records at one epoch** (a partition, or notices crossing): the one that comes first in a single total order over the *previous* record wins — its successors in order (a takeover), then its lanes in order (an appointment); the previous lead is not in it, because a lead never moves itself to the next epoch — and only if its own step from the previous record holds (F6, F7 or F10, with their probes and non-widening checks). The previous record is kept through same-epoch refreshes, so the order holds wherever and in whatever order the notices arrive; without it the first record stays. | adopted (the earlier in the order) | +| F11 | The record says `via: revive` (2.2.0). | rejected: a revive is adopted only on the machine whose daemon granted it | | F10 | The record says `via: appointment`; the stored record carries the grant (`appoint`); the sender is in the stored `lanes[]` and names itself at epoch = stored + 1; `succession`, `appoint` and `lanes` (less the sender) equal the stored ones; and the receiver's own probes find the stored lead, **every** successor and every lane before the sender gone — strongly: an idle pane with a limit banner is not proof, and neither is a member whose machine cannot be reached (a partition or a sleeping laptop); a vanished pane on a machine that answers is. Ties: F8. | adopted (appointment) | | F9 | Anything else. | rejected | @@ -478,6 +479,39 @@ human: see a machine it cannot reach, and says so (exit 5). This is the price of writing nothing remotely. +#### Revive (2.2.0) + +A plan whose lead is gone and whom nobody in its record can take over may be +carried on by a fresh agent — never by a pane the record does not know, except +this one path, and only on the daemon's own machine. + +- **Consent.** The human starting the daemon with `autopilot --loop --revive` + is the standing grant. The daemon launches the agent itself (coding-agents-kit, + ask mode, a workspace in the plan's checkout) and, once it is up, writes a + **one-time ticket** naming the plan, the new pane, the stored epoch, the + workspace it created and its own pid (`0600`, created exclusively, never + through a symlink, 10 minutes). The ticket holds no secret: a process of the + same user could write one, so it is one check among several, never the only one. +- **The revived agent acts itself**: `lead takeover --plan P --reason revive` + accepts only with a matching unexpired ticket, from a pane inside the + ticket's workspace (`herdr pane list`), a ticket naming the running + autopilot's pid with `--revive` among its recorded options, fewer than two + revives of the plan and none in the last six hours (counted in the lead record: + `revives`, `revived_at`), the plan's repository, and its own two probes, a minute apart, that find the lead, every + successor and every lane gone — strongly, or (the lead or a member) at a usage + limit whose own banner resets more than 30 minutes away (weak evidence, + recorded). An unreachable machine is not proof. The ticket is consumed before + the record is written: epoch + 1, `via: revive`, succession and lanes kept. +- **Receivers never adopt a revive** (F11): its record stays on the machine whose + daemon granted it; a 2.0/2.1 receiver refuses the unknown `via` (fail closed). + Normally there is no receiver at all, since every member is gone. +- **Coming back.** The old lead finds a higher epoch and steps down, as after an + appointment; the revived lead runs `lead verify` before any merge, tag or + release. +- **Residual risk.** A same-user process can forge a ticket, as it can read the + brain's key file; the daemon's other checks (a running `--revive` daemon, the + probes) still apply. + ### Plan mirror resolution `DWP_PLAN` may name an existing directory or a plan id. If it is not a diff --git a/.agents/skills/herdr-peers/schemas/fleet-v1.json b/.agents/skills/herdr-peers/schemas/fleet-v1.json index 63c9535..fcb4fc8 100644 --- a/.agents/skills/herdr-peers/schemas/fleet-v1.json +++ b/.agents/skills/herdr-peers/schemas/fleet-v1.json @@ -117,7 +117,7 @@ "object", "null" ], - "description": "Why the last brain was retired (gone, usage_limit, start_timeout, permission_mode), its profile and when (2.0.1).", + "description": "Why the last brain was retired (gone, usage_limit, start_timeout, permission_mode; misbehaving since 2.1.0: three denied requests in an hour), its profile and when (2.0.1).", "additionalProperties": false, "required": [ "why", @@ -584,6 +584,10 @@ null ], "description": "Why a plan is unreadable (2.1.0; optional): missing = no state.json where its lead record points; parse = its state.json does not parse or is too large; shape = a state.json shape this helper does not read (an older or newer plan generation). Null for a readable plan." + }, + "revived": { + "type": "boolean", + "description": "This epoch came by a revive (2.2.0; optional): the daemon, started with --revive, launched a fresh agent that took the orphan plan (lead takeover --reason revive)." } } } diff --git a/.agents/skills/herdr-peers/schemas/plan-event-v1.json b/.agents/skills/herdr-peers/schemas/plan-event-v1.json index c91f01f..bc751db 100644 --- a/.agents/skills/herdr-peers/schemas/plan-event-v1.json +++ b/.agents/skills/herdr-peers/schemas/plan-event-v1.json @@ -30,9 +30,10 @@ "plan_appointed", "needs_human", "plan_queued_started", - "queue_blocked" + "queue_blocked", + "plan_revived" ], - "description": "stalled: three loop prompts without progress; blocked: the plan state records a blocker; no_lead: the lead is gone and no successor could be asked; completed: a plan the loop watched while open has finished. lead_moved: the pane the lead record names now works outside the plan's repository (a stale record); nobody is prompted. appointment_prompted: lead and every successor were gone for the appointment grace, the plan carries the grant and the daemon runs with --appoint, so its first live lane was asked to run `lead takeover --as-lane`; appointed: that lane now leads the plan. needs_human: the brain chose to tell the developer about a stalled or blocked plan or an agent waiting at an unknown screen (plan may be null). plan_queued_started: the next approved plan of a repository's queue was started by prompting its lead; queue_blocked: a queued plan cannot start for a reason the developer must fix (not approved, an amendment pending, no lead named, launch not available)." + "description": "stalled: three loop prompts without progress; blocked: the plan state records a blocker; no_lead: the lead is gone and no successor could be asked; completed: a plan the loop watched while open has finished. lead_moved: the pane the lead record names now works outside the plan's repository (a stale record); nobody is prompted. appointment_prompted: lead and every successor were gone for the appointment grace, the plan carries the grant and the daemon runs with --appoint, so its first live lane was asked to run `lead takeover --as-lane`; appointed: that lane now leads the plan. needs_human: the brain chose to tell the developer about a stalled or blocked plan or an agent waiting at an unknown screen (plan may be null). plan_queued_started: the next approved plan of a repository's queue was started by prompting its lead; queue_blocked: a queued plan cannot start for a reason the developer must fix (not approved, an amendment pending, no lead named, launch not available). plan_revived (2.2.0): the daemon, started with --revive, launched a fresh agent that now leads an orphan plan (lead takeover --reason revive, or a stalled lead's handover to it)." }, "plan": { "type": [ diff --git a/.agents/skills/herdr-peers/scripts/autopilot.py b/.agents/skills/herdr-peers/scripts/autopilot.py index d1e4847..36b1eae 100644 --- a/.agents/skills/herdr-peers/scripts/autopilot.py +++ b/.agents/skills/herdr-peers/scripts/autopilot.py @@ -20,6 +20,7 @@ import hashlib import json +import os import re import time from concurrent.futures import ThreadPoolExecutor @@ -83,6 +84,32 @@ 'they are really gone. If it accepts, continue executing the plan to its end, respecting ' 'its gates, and run `herdr-peers lead verify --plan %s` before any merge, tag or release. ' 'If it refuses, do nothing more.') +REVIVE_TEXT = ( + '[autopilot] Plan %s lost its lead (%s) and nobody in its succession or lanes can take over. ' + 'The developer started the autopilot with --revive, which allows one fresh agent to carry it ' + 'on: you. Run: herdr-peers lead takeover --plan %s --reason revive — the helper checks the ' + 'daemon\'s one-time grant and probes the old lead and every member twice. If it accepts, run ' + '`herdr-peers lead verify --plan %s`, then resume the plan from its state (the plan tool\'s ' + 'resume flow) and execute it to its end, respecting its gates; run `lead verify` again before ' + 'any merge, tag or release. If it refuses, do nothing more.') +HANDOVER_TEXT = ( + '[autopilot] Plan %s has not advanced after %d prompts. The developer started the autopilot ' + 'with --revive: a fresh agent is ready in %s to carry it on. Run: herdr-peers lead handover ' + '--plan %s --to %s — then stop working on this plan.') +HANDED_TEXT = ( + '[autopilot] You now lead plan %s: its stalled lead handed it to you. Run `herdr-peers lead ' + 'verify --plan %s`, then resume the plan from its state (the plan tool\'s resume flow) and ' + 'execute it to its end, respecting its gates; run `lead verify` again before any merge, tag ' + 'or release.') +REVIVE_MIN_RESET = 1800 # a usage limit counts as gone for a revive only when its reset is further away +REVIVE_EVERY = 6 * 3600 # at most one revive per plan in this window +MAX_REVIVES = 2 # revives one daemon makes per plan; then only the human is told +REVIVES_PER_HOUR = 2 # revives fleet-wide in an hour +REVIVE_START = 180 # seconds a revived agent has to come up idle +REVIVE_TICKET_TTL = 600 # seconds the one-time grant ticket lives +REVIVE_HANDOVER = 900 # seconds a stalled lead has to hand over +REVIVE_KINDS = ('claude',) # the kinds a revive picks after the old lead's own kind +REVIVE_ABORT_MARGIN = 120 # seconds past the ticket's life before a briefed revive is given up APPOINT_GRANTS = ('lanes', 'lanes:any-kind') APPOINT_GRACE = 900 # seconds the evidence must hold, with the plan frozen, before an appointment MAX_APPOINTMENTS = 2 # appointments one daemon prompts per plan; then only the human is told @@ -368,11 +395,88 @@ def keys_for(menu, target): REFUSAL_ROW = re.compile(r'^(?:\[[a-z]\]\s+)?(?:no\b|deny\b|reject\b|cancel\b|don\'t\b|do not\b)', re.I) +def parse_iso(stamp): + """Seconds since the epoch of an ISO-8601 UTC stamp, or None.""" + if not isinstance(stamp, str): + return None + try: + import calendar + return calendar.timegm(time.strptime(stamp[:19], '%Y-%m-%dT%H:%M:%S')) + except ValueError: + return None + + def no_esc(kind): """CLIs where Esc on a dialog aborts the whole turn rather than refusing it.""" return kind == 'codex' +RESET_IN = re.compile( + r'(?i)\b(?:try again|resets?|available again)\s+in\s+' + r'(?:(?P\d{1,3})\s*(?:d|days?)\b[\s,]*)?(?:(?P\d{1,3})\s*(?:h|hrs?|hours?)\b[\s,]*)?' + r'(?:(?P\d{1,3})\s*(?:m|mins?|minutes?)\b)?') +# A clock time needs am/pm or HH:MM: "resets 7" or "try again 7 times" is not one. +RESET_AT = re.compile( + r'(?i)\b(?:resets?|try again)(?:\s+at)?\s+(?P\d{1,2})(?:(?::(?P\d{2}))\s*(?Pam|pm)?|\s*(?Pam|pm))\b') +RESET_ZONE = re.compile(r'\((?P[A-Za-z_]+(?:/[A-Za-z_+-]+){0,2})\)') +# Tool output and quoted text: a banner printed there is not the CLI's own. +NOT_A_BANNER = re.compile(r'^\s*(?:[⎿│┃>]|[0-9]+\s*[│|])') + + +def local_zone(): + """This machine's zone name (e.g. America/Bogota) from TZ or /etc/localtime, or None.""" + zone = os.environ.get('TZ', '').lstrip(':') + if zone: + return zone + try: + real = os.path.realpath('/etc/localtime') + except OSError: + return None + return real.split('zoneinfo/', 1)[1] if 'zoneinfo/' in real else None + + +RESET_CLOCK_MAX = 6 * 3600 # a clock-time reset further ahead than this is not believed + + +def limit_reset_seconds(text, now, localtime=time.localtime, zone=None): + """Seconds until the usage limit a screen shows resets, read only from the CLI's + own banner line or the line right after it ("You've hit your limit · resets + 3pm", "… resets at 15:30", "… try again in 2 hours 13 minutes"), or None. + Tool output and quoted lines are never banners. A clock time needs am/pm or + HH:MM and counts only when it is still ahead today and at most RESET_CLOCK_MAX + away — never rolled to the next day (a banner stays on screen after its + reset). A banner naming a time zone other than this machine's is unreadable. + Pure, given `zone`.""" + lines = tail_lines(text or '')[-12:] + for i, line in enumerate(lines): + if NOT_A_BANNER.match(line) or not first_match(LIMIT, line): + continue + for part in [line] + [l for l in lines[i + 1:i + 2] if not NOT_A_BANNER.match(l)]: + found = RESET_IN.search(part) + if found and any(found.group(k) for k in ('d', 'h', 'm')): + return (int(found.group('d') or 0) * 86400 + int(found.group('h') or 0) * 3600 + + int(found.group('m') or 0) * 60) + found = RESET_AT.search(part) + if not found: + continue + named = RESET_ZONE.search(part[found.end():]) + if named and named.group('zone') != (zone if zone is not None else local_zone()): + return None + hour, minute = int(found.group('h')), int(found.group('m') or 0) + ap = (found.group('ap1') or found.group('ap2') or '').lower() + if (ap and not 1 <= hour <= 12) or (not ap and hour > 23) or minute > 59: + return None + if ap: + hour = hour % 12 + (12 if ap == 'pm' else 0) + t = localtime(now) + ahead = time.mktime((t.tm_year, t.tm_mon, t.tm_mday, hour, minute, 0, 0, 0, -1)) - now + if ahead <= 0 or ahead > RESET_CLOCK_MAX: + return None # passed already (a stale banner) or implausibly far: unknown + return int(ahead) + return None + return None + + def deny_decision(text, state, cls, why): """Keys that refuse what a pane waits for: its refusal row when the menu has one, else Esc. Never a Yes, a row that widens permissions, auto mode, or a row @@ -505,6 +609,24 @@ def has_draft(text, state=None): return not PLACEHOLDERS.match(input_text(lines)) +# The input line each CLI draws: a revive types only into a pane that shows its own. +PROMPT_CURSORS = {'claude': '❯>', 'codex': '›'} + + +def shows_input_row(kind, text, state=None): + """True when the pane shows its CLI's own input line (outside a live dialog): + an unknown prompt Herdr labels idle ("Overwrite config? (y/N)") is not one.""" + cursors = PROMPT_CURSORS.get(kind) + if not cursors: + return False + lines = tail_lines(text) + menu = parse_menu(text) + if menu and live(menu, state, lines): + return False + row = re.compile(r'^\s*[%s](?:\s|$)' % re.escape(cursors)) + return any(row.match(line) for line in lines[-8:]) + + def asks_in_prose(text): """True when a finished turn ends by asking the human something.""" lines = tail_lines(text, 30) @@ -559,7 +681,7 @@ class Autopilot(object): def __init__(self, io, dry_run=False, nudge=True, catch_up=False, exclude=(), clock=time.time, sleep=time.sleep, confirm=CONFIRM_DELAY, loop=False, - grace=LEAD_GRACE, appoint=False, appoint_grace=APPOINT_GRACE, brain=None): + grace=LEAD_GRACE, appoint=False, appoint_grace=APPOINT_GRACE, brain=None, revive=False): self.io, self.dry_run, self.nudge, self.catch_up = io, dry_run, nudge, catch_up self.exclude = set(exclude) self.clock, self.sleep, self.confirm = clock, sleep, confirm @@ -570,6 +692,7 @@ def __init__(self, io, dry_run=False, nudge=True, catch_up=False, exclude=(), self.passes = 0 self.grace = grace self.appoint, self.appoint_grace = appoint, appoint_grace # human flag --appoint + self.revive = bool(revive) # human flag --revive: the standing grant for revives self.plans = PlanLoop(self) if loop else None self.quiet = set() # panes never nudged in prose (the brain) self.brain = BrainKeeper(self, brain) if brain and self.plans else None @@ -712,8 +835,12 @@ def attend(self, machine, agent, addr, memo, stale): if choice.action == 'leave': memo.left = digest self.record(addr, kind, choice, 'left') - if choice.cls == 'unknown' and self.brain is not None: - self.brain.ask('screen_unknown', machine, None, {'addr': addr}) + if choice.cls == 'unknown': + save = getattr(self.io, 'save_unknown', None) + if save is not None and not self.dry_run: + save(kind, text) # a sanitized copy for new fixtures; no key is sent + if self.brain is not None: + self.brain.ask('screen_unknown', machine, None, {'addr': addr}) elif state in ('idle', 'done'): if memo.denied and self.nudge and not has_draft(text, state) and not brain: memo.denied = False @@ -743,6 +870,8 @@ def limit(self, machine, pane, addr, kind, memo, choice, text, state): return if now - memo.limit_at < LIMIT_RETRY: return + if self.plans is not None and addr in self.plans.revived_away: + return # a revive carried its plan on: never resume it beside the new lead memo.limit_at = now if not self.nudge or memo.limit_tries >= MAX_LIMIT_RETRIES or has_draft(text, state): return @@ -806,6 +935,10 @@ def __init__(self): self.appointee = None # (address, epoch) of the lane last asked to take the lead self.appointments = 0 self.appointed_epoch = None + self.revive = None # the revive under way: {pane, workspace, kind, profile, mode, why, ...} + self.revive_times = [] # when this daemon launched revives for this plan + self.limit_seen = None # (when, seconds to reset) of the lead's usage limit, read for a revive + self.limit_frozen = None # (since, progress) while the lead sits at its limit class PlanLoop(object): @@ -822,6 +955,8 @@ def __init__(self, ap): self.ap, self.io = ap, ap.io self.machines = {} # machine -> {'at', 'state', 'report'} self.memos = {} # (machine, plan id) -> PlanMemo + self.revive_log = [] # when revives were launched, fleet-wide (an hour is kept) + self.revived_away = set() # old leads' addresses a revive carried the plan away from self.resolve = {} # (machine, plan) -> the blocker the brain allowed its lead to resolve self.queued = set() # (machine, repo, plan) whose lead was prompted to start it self.queue_told = {} # (machine, repo, plan) -> the blocked reason already reported @@ -939,6 +1074,8 @@ def consider(self, machine, plan, by_pane, now, prompted): memo.progress, memo.prompts = plan['progress'], 0 if memo.situation == 'plan_stalled': memo.situation = None + if memo.revive is not None: + self.revive_tick(memo, machine, plan, by_pane, now, prompted) cls = plan['class'] if cls == 'unreadable': return @@ -990,6 +1127,18 @@ def consider(self, machine, plan, by_pane, now, prompted): # Only for an appointment, and only once the screen pass gave up on # its limit (the developer's rule); the 15-minute grace follows. gone = 'usage_limit' + elif self.ap.revive and machine == 'local' and pmemo is not None and pmemo.limit_at \ + and addr not in self.ap.exclude: + # For a revive: the limit has held for the appointment grace with the plan + # frozen, and the lead's own banner line says it resets more than + # REVIVE_MIN_RESET away (read at most every five minutes). + if memo.limit_frozen is None or memo.limit_frozen[1] != plan['progress']: + memo.limit_frozen = (now, plan['progress']) + if memo.limit_seen is None or now - memo.limit_seen[0] >= 300: + memo.limit_seen = (now, limit_reset_seconds(self.io.read(machine, pane) or '', now)) + if memo.limit_seen[1] is not None and memo.limit_seen[1] > REVIVE_MIN_RESET \ + and now - memo.limit_frozen[0] >= self.ap.appoint_grace: + gone = 'usage_limit' if gone: self.succeed(memo, machine, plan, by_pane, addr, gone, prompted) return @@ -1007,7 +1156,10 @@ def consider(self, machine, plan, by_pane, now, prompted): if row.get('state') not in ('idle', 'done'): memo.skip_seq = None return - if memo.situation == 'plan_stalled' or not self.ap.nudge or addr in prompted: + if memo.situation == 'plan_stalled': + self.revive_stalled(memo, machine, plan, by_pane, now) + return + if not self.ap.nudge or addr in prompted: return if pmemo.since is None or now - pmemo.since < self.ap.grace: return # idle is not stopped: its own watcher may still wake it @@ -1026,6 +1178,7 @@ def consider(self, machine, plan, by_pane, now, prompted): return # its screen ruled a prompt out and has not moved since if memo.prompts >= MAX_PLAN_PROMPTS + memo.extra: self.enter(memo, machine, plan, 'plan_stalled', addr, 'gave_up') + self.revive_stalled(memo, machine, plan, by_pane, now) return text = self.io.read(machine, pane) if text is None: @@ -1160,6 +1313,8 @@ def succeed(self, memo, machine, plan, by_pane, addr, reason, prompted): """The lead is gone: ask the first reachable successor to take over, once per epoch. The daemon writes no lead record; the helper's own takeover rules decide.""" + if memo.revive is not None: + return # a revive is under way: its own tick decides if memo.takeover or not self.ap.nudge: return for candidate in plan['succession']: @@ -1188,8 +1343,178 @@ def succeed(self, memo, machine, plan, by_pane, addr, reason, prompted): return if self.appoint(memo, machine, plan, by_pane, prompted): return + if self.revive_orphan(memo, machine, plan, by_pane, reason): + return self.enter(memo, machine, plan, 'plan_no_lead', addr, 'left') + # -- revive (--revive): a fresh agent carries an orphan or stalled plan ---------- + def revive_allowed(self, memo, machine, plan, now): + """True, False, or 'wait' (only the fleet-wide hourly cap is in the way).""" + if not self.ap.revive or not self.ap.nudge or memo.revive is not None: + return False + if machine != 'local' or not plan.get('repo_root'): + return False # D1: only plans on the daemon's own machine (2.3: remote) + lead = local_pane(plan.get('lead')) + if lead is not None and '%s:%s' % (machine, lead) in self.ap.exclude: + return False # an excluded lead's plan is left to the human + # The caps count this daemon's memory, the lead record (takeover revives) and + # the private launch log (every launch, handover or failed ones too), so a + # restart resets nothing. + recorded = plan.get('revives') + recorded = recorded if isinstance(recorded, int) and not isinstance(recorded, bool) else 0 + history = getattr(self.io, 'revive_history', None) + logged = list(history(plan['plan'])) if history is not None else [] + if max(len(memo.revive_times), recorded, len(logged)) >= MAX_REVIVES: + return False + last = max([parse_iso(plan.get('revived_at')) or 0] + memo.revive_times[-1:] + logged) + if last and now - last < REVIVE_EVERY: + return False + if history is not None: + self.revive_log = sorted(set(self.revive_log) | set(history())) + self.revive_log = [t for t in self.revive_log if now - t < 3600] + if len(self.revive_log) >= REVIVES_PER_HOUR: + return 'wait' + return True + + def revive_orphan(self, memo, machine, plan, by_pane, reason): + """Lead gone, no successor asked, no appointment to make: when every member is + gone or at its limit, launch one fresh agent to take the plan. True while a + revive is launched or waits for the hourly cap.""" + now = self.ap.clock() + allowed = self.revive_allowed(memo, machine, plan, now) + if allowed is not True: + return allowed == 'wait' + for member in list(plan['succession']) + list(plan['lanes']): + pane = local_pane(member) + if pane is None: + return False # a member on another machine: not this daemon's to bypass + pmemo = self.ap.panes.get('%s:%s' % (machine, pane)) + if pane in by_pane and not (pmemo and pmemo.limit_at): + return False # a member is here and free of a limit: the other paths decide + return self.revive_launch(memo, machine, plan, 'takeover', reason, now) + + def revive_stalled(self, memo, machine, plan, by_pane, now): + """A stalled plan whose lead is alive: launch a fresh agent and ask the lead, + once, to hand the plan to it (D2). Never a takeover from a live lead.""" + if self.revive_allowed(memo, machine, plan, now) is not True: + return + pane = local_pane(plan['lead']) + if pane is None or pane not in by_pane: + return + self.revive_launch(memo, machine, plan, 'handover', 'stalled', now) + + def revive_launch(self, memo, machine, plan, mode, why, now): + kinds = [memo.lead_kind] if memo.lead_kind else [] + kinds += [k for k in REVIVE_KINDS if k not in kinds] + addr = '%s:-' % machine + if self.ap.dry_run: + self.ap.record(addr, None, Decision('leave', 'plan_revive', why), 'left', plan=plan['plan']) + return True + try: + info = self.io.revive_launch(plan['plan'], plan['repo_root'], kinds) + except Exception: # a refusal or a tool failure: recorded; the notice follows + self.ap.record(addr, None, Decision('leave', 'revive_failed', 'launch'), 'left', plan=plan['plan']) + self.revive_count(memo, plan, now) + return False + memo.revive = dict(info, mode=mode, why=why, epoch=plan['epoch'], lead=plan['lead'], + state='starting', at=now) + self.revive_count(memo, plan, now) + self.ap.record('local:%s' % info['pane'], info.get('kind'), + Decision('prompt', 'plan_revive_launched', why), 'nudged', plan=plan['plan']) + return True + + def revive_count(self, memo, plan, now): + """Count one launch — taken or failed, takeover or handover — here and in the + private launch log, so neither cap is reset by a restart.""" + memo.revive_times.append(now) + self.revive_log.append(now) + note = getattr(self.io, 'revive_note', None) + if note is not None: + note(now, plan['plan']) + + def revive_tick(self, memo, machine, plan, by_pane, now, prompted): + """Drive a revive: brief the new agent once it is up (with the one-time + ticket), or ask the stalled lead to hand over; done when the new pane leads + at a higher epoch; given up, releasing what it launched, past its deadline. + The old lead's pane is never closed or keyed; in handover mode it gets one + typed request, only when it is idle with no dialog, limit or draft.""" + r = memo.revive + pane, new_addr = r['pane'], 'local:%s' % r['pane'] + if local_pane(plan.get('lead')) == pane and plan['epoch'] > r['epoch']: + if r['mode'] == 'handover' and not r.get('handed'): + if not self.revive_can_prompt(machine, pane, by_pane): + return # told once it is free to read it; the plan is its already + r['handed'] = True + prompted.add('%s:%s' % (machine, pane)) # told once this pass: no loop prompt on top + if not self.ap.dry_run: + self.io.prompt(machine, pane, HANDED_TEXT % (plan['plan'], plan['plan'])) + prompted.add('%s:%s' % (machine, pane)) + old = local_pane(r['lead']) + if old is not None: + self.revived_away.add('%s:%s' % (machine, old)) + memo.revive, memo.situation = None, None + self.ap.record(new_addr, r.get('kind'), Decision('leave', 'plan_revived', r['why']), 'left', + plan=plan['plan']) + self.io.event({'schema': EVENT_SCHEMA, 'event': 'plan_revived', 'plan': plan['plan'], + 'machine': machine, 'lead': plan['lead'], 'repo_root': plan['repo_root'], + 'blocker_class': None}, self.ap.dry_run) + return + row = by_pane.get(pane) + if r['state'] == 'starting': + ready = row is not None and row.get('state') in ('idle', 'done') \ + and self.revive_can_prompt(machine, pane, by_pane) + old = local_pane(r['lead']) if r['mode'] == 'handover' else None + if ready and r['mode'] == 'handover' and (old is None or not self.revive_can_prompt(machine, old, by_pane)): + ready = False # the stalled lead is busy, at a dialog or holds a draft: later + if ready: + if r['mode'] == 'takeover': + self.io.revive_ticket(plan['plan'], pane, r['epoch'], REVIVE_TICKET_TTL, r.get('workspace')) + self.io.prompt(machine, pane, REVIVE_TEXT % (plan['plan'], r['why'], plan['plan'], + plan['plan'])) + self.ap.record(new_addr, row.get('agent'), Decision('prompt', 'plan_revive_briefed', + r['why']), 'nudged', plan=plan['plan']) + r['state'] = 'briefed' + else: + self.io.prompt(machine, old, HANDOVER_TEXT % (plan['plan'], MAX_PLAN_PROMPTS, new_addr, + plan['plan'], new_addr)) + self.ap.record('%s:%s' % (machine, old), None, Decision( + 'prompt', 'plan_handover_asked', 'stalled'), 'nudged', plan=plan['plan']) + r['state'] = 'asked' + r['at'] = now + elif now - r['at'] > REVIVE_START: + self.revive_abort(memo, machine, plan, 'start_timeout') + elif r['state'] == 'briefed' and now - r['at'] > REVIVE_TICKET_TTL + REVIVE_ABORT_MARGIN: + self.revive_abort(memo, machine, plan, 'takeover_timeout') + elif r['state'] == 'asked' and now - r['at'] > REVIVE_HANDOVER: + self.revive_abort(memo, machine, plan, 'handover_timeout') + + def revive_can_prompt(self, machine, pane, by_pane): + """The loop's own guards before typing into a pane: idle or done, no dialog, + login or usage limit on its screen, no human draft on its input line.""" + row = by_pane.get(pane) + if row is None or row.get('state') not in ('idle', 'done'): + return False + text = self.io.read(machine, pane) + if text is None: + return False + for seen in (row.get('state'), 'blocked'): # a dialog left on an idle screen counts too + choice = decide(row.get('agent'), seen, text) + if choice.cls == 'unknown': + continue # no menu we know: allowed only with the CLI's own input line (below) + if choice.action in ('keys', 'leave') or choice.cls == 'usage_limit': + return False + if not shows_input_row(row.get('agent'), text, row.get('state')): + return False # an unknown prompt labelled idle: nothing is typed into it + return not has_draft(text, row.get('state')) + + def revive_abort(self, memo, machine, plan, why): + r, memo.revive = memo.revive, None + self.io.revive_release(r.get('kind'), r.get('profile'), r.get('workspace')) + self.ap.record('local:%s' % r['pane'], r.get('kind'), Decision('leave', 'revive_failed', why), 'left', + plan=plan['plan']) + if r['mode'] == 'takeover': + self.enter(memo, machine, plan, 'plan_no_lead', '%s:-' % machine, 'left') + def appoint(self, memo, machine, plan, by_pane, prompted): """Lead and every successor gone, the plan granted and `--appoint` on: after the evidence held APPOINT_GRACE with the plan frozen, ask the @@ -1316,6 +1641,7 @@ def publish(self, listed, now): 'progress': plan.get('progress'), 'updated_at': plan.get('updated_at'), 'state_updated_at': plan.get('state_updated_at'), 'unreadable_reason': plan.get('unreadable_reason'), + 'revived': bool(plan.get('revived')), 'tasks_done': plan.get('tasks_done'), 'tasks_total': plan.get('tasks_total'), 'current_task': plan.get('current_task'), @@ -1360,7 +1686,7 @@ def publish(self, listed, now): MAP_MAX_BYTES = 2 * 1024 * 1024 - 4096 # under the store's 2 MB cap, with room to spare REMOTE_PLAN_KEYS = ('plan', 'class', 'blocker_class', 'progress', 'lead', 'lanes', 'succession', - 'epoch', 'updated_at', 'state_updated_at', 'unreadable_reason', 'repo_root', 'situation', + 'epoch', 'updated_at', 'state_updated_at', 'unreadable_reason', 'revived', 'repo_root', 'situation', 'tasks_done', 'tasks_total', 'current_task') diff --git a/.agents/skills/herdr-peers/scripts/fleet_report.py b/.agents/skills/herdr-peers/scripts/fleet_report.py index c5ef2bf..8e839f8 100644 --- a/.agents/skills/herdr-peers/scripts/fleet_report.py +++ b/.agents/skills/herdr-peers/scripts/fleet_report.py @@ -138,6 +138,12 @@ def lead_record(data): grant = data.get('appoint') rec['appoint'] = grant if grant in APPOINT_GRANTS else None rec['appointed'] = data.get('record_via') == 'appointment' # this epoch came by appointment + rec['revived'] = data.get('record_via') == 'revive' # this epoch came by revive (2.2.0) + # The plan's revive budget, kept in the envelope (2.2.0): survives a daemon restart. + rec['revives'] = data.get('revives') if isinstance(data.get('revives'), int) \ + and not isinstance(data.get('revives'), bool) and 0 <= data['revives'] <= 1000 else 0 + rec['revived_at'] = data.get('revived_at') if isinstance(data.get('revived_at'), str) \ + and TS_RE.fullmatch(data['revived_at']) else None if rec.get('schema') != LEAD_SCHEMA: return None if not isinstance(rec.get('plan'), str) or not PLAN_RE.fullmatch(rec['plan']): @@ -611,6 +617,8 @@ def describe_plan(root, server, rec, panes, git, now=None, logs=None): 'updated_at': rec['updated_at'], 'lead_in_repo': lead_in_repo, 'tasks_done': done, 'tasks_total': total, 'current_task': current, 'detail': detail, 'appoint': rec.get('appoint'), 'appointed': bool(rec.get('appointed')), + 'revived': bool(rec.get('revived')), 'revives': rec.get('revives') or 0, + 'revived_at': rec.get('revived_at'), 'open_asks': open_asks(root, server, lead_pane, now, logs) if lead_local else None, } @@ -721,7 +729,8 @@ def valid_fleet(doc): if not all(_str(p.get(k)) for k in ('class', 'lead', 'repo_root', 'blocker_class', 'situation', 'state_updated_at')): return False - if p.get('unreadable_reason') not in UNREADABLE_REASONS + (None,): + if p.get('unreadable_reason') not in UNREADABLE_REASONS + (None,) \ + or not isinstance(p.get('revived', False), bool): return False for k in ('tasks_done', 'tasks_total', 'epoch'): v = p.get(k) @@ -789,7 +798,11 @@ def valid_report(doc): if not isinstance(plan, dict) or not PLAN_KEYS <= set(plan): return False if plan.get('appoint') not in APPOINT_GRANTS + (None,) \ - or not isinstance(plan.get('appointed'), bool): + or not isinstance(plan.get('appointed'), bool) \ + or not isinstance(plan.get('revived', False), bool) \ + or not (isinstance(plan.get('revives', 0), int) and not isinstance(plan.get('revives', 0), bool)) \ + or not (plan.get('revived_at') is None or (isinstance(plan['revived_at'], str) + and TS_RE.fullmatch(plan['revived_at']))): return False if plan.get('lead_in_repo') not in (True, False, None): return False diff --git a/.agents/skills/herdr-peers/scripts/fleet_ui.py b/.agents/skills/herdr-peers/scripts/fleet_ui.py index e2f4b29..4361f48 100644 --- a/.agents/skills/herdr-peers/scripts/fleet_ui.py +++ b/.agents/skills/herdr-peers/scripts/fleet_ui.py @@ -252,7 +252,7 @@ def __init__(self, machine, label, row): class Plan(object): __slots__ = ('key', 'machine', 'label', 'plan', 'cls', 'lead', 'epoch', 'situation', 'done', 'total', 'current', 'repo', 'blocker_class', 'detail', 'members', 'search', - 'moved', 'why') + 'moved', 'why', 'revived') def __init__(self, machine, label, row): self.machine, self.label = machine, label @@ -271,6 +271,7 @@ def __init__(self, machine, label, row): self.detail = row.get('detail') if isinstance(row.get('detail'), dict) else None self.moved = parse_ts(row.get('state_updated_at')) # when its state last changed (2.1.0 maps) self.why = row.get('unreadable_reason') if row.get('unreadable_reason') in UNREADABLE_WHY else None + self.revived = row.get('revived') is True # its lead came by a revive (2.2.0 maps) self.members = [] # (role, Agent) self.search = ' '.join([self.plan, self.label, self.repo, self.current or '', clean((self.detail or {}).get('title'), 200)]).lower() @@ -724,6 +725,8 @@ def group_header(g, width): badge = SITUATIONS.get(p.situation) or ('BLOCKED' if p.cls == 'blocked' else p.cls.upper()) tone = 'bad' if p.needs_you else ('ok' if p.cls == 'open' else 'dim') line.add('▌', tone).add(' %s ' % badge, tone + '_badge').add(' ') + if p.revived: + line.add('↻ revived ', 'accent') title = clean((p.detail or {}).get('title'), 120) right = [] if p.total: diff --git a/.agents/skills/herdr-peers/scripts/herdr_peers.py b/.agents/skills/herdr-peers/scripts/herdr_peers.py index 27949b4..2d97fc3 100755 --- a/.agents/skills/herdr-peers/scripts/herdr_peers.py +++ b/.agents/skills/herdr-peers/scripts/herdr_peers.py @@ -33,8 +33,9 @@ import subprocess import sys import time +import unicodedata -VERSION = '2.1.0' +VERSION = '2.2.0' PROTOCOL = 2 # the highest protocol this helper speaks (metadata.protocol) BASE_PROTOCOL = 1 # what every message is stamped with, except a granted lead notice SUPPORTED_PROTOCOLS = ('1', '2') @@ -1885,6 +1886,32 @@ def cmd_log(args): # standing appointment grant, and the mark of the epoch an appointment made. APPOINT_GRANTS = ('lanes', 'lanes:any-kind') APPOINT_VIA = 'appointment' +# A revive (2.2.0): a fresh agent the daemon launched takes an orphan plan on the human's +# --revive start flag and the daemon's one-time ticket (protocol.md §12, PLAN_010). +REVIVE_VIA = 'revive' +REVIVE_REASON = 'revive' +REVIVE_TICKET_RE = re.compile(r'revive-[0-9a-f]{16}\.json') +REVIVE_TICKET_SCHEMA = 'herdr-peers/revive-ticket-v1' +REVIVE_LEASE_TTL = '6h' +MAX_REVIVES = 2 # revives per plan, kept in its lead record; then only the human +REVIVE_LOG = 'revive-log.json' +REVIVE_LOG_MAX = 256 # launches remembered (per-plan caps and the hourly one) +REVIVE_EVERY = 6 * 3600 # at most one revive per plan in this window (kept in its lead record) +UNKNOWN_DIR = 'unknown-screens' +UNKNOWN_NAME_RE = re.compile(r'[0-9]{8}T[0-9]{6}Z-[a-z0-9]{1,16}-[0-9a-f]{12}\.txt') +UNKNOWN_MAX = 50 # screens kept; the oldest goes first +UNKNOWN_BYTES = 16384 # per screen +UNKNOWN_LINES = 60 +ANSI_SEQ = re.compile(r'\x1b(?:\[[0-?]*[ -/]*[@-~]|\][^\x07\x1b]*(?:\x07|\x1b\\)|[@-_])') +TOKEN_TAIL = re.compile(r'[A-Za-z0-9_-]{8}$') # a line that ends inside a token +TOKEN_HEAD = re.compile(r'[A-Za-z0-9_-]{8}') # a next line that starts with its rest +PEM_BEGIN = re.compile(r'-----BEGIN [A-Z0-9 ]*-----') +PEM_END = re.compile(r'-----END [A-Z0-9 ]*-----') +# A token's prefix is enough to drop a line: a wrapped or cut token must not escape. +TOKEN_PREFIX = re.compile(r'\b(?:gh[pousr]_[A-Za-z0-9]{4,}|github_pat_\w{4,}|sk-ant-[\w-]{4,}|' + r'sk-(?:proj-)?[A-Za-z0-9]{12,}|xox[abposr]-[\w-]{4,}|AKIA[0-9A-Z]{8,}|' + r'AIza[\w-]{10,})') +LEAD_VIAS = (APPOINT_VIA, REVIVE_VIA) OPTIONAL_LEAD_KEYS = frozenset(['repo_root', 'appoint', 'via']) MAX_APPOINTMENTS = 2 # appointments per plan; past it only the human is told APPOINT_PROBE_GAP = 60 # seconds between the appointee's two probes @@ -1964,8 +1991,8 @@ def lead_record_error(rec): return 'keys must be %s with optional repo_root, appoint, via' % ', '.join(sorted(LEAD_KEYS)) if rec.get('appoint') is not None and rec['appoint'] not in APPOINT_GRANTS: return 'appoint must be one of %s or null' % ', '.join(APPOINT_GRANTS) - if rec.get('via') is not None and rec['via'] != APPOINT_VIA: - return 'via must be %s or null' % APPOINT_VIA + if rec.get('via') is not None and rec['via'] not in LEAD_VIAS: + return 'via must be one of %s or null' % ', '.join(LEAD_VIAS) v2 = rec.get('appoint') is not None or rec.get('via') is not None root = rec.get('repo_root') if root is not None and (not isinstance(root, str) or not os.path.isabs(root) @@ -2059,9 +2086,18 @@ def all_leads(store): return out -def save_lead(store, record, prior, via, appointments=None): - """Replace a plan's lead record atomically (0600, never via a symlink).""" +def save_lead(store, record, prior, via, appointments=None, revived=False): + """Replace a plan's lead record atomically (0600, never via a symlink). The + envelope keeps the plan's revive count and last revive time across every + write (`revived=True` adds one now).""" store.ensure() + kept = {} + try: + old = read_lead_file(lead_path(store, record['plan'])) + except Stop: + old = None + if isinstance(old, dict): + kept = {k: old[k] for k in ('revives', 'revived_at') if k in old} if not os.path.isdir(lead_dir(store)): os.makedirs(lead_dir(store), 0o700) err = lead_record_error(record) @@ -2081,6 +2117,12 @@ def save_lead(store, record, prior, via, appointments=None): storage['appoint'], storage['record_via'] = grant, mark if appointments: storage['appointments'] = appointments + storage.update(kept) + if revived: + done = kept.get('revives', 0) + storage['revives'] = (done if isinstance(done, int) and not isinstance(done, bool) + and done >= 0 else MAX_REVIVES) + 1 # unreadable: counts as spent + storage['revived_at'] = now_iso() write_private(tmp, json.dumps(storage, sort_keys=True) + '\n') os.replace(tmp, path) @@ -2420,6 +2462,174 @@ def lead_appoint_self(args, plan, store, pane, me, data): best_effort=(rec['lead'],) + tuple(rec['succession'])) +def write_revive_ticket(store, plan, pane, epoch, ttl, pid=None, workspace=None): + """The daemon's one-time revive grant for one plan, one new pane and the stored + epoch: 0600, created exclusively, never through a symlink. Returns its path.""" + store.ensure() + path = os.path.join(store.dir, 'revive-%s.json' % binascii.hexlify(os.urandom(8)).decode('ascii')) + body = {'schema': REVIVE_TICKET_SCHEMA, 'plan': plan, 'pane': pane, 'epoch': epoch, + 'workspace': workspace, 'expires': int(time.time() + ttl), 'daemon_pid': pid or os.getpid()} + fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | NOFOLLOW, 0o600) + with os.fdopen(fd, 'w') as fh: + fh.write(json.dumps(body, sort_keys=True)) + return path + + +def find_revive_ticket(store, plan, pane, epoch, now=None): + """(path, ticket) of an unexpired ticket for exactly this plan, pane and epoch, or + None. A ticket that is not a private regular file of this user is ignored; + expired ones are removed.""" + now = time.time() if now is None else now + try: + names = os.listdir(store.dir) + except OSError: + return None + for name in sorted(names): + if not REVIVE_TICKET_RE.fullmatch(name): + continue + path = os.path.join(store.dir, name) + try: + fd = os.open(path, os.O_RDONLY | NOFOLLOW) + except OSError: + continue + try: + info = os.fstat(fd) + if not stat.S_ISREG(info.st_mode) or info.st_uid != os.geteuid() \ + or info.st_mode & 0o077 or info.st_size > 4096: + continue + ticket = json.loads(os.read(fd, 4097).decode('utf-8')) + except (OSError, ValueError, UnicodeDecodeError): + continue + finally: + os.close(fd) + if not isinstance(ticket, dict) or ticket.get('schema') != REVIVE_TICKET_SCHEMA \ + or not isinstance(ticket.get('expires'), int): + continue + if ticket['expires'] < now: + try: + os.unlink(path) + except OSError: + pass + continue + if ticket.get('plan') == plan and ticket.get('pane') == pane and ticket.get('epoch') == epoch: + return path, ticket + return None + + +def pane_workspace(pane): + """The workspace id Herdr reports for a local pane, or None.""" + rc, text, _ = herdr(['pane', 'get', pane], timeout=12) + if rc != 0: + return None + try: + found = (json.loads(text).get('result') or {}).get('pane') or {} + except (ValueError, AttributeError): + return None + ws = found.get('workspace_id') + return ws if isinstance(ws, str) and re.fullmatch(r'[A-Za-z0-9]{1,32}', ws) else None + + +def iso_seconds(stamp): + import calendar + return calendar.timegm(time.strptime(stamp[:19], '%Y-%m-%dT%H:%M:%S')) + + +def revive_gone(addr): + """(gone, state) for a revive: strong evidence, or (D3) a usage limit whose own + banner, read here, resets more than REVIVE_MIN_RESET away — weak evidence, + recorded. An unreachable machine is not proof.""" + sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + sys.dont_write_bytecode = True + import autopilot + is_gone, state, weak = gone(addr) + if weak: + machine, pane = resolve_machine(parse_address(addr)) + rc, screen, _ = herdr(['pane', 'read', pane, '--source', 'visible', '--lines', '80'], + machine=machine, timeout=20) + secs = autopilot.limit_reset_seconds(screen if rc == 0 else '', time.time()) + if secs is not None and secs > autopilot.REVIVE_MIN_RESET: + return True, 'usage_limit, resets in %dm (weak)' % (secs // 60) + return False, 'idle at a usage limit that resets %s' % ( + 'soon' if secs is not None else 'at a time the banner does not say') + if is_gone and state == 'unreachable': + return False, 'on a machine that cannot be reached (not proof)' + return is_gone, state + + +def lead_revive(args, plan, store, pane, me, data): + """`lead takeover --reason revive`: a fresh agent the daemon launched takes an + orphan plan. Needs the daemon's one-time ticket for this pane, plan and epoch, a + running daemon started with --revive, and two probes, a gap apart, that find the + lead, every successor and every lane gone. Writes local state only; receivers + elsewhere never adopt a revive.""" + rec = data['record'] + count, last = data.get('revives', 0), data.get('revived_at') + if not isinstance(count, int) or isinstance(count, bool) or count < 0 \ + or (last is not None and not (isinstance(last, str) and TS_RE.fullmatch(last))): + raise Stop(EXIT_POLICY, 'plan %s has an unreadable revive count; only the human can restart it' + % plan) # fail closed, never an exception + if count >= MAX_REVIVES: + raise Stop(EXIT_POLICY, 'plan %s was already revived %d times; only the human can restart it' + % (plan, MAX_REVIVES)) + try: + since = time.time() - iso_seconds(last) if last is not None else None + except ValueError: + raise Stop(EXIT_POLICY, 'plan %s has an unreadable revive time; only the human can restart it' + % plan) + if since is not None and since < REVIVE_EVERY: + raise Stop(EXIT_POLICY, 'plan %s was revived less than %d hours ago' % (plan, REVIVE_EVERY // 3600)) + found = find_revive_ticket(store, plan, pane, rec['epoch']) + if found is None: + raise Stop(EXIT_POLICY, 'no revive ticket for this pane, plan %s and epoch %d' % (plan, rec['epoch'])) + path, ticket = found + if not ticket.get('workspace') or pane_workspace(pane) != ticket['workspace']: + raise Stop(EXIT_POLICY, 'revive refused: this pane is not in the workspace the autopilot ' + 'created for this revive') + pid = autopilot_pid(store) + opts = autopilot_options(store, pid) if pid else None + if not pid or ticket.get('daemon_pid') != pid or not (opts or {}).get('options', {}).get('revive'): + raise Stop(EXIT_POLICY, 'revive refused: the ticket does not name the running autopilot, or ' + 'that autopilot was not started with --revive') + root = git_root(common=True) + if rec.get('repo_root') and root != rec['repo_root']: + raise Stop(EXIT_POLICY, 'this pane works in another repository than plan %s; a revived ' + 'lead works in the plan\'s repository' % plan) + mine_ = self_strings(pane, store) + members = [a for a in [rec['lead']] + list(rec['succession']) + list(rec['lanes']) + if a and a not in mine_] + evidence = [] + for probe in (1, 2): + evidence = [] + for addr in members: + is_gone, state = revive_gone(addr) + if not is_gone: + raise Stop(EXIT_POLICY, 'revive refused: %s is %s (probe %d); a plan is revived only ' + 'when its lead, every successor and every lane are gone' % (addr, state, probe)) + evidence.append('%s %s' % (addr, state)) + if probe == 1: + time.sleep(appoint_probe_gap()) + with store.lock(): + again = load_lead(store, plan) + if not again or again['record']['epoch'] != rec['epoch']: + raise Stop(EXIT_POLICY, 'the lead record of %s changed meanwhile; run `lead show`' % plan) + again_ticket = find_revive_ticket(store, plan, pane, rec['epoch']) + if again_ticket is None: + raise Stop(EXIT_POLICY, 'the revive ticket was used or expired meanwhile') + try: + os.unlink(again_ticket[0]) # one time: consumed before the record is written + except OSError: + raise Stop(EXIT_POLICY, 'the revive grant could not be consumed; refused') + record = new_lead_record(plan, me, rec['epoch'] + 1, rec['succession'], + [a for a in rec['lanes'] if a not in mine_], rec.get('repo_root'), + appoint=rec.get('appoint'), via=REVIVE_VIA) + save_lead(store, record, prior_of(rec, REVIVE_VIA), REVIVE_VIA, + appointments=again.get('appointments'), revived=True) + log_lead(store, 'revived', me, record, + note='revive granted by the daemon\'s --revive start flag; %s' % '; '.join(evidence)[:400]) + return finish_lead(args, store, pane, record, 'revived', + best_effort=(rec['lead'],) + tuple(rec['succession'])) + + def lead_takeover(args): plan, store, pane, me = lead_context(args) data = load_lead(store, plan) @@ -2431,6 +2641,8 @@ def lead_takeover(args): raise Stop(EXIT_POLICY, 'you already lead %s' % plan) if getattr(args, 'as_lane', False): return lead_appoint_self(args, plan, store, pane, me, data) + if args.reason == REVIVE_REASON: + return lead_revive(args, plan, store, pane, me, data) position = [i for i, a in enumerate(rec['succession']) if a in mine_] if not position: raise Stop(EXIT_POLICY, 'this pane is not in the succession of %s (%s)' @@ -2677,6 +2889,9 @@ def transition(prev, rec, sender, gone_fn): if rec['lead'] != sender: return ('rejected', 'not fenced: %s names %s, not itself' % (sender, rec['lead']), None, None) + if rec.get('via') == REVIVE_VIA: + return ('rejected', 'a revive is adopted only on the machine whose daemon granted it; ' + 'its record stays there', None, None) if sender in prev['succession'] and rec.get('via') != APPOINT_VIA: if widens_grant(prev, rec): return 'rejected', 'a takeover cannot widen the appointment grant', None, None @@ -3697,6 +3912,169 @@ def brain_launch(self, kinds, models, exclude=()): return {'pane': pane_id, 'terminal': terminal, 'workspace': workspace, 'kind': kind, 'profile': profile, 'home': home, 'key': key} + # -- revive (autopilot --revive) ------------------------------------------- + def revive_launch(self, plan, repo_root, kinds): + """Pick an account with quota (ask mode), lease it, and start one fresh agent + in a workspace of its own whose shell starts in the plan's checkout. + Returns {pane, terminal, workspace, kind, profile}; raises on any refusal.""" + import brain + root = os.path.realpath(repo_root) if isinstance(repo_root, str) else None + if not root or root != repo_root or not os.path.isdir(root) or has_bad_control(root): + raise Stop(EXIT_POLICY, 'the plan\'s repository is not a directory on this machine') + ak = shutil.which('ak') + if not ak: + raise Stop(EXIT_ENV, 'ak is not on PATH') + ak = os.path.realpath(ak) + kinds = [k for k in kinds if isinstance(k, str) and brain.KIND_RE.fullmatch(k)] + if not kinds: + raise Stop(EXIT_POLICY, 'no agent kind to pick') + argv = [ak, 'pick', '--kinds', ','.join(kinds), '--owner', self.brain_owner(), + '--max-age', '300', '--json'] + rc, out = bounded_run(argv, b'', 256 * 1024, 30, env=dict(os.environ, AGENTKIT_PERMISSIONS='ask')) + if rc not in (0, 1) or out is None: + raise Stop(EXIT_HERDR, 'ak pick failed') + try: + doc = json.loads(out.decode('utf-8')) + except (ValueError, UnicodeDecodeError): + raise Stop(EXIT_HERDR, 'ak pick did not print JSON') + kind, profile, _launch, line = brain.launch_line(doc, ak) + rc, _ = bounded_run([ak, 'lease', kind, profile, '--owner', self.brain_owner(), + '--ttl', REVIVE_LEASE_TTL, '--purpose', 'revive'], b'', 0, 30) + if rc != 0: + raise Stop(EXIT_POLICY, 'the account %s %s could not be leased' % (kind, profile)) + workspace = None + try: + helper_dir = os.path.dirname(os.path.abspath(__file__)) + made = herdr_json(['workspace', 'create', '--label', ('revive %s' % plan)[:60], '--no-focus', + '--cwd', root, '--env', + 'PATH=%s:%s' % (helper_dir, os.environ.get('PATH', '/usr/bin:/bin'))], + timeout=15) + result = made.get('result') or {} + pane = (result.get('root_pane') or {}) + workspace = (result.get('workspace') or {}).get('workspace_id') + pane_id, terminal = pane.get('pane_id'), pane.get('terminal_id') + if not (isinstance(pane_id, str) and re.fullmatch(PANE_RE, pane_id)) or pane.get('agent'): + raise Stop(EXIT_HERDR, 'the new workspace did not give a fresh shell pane') + rc, _out, _err = herdr(['pane', 'run', pane_id, line], timeout=15) + if rc != 0: + raise Stop(EXIT_HERDR, 'herdr pane run failed in the revive workspace') + except BaseException: + self.revive_release(kind, profile, workspace) + raise + return {'pane': pane_id, 'terminal': terminal, 'workspace': workspace, + 'kind': kind, 'profile': profile} + + def revive_release(self, kind, profile, workspace): + """Undo a revive that did not take: the lease and the workspace it created.""" + ak = shutil.which('ak') + if ak and kind and profile: + bounded_run([os.path.realpath(ak), 'lease', 'release', kind, profile, '--owner', + self.brain_owner()], b'', 0, 30) + if isinstance(workspace, str) and re.fullmatch(r'[A-Za-z0-9]{1,32}', workspace): + herdr(['workspace', 'close', workspace], timeout=15) + + def revive_ticket(self, plan, pane, epoch, ttl, workspace=None): + return write_revive_ticket(self.store, plan, pane, epoch, ttl, workspace=workspace) + + def revive_launches(self): + """[(time, plan)] of every revive launch this daemon's store remembers — + takeover or handover, taken, failed or timed out — from a private file, so + that a restart resets neither the per-plan caps nor the hourly one.""" + path = os.path.join(self.store.dir, REVIVE_LOG) + try: + fd = os.open(path, os.O_RDONLY | NOFOLLOW) + with os.fdopen(fd, 'r', encoding='utf-8') as fh: + data = json.loads(fh.read(65536)) + except (OSError, ValueError): + return [] + items = data.get('launches') if isinstance(data, dict) else None + out = [] + for item in items if isinstance(items, list) else []: + if isinstance(item, list) and len(item) == 2 and isinstance(item[0], (int, float)) \ + and not isinstance(item[0], bool) and isinstance(item[1], str) and PLAN_RE.fullmatch(item[1]): + out.append((float(item[0]), item[1])) + return out[-REVIVE_LOG_MAX:] + + def revive_history(self, plan=None): + """Launch times: of the last hour across the fleet, or every one of `plan`.""" + now = time.time() + return [t for t, p in self.revive_launches() + if (p == plan if plan is not None else now - t < 3600)] + + def revive_note(self, when, plan=None): + items = self.revive_launches() + [(float(when), plan if isinstance(plan, str) else '-')] + items = [[t, p] for t, p in sorted(set(items))][-REVIVE_LOG_MAX:] + path = os.path.join(self.store.dir, REVIVE_LOG) + tmp = '%s.%d.tmp' % (path, os.getpid()) + try: + write_private(tmp, json.dumps({'launches': items})) + os.replace(tmp, path) + except OSError: + pass + + # -- unknown screens: a local corpus for new fixtures ---------------------- + def save_unknown(self, kind, text): + """Keep a sanitized copy of a screen autopilot did not recognise (no key was + sent): escape, control and format characters removed; a private key block + dropped from BEGIN to END (or to the end when it never closes, or from the + top when only its END is shown); a line dropped when + it, or it joined with the next (a wrapped token), shows a secret or a + token's prefix — checked before any cut; capped per file and in number, + 0600 in a 0700 directory under the state dir.""" + text = ANSI_SEQ.sub('', text or '') + # Every check runs on the whole screen first; only then is it cut to its tail. + raw = [''.join(' ' if unicodedata.category(ch) in ('Cc', 'Cf', 'Zl', 'Zp', 'Co', 'Cs') else ch + for ch in line) for line in text.splitlines()[-2000:]] + drop, inside = set(), False + for i, line in enumerate(raw): + if PEM_BEGIN.search(line): + inside = True + if PEM_END.search(line) and not inside: + drop.update(range(i + 1)) # an END whose BEGIN scrolled off: all above it may be key + if inside: + drop.add(i) + if PEM_END.search(line): + inside = False + hit = lambda t: bool(secret_finding(t) or TOKEN_PREFIX.search(t)) + for i, line in enumerate(raw): + nxt = raw[i + 1] if i + 1 < len(raw) else '' + if hit(line): + drop.add(i) + if TOKEN_TAIL.search(line.rstrip()) and TOKEN_HEAD.match(nxt): + drop.add(i + 1) # the token's rest, wrapped onto the next line + elif not hit(nxt) and hit(line.strip() + nxt.strip()): + drop.update((i, i + 1)) # a token wrapped across the two lines + first = max(0, len(raw) - UNKNOWN_LINES) + drop = set(i - first for i in drop if i >= first) + raw = raw[first:] + lines = ['[redacted]' if i in drop else line.rstrip()[:400] for i, line in enumerate(raw)] + body = '\n'.join(lines).strip() + if not body or all(l in ('[redacted]', '') for l in lines): + return None + digest = hashlib.sha256(body.encode('utf-8')).hexdigest()[:12] + folder = os.path.join(self.store.dir, UNKNOWN_DIR) + try: + if not os.path.isdir(folder): + os.makedirs(folder, 0o700) + if os.path.islink(folder): + return None + if stat.S_IMODE(os.stat(folder).st_mode) != 0o700: + os.chmod(folder, 0o700) + names = sorted(n for n in os.listdir(folder) if UNKNOWN_NAME_RE.fullmatch(n)) + if any(n.endswith('-%s.txt' % digest) for n in names): + return None # the same screen is kept once + for old in names[:max(0, len(names) - UNKNOWN_MAX + 1)]: + os.unlink(os.path.join(folder, old)) + name = '%s-%s-%s.txt' % (time.strftime('%Y%m%dT%H%M%SZ', time.gmtime()), + re.sub(r'[^a-z0-9]', '', (kind or 'unknown').lower())[:16] or 'unknown', digest) + path = os.path.join(folder, name) + fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | NOFOLLOW, 0o600) + with os.fdopen(fd, 'w', encoding='utf-8') as fh: + fh.write(body[:UNKNOWN_BYTES] + '\n') + return path + except OSError: + return None + def brain_lease(self, kind, profile): ak = shutil.which('ak') import brain @@ -3927,6 +4305,8 @@ def autopilot_option_argv(opts): argv.append('--loop') if opts.get('appoint'): argv.append('--appoint') + if opts.get('revive'): + argv.append('--revive') if opts.get('brain'): argv.append('--brain') if opts.get('brain_kinds'): @@ -3974,6 +4354,12 @@ def autopilot_status(store): print(' options: %s' % safe(' '.join(autopilot_option_argv(opts)))) if info.get('mode') == 'background': print(' log: %s' % log_path) + folder = os.path.join(store.dir, UNKNOWN_DIR) + try: + kept = len([n for n in os.listdir(folder) if UNKNOWN_NAME_RE.fullmatch(n)]) + except OSError: + kept = 0 + print(' unknown screens kept for new fixtures: %d (%s)' % (kept, folder)) brain = ((load_fleet_report().read_fleet()[0] or {}).get('daemon') or {}).get('brain') \ if opts.get('brain') else None if isinstance(brain, dict): @@ -4269,6 +4655,8 @@ def cmd_autopilot(args): 'seconds') if args.appoint and not args.loop: raise Stop(EXIT_USAGE, '--appoint needs --loop: it acts on the plans the loop watches') + if args.revive and not args.loop: + raise Stop(EXIT_USAGE, '--revive needs --loop: it acts on the plans the loop watches') if interval < autopilot.MIN_INTERVAL and passes is None: raise Stop(EXIT_USAGE, '--interval is at least %d seconds' % autopilot.MIN_INTERVAL) exclude = set() @@ -4334,7 +4722,7 @@ def cmd_autopilot(args): 'no_nudge': bool(args.no_nudge), 'catch_up': bool(args.catch_up), 'exclude': sorted(exclude), 'scope': args.scope or None, 'loop': bool(args.loop), 'notify': args.notify, 'notify_env': keep, - 'appoint': bool(args.appoint), + 'appoint': bool(args.appoint), 'revive': bool(args.revive), 'brain': bool(args.brain), 'brain_kinds': brain_kinds, 'brain_model': brain_models_raw} if verb == 'start': return autopilot_start(args, store, opts) @@ -4384,7 +4772,7 @@ def halt(_signum, _frame): loop = autopilot.Autopilot(io, dry_run=args.dry_run, nudge=not args.no_nudge, catch_up=args.catch_up, exclude=exclude, confirm=confirm, loop=args.loop, grace=grace, appoint=args.appoint, - appoint_grace=appoint_grace, brain=brain_opts) + appoint_grace=appoint_grace, brain=brain_opts, revive=args.revive) previous = signal.signal(signal.SIGTERM, halt) try: if passes is None: @@ -4662,6 +5050,11 @@ def build_parser(): help='with --loop: when a plan whose lead record carries the developer\'s grant ' 'has lost its lead and every successor, ask its first live lane to take the ' 'lead (lead takeover --as-lane); only on the human\'s word') + ap.add_argument('--revive', action='store_true', + help='with --loop: when a plan on this machine lost its lead and nobody in its ' + 'succession or lanes can take over, launch one fresh agent (ak, ask mode) to ' + 'take it (lead takeover --reason revive); a stalled plan\'s live lead is asked ' + 'to hand over. Your starting the daemon with it is the grant; capped') ap.add_argument('--loop', action='store_true', help='also keep every open plan running: ask the idle lead of a plan that ' 'is not finished to continue it, on every enabled machine') diff --git a/.dwp/config.json b/.dwp/config.json index 0bd06de..805b7f8 100644 --- a/.dwp/config.json +++ b/.dwp/config.json @@ -10,7 +10,7 @@ }, "herdr": { "enabled": true, - "version": "v2.1.0" + "version": "v2.2.0" } }, "benchmark": { diff --git a/AGENTS.md b/AGENTS.md index 8991bc6..15b3180 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,4 +54,4 @@ The test map lives in [`docs/TESTING_GUIDE.md`](docs/TESTING_GUIDE.md). Structured work runs through the installed `deepworkplan` skill (`.agents/skills/deepworkplan/`); plans live in the gitignored `.dwp/`; only the addon registry `.dwp/config.json` is tracked (see the skill's `spec/CONFIG.md`). -DWP standard: 8.0.0 (onboarded 2026-10-08; upgraded 2026-10-09, 2026-10-11, 2026-10-12, 2026-10-13, 2026-10-25, 2026-11-15 and 2026-11-16; skill 8.0.1, vendored 2026-11-16 from tag commit 82bc1fd, all 188 files verified against the release SHA256SUMS (digest 0a49c301…), together with herdr-peers 2.1.0 (all 37 files verified, digest 02837b81…); new plans use plan-contract/v8, existing plans keep their recorded generation; the pack's addon pins are herdr-peers v2.1.0, coding-agents-kit v1.5.0 and deepworkplan-vim v1.1.0) +DWP standard: 8.0.0 (onboarded 2026-10-08; upgraded 2026-10-09, 2026-10-11, 2026-10-12, 2026-10-13, 2026-10-25, 2026-11-15 and 2026-11-16; skill 8.0.2, vendored 2026-11-16 from tag commit 4d3e2f6, all 188 files verified against the release SHA256SUMS (digest 332e8f9a…), together with herdr-peers 2.2.0 (tag commit fc19e77, all 37 skill files verified against its SHA256SUMS, digest 694766b8…); new plans use plan-contract/v8, existing plans keep their recorded generation; the addon registry records herdr-peers v2.2.0, coding-agents-kit v1.5.0 and ai-diff-reviewer v3.3.16) diff --git a/skills-lock.json b/skills-lock.json index b763ef5..73332ba 100644 --- a/skills-lock.json +++ b/skills-lock.json @@ -10,19 +10,19 @@ }, "deepworkplan": { "source": "DailybotHQ/deepworkplan-skill", - "ref": "v8.0.1", - "commit": "82bc1fd3d2b44dfe74c9927737724afca65d53fc", + "ref": "v8.0.2", + "commit": "4d3e2f6c433e40b446a8940339a8d5c4f8a02b6b", "sourceType": "github", "skillPath": "skills/deepworkplan/SKILL.md", - "computedHash": "1f09d4c813b88cfe4c08693d5217cffe498c65678dfe3e5c4c335ce5fdeed0e7" + "computedHash": "3ba5d4dd6440c63f8fd988c4fb779ddf25b690d9eaf36d2eb04db85c6c47b6e0" }, "herdr-peers": { "source": "DailybotHQ/herdr-peers", - "ref": "v2.1.0", - "commit": "49e6ab28ac87d95ec18d8ac819221be53079414a", + "ref": "v2.2.0", + "commit": "fc19e77ea748c46e87adf68d176fd79aa7bf781c", "sourceType": "github", "skillPath": "skills/herdr-peers/SKILL.md", - "computedHash": "ea356ee6c7946b7779720953c2c42f6f599821a8218376620dabc48b985ab08d" + "computedHash": "124cb0770b78c88f8929aca459d93428a4e98e9225f8bf8c81e752de1bb09bda" } } }