@@ -93,6 +93,101 @@ jobs:
9393 # the package is published by Anthropic. Pin if supply-chain policy requires it.
9494 run : npm install -g @anthropic-ai/claude-code
9595
96+ - name : Write prompt
97+ run : |
98+ cat > /tmp/burlap.txt << 'PROMPTEOF'
99+ The context block above contains an Epic with its related PRs already assembled.
100+ Your task is to assess whether this Epic's delivery requires new or updated
101+ documentation in the dotCMS docs.
102+
103+ If a `## Vault Context` section is present in this block, use it to inform the
104+ grouping and audience sections of the report — target personas, product pillar,
105+ GTM status, and strategic framing. If no Vault Context is present, infer from
106+ the Epic and PR content.
107+
108+ Run one or more dotCMS AI semantic searches to assess current documentation
109+ coverage. Use the Bash tool to execute each search:
110+
111+ curl -s -X POST "https://cdn.dotcms.dev/api/v1/ai/search" \
112+ -H "Authorization: Bearer $AUTODOC_DOTCMS_API_TOKEN_AISEARCH" \
113+ -H "Content-Type: application/json" \
114+ -H "Origin: https://dev.dotcms.com" \
115+ -H "Referer: https://dev.dotcms.com/" \
116+ -d '{"model":"gpt-5.2","indexName":"default","prompt":"<your query here>","operator":"cosine","threshold":".25","searchLimit":20}'
117+
118+ Run multiple searches with varied queries to thoroughly assess coverage. Use the
119+ results to determine whether documentation exists, is sufficient, or needs updating.
120+
121+ Then write the report to the path shown at the bottom of this context block,
122+ using the Write tool.
123+
124+ **Every report, regardless of outcome, must contain a machine-readable metadata
125+ block placed immediately after the report header and before the `## Determination`
126+ section.** Use exactly this structure and no other:
127+
128+ ```
129+ <!-- BEGIN_DOC_META -->
130+ action: none
131+ <!-- END_DOC_META -->
132+ ```
133+
134+ For `update` reports, add `urlTitle` (the urlTitle of the page being updated):
135+
136+ ```
137+ <!-- BEGIN_DOC_META -->
138+ action: update
139+ urlTitle: saml-authentication
140+ <!-- END_DOC_META -->
141+ ```
142+
143+ For `create` reports, add `urlTitle` (proposed), `title`, `tags`
144+ (comma-separated), and `seoDescription`:
145+
146+ ```
147+ <!-- BEGIN_DOC_META -->
148+ action: create
149+ urlTitle: vanity-urls-s3-static-publishing
150+ title: Vanity URLs in S3 Static Publishing
151+ tags: static publishing, push publishing, vanity urls, AWS S3
152+ seoDescription: Learn how to enable and configure opt-in Vanity URL materialization for AWS S3 static publishing in dotCMS.
153+ <!-- END_DOC_META -->
154+ ```
155+
156+ The style of report depends upon a determination that must be made here:
157+
158+ - There is a chance that no documentation change is warranted. This is common when
159+ the Epic delivers internal architecture work, bug fixes, or a feature that is
160+ already fully documented. Some cases will be clear and some uncertain — evaluate
161+ whether the Epic's delivery is both end-user relevant and documentable. If no
162+ documentation is needed, the report must explain why. No `<!-- BEGIN_DOC_DRAFT -->`
163+ token appears anywhere in no-documentation reports.
164+
165+ - There is a chance that relevant documentation exists but needs an update. If the
166+ docs are not fully current with what the Epic delivered, the report should first
167+ present a differential explaining what changes are necessary and where. After all
168+ analysis, the report must end with the token `<!-- BEGIN_DOC_DRAFT -->` on its
169+ own line, immediately followed by the **complete, final content of the page's
170+ `documentation` field** — the full existing document with all proposed changes
171+ already incorporated. This is not a diff and not an insertion fragment: it is the
172+ entire field value as it should exist after the update, ready to be submitted to
173+ the API as-is. The draft runs to the end of the file with no trailing content
174+ after it.
175+
176+ - There is a chance that the Epic introduces something documentable with no
177+ existing coverage. In this case, the report should include a differential on the
178+ documentation gap, a list of appropriate tags, a short SEO description, a
179+ description of what feature this documentation should be grouped with, and what
180+ user personas it is most relevant to. After all analysis, the report must end
181+ with the token `<!-- BEGIN_DOC_DRAFT -->` on its own line, immediately followed
182+ by the complete draft of the new documentation page. The draft runs to the end
183+ of the file with no trailing content after it.
184+
185+ When drafting the documentation page, use horizontal rules (`---`) sparingly.
186+ Headings already provide clear visual and structural separation; `---` should
187+ be reserved only for the most stark structural breaks and must not appear
188+ between ordinary subsections.
189+ PROMPTEOF
190+
96191 - name : Build eval context
97192 run : |
98193 cat > /tmp/ctx.py << 'PYEOF'
@@ -176,8 +271,8 @@ jobs:
176271 else:
177272 print(f'warning: no vault file for Epic #{epic_num}', file=sys.stderr)
178273
179- prompt = open('dotcms-aios/autodoc/prompts /burlap.txt').read().strip()
180- report_path = f'dotcms-aios/autodoc/reports /Epic-{epic_num}_burlap.md'
274+ prompt = open('/tmp /burlap.txt').read().strip()
275+ report_path = f'/tmp /Epic-{epic_num}_burlap.md'
181276 lines += [
182277 '', '---', '', '## Prompt: burlap', '', prompt,
183278 '', '---', '',
@@ -196,7 +291,7 @@ jobs:
196291
197292 - name : Post comment, apply to dotCMS, commit report
198293 run : |
199- REPORT="dotcms-aios/autodoc/reports /Epic-${EPIC_NUMBER}_burlap.md"
294+ REPORT="/tmp /Epic-${EPIC_NUMBER}_burlap.md"
200295
201296 if [ ! -f "$REPORT" ]; then
202297 echo "No report at $REPORT — skipping finalize."
0 commit comments