Added import code review agent skill - #2160
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces new agent skills, prompts, and documentation for Data Commons import code reviews, review-signal mining, and signal merging, along with contract tests for the code review skill. The review feedback identifies three important issues: the newly added dc-import-review-signal-miner skill needs to be registered in .agents/skills.json, corresponding contract tests should be added for this new skill in skill_contract_test.py, and the GitHub REST API version specified in the miner's instructions must be corrected from 2026-03-10 to the supported 2022-11-28 to avoid API failures.
| { | ||
| "path": "agents/skills/dc-import-code-review" | ||
| }, |
There was a problem hiding this comment.
The newly added skill dc-import-review-signal-miner is not registered in .agents/skills.json. Registering it ensures it is discoverable and automatically validated by the contract tests.
| { | |
| "path": "agents/skills/dc-import-code-review" | |
| }, | |
| { | |
| "path": "agents/skills/dc-import-code-review" | |
| }, | |
| { | |
| "path": "agents/skills/dc-import-review-signal-miner" | |
| }, |
There was a problem hiding this comment.
that is intentional. Its not a intended to be used by everyone, else avoided auto loading by not adding to skills.json
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() |
There was a problem hiding this comment.
The newly added skill dc-import-review-signal-miner lacks contract tests in skill_contract_test.py. Adding a dedicated test class ensures that its structural contracts, registration, and path conventions are verified automatically.
class ImportReviewSignalMinerSkillContractTest(unittest.TestCase):
def setUp(self):
self._repo_root = Path(__file__).parents[3]
self._agents_root = self._repo_root / 'agents'
self._skill_root = (self._agents_root / 'skills/dc-import-review-signal-miner')
self._skill_path = self._skill_root / 'SKILL.md'
self._prompt_path = (self._agents_root /
'prompts/dc-import-review-signal-miner-starter.md')
def _read(self, relative_path: str) -> str:
return (self._repo_root / relative_path).read_text(encoding='utf-8')
def test_miner_skill_is_registered_and_discoverable(self):
registry = json.loads(self._read('.agents/skills.json'))
paths = [entry['path'] for entry in registry['entries']]
readme = self._read('agents/README.md')
prompt = self._prompt_path.read_text(encoding='utf-8')
self.assertIn('agents/skills/dc-import-review-signal-miner', paths)
self.assertIn('prompts/dc-import-review-signal-miner-starter.md', readme)
self.assertIn('dc-import-review-signal-miner', prompt)
def test_miner_skill_keeps_core_contract(self):
skill = self._skill_path.read_text(encoding='utf-8')
for marker in ('scripts/**', 'statvar_imports/**', 'read-only',
'Positive signal', 'Corrective signal', 'Considered', 'Not considered'):
with self.subTest(marker=marker):
self.assertIn(marker, skill)
def test_miner_guidance_uses_only_relative_paths(self):
sources = [self._skill_path, self._prompt_path]
for source in sources:
text = source.read_text(encoding='utf-8')
with self.subTest(source=source.name):
self.assertNotIn('/Users/', text)
self.assertNotIn('file://', text)
self.assertNotIn('<REPO_ROOT>/', text)
if __name__ == '__main__':
unittest.main()|
|
||
| ## Collect pull requests and comments | ||
|
|
||
| Use GitHub REST API version `2026-03-10`. Do not silently fall back to an |
There was a problem hiding this comment.
The GitHub REST API version is specified as 2026-03-10 in the skill instructions and shell variables. However, the only currently supported version is 2022-11-28. Specifying an invalid or future version will cause GitHub API requests to fail with a 400 Bad Request error. Please update the version to 2022-11-28.
No description provided.