|
| 1 | +next-issue: |
| 2 | + #!/usr/bin/env sh |
| 3 | + [ -f next-issue.md ] || exit 1 |
| 4 | + |
| 5 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 6 | + 1. You will next work on issue `cat next-issue.md`. Read the actual issue from 'issues.md' |
| 7 | + 3. Decide is it relevant to write a failing test for the issue. If so, write the test, make sure that it fails. |
| 8 | + Note! Not all issues require writing failing tests. Use discretion. Remember - code is debt. |
| 9 | + 4. Change the code to fix the issue. Use "just dev test" to check if changes compile and tests pass. |
| 10 | + Code must follow the rules in '/rules/source-code.md' |
| 11 | + 5. When the issue is fixed and tests pass run "jj describe --stdin <<ENDDESC |
| 12 | + commit message |
| 13 | + ENDDESC". |
| 14 | + |
| 15 | + For example: |
| 16 | + jj describe --stdin <<ENDDESC |
| 17 | + ISSUE-043: Update dog-barking protocol |
| 18 | + |
| 19 | + ... |
| 20 | + ENDDESC |
| 21 | + |
| 22 | + Note! If you try to add a commit message like 'jj new -m "blah"' or 'jj describe -m "blah"' the resulting message will not be formatted properly. |
| 23 | + |
| 24 | + EOF |
| 25 | + |
| 26 | + rm next-issue.md |
| 27 | + |
| 28 | +review-change: |
| 29 | + #!/usr/bin/env sh |
| 30 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 31 | + 1. Fetch the current changes by writing 'jj show' |
| 32 | + 2. Create a new change by calling 'jj new -m "review(codex): ..."'. For example 'jj new -m "review(codex): Issue 004 - introducing dog barking functionality"' |
| 33 | + 3. Do a deep review of the change. |
| 34 | + - Write your review inline in the code itself by using code comments starting with '//REVIEW(author)' (or '# REVIEW(author)') to record your review. |
| 35 | + - While reviewing make sure that the rules in '/rules' folder are satisfied by the change under review. |
| 36 | + - DO NOT make any other changes in the code except adding the above-mentioned review comments. |
| 37 | + - DO NOT review code which is unrelated to the change under review |
| 38 | + |
| 39 | + 4. Examine the changes and update the list of issues in 'issues.md' |
| 40 | + - If the change affects a specific issue update its status |
| 41 | + - If the change partially solves an issue update its status and create new issues for the part which is not yet solved |
| 42 | + - If the change affects any non-related issue or creates new issues write that down as well |
| 43 | + - If you find any problems in the code unrelated to the change under review DO NOT write/update issues about them. We only care about how the change under review affects the overall state of the code and issues. |
| 44 | + |
| 45 | + Issues file must follow the rules in '/rules/issues.md' |
| 46 | + 5. Update the change description with a summary of the review using 'jj describe --stdin <<REVIEW |
| 47 | + review(codex): ... |
| 48 | +
|
| 49 | + ... |
| 50 | + REVIEW' |
| 51 | + EOF |
| 52 | + |
| 53 | +tidy-issues: |
| 54 | + #!/usr/bin/env sh |
| 55 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 56 | + 1. Read the file '/issues.md'. |
| 57 | + 2. Check if it follows the rules in '/rules/issues.md' |
| 58 | + 3. run 'jj new -m "issues(codex): ..."'. For example 'jj new -m "issues(codex): Removing duplicate dog-barking issue"' |
| 59 | + 4. Refactor the issues database to follow the specified rules. Do the MINIMAL changes necessary to make sure that the database follows the rules, while not removing any existing information in it. |
| 60 | + 5. Finally update the file '/issues-overview.md' to match the changes in 'issues.md'. It is a table of issues and statuses. |
| 61 | + EOF |
| 62 | + |
| 63 | +archive-issues: |
| 64 | + #!/usr/bin/env sh |
| 65 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 66 | + This is a task to archive done issues. |
| 67 | + 1. Read file '/issues.md'. |
| 68 | + 2. Check if there are any issues which are DONE. If not, exit. |
| 69 | + 3. Run 'jj new -m "issues(codex): Archiving done issues"' |
| 70 | + 4. Change the status of all "Done" issues to "Archived" |
| 71 | + 5. Then move achived issues to '.archive/issues-yyyy-mm-dd.md' file. Use current date. |
| 72 | + 6. Finally update the file '/issues-overview.md'. It is a table of issues and statuses |
| 73 | + |
| 74 | +pick-next-issue: |
| 75 | + #!/usr/bin/env sh |
| 76 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 77 | + 1. Examine issues.md and choose a single issue to work on. |
| 78 | + 2. If no issue is chosen, then STOP and don''t do anything else. |
| 79 | + 3. Otherwise: |
| 80 | + 3.1. Run "jj new" DON''T add a commit message! |
| 81 | + 3.2. Create a file in the root folder 'next-issue.md' The file must contain ONLY the issue id then a newline and nothing else. |
| 82 | + 3.3. STOP. |
| 83 | + EOF |
| 84 | + |
| 85 | +edit: |
| 86 | + #!/usr/bin/env sh |
| 87 | + jj show -r @ --git | sed -n 's/^diff --git a\/\([^ ]*\) b\/.*/\1/p' | sort -u | xargs -r ${EDITOR:-vi} |
| 88 | + |
| 89 | +work: |
| 90 | + #!/usr/bin/env sh |
| 91 | + echo "Hi" |
| 92 | + while true; do |
| 93 | + echo "Bye" |
| 94 | + just agents::pick-next-issue |
| 95 | + [ -f next-issue.md ] || break |
| 96 | + just agents::next-issue |
| 97 | + just agents::review-change |
| 98 | + EDITOR=emacsclient just agents::edit |
| 99 | + jj squash issues.md |
| 100 | + jj edit -r @- |
| 101 | + done |
0 commit comments