Skip to content

feat(complete-task): implement parallel review pipeline with bug-scanner - #85

Merged
NTCoding merged 2 commits into
mainfrom
parallel-review-pipeline
Jan 9, 2026
Merged

NTCoding merged 2 commits into
mainfrom
parallel-review-pipeline

Conversation

@NTCoding

@NTCoding NTCoding commented Jan 9, 2026 •

Copy link
Copy Markdown
Owner

User description

Implements parallel execution architecture for code review agents to improve throughput and separate concerns.

Changes

Architecture

  • Run code-review, bug-scanner, and task-check agents in parallel using multiple Task tool calls
  • Each agent writes its complete report to reviews/<branch>/<agent-name>.md
  • Agents return only PASS/FAIL status for fast evaluation
  • Main agent reads report files only when failures occur

New Agents

  • bug-scanner - Dedicated agent for bugs, framework misuse, dangerous config changes, and security issues
  • post-merge-completion - Command for reflecting on completed tasks and cleaning up worktrees

Storage

  • Review reports stored in reviews/<branch>/ directory
  • Task-check marker moved from /tmp/ to reviews/<branch>/task-check.marker
  • Documentation suggestions captured in doc-suggestions.md for reflection step
  • Added reviews/ to .gitignore

Bug Scanner Scope

Scans for:

  • Runtime bugs (null refs, off-by-one, race conditions, resource leaks)
  • Framework misuse (React hooks, lifecycle issues, anti-patterns)
  • Dangerous config changes (breaking deploys, data loss, security regression)
  • Security issues (auth bypass, injection, exposed secrets)

Benefits

  • Faster: Parallel execution reduces wall-clock time
  • Focused: Each agent has clear, non-overlapping responsibilities
  • Auditable: Full reports preserved for review and reflection
  • Reflective: Post-merge process identifies improvement opportunities

Test Plan

  • Verify submit-pr.sh creates PR with correct title and body
  • CI passes (CodeRabbit, Semgrep, CodeQL, tests)
  • Review the PR and verify all changes are documented

PR Type

Enhancement


Description

  • Implements parallel execution architecture for code review agents

    • Runs code-review, bug-scanner, and task-check agents simultaneously
    • Each agent writes complete report to reviews/<branch>/ directory
    • Agents return only PASS/FAIL status for fast evaluation
  • Introduces new bug-scanner agent for dedicated bug and security scanning

    • Scans for runtime bugs, framework misuse, dangerous config changes, security issues
    • Separates bug detection from general code review concerns
  • Adds post-merge-completion command for task reflection and cleanup

    • Analyzes feedback patterns and suggests process improvements
    • Gathers insights from local reviews, PR feedback, and git history
  • Reorganizes task-check marker storage from /tmp/ to reviews/<branch>/

    • Improves organization and persistence of review artifacts

Diagram Walkthrough

flowchart LR
  A["Verify Gate"] --> B["Setup reviews folder"]
  B --> C["Determine agents to run"]
  C --> D["Run agents in parallel"]
  D --> E["code-review.md"]
  D --> F["bug-scanner.md"]
  D --> G["task-check.md"]
  E --> H["Evaluate results"]
  F --> H
  G --> H
  H --> I{All PASS?}
  I -->|Yes| J["Submit PR"]
  I -->|No| K["Report findings"]
  J --> L["Resolve CodeRabbit feedback"]
  L --> M["PR Ready"]
  M --> N["post-merge-completion"]
  N --> O["Reflect & suggest improvements"]
  O --> P["Cleanup worktree"]
Loading

File Walkthrough

Relevant files
Enhancement
bug-scanner.md
New bug-scanner agent with comprehensive issue detection 

.claude/agents/bug-scanner.md

  • New agent dedicated to scanning for bugs, security issues, framework
    misuse, and dangerous config changes
  • Defines four priority levels: bug patterns, framework misuse,
    dangerous config changes, and security issues
  • Includes detailed patterns for silent error swallowing, type
    assertions, async errors, race conditions, and logic errors
  • Captures documentation suggestions in separate file for post-merge
    reflection
  • Returns only PASS/FAIL status with full report written to file
+234/-0 
code-review.md
Refactor code-review to separate concerns from bug-scanner

.claude/agents/code-review.md

  • Clarifies that code-review focuses on semantic review and project
    conventions
  • Removes duplicate bug scanning responsibility (now handled by
    bug-scanner agent)
  • Updates output format to write complete report to file path provided
    in prompt
  • Changes return value to only PASS/FAIL status without summarizing
    findings
  • Includes evaluation framework in report file instead of return message
+14/-9   
complete-task.md
Redesign complete-task for parallel agent execution           

.claude/commands/complete-task.md

  • Redesigns pipeline to run code-review, bug-scanner, and task-check
    agents in parallel
  • Adds setup step to create reviews// folder and determine which agents
    to run
  • Implements parallel execution using single message with multiple Task
    tool calls
  • Moves task-check marker from /tmp/ to reviews//task-check.marker
  • Adds comprehensive fix-or-report decision framework for handling agent
    failures
  • Restructures instructions with numbered sections and clearer
    formatting
  • Updates success message to reference review reports in reviews//
    directory
+223/-99
post-merge-completion.md
New post-merge-completion command for reflection and cleanup

