Skip to content

Commit 3d7e54e

Browse files
authored
Execute accepted Docs Agent helpers (#126)
1 parent c94f84f commit 3d7e54e

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
- uses: actions/checkout@v4
2020
with:
2121
repository: Automattic/docs-agent
22-
ref: d1bf324154b4604099ae3209f64519386caf1f48
22+
ref: 305928a4ab2bddea759cf3d88077215ed687f75f
2323
path: .producer/docs-agent
2424
- uses: actions/checkout@v4
2525
with:
2626
repository: Automattic/wp-codebox
27-
ref: 0227ca7551d8cd98f14242b31e142b50f78dff13
27+
ref: a6fe2d208e990a8d04104aa74aacbb8d1539fbc1
2828
path: .producer/wp-codebox
2929
- uses: pnpm/action-setup@v4
3030
with:

.github/workflows/developer-docs-agent.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727
jobs:
2828
developer-docs-agent:
2929
name: Maintain Developer Docs
30-
uses: Automattic/docs-agent/.github/workflows/maintain-docs.yml@d1bf324154b4604099ae3209f64519386caf1f48
30+
uses: Automattic/docs-agent/.github/workflows/maintain-docs.yml@305928a4ab2bddea759cf3d88077215ed687f75f
3131
with:
3232
audience: technical
3333
run_kind: ${{ github.event.inputs.run_kind || 'maintenance' }}

.github/workflows/skills-agent.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
skills-agent:
1919
name: Maintain Live Skills
20-
uses: Automattic/docs-agent/.github/workflows/maintain-docs.yml@d1bf324154b4604099ae3209f64519386caf1f48
20+
uses: Automattic/docs-agent/.github/workflows/maintain-docs.yml@305928a4ab2bddea759cf3d88077215ed687f75f
2121
with:
2222
audience: skills
2323
base_ref: trunk

docs/contributor-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Manual documentation runs default to maintenance and should make the smallest so
156156
- `workflow_dispatch` offers `run_kind` choices of `maintenance` (the default) and `bootstrap`; pushes to `trunk` run with `run_kind: maintenance`.
157157
- `docs_branch` is `docs-agent/build-with-wordpress-developer-docs` and `base_ref` is `trunk`.
158158
- writable documentation paths are limited to `README.md`, `docs/**`, and `plugins/**/README.md`.
159-
- Docs Agent selects its native package from the reusable workflow revision pinned in this file: `Automattic/docs-agent/.github/workflows/maintain-docs.yml@d1bf324154b4604099ae3209f64519386caf1f48`.
159+
- Docs Agent selects its native package from the reusable workflow revision pinned in this file: `Automattic/docs-agent/.github/workflows/maintain-docs.yml@305928a4ab2bddea759cf3d88077215ed687f75f`.
160160
- maintenance is bounded to the known Figma Studio handoff diagnostics drift from [PR #100](https://github.com/Automattic/build-with-wordpress/pull/100) and requires an evidence-backed documentation update; bootstrap requires `README.md`, `docs/README.md`, at least three topic pages, and a README link to the docs index.
161161
- manual `workflow_dispatch` runs set `require_pr: true`; push-triggered maintenance runs do not require a PR and may finish with no changes when the documentation already matches source behavior.
162162
- verification commands are `pnpm install --frozen-lockfile`, `pnpm build`, and `pnpm verify`.
@@ -168,7 +168,7 @@ When changing the docs workflow, keep this contract aligned with the repository
168168

169169
`skills-agent.yml` uses the same pinned reusable Docs Agent workflow with `audience: skills`. It is triggered manually and on a weekly Monday schedule, writes only to `skills/**`, generated skill copies under `plugins/**/skills/**`, and plugin README files, and runs the same install, build, and verify commands as the developer-docs workflow. Its bounded source delta covers the live skill sources, package generator scripts, and packaged skill outputs, and permits an evidence-backed no-change result when those surfaces are current. Its drift check is intentionally broad: `git diff --exit-code`, so generated skill package output must be committed after the build. The workflow does not pass `run_kind` or `require_pr`; the native skills lane should make the smallest source-grounded skill update needed or finish with no changes when skills are current. Keep this workflow focused on live skill content; generated package structure and developer documentation belong in the technical docs workflow and the generator/verifier source.
170170

171-
The `CI` workflow provides automated validation for pull requests and pushes to `trunk` and `feat/native-docs-agent`. It checks out Docs Agent at `d1bf324154b4604099ae3209f64519386caf1f48` and the accepted WP Codebox reusable-workflow producer at `0227ca7551d8cd98f14242b31e142b50f78dff13`, installs pnpm 10.8.1, runs `pnpm test`, then runs `pnpm build` and `pnpm verify`. The workflow contract test rejects producer revision, reusable workflow, source-delta, bootstrap, secret forwarding, writable path, verification command, drift check, or schema drift. This repository does not currently require the workflow as a merge gate.
171+
The `CI` workflow provides automated validation for pull requests and pushes to `trunk` and `feat/native-docs-agent`. It checks out Docs Agent at `305928a4ab2bddea759cf3d88077215ed687f75f` and the accepted WP Codebox reusable-workflow and helper revision at `a6fe2d208e990a8d04104aa74aacbb8d1539fbc1`, installs pnpm 10.8.1, runs `pnpm test`, then runs `pnpm build` and `pnpm verify`. The workflow contract test rejects producer revision, reusable workflow, source-delta, bootstrap, secret forwarding, writable path, verification command, drift check, or schema drift. This repository does not currently require the workflow as a merge gate.
172172

173173
## Pull request checklist
174174

tests/docs-agent-workflows.test.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { readFile } from "node:fs/promises"
44
import { resolve } from "node:path"
55

66
const root = resolve(new URL("..", import.meta.url).pathname)
7-
const docsAgentRevision = "d1bf324154b4604099ae3209f64519386caf1f48"
7+
const docsAgentRevision = "305928a4ab2bddea759cf3d88077215ed687f75f"
88
const docsAgentPackageRevision = "a39d9db230eb9e0b72ed84465f4d61bd8dda1bab"
9-
const wpCodeboxProducerRevision = "0227ca7551d8cd98f14242b31e142b50f78dff13"
9+
const wpCodeboxProducerRevision = "a6fe2d208e990a8d04104aa74aacbb8d1539fbc1"
1010
const wpCodeboxWorkflowRef = wpCodeboxProducerRevision
1111
const wpCodeboxReleaseRef = "v0.12.29"
1212
const docsAgentDir = process.env.DOCS_AGENT_DIR
@@ -26,6 +26,7 @@ const wpCodeboxContract = await readJson(wpCodeboxDir, "contracts/run-agent-task
2626
assert.equal(wpCodeboxContract.schema, "wp-codebox/reusable-workflow-interface/v1")
2727
assert.match(docsAgentWorkflow, new RegExp(`uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@${wpCodeboxWorkflowRef}`))
2828
assert.match(docsAgentWorkflow, new RegExp(`wp_codebox_release_ref: ${wpCodeboxReleaseRef}`))
29+
assert.match(docsAgentWorkflow, new RegExp(`wp_codebox_workflow_ref: ${wpCodeboxProducerRevision}`))
2930
assert.match(docsAgentWorkflow, new RegExp(`DOCS_AGENT_PACKAGE_REVISION: ${docsAgentPackageRevision}`))
3031
assert.match(docsAgentWorkflow, /OPENAI_API_KEY: \$\{\{ secrets\.OPENAI_API_KEY \}\}/)
3132
assert.match(docsAgentWorkflow, /ACCESS_TOKEN: \$\{\{ github\.token \}\}/)

0 commit comments

Comments
 (0)