Skip to content

Commit 983cd75

Browse files
cahaselerclaude
andcommitted
wip: standalone code review feature and statusline API fix
- Add runStandaloneValidation() for validation outside task workflow - Extract formatValidationResults() as shared function - Refactor prepare-completion to use shared formatting - Add code-review command and script (new feature) - Fix statusline token counting for current_usage API change - Add private journal entries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 88905db commit 983cd75

File tree

13 files changed

+1545
-139
lines changed

13 files changed

+1545
-139
lines changed

.cc-track/backlog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
## Items
1414

1515
<!-- Items will be added below -->
16+
- [2025-12-14] Add new subagent to review agents tasked with identifying 'fallback' approaches, 'graceful degradation', and 'backwards compatibility' that simply masks failures with fake functionality or broken systems. Any backwards compatibility or fallbacks MUST be in the spec. Falling back to something that appears at first glance to be working but isn't makes it substantially harder to test AI generated code.

.cc-track/reviews/2025-12-14.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Code Review: 2025-12-14
2+
3+
**Branch:** main
4+
**Generated:** 2025-12-14
5+
**Status:** resolved
6+
7+
## Summary
8+
9+
| # | Score | Status | Location | Decision | Action |
10+
|---|-------|--------|----------|----------|--------|
11+
| 1 | 100 | resolved | code-review.ts:89-98 | Fix | Changed to success:false, exitCode:1 |
12+
| 2 | 75 | resolved | validation.ts | Fix | Extracted runCoreValidationChecks() |
13+
| 3 | 75 | resolved | code-review.test.ts | Fix | Added 15 unit tests |
14+
| 4 | 75 | resolved | validation.ts | Fix | Extracted formatValidationResults() |
15+
16+
## Issues
17+
18+
### Issue 1: Error handler returns success:true with exitCode:0
19+
- **Score:** 100
20+
- **Location:** code-review.ts:89-98
21+
- **Reported by:** bug-scanner, guidelines-reviewer
22+
- **Description:** The catch block returns success:true with exitCode:0 when validation fails, violating the CommandFailure interface contract and causing CI pipelines to misinterpret errors as success.
23+
- **Status:** resolved
24+
- **Decision:** Fix
25+
- **Action:** Changed catch block to return success:false and exitCode:1
26+
27+
### Issue 2: Code duplication in validation functions
28+
- **Score:** 75
29+
- **Location:** validation.ts
30+
- **Reported by:** duplication-detector
31+
- **Description:** runValidationChecks() and runStandaloneValidation() have 95%+ identical code (60+ lines). Both execute same validation logic with only minor differences.
32+
- **Status:** resolved
33+
- **Decision:** Fix
34+
- **Action:** Extracted runCoreValidationChecks() helper that both functions now use
35+
36+
### Issue 3: Missing unit tests for code-review.ts
37+
- **Score:** 75
38+
- **Location:** code-review.test.ts
39+
- **Reported by:** guidelines-reviewer
40+
- **Description:** Constitution requires 80%+ coverage with colocated test files. The 195-line script has no tests.
41+
- **Status:** resolved
42+
- **Decision:** Fix
43+
- **Action:** Created code-review.test.ts with 15 tests covering happy path, validation failures, error handling, and edge cases
44+
45+
### Issue 4: Presentation logic duplication
46+
- **Score:** 75
47+
- **Location:** validation.ts
48+
- **Reported by:** duplication-detector
49+
- **Description:** ~70 lines of validation result formatting logic duplicated across both scripts.
50+
- **Status:** resolved
51+
- **Decision:** Fix
52+
- **Action:** Extracted formatValidationResults() to validation.ts, updated both code-review.ts and prepare-completion.ts to use it

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"statusLine": {
77
"type": "command",
8-
"command": "bun run ${CLAUDE_PLUGIN_ROOT}/scripts/statusline.ts",
8+
"command": "bun run /home/ubuntu/projects/cc-pars/scripts/statusline.ts",
99
"padding": 0
1010
}
1111
}

0 commit comments

Comments
 (0)