Execute developer-docs and skills agents via runtime-agent-full-run - #102
Merged
Conversation
Repoint developer-docs-agent.yml and skills-agent.yml off the plan-only Automattic/docs-agent maintain-docs.yml path onto the executing runner Extra-Chill/homeboy-extensions runtime-agent-full-run.yml, mirroring the working Automattic/intelligence docs-agent consumer. maintain-docs.yml chains to wp-codebox run-agent-task.yml, which is deliberately plan-only, so the docs/skills runs never executed or opened a PR. docs-agent is intentionally runner-neutral (its bundle test forbids wiring execution into maintain-docs.yml), so execution is consumer-owned. The technical-docs-agent and skills-agent docs-agent bundles remain the workload; mounts agents-api + data-machine + data-machine-code runtime dependencies (the bundle uses DMC-registered workspace/git tools). The runner owns publication, opening docs PRs on docs-agent/build-with-wordpress-developer-docs and docs-agent/build-with-wordpress-skills. OpenAI credentials are wired through the PROVIDER_SECRET_1 slot (credentials map connectors_ai_openai_api_key -> PROVIDER_SECRET_1, with PROVIDER_SECRET_1 fed from the OPENAI_API_KEY repo secret) because the runner only forwards PROVIDER_SECRET_1..5 into the run step. Closes #101
build-with-wordpress documents its OWN repo and all checked-out dependency repos (docs-agent bundle, agents-api, data-machine, data-machine-code) are public, so the default Actions GITHUB_TOKEN — granted contents/pull-requests: write — can read the deps and open the docs PR in this same repo. Set require_homeboy_app_token=false so the runner uses the GITHUB_TOKEN fallback, and drop the unused HOMEBOY_APP_ID/HOMEBOY_APP_PRIVATE_KEY secret passthroughs. (The Homeboy GitHub App token is only needed for cross-repo/private-repo publication, like the intelligence consumer that documents other repos.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #101
Problem
developer-docs-agent.ymlandskills-agent.ymlcalledAutomattic/docs-agent/.github/workflows/maintain-docs.yml@main, whoserun-agentjob chains toAutomattic/wp-codebox/.github/workflows/run-agent-task.yml@main. That wp-codebox workflow is deliberately plan-only — it builds a task-request artifact and never executes. So both Build with WordPress docs workflows only planned: the documentation agent never ran and no documentation PR was ever opened.docs-agentis intentionally runner-neutral — itstests/validate-docs-agent-bundle.phpenforces thatmaintain-docs.ymlstays on the plan-only runner and forbids wiring execution/credentials into docs-agent, and forbids hardcoding downstream context (Studio, agent-skills) there. Execution is therefore consumer-owned: the consumer must call an executing runner directly. This PR does exactly that, mirroring the working executing consumerAutomattic/intelligence/.github/workflows/docs-agent.yml. No changes to docs-agent, wp-codebox, or homeboy-extensions.Before / after
uses:Automattic/docs-agent/.github/workflows/maintain-docs.yml@main(plan-only)Extra-Chill/homeboy-extensions/.github/workflows/runtime-agent-full-run.yml@main(executes)Automattic/docs-agent/.github/workflows/maintain-docs.yml@main(plan-only)Extra-Chill/homeboy-extensions/.github/workflows/runtime-agent-full-run.yml@main(executes)Input mapping (docs use case preserved)
The docs use case is unchanged; only the execution path moved. Mapping from the old
maintain-docs.ymlinputs to the executing runner:audience: technical+run_kindworkload_id/runtime_execution.input.flow_slug=technical-docs-bootstrap-flow(dispatch) ortechnical-docs-maintenance-flow(push to trunk); skills =skills-maintenance-flowruntime_execution.source: .ci/docs-agent/bundles/technical-docs-agent(skills:bundles/skills-agent),bundle_repo: Automattic/docs-agent,bundle_ref: docs_agent_refbase_ref: trunkrunner_workspace.from: origin/trunk(normalized to basetrunk)docs_branch: docs-agent/build-with-wordpress-developer-docsrunner_workspace.branch= same (skills:docs-agent/build-with-wordpress-skills)writable_pathswritable_paths(README.md,docs/**,plugins/**/README.md; skillsskills/**,plugins/**/skills/**,plugins/**/README.md)bootstrap_contract(required_paths/required_globs)workspace_contract_checks(paths_exist/glob_min_count/entry_points/forbidden_phrases) — gated to dispatch/bootstrapcontext_repositories(studio, wordpress-agent-skills)context_repositories(same)verification_commands(pnpm install/build/verify)verification_commands(same)drift_checks(git diff --exit-code)drift_checks(same)promptprompt(same docs prompt, publication-neutral)Bundle/recipe content stays sourced from
Automattic/docs-agent. Runtime dependenciesAutomattic/agents-api@main,Extra-Chill/data-machine@main,Extra-Chill/data-machine-code@mainare mounted because the docs-agent bundle uses DMC-registered workspace/git tools.runtime_profile: datamachine-agent-ciand its inlineruntime_profilesJSON match the intelligence consumer exactly.Provider-secret wiring (the gotcha)
runtime-agent-full-run.ymlonly declares/forwardsPROVIDER_SECRET_1..5into the run step; it never forwards a rawOPENAI_API_KEYenv. The runner forwards a provider secret only if the credential's mapped env name is a known forwarded slot. So:This is the working form. The latent-bug form maps
connectors_ai_openai_api_keyto a rawOPENAI_API_KEYenv that the run step never sets, so the key silently never reaches the provider. We use the slot form, fed from the repo's existingOPENAI_API_KEYsecret.Why it now executes and publishes
runtime-agent-full-run.yml, which sets up the WP Codebox runtime, materializes runtime/validation dependencies, and actually invokes the docs-agent bundle throughrun-headless-loop.cjs(not a plan artifact).runner_workspace: after the agent writes files,workspace-publication-lifecycle.cjsresets the publication branch fromorigin/trunk, commits, pushesdocs-agent/build-with-wordpress-developer-docs(skills:docs-agent/build-with-wordpress-skills), and opens/updates a PR with theartifact_export_configtitle/body templates.success_requires_pristruefor bootstrap (dispatch) andfalsefor maintenance (push / scheduled), so a no-op maintenance run passes without a PR.Verification
with:keys, 0 unknownsecrets:, 0 missing required inputs (runtime_profiles,target_repo,workload_idall present), checked againstruntime-agent-full-run.yml's declared contract (81 inputs, 7 secrets).runner_workspace.branch/from,provider_plugin.credentials, and the gated bootstrapworkspace_contract_checksJSON parse cleanly.Automattic/intelligence/.github/workflows/docs-agent.yml: same runner, samedatamachine-agent-ciprofile mechanism, same publication shape.AI assistance