Skip to content

Added import code review agent skill - #2160

Open
rohitkumarbhagat wants to merge 6 commits into
datacommonsorg:masterfrom
rohitkumarbhagat:code-review-agent
Open

Added import code review agent skill#2160
rohitkumarbhagat wants to merge 6 commits into
datacommonsorg:masterfrom
rohitkumarbhagat:code-review-agent

Conversation

@rohitkumarbhagat

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .agents/skills.json
Comment on lines +6 to +8
{
"path": "agents/skills/dc-import-code-review"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
{
"path": "agents/skills/dc-import-code-review"
},
{
"path": "agents/skills/dc-import-code-review"
},
{
"path": "agents/skills/dc-import-review-signal-miner"
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is intentional. Its not a intended to be used by everyone, else avoided auto loading by not adding to skills.json

Comment on lines +501 to 503

if __name__ == '__main__':
unittest.main()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant