@@ -502,13 +502,13 @@ function buildDefaultState(mode) {
502502 return {
503503 version : 1 , mode : m ,
504504 executionMode : EXECUTION_MODE . CONFIRM ,
505- phase : m === 'dev' ? ' bootstrapping' : 'active ',
505+ phase : ' bootstrapping',
506506 startedAt : new Date ( ) . toISOString ( ) , updatedAt : new Date ( ) . toISOString ( ) ,
507507 promptCount : 0 , toolUseCount : 0 ,
508508 activeProject : CONTEXT_PROJECT || '' ,
509509 activeScope : DEFAULT_SCOPE ,
510510 bootstrap : { profileRead : false , summaryRead : false , tasksRead : false } ,
511- bootstrapComplete : m !== 'dev' ,
511+ bootstrapComplete : false ,
512512 visible : { payloadObserved : false , precheck : false , compliance : false , artifactPaths : false } ,
513513 mutated : false , reportTouched : false , memoryTouched : false ,
514514 lastEvent : '' , lastReason : ''
@@ -615,9 +615,9 @@ function isReadOnlyBootstrapShellCommand(payload) {
615615function buildBootstrapMessage ( ) {
616616 return [
617617 'DevCodex hook-enforced bootstrap is active for this user message.' ,
618- 'In dev mode, load the effective profile (legacy .devcodex/profile/ or workspace-namespace profile roots) and memory files under' ,
618+ 'Load the effective profile (legacy .devcodex/profile/ or workspace-namespace profile roots) and memory files under' ,
619619 'the active .devcodex namespace before any substantive work.' ,
620- 'Your first user-visible block must be the DEV precheck PC0-PC7 before substantive task content.' ,
620+ 'Your first user-visible block must be the entry check PC0-PC7 before substantive task content; dev mode adds full PC4 diagnostics .' ,
621621 '*** S07 compaction trigger (v1.9.6+): if this turn resumes from /compact, /resume, or summary-restore,' ,
622622 'this also counts as "first user-visible reply" — you MUST re-output PC0-PC7 even when instructed to "continue without acknowledging".'
623623 ] . join ( ' ' )
@@ -631,7 +631,7 @@ function buildBootstrapDenyOutput(state, payload, eventName, platform) {
631631 const toolName = getToolName ( payload ) || 'tool'
632632 return blockOutput (
633633 platform || 'copilot' , eventName ,
634- `Blocked tool use before dev bootstrap: ${ toolName } ` ,
634+ `Blocked tool use before DevCodex bootstrap: ${ toolName } ` ,
635635 `Read .devcodex/profile/ plus SUMMARY/tasks memory files first. Missing: ${ missing . join ( ', ' ) || 'none' } .`
636636 )
637637}
@@ -1012,7 +1012,7 @@ function updateVisibleReplyState(state, payload, eventName) {
10121012 if ( ! hasVisibleReplyPayload ( payload ) ) return
10131013 state . visible . payloadObserved = true
10141014 const text = collectStrings ( payload ) . join ( '\n' )
1015- if ( / 预 检 查 ( D E V 模 式 ) | P C 0 上 下 文 / . test ( text ) ) state . visible . precheck = true
1015+ if ( / 入 口 检 查 ( | 预 检 查 ( D E V 模 式 ) | P C 0 上 下 文 / . test ( text ) ) state . visible . precheck = true
10161016 if ( / 🛡 ️ D E V 模 式 \| 合 规 检 查 | F C : \s * F C 1 / . test ( text ) ) state . visible . compliance = true
10171017 if ( hasArtifactPathOutput ( text ) ) state . visible . artifactPaths = true
10181018}
@@ -1035,8 +1035,8 @@ function captureFinalPayloadSample(payload, eventName, state) {
10351035
10361036function buildClosureReminder ( state , eventName ) {
10371037 const items = [ ]
1038- if ( eventName === 'Stop' && state . mode === 'dev' && state . visible && ! state . visible . precheck ) {
1039- items . push ( 'precheck block 未输出(S07/C18:dev 模式首条用户可见回复必须含 PC0~PC7 预检查块 )' )
1038+ if ( eventName === 'Stop' && state . visible && ! state . visible . precheck ) {
1039+ items . push ( 'entry check block 未输出(S07/C18:首条用户可见回复必须含 PC0~PC7 入口检查块 )' )
10401040 }
10411041 if ( eventName === 'Stop' && state . mode === 'dev' && state . reportTouched && state . visible && ! state . visible . compliance ) {
10421042 items . push ( '合规检查状态块未输出(17-compliance:dev 模式非 chat 回复末尾必须含 🛡️ DEV 模式 | 合规检查 状态块)' )
@@ -1107,11 +1107,7 @@ async function main() {
11071107 }
11081108 }
11091109 saveState ( state )
1110- if ( mode === 'dev' ) {
1111- writeStdout ( systemMessageOutput ( buildBootstrapMessage ( ) ) )
1112- } else {
1113- writeStdout ( noopOutput ( ) )
1114- }
1110+ writeStdout ( systemMessageOutput ( buildBootstrapMessage ( ) ) )
11151111 return
11161112 }
11171113
@@ -1133,8 +1129,8 @@ async function main() {
11331129 return
11341130 }
11351131
1136- // 2. Bootstrap enforcement (dev mode , both Copilot and Claude Code)
1137- if ( mode === 'dev' && ! state . bootstrapComplete ) {
1132+ // 2. Bootstrap enforcement (all modes , both Copilot and Claude Code)
1133+ if ( ! state . bootstrapComplete ) {
11381134 if ( ! isBootstrapReadTool ( payload , state ) ) {
11391135 state . lastReason = 'blocked-before-bootstrap'
11401136 saveState ( state )
0 commit comments