@@ -371,7 +371,7 @@ function buildDefaultState(mode) {
371371 activeProject : '' ,
372372 bootstrap : { profileRead : false , summaryRead : false , tasksRead : false } ,
373373 bootstrapComplete : m !== 'dev' ,
374- visible : { payloadObserved : false , precheck : false , compliance : false } ,
374+ visible : { payloadObserved : false , precheck : false , compliance : false , artifactPaths : false } ,
375375 mutated : false , reportTouched : false , memoryTouched : false ,
376376 lastEvent : '' , lastReason : ''
377377 }
@@ -814,13 +814,30 @@ function hasVisibleReplyPayload(payload) {
814814 return candidates . some ( v => typeof v === 'string' && v . trim ( ) )
815815}
816816
817+ function hasArtifactPathOutput ( text ) {
818+ const lines = String ( text || '' ) . split ( / \r ? \n / )
819+ let inArtifactSection = false
820+ for ( let index = 0 ; index < lines . length - 1 ; index ++ ) {
821+ const line = lines [ index ]
822+ if ( / ^ \s * 📂 \s * 本 次 会 话 产 物 [: : ] ? \s * $ / . test ( line ) ) {
823+ inArtifactSection = true
824+ continue
825+ }
826+ if ( ! inArtifactSection ) continue
827+ if ( ! / ^ \s * - \s * \[ [ ^ \] ] + \] \( [ ^ \) ] + \) \s * $ / . test ( line ) ) continue
828+ if ( / ^ \s * [ A - Z a - z ] : \\ .+ / . test ( lines [ index + 1 ] ) ) return true
829+ }
830+ return false
831+ }
832+
817833function updateVisibleReplyState ( state , payload , eventName ) {
818834 if ( eventName !== 'PreCompact' && eventName !== 'Stop' ) return
819835 if ( ! hasVisibleReplyPayload ( payload ) ) return
820836 state . visible . payloadObserved = true
821837 const text = collectStrings ( payload ) . join ( '\n' )
822838 if ( / 预 检 查 ( D E V 模 式 ) | P C 0 上 下 文 / . test ( text ) ) state . visible . precheck = true
823839 if ( / 🛡 ️ D E V 模 式 \| 合 规 检 查 | F C : \s * F C 1 / . test ( text ) ) state . visible . compliance = true
840+ if ( hasArtifactPathOutput ( text ) ) state . visible . artifactPaths = true
824841}
825842
826843function captureFinalPayloadSample ( payload , eventName , state ) {
@@ -844,6 +861,12 @@ function buildClosureReminder(state, eventName) {
844861 if ( eventName === 'Stop' && state . mode === 'dev' && state . visible && ! state . visible . precheck ) {
845862 items . push ( 'precheck block 未输出(S07/C18:dev 模式首条用户可见回复必须含 PC0~PC7 预检查块)' )
846863 }
864+ if ( eventName === 'Stop' && state . mode === 'dev' && state . reportTouched && state . visible && ! state . visible . compliance ) {
865+ items . push ( '合规检查状态块未输出(17-compliance:dev 模式非 chat 回复末尾必须含 🛡️ DEV 模式 | 合规检查 状态块)' )
866+ }
867+ if ( eventName === 'Stop' && state . mode === 'dev' && state . reportTouched && state . visible && ! state . visible . artifactPaths ) {
868+ items . push ( '产物路径未输出(FC5/T9:回复末尾必须按双行格式输出产物路径)' )
869+ }
847870 if ( state . mutated && ! state . memoryTouched ) items . push ( '记忆文件尚未写入(S05:会话结束前必须写入)' )
848871 if ( state . mutated && ! state . reportTouched ) items . push ( '报告文件尚未写入(chat 工作流豁免)' )
849872 if ( ! items . length ) return ''
0 commit comments