@@ -969,6 +969,16 @@ function checkV15() {
969969 violations ++
970970 }
971971 }
972+
973+ if ( state . state === 'paused' ) {
974+ const unresolved = Array . isArray ( state . findings )
975+ ? state . findings . filter ( finding => unresolvedFindingStates . has ( String ( finding . status || '' ) . toLowerCase ( ) ) )
976+ : [ ]
977+ if ( unresolved . length && ( ! state . linkedReport || ! state . lastCheckpoint || ! state . lastCheckpoint . reason ) ) {
978+ warn ( `[V15] paused audit-state with unresolved findings must include linkedReport and lastCheckpoint.reason: .devcodex/.audit-state/${ sf } ` )
979+ violations ++
980+ }
981+ }
972982 }
973983
974984 console . log ( `[V15] audit-state consistency checked: ${ stateFiles . length } files, ${ violations } violation(s)` )
@@ -1060,12 +1070,15 @@ function checkV18() {
10601070function checkV19 ( ) {
10611071 const promptCount = walk ( path . join ( ROOT , 'prompts' ) ) . filter ( f => f . endsWith ( '.prompt.md' ) ) . length
10621072 const dataTemplateCount = walk ( path . join ( ROOT , 'data' , 'templates' ) ) . filter ( f => f . endsWith ( '.md' ) ) . length
1073+ const scriptCount = walk ( path . join ( ROOT , 'scripts' ) ) . filter ( f => f . endsWith ( '.js' ) ) . length
10631074 const checks = [
10641075 { file : 'README.md' , needle : `Prompt 模板(${ promptCount } 个)` } ,
10651076 { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : `| **Prompt** | ${ promptCount } |` , rawPath : false } ,
10661077 { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : `prompts ${ promptCount } ` , rawPath : false } ,
10671078 { file : activePath ( 'profile' , '02-架构约束.md' ) , needle : `Prompt 模板文件(.prompt.md,中文)${ promptCount } 个` , rawPath : false } ,
1068- { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : `| **data 模板** | ${ dataTemplateCount } |` , rawPath : false }
1079+ { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : `| **data 模板** | ${ dataTemplateCount } |` , rawPath : false } ,
1080+ { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : `| **CLI 工程脚本** | ${ scriptCount } |` , rawPath : false } ,
1081+ { file : activePath ( 'profile' , '01-项目信息.md' ) , needle : 'scripts/check-syntax.js' , rawPath : false }
10691082 ]
10701083 for ( const check of checks ) {
10711084 const filePath = check . rawPath === false ? check . file : path . join ( ROOT , check . file )
@@ -1078,7 +1091,7 @@ function checkV19() {
10781091 err ( `[V19] asset count drift in ${ check . rawPath === false ? path . relative ( ROOT , check . file ) : check . file } : expected text "${ check . needle } "` )
10791092 }
10801093 }
1081- console . log ( `[V19] asset counts checked: prompts=${ promptCount } , data-templates=${ dataTemplateCount } ` )
1094+ console . log ( `[V19] asset counts checked: prompts=${ promptCount } , data-templates=${ dataTemplateCount } , scripts= ${ scriptCount } ` )
10821095}
10831096
10841097function checkV20 ( ) {
@@ -1130,6 +1143,14 @@ function checkV20() {
11301143 }
11311144 }
11321145 }
1146+ const unreleased = read ( path . join ( ROOT , 'changelogs' , 'unreleased.md' ) )
1147+ if ( unreleased . includes ( '暂无未发布变更' ) ) {
1148+ const dateHeadings = [ ...unreleased . matchAll ( / ^ # # \d { 4 } - \d { 2 } - \d { 2 } / gm) ]
1149+ const contentAfterEmptyMarker = unreleased . split ( '暂无未发布变更' ) . slice ( 1 ) . join ( '暂无未发布变更' )
1150+ if ( dateHeadings . length > 1 || / ^ # # \d { 4 } - \d { 2 } - \d { 2 } / m. test ( contentAfterEmptyMarker ) ) {
1151+ err ( '[V20] changelogs/unreleased.md mixes empty-template marker with archived date sections' )
1152+ }
1153+ }
11331154 console . log ( '[V20] release/changelog dual-track semantics checked' )
11341155}
11351156
0 commit comments