Skip to content

docs: update task workflow with non-milestone task listing - #115

Merged
NTCoding merged 2 commits into
mainfrom
non-milestone-task-listing
Jan 10, 2026
Merged

NTCoding merged 2 commits into
mainfrom
non-milestone-task-listing

Conversation

@NTCoding

@NTCoding NTCoding commented Jan 10, 2026 •

Copy link
Copy Markdown
Owner

User description

Updated task-workflow.md to document the new list-tasks.sh flags for non-milestone tasks (--ideas, --bugs, --tech). Clarified the distinction between milestone and non-milestone tasks.


PR Type

Enhancement, Documentation


Description

  • Add non-milestone task listing with --ideas, --bugs, --tech flags

  • Refactor list-tasks.sh to support both milestone and non-milestone modes

  • Document task types distinction in workflow guide

  • Simplify argument parsing and gh command construction


Diagram Walkthrough

flowchart LR
  A["list-tasks.sh"] -->|"no flags"| B["Milestone tasks<br/>from active PRD"]
  A -->|"--ideas"| C["Non-milestone<br/>idea label"]
  A -->|"--bugs"| D["Non-milestone<br/>bug label"]
  A -->|"--tech"| E["Non-milestone<br/>tech improvement label"]
  B --> F["Query by milestone"]
  C --> G["Query by label"]
  D --> G
  E --> G
Loading

File Walkthrough

Relevant files
Enhancement
list-tasks.sh
Refactor to support non-milestone task listing modes         

scripts/list-tasks.sh

  • Replace generic --label flag with specific --ideas, --bugs, --tech
    flags for non-milestone tasks
  • Add separate code path for non-milestone mode that queries by label
    only
  • Simplify milestone mode by removing conditional label filter logic
  • Update usage documentation in script comments and error messages
+33/-21 
Documentation
task-workflow.md
Document task types and non-milestone task listing             

docs/workflow/task-workflow.md

  • Restructure task documentation with new "Task Types" section
    distinguishing milestone vs non-milestone tasks
  • Add table documenting three non-milestone categories (ideas, bugs,
    tech improvements) with their labels and list commands
  • Update workflow table to show separate rows for listing milestone and
    non-milestone tasks
  • Reorganize task creation section with clearer subsections for PRD and
    tech improvement tasks
  • Enhance "Workflow" section with detailed instructions for listing
    different task types
+35/-16 

Summary by CodeRabbit

  • Documentation

    • Reorganized task workflow to clearly separate Milestone Tasks (PRD-driven) and Non-Milestone Tasks, with explicit list/create guidance and templates.
  • New Features

    • Added filters to list non-milestone tasks by type (ideas, bugs, tech) and a new command to create non-milestone tasks with structured fields.
  • Chores

    • Improved script reliability and error handling across task-related tooling.

✏️ Tip: You can customize this high-level summary in your review settings.

Updated task-workflow.md to document the new list-tasks.sh flags
for non-milestone tasks (--ideas, --bugs, --tech). Clarified the
distinction between milestone and non-milestone tasks.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jan 10, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Restructures task workflow docs to separate Milestone vs Non‑Milestone tasks and adds CLI support for non‑milestone subtypes; updates multiple scripts to use stricter bash options and introduces scripts/create-non-milestone-task.sh and new flags (--ideas, --bugs, --tech) in list-tasks.sh.

Changes

