Add modify mode to elastic-package update documentation#3688
Conversation
Co-authored-by: Jonathan Molinatto <jonathan.molinatto@gmail.com> Co-authored-by: Quan Nguyen <quan.nguyen@elastic.co> Co-authored-by: Cursor <cursoragent@cursor.com>
- Pass existingSections (not templateSections) to analyzeModificationScope so scope analysis matches against the actual document's section titles - Check backupOriginalReadme error in ModifyDocumentation, consistent with UpdateDocumentation - Let ScopeAmbiguous flow through parseScopeAnalysisResponse so the user warning in applyModificationScope is reachable; low-confidence specific scope now becomes ScopeAmbiguous instead of silently falling back to global - Return ShouldContinue=true on empty text area input in handleRequestChanges so the interactive loop re-prompts rather than terminating the session - Remove unused sections parameter from runInteractiveSectionReview - Parallelize modifyAllSections and modifySpecificSections with goroutines, matching the pattern used by GenerateAllSectionsWithValidation - Pre-compute affected sections before modification to use an accurate denominator in modifySpecificSections progress messages - Add dedicated SectionList field to PromptContext instead of overloading SectionTitle in scope analysis prompt building - Remove false-positive direction from isSectionAffected fuzzy match - Replace inline ModificationScope error literals with defaultModificationScope Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TL;DR
Remediation
Investigation detailsRoot CauseThe failed job is
The error result is not needed for the current behavior:
So the behavior-preserving fix is to remove the error return from Evidence
VerificationNot run locally; this detective pass inspected the failing Buildkite log and PR-head source. The recommended validation is What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
- Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf() (QF1012) - Remove always-nil error return from analyzeModificationScope (unparam) - Update call sites in docagent.go to match new signature Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
💚 Build Succeeded
History
|
Change the default LLM model to gemini-3.5-flash, as the gemini-3-flash-preview model is deprecated.
mrodm
left a comment
There was a problem hiding this comment.
Changes related to cmd LGTM 👍
Extends the AI-powered documentation command with a targeted modification mode, complementing the existing full-rewrite mode.
With modify mode, the user will be prompted for a description of the change to apply to the existing documentation.
The LLM will apply the described change by first analyzing what section(s) the change applies to. It will then apply the change to all relevent sections. In interactive mode, the user will be shown a preview of the prompt, and be given an option to accept it, or repeat the process to make futher changes to the documentation.
How modify mode works: