Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
d75da63
Prototype nav-v2: label sections, accordion sidebar, feature flag
theletterf Mar 20, 2026
0f58ae0
Fix accordion: unique IDs per label section
theletterf Mar 20, 2026
407c477
Rewrite navigation-v2.yml with proposed IA (6 top-level labels, neste…
theletterf Mar 20, 2026
76657fb
Labels always expanded with no toggle; only TOC folders toggle
theletterf Mar 20, 2026
3213a5c
Update nav-v2-status.md: verified behaviours, open items, build commands
theletterf Mar 20, 2026
33502f5
Style level-2 labels as small-caps dividers to distinguish from level-1
theletterf Mar 20, 2026
cd3075b
Level-1 labels: small-caps uppercase + ruled separator between groups
theletterf Mar 20, 2026
e0cc136
Improve level-2 label legibility: text-xs at 65% opacity
theletterf Mar 20, 2026
a870f12
Update nav-v2-status.md: document label typography hierarchy
theletterf Mar 20, 2026
41c1ca2
Add PR link and commit workflow to nav-v2-status.md
theletterf Mar 20, 2026
858593e
Add group: placeholder folder type; build Ingest or migrate section
theletterf Mar 20, 2026
027fcd7
Fix YAML quoting for group title containing colon
theletterf Mar 20, 2026
4490cf9
Build full nav skeleton from JSON IA design
theletterf Mar 20, 2026
c808a6e
Fix CI failures: AOT-compatible deserializer and unused import
theletterf Mar 20, 2026
1e81481
Address code review: LINQ refactor and flatten nested if
theletterf Mar 20, 2026
99670dd
Fix Prettier formatting in pages-nav-v2.ts
theletterf Mar 20, 2026
5c7380b
Wire up page: cross-link resolution in V2 nav
theletterf Mar 20, 2026
b7172c6
Fix IDE0370: remove unnecessary null-forgiving operators in SiteNavig…
theletterf Mar 20, 2026
18540af
Expand nav to current page on direct URL load
theletterf Mar 20, 2026
c9160ce
Revert URI-derived path prefix experiment; document limitation in PR
theletterf Mar 20, 2026
e7c8292
Wire Reference section in navigation-v2.yml with real toc and page en…
theletterf Mar 20, 2026
3fa5e19
Wire Troubleshooting section with page: cross-links
theletterf Mar 20, 2026
69d6c32
feat(nav-v2): page-folder group node; migrate section and Reference/T…
theletterf Mar 23, 2026
9942d3a
fix(nav-v2): check group: before page: in YAML parser to support page…
theletterf Mar 23, 2026
0b4bb8d
docs: update nav-v2-status.md to reflect current prototype state
theletterf Mar 24, 2026
15b3bef
feat(nav-v2): generate stub pages for placeholder nav items
theletterf Mar 24, 2026
eea7a08
docs(nav-v2): update status — placeholder items now generate stub pages
theletterf Mar 24, 2026
db10774
fix(nav-v2): use absolute URL path prefix for placeholder page static…
theletterf Mar 24, 2026
6b953fd
feat(nav-v2): wire Explore/Visualize, Share/Alert/Automate, and AI/ML…
florent-leborgne Mar 24, 2026
8c2d0d8
feat(nav-v2): wire Solutions and project types section with full dept…
florent-leborgne Mar 24, 2026
8c1645c
Merge remote-tracking branch 'origin/main' into nav-v2
theletterf Mar 24, 2026
0278198
Merge branch 'nav-v2' of github.com:elastic/docs-builder into nav-v2
theletterf Mar 24, 2026
6d747b1
feat(nav-v2): restructure AI and machine learning section (#2965)
florent-leborgne Mar 25, 2026
b00e1db
refactor(nav-v2): promote Ingest tools to L1 under Ingest and manage …
theletterf Mar 25, 2026
216ec9c
Merge branch 'main' into nav-v2
florent-leborgne Mar 27, 2026
c34c969
feat(nav-v2): promote Workflows to its own top-level label (#2976)
florent-leborgne Mar 27, 2026
afd4977
feat(nav-v2): rename section to "Track and respond"
florent-leborgne Mar 27, 2026
defdce1
feat(nav-v2): sidebar tree, styles, and folder UX
itsalexcm Mar 30, 2026
3aa6eee
feat(nav-search): polish in-sidebar jump-to-page component
itsalexcm Mar 30, 2026
e60bd4b
style(toc): align in-page and API TOC link padding with sidebar
itsalexcm Mar 30, 2026
c08b6e3
Merge branch 'main' into nav-v2
itsalexcm Mar 30, 2026
1f3f702
style: fix Prettier formatting in pages-nav-v2.ts and styles.css
theletterf Mar 30, 2026
313138a
Wire Elasticsearch fundamentals and Ingest data storage nav sections …
theletterf Mar 31, 2026
6a667dc
Wire Ingest logs, APM agents, and clean up nav labels (#3004)
theletterf Mar 31, 2026
369e518
Merge branch 'main' into nav-v2
theletterf Mar 31, 2026
beefc87
feat(nav-v2): rename Agentless group, add integrations reference page
theletterf Mar 31, 2026
c4cbed6
fix(nav-v2): generate stub pages for placeholders nested inside real …
theletterf Mar 31, 2026
92d4829
feat(nav-v2): single-line nav labels with ellipsis and truncated-only…
itsalexcm Mar 30, 2026
6cad4aa
feat(nav-v2): ancestor folder highlight and expand/collapse behaviour
itsalexcm Mar 31, 2026
f1c3e2a
style(nav-v2): section labels, tree spacing, and active row chrome
itsalexcm Mar 31, 2026
e4171a2
feat(nav-v2): move perform-index-operations per docs-content#5279
theletterf Apr 1, 2026
65579de
Merge branch 'main' into nav-v2
theletterf Apr 1, 2026
29ba44f
style: fix Prettier formatting in pages-nav-v2.ts and styles.css
theletterf Apr 1, 2026
d828f09
fix(nav-v2): ancestor folder ink and deepest current link
itsalexcm Apr 1, 2026
d4bdd09
style: fix Prettier formatting in pages-nav-v2.ts and styles.css
theletterf Apr 2, 2026
a6399e3
Merge remote-tracking branch 'origin/main' into nav-v2
theletterf Apr 2, 2026
b8e3e80
fix: resolve fs → readFs after merge with main
theletterf Apr 2, 2026
0f21dd1
Update Azure EDOT CF version (#3022)
theletterf Apr 2, 2026
bebeab4
Enable AOT/trim analyzers on library projects and skip AOT publish on…
reakaleek Apr 2, 2026
11895b4
HTML: Omit version meta tags for versionless pages (#3020)
reakaleek Apr 2, 2026
a88ea32
Layout: Adapt to static elastic-nav by making secondary nav sticky (#…
reakaleek Apr 2, 2026
cf5e8e8
[DOCS] Add profile example for --all bundle, fix path for changelog s…
lcawl Apr 2, 2026
a798bb0
Deploy: separate read/write scoped filesystems in IncrementalDeploySe…
Mpdreamz Apr 2, 2026
c69e47f
Add skip-labels to evaluate-pr's output (#3013)
cotti Apr 2, 2026
e49938a
fix(markdown): use placeholder rule when detection rule TOML cannot b…
itsalexcm Apr 7, 2026
822bba0
fix(site): use #pages-nav for cross-group HTMX OOB and omit preload w…
itsalexcm Apr 7, 2026
287adac
feat(site): enable navigation V2 shell for isolated documentation serve
itsalexcm Apr 7, 2026
5debd27
fix(docs-builder): serve dev Site _static for assembler serve; bust s…
itsalexcm Apr 7, 2026
a521e8b
feat(site): refine navigation V2 sidebar spacing, typography, and hov…
itsalexcm Apr 7, 2026
94ec3bf
Merge branch 'main' into nav-v2
itsalexcm Apr 7, 2026
4130966
Wire Install, deploy, and administer nav section (#3049)
theletterf Apr 8, 2026
1dfdeb1
Propose IA changes to nav-v2 (#3024)
alexandra5000 Apr 15, 2026
b767e2b
Merge branch 'main' into nav-v2
theletterf Apr 15, 2026
46d2f6e
fix(nav-v2): use resolvable EDOT SDK navigation links
theletterf Apr 15, 2026
2eaa6f4
Merge remote-tracking branch 'origin/main' into nav-v2
theletterf Apr 16, 2026
21e88aa
feat(nav-v2): add section: item type for independent nav islands
theletterf Apr 16, 2026
071f456
feat(nav-v2): migrate top-level labels to section: items
theletterf Apr 16, 2026
3a46434
feat(nav-v2): wrap all content in Docs section; add Release notes, Tr…
theletterf Apr 16, 2026
ef333f8
fix(nav-v2): compact left-aligned top bar, section root highlight, au…
theletterf Apr 16, 2026
23f27b3
feat(nav-v2): add Extension points and Account isolated sections; rem…
theletterf Apr 16, 2026
7fed2c5
fix: correct import ordering in PlaceholderPageWriter
theletterf Apr 16, 2026
cdabed1
feat(nav-v2): support absolute URLs for section tabs; add API reference
theletterf Apr 16, 2026
0557264
feat(nav-v2): add island: item type for intra-section nav islands
theletterf Apr 16, 2026
1e4da5a
feat(nav-v2): convert Account and preferences to island under Docs
theletterf Apr 22, 2026
710743e
Merge remote-tracking branch 'origin/main' into nav-v2
theletterf Apr 22, 2026
ca03a50
Merge branch 'nav-v2' into nav-v2-sections
theletterf Apr 22, 2026
a0b98a3
fix(nav-v2): register island root URL in island lookup
theletterf Apr 22, 2026
b813024
fix(nav-v2): use toc root identity for island lookup instead of URL m…
theletterf Apr 22, 2026
e02fc81
fix(nav-v2): scope top-level padding to label sections only
theletterf Apr 22, 2026
6803630
style: fix Prettier formatting in styles.css
theletterf Apr 22, 2026
fdb278a
fix(nav-v2): back arrow swaps full page including sidebar
theletterf Apr 22, 2026
2d20e27
fix(nav-v2): open external section links in new tab with ↗ indicator
theletterf Apr 23, 2026
c4c5bab
feat(nav-v2): rename Docs to Guides, API reference to APIs
theletterf Apr 23, 2026
13a6695
feat(nav-v2): reorder tabs by task flow
theletterf Apr 23, 2026
4e3bde9
fix(nav-v2): shorten long nav label to 'Query languages and APIs'
theletterf Apr 23, 2026
3df00ef
Merge branch 'main' into nav-v2
shainaraskas Apr 29, 2026
194a57b
Install deploy and administer refinement (#3203)
shainaraskas Apr 29, 2026
41f26a5
Merge branch 'main' into nav-v2
theletterf Apr 30, 2026
dae9fc0
feat(hubs): add Product.Hub field for product hub URL mapping
florent-leborgne Apr 30, 2026
dbda3a4
feat(hubs): add 'hub' page layout with full-width chrome
florent-leborgne Apr 30, 2026
e9676c6
feat(hubs): add {hero} directive for landing-page heroes
florent-leborgne Apr 30, 2026
ec6ff07
feat(hubs): add {card-group} and {link-card} directives
florent-leborgne Apr 30, 2026
8817c8c
feat(hubs): add 'Product hubs' top-bar section to nav-v2
florent-leborgne Apr 30, 2026
e3d365f
feat(hubs): render product badges linking to hub pages
florent-leborgne Apr 30, 2026
28cbaca
feat(hubs): style hub pages, cards, and product badges + port Kibana hub
florent-leborgne Apr 30, 2026
a7ff220
fix(hubs): suppress page preamble on hub layout, widen hub content
florent-leborgne Apr 30, 2026
26b4886
feat(hubs): rewrite hub directives to match gist prototypes
florent-leborgne Apr 30, 2026
705bd15
feat(hubs): restore full section coverage matching the gist prototypes
florent-leborgne Apr 30, 2026
7cc21db
feat(hubs): render fake search box in hero
florent-leborgne Apr 30, 2026
9179599
fix(hubs): align hero icon with H1, push description to its own row
florent-leborgne Apr 30, 2026
7940d99
feat(hubs): turn hero version pill into a real dropdown
florent-leborgne Apr 30, 2026
1908fee
feat(hubs): centralize What's new content in config/whats-new.yml
florent-leborgne Apr 30, 2026
f6ce8b8
feat(hubs): wire hub pages under testing/hubs in docs-builder nav
florent-leborgne Apr 30, 2026
24cee85
feat(hubs): rename URL segment hubs/ -> products/
florent-leborgne Apr 30, 2026
40538ef
docs(hubs): add reference pages for the hub-page directives
florent-leborgne Apr 30, 2026
171b72a
feat(hubs): make hero title and description explicit options
florent-leborgne Apr 30, 2026
9979af7
fix(hubs): make Product hubs section an external link to the gist
florent-leborgne May 1, 2026
4f247a8
Merge branch 'main' into nav-v2
florent-leborgne May 1, 2026
35aa23b
feat(hubs): redesign product badges as inline-with-title pills
florent-leborgne May 1, 2026
4481051
feat(hubs): point product badge URLs at the gist previews
florent-leborgne May 1, 2026
39fb863
Rename hub markdown 9.0.md → v9.md
florent-leborgne May 1, 2026
57ea08e
Replace page-top product badges + applies-block with a metadata box
florent-leborgne May 1, 2026
d0c4497
Restructure page-top metadata: product pills above H1, Requirements b…
florent-leborgne May 1, 2026
f569f7e
Merge nav-v2 into nav-v2-sections, reconciling navigation structure
theletterf May 4, 2026
22a6dcb
Merge remote-tracking branch 'origin/nav-v2-sections' into hub-pages
theletterf May 4, 2026
f5fea77
fix: remove unnecessary null-forgiving operators flagged as IDE0370
theletterf May 4, 2026
04f59da
fix(tests): filter page-title-row div from HTML assertions
theletterf May 4, 2026
79299cb
fix(nav): resolve V2 page: entries into NavigationDocumentationFileLo…
theletterf May 4, 2026
676566c
fix: remove hub-pages-specific config accidentally committed to nav-v2
theletterf May 4, 2026
4cc9e37
Merge remote-tracking branch 'origin/nav-v2' into nav-v2-sections
theletterf May 4, 2026
563b460
Merge remote-tracking branch 'origin/nav-v2-sections' into hub-pages
theletterf May 4, 2026
20a3966
feat(hub-pages): wire hub pages through assembler preview
theletterf May 4, 2026
6a60978
fix(site): classify Nav V2 label lists as subsection vs folder groups
itsalexcm May 4, 2026
c08b2b2
feat(site): Nav V2 search and client navigation behavior
itsalexcm May 4, 2026
c4705ec
fix(site): Nav V2 sidebar and layout styles
itsalexcm May 4, 2026
2158dec
fix(layout): in-page TOC and API TOC layout
itsalexcm May 4, 2026
0784279
chore(svg): add transition_bottom_in and transition_bottom_out icons
itsalexcm May 4, 2026
8c7d3fa
fix(nav): fix CS8120 unreachable case and IDE0058 unused TryAdd returns
theletterf May 4, 2026
52840c4
Merge nav-v2 into nav-v2-sections
theletterf May 4, 2026
c4d5edb
Merge remote-tracking branch 'origin/nav-v2-sections' into hub-pages
theletterf May 4, 2026
ca9489e
style: fix Prettier formatting in pages-nav-v2.ts and styles.css
theletterf May 4, 2026
ce968d5
style(site): apply Prettier to Nav V2 assets
itsalexcm May 4, 2026
6dde442
style: fix Prettier formatting in pages-nav-v2.ts and styles.css
theletterf May 4, 2026
10330f7
fix(assembler): warn instead of error when branch has no link index e…
theletterf May 4, 2026
a1262cd
fix(assembler): gracefully handle unpublished branches in cross-link …
theletterf May 4, 2026
c6b9d67
fix(nav): resolve V2 page entries from nested TOCs
theletterf May 4, 2026
d556dff
fix(nav): register files from unseen child TOCs
theletterf May 4, 2026
65bc6de
Refine page-top metadata: pills inside Availability box, text+? tooltips
florent-leborgne May 4, 2026
8c4af37
Merge remote-tracking branch 'origin/hub-pages' into hub-pages
florent-leborgne May 4, 2026
63f927e
Repoint product hub URLs at the real /products/<product>/v9/ pages
florent-leborgne May 4, 2026
1fab04a
Add Product hubs landing page to V2 nav
florent-leborgne May 4, 2026
1c18fa1
Update authoring snapshot tests for new applies-to tooltip copy
florent-leborgne May 4, 2026
54c3a7e
Stop pill click from toggling the metadata box
florent-leborgne May 4, 2026
3357eb6
Make hub-page navigation work cleanly from htmx-boosted swaps
florent-leborgne May 4, 2026
0bf256a
Merge branch 'nav-v2-sections' into hub-pages
florent-leborgne May 4, 2026
ee242b3
Redesign landing page with search-first layout and product index
KOTungseth May 5, 2026
1d628e2
Scope landing page styles to page content
theletterf May 6, 2026
ef8b5a6
Update top navigation order
theletterf May 7, 2026
588260f
Update top navigation order
theletterf May 7, 2026
9206684
Merge branch 'nav-v2-sections' into hub-pages
florent-leborgne May 7, 2026
3e262e4
Subsection product hubs nav island into Stack products + Deployment r…
florent-leborgne May 7, 2026
17bbea5
Top-bar dropdown for sections + restore Products rename and reorder
florent-leborgne May 7, 2026
6d5be8b
Make Products section index a placeholder leaf
theletterf May 8, 2026
3b6428b
Wire most of nav v1 content into nav v2 (#3274)
theletterf May 8, 2026
80a366e
Revert "Make Products section index a placeholder leaf"
florent-leborgne May 8, 2026
113403a
Drop all-caps from dropdown subsection labels
florent-leborgne May 8, 2026
d842694
fix(nav-v2): refine folder click activation and parent state
itsalexcm May 8, 2026
f035fad
style(nav-v2): tune sidebar spacing and active/toc colors
itsalexcm May 8, 2026
5defb05
style(toc): use body font and regular utility link weight
itsalexcm May 8, 2026
149012a
Merge remote-tracking branch 'origin/main' into nav-v2
itsalexcm May 8, 2026
3a208ff
Merge remote-tracking branch 'origin/nav-v2' into nav-v2-sections
itsalexcm May 8, 2026
5cbebb3
fix(nav-v2): gate first-row top padding override to search state
itsalexcm May 8, 2026
88976b8
Redesign landing page with tabbed navigation and simplified layout
KOTungseth May 8, 2026
d49e597
Merge branch 'landing-page/prototype' of github.com:elastic/docs-buil…
KOTungseth May 8, 2026
d23fa4c
Tune Nav V2 sidebar label spacing and typography
itsalexcm May 11, 2026
180d2f6
Fix Nav V2 first-row top padding when search is absent
itsalexcm May 11, 2026
03efffb
Merge remote-tracking branch 'origin/nav-v2-sections' into hub-pages
florent-leborgne May 11, 2026
d7b6360
Prefix hub directive URLs with the site path prefix
florent-leborgne May 11, 2026
0a758eb
Hub links opt out of body-level hx-boost
florent-leborgne May 11, 2026
de8dec6
HubUrl strips .md and /index.md so authors can write file paths
florent-leborgne May 11, 2026
5bc32e3
fix(nav-v2): restore V2 page lookup registration lost in merge
florent-leborgne May 11, 2026
f25e816
Redesign landing page with gradient hero and product index
KOTungseth May 11, 2026
92da03f
Improve landing page semantics and accessibility
KOTungseth May 11, 2026
393f73b
Validate links in {hero}, {link-card}, {whats-new} directives
florent-leborgne May 11, 2026
b573d6f
Fix isolated preview header stacking under Nav V2 chrome
itsalexcm May 12, 2026
3cec0fc
fix(nav-v2): restore section/island structure lost in merge 3a208ffb4
theletterf May 12, 2026
500e5e6
Fix isolated preview header visibility with fixed chrome + flow spacer
itsalexcm May 12, 2026
13ed1dd
fix(nav-v2): resolve islands via parent chain for nested-toc islands
theletterf May 12, 2026
dba1717
feat(nav-v2): wire Account and preferences as island under Deployment…
theletterf May 12, 2026
a346496
Guard deployment header links when githubRepository is unset
itsalexcm May 12, 2026
cbeb5e8
fix(nav-v2): swap full chrome when entering an island from parent sid…
theletterf May 12, 2026
f3e1061
Merge PR 3133 nav sections for Figma sidebar work
itsalexcm May 18, 2026
9da050a
Merge nav-v2: IA, islands, accordion sidebar, and dynamic top bar
itsalexcm Jun 23, 2026
c0da539
Merge hub-pages: product hub layout, directives, and routing
itsalexcm Jun 23, 2026
e18667f
Merge landing-page/prototype: search-first documentation landing page
itsalexcm Jun 23, 2026
af954eb
Apply nav-v2 WIP: sidebar layout, search, TOC, and assembler polish
itsalexcm Jun 23, 2026
fcd49a0
Set landing-page layout on docs index for prototype rendering
itsalexcm Jun 23, 2026
0413c5b
fix(ci): satisfy IDE0028 and Prettier on findability branch
itsalexcm Jun 23, 2026
a3f907d
fix(ci): restore hasSameTopLevelGroup and type section shell element
itsalexcm Jun 23, 2026
acdfe4b
fix(ci): set required DeprecationDate and Maturity on unparsable dete…
itsalexcm Jun 23, 2026
dcd0992
fix(ci): restore hub link sandbox skip and hub-pages test snapshots
itsalexcm Jun 23, 2026
af28be7
fix(ci): align applies-to F# snapshots with demo/findability
itsalexcm Jun 23, 2026
e290429
fix: restore AddNavigationFileLookups lost during nav-v2 merge confli…
theletterf Jun 23, 2026
bc23a71
fix: use nav-v2 product descriptions to match test expectations
theletterf Jun 23, 2026
43d143e
fix(synthetics): support landing-page layout in navigation journey
itsalexcm Jun 23, 2026
7d00a86
fix(synthetics): avoid Nav V2 sidebar blocking pages dropdown
itsalexcm Jun 23, 2026
778a5f8
fix(synthetics): click Reference link via DOM to avoid sidebar overlap
itsalexcm Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .cursor/rules/docs-builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Docs builder project context

## Project

- This repo contains the docs builder tooling and local doc rendering workflows.
- Main local preview command (after a successful build):

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- serve
```

- Default local URL: `http://localhost:3000/`
- `serve` uses the docset at **`docs/`** relative to the current working directory when run from the repo root. Use `-p|--path` to point at another folder.

## Important paths

- Tooling project: `src/tooling/docs-builder/docs-builder.csproj`
- Local docset used for quick validation (default for `serve`): `docs/`
- Layout file commonly touched for sidebar + main structure: `src/Elastic.Markdown/_Layout.cshtml`

## Workflow guidance

- Prefer `serve` with the local `docs/` folder when validating layout or CSS changes quickly.
- `serve` runs in **isolated** mode: isolated header, not the assembler elastic-nav. Sidebar may still use **Nav V2 markup** for styling; that is not the same as the **global** `navigation-v2.yml` tree produced by an assembler build.
- If the task explicitly requires elastic-nav or fully assembled site behavior, use the **assembler** flow (`assembler build` / `assemble`, then `assembler serve`), not `serve` alone.

## Validation expectations

1. Build the CLI (required after C#, Razor, or embedded view changes):

```bash
dotnet build src/tooling/docs-builder/docs-builder.csproj
```

2. Run `serve` without rebuilding the project in the same invocation:

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- serve
```

## Notes

- Warnings about navigation children or cross-links may appear in logs and do not necessarily block startup.
- Confirm the server is running by checking for: `Now listening on: http://localhost:3000`
- Static CSS/JS under `src/Elastic.Documentation.Site/_static/` is generated (e.g. when building `Elastic.Documentation.Site`); do not assume it is the only source of truth without rebuilding when changing `Assets/`.
7 changes: 7 additions & 0 deletions .cursor/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": {
"figma": {
"enabled": true
}
}
}
151 changes: 151 additions & 0 deletions .cursor/skills/docs-assembler-nav-v2-preview/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
---
name: docs-assembler-nav-v2-preview
description: >-
Rebuilds the assembled documentation snapshot and serves static HTML with the full global sidebar
from navigation-v2.yml (Nav V2 IA), elastic-nav shell, and dev feature flags. Use when the user needs
the complete assembler navigation tree—not isolated TOC—localhost:4000, NAV_V2, assembler build/serve,
stale layout/CSS on port 4000, blank page or connection refused on 4000, missing .artifacts/assembly,
or "Can not serve empty directory" when starting assembler serve.
---

# docs-assembler-nav-v2-preview

## Purpose

Use when the user wants:

- The **full Nav V2 tree** driven by `config/navigation-v2.yml` (labels, `toc:` sections, placeholders, assembler wiring)
- Preview on **`assembler serve`** (default **port 4000**), not isolated `serve` on 3000
- To refresh `.artifacts/assembly` after layout, Razor, or `Assets/` CSS/JS changes (static HTML lags until rebuild)
- To recover from an empty or failed assembly output before serving

## Context

- **Isolated `serve` (3000)** reuses Nav V2 **components** but feeds them the **local docset TOC** only. It does **not** load `navigation-v2.yml` as the global IA.
- **Assembler build** produces `.artifacts/assembly` with **BuildType.Assembler**, **elastic-nav**, and—when the environment enables it—**`NAV_V2: true`** (see `config/assembler.yml` under `dev` and `preview`).
- Default assembler environment is **`dev`** unless overridden; `dev` includes `NAV_V2: true`.
- **`assembler serve`** only reads **pre-generated** files from `.artifacts/assembly` (plus Debug behavior for `_static`—see `StaticWebHost`). It does not re-run Razor per request.

## Prerequisites

- Commands from the **docs-builder repository root**.
- **Git checkouts** for assembler repos must be valid (e.g. `git rev-parse HEAD` works). If clones are missing or corrupt, run **`assembler clone`** before **`assembler build`**.
- **Network** may be required for cross-link indices during build.
- **GitHub access:** `assembler clone` pulls private `elastic/*` repositories. The machine needs **SSH keys or HTTPS + PAT** authorized for the org (including **SAML SSO** approval for Elastic org). Without that, clone/build will fail with `git fetch` exit **128** or SAML messages—**the agent cannot fix auth**; the user must sign in / authorize keys.

### Without access to private repos (local Nav V2 smoke test)

Use the **global** CLI flag **`--skip-private-repositories`** (stripped by `GlobalCli` before subcommands) on **clone** and **build** so private entries (`cloud`, `integration-docs`, etc.) are omitted. The local `docs/` tree is injected as **docs-builder** content per `AssemblyConfiguration`.

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- --skip-private-repositories assembler clone
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- --skip-private-repositories assembler build --environment dev
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler serve --port 4000
```

**Caveat:** the assembled site is **incomplete** vs production (missing private docsets). **Nav V2** and **navigation-v2.yml** still render for what remains—enough for UI/IA checks. Documented similarly in `CONTRIBUTING.md` (Aspire / integration tests).

## When the user asks to "run the build" or fix an empty 4000

Execute in order (from repo root), and **report each outcome**:

1. `dotnet build src/tooling/docs-builder/docs-builder.csproj`
2. `dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler clone`
— or with **`-- --skip-private-repositories`** before `assembler clone` if private repos fail (see above).
3. `dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler build --environment dev`
— same optional **`--skip-private-repositories`** prefix if step 2 used it.
4. Verify output exists, e.g. `test -f .artifacts/assembly/docs/index.html` (or `ls .artifacts/assembly/docs/`)
5. Only then: `dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler serve --port 4000`

If step 2 or 3 fails, **do not** expect step 5 to work; see **Troubleshooting**.

## Steps

1. **Build the CLI** (pick up Razor, C#, and embedded site changes):

```bash
dotnet build src/tooling/docs-builder/docs-builder.csproj
```

2. **Ensure sources exist** (if the previous build failed with git errors):

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler clone
```

3. **Regenerate assembly output** (this cleans and repopulates `.artifacts/assembly` on success):

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler build
```

Optional: set environment explicitly to match `assembler.yml` (defaults to `dev`):

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler build --environment dev
```

4. **Serve the snapshot**:

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assembler serve --port 4000
```

5. **Open the site** — root often redirects to `docs`; dev URI in config is `http://localhost:4000` with `path_prefix: docs`, so start from:

- `http://localhost:4000/` (redirect), or
- `http://localhost:4000/docs/` as needed.

6. **Verify Nav V2** — in the sidebar HTML, look for `data-nav-v2` / `docs-sidebar-nav-v2` on a normal doc page inside the assembled site.

7. **Confirm the server is listening** — logs must include `Now listening on: http://localhost:4000`. Optionally check `lsof -i :4000 -sTCP:LISTEN` or `curl -sI http://localhost:4000/`.

## Troubleshooting: nothing on port 4000 / blank / connection refused

| Symptom | Likely cause | What to do |
|--------|----------------|------------|
| Browser cannot connect; **nothing listening** on 4000 | `assembler serve` never started or crashed on startup | Run serve after a **successful** build; read the console error. |
| **`Can not serve empty directory: …/.artifacts/assembly`** | `.artifacts/assembly` **does not exist** (or tooling treats it as missing) | Run **`assembler build`** successfully first. `StaticWebHost` throws if the directory is absent (`StaticWebHost.cs` checks `dir.Exists`). |
| **`assembler build`** fails with **`git rev-parse HEAD`** / exit **128** | Checkout dir exists but is **not a valid git repo** or has no commits | Re-clone or fix that checkout under the assembler checkouts path (see clone logs). |
| **`assembler clone`** / **`git fetch`** fails with **SAML SSO** / access rights | Host is **not authenticated** to Elastic org repos | User must use PAT + SSO or SSH key **authorized for the org**; retry `assembler clone`. |
| Build succeeded earlier but UI looks old | Serving **stale** snapshot | Re-run **`assembler build`** after code/CSS changes, then serve again. |

**Pre-flight before claiming 4000 works:**

```bash
test -d .artifacts/assembly && test -f .artifacts/assembly/docs/index.html && echo "assembly OK" || echo "assembly missing or incomplete"
```

## One-shot alternative

Equivalent to clone + build + serve in one flow (long-running):

```bash
dotnet build src/tooling/docs-builder/docs-builder.csproj
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- assemble --serve
```

(`assemble` may clone and build; `--serve` uses port **4000** by default per product docs.)

## Response template

- **CLI build:** success / failure
- **Assembler build:** success / failure (note if `assembly` was cleaned mid-failure)
- **Serve:** URL and port
- **Nav:** confirm full tree requires successful **assembler** build with **`NAV_V2`** for the chosen environment
- **If stale UI:** remind that **`assembler build`** must complete after code changes before **`assembler serve`**
- **If 4000 is empty:** state whether **port is listening**, whether **`.artifacts/assembly`** exists, and the **last error** from clone/build/serve (auth vs git vs missing directory)

## Guardrails

- Do **not** tell the user that isolated **`serve` on 3000** shows the **`navigation-v2.yml`** global tree.
- Do **not** assume **`assembler serve`** reflects the latest Razor/CSS without a successful **`assembler build`** after those changes.
- If **`assembler build`** fails after cleaning output, **`assembler serve`** may serve nothing or old content—fix clones/build first.
- **`--assume-build`** skips regeneration when output exists; avoid it when the user explicitly needs **fresh** HTML/CSS.

## Related

- Project rule: `.cursor/rules/docs-builder.md`
- Isolated preview skill: `.cursor/skills/docs-builder-serve/SKILL.md`
- Layout validation skill: `.cursor/skills/docs-layout-validation/SKILL.md`
- IA reference: `nav-v2-status.md`, `config/navigation-v2.yml`, `config/assembler.yml` (`feature_flags.NAV_V2`)
72 changes: 72 additions & 0 deletions .cursor/skills/docs-builder-serve/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
name: docs-builder-serve
description: >-
Builds and runs the docs-builder isolated preview server (Kestrel on localhost, default port 3000).
Use when the user wants local preview, localhost docs, serve mode, layout/CSS validation in isolated
mode, or to check if the dev server is up and whether log warnings block startup.
---

# docs-builder-serve

## Purpose

Apply this skill when the user wants to:

- Run docs-builder locally for preview
- Open or verify `http://localhost:3000/` (or another `--port`)
- Know if a log line is blocking startup or safe to ignore
- Validate layout or static asset behavior in **isolated** mode (not assembler)

## Context

- **Mode:** `serve` = isolated preview (isolated header, **not** elastic-nav from assembler).
- **Tooling project:** `src/tooling/docs-builder/docs-builder.csproj`
- **Default docset:** `docs/` relative to the **repository root** (current working directory should be the repo root when running commands). Override with `-p|--path` if needed.
- **Default URL:** `http://localhost:3000/` (use `--port <n>` to change)

## Steps

1. **Build the CLI** (required after C#, Razor, or embedded view changes):

```bash
dotnet build src/tooling/docs-builder/docs-builder.csproj
```

2. **Start the server** without compiling again in the same invocation:

```bash
dotnet run --project src/tooling/docs-builder/docs-builder.csproj --no-build -- serve
```

Optional: `serve --port 3001` (or another port) if 3000 is busy.

3. **Inspect terminal output**

- Success: look for `Now listening on: http://localhost:3000` (or the chosen port).
- **Non-blocking (typical):** cross-link / navigation children warnings during docset load often still allow startup.
- **Blocking:** process exits, or no “Now listening” line after a clear fatal error.

4. **Report clearly**

Use the response template below unless the user only asked a narrow question.

5. **How to stop**

- `Ctrl+C` in the terminal running the server.
- If the user must free the port without that terminal: `lsof -ti :3000 | xargs kill` (adjust port); only suggest killing PIDs the user owns.

## Response template

- **Build:** success / failure (short reason if failure)
- **Server:** running / not running
- **URL:** `http://localhost:3000/` (or actual port)
- **Mode:** isolated `serve` (not assembler static output)
- **Logs:** brief note on any warnings and whether they block preview
- **Stop:** `Ctrl+C` (and port-kill only if relevant)

## Guardrails

- Do **not** describe elastic-nav as available in isolated `serve`; assembler is a separate flow (`assembler build` / `assemble` + `assembler serve`).
- Do **not** equate isolated sidebar Nav V2 **markup** with the **global** `navigation-v2.yml` tree from an assembler build.
- Treat cross-link / navigation-structure warnings as **non-blocking** unless startup fails or logs show an unhandled exception before listening.
- Run commands from the **docs-builder repository root** so `docs/` and project paths resolve correctly.
77 changes: 77 additions & 0 deletions .cursor/skills/docs-layout-validation/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: docs-layout-validation
description: >-
Guides validation of documentation page layout: sidebar, main column width, TOC column, and
`_Layout.cshtml` changes via isolated `serve`. Use when the user works on sidebar/main spacing,
full-bleed nav, `doc-page-main`, Nav V2 chrome, or asks if a layout tweak shows in local preview
versus assembler-only behavior.
---

# docs-layout-validation

## Purpose

Use when the task involves:

- Sidebar / pages nav layout or width
- Main content width, max-width, centering, or horizontal spacing
- Changes to `src/Elastic.Markdown/_Layout.cshtml` or related layout CSS
- Judging whether a layout tweak is visible in **local isolated preview** or needs **assembler**

## Relevant files

- **Primary Razor layout:** `src/Elastic.Markdown/_Layout.cshtml`
- **Sidebar partial:** `src/Elastic.Documentation.Site/Layout/_PagesNav.cshtml`
- **Nav tree / V2 markup:** `src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml`, `_TocTreeNavV2.cshtml`
- **Shared layout CSS (tokens, sidebar chrome, `doc-page-main`):** `src/Elastic.Documentation.Site/Assets/styles.css`
- **CLI for preview:** `src/tooling/docs-builder/docs-builder.csproj`

After changing `Assets/*.css`, ensure `Elastic.Documentation.Site` (or full docs-builder build) has run so `_static/styles.css` is regenerated; it is not committed and isolated `serve` uses the built static bundle.

## What isolated `serve` validates

Good source of truth for:

- Grid/flex structure of sidebar + main + TOC column (as rendered by `Elastic.Markdown` default layout)
- Spacing, padding, max-width rules applied in that layout path
- Responsive behavior at **md+** vs stacked mobile layout where applicable
- Whether Razor/CSS changes compile and render in **BuildType.Isolated**

## What isolated `serve` does not replace

Requires **assembler build** + **`assembler serve`** (or deployed assembly) to validate:

- **elastic-nav** and header chrome from assembler
- **Global** navigation from `navigation-v2.yml` / assembler navigation pipeline
- Final HTML snapshot behavior under `.artifacts/assembly`

## Validation checklist

1. **Identify touched files** (Razor vs CSS vs both) and whether behavior is layout-only or navigation-data-driven.
2. **Rebuild** what embeds views or generates CSS:
- `dotnet build src/tooling/docs-builder/docs-builder.csproj` (and Site project if only CSS in `Assets/` changed without going through full build).
3. **Run isolated preview** (see project skill `docs-builder-serve` or rule `docs-builder`): `serve` on `http://localhost:3000/`.
4. **Open a normal Markdown doc page** (not only landing / full-search / special layouts) if the change targets the default doc layout.
5. **Check in the browser**
- Sidebar position and width (including full-bleed vs centered shell)
- Main + “On this page” column alignment
- Regressions at **md** and **lg** if the change targets breakpoints
6. **Report**
- What files drive the visible change
- Confirmed or not in isolated `serve`
- Whether **assembler** validation is still recommended (elastic-nav / global nav / static output freshness)

## Response style

Be explicit about:

- What **can** be validated with isolated `serve`
- What **still** needs assembler (or a fresh `assembler build` before `assembler serve`)
- Whether symptoms point to **layout/CSS** vs **navigation YAML / cross-links / toc data**

## Guardrails

- Never claim isolated `serve` **fully** validates elastic-nav or the assembled site.
- If symptoms match **assembled** navigation or stale **port 4000** static output, recommend `dotnet build` + `assembler build` (or `assemble`) then `assembler serve`, and a hard refresh.
- Separate **visual/layout** issues from **navigation content** issues (toc, docset, cross-links).
- Do not assume changes under `src/Elastic.Documentation.Site/Assets/` are live without a build that regenerates `_static/`.
Loading
Loading