feat: add /list-todo and /show-plan commands#126
Conversation
- list-todo-helper.sh: Fast task listing with sorting/filtering options - Sort by priority, estimate, date, or alphabetically - Filter by tag, owner, status, or estimate range - Output as markdown tables or JSON - Include plans with --plans flag - show-plan-helper.sh: Display detailed plan information - Fuzzy match by plan name or exact match by ID - Show purpose, progress, decisions, discoveries - List related tasks from TODO.md - Support --list for plan overview - Command subagents delegate to scripts for instant output - Fallback to manual parsing if scripts unavailable - Compatible with bash 3.2 (macOS default)
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds two CLI command docs and two Bash helper scripts that parse project Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as list-todo Command
participant Helper as list-todo-helper.sh
participant Files as TODO.md / PLANS.md
User->>CLI: run list-todo with options
CLI->>Helper: forward args (sort, filter, format)
Helper->>Helper: locate project root (find TODO.md)
Helper->>Files: read/parse TODO.md
alt --plans flag
Helper->>Files: read/parse PLANS.md
end
Helper->>Helper: filter & sort tasks
Helper->>Helper: format output (Markdown or JSON)
Helper->>CLI: return results
CLI->>User: display results (interactive prompt possible)
sequenceDiagram
actor User
participant CLI as show-plan Command
participant Helper as show-plan-helper.sh
participant PLANS as PLANS.md
participant TODO as TODO.md
participant Git as Git Branch
User->>CLI: request plan by name/ID or --current
CLI->>Helper: pass identifier or --current
alt --current
Helper->>Git: read branch name
Helper->>PLANS: fuzzy-match plan from branch hint
else name/ID
Helper->>PLANS: lookup plan by name or pID
end
Helper->>PLANS: extract plan block & metadata
Helper->>TODO: find related tasks referencing plan
Helper->>Helper: format plan (Markdown/JSON)
Helper->>CLI: return plan details
CLI->>User: display plan and actions (start work, view tasks)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's task and plan management capabilities by introducing two new commands, '/list-todo' and '/show-plan'. These commands are designed to provide users with quick and efficient access to their project's tasks and plans, offering a rich set of options for filtering, sorting, and displaying information. The primary goal is to streamline workflow management and improve user interaction with project documentation by providing immediate, script-driven feedback. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Jan 19 02:10:56 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request introduces two new commands, /list-todo and /show-plan, along with their respective helper scripts. These commands provide fast, script-based task and plan listing and detailed display, with options for sorting, filtering, and output formats (markdown or JSON). The implementation demonstrates a good understanding of shell scripting best practices, including robust argument parsing, temporary file handling, and error management. However, there are some areas for improvement regarding the robustness of content parsing in the helper scripts and clarity in the markdown documentation.
| if [[ "$line" =~ ^####[[:space:]]+Decision ]]; then | ||
| in_purpose=false | ||
| in_progress=false | ||
| in_decisions=true | ||
| in_discoveries=false | ||
| in_context=false | ||
| continue | ||
| fi | ||
|
|
||
| if [[ "$line" =~ ^####[[:space:]]+Surprises ]]; then | ||
| in_purpose=false | ||
| in_progress=false | ||
| in_decisions=false | ||
| in_discoveries=true | ||
| in_context=false | ||
| continue | ||
| fi | ||
|
|
||
| if [[ "$line" =~ ^####[[:space:]]+Context ]]; then | ||
| in_purpose=false | ||
| in_progress=false | ||
| in_decisions=false | ||
| in_discoveries=false | ||
| in_context=true | ||
| continue | ||
| fi | ||
|
|
||
| # Skip TOON blocks | ||
| [[ "$line" =~ ^\<\!--TOON ]] && continue | ||
| [[ "$line" =~ ^--\> ]] && continue | ||
|
|
||
| # Accumulate content | ||
| if $in_purpose && [[ -n "$line" ]]; then | ||
| purpose+="$line"$'\n' | ||
| fi | ||
| if $in_progress && [[ "$line" =~ ^-\ \[ ]]; then | ||
| progress+="$line"$'\n' | ||
| fi | ||
| if $in_decisions && [[ "$line" =~ ^-\ \*\*Decision ]]; then | ||
| decisions+="$line"$'\n' | ||
| fi | ||
| if $in_discoveries && [[ "$line" =~ ^-\ \*\*Observation ]]; then | ||
| discoveries+="$line"$'\n' | ||
| fi | ||
| if $in_context && [[ -n "$line" ]]; then | ||
| context+="$line"$'\n' | ||
| fi |
There was a problem hiding this comment.
The parse_plan_content function currently only captures the first line of multi-line sections like 'Decisions' and 'Discoveries'. For example, a decision with a rationale and date will only have the 'Decision' line captured, leading to data loss. This is a critical correctness issue as it prevents the full plan details from being processed and displayed.
| if [[ "$line" =~ ^####[[:space:]]+Decision ]]; then | |
| in_purpose=false | |
| in_progress=false | |
| in_decisions=true | |
| in_discoveries=false | |
| in_context=false | |
| continue | |
| fi | |
| if [[ "$line" =~ ^####[[:space:]]+Surprises ]]; then | |
| in_purpose=false | |
| in_progress=false | |
| in_decisions=false | |
| in_discoveries=true | |
| in_context=false | |
| continue | |
| fi | |
| if [[ "$line" =~ ^####[[:space:]]+Context ]]; then | |
| in_purpose=false | |
| in_progress=false | |
| in_decisions=false | |
| in_discoveries=false | |
| in_context=true | |
| continue | |
| fi | |
| # Skip TOON blocks | |
| [[ "$line" =~ ^\<\!--TOON ]] && continue | |
| [[ "$line" =~ ^--\> ]] && continue | |
| # Accumulate content | |
| if $in_purpose && [[ -n "$line" ]]; then | |
| purpose+="$line"$'\n' | |
| fi | |
| if $in_progress && [[ "$line" =~ ^-\ \[ ]]; then | |
| progress+="$line"$'\n' | |
| fi | |
| if $in_decisions && [[ "$line" =~ ^-\ \*\*Decision ]]; then | |
| decisions+="$line"$'\n' | |
| fi | |
| if $in_discoveries && [[ "$line" =~ ^-\ \*\*Observation ]]; then | |
| discoveries+="$line"$'\n' | |
| fi | |
| if $in_context && [[ -n "$line" ]]; then | |
| context+="$line"$'\n' | |
| fi | |
| if $in_decisions; then | |
| decisions+="$line"$' | |
| ' | |
| fi | |
| if $in_discoveries; then | |
| discoveries+="$line"$' | |
| ' | |
| fi | |
| if $in_context && [[ -n "$line" ]]; then | |
| context+="$line"$' | |
| ' | |
| fi |
|
|
||
| # Read next few lines for status and estimate | ||
| while IFS= read -r meta_line; do | ||
| if [[ "$meta_line" =~ ^\*\*Status:\*\*[[:space:]]+(.+)$ ]]; then | ||
| status="${BASH_REMATCH[1]}" | ||
| elif [[ "$meta_line" =~ ^\*\*Estimate:\*\*[[:space:]]+(.+)$ ]]; then | ||
| estimate="${BASH_REMATCH[1]}" | ||
| break | ||
| elif [[ "$meta_line" =~ ^#### ]]; then | ||
| break | ||
| fi | ||
| done |
There was a problem hiding this comment.
The list_plans function's logic for extracting status and estimate by reading "next few lines" is fragile. It assumes a fixed order and immediate presence of these metadata lines after the plan title. If the PLANS.md format changes (e.g., new fields are added, or order is altered), this parsing could easily break or return incorrect information. A more robust approach would be to parse the entire plan section (similar to extract_plan) and then extract specific fields using regex or string manipulation.
| # Read next few lines for status and estimate | |
| while IFS= read -r meta_line; do | |
| if [[ "$meta_line" =~ ^\*\*Status:\*\*[[:space:]]+(.+)$ ]]; then | |
| status="${BASH_REMATCH[1]}" | |
| elif [[ "$meta_line" =~ ^\*\*Estimate:\*\*[[:space:]]+(.+)$ ]]; then | |
| estimate="${BASH_REMATCH[1]}" | |
| break | |
| elif [[ "$meta_line" =~ ^#### ]]; then | |
| break | |
| fi | |
| done | |
| # Read next few lines for status and estimate | |
| local plan_metadata_lines="" | |
| local current_line | |
| while IFS= read -r current_line; do | |
| if [[ "$current_line" =~ ^#### ]]; then # Stop at next section header | |
| break | |
| fi | |
| plan_metadata_lines+="$current_line"$' | |
| ' | |
| done | |
| if [[ "$plan_metadata_lines" =~ \*\*Status:\*\*[[:space:]]+(.+)$ ]]; then | |
| status="${BASH_REMATCH[1]}" | |
| fi | |
| if [[ "$plan_metadata_lines" =~ \*\*Estimate:\*\*[[:space:]]+(.+)$ ]]; then | |
| estimate="${BASH_REMATCH[1]}" | |
| fi |
.agent/scripts/commands/list-todo.md
Outdated
| 1. Work on a specific task (enter task ID like `t014` or number) | ||
| 2. Filter/sort differently |
There was a problem hiding this comment.
The options for user input in the "Output Format" section could be more explicit. "number" is vague; it would be clearer to specify that it refers to the # column in the tables. This improves user experience by removing ambiguity.
| 1. Work on a specific task (enter task ID like `t014` or number) | |
| 2. Filter/sort differently | |
| 1. Work on a specific task (enter task ID like `t014` or the number from the `#` column) | |
| 2. Filter/sort differently |
.agent/scripts/commands/list-todo.md
Outdated
| 2. **Filter command** - Re-run with new filters | ||
| 3. **"done" or "3"** - End browsing |
There was a problem hiding this comment.
Similar to the previous comment, the "number" option for task selection should be more explicit. Additionally, the options "Filter command" and "Done browsing" are described with phrases like "Re-run with new filters" and "End browsing", but the actual input expected (e.g., "2" or "3") is not explicitly mentioned alongside these phrases, which could lead to confusion.
| 2. **Filter command** - Re-run with new filters | |
| 3. **"done" or "3"** - End browsing | |
| 1. **Task ID or number (from `#` column)** - Start working on that task | |
| 2. **Filter command (e.g., `--priority`)** - Re-run with new filters |
.agent/scripts/commands/show-plan.md
Outdated
| 1. **"1" or "start"** - Begin working on the plan | ||
| - Run pre-edit check |
There was a problem hiding this comment.
The options for user input in the "After Display" section are not fully consistent with the examples provided. While "1" is shown, "start" is not explicitly listed as an option in the "Output Format" section. For clarity, ensure that all valid user inputs are either explicitly listed or clearly implied by the output format.
| 1. **"1" or "start"** - Begin working on the plan | |
| - Run pre-edit check | |
| 1. **"1"** - Begin working on the plan | |
| - Run pre-edit check |
.agent/scripts/commands/show-plan.md
Outdated
| - Re-run `/show-plan <name>` | ||
|
|
There was a problem hiding this comment.
The option "plan name" is mentioned as a valid input, but it's not explicitly presented as one of the numbered options in the "Output Format" section. This could cause confusion for users trying to navigate the options.
| - Re-run `/show-plan <name>` | |
| 2. **"2"** - View another plan (e.g., `/show-plan <name>`) |
| - Run `/list-todo` | ||
|
|
There was a problem hiding this comment.
| local desc="" | ||
| desc=$(echo "$line" | sed 's/^[[:space:]]*- \[[^]]*\][[:space:]]*//' | sed 's/^t[0-9.]*[[:space:]]*//' | sed 's/[[:space:]]*#[^[:space:]].*$//' | sed 's/[[:space:]]*~[^[:space:]].*$//' | sed 's/[[:space:]]*@[^[:space:]].*$//' | sed 's/[[:space:]]*→.*$//' | sed 's/[[:space:]]*logged:.*$//' | sed 's/[[:space:]]*blocked-by:.*$//' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') |
There was a problem hiding this comment.
The sed command used for extracting the task description is very long and complex. While it works, it's brittle and hard to read or maintain. A slight change in the TODO.md format could easily break this. Consider breaking it down into multiple sed commands or using awk for more structured field extraction, which can be more robust and readable.
| local desc="" | |
| desc=$(echo "$line" | sed 's/^[[:space:]]*- \[[^]]*\][[:space:]]*//' | sed 's/^t[0-9.]*[[:space:]]*//' | sed 's/[[:space:]]*#[^[:space:]].*$//' | sed 's/[[:space:]]*~[^[:space:]].*$//' | sed 's/[[:space:]]*@[^[:space:]].*$//' | sed 's/[[:space:]]*→.*$//' | sed 's/[[:space:]]*logged:.*$//' | sed 's/[[:space:]]*blocked-by:.*$//' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') | |
| desc=$(echo "$line" | sed -E 's/^[[:space:]]*- \[[^]]*\][[:space:]]*//' \ | |
| -E 's/^t[0-9.]*[[:space:]]*//' \ | |
| -E 's/[[:space:]]*#[^[:space:]].*$//' \ | |
| -E 's/[[:space:]]*~[^[:space:]].*$//' \ | |
| -E 's/[[:space:]]*@[^[:space:]].*$//' \ | |
| -E 's/[[:space:]]*→.*$//' \ | |
| -E 's/[[:space:]]*logged:.*$//' \ | |
| -E 's/[[:space:]]*blocked-by:.*$//' \ | |
| -E 's/^[[:space:]]*//;s/[[:space:]]*$//') |
🤖 Augment PR SummarySummary: Adds two new agent commands to surface project work items quickly without AI parsing. Changes:
Technical Notes: Scripts run with 🤖 Was this summary useful? React with 👍 or 👎 |
| fi | ||
| elif [[ "$line" =~ ^\*\*Estimate:\*\*[[:space:]]+(.+)$ ]]; then | ||
| plan_est="${BASH_REMATCH[1]}" | ||
| elif [[ "$line" =~ ^-\ \[\ \].*Phase[[:space:]]+([0-9]+):(.+) ]] && [[ -z "$plan_next" ]]; then |
| fi | ||
|
|
||
| # Detect section change (end of active plans) | ||
| if [[ "$line" =~ ^##[[:space:]]+(Completed|Archived)[[:space:]]+Plans ]]; then |
There was a problem hiding this comment.
| # Extract potential plan name from branch | ||
| # e.g., feature/list-todo-show-plan-commands -> list-todo-show-plan | ||
| local plan_hint | ||
| plan_hint=$(echo "$branch" | sed 's|^[^/]*/||' | sed 's/-commands$//' | sed 's/-helper$//' | tr '-' ' ') |
There was a problem hiding this comment.
For --current, plan_hint turns hyphens into spaces, but extract_plan does a raw substring match against the plan title (which often contains hyphens like aidevops-opencode Plugin). That makes --current likely to miss the intended plan unless titles/branches share identical punctuation.
🤖 Was this useful? React with 👍 or 👎
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Fix all issues with AI agents
In @.agent/scripts/commands/list-todo.md:
- Around line 25-66: Replace lowercase "markdown" with "Markdown" in the docs so
the term is capitalized consistently; specifically update the occurrences in the
heading/step text "Format as markdown tables" and the "Output Format" line "The
script outputs markdown tables:" (and any other instances of "markdown" in this
file) to "Format as Markdown tables" and "The script outputs Markdown tables:"
respectively.
In @.agent/scripts/commands/show-plan.md:
- Around line 52-55: In the "## Output Format" section update the lowercase word
"markdown" to "Markdown" for consistent capitalization; locate the phrase
"markdown" in that section and change it to "Markdown" so the document treats
the term as a proper noun consistently.
- Around line 121-124: The fenced code block under the "Check branch status"
section is missing blank lines around it; edit the markdown in show-plan.md so
there is a blank line after the "1. **Check branch status:**" heading and a
blank line after the closing ``` fenced block that contains the command
~/.aidevops/agents/scripts/pre-edit-check.sh, ensuring the block is wrapped by
empty lines as Codacy expects.
In @.agent/scripts/list-todo-helper.sh:
- Around line 338-345: The tag filter currently lowercases FILTER_TAG and tags
then uses the regex operator ([[ ! "$tags_lower" =~ $tag_lower ]]) which treats
user input as a regex; change it to a literal, case-insensitive substring check
to avoid regex interpretation errors by replacing the regex match with a plain
substring test (e.g., using the shell pattern "*$tag_lower*" against tags_lower
or using grep -F -i) so FILTER_TAG, tag_lower, tags_lower and the surrounding if
block perform safe literal matching and return 1 when the lowercase FILTER_TAG
is not contained in tags_lower.
- Around line 261-325: The parse_plans function currently continues treating
subsequent "###" headers as active plans even after a "## Completed/Archived
Plans" section is hit; add and use an active_section flag (e.g.,
active_section=true initially) and set active_section=false when the regex
matching ^##[[:space:]]+(Completed|Archived)[[:space:]]+Plans is encountered,
then only start a new plan (the block that sets plan_title, plan_status,
in_plan, etc.) when active_section is true; also ensure the final output of the
last plan checks active_section or in_plan to avoid emitting completed/archived
plans.
- Around line 584-648: The output_json function only escapes quotes and will
break on backslashes/newlines; add a json_escape helper (e.g., json_escape())
that replaces backslash, newline, carriage return, tab, and double-quote with
safe JSON escapes, then call this helper for every string field emitted by
output_json (desc, tags, owner, logged, blocked_by, title, next, status, est
where treated as strings) before using printf; ensure the Plans branch also
applies json_escape to title, status, est, next and keep numeric fields
(phase,total) unescaped, and use the escaped variables in the existing printf
calls so all JSON string values are robustly escaped.
- Around line 687-755: The main() option parser does not validate that
value-taking flags actually have a following argument (flags: --tag/ -t,
--owner/ -o, --status, --estimate-filter, --group-by/ -g, --limit) so with set
-u the script can hard-exit; update the case branch in main() (the option
parsing block) to check that "$2" is non-empty before assigning FILTER_TAG,
FILTER_OWNER, FILTER_STATUS, FILTER_ESTIMATE, GROUP_BY and LIMIT, print a clear
error and exit if missing, and for --limit additionally validate that the
supplied value is numeric (e.g., use a digit check or regex) before assigning
LIMIT; ensure shifts only occur after validation so behavior of parse_tasks |
sort_tasks remains unchanged.
In @.agent/scripts/show-plan-helper.sh:
- Around line 186-193: The parser currently only recognizes "Surprises" headers
via the regex ^####[[:space:]]+Surprises and sets in_discoveries=true; update
that logic so the header matching also accepts "Discoveries" (e.g., match either
"Surprises" or "Discoveries") so the in_discoveries flag is set for both cases;
modify the conditional that uses ^####[[:space:]]+Surprises (or add a similar
conditional) so the code path that sets in_discoveries, clears the other in_*
flags, and continues will run when the header text is either "Surprises" or
"Discoveries".
- Around line 365-425: The output_json function currently produces fragile JSON
and writes error JSON to stderr; update output_json to fully escape backslashes,
quotes and newlines for all string fields produced from
extract_plan/parse_plan_content (title, purpose, progress, decisions,
discoveries, context and task descs) and ensure numeric fields (phase,
total_phases) are emitted as numbers or null when empty; write error JSON to
stdout (but still return non‑zero) when extract_plan fails; also ensure the
related_tasks loop in get_related_tasks/output_json emits commas correctly (use
a first-flag and printf) and preserves proper escaping so newlines do not break
the JSON structure.
🧹 Nitpick comments (2)
.agent/scripts/list-todo-helper.sh (1)
41-43: GROUP_BY is still unused after parsing.
Codacy flags this; if grouping isn’t shipping yet, consider removing the flag or wiring it into output to keep lint clean.Also applies to: 700-701
.agent/scripts/commands/show-plan.md (1)
1-20: Keep command guidance anchored to AGENTS.md.
This adds operational guidance; consider adding a pointer or consolidating in AGENTS.md to avoid drift. Based on learnings, AGENTS.md is the single source of truth.
| # Parse plans from PLANS.md | ||
| parse_plans() { | ||
| local plans_file="$1" | ||
|
|
||
| [[ ! -f "$plans_file" ]] && return 0 | ||
|
|
||
| local in_plan=false | ||
| local plan_title="" | ||
| local plan_status="" | ||
| local plan_est="" | ||
| local plan_phase="0" | ||
| local plan_total="0" | ||
| local plan_next="" | ||
|
|
||
| while IFS= read -r line; do | ||
| # Detect plan header (### [date] Title) | ||
| if [[ "$line" =~ ^###[[:space:]]+\[([0-9-]+)\][[:space:]]+(.+)$ ]]; then | ||
| # Output previous plan if exists | ||
| if [[ -n "$plan_title" ]]; then | ||
| echo "plan|$plan_title|$plan_status|$plan_est|$plan_phase|$plan_total|$plan_next" | ||
| fi | ||
| plan_title="${BASH_REMATCH[2]}" | ||
| # Remove trailing markers like ✓ | ||
| plan_title="${plan_title% ✓}" | ||
| plan_status="Planning" | ||
| plan_est="" | ||
| plan_phase="0" | ||
| plan_total="0" | ||
| plan_next="" | ||
| in_plan=true | ||
| continue | ||
| fi | ||
|
|
||
| # Parse plan metadata | ||
| if $in_plan; then | ||
| if [[ "$line" =~ ^\*\*Status:\*\*[[:space:]]+(.+)$ ]]; then | ||
| plan_status="${BASH_REMATCH[1]}" | ||
| # Extract phase info if present | ||
| if [[ "$plan_status" =~ \(Phase[[:space:]]+([0-9]+)/([0-9]+)\) ]]; then | ||
| plan_phase="${BASH_REMATCH[1]}" | ||
| plan_total="${BASH_REMATCH[2]}" | ||
| elif [[ "$plan_status" =~ Completed ]]; then | ||
| plan_status="Completed" | ||
| fi | ||
| elif [[ "$line" =~ ^\*\*Estimate:\*\*[[:space:]]+(.+)$ ]]; then | ||
| plan_est="${BASH_REMATCH[1]}" | ||
| elif [[ "$line" =~ ^-\ \[\ \].*Phase[[:space:]]+([0-9]+):(.+) ]] && [[ -z "$plan_next" ]]; then | ||
| plan_next="Phase ${BASH_REMATCH[1]}:${BASH_REMATCH[2]}" | ||
| # Trim estimate from next phase and whitespace | ||
| plan_next=$(echo "$plan_next" | sed 's/~[0-9.]*[hmd].*$//' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') | ||
| fi | ||
| fi | ||
|
|
||
| # Detect section change (end of active plans) | ||
| if [[ "$line" =~ ^##[[:space:]]+(Completed|Archived)[[:space:]]+Plans ]]; then | ||
| in_plan=false | ||
| fi | ||
|
|
||
| done < "$plans_file" | ||
|
|
||
| # Output last plan | ||
| if [[ -n "$plan_title" ]] && [[ "$plan_status" != "Completed" ]]; then | ||
| echo "plan|$plan_title|$plan_status|$plan_est|$plan_phase|$plan_total|$plan_next" | ||
| fi | ||
| } |
There was a problem hiding this comment.
Completed/Archived plans can leak into the active list.
After the Completed/Archived section header, headers are still parsed as active plans. That can surface completed plans as active if their status line is missing or non-standard.
🔧 Proposed fix
- local in_plan=false
+ local in_plan=false
+ local in_active=true
@@
- if [[ "$line" =~ ^##[[:space:]]+(Completed|Archived)[[:space:]]+Plans ]]; then
- in_plan=false
- fi
+ if [[ "$line" =~ ^##[[:space:]]+(Completed|Archived) ]]; then
+ in_active=false
+ in_plan=false
+ continue
+ fi
+ $in_active || continue🤖 Prompt for AI Agents
In @.agent/scripts/list-todo-helper.sh around lines 261 - 325, The parse_plans
function currently continues treating subsequent "###" headers as active plans
even after a "## Completed/Archived Plans" section is hit; add and use an
active_section flag (e.g., active_section=true initially) and set
active_section=false when the regex matching
^##[[:space:]]+(Completed|Archived)[[:space:]]+Plans is encountered, then only
start a new plan (the block that sets plan_title, plan_status, in_plan, etc.)
when active_section is true; also ensure the final output of the last plan
checks active_section or in_plan to avoid emitting completed/archived plans.
- Fix Markdown capitalization in documentation - Use literal substring match for tag filter (not regex) - Add require_arg() validation for options requiring values - Add json_escape() for proper JSON string escaping - Match both 'Surprises' and 'Discoveries' headers - Clarify user input options in docs
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Jan 19 02:32:43 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Jan 19 02:35:24 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Jan 19 02:58:33 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
/list-todocommand for fast task listing with sorting and filtering/show-plancommand for detailed plan information displayNew Files
Scripts
list-todo-helper.sh(~760 lines) - Parse TODO.md with options:--priority,--estimate,--date,--alphafor sorting-t TAG,-o OWNER,--status,--estimate-filterfor filtering--plans,--done,--all,--compact,--jsonfor displayshow-plan-helper.sh(~580 lines) - Parse PLANS.md with options:--listfor plan overview--currentfor plan related to current branch--jsonfor programmatic useCommand Subagents
list-todo.md- Delegates to script, fallback to manual parsingshow-plan.md- Delegates to script, fallback to manual parsingTesting
Compatibility
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.