|
| 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 | + `cat rules/writing.md` |
| 25 | + |
| 26 | + EOF |
| 27 | + |
| 28 | + rm next-issue.md |
| 29 | + |
| 30 | +review-change: |
| 31 | + #!/usr/bin/env sh |
| 32 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 33 | + 1. Fetch the current changes by writing 'jj show' |
| 34 | + 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"' |
| 35 | + 3. Do a deep review of the change. |
| 36 | + - Write your review inline in the code itself by using code comments starting with '//REVIEW(author)' (or '# REVIEW(author)') to record your review. |
| 37 | + - While reviewing make sure that the rules in '/rules' folder are satisfied by the change under review. |
| 38 | + - DO NOT make any other changes in the code except adding the above-mentioned review comments. |
| 39 | + - DO NOT review code which is unrelated to the change under review. You can review code not in the diff, if its functionality was indirectly changed by the diff under review. |
| 40 | + - DO NOT write positive review comments. You can write positive statements in the review summary. Use review comments ONLY to point out potential problems or improvements. |
| 41 | + |
| 42 | + 4. Examine the changes and update the list of issues in 'issues.md' |
| 43 | + - If the change affects a specific issue update its status |
| 44 | + - If the change partially solves an issue update its status and create new issues for the part which is not yet solved |
| 45 | + - If the change affects any non-related issue or creates new issues write that down as well |
| 46 | + - 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. |
| 47 | + |
| 48 | + 5. Update the change description with a summary of the review using 'jj describe --stdin <<REVIEW |
| 49 | + review(codex): ... |
| 50 | +
|
| 51 | + ... |
| 52 | + REVIEW' |
| 53 | + |
| 54 | + `cat rules/writing.md` |
| 55 | + |
| 56 | + `cat rules/issues.md` |
| 57 | + EOF |
| 58 | + |
| 59 | +tidy-issues: |
| 60 | + #!/usr/bin/env sh |
| 61 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 62 | + 1. Read the file '/issues.md'. |
| 63 | + 2. Check if it follows the rules listed below |
| 64 | + 3. run 'jj new -m "issues(codex): ..."'. For example 'jj new -m "issues(codex): Removing duplicate dog-barking issue"' |
| 65 | + 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. |
| 66 | + 5. Finally update the file '/issues-overview.md' to match the changes in 'issues.md'. It is a table of issues and statuses. |
| 67 | + |
| 68 | + `cat rules/writing.md` |
| 69 | + |
| 70 | + `cat rules/issues.md` |
| 71 | + EOF |
| 72 | + |
| 73 | +archive-issues: |
| 74 | + #!/usr/bin/env sh |
| 75 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 76 | + This is a task to archive done issues. |
| 77 | + 1. Read file '/issues.md'. |
| 78 | + 2. Check if there are any issues which are DONE. If not, exit. |
| 79 | + 3. Run 'jj new -m "issues(codex): Archiving done issues"' |
| 80 | + 4. Change the status of all "Done" issues to "Archived" |
| 81 | + 5. Then move achived issues to '.archive/issues-yyyy-mm-dd.md' file. Use current date. |
| 82 | + 6. Finally update the file '/issues-overview.md'. It is a table of issues and statuses |
| 83 | + |
| 84 | +pick-next-issue: |
| 85 | + #!/usr/bin/env sh |
| 86 | + codex exec --full-auto --config model_reasoning_effort=high <<EOF |
| 87 | + 1. Examine issues.md and choose a single issue to work on. |
| 88 | + 2. If no issue is chosen, then STOP and don''t do anything else. |
| 89 | + 3. Otherwise: |
| 90 | + 3.1. Run "jj new" DON''T add a commit message! |
| 91 | + 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. |
| 92 | + 3.3. STOP. |
| 93 | + EOF |
| 94 | + |
| 95 | +edit: |
| 96 | + #!/usr/bin/env sh |
| 97 | + jj show -r @ --git | sed -n 's/^diff --git a\/\([^ ]*\) b\/.*/\1/p' | sort -u | xargs -r ${EDITOR:-vi} |
| 98 | + |
| 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 |
| 108 | +work: |
| 109 | + #!/usr/bin/env sh |
| 110 | + while true; do |
| 111 | + just agents::pick-next-issue |
| 112 | + [ -f next-issue.md ] || break |
| 113 | + just agents::ai-work-step |
| 114 | + just agents::human-work-step |
| 115 | + done |
| 116 | + |
| 117 | +# This should be started if you stop at editor phase and want to continue from where you left off |
| 118 | +# Current commit should be the last review commit |
| 119 | +continue-work: |
| 120 | + #!/usr/bin/env sh |
| 121 | + while true; do |
| 122 | + just agents::human-work-step |
| 123 | + just agents::pick-next-issue |
| 124 | + [ -f next-issue.md ] || break |
| 125 | + just agents::ai-work-step |
| 126 | + done |
| 127 | + |
0 commit comments