tenseleyflow/loader / aa40a8b

Browse files

Recognize develop todos as mutations

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
aa40a8bbded4a530916374ecfb53f9a348ead186
Parents
ef7bc99
Tree
de7a758

2 changed files

StatusFile+-
M src/loader/runtime/tool_batches.py 22 5
M tests/test_tool_batches.py 6 2
src/loader/runtime/tool_batches.pymodified
@@ -62,6 +62,12 @@ _TODO_NUDGE_EXCLUDED_ITEMS = {
6262
 _MUTATION_TODO_HINTS = (
6363
     "create",
6464
     "creating",
65
+    "develop",
66
+    "developing",
67
+    "populate",
68
+    "populating",
69
+    "build",
70
+    "building",
6571
     "update",
6672
     "updating",
6773
     "edit",
@@ -1113,11 +1119,6 @@ class ToolBatchRunner:
11131119
             dod,
11141120
             project_root=self.context.project_root,
11151121
         )
1116
-        if (
1117
-            not has_file_artifact_progress
1118
-            and _is_pure_directory_creation_tool_call(tool_call)
1119
-        ):
1120
-            return
11211122
         resume_target = _preferred_resume_target_path(
11221123
             dod,
11231124
             next_pending=next_pending,
@@ -1132,6 +1133,22 @@ class ToolBatchRunner:
11321133
             project_root=self.context.project_root,
11331134
             messages=list(getattr(self.context.session, "messages", []) or []),
11341135
         )
1136
+        if (
1137
+            not has_file_artifact_progress
1138
+            and _is_pure_directory_creation_tool_call(tool_call)
1139
+        ):
1140
+            if (
1141
+                next_pending
1142
+                and _todo_is_mutation_step(next_pending)
1143
+                and resume_target is not None
1144
+                and resume_target.suffix
1145
+            ):
1146
+                self.context.queue_steering_message(
1147
+                    f"Directory setup is complete. Continue with the next pending item: `{next_pending}`."
1148
+                    + resume_suffix
1149
+                    + " Do not reread older reference files before that mutation."
1150
+                )
1151
+            return
11351152
         use_persistent_handoff = _should_use_persistent_missing_artifact_handoff(
11361153
             dod,
11371154
             project_root=self.context.project_root,
tests/test_tool_batches.pymodified
@@ -2145,7 +2145,7 @@ async def test_tool_batch_runner_discovery_completion_handoff_stays_persistent(
21452145
 
21462146
 
21472147
 @pytest.mark.asyncio
2148
-async def test_tool_batch_runner_missing_artifact_nudge_stays_quiet_after_setup_mkdir(
2148
+async def test_tool_batch_runner_missing_artifact_nudge_names_next_file_after_setup_mkdir(
21492149
     temp_dir: Path,
21502150
 ) -> None:
21512151
     async def assess_confidence(
@@ -2240,7 +2240,11 @@ async def test_tool_batch_runner_missing_artifact_nudge_stays_quiet_after_setup_
22402240
         consecutive_errors=0,
22412241
     )
22422242
 
2243
-    assert persistent_messages == []
2243
+    assert persistent_messages
2244
+    message = persistent_messages[-1]
2245
+    assert "Directory setup is complete." in message
2246
+    assert "Continue with the next pending item: `Develop the main index.html file with proper structure`." in message
2247
+    assert "Resume by creating `index.html` now." in message
22442248
     assert ephemeral_messages == []
22452249
 
22462250