@open-code-review/agents 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-code-review/agents",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI-native skills, commands, and reviewer personas for Open Code Review",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,6 +25,7 @@ context_discovery:
25
25
  openspec:
26
26
  enabled: true
27
27
  config: "openspec/config.yaml" # Project conventions from OpenSpec
28
+ # config: "openspec/project.md" # Use this for legacy OpenSpec projects
28
29
  specs: "openspec/specs/**/*.md" # Merged specs for architectural context
29
30
  active_changes: "openspec/changes/**/*.md" # In-flight change proposals
30
31
 
@@ -36,6 +37,7 @@ context_discovery:
36
37
  - ".windsurfrules"
37
38
  - ".github/copilot-instructions.md"
38
39
  - "CONTRIBUTING.md"
40
+ - "openspec/AGENTS.md" # OpenSpec instructions (if present)
39
41
 
40
42
  # Additional project-specific files to include
41
43
  # additional:
@@ -32,11 +32,13 @@ rules:
32
32
  If `context_discovery.openspec.enabled: true`:
33
33
 
34
34
  ```
35
- openspec/config.yaml # Project conventions
35
+ {openspec.config} # Project conventions (configurable path)
36
36
  openspec/specs/**/*.md # Architectural specs
37
37
  openspec/changes/**/*.md # Active change proposals
38
38
  ```
39
39
 
40
+ **Note**: The `config` path supports both `.yaml` (extracts `context` field) and `.md` files (uses entire content). Legacy projects can set `config: "openspec/project.md"`.
41
+
40
42
  ### Priority 3: Reference Files
41
43
 
42
44
  Files listed in `context_discovery.references`:
@@ -48,6 +50,7 @@ CLAUDE.md
48
50
  .windsurfrules
49
51
  .github/copilot-instructions.md
50
52
  CONTRIBUTING.md
53
+ openspec/AGENTS.md
51
54
  ```
52
55
 
53
56
  ### Priority 4: Additional Files
@@ -84,13 +87,21 @@ def discover_context():
84
87
  # Priority 2: OpenSpec
85
88
  openspec = config.get('context_discovery', {}).get('openspec', {})
86
89
  if openspec.get('enabled', True):
87
- if exists('openspec/config.yaml'):
88
- os_config = read_yaml('openspec/config.yaml')
89
- if os_config.get('context'):
90
+ config_path = openspec.get('config', 'openspec/config.yaml')
91
+
92
+ if exists(config_path):
93
+ # Handle both .yaml and .md config files
94
+ if config_path.endswith('.yaml'):
95
+ os_config = read_yaml(config_path)
96
+ os_context = os_config.get('context')
97
+ else:
98
+ os_context = read(config_path) # .md uses entire content
99
+
100
+ if os_context:
90
101
  discovered.append({
91
- 'source': 'openspec/config.yaml',
102
+ 'source': config_path,
92
103
  'priority': 2,
93
- 'content': os_config['context']
104
+ 'content': os_context
94
105
  })
95
106
 
96
107
  # Read specs for architectural context
@@ -120,8 +131,10 @@ def discover_context():
120
131
  # Read OCR config
121
132
  cat .ocr/config.yaml
122
133
 
123
- # Check OpenSpec
124
- cat openspec/config.yaml 2>/dev/null
134
+ # Check OpenSpec (read config path from .ocr/config.yaml)
135
+ # Supports both .yaml (extracts context field) and .md (uses full content)
136
+ OPENSPEC_CONFIG=$(grep -A1 'openspec:' .ocr/config.yaml | grep 'config:' | awk '{print $2}' | tr -d '"')
137
+ cat "${OPENSPEC_CONFIG:-openspec/config.yaml}" 2>/dev/null
125
138
  find openspec/specs -name "*.md" -type f 2>/dev/null
126
139
 
127
140
  # Check reference files
@@ -133,9 +133,14 @@ Extract:
133
133
 
134
134
  If `context_discovery.openspec.enabled: true`:
135
135
 
136
+ Read the `config` path from `.ocr/config.yaml` (defaults to `openspec/config.yaml`).
137
+ - For `.yaml` files: extract the `context` field
138
+ - For `.md` files: use entire content (legacy `openspec/project.md`)
139
+
136
140
  ```bash
137
- # Read OpenSpec project context
138
- cat openspec/config.yaml 2>/dev/null
141
+ # Read OpenSpec project context (path from .ocr/config.yaml openspec.config)
142
+ # Default: openspec/config.yaml, legacy: openspec/project.md
143
+ cat openspec/config.yaml 2>/dev/null || cat openspec/project.md 2>/dev/null
139
144
 
140
145
  # Read merged specs for architectural context
141
146
  find openspec/specs -name "*.md" -type f 2>/dev/null
@@ -157,6 +162,9 @@ cat .windsurfrules 2>/dev/null
157
162
 
158
163
  # Check for contribution guidelines
159
164
  cat CONTRIBUTING.md 2>/dev/null
165
+
166
+ # Check for OpenSpec instructions (legacy projects)
167
+ cat openspec/AGENTS.md 2>/dev/null
160
168
  ```
161
169
 
162
170
  **1d. Gather User-Provided Requirements**