@open-code-review/agents 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -42
- package/package.json +1 -1
- package/skills/ocr/references/session-state.md +44 -16
- package/skills/ocr/references/workflow.md +4 -2
package/README.md
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
# @open-code-review/agents
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The skill definitions, reviewer personas, and workflow references that power Open Code Review.
|
|
4
4
|
|
|
5
5
|
## What This Package Contains
|
|
6
6
|
|
|
7
|
-
This package provides the AI-readable assets that power multi-agent code review:
|
|
8
|
-
|
|
9
7
|
```
|
|
10
8
|
agents/
|
|
11
|
-
├── skills/ocr/
|
|
12
|
-
│ ├── SKILL.md
|
|
9
|
+
├── skills/ocr/ # The OCR skill
|
|
10
|
+
│ ├── SKILL.md # Tech Lead orchestration logic
|
|
13
11
|
│ ├── references/
|
|
14
|
-
│ │ ├── workflow.md
|
|
15
|
-
│ │ ├── discourse.md
|
|
16
|
-
│ │ ├── synthesis.md
|
|
17
|
-
│ │ └── reviewers/
|
|
18
|
-
│ │ ├── principal.md
|
|
19
|
-
│ │ ├── quality.md
|
|
20
|
-
│ │ ├── security.md
|
|
21
|
-
│ │ └── testing.md
|
|
12
|
+
│ │ ├── workflow.md # 8-phase review workflow
|
|
13
|
+
│ │ ├── discourse.md # Multi-agent debate rules
|
|
14
|
+
│ │ ├── synthesis.md # Finding aggregation guide
|
|
15
|
+
│ │ └── reviewers/ # Persona definitions (customizable)
|
|
16
|
+
│ │ ├── principal.md # Architecture, design patterns
|
|
17
|
+
│ │ ├── quality.md # Code style, best practices
|
|
18
|
+
│ │ ├── security.md # Auth, data handling, vulnerabilities
|
|
19
|
+
│ │ └── testing.md # Coverage, edge cases
|
|
22
20
|
│ └── assets/
|
|
23
|
-
│ ├── config.yaml
|
|
21
|
+
│ ├── config.yaml # Default configuration
|
|
24
22
|
│ └── reviewer-template.md
|
|
25
|
-
├── commands/
|
|
23
|
+
├── commands/ # Slash command definitions
|
|
26
24
|
│ ├── review.md
|
|
27
25
|
│ ├── doctor.md
|
|
28
26
|
│ ├── history.md
|
|
29
27
|
│ ├── show.md
|
|
30
28
|
│ ├── reviewers.md
|
|
31
29
|
│ └── post.md
|
|
32
|
-
└── .claude-plugin/
|
|
30
|
+
└── .claude-plugin/ # Claude Code plugin manifest
|
|
33
31
|
└── plugin.json
|
|
34
32
|
```
|
|
35
33
|
|
|
@@ -37,7 +35,7 @@ agents/
|
|
|
37
35
|
|
|
38
36
|
### Via CLI (Recommended)
|
|
39
37
|
|
|
40
|
-
The CLI copies these assets to your project's `.ocr/` directory
|
|
38
|
+
The CLI copies these assets to your project's `.ocr/` directory:
|
|
41
39
|
|
|
42
40
|
```bash
|
|
43
41
|
npx @open-code-review/cli init
|
|
@@ -45,46 +43,35 @@ npx @open-code-review/cli init
|
|
|
45
43
|
|
|
46
44
|
### Via Claude Code Plugin
|
|
47
45
|
|
|
48
|
-
For Claude Code users who prefer plugin-based installation:
|
|
49
|
-
|
|
50
46
|
```bash
|
|
51
|
-
# Add the marketplace
|
|
52
47
|
/plugin marketplace add spencermarx/open-code-review
|
|
53
|
-
|
|
54
|
-
# Install the plugin
|
|
55
|
-
/plugin install open-code-review@spencermarx-open-code-review
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Local Development
|
|
59
|
-
|
|
60
|
-
Test the plugin locally with Claude Code:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
claude --plugin-dir ./packages/agents
|
|
48
|
+
/plugin install ocr@aclarify
|
|
64
49
|
```
|
|
65
50
|
|
|
66
51
|
## Skill Architecture
|
|
67
52
|
|
|
68
|
-
The `
|
|
53
|
+
The `SKILL.md` file defines the **Tech Lead** role—the orchestrator that:
|
|
69
54
|
|
|
70
55
|
1. Discovers project context (config, OpenSpec, reference files)
|
|
71
56
|
2. Analyzes changes and identifies risk areas
|
|
72
|
-
3. Selects and spawns reviewer personas
|
|
57
|
+
3. Selects and spawns reviewer personas based on your team configuration
|
|
73
58
|
4. Facilitates discourse between reviewers
|
|
74
59
|
5. Synthesizes findings into a unified review
|
|
75
60
|
|
|
76
|
-
Each reviewer in `references/reviewers/` is a specialized persona
|
|
61
|
+
Each reviewer in `references/reviewers/` is a specialized persona. You can customize the built-in reviewers or add your own.
|
|
77
62
|
|
|
78
63
|
## Commands
|
|
79
64
|
|
|
80
|
-
| File |
|
|
81
|
-
|
|
82
|
-
| `review.md` | `/ocr-review` | `/
|
|
83
|
-
| `doctor.md` | `/ocr-doctor` | `/
|
|
84
|
-
| `reviewers.md` | `/ocr-reviewers` | `/
|
|
85
|
-
| `history.md` | `/ocr-history` | `/
|
|
86
|
-
| `show.md` | `/ocr-show` | `/
|
|
87
|
-
| `post.md` | `/ocr-post` | `/
|
|
65
|
+
| File | Windsurf | Claude Code / Cursor |
|
|
66
|
+
|------|----------|----------------------|
|
|
67
|
+
| `review.md` | `/ocr-review` | `/ocr:review` |
|
|
68
|
+
| `doctor.md` | `/ocr-doctor` | `/ocr:doctor` |
|
|
69
|
+
| `reviewers.md` | `/ocr-reviewers` | `/ocr:reviewers` |
|
|
70
|
+
| `history.md` | `/ocr-history` | `/ocr:history` |
|
|
71
|
+
| `show.md` | `/ocr-show` | `/ocr:show` |
|
|
72
|
+
| `post.md` | `/ocr-post` | `/ocr:post` |
|
|
73
|
+
|
|
74
|
+
**Why two formats?** Windsurf requires flat command files with a prefix (`/ocr-command`), while Claude Code and Cursor support subdirectories (`/ocr:command`). Both invoke the same underlying functionality.
|
|
88
75
|
|
|
89
76
|
## License
|
|
90
77
|
|
package/package.json
CHANGED
|
@@ -22,10 +22,10 @@ This means:
|
|
|
22
22
|
|
|
23
23
|
```json
|
|
24
24
|
{
|
|
25
|
-
"session_id": "
|
|
26
|
-
"branch": "
|
|
25
|
+
"session_id": "{session-id}",
|
|
26
|
+
"branch": "{branch-name}",
|
|
27
27
|
"status": "active",
|
|
28
|
-
"started_at": "
|
|
28
|
+
"started_at": "{ISO-8601-TIMESTAMP}",
|
|
29
29
|
"current_phase": "reviews",
|
|
30
30
|
"phase_number": 4,
|
|
31
31
|
"completed_phases": ["context", "requirements", "analysis"],
|
|
@@ -33,10 +33,12 @@ This means:
|
|
|
33
33
|
"assigned": ["principal-1", "principal-2", "quality-1", "quality-2"],
|
|
34
34
|
"complete": ["principal-1"]
|
|
35
35
|
},
|
|
36
|
-
"updated_at": "
|
|
36
|
+
"updated_at": "{ISO-8601-TIMESTAMP}"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
**IMPORTANT**: Timestamps MUST be generated dynamically using the current time in ISO 8601 format (e.g., `new Date().toISOString()` → `"2026-01-27T09:45:00.000Z"`). Do NOT copy example timestamps.
|
|
41
|
+
|
|
40
42
|
## Session Status
|
|
41
43
|
|
|
42
44
|
The `status` field controls session visibility:
|
|
@@ -69,13 +71,41 @@ The Tech Lead MUST update `state.json` at each phase boundary:
|
|
|
69
71
|
|
|
70
72
|
## Writing State
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
**CRITICAL**: Always generate timestamps dynamically using the current UTC time in ISO 8601 format.
|
|
75
|
+
|
|
76
|
+
### Generating Timestamps
|
|
73
77
|
|
|
74
78
|
```bash
|
|
75
|
-
#
|
|
76
|
-
|
|
79
|
+
# macOS/Linux
|
|
80
|
+
date -u +"%Y-%m-%dT%H:%M:%SZ"
|
|
81
|
+
# Output: 2026-01-27T09:45:00Z
|
|
82
|
+
|
|
83
|
+
# Windows (PowerShell)
|
|
84
|
+
Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ" -AsUTC
|
|
85
|
+
|
|
86
|
+
# Node.js / JavaScript
|
|
87
|
+
new Date().toISOString()
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
When creating a new session (Phase 1 start):
|
|
91
|
+
|
|
92
|
+
```json
|
|
77
93
|
{
|
|
78
|
-
"session_id": "{id}",
|
|
94
|
+
"session_id": "{session-id}",
|
|
95
|
+
"status": "active",
|
|
96
|
+
"current_phase": "context",
|
|
97
|
+
"phase_number": 1,
|
|
98
|
+
"completed_phases": [],
|
|
99
|
+
"started_at": "{CURRENT_ISO_TIMESTAMP}",
|
|
100
|
+
"updated_at": "{CURRENT_ISO_TIMESTAMP}"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
When transitioning phases (preserve `started_at`, update `updated_at`):
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"session_id": "{session-id}",
|
|
79
109
|
"status": "active",
|
|
80
110
|
"current_phase": "reviews",
|
|
81
111
|
"phase_number": 4,
|
|
@@ -84,25 +114,23 @@ cat > .ocr/sessions/{id}/state.json << 'EOF'
|
|
|
84
114
|
"assigned": ["principal-1", "principal-2", "quality-1", "quality-2"],
|
|
85
115
|
"complete": []
|
|
86
116
|
},
|
|
87
|
-
"
|
|
117
|
+
"started_at": "{PRESERVE_ORIGINAL}",
|
|
118
|
+
"updated_at": "{CURRENT_ISO_TIMESTAMP}"
|
|
88
119
|
}
|
|
89
|
-
EOF
|
|
90
120
|
```
|
|
91
121
|
|
|
92
122
|
When closing a session (Phase 8 complete):
|
|
93
123
|
|
|
94
|
-
```
|
|
95
|
-
# Update state.json to close the session
|
|
96
|
-
cat > .ocr/sessions/{id}/state.json << 'EOF'
|
|
124
|
+
```json
|
|
97
125
|
{
|
|
98
|
-
"session_id": "{id}",
|
|
126
|
+
"session_id": "{session-id}",
|
|
99
127
|
"status": "closed",
|
|
100
128
|
"current_phase": "complete",
|
|
101
129
|
"phase_number": 8,
|
|
102
130
|
"completed_phases": ["context", "requirements", "analysis", "reviews", "aggregation", "discourse", "synthesis"],
|
|
103
|
-
"
|
|
131
|
+
"started_at": "{PRESERVE_ORIGINAL}",
|
|
132
|
+
"updated_at": "{CURRENT_ISO_TIMESTAMP}"
|
|
104
133
|
}
|
|
105
|
-
EOF
|
|
106
134
|
```
|
|
107
135
|
|
|
108
136
|
## Benefits
|
|
@@ -73,11 +73,13 @@ At **every phase transition**, update `.ocr/sessions/{id}/state.json`:
|
|
|
73
73
|
"current_phase": "reviews",
|
|
74
74
|
"phase_number": 4,
|
|
75
75
|
"completed_phases": ["context", "requirements", "analysis"],
|
|
76
|
-
"started_at": "
|
|
77
|
-
"updated_at": "
|
|
76
|
+
"started_at": "{PRESERVE_ORIGINAL}",
|
|
77
|
+
"updated_at": "{CURRENT_ISO_TIMESTAMP}"
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
**CRITICAL**: Generate timestamps dynamically (e.g., `date -u +"%Y-%m-%dT%H:%M:%SZ"` on macOS/Linux). Preserve `started_at` from session creation; always update `updated_at` with current time.
|
|
82
|
+
|
|
81
83
|
**Status values**: `active` (in progress), `closed` (complete and dismissed)
|
|
82
84
|
|
|
83
85
|
**Phase values**: `context`, `requirements`, `analysis`, `reviews`, `aggregation`, `discourse`, `synthesis`, `complete`
|