[BUG] agents plan explain sequence field is integer instead of spec-required "N of M" string #9168

Open
opened 2026-04-14 08:59:43 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(plan): format sequence field as "N of M" string in plan explain output
  • Branch: fix/plan-explain-sequence-format

Background and Context

The spec (docs/specification.md §agents plan explain, lines 14673, 14719) defines the sequence field in the plan explain output as a string in the format "N of M" (e.g., "2 of 5").

Current Behavior

The _build_explain_dict() function in src/cleveragents/cli/commands/plan.py (line 4162) outputs sequence as a plain integer, producing { "sequence": 2 } instead of { "sequence": "2 of 5" }.

Expected Behavior

Per docs/specification.md lines 14673 and 14719, the sequence field must be a string in the format "N of M" where N is the decision's sequence number and M is the total number of decisions in the plan.

Acceptance Criteria

  • _build_explain_dict() (or explain_decision_cmd()) outputs sequence as a string in "N of M" format
  • The total count M is the total number of decisions for the plan
  • BDD tests updated to verify the "N of M" format

Subtasks

  • Update explain_decision_cmd() to pass total decision count to _build_explain_dict()
  • Update _build_explain_dict() to format sequence as f"{decision.sequence_number} of {total}"
  • Update BDD tests to verify the string format

Definition of Done

  • agents plan explain --format json returns sequence as "N of M" string
  • All BDD tests pass

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(plan): format sequence field as "N of M" string in plan explain output` - **Branch**: `fix/plan-explain-sequence-format` ## Background and Context The spec (`docs/specification.md` §agents plan explain, lines 14673, 14719) defines the `sequence` field in the `plan explain` output as a string in the format `"N of M"` (e.g., `"2 of 5"`). ## Current Behavior The `_build_explain_dict()` function in `src/cleveragents/cli/commands/plan.py` (line 4162) outputs `sequence` as a plain integer, producing `{ "sequence": 2 }` instead of `{ "sequence": "2 of 5" }`. ## Expected Behavior Per `docs/specification.md` lines 14673 and 14719, the `sequence` field must be a string in the format `"N of M"` where N is the decision's sequence number and M is the total number of decisions in the plan. ## Acceptance Criteria - [ ] `_build_explain_dict()` (or `explain_decision_cmd()`) outputs `sequence` as a string in `"N of M"` format - [ ] The total count M is the total number of decisions for the plan - [ ] BDD tests updated to verify the `"N of M"` format ## Subtasks - [ ] Update `explain_decision_cmd()` to pass total decision count to `_build_explain_dict()` - [ ] Update `_build_explain_dict()` to format `sequence` as `f"{decision.sequence_number} of {total}"` - [ ] Update BDD tests to verify the string format ## Definition of Done - `agents plan explain --format json` returns `sequence` as `"N of M"` string - All BDD tests pass --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added this to the v3.2.0 milestone 2026-04-14 09:03:05 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid bug: agents plan explain returns sequence as an integer instead of the spec-required "N of M" string format. This is a clear spec compliance issue with well-defined expected behavior.

Assigning to v3.2.0 as plan explain is a core M3 deliverable. Priority Medium — output format issue, not a functional failure.

MoSCoW: Should Have — spec compliance for output format is important but not a release blocker.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage: Verified** [AUTO-OWNR-1] Valid bug: `agents plan explain` returns `sequence` as an integer instead of the spec-required `"N of M"` string format. This is a clear spec compliance issue with well-defined expected behavior. Assigning to **v3.2.0** as `plan explain` is a core M3 deliverable. Priority **Medium** — output format issue, not a functional failure. MoSCoW: **Should Have** — spec compliance for output format is important but not a release blocker. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#9168
No description provided.