Files
ci/opencode/ci/workflows/review.md
T
Jon Chery e31afe3b59 docs(rebrand): rename & rebrand CI → CIAgent across all documentation, templates, and scripts
- README.md: title, project name, CLI commands, .ci/ → .ciagent/, ci-files → ciagent-files, CI Modification → CIAgent Modification
- AGENTS.md: title, project name, architecture tree, agent count (18→19), test count (25→31 suites, 218→370 tests), version (0.4.0→0.6.0), ci-files → ciagent-files, CIConfig → CIAgentConfig, CiMetadata → CIAgentMetadata, .ci/ → .ciagent/
- templates/DECISIONS.md: .ci/audit/ → .ciagent/audit/, ci audit → ciagent audit
- scripts/postinstall.js: CI postinstall → CIAgent postinstall
- scripts/install.sh: CI → CIAgent, ci-init → ciagent-init, INSTALL COMPLETE banner
- opencode/ci/workflows/*.md (11 files): .ci/ → .ciagent/, CI → CIAgent project name, ci-command → ciagent-command usage lines
- opencode/ci/references/*.md (5 files): .ci/ → .ciagent/, CI → CIAgent project name, ci-files → ciagent-files references
- opencode/ci/contexts/*.md (3 files): .ci/ → .ciagent/, CI → CIAgent project name
- opencode/agents/ci-*.md (18 files): .ci/ → .ciagent/, CI → CIAgent project name
- opencode/command/ci-*.md (11 files): CI → CIAgent project name

Preserved: ---ci---/---/ci--- markers, opencode/ci/ dir paths, ci-*.md filenames, ci listProjects()/ci setActiveProject() API names, repo URLs

---ci---
phase: 1
milestone: v0.6
plan: 01-01
task: 01-01-01
status: execute
---/ci---
2026-05-29 17:58:48 +00:00

2.1 KiB

description
description
Review CIAgent code changes with multi-persona analysis — auto-apply P0 fixes, flag P1+ for post-hoc review

CIAgent Review

Multi-persona code review workflow. Reviews changes in the current phase, auto-applies P0 fixes, and flags P1+ issues for post-hoc review.

Usage: ciagent-review [phase_number]

Step 0: Confirm Active Project

Check ci listProjects() or read .ciagent/config.json to determine if multi-project mode is active.

If .ciagent/config.json has projects[] with length > 0:

  • Confirm active_project is correct for this review
  • If not, set it with ci setActiveProject(<slug>)
  • All commit messages must include project: <slug> in ---ci--- block

If single-project mode: proceed with existing conventions.

Step 1: Load Changes

git log --grep="P##" --max-count=30
git diff phase/NN-slug...HEAD

Load all changes for the current or specified phase.

Step 2: Persona Reviews

For each persona (correctness, testing, security, performance, maintainability, adversarial):

Correctness

  • Logic errors, off-by-ones, missing edge cases
  • Incorrect data transformations
  • Race conditions

Testing

  • Missing test cases for new code
  • Flaky test patterns
  • Inadequate assertions

Security

  • Input validation gaps
  • Injection vectors
  • Secret exposure
  • Missing auth checks

Performance

  • Unnecessary allocations
  • O(n^2) patterns
  • Missing caching opportunities

Maintainability

  • Naming inconsistencies
  • Coupling violations
  • Missing error handling

Adversarial

  • Attack surface expansion
  • Abuse cases
  • Trust boundary violations

Step 3: Classify and Fix

For each finding:

  • P0 (blocking): Logic errors, security vulnerabilities, broken imports → auto-apply
  • P1 (important): Coverage gaps, naming issues, missing edge cases → flag
  • P2 (nit): Style, formatting, minor suggestions → flag

Step 4: Commit

verify(P##): code review — [N] P0 auto-fixed, [M] P1+ flagged

---ci---
phase: [N]
milestone: [vX.X]
status: verify
lessons:
  - [P0 fix: description]
---/ci---

Step 5: Return Result

Report findings by persona, P0 fixes applied, P1+ flags.