Cohort / File(s) Summary
Documentation
docs/workflow/task-workflow.md
Replaces single "List Tasks" flow with explicit "List Milestone Tasks" and "List Non-Milestone Tasks"; introduces Task Types (Milestone vs Non‑Milestone), creation templates, and updated command examples.
Task listing script
scripts/list-tasks.sh
Adds non‑milestone flags --ideas, --bugs, --tech (mutually exclusive) mapping to labels; early-exit non‑milestone mode; stricter bash options; milestone mode now validates active PRD and queries by milestone.
New non‑milestone creation
scripts/create-non-milestone-task.sh
New script to create GitHub issues for non‑milestone tasks; validates --type (idea
Removed script
scripts/create-tech-improvement-task.sh
Deleted; functionality consolidated into create-non-milestone-task.sh.
Shell strictness changes
scripts/...
scripts/activate-prd.sh, scripts/amend-task.sh, scripts/archive-prd.sh, scripts/cleanup-task.sh, scripts/create-task.sh, scripts/get-pr-feedback.sh, scripts/reply-to-thread.sh, scripts/start-task.sh, scripts/submit-pr.sh
Replaced set -e with set -euo pipefail across many scripts, tightening error handling; one-line behavior-preserving changes except where noted.

Sequence Diagram(s)

sequenceDiagram
    actor Dev
    participant listScript as list-tasks.sh
    participant ghCLI as gh CLI / GitHub API
    Dev->>listScript: run with --ideas / --bugs / --tech or no flag
    alt non-milestone flag provided
        listScript->>ghCLI: gh issue list --label "<label>" --state open
        ghCLI-->>listScript: issues
        listScript-->>Dev: prints non-milestone issues
    else milestone mode
        listScript->>listScript: validate active PRD file
        listScript->>ghCLI: gh issue list --milestone "<PRD-name>" --state open
        ghCLI-->>listScript: issues
        listScript-->>Dev: prints milestone issues
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through docs and scripts tonight,
Split tasks in two beneath the moonlight.
Ideas, bugs, and tech in neat rows,
Flags to call them — the workflow grows.
A tiny carrot for every new right! 🥕

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: adding documentation and script support for listing non-milestone tasks.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09feb4c and 82ce374.

📒 Files selected for processing (13)
  • docs/workflow/task-workflow.md
  • scripts/activate-prd.sh
  • scripts/amend-task.sh
  • scripts/archive-prd.sh
  • scripts/cleanup-task.sh
  • scripts/create-non-milestone-task.sh
  • scripts/create-task.sh
  • scripts/create-tech-improvement-task.sh
  • scripts/get-pr-feedback.sh
  • scripts/list-tasks.sh
  • scripts/reply-to-thread.sh
  • scripts/start-task.sh
  • scripts/submit-pr.sh
💤 Files with no reviewable changes (1)
  • scripts/create-tech-improvement-task.sh
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: packages/riviere-cli/CLAUDE.md:0-0
Timestamp: 2026-01-02T11:58:27.018Z
Learning: When modifying CLI commands in the riviere-cli tool, update the corresponding workflow prompts in docs/workflow/ directory (step-1 through step-6) to keep the extraction workflow in sync
📚 Learning: 2026-01-06T18:02:51.422Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/get-pr-feedback.sh:45-55
Timestamp: 2026-01-06T18:02:51.422Z
Learning: In shell scripts that call GraphQL APIs (e.g., scripts/get-pr-feedback.sh and similar), prefer using sed-based interpolation for GraphQL variables instead of gh api graphql's -f/-F flags. Rationale: sed-based interpolation is typically simpler and more robust in Bash contexts, avoids JSON encoding pitfalls, and keeps the script portable. Implement by building the GraphQL query as a string and substituting variables with sed or parameter expansion, ensuring proper escaping. If you must use -f/-F, provide clear justification in a comment.

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/amend-task.sh
  • scripts/reply-to-thread.sh
  • scripts/create-task.sh
  • scripts/cleanup-task.sh
  • scripts/archive-prd.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • scripts/list-tasks.sh
  • scripts/start-task.sh
  • scripts/activate-prd.sh
📚 Learning: 2026-01-06T18:13:47.289Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/reply-to-thread.sh:1-12
Timestamp: 2026-01-06T18:13:47.289Z
Learning: In shell scripts across the repository (e.g., scripts/reply-to-thread.sh), keep the code simple by not adding explicit preflight tool-availability checks for external commands (like gh or jq) when those tools would fail on first use anyway. Such checks add boilerplate without changing behavior. If you must guard against missing tools, prefer a minimal, early startup check or rely on the script failing naturally at the point of use.

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/amend-task.sh
  • scripts/reply-to-thread.sh
  • scripts/create-task.sh
  • scripts/cleanup-task.sh
  • scripts/archive-prd.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • scripts/list-tasks.sh
  • scripts/start-task.sh
  • scripts/activate-prd.sh
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Use scripts in `./scripts/` for git and GitHub operations (PRs, issues, tasks); do not use `gh` or `git` commands directly unless no script exists

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • docs/workflow/task-workflow.md
  • scripts/list-tasks.sh
📚 Learning: 2026-01-07T08:54:48.071Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-07T08:54:48.071Z
Learning: Applies to docs/workflow/**/*.sh : In shell scripts, flag and remove any variables that are extracted or assigned but never used.

Applied to files:

  • scripts/cleanup-task.sh
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps

Applied to files:

  • docs/workflow/task-workflow.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (17)
scripts/start-task.sh (1)

10-10: Strict mode looks safe here.

scripts/cleanup-task.sh (1)

7-7: LGTM: Enhanced error handling.

The addition of pipefail and nounset flags strengthens error detection. All variables in this script are properly initialized before use, making this change safe and beneficial.

scripts/reply-to-thread.sh (1)

12-12: LGTM: Strict mode applied safely.

The script uses ${1:-} and ${2:-} patterns with explicit validation, making it fully compatible with the nounset flag.

scripts/activate-prd.sh (1)

5-10: LGTM: Improved error handling and user guidance.

The strict mode change is safe given the explicit validation of $1, and the added example enhances usability.

scripts/create-non-milestone-task.sh (4)

1-20: LGTM: Clear documentation and structure.

The usage function provides comprehensive guidance on all parameters and options, making the script easy to use correctly.


22-51: LGTM: Robust type flag parsing with proper validation.

The case statement correctly maps task types to labels ("idea", "bug", "tech improvement"), ensuring consistency with the list-tasks.sh script. The explicit --type requirement and error handling for invalid values are appropriate.


53-63: LGTM: Safe parameter validation.

The validation correctly checks the five positional arguments after shift 2 has removed the --type flag and its value. The use of ${n:-} with empty defaults is safe for set -u.


65-84: LGTM: Clean issue creation with structured markdown.

The markdown body structure is clear and the variable expansion within the multi-line string will work correctly. The final gh issue create invocation properly applies the label.

scripts/list-tasks.sh (4)

1-8: LGTM: Clear documentation of dual modes.

The updated usage examples clearly distinguish milestone tasks (default) from non-milestone task categories (--ideas, --bugs, --tech).


10-46: LGTM: Well-structured mutual exclusivity enforcement.

The check_exclusive function correctly prevents multiple non-milestone flags from being specified simultaneously. Each flag is processed in sequence, and the check ensures only the first non-milestone flag can set NON_MILESTONE_LABEL. The label mappings ("idea", "bug", "tech improvement") are consistent with create-non-milestone-task.sh.


48-56: LGTM: Clean separation of non-milestone mode.

The early exit after listing non-milestone tasks ensures milestone and non-milestone modes remain mutually exclusive and simplifies the control flow.


58-83: LGTM: Simplified milestone task retrieval.

Using --milestone directly (Line 83) is cleaner than the previous label-based filtering approach and makes the intent more explicit.

scripts/archive-prd.sh (1)

5-5: LGTM! Stricter error handling improves script robustness.

The addition of -u (fail on undefined variables) and -o pipefail (propagate pipeline failures) strengthens error detection. The script safely handles all variable references and potential empty command substitutions.

docs/workflow/task-workflow.md (4)

26-27: Clear command distinction for milestone vs non-milestone tasks.

The table effectively communicates the different listing modes and their autonomous nature, aligning well with the PR's goal to separate task types.


67-93: Comprehensive task creation documentation.

The dual-template approach (PRD Task vs Non-Milestone Task) with detailed parameter descriptions provides clear guidance for both workflows. The mandatory script usage emphasis aligns with the repository's automation standards.


100-104: Clear workflow guidance for task selection and initiation.

The separation of milestone and non-milestone listing commands provides explicit guidance for the "next task" scenario. The instruction to start the task before planning ensures proper sequencing of the workflow steps.


38-60: Excellent task categorization and documentation structure.

The clear separation of Milestone vs Non-Milestone tasks with explicit list/create guidance significantly improves workflow clarity. The table mapping task types to labels and commands is particularly helpful, and the referenced scripts (list-tasks.sh, create-task.sh, create-non-milestone-task.sh) are properly implemented with the documented interfaces.


Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review

qodo-code-review Bot commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
⚪
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
⚪
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

⚪
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing command error: The new gh issue list invocations rely on set -e and do not provide a contextual,
actionable error message if gh fails (e.g., not authenticated, rate-limited, missing
binary), causing abrupt exits without explaining what to do next.

Referred Code
# Non-milestone mode: query by label only
if [[ -n "$NON_MILESTONE_LABEL" ]]; then
    echo "Non-milestone tasks: $NON_MILESTONE_LABEL"
    echo ""
    echo "Available tasks:"
    echo "----------------"
    gh issue list --label "$NON_MILESTONE_LABEL" --state open --assignee "" --json number,title --jq '.[] | "#\(.number): \(.title)"'
    exit 0

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 10, 2026 •

Copy link
Copy Markdown

Deploying living-architecture with  Cloudflare Pages  Cloudflare Pages

Latest commit: 82ce374
Status: ✅  Deploy successful!
Preview URL: https://7b4128d1.living-architecture.pages.dev
Branch Preview URL: https://non-milestone-task-listing.living-architecture.pages.dev

View logs

@qodo-code-review

qodo-code-review Bot commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
The PR removes existing functionality

The refactored script has removed the previous ability to filter milestone tasks
by a label. This functionality should be restored to prevent a regression.

Examples:

scripts/list-tasks.sh [11-72]
NON_MILESTONE_LABEL=""
while [[ $# -gt 0 ]]; do
    case $1 in
        --ideas)
            NON_MILESTONE_LABEL="idea"
            shift
            ;;
        --bugs)
            NON_MILESTONE_LABEL="bug"
            shift

 ... (clipped 52 lines)

Solution Walkthrough:

Before:

#!/bin/bash
# Usage: ./scripts/list-tasks.sh [--label <label>]

LABEL_FILTER=""
# ... parse --label argument

# Find active milestone
MILESTONE=$(...)

GH_ARGS=(issue list --milestone "$MILESTONE")
if [[ -n "$LABEL_FILTER" ]]; then
    GH_ARGS+=(--label "$LABEL_FILTER")
fi

gh "${GH_ARGS[@]}"

After:

#!/bin/bash
# Usage: ./scripts/list-tasks.sh [--ideas|--bugs|--tech]

NON_MILESTONE_LABEL=""
# ... parse --ideas, --bugs, --tech flags

if [[ -n "$NON_MILESTONE_LABEL" ]]; then
    # Query by label only
    gh issue list --label "$NON_MILESTONE_LABEL"
    exit 0
fi

# Query by milestone only
MILESTONE=$(...)
gh issue list --milestone "$MILESTONE"
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a significant functional regression where the ability to filter milestone tasks by label was removed, which is a considerable loss of utility in a core workflow script.

Medium
General
✅ Enable pipefail for safety
Suggestion Impact:The script's shell options were updated to include pipefail (via `set -euo pipefail`), improving robustness as suggested.

code diff:

-set -e
+set -euo pipefail
 

Add set -o pipefail to the script to ensure that a pipeline returns a non-zero
exit code if any command in it fails.

scripts/list-tasks.sh [8]

 set -e
+set -o pipefail

[Suggestion processed]

Suggestion importance[1-10]: 7

__

Why: The suggestion improves script robustness by ensuring that failures within a command pipeline are caught, preventing the script from silently failing or producing incorrect output.

Medium
✅ Remove unnecessary escape slashes
Suggestion Impact:The commit removed the escaped pipe usage by rewriting the documentation examples to avoid pipe characters entirely (using separate option examples like `--ideas` (or `--bugs`, `--tech`)), improving readability and eliminating the need for backslash escapes.

code diff:

-| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas\|--bugs\|--tech` | Autonomous |
+| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas` (or `--bugs`, `--tech`) | Autonomous |
 | Start Task | `./scripts/start-task.sh <issue-number>` | **User confirmation required** |
 | Amend Task | `./scripts/amend-task.sh <issue-number> "Amendment"` | Autonomous |
 | Complete Task | `/complete-task` | Autonomous |
@@ -55,7 +55,7 @@
 | Bugs | `bug` | `./scripts/list-tasks.sh --bugs` |
 | Tech Improvements | `tech improvement` | `./scripts/list-tasks.sh --tech` |
 
-- **Create:** `./scripts/create-tech-improvement-task.sh` (applies appropriate label)
+- **Create:** `./scripts/create-non-milestone-task.sh --type <idea|bug|tech>`
 - **When:** Fixes, refactoring, tech debt, performance, exploratory work
 
 ---
@@ -72,10 +72,10 @@
 
 Body must contain all 10 sections (see `/create-tasks` skill documentation).
 
-### Tech Improvement Task
+### Non-Milestone Task
 
 ```bash
-./scripts/create-tech-improvement-task.sh \
+./scripts/create-non-milestone-task.sh --type <idea|bug|tech> \
   <title> \
   <references> \
   <summary> \
@@ -84,6 +84,7 @@

Parameters:
+- --type - Task type: idea, bug, or tech

List Tasks — User says "next task" or asks what's available:

  • Milestone tasks: ./scripts/list-tasks.sh
    -- Non-milestone: ./scripts/list-tasks.sh --ideas|--bugs|--tech
    +- Non-milestone: ./scripts/list-tasks.sh --ideas (or --bugs, --tech)

</details>


___

**Remove unnecessary backslash escapes for pipe characters within the code block <br>in the documentation table.**

[docs/workflow/task-workflow.md [27]](https://github.com/NTCoding/living-architecture/pull/115/files#diff-2fb2b5fa99263519fcf91d82be44e6e9fc78cf46a550a84b2a51a23771c273d4R27-R27)

```diff
-| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas\|--bugs\|--tech` | Autonomous |
+| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas|--bugs|--tech` | Autonomous |

[Suggestion processed]

Suggestion importance[1-10]: 4

__

Why: The suggestion correctly identifies and removes unnecessary escape characters in a code block, improving the readability and correctness of the documentation.

Low
Possible issue
✅ Enforce mutually exclusive command-line flags
Suggestion Impact:Added a shared check_exclusive function that errors if NON_MILESTONE_LABEL is already set, and invoked it in each of the --ideas/--bugs/--tech cases to prevent multiple flags being used together.

code diff:

+set -euo pipefail
 
 # Parse arguments
 NON_MILESTONE_LABEL=""
+
+check_exclusive() {
+    if [[ -n "$NON_MILESTONE_LABEL" ]]; then
+        echo "Error: Only one of --ideas, --bugs, or --tech can be specified" >&2
+        exit 1
+    fi
+}
+
 while [[ $# -gt 0 ]]; do
     case $1 in
         --ideas)
+            check_exclusive
             NON_MILESTONE_LABEL="idea"
             shift
             ;;
         --bugs)
+            check_exclusive
             NON_MILESTONE_LABEL="bug"
             shift
             ;;
         --tech)
