Skip to content

feat(agent-think): sync feature docs and resume on CI#1867

Open
mattzcarey wants to merge 1 commit into
mainfrom
feat/agent-think-doc-sync
Open

feat(agent-think): sync feature docs and resume on CI#1867
mattzcarey wants to merge 1 commit into
mainfrom
feat/agent-think-doc-sync

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a third agent-think skill for syncing user-facing pull request changes into cloudflare/cloudflare-docs.

  • Inspects the source PR and identifies documentation impact from its behavior, commits, comments, and focused patches.
  • Searches GitHub before creating a shallow, blobless sparse checkout of only the relevant docs pages and repository guidance.
  • Opens a draft docs PR directly against production, reports one status comment on the source PR, and never clones the multi-gigabyte docs repository in full.
  • Adds a general-purpose wake_up tool: a Think turn registers a stable external action ID and ends; AgentThink.wakeUp later submits the action result as a durable user message on the same thread.
  • Correlates action IDs to sessions in a one-shot WakeUpRegistry Durable Object, with atomic delivery claims, event idempotency, collision protection, and stale-redelivery protection.

The private gh-app companion is deliberately narrower than the generic wake-up primitive: it accepts only workflow_run.completed for the CI workflow in cloudflare/cloudflare-docs, validates the bot-owned draft PR/branch/current SHA, mints a fresh installation token, and wakes the registered session. Failed docs CI can produce up to three automatic repair rounds; each follow-up push re-registers the same action ID.

This change is additive and inert on merge. The sync skill is not available to the deployed agent until it is explicitly seeded to R2, and no docs CI event can trigger a continuation until the private gh-app companion is deployed with the Workflow run subscription and cloudflare/cloudflare-docs installation access. Nothing from this branch has been deployed or seeded.

Testing

  • pnpm run check
  • pnpm --filter @cloudflare/agent-think test
  • pnpm --filter @cloudflare/agent-think typecheck
  • Companion gh-app: pnpm run affected:check

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cf7e51a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1867

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1867

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1867

create-think

npm i https://pkg.pr.new/create-think@1867

hono-agents

npm i https://pkg.pr.new/hono-agents@1867

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1867

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1867

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1867

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1867

commit: cf7e51a

Base automatically changed from feat/agent-think to main July 3, 2026 12:59
@mattzcarey mattzcarey force-pushed the feat/agent-think-doc-sync branch from cb96641 to cf7e51a Compare July 3, 2026 14:14
@mattzcarey mattzcarey marked this pull request as ready for review July 3, 2026 14:14

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant