code-review · diff

git:20260131.424bd52 to git:20260306.38ad081

20 added, 67 removed. Audit A to A.

---
name: code-review
- description: Run J-Star code review on staged changes. Analyze, fix P0/P1 issues, and iterate until clean.
+ description: Deprecated compatibility alias for J-Star Reviewer. Use `jstar-reviewer` for the canonical install, review, audit, and automation flows.
---
- # Code Review Skill
-
- Run the J-Star Reviewer on staged changes, allowing iterative fixing of issues.
-
- ## When to Use
- - Before committing code changes
- - When code quality issues are mentioned
- - As a quality gate before merging
- - When user asks to "review this code"
-
- ## Quick Start
-
- ### 1. Build the Brain (First Time Only)
- ```bash
- jstar init
- ```
-
- ### 2. Stage Changes
- ```bash
- git add .
- ```
-
- ### 3. Run Review
- ```bash
- # Standard review (staged changes)
- jstar review
-
- # Retroactive (already committed)
- jstar review --last
+ # Code Review (Deprecated)
- # Branch/PR review (against main)
- jstar review --pr
- ```
+ This skill is kept only for backward compatibility with older Takomi prompts and habits.
- ## Fix Loop Protocol
+ Use `jstar-reviewer` as the canonical skill for:
+ - installing the `jstar-reviewer` npm package
+ - setting up `.jstar/`, `.env.local`, and `.gitignore`
+ - running `review` and `audit`
+ - using `--json` and `chat --headless` automation flows
- 1. **Read Output**: Check `.jstar/last-review.md` or console
- 2. **Prioritize**: Focus on **P0_CRITICAL** and **P1_HIGH** only
- 3. **Loop Strategy**:
- - If P0/P1 found → Fix → Stage → Re-review
- - If only P2_MEDIUM → Consider "Good Enough"
- - **MAX LOOPS: 3** — If issues persist, stop and ask user
+ ## Redirect Rule
- ## Handling False Positives (Headless Mode)
+ If this skill is invoked, treat it as a redirect to `jstar-reviewer`.
- ```bash
- # Start headless session
- jstar chat --headless
+ Do not use this file as the authoritative J-Star workflow documentation.
- # List issues
- echo '{"action": "list"}' | jstar chat --headless
+ ## Operational Rule
- # Debate an issue
- echo '{"action": "debate", "issueId": 0, "argument": "This is correct because..."}' | jstar chat --headless
+ `review` and `audit` are separate steps.
- # Exit
- echo '{"action": "exit"}' | jstar chat --headless
- ```
+ If the user wants a serious verification pass, run both:
+ 1. `review` for code review findings and fix prompts
+ 2. `audit` for deterministic security audit findings
- ## AI Fix Cycle
- ```
- 1. jstar review --json → Parse findings
- 2. Apply code fixes
- 3. git add . → Stage changes
- 4. jstar init → Update brain (if new files added)
- 5. jstar review --json → Verify fixes
- 6. Repeat until P0/P1 = 0
- ```
+ ## Canonical References
- ## Headless Commands
- | Action | Parameters | Description |
- |--------|------------|-------------|
- | `list` | — | List all current issues |
- | `debate` | `issueId`, `argument` | Challenge an issue |
- | `ignore` | `issueId` | Mark issue as ignored |
- | `exit` | — | End session, get final report |
+ - `assets/.agent/skills/jstar-reviewer/SKILL.md`
+ - `assets/.agent/workflows/spawn-jstar-code-review.md`
+ - `assets/.agent/workflows/review_code.md`