Skip to content

feat: add docs-create-draft authoring skill - #113

Open
theletterf wants to merge 1 commit into
mainfrom
feat/docs-create-draft
Open

feat: add docs-create-draft authoring skill#113
theletterf wants to merge 1 commit into
mainfrom
feat/docs-create-draft

Conversation

@theletterf

Copy link
Copy Markdown
Member

Summary

  • Adds docs-create-draft, a new authoring skill that guides the full lifecycle of drafting a new Elastic docs page from scratch.
  • The skill auto-triggers when a user asks to write or document a new page and runs in a forked subagent context.
  • Includes 5 eval test cases covering how-tos, overviews, troubleshooting, duplication risk, and GitHub issue intake.

What the skill does

  1. Intake — collects audience, purpose, GitHub/PR context, and target location via AskUserQuestion; fetches linked issues via the GitHub CLI; reads repo toc.yml and sibling files for conventions.
  2. Content type classification — fetches live guidelines and templates from the Elastic Docs MCP; classifies among overview / how-to / tutorial / troubleshooting; falls back to free-form with explicit user notification when no type fits.
  3. Related-docs research — uses search_docs, find_related_docs, and check_docs_coherence to find duplication risk and crosslink candidates.
  4. Frontmatter — derives applies_to, meta_title (Pattern A/B), and navigation_title from context.
  5. Three-layer SEO title guidance — page title, H1, and navigation title with length targets, content-type-specific patterns, and Pattern A/B page title rules.
  6. Light and full review checklists — full review runs by default for new pages (user focus, technical accuracy, applicability, maintainability, language, style); light review available for small corrections.
  7. Subagent reading test — spawns an Agent from the first-time reader's perspective and reports clarity gaps back to the user.

Test plan

  • Run /docs-create-draft with a topic description and verify intake questions appear
  • Verify content type is classified and the correct template is fetched
  • Verify applies_to and meta_title are generated correctly in frontmatter
  • Verify the full review checklist runs and violations are fixed before the draft is presented
  • Verify the reading test subagent is launched and its report is included in the output
  • Verify the free-form fallback fires and notifies the user when no content type fits

🤖 Generated with Claude Code

New skill that guides the full lifecycle of drafting a new Elastic docs
page: intake questions (audience, purpose, GitHub/PR context), content
type classification with free-form fallback, related-docs research via
the Elastic Docs MCP, frontmatter generation (applies_to, meta_title,
navigation_title), three-layer SEO title guidance, light and full review
checklists, and a subagent reading test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Skill Quality Review

docs-create-draft

Overall: A well-structured, comprehensive skill that guides an agent through the full documentation drafting workflow with clear, actionable steps.

Strengths:

  • Excellent trigger description — clearly states what triggers the skill, what inputs are accepted, and what the outcome is.
  • Well-scoped multi-step workflow with explicit sequencing and gate conditions (e.g., ask before proceeding, surface duplicates before drafting).
  • Strong imperative language throughout; instructions are specific and unambiguous.
  • Good use of tables for structured decision-making (content type classification, title patterns, word choice).
  • Reading test via subagent is a notable quality gate that adds real value.
  • sources: frontmatter and context: fork are correctly applied.
  • Code block ratio (~0.08) and token use are well-balanced — examples are minimal and illustrative.
  • The two-tier review checklist (light vs. full) is practical and avoids one-size-fits-all overhead.

Issues: None found. All required frontmatter fields are present, name is kebab-case with docs- prefix, version is valid SemVer, no unclosed code fences, no broken internal links.

Suggestions:

  • At 440 lines, this is near the token-efficiency threshold. The full review checklist (Steps 6, lines ~320–394) is thorough but long. Consider whether the agent strictly needs the full word-choice table and style guidance inline, or whether a reference to a style skill (if one exists) would reduce duplication.
  • The meta_title note flags that the field is not yet implemented in docs-builder. If the field remains unimplemented, drafted pages may contain noise. Consider adding a reminder to remove or comment out this field until it ships.

Generated by Skill Quality Review for #113 · sonnet46 · 29.5 AIC · ⌖ 5.27 AIC · ⊞ 5.9K ·

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Skill Eval Results

docs-create-draft

