Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/docs/WORKFLOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ piloting this repo) can reason about why a job did or didn't run.

| Workflow | File | Purpose |
|----------|------|---------|
| Auto-release | [`auto-release.yml`](../workflows/auto-release.yml) | Conventional-commit-driven release + three-way vendored-skill dogfood |
| Auto-release | [`auto-release.yml`](../workflows/auto-release.yml) | Conventional-commit-driven release + temp install smoke + addon dogfood |
| CI | [`ci.yml`](../workflows/ci.yml) | Frontmatter validation, shellcheck, bats tests, `setup.sh`/`context.sh` smoke, markdown link check |
| PR review | [`pr-review.yml`](../workflows/pr-review.yml) | AI-driven pull request code review via Cursor, `ready`-label gated |

Expand Down Expand Up @@ -35,18 +35,19 @@ Sequenced steps (a-i below), all in one long-running job on `ubuntu-latest`:
| d. Prepend CHANGELOG.md section | Merged commits since last tag become bullets |
| e. Commit `chore(release): X.Y.Z [skip ci]` | The `[skip ci]` marker prevents CI from re-running on the release commit |
| f. Tag `vX.Y.Z` and push | With `--follow-tags` so commit + tag land atomically |
| g. **Dogfoodself (`deepworkplan`)** | Fetches the just-published tag via `npx --yes skills add DailybotHQ/deepworkplan-skill@vX.Y.Z --skill deepworkplan --force -y` into `.agents/skills/deepworkplan/`. Verifies `SKILL.md` `version:` equals the requested tag. Commits any diff as `chore(release): dogfood vendored deepworkplan to vX.Y.Z [skip release]`. Doubles as a live smoke test — if the release doesn't install cleanly for consumers, this step fails |
| h. **Dogfood — dailybot** | Same pattern for `DailybotHQ/agent-skill` → `.agents/skills/dailybot/`. Only runs if the upstream tag moved. Non-interactive contract (`--yes` + `-y`) is mandatory — dropping either flag hangs the workflow indefinitely on the CLI's agent-picker prompt |
| i. **Dogfood — ai-diff-reviewer** | Same pattern for `DailybotHQ/ai-diff-reviewer` → `.agents/skills/ai-diff-reviewer/`. Same non-interactive contract |
| j. Create GitHub Release | Uses `gh release create` with auto-generated notes; the release notes include the dogfood commits, so downstream consumers see exactly which skills refreshed with this release |
| g. **Smokepublished tag installs (temp dir)** | Runs `npx --yes skills add DailybotHQ/deepworkplan-skill@vX.Y.Z --skill deepworkplan --force -y` into an isolated temp directory and asserts `version:` matches. Does **not** overwrite `.agents/skills/deepworkplan/` (that copy is repo-adapted; sync via `scripts/refresh-dogfood-skill.sh`) |
| h. **Dogfood — dailybot** | `DailybotHQ/agent-skill` → `.agents/skills/dailybot/`. Only commits if the upstream tag moved. Non-interactive contract (`--yes` + `-y`) is mandatory — dropping either flag hangs the workflow indefinitely on the CLI's agent-picker prompt |
| i. **Dogfood — ai-diff-reviewer** | `DailybotHQ/ai-diff-reviewer` → `.agents/skills/ai-diff-reviewer/`. Same non-interactive contract |
| j. Create GitHub Release | Uses `gh release create` with auto-generated notes; the release notes include the addon dogfood commits when those skills moved |

### Failure semantics

| Failure | Behavior |
|---------|----------|
| Version bump script cannot read current version | **Fails** — a corrupt router SKILL.md must be fixed before any release |
| Any `npx skills add` fails during dogfood | **Fails** — a broken upstream tag must never quietly ship inside a release |
| Version-invariant mismatch after install (installed `SKILL.md` `version:` != requested tag) | **Fails** — refuses to commit a misrepresented dogfood snapshot |
| Temp-dir smoke `npx skills add` fails, or installed version ≠ tag | **Fails** — the just-published tag must install cleanly for consumers |
| Any `npx skills add` fails during addon dogfood | **Fails** — a broken upstream tag must never quietly ship inside a release |
| Version-invariant mismatch after addon install (installed `SKILL.md` `version:` != requested tag) | **Fails** — refuses to commit a misrepresented dogfood snapshot |
| Upstream `gh release view` fails for one of the two external skills (rate limit, transient outage) | **Fails** — refuses to cut a release whose dogfood snapshot cannot resolve upstream |
| Head commit already `chore(release):` OR carries `[skip release]` | Whole workflow skips (loop guard) |

Expand All @@ -56,8 +57,8 @@ Both `npx --yes` (accepts npm's proceed-with-install prompt) AND `-y` (accepts
the `skills` CLI's own "which agent picker?" prompt) are required in the
non-TTY GitHub Actions runner. Historically an upstream `ai-diff-reviewer` bug
(fixed in v1.7.0) caused the second prompt to hang indefinitely without a
timeout — dropping either flag will hang this workflow. The three dogfood
steps carry both flags; the pattern is:
timeout — dropping either flag will hang this workflow. The temp smoke step
and both addon dogfood steps carry both flags; the pattern is:

```bash
npx --yes skills add <owner/repo>@<tag> --skill <name> --force -y
Expand Down Expand Up @@ -162,8 +163,8 @@ push to main pull_request
▼ ▼
auto-release ci.yml pr-review.yml
(release + (validate + (scope → labels-bootstrap
three-way smoke) → review → gate)
dogfood)
temp smoke + smoke) → review → gate)
addon dogfood)
GitHub Release (with dogfood commits in the notes)
Expand Down
99 changes: 41 additions & 58 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ name: Auto-release on merge to main
# 4. Prepends a new section to CHANGELOG.md with the merged commits as bullets
# 5. Commits as "Dailybot Automations" with `[skip ci]` to break the loop
# 6. Tags `vX.Y.Z` and pushes
# 7. Dogfoods the just-published tag by fetching it via `npx skills add` into
# .agents/skills/deepworkplan/ — doubles as a live smoke test of the
# release AND keeps the in-repo dogfood copy at HEAD equal to the latest
# released tag with no manual refresh commits (see Step "Dogfood").
# 8. Creates a GitHub Release with auto-generated notes
# 7. Smoke-tests that the just-published tag installs cleanly via
# `npx skills add` into a TEMP directory (does NOT overwrite the
# repo-adapted `.agents/skills/deepworkplan/` dogfood copy — that copy
# is synced from `skills/deepworkplan/` via
# `scripts/refresh-dogfood-skill.sh` when contributors need it).
# 8. Dogfoods the latest upstream tags of the two *addon* skills
# (`dailybot`, `ai-diff-reviewer`) into `.agents/skills/` — those are
# safe to pin blindly; deepworkplan is not.
# 9. Creates a GitHub Release with auto-generated notes

on:
push:
Expand Down Expand Up @@ -188,22 +192,15 @@ jobs:
git tag -a "$NEW_TAG" -m "Release ${NEW_VERSION}"
git push origin "refs/tags/${NEW_TAG}"

- name: Dogfood — refresh vendored deepworkplan from the just-published tag
# This repo dogfoods its own skill: `.agents/skills/deepworkplan/` is a
# vendored copy managed via `skills-lock.json`, fetched exactly the way
# any consumer would install it (`npx skills add`). Refreshing right
# after the tag lands serves three purposes:
# 1. Live smoke test — proves the just-pushed tag actually installs
# cleanly via `npx skills`. If the install script or the tag
# layout is broken, the workflow fails HERE (loudly) instead of a
# consumer discovering it silently.
# 2. Keeps the in-repo dogfood copy at HEAD equal to the latest
# release (rather than the release before the one we just cut), so
# any contributor cloning fresh gets the current skill by default.
# 3. Refreshes `skills-lock.json` with the new content hash so
# restore/verify flows stay accurate.
# The commit message carries `[skip release]` so this push does NOT
# re-trigger this workflow (the `if:` guard on the job catches it).
- name: Smoke — prove the just-published tag installs (temp dir only)
# Live smoke test of the just-cut tag via `npx skills add`, but into
# an isolated temp directory — NEVER into this repo's
# `.agents/skills/deepworkplan/`. That dogfood copy is repo-adapted
# (contributor kit wiring for Dailybot + AI Diff Reviewer addons)
# and is synced from `skills/deepworkplan/` via
# `scripts/refresh-dogfood-skill.sh` when intentionally refreshed.
# Blind reinstall from the published tag would overwrite that
# adaptation.
if: steps.version.outputs.skip != 'true'
env:
NEW_TAG: ${{ steps.version.outputs.new_tag }}
Expand All @@ -216,61 +213,47 @@ jobs:
# instant; the REST/graphql surface occasionally lags a few seconds).
sleep 5

# Pin to the exact tag we just cut instead of letting `skills`
# resolve "the newest matching tag". If the tag isn't visible yet
# (propagation lag, publish failure), `npx skills add @<tag>` fails
# loudly here — that's the whole point of the smoke test. A silent
# "already up to date" would let a broken release slip through.
#
# Two separate `-y` / `--yes` flags below — they mean different
# things and both are required in a non-TTY (Actions) environment:
SMOKE_DIR=$(mktemp -d)
cleanup() { rm -rf "$SMOKE_DIR"; }
trap cleanup EXIT

# Minimal project so `skills` has a place to install into.
git -C "$SMOKE_DIR" init -q
printf '%s\n' '{"name":"dwp-smoke","private":true}' > "$SMOKE_DIR/package.json"

# Two separate `-y` / `--yes` flags — both required in a non-TTY
# (Actions) environment:
# * `npx --yes` — auto-installs the `skills` npm package without
# the "Ok to proceed?" download prompt.
# * `skills add ... -y` — auto-selects the default install targets
# without the interactive agent-picker.
echo "::group::npx skills add DailybotHQ/deepworkplan-skill@${NEW_TAG} --skill deepworkplan --force -y"
npx --yes skills add "DailybotHQ/deepworkplan-skill@${NEW_TAG}" \
--skill deepworkplan --force -y
echo "::group::smoke: npx skills add DailybotHQ/deepworkplan-skill@${NEW_TAG} (temp dir)"
(
cd "$SMOKE_DIR"
npx --yes skills add "DailybotHQ/deepworkplan-skill@${NEW_TAG}" \
--skill deepworkplan --force -y
)
echo "::endgroup::"

# Explicit invariant: the vendored SKILL.md's `version:` field MUST
# equal the tag we just published. If it doesn't, `npx skills`
# accepted the fetch but installed the wrong content — fail hard
# rather than commit a misrepresented "dogfood" state.
VENDORED_VERSION=$(
INSTALLED=$(
sed -nE 's/^version:[[:space:]]*"([^"]+)".*/\1/p' \
.agents/skills/deepworkplan/SKILL.md | head -n1
"$SMOKE_DIR/.agents/skills/deepworkplan/SKILL.md" | head -n1
)
if [ "${VENDORED_VERSION}" != "${NEW_VERSION}" ]; then
echo "::error::Vendored SKILL.md version is '${VENDORED_VERSION}'"
if [ "${INSTALLED}" != "${NEW_VERSION}" ]; then
echo "::error::Smoke-install SKILL.md version is '${INSTALLED}'"
echo "::error::but the just-published tag is '${NEW_TAG}'"
echo "::error::(expected frontmatter '${NEW_VERSION}')."
echo "::error::Refusing to commit a stale dogfood snapshot."
exit 1
fi
echo "OK: vendored deepworkplan at ${NEW_TAG} (verified)"

# Empty diff after `--force` with a matching version assertion means
# the working copy was already at this tag — no commit needed
# (idempotent), but the smoke test PASSED (pinned fetch + version
# check both succeeded).
if git diff --quiet -- .agents/skills/deepworkplan skills-lock.json; then
echo "Vendored deepworkplan already at ${NEW_TAG}; nothing to commit."
exit 0
fi

git add .agents/skills/deepworkplan skills-lock.json
git commit -m "chore(release): dogfood vendored deepworkplan to ${NEW_TAG} [skip release]"
git push origin HEAD:main
echo "OK: published tag ${NEW_TAG} installs cleanly (temp smoke; repo dogfood untouched)"

- name: Dogfood — refresh vendored dailybot to latest upstream
# Keep the vendored `.agents/skills/dailybot/` at the latest published
# tag of `DailybotHQ/agent-skill`. Runs on every release we cut so any
# consumer cloning this repo at HEAD picks up the current dailybot
# skill alongside deepworkplan.
# skill alongside the repo-adapted deepworkplan dogfood.
#
# Mirror of the deepworkplan self-dogfood, adapted to a THIRD-PARTY
# upstream: no `sleep 5` here — those upstream tags are stable and
# Third-party upstream: no `sleep 5` here — those tags are stable and
# already propagated through the API layer, so there's no
# just-published race to wait out.
#
Expand Down
50 changes: 29 additions & 21 deletions .review/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ silent pass. Addons and CI may change; the core loop must not.
`skills/deepworkplan/` — that's what `skills.sh` ships. See AGENTS.md
Rule #2 ("The runtime artifact is `skills/deepworkplan/` — keep it pure").
`docs/`, `tests/`, `scripts/`, and `.github/` are dev-time only.
- **Always `critical`:** a hand-edit of `version:` in any `SKILL.md`,
`CHANGELOG.md`, a git tag, or the vendored dogfood copy at
`.agents/skills/deepworkplan/**`. The `auto-release.yml` workflow OWNS
those and re-writes them on every merge to `main`; a manual bump collides
with the next release commit and duplicates changelog sections. See
AGENTS.md Rule #4 ("Versioning is automatic — write good commits").
- **Always `critical`:** a hand-edit of `version:` in any `SKILL.md` under
`skills/deepworkplan/**`, `CHANGELOG.md`, or a git tag. The
`auto-release.yml` workflow OWNS those and re-writes them on every merge
to `main`; a manual bump collides with the next release commit and
duplicates changelog sections. See AGENTS.md Rule #4 ("Versioning is
automatic — write good commits"). (The dogfood copy at
`.agents/skills/deepworkplan/**` is synced via
`scripts/refresh-dogfood-skill.sh`, not by auto-release — flag
unreviewed drift from `skills/deepworkplan/` as `warning`, not a
versioning critical.)
- **Always `critical`:** a sub-skill `SKILL.md` frontmatter `version:` that
drifts from the router `skills/deepworkplan/SKILL.md` `version:` on any
commit that touches the router. Every in-tree
Expand Down Expand Up @@ -221,9 +225,11 @@ silent pass. Addons and CI may change; the core loop must not.
(see methodology criticals above).
- **Always `warning`:** documentation change to `skills/deepworkplan/**`
(spec, guide, addon SKILL.md, or router SKILL.md) that is not mirrored
into either the vendored dogfood copy at `.agents/skills/deepworkplan/**`
or explicitly deferred to the next auto-release. Consumers install from
the vendored copy — drift means agents in the wild read stale guidance.
into the vendored dogfood copy at `.agents/skills/deepworkplan/**` via
`scripts/refresh-dogfood-skill.sh` (or explicitly deferred in the PR).
Contributors working in this repo read the dogfood copy — drift means
agents piloting *this* repo see stale guidance. (End users install from
the published `skills/deepworkplan/` pack, not from `.agents/`.)
- **Always `warning`:** RFC-2119 keyword usage in `spec/*.md` that isn't
uppercase (must / must not / should — should be MUST / MUST NOT /
SHOULD). The spec is a normative document; lowercase RFC keywords in
Expand Down Expand Up @@ -267,12 +273,13 @@ silent pass. Addons and CI may change; the core loop must not.
checksum + smoke jobs on `ubuntu-latest` and `macos-latest`. There is
no per-SKILL.md unit-test convention; prompt behaviour is verified by
running the skill end-to-end.
- Any content inside `.agents/skills/dailybot/**`,
`.agents/skills/ai-diff-reviewer/**`, or `.agents/skills/deepworkplan/**`.
These are vendored copies — updated automatically by `auto-release.yml`
(deepworkplan self-dogfood) and by `npx skills update` (the two addon
skills). Hand-editing them is a bug; the real source is upstream. See
DON'T list in AGENTS.md Rule #10 pillar (B).
- Any content inside `.agents/skills/dailybot/**` or
`.agents/skills/ai-diff-reviewer/**`. These are vendored addon copies —
refreshed by `auto-release.yml` from upstream. Hand-editing them is a
bug; the real source is upstream. See AGENTS.md → Vendored agent skills.
(`.agents/skills/deepworkplan/**` is repo-adapted dogfood synced from
`skills/deepworkplan/` via `scripts/refresh-dogfood-skill.sh` — review
drift as a warning, don't treat auto-release as its owner.)
- Content in `.claude/**` or `CLAUDE.md`. Those are symlinks
(`.claude → .agents`, `CLAUDE.md → AGENTS.md`); any real edit belongs
at the canonical `.agents/**` and `AGENTS.md` target.
Expand Down Expand Up @@ -340,7 +347,8 @@ task files.
commit-type prefix on merges to `main` (`feat!:` MAJOR, `feat:` MINOR,
everything else PATCH), bumps every in-tree `skills/deepworkplan/**/SKILL.md`
in sync (router + sub-skills + all addons), updates `CHANGELOG.md`, tags
`vX.Y.Z`, and re-vendors the dogfood copy.
`vX.Y.Z`, smoke-tests the published tag in a temp dir, and auto-refreshes
only the addon dogfood copies (`dailybot`, `ai-diff-reviewer`).
- **Addons.** Live under `skills/deepworkplan/addons/<name>/`. Every
addon ships four things: `SPEC.md` (RFC-2119), `templates/*`
(reasoning guides), `SKILL.md` (onboarding hook, `user-invocable`),
Expand All @@ -350,11 +358,11 @@ task files.
- **Canonical vs symlinked paths.** `.agents/` is canonical. `.claude/`
and `.cursor/` are back-compat symlinks. Write new content to
`.agents/`; the symlinks continue to work for legacy tooling.
- **Two DWP dogfoods.** This repo installs its own `deepworkplan` skill
vendored at `.agents/skills/deepworkplan/` (kept in sync by
`auto-release.yml`) AND — after Task 3 of the current AI-Diff-Reviewer
plan — also vendors `dailybot` and `ai-diff-reviewer` under the same
tree. All three are pinned in `skills-lock.json`.
- **Three dogfood copies under `.agents/skills/`.** `deepworkplan` is
repo-adapted and synced from `skills/deepworkplan/` via
`scripts/refresh-dogfood-skill.sh` (not by auto-release). `dailybot`
and `ai-diff-reviewer` are auto-refreshed on every release. All three
are pinned in `skills-lock.json`.

This comment was marked as outdated.

- **Branding.** Product name is exactly **DeepWorkPlan** (one word, CamelCase)
or **DWP** (abbreviation). Slug is `deepworkplan`. The skill package
name on the marketplace is `DailybotHQ/deepworkplan-skill`. Do NOT
Expand Down
Loading
Loading