@@ -116,15 +116,6 @@ if [ -f "${INTENT_DIR}/completion-criteria.md" ]; then
116116 echo " "
117117fi
118118
119- # Current plan is ephemeral state - keep in han keep
120- PLAN=$( load_keep_value current-plan.md)
121- if [ -n " $PLAN " ]; then
122- echo " ### Current Plan"
123- echo " "
124- echo " $PLAN "
125- echo " "
126- fi
127-
128119# Display testing requirements if configured (stored in intent.md frontmatter)
129120if [ -f " $INTENT_FILE " ]; then
130121 TESTING_JSON=$( han parse yaml testing --json < " $INTENT_FILE " 2> /dev/null || echo " " )
@@ -238,42 +229,45 @@ echo ""
238229echo " ## AI-DLC Workflow Rules"
239230echo " "
240231
241- # Get current branch and working directory
242- CURRENT_BRANCH=$( git branch --show-current 2> /dev/null || echo " unknown" )
243- CURRENT_DIR=$( pwd)
244- IS_WORKTREE=$( git rev-parse --is-inside-work-tree 2> /dev/null && [ -f " $( git rev-parse --git-dir) /commondir" ] && echo " yes" || echo " no" )
232+ # Branch references for cross-branch state access
233+ echo " ### Branch References"
234+ echo " "
235+ echo " - **Intent branch:** \` ai-dlc/${INTENT_SLUG} /main\` "
236+ echo " - **Intent worktree:** \` /tmp/ai-dlc-${INTENT_SLUG} /\` "
237+ echo " "
238+ echo " To access intent-level state from a unit branch:"
239+ echo " \`\`\` bash"
240+ echo " han keep load --branch \" ai-dlc/${INTENT_SLUG} /main\" <key>"
241+ echo " \`\`\` "
242+ echo " "
245243
246- echo " ### Current Working Context "
244+ echo " ### Bootstrap (MANDATORY) "
247245echo " "
248- echo " - **Branch:** \` ${CURRENT_BRANCH} \` "
249- echo " - **Directory:** \` ${CURRENT_DIR} \` "
250- if [ " $IS_WORKTREE " = " yes" ]; then
251- echo " - **Worktree:** ✅ Yes (isolated workspace)"
252- else
253- echo " - **Worktree:** ⚠️ NO - You should be in a worktree!"
254- fi
246+ echo " Your spawn prompt tells you which worktree and branch to use."
247+ echo " After entering your unit worktree, load unit-scoped state:"
248+ echo " "
249+ echo " \`\`\` bash"
250+ echo " # Load previous context from your unit branch"
251+ echo " han keep load current-plan.md --quiet 2>/dev/null || true"
252+ echo " han keep load scratchpad.md --quiet 2>/dev/null || true"
253+ echo " han keep load blockers.md --quiet 2>/dev/null || true"
254+ echo " han keep load next-prompt.md --quiet 2>/dev/null || true"
255+ echo " \`\`\` "
256+ echo " "
257+ echo " These are scoped to YOUR branch. Read them to understand prior work on this unit."
255258echo " "
256259
257- echo " ### Worktree Isolation (MANDATORY) "
260+ echo " ### Worktree Isolation"
258261echo " "
259- echo " All bolt work MUST happen in an isolated worktree at: "
260- echo " \` /tmp/ai-dlc-{intent-slug}-{unit-slug}/ \` "
262+ echo " All bolt work MUST happen in an isolated worktree. "
263+ echo " Working outside a worktree will cause conflicts with the parent session. "
261264echo " "
262- if [ " $IS_WORKTREE " = " yes" ] && [[ " $CURRENT_BRANCH " == ai-dlc/* ]]; then
263- echo " ✅ You are in the correct worktree on an AI-DLC branch. Continue working here."
264- elif [[ " $CURRENT_DIR " == /tmp/ai-dlc-* ]]; then
265- echo " ✅ You are in an AI-DLC worktree directory. Continue working here."
266- else
267- echo " 🛑 **STOP!** You are NOT in a worktree!"
268- echo " "
269- echo " Before doing ANY work, you must:"
270- echo " 1. Have the parent create the worktree"
271- echo " 2. cd to the worktree directory"
272- echo " 3. Verify you're on the unit branch"
273- echo " "
274- echo " Working outside a worktree will cause conflicts with the parent session."
275- fi
265+ echo " After entering your worktree, verify:"
266+ echo " 1. You are in \` /tmp/ai-dlc-${INTENT_SLUG} -{unit-slug}/\` "
267+ echo " 2. You are on the correct unit branch (\` git branch --show-current\` )"
268+ echo " 3. You loaded unit-scoped state (see Bootstrap above)"
276269echo " "
270+
277271echo " ### Before Stopping"
278272echo " "
279273echo " 1. **Commit changes**: \` git add -A && git commit\` "
0 commit comments