Repository navigation
feat: integrate /code-review command into /complete-task pipeline - #29
Conversation
Add /code-review command that runs semantic code review on changed files, integrated into the /complete-task pipeline between verify gate and task-check steps. Updates documentation to reflect new workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…-into-complete-task
📝 WalkthroughWalkthroughAdds a new semantic code-review command and detailed multi-stage complete-task workflow (verify gate → /code-review → task-check → submit PR), disables automatic code review in settings, and updates documentation paths and descriptions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant CompleteTask as /complete-task
participant VerifyGate
participant CodeReview as /code-review
participant TaskCheck
participant SubmitPR
participant GitRemote as Git/PR
User->>CompleteTask: invoke pipeline
CompleteTask->>VerifyGate: run verify gate
alt verify FAIL
VerifyGate->>User: FAIL (stop)
else verify PASS
VerifyGate->>CodeReview: run code review (skip if disabled)
alt code review FAIL
CodeReview->>User: FAIL with findings
else code review PASS or skipped
CodeReview->>TaskCheck: run task-check
alt task-check FAIL
TaskCheck->>User: FAIL (marker created)
else task-check PASS
TaskCheck->>SubmitPR: submit PR (commit/push)
alt submit FAIL
SubmitPR->>User: FAIL (retry)
else submit SUCCESS
SubmitPR->>GitRemote: create/update PR
GitRemote->>User: PR_READY (success)
end
end
end
end
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: 2026-01-03T11:38:30.208ZApplied to files:
📚 Learning: 2026-01-04T10:41:46.938ZApplied to files:
📚 Learning: 2026-01-04T10:41:46.938ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
Comment |
Deploying living-architecture with
|
| Latest commit: |
c3c1b30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://68b98b6a.living-architecture.pages.dev |
| Branch Preview URL: | https://integrate-code-review-into-c.living-architecture.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.claude/commands/code-review.md (1)
36-51: Consider clarifying when the evaluation framework applies.The evaluation framework is comprehensive and provides good guidance. However, it's not entirely clear whether:
- The agent should apply this evaluation itself when deciding whether to fix issues
- The user should use this framework to evaluate the agent's findings
- Both
Consider adding a brief statement clarifying who is expected to apply this framework (agent, user, or both) and at what stage of the workflow.
.claude/commands/complete-task.md (2)
40-40: Clarify loop control tracking mechanism.The workflow references "third successive attempt" in multiple steps but doesn't specify how attempts are tracked. Is this:
- Tracked automatically by the sub-agent?
- Tracked via marker files or environment variables?
- Expected to be tracked manually by the agent executing this workflow?
Consider documenting the tracking mechanism or clarifying that the agent should maintain attempt counts in its context during execution.
Also applies to: 51-51, 62-62, 73-73
54-63: Consider marker file cleanup strategy.The workflow creates marker files in
/tmp/task-check-done-<branch>.markerto skip redundant task-checks. However, there's no mention of cleanup:
- When should these markers be removed (e.g., after successful PR submission)?
- Should they persist across sessions?
- How should stale markers be handled if a branch is recreated?
Consider adding a cleanup step or documenting the marker lifecycle.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.claude/commands/code-review.md.claude/commands/complete-task.md.claude/settings.jsonCLAUDE.md
🧰 Additional context used
📓 Path-based instructions (2)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
All code documentation must follow conventions defined in docs/conventions/ (software-design.md, testing.md, standard-patterns.md, codebase-structure.md)
Files:
CLAUDE.md
**
📄 CodeRabbit inference engine (CLAUDE.md)
**: Never commit secrets, API keys, credentials, or sensitive data; use environment variables for sensitive configuration and do not log sensitive data
All cross-project imports must use package names (e.g., import { X } from '@living-architecture/[pkg-name]'), not relative paths
Files:
CLAUDE.md
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.208Z
Learning: After addressing issues from code review, complete the task by following @/docs/workflow/task-workflow.md → Completing Tasks
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.207Z
Learning: Applies to docs/workflow/**/*.{js,jsx,ts,tsx,!**/*.test.*,!**/*.spec.*} : Check all production code files comply with software design conventions in @/docs/conventions/software-design.md and standard patterns in @/docs/conventions/standard-patterns.md
📚 Learning: 2026-01-03T11:38:30.207Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.207Z
Learning: Applies to docs/workflow/**/*.{test,spec}.{js,jsx,ts,tsx} : Review usage of `/* v8 ignore next -- preserve */` in test files - only allow when code is unreachable and required for compiler satisfaction; otherwise suggest extracting code or writing tests to mock behavior
Applied to files:
.claude/settings.json.claude/commands/code-review.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Maintain 100% test coverage as mandatory and enforced
Applied to files:
.claude/settings.json
📚 Learning: 2026-01-03T11:38:30.207Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.207Z
Learning: Applies to docs/workflow/**/*.{js,jsx,ts,tsx,!**/*.test.*,!**/*.spec.*} : Check production code against anti-patterns defined in @/docs/conventions/anti-patterns.md - hard failure unless documented exception exists
Applied to files:
.claude/settings.jsonCLAUDE.md.claude/commands/code-review.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Avoid anti-patterns documented in docs/conventions/anti-patterns.md
Applied to files:
.claude/settings.jsonCLAUDE.md
📚 Learning: 2026-01-03T11:38:30.208Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.208Z
Learning: After addressing issues from code review, complete the task by following @/docs/workflow/task-workflow.md → Completing Tasks
Applied to files:
.claude/commands/complete-task.mdCLAUDE.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Follow the task workflow defined in docs/workflow/task-workflow.md from start to finish for all work; do not make changes without following these steps exactly
Applied to files:
.claude/commands/complete-task.md
📚 Learning: 2026-01-02T11:58:27.001Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: packages/riviere-cli/CLAUDE.md:0-0
Timestamp: 2026-01-02T11:58:27.001Z
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:
.claude/commands/complete-task.md
📚 Learning: 2026-01-02T11:58:34.018Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T11:58:34.018Z
Learning: Read and follow all instructions in CLAUDE.md
Applied to files:
CLAUDE.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.md : All code documentation must follow conventions defined in docs/conventions/ (software-design.md, testing.md, standard-patterns.md, codebase-structure.md)
Applied to files:
CLAUDE.md
📚 Learning: 2026-01-03T11:38:30.207Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.207Z
Learning: Applies to docs/workflow/**/*.{js,jsx,ts,tsx,!**/*.test.*,!**/*.spec.*} : Check all production code files comply with software design conventions in @/docs/conventions/software-design.md and standard patterns in @/docs/conventions/standard-patterns.md
Applied to files:
CLAUDE.md.claude/commands/code-review.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Always follow software design principles defined in docs/conventions/software-design.md (including object calisthenics, fail-fast patterns, and dependency inversion)
Applied to files:
CLAUDE.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use standard implementation patterns defined in docs/conventions/standard-patterns.md
Applied to files:
CLAUDE.md
📚 Learning: 2026-01-03T11:38:30.207Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: docs/workflow/code-review.md:0-0
Timestamp: 2026-01-03T11:38:30.207Z
Learning: Applies to docs/workflow/**/*.{js,jsx,ts,tsx,!**/*.test.*,!**/*.spec.*} : Verify all production code files align with architecture boundaries and layering requirements as defined in @/docs/architecture/overview.md and @/docs/conventions/codebase-structure.md
Applied to files:
CLAUDE.md.claude/commands/code-review.md
📚 Learning: 2026-01-04T10:41:46.938Z
Learnt from: CR
Repo: NTCoding/living-architecture PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T10:41:46.938Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Test files must follow naming, assertions, and edge case checklist conventions defined in docs/conventions/testing.md
Applied to files:
CLAUDE.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 (7)
CLAUDE.md (2)
112-112: LGTM: Path correction.The path reference is now correct with the leading dot (
.claude/instead of./claude/), which properly matches the actual directory structure.
137-137: LGTM: Accurate description of the code review workflow.The updated description correctly reflects that the automatic-code-review plugin is now used explicitly via the
/code-reviewand/complete-taskcommands rather than automatically on session stop..claude/commands/code-review.md (2)
1-52: LGTM: Well-structured code review workflow.The command definition is clear and comprehensive. The PASS/FAIL output format provides good structure, and the evaluation framework with "highest quality code" heuristic is a solid foundation for decision-making.
13-14: Verify handling of uncommitted changes.The command
git diff --name-only main...HEADonly captures committed changes between branches. If there are uncommitted changes in the working directory, they won't be reviewed.Consider whether the workflow should also handle uncommitted changes, or if the expectation is that all changes must be committed before running
/code-review. If the latter, this should be documented in the Usage section.#!/bin/bash # Check if there are any usage instructions or guards for uncommitted changes in the complete-task workflow rg -n "commit|uncommitted|working.directory|staged" .claude/commands/ -A 2 -B 2.claude/commands/complete-task.md (3)
3-16: LGTM: Clear workflow visualization.The ASCII diagram effectively illustrates the sub-agent pipeline with explicit failure paths, making it easy to understand the control flow at a glance.
18-23: LGTM: Good escape hatch for code review feedback.The
--feedback-rejectedflag provides a useful mechanism to skip code review when the developer has evaluated and rejected the findings. This respects developer judgment while maintaining the default-review behavior.
68-68: No action required. The./scripts/submit-pr.shscript exists and is executable in the repository.Likely an incorrect or invalid review comment.
…ine command Update task-workflow.md to clarify that /complete-task is the unified command for both initial completion and re-checking PRs. Removes references to manual submit-pr.sh usage and explains that the complete task command runs the full autonomous pipeline (verify, review, task-check, and PR submission). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|



Summary
Add /code-review command that runs semantic code review on changed TypeScript/TSX files, integrated into the /complete-task pipeline between the verify gate and task-check steps. Updates CLAUDE.md and task-workflow.md documentation to reflect the new workflow.
Changes
.claude/commands/code-review.mddefining the /code-review command.claude/commands/complete-task.mdto integrate /code-review into the pipelineCLAUDE.mdto document code review workflow.claude/settings.jsonto disable automatic code review in favor of explicit command-based invocationdocs/workflow/task-workflow.mdto explain that /complete-task runs the complete autonomous pipelineHow it works
The /code-review command:
The /complete-task command runs the full autonomous pipeline:
The automatic-code-review plugin is disabled in settings.json because the /code-review and /complete-task commands now invoke it explicitly as part of their workflow, rather than running automatically on session stop.
Summary by CodeRabbit
Release Notes
Documentation
/complete-taskcommand structure.Configuration
✏️ Tip: You can customize this high-level summary in your review settings.