refactor(help): colocate fold guidance and extract workflows - #3093
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/schema/cli-help-workflows.ts">
<violation number="1" location="src/commands/schema/cli-help-workflows.ts:7">
P2: This wait contract omits `wait_readiness_exhausted` and `wait_runner_restart_exhausted`, even though the runtime emits them for retriable timeout paths. Agents following this help cannot interpret those `details.reason` values; document both reasons here.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| wait_target_present: wait absent timed out with matches; details include matches and firstMatch. | ||
| predicate_failed: wait absent had no valid capture; final observation/diagnostic is preserved. | ||
| wait_capture_stalled: no readable capture finished before the deadline -- retriable. | ||
| wait_deadline_exceeded: a later capture used the remaining budget after an earlier readable one. |
There was a problem hiding this comment.
P2: This wait contract omits wait_readiness_exhausted and wait_runner_restart_exhausted, even though the runtime emits them for retriable timeout paths. Agents following this help cannot interpret those details.reason values; document both reasons here.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/commands/schema/cli-help-workflows.ts, line 7:
<comment>This wait contract omits `wait_readiness_exhausted` and `wait_runner_restart_exhausted`, even though the runtime emits them for retriable timeout paths. Agents following this help cannot interpret those `details.reason` values; document both reasons here.</comment>
<file context>
@@ -0,0 +1,292 @@
+ wait_target_present: wait absent timed out with matches; details include matches and firstMatch.
+ predicate_failed: wait absent had no valid capture; final observation/diagnostic is preserved.
+ wait_capture_stalled: no readable capture finished before the deadline -- retriable.
+ wait_deadline_exceeded: a later capture used the remaining budget after an earlier readable one.
+ wait_landmark_identity_mismatch: a replay destination guard found the selector but not the recorded identity.
+ wait_stable_timeout: wait stable never saw a stable UI -- not an absence verdict.
</file context>
|
Reviewed 521e0f0. The extracted help text matches the old text and order, and the moved tests come along unchanged. All checks pass and there are no conflicts. One non-blocking note: |
|
Summary
Keep fold command guidance beside its system-family declaration and reuse three small wording fragments across metadata/help. Extract related workflow help and their existing tests so
cli-help.tsdrops from 1,280 to 987 lines.5 files, 854 gross lines. Existing overview files stay untouched. No new policy registry, compatibility path, or routing traits. Independent review approved the ownership and decomposition.
Validation
Tested commit
521e0f06e8c44172ad028cf3ba615d87030d41a1:pnpm check:affected --run: passed, 171 files / 1,385 tests, including provider integration.This changes help authorship only; device behavior is unchanged and does not require a live fold run. Remote CI is pending; publication does not claim merge readiness.