@@ -55,6 +55,171 @@ The workflow triggers automatically on every merged PR to the default branch. Yo
5555
5656After editing the workflow file, run ` gh aw compile ` to update the compiled workflow and commit all changes to the default branch.
5757
58+ ## PAGES.md Format
59+
60+ The ` PAGES.md ` file at ` .github/agentic-wiki/PAGES.md ` is the single source of truth for your wiki structure. It is generated automatically on the first run and saved as a PR for you to review. After that, you can edit it freely to customize your documentation structure. You can also supply a ` PAGES.md ` yourself before the first run to pre-define the structure.
61+
62+ ### Header Hierarchy
63+
64+ | Level | Purpose | Output |
65+ | -------| ---------| --------|
66+ | H1 (` # ` ) | Top-level page | Separate ` .md ` file, top-level sidebar entry |
67+ | H2 (` ## ` ) | Nested page | Separate ` .md ` file, indented under parent in sidebar |
68+ | H3 (` ### ` ) | Deeply nested page | Separate ` .md ` file, further indented in sidebar |
69+ | H4+ (` #### ` ) | Section within page | H2+ header in rendered page, not in sidebar nav |
70+ | H4+ with ` + ` (` ####+ ` ) | Sidebar section | H2+ header in page, included in sidebar nav |
71+
72+ ### Query Templates
73+
74+ Use ` *{ query }* ` syntax to mark content that should be AI-generated:
75+
76+ ``` markdown
77+ # Home
78+
79+ * { Provide an overview of this project }*
80+
81+ ## Architecture
82+
83+ * { Describe the system architecture and key design decisions }*
84+ ```
85+
86+ Static text is preserved as-is:
87+
88+ ``` markdown
89+ # Getting Started
90+
91+ This guide will help you set up the project.
92+
93+ * { List the installation steps }*
94+
95+ For more help, see the troubleshooting section.
96+ ```
97+
98+ ### Sidebar Sections
99+
100+ By default, H4+ headers become sections within a page but don't appear in the sidebar. Add ` + ` after the hashes to include them in sidebar navigation:
101+
102+ ``` markdown
103+ # API Reference
104+
105+ * { Overview of the API }*
106+
107+ ####+ Authentication
108+ * { Describe auth flow }*
109+
110+ ####+ Rate Limits
111+ * { Describe rate limiting }*
112+
113+ #### Internal Details
114+ * { Implementation details - not shown in sidebar }*
115+ ```
116+
117+ This generates:
118+ - Sidebar: ` API Reference ` with nested links to ` #Authentication ` and ` #Rate Limits `
119+ - Page: All three sections rendered as H2 headers
120+
121+ ### Header Normalization
122+
123+ Sections (H4–H6) are normalized when rendered to individual pages:
124+
125+ | In PAGES.md | In rendered page |
126+ | -------------| -----------------|
127+ | ` #### ` / ` ####+ ` | ` ## ` |
128+ | ` ##### ` | ` ### ` |
129+ | ` ###### ` | ` #### ` |
130+
131+ Every page starts with an implicit H1 (the page title, rendered by GitHub from the filename). Sections start at H2.
132+
133+ ### Slug Generation
134+
135+ Page and section slugs are generated from titles:
136+ - Spaces → hyphens
137+ - Special characters removed (apostrophes, parentheses, question marks, etc.)
138+ - Multiple hyphens collapsed
139+
140+ | Title | Slug |
141+ | -------| ------|
142+ | ` Getting Started ` | ` Getting-Started ` |
143+ | ` What's New? ` | ` Whats-New ` |
144+ | ` API Reference (v2) ` | ` API-Reference-v2 ` |
145+
146+ ### Complete Example
147+
148+ ``` markdown
149+ # Home
150+
151+ Welcome to the project documentation.
152+
153+ * { Provide a brief overview of the project }*
154+
155+ # Architecture
156+
157+ * { Describe the high-level architecture }*
158+
159+ ## Frontend
160+
161+ * { Describe the frontend stack }*
162+
163+ ### Components
164+
165+ * { List major React components }*
166+
167+ ####+ State Management
168+ * { Explain how state is managed }*
169+
170+ ####+ Routing
171+ * { Describe the routing setup }*
172+
173+ ## Backend
174+
175+ * { Describe the backend architecture }*
176+
177+ ### API
178+
179+ * { Document the REST API }*
180+
181+ ####+ Endpoints
182+ * { List all endpoints }*
183+
184+ # Getting Started
185+
186+ * { Write a getting started guide }*
187+
188+ #### Prerequisites
189+ * { List prerequisites }*
190+
191+ #### Installation
192+ * { Installation steps }*
193+ ```
194+
195+ ** Output files:**
196+
197+ | File | Content |
198+ | ------| ---------|
199+ | ` Home.md ` | H1 title + overview content |
200+ | ` Architecture.md ` | H1 title + architecture content |
201+ | ` Frontend.md ` | H1 title + frontend content + State Management (H2) + Routing (H2) sections |
202+ | ` Components.md ` | H1 title + components content |
203+ | ` Backend.md ` | H1 title + backend content |
204+ | ` API.md ` | H1 title + API content + Endpoints (H2) section |
205+ | ` Getting-Started.md ` | H1 title + guide content + Prerequisites (H2) + Installation (H2) sections |
206+ | ` _Sidebar.md ` | Auto-generated navigation |
207+
208+ ** Generated sidebar:**
209+
210+ ``` markdown
211+ - [[ Home|Home]]
212+ - [[ Architecture|Architecture]]
213+ - [[ Frontend|Frontend]]
214+ - [[ State Management|Frontend#State-Management]]
215+ - [[ Routing|Frontend#Routing]]
216+ - [[ Components|Components]]
217+ - [[ Backend|Backend]]
218+ - [[ API|API]]
219+ - [[ Endpoints|API#Endpoints]]
220+ - [[ Getting Started|Getting-Started]]
221+ ```
222+
58223## Learn More
59224
60225- [ Agentic Wiki Writer source workflow] ( https://github.com/githubnext/agentics/blob/main/workflows/agentic-wiki-writer.md )
0 commit comments