Skip to content

Commit 1e4d6a6

Browse files
nhortonclaude
andcommitted
fix: remove automatic DeepPlan injection from startup hook
The startup_context hook was injecting an instruction forcing agents into the DeepPlan workflow whenever they entered plan mode. Remove the injection, deprecate the corresponding requirement (JOBS-REQ-014.5.1), and drop the test that enforced it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2d9b44b commit 1e4d6a6

3 files changed

Lines changed: 2 additions & 17 deletions

File tree

plugins/claude/hooks/startup_context.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ if [ -n "$AGENT_ID" ]; then
3131
CTX="${CTX}"$'\n'"CLAUDE_CODE_AGENT_ID=$AGENT_ID"
3232
fi
3333

34-
# Inject DeepPlan trigger for planning mode
35-
DEEPPLAN_MSG="When you enter plan mode and begin working on a plan, start the DeepWork workflow create_deep_plan (job: deepplan) via start_workflow before doing anything else. The workflow will guide you through structured planning. Its instructions supersede the default planning phases."
36-
CTX="${CTX}"$'\n'"${DEEPPLAN_MSG}"
37-
3834
# ==== Output hook response ====
3935
jq -n --arg ctx "$CTX" --arg event "$EVENT_NAME" \
4036
'{ hookSpecificOutput: { hookEventName: $event, additionalContext: $ctx } }'

specs/deepwork/jobs/JOBS-REQ-014-deepplan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ DeepPlan is a standard job that provides a structured planning workflow. When an
3939

4040
### JOBS-REQ-014.5: Planning Mode Integration
4141

42-
1. The startup context hook MUST inject an instruction telling agents to start the `create_deep_plan` workflow when entering plan mode.
42+
1. ~~DEPRECATED~~ ~~The startup context hook MUST inject an instruction telling agents to start the `create_deep_plan` workflow when entering plan mode.~~
4343
2. The `present_plan` step MUST instruct the agent to call `ExitPlanMode` instead of `finished_step`.
4444
3. The plan file MUST include execution instructions telling the post-approval agent to call `finished_step` on `present_plan` and then `start_workflow` on the session job.
4545

tests/unit/jobs/test_deepplan.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,13 @@ def test_required_step_arguments(self) -> None:
9494

9595

9696
class TestDeepplanStartupHook:
97-
"""Validate the startup context hook injects DeepPlan trigger."""
98-
99-
# THIS TEST VALIDATES A HARD REQUIREMENT (JOBS-REQ-014.5.1).
100-
# YOU MUST NOT MODIFY THIS TEST UNLESS THE REQUIREMENT CHANGES
101-
def test_startup_hook_contains_deepplan_trigger(self) -> None:
102-
"""startup_context.sh injects an instruction to start create_deep_plan."""
103-
content = _STARTUP_HOOK.read_text(encoding="utf-8")
104-
assert "create_deep_plan" in content
105-
assert "deepplan" in content
106-
assert "start_workflow" in content
97+
"""Validate the startup context hook basics."""
10798

10899
@pytest.mark.skipif(
109100
not _STARTUP_HOOK.exists(),
110101
reason="startup_context.sh not found",
111102
)
112103
def test_startup_hook_is_executable(self) -> None:
113-
# THIS TEST VALIDATES A HARD REQUIREMENT (JOBS-REQ-014.5.1).
114-
# YOU MUST NOT MODIFY THIS TEST UNLESS THE REQUIREMENT CHANGES
115104
"""startup_context.sh has execute permission."""
116105
import os
117106

0 commit comments

Comments
 (0)