.claude/commands/post-merge-completion.md

  • New command for post-merge reflection and cleanup workflow
  • Verifies PR is merged before proceeding
  • Gathers feedback from local review reports, PR feedback, and git
    history
  • Identifies patterns and suggests process improvements with priority
    levels
  • Presents structured reflection with feedback summary and action items
  • Handles user choices to implement improvements, create issues, or skip
  • Runs cleanup script and reports completion status
+164/-0 
Documentation
task-workflow.md
Update task workflow documentation for post-merge-completion

docs/workflow/task-workflow.md

  • Updates task workflow table to replace "Cleanup Task" with "Post-Merge
    Completion"
  • Changes command from ./scripts/cleanup-task.sh to
    /post-merge-completion
  • Updates description to reflect new reflection and improvement
    suggestion functionality
  • Clarifies that post-merge-completion runs after PR is merged
+2/-2     

Summary by CodeRabbit

  • New Features

    • Added a post-merge completion workflow for reflection, suggestions, and cleanup.
  • Process Improvements

    • Parallelized review pipeline so multiple checks run concurrently for faster feedback.
    • Introduced a dedicated automated bug scanner alongside code review.
    • Standardized review outputs to write full reports to files with clear PASS/FAIL results.
  • Documentation

    • Updated workflow docs and added agent guidance and review-run instructions.
    • Ignored local review output directory.

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

Implements parallel execution architecture for code review agents:
- Run code-review, bug-scanner, and task-check in parallel
- Each agent writes to reviews/<branch>/ directory
- New bug-scanner agent for bugs, framework misuse, config changes, security
- New /post-merge-completion command for reflection and cleanup
- Task-check marker moved to reviews/ folder for better organization

This improves review throughput and separates concerns between agents.

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

coderabbitai Bot commented Jan 9, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a new bug-scanner agent specification, refactors code-review to file-based reporting, reworks complete-task to run code-review, bug-scanner, and task-check in parallel with centralized reports, introduces post-merge-completion workflow, and ignores the local reviews/ directory.

Changes

Cohort / File(s) Summary
Agent specifications
.claude/agents/bug-scanner.md, .claude/agents/code-review.md
New bug-scanner spec for static-analysis-style scanning of uncommitted changes with prioritized issue formats and PASS/FAIL output; code-review refactored to avoid duplicating bug scanning, requires full report written to file and defines an evaluation framework.
Command orchestration
.claude/commands/complete-task.md, .claude/commands/post-merge-completion.md
complete-task reorganized to create reviews/<branch>/, determine skips, and run code-review, bug-scanner, and task-check in parallel with consolidated report handling and decision logic; new post-merge-completion command added for post-merge reflection, feedback aggregation, suggestions, and cleanup.
Config & docs
.gitignore, docs/workflow/task-workflow.md
Added reviews/ to .gitignore; updated task workflow docs to replace the "Cleanup Task" step with the new Post-Merge Completion flow.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Orchestrator as complete-task
    participant CodeReview as code-review agent
    participant BugScanner as bug-scanner agent
    participant TaskCheck as task-check agent
    participant Reports as reviews/<branch>/

    User->>Orchestrator: invoke /complete-task
    Orchestrator->>Orchestrator: create reviews/<branch>/, determine skips

    par Parallel Agent Execution
        Orchestrator->>CodeReview: run with diff
        Orchestrator->>BugScanner: run with diff
        Orchestrator->>TaskCheck: run with context
    and
        CodeReview->>Reports: write CODE REVIEW: PASS/FAIL + report file
        BugScanner->>Reports: write BUG SCANNER: PASS/FAIL + report file
        TaskCheck->>Reports: write TASK CHECK: PASS/FAIL + report file
    end

    Orchestrator->>Orchestrator: evaluate agent results
    alt all PASS
        Orchestrator->>Reports: create success marker
        Orchestrator->>User: PR ready-to-merge
    else any FAIL
        Orchestrator->>Reports: read failed reports
        Orchestrator->>User: consolidated failure output + next steps
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through diffs and found a plan,

Three agents sprinting, each with a scan,
Reports in a folder, neat and grand,
Post-merge reflections, tidy and planned,
A rabbit cheers for workflows well-manned 🥕✨

🚥 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 summarizes the main change: implementing a parallel review pipeline with bug-scanner agent. It's concise, specific, and directly relates to the primary objective of the PR.

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


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

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying living-architecture with  Cloudflare Pages  Cloudflare Pages

Latest commit: a4d1e52
Status: ✅  Deploy successful!
Preview URL: https://89d2c4c6.living-architecture.pages.dev
Branch Preview URL: https://parallel-review-pipeline.living-architecture.pages.dev

View logs

@qodo-code-review

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

Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
⚪
Shell injection risk

