feat(ci): add automated Epic documentation audit workflow#36294
Conversation
🤖 Bedrock Review —
|
|
Claude finished @jdcmsd's task in 1m 25s —— View job Rollback Safety Analysis
Result: ✅ Safe to Roll Back This PR adds a single GitHub Actions workflow file ( Checked against all 13 rollback-unsafe categories (C-1 through M-4): none apply. Rolling back this change simply removes the workflow — no application state, database state, or index state is affected. Label |
Replace uv/Python-script-based eval and finalize steps with: - Python3 stdlib context assembly using gh CLI and grep - Shell finalize using gh issue comment, curl for dotCMS API, and git commit/push - prompts/burlap.txt read directly via cat (no YAML parsing) - Fix jq null parent bug in preflight guard Eliminates dependency on dotcms-aios PR merge order.
🤖 Bedrock Review —
|
🤖 Bedrock Review —
|
- Fix -f → -F on gh api PATCH so the file is read, not sent literally - Prepend <!-- autodoc-report --> marker in finalize before posting so idempotent edit lookup works (marker was not in the report itself) - Add --paginate to comment lookup to search beyond the first page - Use jq first // empty instead of | head -1 to avoid SIGPIPE - Fix urlTitle awk to use sub() consistent with title/tags/seoDescription - Remove -k (TLS bypass); add --fail-with-body to dotCMS curl calls - Add comment clarifying AUTODOC_DOTCMS_API_TOKEN_AISEARCH is used by the Claude subprocess via burlap.txt, not directly by a workflow step
🤖 Bedrock Review —
|
- Make git push conditional on commit succeeding (|| true was causing unconditional push even when there was nothing new to commit) - Add git push origin HEAD for explicit branch targeting - Validate urlTitle is a URL slug before interpolating into JSON query (non-slug chars would break the shell-built -d payload) - Validate IDENTIFIER matches UUID format before placing in URL - Add comment on unpinned npm install explaining the tradeoff
🤖 Bedrock Review —
|
|
Claude's roasting this bedrock review:
|
Rewrites the `issue_autodoc.yml` workflow to eliminate the `uv` / Python-script dependency, making it self-contained. **What changed:** - Removed: `Set up uv`, `Install autodoc dependencies`, `uv run python finalize.py` steps - Build eval context: Python3 stdlib + `gh` CLI in a heredoc (no pip, no venv) - Run Claude: unchanged — `claude --print --allowedTools Bash,Write < /tmp/eval_context.md` - Finalize: pure shell + inline Python3 heredocs for JSON payloads; `gh issue comment` for posting; `curl` for dotCMS EDIT/NEW; `git push` for committing - Fixed jq null-parent bug in preflight guard - Reads `prompts/burlap.txt` directly (no YAML parsing) This mirrors the change in `dotCMS/core` PR dotCMS#36294 and resolves the ordering dependency on the dotcms-aios PR.
🤖 Bedrock Review —
|
Report lives as an issue comment — the repo copy is redundant. Removing the push also drops the write-scope requirement on AUTODOC_AIOS_CI.
🤖 Bedrock Review —
|
Embed burlap.txt content directly in the workflow as a heredoc step. Update report path to /tmp — report is ephemeral, lives as issue comment. dotcms-aios checkout now solely serves vault epic context lookup.
🤖 Bedrock Review —
|
- Add conservatism clause to prompt: if Epic lacks technical detail, set action none rather than hallucinating a draft - Restore <details> wrapping of doc draft in issue comment (was lost when post_report.py was replaced with inline shell)
🤖 Bedrock Review —
|
This resolves #36293 by adding an automation that hopefully works. Testing on
core-workflow-reposeemed entirely promising, so hopefully the change of environment won't add any complications!All secrets (
AUTODOC_*) have already been provisioned by moi.This PR fixes: #36293