Skip to content

Commit 4fcbeac

Browse files
committed
agents.just: Refactor work steps
- Refactored common steps in agents::work and agents::continue-work in order to reduce duplication Signed-off-by: Tzanko Matev <[email protected]>
1 parent 3870b61 commit 4fcbeac

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

agents.just

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,30 +96,32 @@ edit:
9696
#!/usr/bin/env sh
9797
jj show -r @ --git | sed -n 's/^diff --git a\/\([^ ]*\) b\/.*/\1/p' | sort -u | xargs -r ${EDITOR:-vi}
9898

99+
human-work-step:
100+
#!/usr/bin/env sh
101+
just agents::edit
102+
jj split issues.md -m "issues: Update after review"
103+
jj edit -r @-
104+
105+
ai-work-step: next-issue review-change
106+
107+
# Use this step when starting to work on a new issue
99108
work:
100109
#!/usr/bin/env sh
101-
echo "Hi"
102110
while true; do
103-
echo "Bye"
104111
just agents::pick-next-issue
105112
[ -f next-issue.md ] || break
106-
just agents::next-issue
107-
just agents::review-change
108-
EDITOR=emacsclient just agents::edit
109-
jj squash issues.md
110-
jj edit -r @-
113+
just agents::ai-work-step
114+
just agents::human-work-step
111115
done
112116

113117
# This should be started if you stop at editor phase and want to continue from where you left off
114118
# Current commit should be the last review commit
115119
continue-work:
116120
#!/usr/bin/env sh
117121
while true; do
118-
EDITOR=emacsclient just agents::edit
119-
jj squash issues.md
122+
just agents::human-work-step
120123
just agents::pick-next-issue
121124
[ -f next-issue.md ] || break
122-
just agents::next-issue
123-
just agents::review-change
125+
just agents::ai-work-step
124126
done
125127

0 commit comments

Comments
 (0)