Eval Prompt Pass Rate Details
1 Draft a new page about configuring Fleet server TLS. Audience: operators with Ela... 8/8 (100%) All passed
2 I want to write a page explaining what ES|QL is for a developer who has never use... 8/8 (100%) All passed
3 Draft a troubleshooting page for the error index_not_found_exception in Elastic... 8/8 (100%) All passed
4 There is already a page about Kibana alerting at https://www.elastic.co/docs/explo... 4/4 (100%) All passed
5 I have a GitHub issue at elastic/docs-content#9999 that asks to document the new -... 7/7 (100%) All passed

Overall: 35/35 expectations passed (100%)

The skill's instructions map cleanly to all eval expectations:

  • Eval 1 (Fleet TLS how-to): Step 2 correctly guides procedural → how-to classification. Step 4 explicitly handles serverless: unavailable for Stack-only features. H1 rules in Step 5 mandate imperative-verb form for how-to pages. Step 7 ensures reading test is always run.
  • Eval 2 (ES|QL overview): Step 1 requires AskUserQuestion when context is missing. Step 3 always runs search_docs/find_related_docs to surface duplication risk. Reading test question 2 specifically checks for jargon unfamiliar to the stated audience.
  • Eval 3 (troubleshooting): Step 2 routes error symptoms → troubleshooting. The troubleshooting template structure (Symptoms → Resolution) ensures correct ordering and monospace error display. Step 5 describes a problem-focused H1 for troubleshooting pages.
  • Eval 4 (alert suppression duplication): Step 3 explicitly instructs surfacing duplicate risk and asking the user before drafting — the skill will not auto-draft when a similar page exists.
  • Eval 5 (GitHub issue CLI flag): Step 1a provides the exact gh issue view command and extraction targets (scope, audience, applies_to hints). Step 4 applies the stack: ga X.X+ / serverless: unavailable rules correctly.

No regressions detected. The skill provides clear, deterministic instructions for all tested scenarios.

Generated by Skill Eval Testing for #113 · sonnet46 · 38.7 AIC · ⌖ 5.29 AIC · ⊞ 5.7K ·


`meta_title` is a proposed field (not yet implemented in docs-builder). Set it in the frontmatter now so it is ready when the field is available. Until then, Pattern B pages fall back to `{H1} | Elastic Docs` without the product qualifier.

### Derive applies_to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could use clearer guidance for AI regarding WHERE it should put the tags. This is a problem that I come across all the time, as AI kind of just lets them float above a section, which looks bad and makes is unclear which section of the docs the tags really apply to. Normally they either need to be inline with the paragraph's/sentence's/bullet point's beginning OR you need to create sub-sections and tag them properly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be captured in the applies_to skill (I think it already at least partly is), not diluted in various skills

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could either make those bits reusable as fragments or just tell the skill to read the docs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deployment type dimension is completely ignored here. I agree with @florent-leborgne -- this should be a separate skill (too much complexity as is).


#### Style

**Voice and tense** — Active voice except where passive is necessary. Present tense unless future is genuinely required. Second person ("you/your"). No "I/me." Use "we" only for "we recommend."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"unless future is genuinely required" - this is vague for an LLM. I get what you mean here, but it would have to be more precise for AI in my opinion.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to suggestions / examples!


**Titles and headings** — Sentence case throughout. Describes the page distinctly from similar titles. Action-oriented where appropriate (gerund or verb for task headings). Content exists between consecutive headings (no empty headings). Consistent heading style at each level. Aim for 50–60 characters when practical.

**Formatting and admonitions** — Formatting is consistent. Admonitions are used sparingly (roughly three or fewer nearby) so they still stand out. No back-to-back stacked admonitions; merge into one callout or the narrative where possible. Bold for UI elements. Monospace for commands, settings, file paths, values. Oxford comma in lists of three or more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add that stacking notes, while not forbidden, should also be used sparingly and only when absolutely necessary.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++


**Mechanics** — Grammar, spelling, and punctuation support clarity. Simplify punctuation where it helps.

**Plain language and terminology** — Accessible to someone new to the topic. Jargon, acronyms, and internal terms are defined or linked on first use. Minimal wording. Informational tone. Consistent terms for ambiguous concepts. No promotional language or superlatives.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth adding that terms should be defined on first use on a page, and not, for example, a section. Again, this is one of the things that are just obvious to us but not for LLMs 😄


#### Technical accuracy

**Correctness** — SME-written or backed by an authoritative source (issue, eng review). Tested where possible. No contradictions with the docs corpus.