Description: Unquoted use of BRANCH=$(git branch --show-current) in shell commands (e.g., mkdir -p
reviews/$BRANCH and date > reviews//task-check.marker) can enable shell/path injection or
path traversal if a maliciously named branch contains metacharacters or ../, potentially
writing files outside reviews/ or altering command behavior.
complete-task.md [62-129]

Referred Code
```bash
BRANCH=$(git branch --show-current)
mkdir -p reviews/$BRANCH

Determine which agents to run:

Agent Skip Condition
code-review --feedback-rejected flag passed
bug-scanner Never skipped
task-check Marker exists: reviews/<branch>/task-check.marker OR no issue number in branch

Extract issue number from branch pattern: issue-<NUMBER>-...
If no issue number found → skip task-check.

3. Parallel Review Agents

Launch all applicable agents IN PARALLEL using a single message with multiple Task tool calls.

For each agent, include in the prompt:

... (clipped 47 lines)


</details></details></td></tr>
<tr><td colspan='2'><strong>Ticket Compliance</strong></td></tr>
<tr><td>⚪</td><td><details><summary>🎫 <strong>No ticket provided </strong></summary>


- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->

</details></td></tr>
<tr><td colspan='2'><strong>Codebase Duplication Compliance</strong></td></tr>
<tr><td>⚪</td><td><details><summary><strong>Codebase context is not defined </strong></summary>


Follow the <a href='https://qodo-merge-docs.qodo.ai/core-abilities/rag_context_enrichment/'>guide</a> to enable codebase context checks.

</details></td></tr>
<tr><td colspan='2'><strong>Custom Compliance</strong></td></tr>
<tr><td rowspan=2>🟢</td><td>
<details><summary><strong>Generic: Comprehensive Audit Trails</strong></summary><br>

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

**Status:** Passed<br>


> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>
<tr><td>
<details><summary><strong>Generic: Meaningful Naming and Self-Documenting Code</strong></summary><br>

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

**Status:** Passed<br>


> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>
<tr><td rowspan=1>🔴</td>
<td><details>
<summary><strong>Generic: Security-First Input Validation and Data Handling</strong></summary><br>

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

**Status:** <br><a href='https://github.com/NTCoding/living-architecture/pull/85/files#diff-88b74063e5ffc2b78fd168bf51d174ab027e7e9faa28d4129452a7b9d2d405a9R62-R65'><strong>Unquoted branch usage</strong></a>: The new shell commands interpolate <code>BRANCH</code> into filesystem paths without <br>quoting/sanitization (e.g., <code>mkdir -p reviews/$BRANCH</code> and redirects to <br><code>reviews/&lt;branch&gt;/...</code>), enabling path/word-splitting/globbing issues with unusual <br>branch names.<br>
<details open><summary>Referred Code</summary>

```markdown
```bash
BRANCH=$(git branch --show-current)
mkdir -p reviews/$BRANCH

</details>

> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>
<tr><td rowspan=3>⚪</td>
<td><details>
<summary><strong>Generic: Robust Error Handling and Edge Case Management</strong></summary><br>

**Objective:** Ensure comprehensive error handling that provides meaningful context and graceful <br>degradation<br>

**Status:** <br><a href='https://github.com/NTCoding/living-architecture/pull/85/files#diff-88b74063e5ffc2b78fd168bf51d174ab027e7e9faa28d4129452a7b9d2d405a9R62-R66'><strong>Missing error checks</strong></a>: The new shell workflow uses <code>git branch --show-current</code> and <code>mkdir -p reviews/$BRANCH</code> without <br>documenting/handling failures or edge cases (e.g., detached HEAD, empty branch name, mkdir <br>failure).<br>
<details open><summary>Referred Code</summary>

```markdown
```bash
BRANCH=$(git branch --show-current)
mkdir -p reviews/$BRANCH

</details>

> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>
<tr><td><details>
<summary><strong>Generic: Secure Error Handling</strong></summary><br>

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

**Status:** <br><a href='https://github.com/NTCoding/living-architecture/pull/85/files#diff-88b74063e5ffc2b78fd168bf51d174ab027e7e9faa28d4129452a7b9d2d405a9R50-R58'><strong>Raw errors exposed</strong></a>: The instructions require returning/pasting complete raw tool outputs on failures, which <br>may expose internal paths or sensitive details to the end user depending on what commands <br>print.<br>
<details open><summary>Referred Code</summary>

```markdown
- FAIL → return:
  ```text
  VERIFY GATE FAILED
  <raw-output>
  [paste the COMPLETE error output here - do not summarize]
  </raw-output>
  NEXT STEPS: Fix the errors and re-run /complete-task
  LOOP CONTROL: If this is your third successive attempt, ask the user for help.

</details>

> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>
<tr><td><details>
<summary><strong>Generic: Secure Logging Practices</strong></summary><br>

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

**Status:** <br><a href='https://github.com/NTCoding/living-architecture/pull/85/files#diff-88b74063e5ffc2b78fd168bf51d174ab027e7e9faa28d4129452a7b9d2d405a9R50-R168'><strong>Unredacted outputs</strong></a>: The updated workflow instructs emitting full raw outputs (verify gate and submit-pr) <br>verbatim, which can inadvertently include tokens, secrets, or other sensitive data <br>depending on environment/tooling.<br>
<details open><summary>Referred Code</summary>

```markdown
- FAIL → return:
  ```text
  VERIFY GATE FAILED
  <raw-output>
  [paste the COMPLETE error output here - do not summarize]
  </raw-output>
  NEXT STEPS: Fix the errors and re-run /complete-task
  LOOP CONTROL: If this is your third successive attempt, ask the user for help.

2. Setup and Determine Agents to Run

BRANCH=$(git branch --show-current)
mkdir -p reviews/$BRANCH

Determine which agents to run:

Agent Skip Condition

... (clipped 98 lines)


</details>

> Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a>
</details></td></tr>

<tr><td align="center" colspan="2">

- [ ] Update <!-- /compliance --update_compliance=true -->

</td></tr></tbody></table>
<details><summary>Compliance status legend</summary>
🟢 - Fully Compliant<br>
🟡 - Partial Compliant<br>
🔴 - Not Compliant<br>
⚪ - Requires Further Human Verification<br>
🏷️ - Compliance label<br>
</details>

@qodo-code-review

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

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Consider splitting the bug-scanner agent

The bug-scanner agent's scope is too broad, covering bugs, framework misuse,
config changes, and security. It should be split into more focused agents, like
a separate security-scanner, to improve effectiveness and align with the PR's
goal of focused agents.

Examples:

.claude/agents/bug-scanner.md [1-234]
---
name: bug-scanner
description: Scan for bugs, dangerous config changes, security issues, and framework misuse
model: opus
color: teal
---

Scan changed files for bugs and dangerous patterns. Be paranoid - if something looks suspicious, flag it.

## Instructions

 ... (clipped 224 lines)
.claude/commands/complete-task.md [96-101]
**bug-scanner**:
```text
Scan changed files for bugs, dangerous config changes, security issues, and framework misuse.
Write your complete report to: reviews/<branch>/bug-scanner.md
Return only BUG SCANNER: PASS or BUG SCANNER: FAIL
</details>




### Solution Walkthrough:



#### Before:
```markdown
// in .claude/commands/complete-task.md
Run agents IN PARALLEL:
    ├─ code-review
    ├─ bug-scanner
    └─ task-check

// in .claude/agents/bug-scanner.md
---
name: bug-scanner
description: Scan for bugs, config changes, security issues...
---
## Priority 1: Bug Patterns
## Priority 2: Framework & Library Misuse
## Priority 3: Dangerous Config Changes
## Priority 4: Security Issues

After:

// in .claude/commands/complete-task.md
Run agents IN PARALLEL:
    ├─ code-review
    ├─ bug-scanner
    ├─ security-scanner
    └─ task-check

// in .claude/agents/bug-scanner.md
---
name: bug-scanner
description: Scan for bugs, framework misuse...
---
## Priority 1: Bug Patterns
## Priority 2: Framework & Library Misuse
...

// in .claude/agents/security-scanner.md (new file)
---
name: security-scanner
description: Scan for security issues
---
## Priority 1: Security Issues
...
Suggestion importance[1-10]: 8

__

Why: This is a significant architectural suggestion that correctly identifies how the new bug-scanner agent's broad scope contradicts the PR's stated goal of creating focused, non-overlapping agents.

Medium
General
Specify command for listing modified files

Add the specific git diff --name-only main command to the task-check agent's
instructions for generating the list of modified files.

.claude/commands/complete-task.md [116]

-Work summary: Modified files: <list of changed files>
+Work summary: Modified files: <list of changed files from 'git diff --name-only main'>
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that a crucial command, git diff --name-only main, was removed during refactoring, leaving the instructions for the task-check agent ambiguous and potentially causing it to fail.

Medium
Improve grep command for finding files

Add the -l flag to the grep commands to make them output only the names of
matching files, not the matching lines.

.claude/agents/bug-scanner.md [185-186]

-grep -r "changed-file-name" docs/ --include="*.md"
-grep -r "changed-file-name" CLAUDE.md .claude/ --include="*.md"
+grep -rl "changed-file-name" docs/ --include="*.md"
+grep -rl "changed-file-name" CLAUDE.md .claude/ --include="*.md"
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies that adding the -l flag to the grep commands will produce a cleaner, more useful list of file names instead of matching lines, improving the efficiency of the documentation check.

Low
Possible issue
Report findings from all failed agents

Clarify the failure reporting instructions to explicitly loop through and
include the reports from all failed agents, not just one.

.claude/commands/complete-task.md [148-149]

+[For each agent that failed:]
 ## [Agent Name] Findings
-[Read and include the COMPLETE contents of reviews/<branch>/<agent>.md]
+[Read and include the COMPLETE contents of reviews/<branch>/<agent-name>.md]
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies an ambiguity in the failure reporting instructions that could lead to lost information if multiple agents fail, and proposes a clear fix.

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: 10

Caution

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

⚠️ Outside diff range comments (1)
docs/workflow/task-workflow.md (1)

17-17: Update outdated cleanup reference to match post-merge workflow.

Line 17 references running cleanup-task.sh directly, but the current workflow (line 31 and line 51) expects users to run /post-merge-completion, which handles cleanup as part of its reflection and cleanup process. Following line 17's guidance bypasses the reflection step entirely.

Update line 17:

Diff
- After the PR is merged, run `cleanup-task.sh` from within the worktree to remove it
+ After the PR is merged, run `/post-merge-completion` to reflect on feedback, suggest improvements, and clean up the worktree
🤖 Fix all issues with AI agents
In @.claude/agents/bug-scanner.md:
- Around line 171-232: The doc output behavior is unclear: clarify that the file
reviews/<branch>/doc-suggestions.md should only be created when there are actual
suggestions; update the guidance around the "Output File" / doc-suggestions.md
mention to state "Write reviews/<branch>/doc-suggestions.md only if one or more
documentation suggestions are generated; do not create the file if none are
found." Also add a short note for consumers that an absent file means "no doc
suggestions" to avoid empty-file churn.
- Around line 184-187: The grep examples using the placeholder
"changed-file-name" lack explanation of how to substitute actual changed files
from the git diff referenced earlier (lines 12-16); update the docs around the
grep examples to explain that the placeholder should be replaced by each path
produced by the git diff/unstaged files command and add brief pseudo-code (a
for-loop over the output of git diff --name-only HEAD plus git ls-files --others
--exclude-standard) to show how to iterate files and call grep for each;
specifically mention replacing "changed-file-name" in the two grep lines and
reference the git diff output used to drive the loop.

In @.claude/agents/code-review.md:
- Around line 33-35: Add a brief explanatory note immediately after line 33 in
the agent definition stating that the "file path provided in the prompt" is
supplied by the /complete-task orchestrator and follows the format
reviews/<branch>/code-review.md; update the agent documentation text near that
reference to explicitly mention the orchestrator name (/complete-task) and the
expected path pattern so readers know where the path originates and what format
to expect.

In @.claude/commands/complete-task.md:
- Around line 78-120: The doc lacks error handling for Task tool
failures/timeouts when launching parallel agents; update
.claude/commands/complete-task.md (around the Parallel Review Agents section) to
add an "If any Task call fails or times out" subsection that specifies: 1)
return a clear error message naming which agent (e.g., code-review, bug-scanner,
task-check) failed and the target file (reviews/<branch>/<agent-name>.md), 2)
instruct the user they can re-run /complete-task after fixing the issue, and 3)
note that an attempt counter should increment on each failure; reference the
Task tool calls in the Agent prompts so implementers know where to add
retry/timeout handling.
- Around line 126-130: Clarify the skip logic around the task-check marker:
state explicitly that the marker (created by running `date >
reviews/<branch>/task-check.marker`) is only written when task-check actually
ran and returned PASS, and that if task-check is skipped because an issue number
is missing or because the marker already exists, no marker will be created or
re-created; keep the existing behavior (marker prevents future runs) but update
the surrounding explanation/flow text to enumerate the three cases (ran+PASS →
create marker, skipped due to existing marker → do not create, skipped due to
missing issue number → do not create) so readers understand when the
`task-check.marker` is produced.
- Around line 69-76: Update the task-check skip logic to extract the issue
number from the current branch name robustly: read the branch via git branch
--show-current, search anywhere in the branch string for a case-insensitive
pattern matching issue-<digits> (e.g. regex issue-([0-9]+) with an i flag),
capture the digits into an ISSUE_NUM variable and treat an empty ISSUE_NUM as
the condition to skip task-check; ensure you select the first match if multiple
occur and handle branches without the pattern gracefully by skipping.

In @.claude/commands/post-merge-completion.md:
- Around line 35-39: Add a verification step at the start of "step 2" in
post-merge-completion.md that checks the current branch (BRANCH=$(git branch
--show-current)) and confirms the reviews/<branch>/ directory exists and
contains the expected artifacts (code-review.md, bug-scanner.md, task-check.md,
doc-suggestions.md); if the directory or any required file is missing,
immediately fail with a clear error message explaining that complete-task must
be run before merging and list the missing files so the user knows what to
regenerate.
📜 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 91418bd and 1b81c92.

📒 Files selected for processing (6)
  • .claude/agents/bug-scanner.md
  • .claude/agents/code-review.md
  • .claude/commands/complete-task.md
  • .claude/commands/post-merge-completion.md
  • .gitignore
  • docs/workflow/task-workflow.md
🧰 Additional context used
🧠 Learnings (16)
📚 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/**/*.{ts,tsx,js,jsx,!(**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js)} : All production code must comply with anti-patterns guidelines defined in @/docs/conventions/anti-patterns.md. Violations are hard failures unless documented exceptions exist.

Applied to files:

  • .claude/agents/bug-scanner.md
📚 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/**/*.{ts,tsx,js,jsx} : Review usage of `/* v8 ignore next -- preserve */` coverage skip directives. This is only acceptable for unreachable code needed to satisfy the compiler. Most cases should be solved by extracting code or writing tests to mock behavior.

Applied to files:

  • .claude/agents/bug-scanner.md
  • .gitignore
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Avoid patterns and practices listed in `docs/conventions/anti-patterns.md`

Applied to files:

  • .claude/agents/bug-scanner.md
  • .gitignore
📚 Learning: 2026-01-02T11:58:27.018Z
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

Applied to files:

  • docs/workflow/task-workflow.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Always 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:

  • docs/workflow/task-workflow.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Read `docs/project/project-overview.md` then check `docs/project/PRD/active/*.md` for the current PRD before starting work

Applied to files:

  • docs/workflow/task-workflow.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Whenever working on any task, follow docs/workflow/task-workflow.md from start to finish without making changes or committing code prematurely

Applied to files:

  • docs/workflow/task-workflow.md
📚 Learning: 2026-01-08T12:57:19.167Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 67
File: packages/riviere-extract-ts/tsconfig.spec.json:5-22
Timestamp: 2026-01-08T12:57:19.167Z
Learning: In tsconfig.spec.json files, use expanded types array ["vitest/globals", "vitest/importMeta", "vite/client", "node", "vitest"] for complete test type coverage. Include patterns should cover .test and .spec files, config files (vitest.config.ts/mts, vite.config.ts/mts), multiple extensions (.ts, .tsx, .js, .jsx), and .d.ts files to ensure proper TypeScript coverage across the testing environment.

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T19:36:17.306Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/codebase-structure.md:0-0
Timestamp: 2026-01-08T19:36:17.306Z
Learning: Applies to docs/conventions/apps/*/tsconfig.lib.json : The tsconfig.lib.json file must extend tsconfig.base.json, set outDir to ./dist, rootDir to ./src, and include only src/**/*.ts while excluding src/**/*.test.ts files.

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T19:36:17.306Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/codebase-structure.md:0-0
Timestamp: 2026-01-08T19:36:17.306Z
Learning: Applies to docs/conventions/packages/*/tsconfig.lib.json : The tsconfig.lib.json file must extend tsconfig.base.json, set outDir to ./dist, rootDir to ./src, and include only src/**/*.ts while excluding src/**/*.test.ts files.

Applied to files:

  • .gitignore
📚 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/**/*.{ts,tsx,js,jsx,!(**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js)} : All production code (not test files) must align with architecture boundaries and layering requirements as defined in @/docs/architecture/overview.md and @/docs/conventions/codebase-structure.md

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T19:36:17.306Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/codebase-structure.md:0-0
Timestamp: 2026-01-08T19:36:17.306Z
Learning: Applies to docs/conventions/apps/*/tsconfig.json : Each app must have a 3-file tsconfig structure: tsconfig.json (editor entry point), tsconfig.lib.json (production build), and tsconfig.spec.json (tests).

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T19:36:17.306Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/codebase-structure.md:0-0
Timestamp: 2026-01-08T19:36:17.306Z
Learning: Applies to docs/conventions/packages/*/tsconfig.json : Each package must have a 3-file tsconfig structure: tsconfig.json (editor entry point), tsconfig.lib.json (production build), and tsconfig.spec.json (tests).

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Follow `docs/conventions/testing.md` when writing tests

Applied to files:

  • .gitignore
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : When writing, editing, refactoring, or reviewing code, always follow `docs/conventions/software-design.md`

Applied to files:

  • .claude/agents/code-review.md
📚 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/**/*.{ts,tsx,js,jsx} : Avoid dangerous fallback values that hide bugs. Do not use `??` or `||` operators without clear reason for providing defaults. If a value is required, make it required rather than guessing at defaults. Exceptions: optional parameters with documented defaults, configuration with explicit optional semantics, and test data with placeholder values.

Applied to files:

  • .claude/agents/code-review.md
🪛 LanguageTool
.claude/commands/complete-task.md

[style] ~139-~139: Consider using a different verb for a more formal wording.
Context: ...cision framework (below) 3. If fixable: fix the issues and re-run /complete-task ...

(FIX_RESOLVE)

⏰ 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 (9)
.gitignore (1)

53-55: LGTM!

The reviews/ ignore rule appropriately prevents local agent reports from being tracked in version control, aligning with the parallel review pipeline design.

.claude/agents/code-review.md (2)

53-67: LGTM!

The Evaluation Framework section provides clear, actionable guidance for skip-vs-fix decisions. The distinction between valid skip reasons (IMPOSSIBLE, CONFLICTS, MAKES WORSE) and invalid excuses (time, scope, refactor effort) establishes a strong quality bar and reduces ambiguity in decision-making.


34-35: No action needed—documented format is correctly referenced.

The agent file correctly references docs/workflow/code-review.md, which documents comprehensive report formats for all violation types: Organization Violations, Coding Standards, Testing Standards, Anti-Patterns, Brand Identity, and Shell Scripts. Each has explicit plain-text templates with required fields (Violation, Relevant convention, Code, Suggested Fix, Optional?). The agent's instruction is properly aligned with the documented format.

Likely an incorrect or invalid review comment.

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

29-31: LGTM!

The addition of "Post-Merge Completion" as an autonomous step is appropriate and aligns with the parallel review pipeline. The transition from manual cleanup to an autonomous post-merge reflection process improves workflow efficiency.


51-51: Verify post-merge-completion command specification exists and documents worktree cleanup.

The description references cleaning up the worktree, but the implementation details of /post-merge-completion should be documented in .claude/commands/post-merge-completion.md (mentioned in the PR summary). Ensure this command specification is complete and includes:

  • Worktree removal logic
  • Report file handling (where to read/archive review artifacts from reviews/<branch>/)
  • Reflection and feedback aggregation process
.claude/commands/post-merge-completion.md (2)

127-137: User choice handling is reasonable but could include option to re-run with improvements.

Lines 127-137 offer three options: implement, create issues, or skip. These cover most workflows, but user might also want to:

  • Implement improvements AND re-run /complete-task (to verify changes don't break anything)

Current flow (implement → proceed to cleanup) doesn't re-test. For major improvements, re-testing would be valuable.

However, this is a minor gap. If user wants to verify improvements, they can:

  • Ask in conversation to re-run /complete-task on the current branch
  • Or simply trust their implementation and proceed

No change needed; the current design is acceptable.


43-43: Both required scripts exist and are properly integrated into the workflow. No issues found.

.claude/agents/bug-scanner.md (1)

49-56: Fallback pattern is too broad and will flag legitimate code.

The pattern flags all ?? and || usage as BAD, but these are standard TypeScript defensive-coding practices:

  • value ?? defaultValue is idiomatic null-coalescing
  • config.timeout ?? 5000 is a normal config default
  • enabled ?? false is legitimate boolean fallback

The exception at line 58 ("without clear reason") is vague and doesn't clarify what counts as "clear." This will likely cause false positives and incorrect FAIL verdicts, reducing the agent's signal-to-noise ratio.

Suggest tightening the pattern to: Flag only cases where fallbacks silently hide missing required data, not optional chaining with documented defaults. Example:

  • BAD: userProvidedId ?? generateId() (hides missing required input)
  • OK: config.timeout ?? DEFAULT_TIMEOUT (documented optional config)
⛔ Skipped due to learnings
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/**/*.{ts,tsx,js,jsx} : Avoid dangerous fallback values that hide bugs. Do not use `??` or `||` operators without clear reason for providing defaults. If a value is required, make it required rather than guessing at defaults. Exceptions: optional parameters with documented defaults, configuration with explicit optional semantics, and test data with placeholder values.
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/software-design.md:0-0
Timestamp: 2026-01-08T23:16:02.639Z
Learning: Applies to docs/conventions/**/*.{ts,tsx,js,jsx} : Fail-fast over silent fallbacks. Never use fallback chains (`value ?? backup ?? 'unknown'`). If data should exist, validate and throw a clear error.
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/anti-patterns.md:0-0
Timestamp: 2026-01-07T23:24:27.966Z
Learning: Applies to docs/conventions/**/*.{ts,tsx,js,jsx} : String-based error detection from third-party libraries is only acceptable when 100% unavoidable. Document justification with the pattern: `// ANTI-PATTERN EXCEPTION: String-Based Error Detection` followed by `// Justification:` and `// Tracking:` comments
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/**/*.{ts,tsx,js,jsx} : Review usage of `/* v8 ignore next -- preserve */` coverage skip directives. This is only acceptable for unreachable code needed to satisfy the compiler. Most cases should be solved by extracting code or writing tests to mock behavior.
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/conventions/software-design.md:0-0
Timestamp: 2026-01-08T23:16:02.639Z
Learning: Applies to docs/conventions/**/*.{ts,tsx,js,jsx} : Fail-Fast Error Handling: Validate and throw clear errors instead of using fallback chains. Error format: `Expected [X]. Got [Y]. Context: [debugging info]`
.claude/commands/complete-task.md (1)

211-245: The Fix-or-Report framework is already applied correctly to the appropriate agents.

The framework in complete-task.md (lines 211-245) is intended for the orchestrating agent—what it does after receiving FAIL returns from other agents. This is distinct from individual agent behavior.

  • bug-scanner.md is correctly designed as a scanner/reporter only. It identifies patterns and writes findings; it is not responsible for deciding fix-vs-report strategy.
  • code-review.md already contains the "Fix by default" principle (line 67): "Decision: Fix by default. Skip only with valid reason. Ask user if uncertain."

There is no missing guidance, and adding the complete-task.md framework to bug-scanner.md would conflate responsibilities and violate separation of concerns. Each agent has appropriate scope-specific guidance.

Likely an incorrect or invalid review comment.

Comment thread .claude/agents/bug-scanner.md
Comment thread .claude/agents/bug-scanner.md
Comment thread .claude/agents/bug-scanner.md
Comment thread .claude/agents/code-review.md
Comment thread .claude/commands/complete-task.md Outdated
Comment thread .claude/commands/complete-task.md
Comment thread .claude/commands/complete-task.md Outdated
Comment thread .claude/commands/complete-task.md
Comment thread .claude/commands/post-merge-completion.md
Comment thread .claude/commands/post-merge-completion.md
- Clarify when doc-suggestions.md is created (only if suggestions exist)
- Add robust issue number extraction with bash example
- Document task-check marker scenarios in a table

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

sonarqubecloud Bot commented Jan 9, 2026

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: 1

🤖 Fix all issues with AI agents
In @.claude/commands/complete-task.md:
- Line 146: Update the instruction text in the .claude/commands/complete-task.md
content where it reads "If fixable: fix the issues and re-run `/complete-task`"
to use the more formal term "resolve" (e.g., "If fixable: resolve the issues and
re-run `/complete-task`"); ensure the rest of the sentence punctuation and
casing remains consistent with surrounding instructions and save the change.
📜 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 1b81c92 and a4d1e52.

📒 Files selected for processing (2)
  • .claude/agents/bug-scanner.md
  • .claude/commands/complete-task.md
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 85
File: .claude/commands/post-merge-completion.md:35-39
Timestamp: 2026-01-09T18:10:15.724Z
Learning: In .claude/commands/post-merge-completion.md, the review files in `reviews/<branch>/` (code-review.md, bug-scanner.md, task-check.md, doc-suggestions.md) are optional inputs to the reflection process. The post-merge-completion command should work gracefully even if these files are missing or if /complete-task wasn't run before merging.
📚 Learning: 2026-01-09T18:10:15.724Z
Learnt from: NTCoding
Repo: NTCoding/living-architecture PR: 85
File: .claude/commands/post-merge-completion.md:35-39
Timestamp: 2026-01-09T18:10:15.724Z
Learning: In .claude/commands/post-merge-completion.md, the review files in `reviews/<branch>/` (code-review.md, bug-scanner.md, task-check.md, doc-suggestions.md) are optional inputs to the reflection process. The post-merge-completion command should work gracefully even if these files are missing or if /complete-task wasn't run before merging.

Applied to files:

  • .claude/commands/complete-task.md
  • .claude/agents/bug-scanner.md
📚 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/**/*.{ts,tsx,js,jsx} : Review usage of `/* v8 ignore next -- preserve */` coverage skip directives. This is only acceptable for unreachable code needed to satisfy the compiler. Most cases should be solved by extracting code or writing tests to mock behavior.

Applied to files:

  • .claude/commands/complete-task.md
  • .claude/agents/bug-scanner.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Whenever working on any task, follow docs/workflow/task-workflow.md from start to finish without making changes or committing code prematurely

Applied to files:

  • .claude/commands/complete-task.md
📚 Learning: 2026-01-02T11:58:34.027Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T11:58:34.027Z
Learning: Read and follow all instructions in CLAUDE.md

Applied to files:

  • .claude/agents/bug-scanner.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : When writing, editing, refactoring, or reviewing code, always follow `docs/conventions/software-design.md`

Applied to files:

  • .claude/agents/bug-scanner.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Avoid patterns and practices listed in `docs/conventions/anti-patterns.md`

Applied to files:

  • .claude/agents/bug-scanner.md
📚 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/**/*.{ts,tsx,js,jsx,!(**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js)} : All production code must comply with coding standards and design principles as defined in @/docs/conventions/software-design.md and @/docs/conventions/standard-patterns.md

Applied to files:

  • .claude/agents/bug-scanner.md
📚 Learning: 2026-01-08T17:19:05.950Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-08T17:19:05.950Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Look for and use standard implementation patterns defined in `docs/conventions/standard-patterns.md`

Applied to files:

  • .claude/agents/bug-scanner.md
📚 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/**/*.{ts,tsx,js,jsx,!(**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js)} : All production code (not test files) must align with architecture boundaries and layering requirements as defined in @/docs/architecture/overview.md and @/docs/conventions/codebase-structure.md

Applied to files:

  • .claude/agents/bug-scanner.md
📚 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/**/*.{ts,tsx,js,jsx,!(**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js)} : All production code must comply with anti-patterns guidelines defined in @/docs/conventions/anti-patterns.md. Violations are hard failures unless documented exceptions exist.

Applied to files:

  • .claude/agents/bug-scanner.md
🪛 LanguageTool
.claude/commands/complete-task.md

[style] ~146-~146: Consider using a different verb for a more formal wording.
Context: ...cision framework (below) 3. If fixable: fix the issues and re-run /complete-task ...

(FIX_RESOLVE)

🔇 Additional comments (9)
.claude/commands/complete-task.md (3)

1-215: Architecture and instructions are well-structured for parallel execution.

The workflow diagram, skip conditions, agent prompts, and evaluation logic are clear and comprehensive. The parallel execution model via single Task message with multiple calls is correctly specified, and the marker creation logic properly guards against re-execution of task-check.


163-189: CodeRabbit feedback resolution path is well-defined.

The step-by-step approach to get, address, and verify unresolved feedback is clear. The emphasis on "every unresolved item must be addressed" is appropriate. The loop includes a verification step to confirm no items remain.


218-252: Fix or Report Decision Framework is pragmatic and actionable.

The criteria are clear, examples are concrete, and the "Fix by default" philosophy with documented exceptions provides good guidance. This reduces decision paralysis while preserving judgment for high-risk changes.

.claude/agents/bug-scanner.md (6)

1-18: New bug-scanner agent spec is comprehensive and well-scoped.

The agent clearly defines its purpose (scan for bugs, framework misuse, dangerous configs, security issues), provides git commands for finding changes, and specifies that the complete report goes to file while returning only PASS/FAIL.


20-83: Priority 1 Bug Patterns covers critical runtime issues effectively.

Silent error swallowing, dangerous type assertions, incomplete async handling, race conditions, and logic errors represent the core bug categories. Concrete examples and the exception for documented defaults show appropriate judgment.


84-120: Priority 2 Framework & Library Misuse addresses library/framework concerns properly.

Coverage includes inefficient API usage, deprecated patterns, missing features, and anti-patterns. This aligns with the PR objective to catch "framework misuse (e.g., React hooks/lifecycle issues)" and similar concerns.


121-170: Priority 3 & 4 protect critical files and security boundaries.

Protected files are well-chosen (tsconfig, eslint, nx.json, husky, .gitignore, .claude settings), and security issues (hardcoded secrets, PII logging, injection risks) with severity levels cover the threat model. The "Justified" field in config changes appropriately requires human judgment.


171-220: Documentation suggestions are properly isolated and optional.

Line 181 explicitly states: only create doc-suggestions.md if suggestions exist. This aligns with the architectural principle that review artifacts are optional inputs to post-merge-completion. The drift vs. missing distinction and search commands help the agent identify relevant docs.


222-235: Output format correctly enforces PASS/FAIL-only return.

The agent returns only PASS or FAIL with a note that the full report is in the file. This design—fast evaluation gate + full report in file for inspection on failure—supports the parallel execution architecture in complete-task.md.

Comment thread .claude/commands/complete-task.md
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