* docs: scope AI documentation drafts to the merged change
Draft PRs were titled by number, filled with the review loop, and restyling whole pages because pre-open review treated every line as new.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: strip HTML comment delimiters from AI draft summaries
An unmatched comment opener in the model summary is an HTML block through the end of the pull request body, which hides the editorial-review notice.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: drop a draft summary that does not match the accepted revision
An accepted revision with no summary fence was keeping the previous pass's summary, so the draft pull request could describe files that had already been replaced.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: match sibling spacing when a draft adds a section
The command reference puts each label on the line above its fence. Drafts were inserting a blank line there, which made a new command harder to scan than the rest of the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: let related brief actions share a section
Forcing a heading per gap-brief action split behaviours that belong together on the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: keep the writer trail and the full action list
The pre-open trail disappeared with the runner, and a maxed gap brief could drop the last action before review.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs-ai: use git diff --no-index for pre-open review diffs
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs-ai: keep prior draft when a revision reverts the page; fold draftTitle into author-loop
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs-ai: never draft changelogs, upgrade notes, or the version archive
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs-ai: keep gap analysis recommendations unchanged
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: draft pages from merged Docs/Needed via author personas
When a PR merges still carrying Docs/Needed, read the gap sticky comment,
author MDX with the matching audience personas (pre-reviewed in-loop), and
open docs/pr-<n>. Closing that draft flips Docs/Needed to Docs/Done.
Retires the cross-repo docs-needed.yml workflow.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): harden writer fence parse, version check, and brief fallback
Match CodeRabbit findings that still hold: outer fences of equal length so
nested code samples survive; require the milestone version (not any vX.Y);
fall back to PR evidence when the gap sticky is missing; narrow the App
token. Keep pull_request (not pull_request_target) to match the gap
pipeline's fork posture.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): tighten author path scope, ERROR halt, and sync provenance
Restrict each author pass to its group targets; fail the loop on review
ERROR instead of opening a half-reviewed draft; require same-repo head
and DOCS_AI_BOT_LOGIN before flipping Docs/Done. Also cover additionsDiff
edge cases and longest-prefix author matching.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: lift observability and parity guidance into docs-writer prompt
Carry the useful bits from draft_docs.md without restoring triage: parity
vs net-new as a one-line scope rule, plus when to document logs/metrics.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): require author passes to cover every group target
Emitted ⊆ allowlist was not enough — an incomplete pass could drop a
named page. Reject initial omissions; keep prior groupFiles when a
revision fails to re-emit every target.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): harden revision limit, impact paths, and anchor reject
Validate DOCS_AI_MAX_REVISIONS as a non-negative integer; filter gap
impact locations to allowed .md/.mdx before grouping; keep the prior
pass when a revision drops the milestone version anchor.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): drop AI-Drafted label; frame unknown versions
Identify drafts by App authorship instead of Docs/AI-Drafted. Require
"From Mattermost [NOT PRESENT — …]" for unknown releases, and replace
the DEBUG observability example with admin-facing cases.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): address writer review on sync, paths, and author context
Require draft merge before Docs/Done, filter deny-listed paths at extraction,
prefer branch provenance, pass existing pages into the author prompt, and
tighten workflow input/credential handling.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(docs-ai): keep full page context on author and revision passes
Reject oversized pages instead of truncating them, feed the in-memory draft
into revision prompts, and tighten line-based MDX import/export checks.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>