@alexandra5000 alexandra5000 Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May also be backed by the PR that implemented the change I suppose (if you can find one it can be very useful)


**User focus** — The change serves the user's task. Paragraphs are short. Lists, tables, and admonitions make the update scannable. Content sits in the right place on the page.

**Technical accuracy** — Content is technically sound and confirmed by an SME or authoritative source (issue, Slack, eng review). Does not contradict the corpus. New code samples have been tested. If the change affects version, lifecycle, or deployment scope: prerequisites remain accurate; no new permission or setup dependency is left unstated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OR the corpus also needs an update - depending on the situation

@florent-leborgne

Copy link
Copy Markdown
Member

@theletterf if you don't mind i'll bundle the skill i've been using for this same purpose over the past few months and upload it. I think this one does more or less what mine does, with the difference that I made a few iterations on mine after using it on ~100 issues - we can likely compare and take the best of both worlds or see what we can cut/adjust.

@theletterf

Copy link
Copy Markdown
Member Author

@florent-leborgne Certainly more battle tested (wish I knew about it before though)! Please open a PR, I can then switch over to yours and add suggestions there — merci!

@florent-leborgne

Copy link
Copy Markdown
Member

We've talked about it I think :) Here it is #115 there might be a few unique things in this one or in mine worth keeping in whichever we'll ship. Mine's a bit long though I'm happy with how it works :)

@theletterf

theletterf commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Hey @florent-leborgne, picking up from the Slack thread in the docs writers channel, here's a quick summary and a comparison of the two skills.

Review checklist, updated H1/title guidance, and the reader subagent from this PR are the candidates to bring into #115. Entry/exit points also need reconciling. Could you annotate which parts of #113 you find worth keeping? Happy to prepare a targeted PR against #115 with those specific sections once that's clear.

Differences between the two skills

What #115 does that #113 doesn't

What #113 has that #115 doesn't

  • Three-layer SEO title model: page title / H1 / navigation title with length targets, Pattern A/B meta_title rules, content-type-specific H1 patterns, and navigation_title trimming rules. feat: add docs-accept-quest authoring skill #115 lists an SEO URL in sources but doesn't encode the guidance.
  • Two-tier review checklists: full light and full checklists covering user focus, technical accuracy, applicability, maintainability, language, and style. feat: add docs-accept-quest authoring skill #115's Phase 6 is a shorter opinionated list.
  • Free-form fallback: explicit user notification when no standard content type fits, with a description of the structure chosen instead. feat: add docs-accept-quest authoring skill #115 doesn't address this case.


Write the full page content following the template from Step 2.

### Title layers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgewallace Could you provide feedback on the title section? Would you rather pass it to a separate (public) skill?


---

### Full review checklist

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yetanothertw Could you check the review step instructions?


## Step 5: Draft the page

Write the full page content following the template from Step 2.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also add that the main focus is always to serve the user's task/goal (whether it's to learn about a concept or follow a step-by-step guide). It should perhaps ask for that sooner in the process, too.

The main aim is to create a logical flow to the information, follow progressive disclosure patterns, avoid duplication with existing pages, and clearly present conceptual choices.

I think you can reverse-engineer the full review checklist into guiding principles for the step when it's considering writing the content -- instead of having a dedicated review step.


---

## Step 6: Self-review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the drafting process warrants a self-review section/step.

Broken down to its core, the checklist is a list of guiding principles for assessing docs quality, so I think it works better when fed as "here's how you write useful/meaningful docs" rather than "check yourself after you've already drafted stuff". Does that make sense? @georgewallace, what do you think?

"evals": [
{
"id": 1,
"prompt": "Draft a new page about configuring Fleet server TLS. Audience: operators with Elastic Stack experience. Purpose: walk through generating certs and applying them to Fleet server. Stack 9.0+, no serverless.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a more global problem, but noting it anyway: we need to be much more specific about who our audience is. Operators, developers, etc. I get it, but what are our assumptions wrt to each of those groups? What is their technical knowledge level (are they approaching a task from a DevOps role perspective or a developer contributing to Elasticsearch)? What's their experience level with the Elastic Stack? Is the task they're trying to achieve a day 0, day 1, or later type of task?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw I can see we ask some of this during the intake step of the skill, I'm just advocating for having a documented strategy for alignment.
Would be great to have this documented somewhere and validated by product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants