fix: address review — disambiguate label placeholders, relabel before close

- Rename <backlog_label_id> in WATCH path to <prediction_backlog_label_id>
  to avoid collision with the plain backlog label in strategic-planning
- Add prediction/actioned relabeling before close for PROMOTE and DISMISS
  paths so closed predictions are distinguishable from unprocessed ones
- Make step 4 comment format consistent with step 5: "Actioned as #NNN —
  <reasoning>" everywhere
- Add step 3b for explicit label ID resolution with create-if-missing for
  the new prediction/actioned label
- Document prediction/* and action labels in AGENTS.md label table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-20 09:36:37 +00:00
parent 6f75ab0a04
commit dd61f6438e
2 changed files with 37 additions and 7 deletions

View file

@ -311,6 +311,10 @@ Issues flow through these states:
| `tech-debt` | Pre-existing issue flagged by AI reviewer, not introduced by a PR. | review-pr.sh (auto-created follow-ups) | | `tech-debt` | Pre-existing issue flagged by AI reviewer, not introduced by a PR. | review-pr.sh (auto-created follow-ups) |
| `underspecified` | Dev-agent refused the issue as too large or vague. | dev-poll.sh (on preflight `too_large`), dev-agent.sh (on mid-run `too_large` refusal) | | `underspecified` | Dev-agent refused the issue as too large or vague. | dev-poll.sh (on preflight `too_large`), dev-agent.sh (on mid-run `too_large` refusal) |
| `vision` | Goal anchors — high-level objectives from VISION.md. | Planner, humans | | `vision` | Goal anchors — high-level objectives from VISION.md. | Planner, humans |
| `prediction/unreviewed` | Unprocessed prediction filed by predictor. | prediction-agent.sh |
| `prediction/backlog` | Prediction triaged as WATCH — not urgent, tracked. | Planner (triage-predictions step) |
| `prediction/actioned` | Prediction promoted or dismissed by planner. | Planner (triage-predictions step) |
| `action` | Operational task for the action-agent to execute via formula. | Planner, humans |
### Dependency conventions ### Dependency conventions

View file

@ -109,21 +109,33 @@ Evidence from the preflight step informs whether each prediction is valid
curl -sf -H "Authorization: token $CODEBERG_TOKEN" \ curl -sf -H "Authorization: token $CODEBERG_TOKEN" \
"$CODEBERG_API/issues?state=open&type=issues&limit=50" "$CODEBERG_API/issues?state=open&type=issues&limit=50"
3b. Resolve label IDs needed for triage (fetch via $CODEBERG_API/labels):
- <unreviewed_label_id> prediction/unreviewed
- <prediction_backlog_label_id> prediction/backlog
- <actioned_label_id> prediction/actioned (create if missing,
color #c2e0c6, description "Prediction triaged by planner")
- <backlog_label_id> backlog
- <action_label_id> action
These are DISTINCT labels do not reuse IDs across them.
4. For each prediction, read the title and body. Choose one action: 4. For each prediction, read the title and body. Choose one action:
- PROMOTE_ACTION: maps to an available formula create an action issue - PROMOTE_ACTION: maps to an available formula create an action issue
with YAML front matter referencing the formula name and vars. with YAML front matter referencing the formula name and vars.
Close the prediction with comment "Actioned as #NNN". Relabel prediction/unreviewed prediction/actioned, then close
with comment "Actioned as #NNN — <reasoning>".
- PROMOTE_BACKLOG: warrants dev work create a backlog issue. - PROMOTE_BACKLOG: warrants dev work create a backlog issue.
Close the prediction with comment "Actioned as #NNN". Relabel prediction/unreviewed prediction/actioned, then close
with comment "Actioned as #NNN — <reasoning>".
- WATCH: not urgent but worth tracking post a comment explaining - WATCH: not urgent but worth tracking post a comment explaining
why it is not urgent, then relabel from prediction/unreviewed to why it is not urgent, then relabel from prediction/unreviewed to
prediction/backlog. Do NOT close. prediction/backlog. Do NOT close.
- DISMISS: noise, already covered by an open issue, or not actionable - DISMISS: noise, already covered by an open issue, or not actionable
post a comment with explicit reasoning, then close the prediction. relabel prediction/unreviewed prediction/actioned, post a comment
with explicit reasoning, then close the prediction.
Every decision MUST include reasoning in a comment on the prediction issue. Every decision MUST include reasoning in a comment on the prediction issue.
@ -134,12 +146,19 @@ Evidence from the preflight step informs whether each prediction is valid
curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \ curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" "$CODEBERG_API/issues" \ -H "Content-Type: application/json" "$CODEBERG_API/issues" \
-d '{"title":"...","body":"...","labels":[<label_id>]}' -d '{"title":"...","body":"...","labels":[<label_id>]}'
b. Comment on the prediction with "Actioned as #NNN": b. Comment on the prediction with "Actioned as #NNN — <reasoning>":
curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \ curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"$CODEBERG_API/issues/<pred_num>/comments" \ "$CODEBERG_API/issues/<pred_num>/comments" \
-d '{"body":"Actioned as #NNN — <reasoning>"}' -d '{"body":"Actioned as #NNN — <reasoning>"}'
c. Close the prediction: c. Relabel: remove prediction/unreviewed, add prediction/actioned:
curl -sf -X DELETE -H "Authorization: token $CODEBERG_TOKEN" \
"$CODEBERG_API/issues/<pred_num>/labels/<unreviewed_label_id>"
curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" \
"$CODEBERG_API/issues/<pred_num>/labels" \
-d '{"labels":[<actioned_label_id>]}'
d. Close the prediction:
curl -sf -X PATCH -H "Authorization: token $CODEBERG_TOKEN" \ curl -sf -X PATCH -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"$CODEBERG_API/issues/<pred_num>" \ "$CODEBERG_API/issues/<pred_num>" \
@ -153,11 +172,18 @@ Evidence from the preflight step informs whether each prediction is valid
curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \ curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"$CODEBERG_API/issues/<pred_num>/labels" \ "$CODEBERG_API/issues/<pred_num>/labels" \
-d '{"labels":[<backlog_label_id>]}' -d '{"labels":[<prediction_backlog_label_id>]}'
For DISMISS: For DISMISS:
a. Comment with explicit reasoning a. Comment with explicit reasoning
b. Close the prediction issue b. Relabel: remove prediction/unreviewed, add prediction/actioned:
curl -sf -X DELETE -H "Authorization: token $CODEBERG_TOKEN" \
"$CODEBERG_API/issues/<pred_num>/labels/<unreviewed_label_id>"
curl -sf -X POST -H "Authorization: token $CODEBERG_TOKEN" \
-H "Content-Type: application/json" \
"$CODEBERG_API/issues/<pred_num>/labels" \
-d '{"labels":[<actioned_label_id>]}'
c. Close the prediction issue
6. Track promoted predictions they compete with vision gaps in the 6. Track promoted predictions they compete with vision gaps in the
strategic-planning step for the per-cycle 5-issue limit. strategic-planning step for the per-cycle 5-issue limit.