+            check_exclusive
             NON_MILESTONE_LABEL="tech improvement"
             shift

Add a check to the argument parsing logic to ensure that only one of the
--ideas, --bugs, or --tech flags can be used at a time, exiting with an error if
more than one is provided.

scripts/list-tasks.sh [10-35]

 # Parse arguments
 NON_MILESTONE_LABEL=""
 while [[ $# -gt 0 ]]; do
     case $1 in
         --ideas)
+            if [[ -n "$NON_MILESTONE_LABEL" ]]; then
+                echo "Error: Only one of --ideas, --bugs, or --tech can be specified." >&2
+                exit 1
+            fi
             NON_MILESTONE_LABEL="idea"
             shift
             ;;
         --bugs)
+            if [[ -n "$NON_MILESTONE_LABEL" ]]; then
+                echo "Error: Only one of --ideas, --bugs, or --tech can be specified." >&2
+                exit 1
+            fi
             NON_MILESTONE_LABEL="bug"
             shift
             ;;
         --tech)
+            if [[ -n "$NON_MILESTONE_LABEL" ]]; then
+                echo "Error: Only one of --ideas, --bugs, or --tech can be specified." >&2
+                exit 1
+            fi
             NON_MILESTONE_LABEL="tech improvement"
             shift
             ;;
         *)
             echo "Unknown option: $1" >&2
             echo "Usage: ./scripts/list-tasks.sh              # Milestone tasks" >&2
             echo "       ./scripts/list-tasks.sh --ideas      # Ideas" >&2
             echo "       ./scripts/list-tasks.sh --bugs       # Bugs" >&2
             echo "       ./scripts/list-tasks.sh --tech       # Tech improvements" >&2
             exit 1
             ;;
     esac
 done

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that multiple flags can be passed, leading to unexpected behavior, and provides a robust solution to enforce mutual exclusivity.

