Proposal: fix ca-architecture-guard — add explicit label instructions when creating issues #3244

Closed
opened 2026-04-05 08:26:40 +00:00 by freemo · 2 comments
Owner

Agent Improvement Proposal

Pattern Detected

Type: Prompt improvement — label compliance enforcement
Affected Agent: ca-architecture-guard
Evidence: System Watchdog report on issue #3197 (cycle 1) states:

"ca-architecture-guard consistently creates issues without labels. The backlog groomer is also fixing these in parallel."

Specifically, the watchdog had to fix 5 issues created by ca-architecture-guard that were missing ALL required labels:

All were created without State/, Type/, or Priority/ labels, violating CONTRIBUTING.md requirements.

Root Cause Analysis

The ca-architecture-guard.md agent definition instructs the agent to "create a Forgejo issue (Type/Refactoring, appropriate priority, State/Unverified)" in its scanning loop, but:

  1. The agent only has ca-ref-reader as a task permission — it cannot invoke ca-new-issue-creator which has built-in label enforcement
  2. The agent creates issues via direct Forgejo API calls (bash curl), but the instructions don't explicitly tell it to use forgejo_add_issue_labels or include labels in the API call
  3. The Forgejo create_issue API does not automatically add labels — they must be added separately

Proposed Change

Add an explicit "Label Requirements" section to ca-architecture-guard.md that instructs the agent to add all three required labels immediately after creating each issue:

  1. Add a clear instruction block after the "For each finding: create a Forgejo issue" step:

    After creating each issue, IMMEDIATELY add these labels via the Forgejo API:
    - `State/Unverified` — every new issue starts unverified
    - `Type/Refactor` (or `Type/Bug` for bugs) — matching the finding type
    - `Priority/Backlog` — architecture guard findings are non-blocking
    
    Use `forgejo_add_issue_labels` or the equivalent curl API call.
    
  2. Add a post-creation verification step:

    After adding labels, verify the issue has all three required labels
    by re-reading it. If any label is missing, retry the label addition.
    

Expected Impact

  • Eliminates the persistent pattern of unlabeled issues from ca-architecture-guard
  • Reduces remediation work by the watchdog and backlog groomer
  • Ensures all architecture guard findings are immediately triageable

Risk Assessment

  • Very low risk: Only adds label instructions to issue creation. Does not modify scanning logic, analysis behavior, or any other agent.
  • No downside: Correctly labeled issues are always better than unlabeled ones.

This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the needs feedback label, add State/Verified, or comment with approval.


Automated by CleverAgents Bot
Supervisor: Agent Evolver | Agent: ca-agent-evolver

## Agent Improvement Proposal ### Pattern Detected **Type**: Prompt improvement — label compliance enforcement **Affected Agent**: `ca-architecture-guard` **Evidence**: System Watchdog report on issue #3197 (cycle 1) states: > "ca-architecture-guard consistently creates issues without labels. The backlog groomer is also fixing these in parallel." Specifically, the watchdog had to fix 5 issues created by ca-architecture-guard that were missing ALL required labels: - Issue #3170 - Issue #3168 - Issue #3166 - Issue #3181 - Issue #3183 All were created without `State/`, `Type/`, or `Priority/` labels, violating CONTRIBUTING.md requirements. ### Root Cause Analysis The `ca-architecture-guard.md` agent definition instructs the agent to "create a Forgejo issue (Type/Refactoring, appropriate priority, State/Unverified)" in its scanning loop, but: 1. The agent only has `ca-ref-reader` as a task permission — it cannot invoke `ca-new-issue-creator` which has built-in label enforcement 2. The agent creates issues via direct Forgejo API calls (bash curl), but the instructions don't explicitly tell it to use `forgejo_add_issue_labels` or include labels in the API call 3. The Forgejo `create_issue` API does not automatically add labels — they must be added separately ### Proposed Change Add an explicit "Label Requirements" section to `ca-architecture-guard.md` that instructs the agent to add all three required labels immediately after creating each issue: 1. Add a clear instruction block after the "For each finding: create a Forgejo issue" step: ``` After creating each issue, IMMEDIATELY add these labels via the Forgejo API: - `State/Unverified` — every new issue starts unverified - `Type/Refactor` (or `Type/Bug` for bugs) — matching the finding type - `Priority/Backlog` — architecture guard findings are non-blocking Use `forgejo_add_issue_labels` or the equivalent curl API call. ``` 2. Add a post-creation verification step: ``` After adding labels, verify the issue has all three required labels by re-reading it. If any label is missing, retry the label addition. ``` ### Expected Impact - Eliminates the persistent pattern of unlabeled issues from ca-architecture-guard - Reduces remediation work by the watchdog and backlog groomer - Ensures all architecture guard findings are immediately triageable ### Risk Assessment - **Very low risk**: Only adds label instructions to issue creation. Does not modify scanning logic, analysis behavior, or any other agent. - **No downside**: Correctly labeled issues are always better than unlabeled ones. --- *This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the `needs feedback` label, add `State/Verified`, or comment with approval.* --- **Automated by CleverAgents Bot** Supervisor: Agent Evolver | Agent: ca-agent-evolver
Author
Owner

There is another issue about this already, search for it and mark one of them as a duplicate and close it, likely this one since the other one no longer has the "needs attention" label. In fact yea, ill close this.

There is another issue about this already, search for it and mark one of them as a duplicate and close it, likely this one since the other one no longer has the "needs attention" label. In fact yea, ill close this.
Author
Owner

Acknowledged. The CTO has closed this issue as a duplicate. The broader issue #3321 ("fix multiple agents — add mandatory label assignment when creating issues") covers this same scope and has been approved and verified.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: ca-human-liaison

Acknowledged. The CTO has closed this issue as a duplicate. The broader issue #3321 ("fix multiple agents — add mandatory label assignment when creating issues") covers this same scope and has been approved and verified. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: ca-human-liaison
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#3244
No description provided.