[SD-32] Add AI rules generation script and Makefile target#15
Conversation
SD-32 Implement GitHub Copilot rule configuration
Implement repository-specific rule configuration for GitHub Copilot based on the research findings from SD-12. Reference: Research document Deliverables:
Acceptance Criteria:
Implementation Notes: |
… and clarity - Updated AI rules documentation across multiple files to include notes for maintainers and detailed setup instructions. - Improved the Makefile to streamline AI rules generation and testing commands. - Enhanced the `generate_ai_rules.py` script to filter content based on target AI assistant types, ensuring appropriate sections are included or excluded. - Added related ADR references in existing ADR documents for better traceability.
…rt for Python 3.11
There was a problem hiding this comment.
Pull Request Overview
This PR adds tooling to generate AI assistant–specific rule files from a single master Markdown document, integrates the new command into the build, and aligns Python version requirements across configs.
- Introduce
scripts/generate_ai_rules.pyfor filteringdocs/ai/AI-rules.mdinto Copilot, Cursor, Claude, and Agents files. - Add an
ai-rulesMakefile target and update CI targets to include FFmpeg installation and Python 3.11. - Synchronize Python version (>=3.11) in
pyproject.toml, docs, and GitHub Actions.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate_ai_rules.py | New script to parse and split master AI rules by target. |
| pyproject.toml | Downgraded requires-python to >=3.11; separated testing deps into testing and testing-local. |
| docs/research/2025-06-03-copilot-jules-claude-rules.md | Updated Python version note to 3.11. |
| docs/ai/AI-rules.md | Added master AI rules with maintainer note and markers. |
| docs/adrs/current/003_standardized_adr_prompt.md | Added “Related ADRs” link. |
| docs/adrs/current/001_adrs_process.md | Added “Related ADRs” link. |
| Makefile | Expanded .PHONY, added ai-rules target, adjusted test/CI targets. |
| .github/workflows/ci.yml | Changed GitHub Actions Python version to 3.11; added FFmpeg install. |
| .github/copilot-instructions.md | Generated Copilot rules file. |
| CLAUDE.md | Generated Claude rules file. |
| AGENTS.md | Generated general agents rules file. |
| .cursorrules | Generated Cursor rules file. |
Comments suppressed due to low confidence (3)
scripts/generate_ai_rules.py:11
- Consider adding unit tests for
filter_content_for_targetand themainfunction to verify that each target (copilot, cursor, remote, claude) produces the expected output files.
def filter_content_for_target(content: str, target: str) -> str:
Makefile:94
- [nitpick] Please update the project README or contributing guide to document the new
make ai-rulestarget so contributors know how to regenerate AI assistant rules.
ai-rules:
Makefile:94
- [nitpick] The PR description refers to a
generate-ai-rulescommand, but the Makefile target is namedai-rules. Consider aligning these names for consistency.
ai-rules:
…fy the purpose of the --debug option
Summary
docs/ai/AI-rules.mdgenerate-ai-rulesAGENTS.md,CLAUDE.md,.cursorrulesTesting
make ai-rulesmake ci(fails: pytest complains about coverage arguments)https://chatgpt.com/codex/tasks/task_e_68498ff9d6a8832fb280f2fd5e0aabe8