Low
✅ Correct invalid command in documentation
Suggestion Impact:The documentation was updated to replace `./scripts/list-tasks.sh --ideas|--bugs|--tech` with a valid example using one flag, and clarifying alternatives (e.g., `--ideas` or `--bugs`, `--tech`) in both the command table and the "List Tasks" section.

code diff:

-| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas\|--bugs\|--tech` | Autonomous |
+| List Non-Milestone Tasks | `./scripts/list-tasks.sh --ideas` (or `--bugs`, `--tech`) | Autonomous |
 | Start Task | `./scripts/start-task.sh <issue-number>` | **User confirmation required** |
 | Amend Task | `./scripts/amend-task.sh <issue-number> "Amendment"` | Autonomous |
 | Complete Task | `/complete-task` | Autonomous |
@@ -55,7 +55,7 @@
 | Bugs | `bug` | `./scripts/list-tasks.sh --bugs` |
 | Tech Improvements | `tech improvement` | `./scripts/list-tasks.sh --tech` |
 
-- **Create:** `./scripts/create-tech-improvement-task.sh` (applies appropriate label)
+- **Create:** `./scripts/create-non-milestone-task.sh --type <idea|bug|tech>`
 - **When:** Fixes, refactoring, tech debt, performance, exploratory work
 
 ---
@@ -72,10 +72,10 @@
 
 Body must contain all 10 sections (see `/create-tasks` skill documentation).
 
-### Tech Improvement Task
+### Non-Milestone Task
 
 ```bash
