|
| 1 | +--- |
| 2 | +name: doc-create |
| 3 | +description: Create new documentation pages for the validatedpatterns.io site. Supports learn pages and pattern page sets. Generates AsciiDoc files with correct frontmatter, structure, and style-compliant content. Use when creating new docs, pages, patterns, or learn content. |
| 4 | +argument-hint: <content-type> <topic-or-name> |
| 5 | +--- |
| 6 | + |
| 7 | +Create new documentation for the validatedpatterns.io Hugo site. Follow the workflow below precisely. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Step 1: Resolve content type and gather inputs |
| 12 | + |
| 13 | +- If `$ARGUMENTS` is empty, ask the user what content type (`learn` or `pattern`) and topic to create. |
| 14 | +- If `$ARGUMENTS` contains a content type and topic, use them directly. |
| 15 | + |
| 16 | +### Learn pages |
| 17 | + |
| 18 | +Collect: |
| 19 | +- **title** (required): Page title in sentence-style capitalization. |
| 20 | +- **parent menu** (optional): If this is a child page, the parent menu label (e.g. "Patterns quick start"). Leave empty for top-level learn pages. |
| 21 | +- **weight** (required): Sort order (10, 20, 30, ...). |
| 22 | +- **topic summary**: Brief description of what the page covers — used to generate content. |
| 23 | + |
| 24 | +### Pattern page sets |
| 25 | + |
| 26 | +Collect: |
| 27 | +- **pattern name** (required): Lowercase, dash-separated directory name (e.g. `my-new-pattern`). |
| 28 | +- **title** (required): Human-readable pattern title. |
| 29 | +- **date** (required): Publication date in `YYYY-MM-DD` format. |
| 30 | +- **summary** (required): One-sentence pattern description. |
| 31 | +- **tier** (required): `sandbox`, `tested`, or `maintained`. |
| 32 | +- **rh_products** (required): List of Red Hat products used. |
| 33 | +- **industries** (required): List of target industries. |
| 34 | +- **partners** (optional): List of partner organizations. |
| 35 | +- **GitHub repo URL** (required): Used to populate `links.github` and `links.bugs`. |
| 36 | +- **Additional subpages** (optional): Beyond the standard set (getting-started, cluster-sizing, ideas-for-customization, troubleshooting). |
| 37 | + |
| 38 | +## Step 2: Determine format and naming |
| 39 | + |
| 40 | +- **Always use AsciiDoc (`.adoc`)** unless the user explicitly requests Markdown (`.md`). |
| 41 | +- File names: lowercase, dash-separated (e.g. `getting-started.adoc`, `cluster-sizing.adoc`). |
| 42 | +- Pattern directories: `content/patterns/<pattern-name>/` with `_index.adoc` and subpages. |
| 43 | +- Learn pages: `content/learn/<page-name>.adoc`. |
| 44 | + |
| 45 | +## Step 3: Generate files from templates |
| 46 | + |
| 47 | +Read the applicable reference file before generating content: |
| 48 | + |
| 49 | +- **Learn page**: Read [references/learn-page.md](references/learn-page.md) for frontmatter schema, menu hierarchy, and body structure. |
| 50 | +- **Pattern page set**: Read [references/pattern-set.md](references/pattern-set.md) for index frontmatter schema, standard subpages, and body templates. |
| 51 | + |
| 52 | +### Generation rules |
| 53 | + |
| 54 | +1. Create files using the template structure, substituting the gathered metadata. |
| 55 | +2. For patterns, create the full standard page set: |
| 56 | + - `_index.adoc` — pattern overview |
| 57 | + - `getting-started.adoc` (weight 10) — prerequisites and deployment procedure |
| 58 | + - `cluster-sizing.adoc` (weight 20) — resource requirements |
| 59 | + - `ideas-for-customization.adoc` (weight 30) — customization suggestions |
| 60 | + - `troubleshooting.adoc` (weight 40) — common issues and solutions |
| 61 | + - Plus any additional subpages requested by the user. |
| 62 | +3. For AsciiDoc files, always include these attributes at the top of the body: |
| 63 | + ``` |
| 64 | + :toc: |
| 65 | + :imagesdir: /images |
| 66 | + :_content-type: ASSEMBLY |
| 67 | + include::modules/comm-attributes.adoc[] |
| 68 | + ``` |
| 69 | +4. **Write real content** based on the topic — not just placeholder comments. Draft substantive sections that the user can refine. Use shared AsciiDoc attributes from `modules/comm-attributes.adoc` instead of hard-coding product names. |
| 70 | +5. Use `[id="section-id"]` anchors before major AsciiDoc sections. |
| 71 | + |
| 72 | +## Step 4: Quick style check |
| 73 | + |
| 74 | +Before presenting the result, read these high-impact style guides from `../doc-review/guides/` and verify the generated content complies: |
| 75 | + |
| 76 | +| Priority | Guide | Key check | |
| 77 | +|---|---|---| |
| 78 | +| 1 | `titles-and-headings.md` | Gerund headings for procedures, noun phrases for concepts | |
| 79 | +| 2 | `capitalization.md` | Sentence-style capitalization in all headings | |
| 80 | +| 3 | `minimalism.md` | No self-referential text, no fluff, concise sentences | |
| 81 | +| 4 | `passive-voice.md` | Active voice in instructions | |
| 82 | +| 5 | `future-tense.md` | Present tense throughout | |
| 83 | +| 6 | `contractions.md` | No contractions | |
| 84 | +| 7 | `avoid-these-words.md` | No banned words | |
| 85 | +| 8 | `conscious-language.md` | Inclusive terminology | |
| 86 | + |
| 87 | +Fix any violations in the generated files before presenting them. |
| 88 | + |
| 89 | +## Step 5: Full style review with doc-review |
| 90 | + |
| 91 | +After generating the files, run the **doc-review** skill against all created files for a comprehensive review using the full set of 24 style guides. This catches issues beyond the quick check in Step 4 (e.g. phrasal verbs, comma usage, possessives, link text, UI element formatting, command-line conventions, and format-specific rules). |
| 92 | + |
| 93 | +Invoke the doc-review skill with the path to the created files: |
| 94 | +- For a learn page: pass the single file path (e.g. `content/learn/page-name.adoc`). |
| 95 | +- For a pattern page set: pass the pattern directory (e.g. `content/patterns/pattern-name/`). |
| 96 | + |
| 97 | +Apply must-fix issues automatically. Present recommended improvements to the user for their decision. |
| 98 | + |
| 99 | +### Output summary |
| 100 | + |
| 101 | +After generating and validating, present: |
| 102 | +1. A file list with full paths and a one-line description of each file. |
| 103 | +2. Any style fixes that were applied during generation and review. |
| 104 | +3. Suggested next steps (e.g. adding images, creating reusable modules, running `make serve` to preview). |
0 commit comments