@@ -56,11 +56,19 @@ function rewriteDocsLinkTarget(target) {
5656 }
5757 }
5858
59- /** Map USER_GUIDE anchors to the new `using/` directory . */
59+ /** Map USER_GUIDE anchors to the new `using/` and `customizing/` directories . */
6060 const userGuideAnchorRoutes = {
61+ overview : '/using/overview' ,
6162 authentication : '/using/authentication' ,
62- 'repository-onboarding' : '/using/repository-onboarding' ,
63+ 'repository-onboarding' : '/customizing/repository-onboarding' ,
64+ 'per-repo-overrides' : '/customizing/per-repo-overrides' ,
65+ 'task-types' : '/using/task-types' ,
66+ 'using-the-rest-api' : '/using/using-the-rest-api' ,
67+ 'using-the-cli' : '/using/using-the-cli' ,
68+ 'webhook-integration' : '/using/webhook-integration' ,
6369 'task-lifecycle' : '/using/task-lifecycle' ,
70+ 'what-the-agent-does' : '/using/what-the-agent-does' ,
71+ 'tips-for-being-a-good-citizen' : '/using/tips-for-being-a-good-citizen' ,
6472 } ;
6573 if ( stem === 'USER_GUIDE' && anchor ) {
6674 const splitRoute = userGuideAnchorRoutes [ anchor . toLowerCase ( ) ] ;
@@ -176,6 +184,26 @@ splitGuide(
176184 'Using the platform' ,
177185) ;
178186
187+ // Move customization pages from using/ to customizing/ (they belong under the Customizing sidebar section)
188+ const customizingPages = [ 'Repository-onboarding.md' , 'Per-repo-overrides.md' ] ;
189+ for ( const page of customizingPages ) {
190+ const src = path . join ( docsRoot , 'src' , 'content' , 'docs' , 'using' , page ) ;
191+ const dest = path . join ( docsRoot , 'src' , 'content' , 'docs' , 'customizing' , page ) ;
192+ if ( fs . existsSync ( src ) ) {
193+ fs . mkdirSync ( path . dirname ( dest ) , { recursive : true } ) ;
194+ fs . renameSync ( src , dest ) ;
195+ }
196+ }
197+
198+ // Remove orphaned stubs generated by splitGuide that have no useful content
199+ const orphanedPages = [ 'Introduction.md' , 'Prerequisites.md' ] ;
200+ for ( const page of orphanedPages ) {
201+ const filePath = path . join ( docsRoot , 'src' , 'content' , 'docs' , 'using' , page ) ;
202+ if ( fs . existsSync ( filePath ) ) {
203+ fs . unlinkSync ( filePath ) ;
204+ }
205+ }
206+
179207// --- Quick Start: mirror to getting-started/ ---
180208mirrorMarkdownFile (
181209 path . join ( docsRoot , 'guides' , 'QUICK_START.md' ) ,
@@ -201,6 +229,9 @@ mirrorMarkdownFile(
201229) ;
202230
203231// --- Design docs: mirror to architecture/ ---
232+ // Source lives at docs/design/ but renders at /architecture/ on the site.
233+ // We keep the source directory named "design" because that's what CLAUDE.md and
234+ // AGENTS.md reference for contributors. The rename happens only at the site level.
204235mirrorDirectory ( path . join ( docsRoot , 'design' ) , path . join ( 'src' , 'content' , 'docs' , 'architecture' ) ) ;
205236
206237// Guardrail: ensure target tree exists when running in a clean checkout.
0 commit comments