-./scripts/create-tech-improvement-task.sh \
+./scripts/create-non-milestone-task.sh --type <idea|bug|tech> \
   <title> \
   <references> \
   <summary> \
@@ -84,6 +84,7 @@

Parameters:
+- --type - Task type: idea, bug, or tech

List Tasks — User says "next task" or asks what's available:

  • Milestone tasks: ./scripts/list-tasks.sh
    -- Non-milestone: ./scripts/list-tasks.sh --ideas|--bugs|--tech
    +- Non-milestone: ./scripts/list-tasks.sh --ideas (or --bugs, --tech)

</details>


___

**Correct the invalid example command for listing non-milestone tasks by replacing <br>the pipe-separated flags with a clearer instruction and a single valid example.**

[docs/workflow/task-workflow.md [99-101]](https://github.com/NTCoding/living-architecture/pull/115/files#diff-2fb2b5fa99263519fcf91d82be44e6e9fc78cf46a550a84b2a51a23771c273d4R99-R101)

```diff
 **List Tasks** — User says "next task" or asks what's available:
 - Milestone tasks: `./scripts/list-tasks.sh`
-- Non-milestone: `./scripts/list-tasks.sh --ideas|--bugs|--tech`
+- Non-milestone: Use the appropriate flag, e.g., `./scripts/list-tasks.sh --ideas`

[Suggestion processed]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly points out that the example command using | is invalid shell syntax and would confuse users, and the proposed change makes the documentation clearer and more accurate.

Low
  • Update

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @docs/workflow/task-workflow.md:
- Around line 58-59: The doc currently claims
./scripts/create-tech-improvement-task.sh "applies appropriate label" for all
non-milestone tasks but that script only creates tech improvements; update the
wording or examples to cover Ideas and Bugs by either (A) adding the missing
scripts and names (e.g., create-idea-task.sh and create-bug-task.sh) and listing
them alongside create-tech-improvement-task.sh, or (B) explicitly noting that
create-tech-improvement-task.sh only creates Tech Improvement tasks and adding a
short instruction for creating Ideas and Bugs (e.g., use the corresponding
create-idea/create-bug script or the generic task creation command and the label
argument). Be sure to reference the create-tech-improvement-task.sh script name
and the Idea/Bug categories so readers can find and run the correct script or
follow the alternative creation steps.

In @scripts/list-tasks.sh:
- Around line 37-45: The non-milestone branch using the NON_MILESTONE_LABEL
variable doesn't exclude issues that have a milestone and prints the raw label
as the header; update the gh issue list invocation in that branch to include
--milestone "" so only issues without milestones are returned, and replace the
raw header echo with a small case statement on NON_MILESTONE_LABEL that maps
known labels (e.g., "idea", "bug", "tech improvement") to user-friendly display
names (e.g., "Ideas", "Bugs", "Tech Improvements") and echo that friendly name
before running the gh issue list command.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7337cd1 and 09feb4c.

📒 Files selected for processing (2)
  • docs/workflow/task-workflow.md
  • scripts/list-tasks.sh
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Use scripts in `./scripts/` for git and GitHub operations (PRs, issues, tasks); do not use `gh` or `git` commands directly unless no script exists

Applied to files:

  • scripts/list-tasks.sh
  • docs/workflow/task-workflow.md
📚 Learning: 2026-01-06T18:02:51.422Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/get-pr-feedback.sh:45-55
Timestamp: 2026-01-06T18:02:51.422Z
Learning: In shell scripts that call GraphQL APIs (e.g., scripts/get-pr-feedback.sh and similar), prefer using sed-based interpolation for GraphQL variables instead of gh api graphql's -f/-F flags. Rationale: sed-based interpolation is typically simpler and more robust in Bash contexts, avoids JSON encoding pitfalls, and keeps the script portable. Implement by building the GraphQL query as a string and substituting variables with sed or parameter expansion, ensuring proper escaping. If you must use -f/-F, provide clear justification in a comment.

Applied to files:

  • scripts/list-tasks.sh
📚 Learning: 2026-01-06T18:13:47.289Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/reply-to-thread.sh:1-12
Timestamp: 2026-01-06T18:13:47.289Z
Learning: In shell scripts across the repository (e.g., scripts/reply-to-thread.sh), keep the code simple by not adding explicit preflight tool-availability checks for external commands (like gh or jq) when those tools would fail on first use anyway. Such checks add boilerplate without changing behavior. If you must guard against missing tools, prefer a minimal, early startup check or rely on the script failing naturally at the point of use.

Applied to files:

  • scripts/list-tasks.sh
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps

Applied to files:

  • docs/workflow/task-workflow.md

Comment thread docs/workflow/task-workflow.md Outdated
Comment thread scripts/list-tasks.sh
- Add `set -euo pipefail` to all bash scripts for safer pipeline handling
- Rename create-tech-improvement-task.sh to create-non-milestone-task.sh
- Add --type flag (idea|bug|tech) to create-non-milestone-task.sh
- Add mutual exclusivity check to list-tasks.sh flags
- Update docs with clearer command examples

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
scripts/create-task.sh (1)

5-10: set -u can bypass your usage check by erroring on $1/$2/$3.

With nounset enabled, the script may exit before printing usage when args are missing. Use ${N:-} in the check.

Proposed fix
 set -euo pipefail

-if [[ -z "$1" || -z "$2" || -z "$3" ]]; then
+if [[ -z "${1:-}" || -z "${2:-}" || -z "${3:-}" ]]; then
     echo "Usage: ./scripts/create-task.sh <milestone> <title> <body>" >&2
     exit 1
 fi
scripts/submit-pr.sh (1)

7-33: Guard --title/--body values now that set -u is enabled.

Today --title (or --body) without a following value can abort via nounset, skipping your usage output.

Proposed fix
 while [[ $# -gt 0 ]]; do
     case $1 in
         --title)
+            if [[ $# -lt 2 || -z "${2:-}" ]]; then
+                echo "Error: --title requires a value" >&2
+                exit 1
+            fi
             TITLE="$2"
             MODE="create"
             shift 2
             ;;
         --body)
+            if [[ $# -lt 2 || -z "${2:-}" ]]; then
+                echo "Error: --body requires a value" >&2
+                exit 1
+            fi
             BODY="$2"
             shift 2
             ;;

Also: this file’s “Verify required tools are available” block conflicts with the repo preference to avoid preflight checks for gh/jq (fail on first use instead). Based on learnings.

scripts/get-pr-feedback.sh (1)

13-21: Strict mode is fine here; GraphQL interpolation approach is consistent with repo practice.

Optional: consider dropping the gh/jq preflight command -v loop to match the repo’s “fail on first use” scripting style. Based on learnings.

scripts/amend-task.sh (1)

5-10: set -u can cause an “unbound variable” before your usage check runs.

Use ${N:-} for positional parameters in the validation.

Proposed fix
 set -euo pipefail

-if [[ -z "$1" || -z "$2" ]]; then
+if [[ -z "${1:-}" || -z "${2:-}" ]]; then
     echo "Usage: ./scripts/amend-task.sh <issue-number> \"Amendment content\"" >&2
     exit 1
 fi
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09feb4c and 82ce374.

📒 Files selected for processing (13)
  • docs/workflow/task-workflow.md
  • scripts/activate-prd.sh
  • scripts/amend-task.sh
  • scripts/archive-prd.sh
  • scripts/cleanup-task.sh
  • scripts/create-non-milestone-task.sh
  • scripts/create-task.sh
  • scripts/create-tech-improvement-task.sh
  • scripts/get-pr-feedback.sh
  • scripts/list-tasks.sh
  • scripts/reply-to-thread.sh
  • scripts/start-task.sh
  • scripts/submit-pr.sh
💤 Files with no reviewable changes (1)
  • scripts/create-tech-improvement-task.sh
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: packages/riviere-cli/CLAUDE.md:0-0
Timestamp: 2026-01-02T11:58:27.018Z
Learning: When modifying CLI commands in the riviere-cli tool, update the corresponding workflow prompts in docs/workflow/ directory (step-1 through step-6) to keep the extraction workflow in sync
📚 Learning: 2026-01-06T18:02:51.422Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/get-pr-feedback.sh:45-55
Timestamp: 2026-01-06T18:02:51.422Z
Learning: In shell scripts that call GraphQL APIs (e.g., scripts/get-pr-feedback.sh and similar), prefer using sed-based interpolation for GraphQL variables instead of gh api graphql's -f/-F flags. Rationale: sed-based interpolation is typically simpler and more robust in Bash contexts, avoids JSON encoding pitfalls, and keeps the script portable. Implement by building the GraphQL query as a string and substituting variables with sed or parameter expansion, ensuring proper escaping. If you must use -f/-F, provide clear justification in a comment.

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/amend-task.sh
  • scripts/reply-to-thread.sh
  • scripts/create-task.sh
  • scripts/cleanup-task.sh
  • scripts/archive-prd.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • scripts/list-tasks.sh
  • scripts/start-task.sh
  • scripts/activate-prd.sh
📚 Learning: 2026-01-06T18:13:47.289Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 58
File: scripts/reply-to-thread.sh:1-12
Timestamp: 2026-01-06T18:13:47.289Z
Learning: In shell scripts across the repository (e.g., scripts/reply-to-thread.sh), keep the code simple by not adding explicit preflight tool-availability checks for external commands (like gh or jq) when those tools would fail on first use anyway. Such checks add boilerplate without changing behavior. If you must guard against missing tools, prefer a minimal, early startup check or rely on the script failing naturally at the point of use.

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/amend-task.sh
  • scripts/reply-to-thread.sh
  • scripts/create-task.sh
  • scripts/cleanup-task.sh
  • scripts/archive-prd.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • scripts/list-tasks.sh
  • scripts/start-task.sh
  • scripts/activate-prd.sh
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Use scripts in `./scripts/` for git and GitHub operations (PRs, issues, tasks); do not use `gh` or `git` commands directly unless no script exists

Applied to files:

  • scripts/get-pr-feedback.sh
  • scripts/create-non-milestone-task.sh
  • scripts/submit-pr.sh
  • docs/workflow/task-workflow.md
  • scripts/list-tasks.sh
📚 Learning: 2026-01-07T08:54:48.071Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-07T08:54:48.071Z
Learning: Applies to docs/workflow/**/*.sh : In shell scripts, flag and remove any variables that are extracted or assigned but never used.

Applied to files:

  • scripts/cleanup-task.sh
📚 Learning: 2026-01-10T10:14:57.499Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-10T10:14:57.499Z
Learning: Follow the task workflow defined in `docs/workflow/task-workflow.md` from start to finish for all tasks; do not make changes or commit code without following these steps

Applied to files:

  • docs/workflow/task-workflow.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (17)
scripts/start-task.sh (1)

10-10: Strict mode looks safe here.

scripts/cleanup-task.sh (1)

7-7: LGTM: Enhanced error handling.

The addition of pipefail and nounset flags strengthens error detection. All variables in this script are properly initialized before use, making this change safe and beneficial.

scripts/reply-to-thread.sh (1)

12-12: LGTM: Strict mode applied safely.

The script uses ${1:-} and ${2:-} patterns with explicit validation, making it fully compatible with the nounset flag.

scripts/activate-prd.sh (1)

5-10: LGTM: Improved error handling and user guidance.

The strict mode change is safe given the explicit validation of $1, and the added example enhances usability.

scripts/create-non-milestone-task.sh (4)

1-20: LGTM: Clear documentation and structure.

The usage function provides comprehensive guidance on all parameters and options, making the script easy to use correctly.


22-51: LGTM: Robust type flag parsing with proper validation.

The case statement correctly maps task types to labels ("idea", "bug", "tech improvement"), ensuring consistency with the list-tasks.sh script. The explicit --type requirement and error handling for invalid values are appropriate.


53-63: LGTM: Safe parameter validation.

The validation correctly checks the five positional arguments after shift 2 has removed the --type flag and its value. The use of ${n:-} with empty defaults is safe for set -u.


65-84: LGTM: Clean issue creation with structured markdown.

The markdown body structure is clear and the variable expansion within the multi-line string will work correctly. The final gh issue create invocation properly applies the label.

scripts/list-tasks.sh (4)

1-8: LGTM: Clear documentation of dual modes.

The updated usage examples clearly distinguish milestone tasks (default) from non-milestone task categories (--ideas, --bugs, --tech).


10-46: LGTM: Well-structured mutual exclusivity enforcement.

The check_exclusive function correctly prevents multiple non-milestone flags from being specified simultaneously. Each flag is processed in sequence, and the check ensures only the first non-milestone flag can set NON_MILESTONE_LABEL. The label mappings ("idea", "bug", "tech improvement") are consistent with create-non-milestone-task.sh.


48-56: LGTM: Clean separation of non-milestone mode.

The early exit after listing non-milestone tasks ensures milestone and non-milestone modes remain mutually exclusive and simplifies the control flow.


58-83: LGTM: Simplified milestone task retrieval.

Using --milestone directly (Line 83) is cleaner than the previous label-based filtering approach and makes the intent more explicit.

scripts/archive-prd.sh (1)

5-5: LGTM! Stricter error handling improves script robustness.

The addition of -u (fail on undefined variables) and -o pipefail (propagate pipeline failures) strengthens error detection. The script safely handles all variable references and potential empty command substitutions.

docs/workflow/task-workflow.md (4)

26-27: Clear command distinction for milestone vs non-milestone tasks.

The table effectively communicates the different listing modes and their autonomous nature, aligning well with the PR's goal to separate task types.


67-93: Comprehensive task creation documentation.

The dual-template approach (PRD Task vs Non-Milestone Task) with detailed parameter descriptions provides clear guidance for both workflows. The mandatory script usage emphasis aligns with the repository's automation standards.


100-104: Clear workflow guidance for task selection and initiation.

The separation of milestone and non-milestone listing commands provides explicit guidance for the "next task" scenario. The instruction to start the task before planning ensures proper sequencing of the workflow steps.


38-60: Excellent task categorization and documentation structure.

The clear separation of Milestone vs Non-Milestone tasks with explicit list/create guidance significantly improves workflow clarity. The table mapping task types to labels and commands is particularly helpful, and the referenced scripts (list-tasks.sh, create-task.sh, create-non-milestone-task.sh) are properly implemented with the documented interfaces.

@NTCoding
NTCoding merged commit 83eb516 into main Jan 10, 2026
17 checks passed
NTCoding added a commit that referenced this pull request Jan 10, 2026
Add new review-feedback-checks.md convention file that captures patterns
learned from external PR reviews (CodeRabbit, human reviewers). Bug-scanner
now applies these checks to future PRs, creating a feedback loop where PR
feedback becomes automated local checks.

Initial checks (RFC-001 through RFC-003) from PR #115:
- Documentation-to-code consistency
- User-friendly display names
- Query filtering completeness

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant