File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ if (!statSync(DOCS_DIR).isDirectory()) {
2020 process . exit ( 1 ) ;
2121}
2222
23- const EXCLUDED_DIRS = new Set ( [ "archive" , "research" ] ) ;
23+ const EXCLUDED_DIRS = new Set ( [ "archive" , "research" , "superpowers" ] ) ;
24+ const EXCLUDED_FILES = new Set ( [ "AGENTS.md" , "CLAUDE.md" ] ) ;
2425
2526/**
2627 * @param {unknown[] } values
@@ -59,13 +60,14 @@ function walkMarkdownFiles(dir, base = dir) {
5960 continue ;
6061 }
6162 const fullPath = join ( dir , entry . name ) ;
63+ const relativePath = relative ( base , fullPath ) ;
6264 if ( entry . isDirectory ( ) ) {
6365 if ( EXCLUDED_DIRS . has ( entry . name ) ) {
6466 continue ;
6567 }
6668 files . push ( ...walkMarkdownFiles ( fullPath , base ) ) ;
67- } else if ( entry . isFile ( ) && entry . name . endsWith ( ".md" ) ) {
68- files . push ( relative ( base , fullPath ) ) ;
69+ } else if ( entry . isFile ( ) && entry . name . endsWith ( ".md" ) && ! EXCLUDED_FILES . has ( relativePath ) ) {
70+ files . push ( relativePath ) ;
6971 }
7072 }
7173 return files . toSorted ( ( a , b ) => a . localeCompare ( b ) ) ;
Original file line number Diff line number Diff line change 1+ import { execFileSync } from "node:child_process" ;
2+ import { describe , expect , it } from "vitest" ;
3+
4+ describe ( "docs-list" , ( ) => {
5+ it ( "omits scoped agent guides and ignored local docs while reporting docs metadata" , ( ) => {
6+ const output = execFileSync ( process . execPath , [ "scripts/docs-list.js" ] , {
7+ encoding : "utf8" ,
8+ } ) ;
9+
10+ expect ( output ) . not . toContain ( "[missing front matter]" ) ;
11+ expect ( output ) . not . toContain ( "[summary key missing]" ) ;
12+ expect ( output ) . not . toContain ( "[unterminated front matter]" ) ;
13+ expect ( output ) . not . toMatch ( / ^ A G E N T S \. m d - / mu) ;
14+ expect ( output ) . not . toContain ( "superpowers/specs/" ) ;
15+ expect ( output ) . toContain ( "architecture/sparsekernel.md - SparseKernel architecture" ) ;
16+ } ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments