Repository navigation
feat(complete-task): implement parallel review pipeline with bug-scanner - #85
Conversation
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]>
📝 WalkthroughWalkthroughAdds 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Deploying living-architecture with
|
| 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 |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
|
||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
There was a problem hiding this comment.
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.shdirectly, 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
📒 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.gitignoredocs/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-completionshould 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 ?? defaultValueis idiomatic null-coalescingconfig.timeout ?? 5000is a normal config defaultenabled ?? falseis legitimate boolean fallbackThe 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:` commentsLearnt 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.
- 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]>
|
There was a problem hiding this comment.
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
📒 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.



User description
Implements parallel execution architecture for code review agents to improve throughput and separate concerns.
Changes
Architecture
reviews/<branch>/<agent-name>.mdNew Agents
Storage
reviews/<branch>/directory/tmp/toreviews/<branch>/task-check.markerdoc-suggestions.mdfor reflection stepreviews/to.gitignoreBug Scanner Scope
Scans for:
Benefits
Test Plan
submit-pr.shcreates PR with correct title and bodyPR Type
Enhancement
Description
Implements parallel execution architecture for code review agents
reviews/<branch>/directoryIntroduces new bug-scanner agent for dedicated bug and security scanning
Adds post-merge-completion command for task reflection and cleanup
Reorganizes task-check marker storage from
/tmp/toreviews/<branch>/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"]File Walkthrough
bug-scanner.md
New bug-scanner agent with comprehensive issue detection.claude/agents/bug-scanner.md
misuse, and dangerous config changes
dangerous config changes, and security issues
assertions, async errors, race conditions, and logic errors
reflection
code-review.md
Refactor code-review to separate concerns from bug-scanner.claude/agents/code-review.md
conventions
bug-scanner agent)
in prompt
findings
complete-task.md
Redesign complete-task for parallel agent execution.claude/commands/complete-task.md
agents in parallel
reviews//folder and determine which agentsto run
tool calls
/tmp/toreviews//task-check.markerfailures
formatting
reviews//directory
post-merge-completion.md
New post-merge-completion command for reflection and cleanup.claude/commands/post-merge-completion.md
history
levels
task-workflow.md
Update task workflow documentation for post-merge-completiondocs/workflow/task-workflow.md
Completion"
./scripts/cleanup-task.shto/post-merge-completionsuggestion functionality
Summary by CodeRabbit
New Features
Process Improvements
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.