From d813fabb4dafa861f0eae398de14453a6d267f63 Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 10 May 2026 15:41:20 -0400 Subject: [PATCH 1/2] ci: give docs bootstrap room to open PR --- tests/playground-ci/scripts/run-docs-agent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/playground-ci/scripts/run-docs-agent.sh b/tests/playground-ci/scripts/run-docs-agent.sh index d726cd6..920aee4 100755 --- a/tests/playground-ci/scripts/run-docs-agent.sh +++ b/tests/playground-ci/scripts/run-docs-agent.sh @@ -58,7 +58,7 @@ DOCS_AGENT_SUCCESS_REQUIRES_PR="false" DOCS_AGENT_COMPLETION_INSTRUCTION="If no documentation update is needed, finish cleanly without opening a pull request. If an update is needed, write only allowed documentation paths and open one pull request." if [[ "$DOCS_AGENT_FLOW_SLUG" == *-bootstrap-flow ]]; then DOCS_AGENT_SUCCESS_REQUIRES_PR="true" - DOCS_AGENT_COMPLETION_INSTRUCTION="This is a bootstrap run. Write a coverage map and initial documentation to allowed documentation paths, then open one pull request. A no_changes outcome is invalid for this consumer bootstrap proof." + DOCS_AGENT_COMPLETION_INSTRUCTION="This is a bootstrap run. Write the coverage map, docs index, and topic pages to allowed documentation paths. Complete the run by opening one pull request for those documentation commits. A no_changes outcome is invalid for this consumer bootstrap proof." fi if [ ! -f "$EXTENSION_PATH/scripts/bench/bench-runner.sh" ]; then @@ -178,9 +178,9 @@ jq -n \ target_repo: $targetRepo, allowed_repos: [$targetRepo], success_requires_pr: $successRequiresPr, - max_turns: 12, + max_turns: 20, prompt: $prompt, - step_budget: 16, + step_budget: 24, time_budget_ms: 600000, transcript_dir: "/wordpress/wp-content/plugins/agents-api-docs-agent-ci-driver/artifacts/docs-agent", required_abilities: [ From 95e9179f5369b8e27181c4b16764b566d6eda78f Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 10 May 2026 15:59:20 -0400 Subject: [PATCH 2/2] ci: configure fallback docs PR --- tests/playground-ci/scripts/run-docs-agent.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/playground-ci/scripts/run-docs-agent.sh b/tests/playground-ci/scripts/run-docs-agent.sh index 920aee4..8becd9e 100755 --- a/tests/playground-ci/scripts/run-docs-agent.sh +++ b/tests/playground-ci/scripts/run-docs-agent.sh @@ -17,6 +17,7 @@ DOCS_AGENT_REF="${DOCS_AGENT_REF:-main}" DOCS_AGENT_WORKFLOW="${DOCS_AGENT_WORKFLOW:-technical}" DOCS_AGENT_FLOW="${DOCS_AGENT_FLOW:-}" DOCS_AGENT_PROMPT="${DOCS_AGENT_PROMPT:-Generate or update technical developer documentation for Agents API from source code. Open a documentation PR only if needed.}" +DOCS_AGENT_BRANCH="${DOCS_AGENT_BRANCH:-}" if [ -n "$DOCS_AGENT_FLOW" ]; then case "$DOCS_AGENT_FLOW" in @@ -58,8 +59,10 @@ DOCS_AGENT_SUCCESS_REQUIRES_PR="false" DOCS_AGENT_COMPLETION_INSTRUCTION="If no documentation update is needed, finish cleanly without opening a pull request. If an update is needed, write only allowed documentation paths and open one pull request." if [[ "$DOCS_AGENT_FLOW_SLUG" == *-bootstrap-flow ]]; then DOCS_AGENT_SUCCESS_REQUIRES_PR="true" + DOCS_AGENT_BRANCH="${DOCS_AGENT_BRANCH:-docs-agent/${DOCS_AGENT_WORKFLOW}-bootstrap-docs}" DOCS_AGENT_COMPLETION_INSTRUCTION="This is a bootstrap run. Write the coverage map, docs index, and topic pages to allowed documentation paths. Complete the run by opening one pull request for those documentation commits. A no_changes outcome is invalid for this consumer bootstrap proof." fi +DOCS_AGENT_BRANCH="${DOCS_AGENT_BRANCH:-docs-agent/${DOCS_AGENT_WORKFLOW}-docs}" if [ ! -f "$EXTENSION_PATH/scripts/bench/bench-runner.sh" ]; then echo "ERROR: Homeboy WordPress extension not found at $EXTENSION_PATH" >&2 @@ -152,6 +155,7 @@ jq -n \ --arg flowSlug "$DOCS_AGENT_FLOW_SLUG" \ --arg workloadId "$DOCS_AGENT_WORKLOAD_ID" \ --arg workloadLabel "$DOCS_AGENT_WORKLOAD_LABEL" \ + --arg docsBranch "$DOCS_AGENT_BRANCH" \ --argjson successRequiresPr "$DOCS_AGENT_SUCCESS_REQUIRES_PR" \ --arg prompt "$PROMPT" \ '{ @@ -178,6 +182,13 @@ jq -n \ target_repo: $targetRepo, allowed_repos: [$targetRepo], success_requires_pr: $successRequiresPr, + fallback_pull_request: { + repo: $targetRepo, + title: "Bootstrap developer documentation surface", + head: $docsBranch, + base: "main", + body: "## Summary\n- Bootstrap developer documentation with a docs index, coverage map, and topic pages.\n- Generated by the Docs Agent workflow.\n\n## AI assistance\n- **AI assistance:** Yes\n- **Tool(s):** OpenCode (GPT-5.5) via Docs Agent\n- **Used for:** Generated the initial documentation draft from repository source, tests, issues, and pull requests for human review." + }, max_turns: 20, prompt: $prompt, step_budget: 24, @@ -193,7 +204,8 @@ jq -n \ { tool: "create_or_update_github_file", forced_parameters: { - allowed_file_paths: ["README.md", "docs/**"] + allowed_file_paths: ["README.md", "docs/**"], + branch: $docsBranch }, record: { engine_key: "docs_agent",