Loading...
Loading...
Scan warpdotdev/warp and warp-server for recently merged PRODUCT.md specs that don't yet have a corresponding docs PR in warpdotdev/docs. When a complete spec is found, auto-generates a full docs draft PR and tags the engineer. When a spec is too thin to draft from, pings the engineer directly. Designed to run as a scheduled Oz ambient agent (e.g., every 2-3 days). Use when setting up the automated docs trigger or running a manual docs coverage sweep.
npx skill4agent add warpdotdev/common-skills scan-new-specswarpdotdev/warpwarp-serverwrite-feature-docswarpdotdev/docs#growth-docsTODO for reviewers:is a temporary channel for engineer pings. Identify a more appropriate eng-facing channel (e.g. a shared eng/docs channel,#growth-docs, or a dedicated#devchannel) once this workflow is established.#docs-requests
| Setting | Default | Description |
|---|---|---|
| | How many days back to scan for merged spec PRs |
| | Slack channel for engineer pings and summaries (temporary — see TODO above) |
| From | Slack bot token for posting via API (already available in the |
chat.postMessagebuzzSLACK_BOT_TOKENSLACK_BOT_TOKEN--search "in:files"# Portable date calculation (GNU/Linux and BSD/macOS compatible)
SINCE=$(date -d "-${LOOKBACK_DAYS} days" +%Y-%m-%d 2>/dev/null \
|| date -v-${LOOKBACK_DAYS}d +%Y-%m-%d)
# List all recently merged PRs (no file-path filter -- we check files next)
gh pr list \
--repo warpdotdev/warp \
--state merged \
--search "merged:>${SINCE}" \
--json number,title,author,mergedAt,url \
--limit 100
# Repeat for warp-server
gh pr list \
--repo warpdotdev/warp-server \
--state merged \
--search "merged:>${SINCE}" \
--json number,title,author,mergedAt,url \
--limit 100specs/*/PRODUCT.mdgh pr view <number> --repo warpdotdev/<repo> --json files -q '.files[].path' \
| grep -E '^specs/.+/PRODUCT\.md$'specs/warpwarp-server# Get the engineer's name and email from GitHub
ENG_NAME=$(gh api users/<github-username> -q '.name // .login')
ENG_EMAIL=$(gh api users/<github-username> -q '.email // empty')
# Look up their Slack user ID by email (real ping, not just a name mention)
if [ -n "$ENG_EMAIL" ]; then
SLACK_USER_ID=$(curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
"https://slack.com/api/users.lookupByEmail?email=${ENG_EMAIL}" \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d['user']['id'] if d.get('ok') else '')")
fi
# Use <@USER_ID> for a real ping if lookup succeeded; fall back to @name if not
if [ -n "$SLACK_USER_ID" ]; then
ENG_MENTION="<@${SLACK_USER_ID}>"
else
ENG_MENTION="@${ENG_NAME} _(Slack ID not found — verify this is the right person)_"
fiENG_MENTIONENG_NAMEENG_GITHUBwarpdotdev/docs# Check for open or draft PRs
gh pr list \
--repo warpdotdev/docs \
--state open \
--search "<spec-id>" \
--json number,title,state,url \
--limit 5
# Check for merged PRs
gh pr list \
--repo warpdotdev/docs \
--state merged \
--search "<spec-id>" \
--json number,title,state,url \
--limit 5specs/<id>/PRODUCT.md## Behaviorwrite-feature-docswrite-feature-docswarpdotdev/docs@<github-username>@rachaelrenk@petradonka@hongyi-chenSLACK_CHANNEL📄 *Docs draft auto-generated*
Feature: *<spec-id>* (from `<repo>`)
Spec PR: <spec-pr-url>
<@USER_ID> (GitHub: <github-username>)
I’ve opened a draft docs PR for review: <docs-pr-url>
Please check the items marked *[UNVERIFIED]* and *[TODO]* in the PR — those are the only things that need your input.SLACK_CHANNEL📋 *New spec needs docs — not enough detail to auto-draft*
Feature: *<spec-id>* (from `<repo>`)
Spec PR: <spec-pr-url>
<@USER_ID> (GitHub: <github-username>)
The spec doesn’t have enough behavior detail for me to auto-generate docs yet. Please either:
• Add more detail to `specs/<spec-id>/PRODUCT.md` (a Behavior section with user-facing steps), OR
• Ping the docs team in this channel and we’ll draft it manually✅ *Docs coverage scan complete* — all recently merged specs have docs coverage.jq$MESSAGEjq -n \
--arg channel "$SLACK_CHANNEL" \
--arg text "$MESSAGE" \
'{channel: $channel, text: $text}' \
| curl -s -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H 'Content-type: application/json' \
-d @-SLACK_BOT_TOKENscan-new-specs run summary
Repos scanned: warpdotdev/warp, warp-server
Lookback window: <N> days (since <date>)
Specs found: <N>
Already covered: <N>
Auto-drafted: <N> (complete spec → draft PR opened)
Pinged (thin spec): <N> (incomplete spec → engineer notified)
Slack channel: <channel>"Run scan-new-specs to check warpdotdev/warp and warp-server for newly merged PRODUCT.md specs that don't have a corresponding docs PR in warpdotdev/docs. For complete specs, auto-generate a draft docs PR and tag the engineer. For thin specs, ping the engineer in Slack. Post a summary to #growth-docs. Use the last 3 days as the lookback window."
warpdotdev/docschat.postMessageSLACK_BOT_TOKENbuzz<@USER_ID>users.lookupByEmailwrite-feature-docs