Repository navigation
feat(skills): generate documentary skills from one source - #822
2 commits merged into
Conversation
|
The generator matches the three checked-in files byte for byte and the sync test does catch drift, verified by mutating skills/build-graph/SKILL.md. Tests and mypy are green. But ruff fails with 22 E501 line-too-long errors in the new DOCUMENTARY_SKILLS dict, skills.py lines 829-914, and CI runs ruff check on code_review_graph/ as a hard gate. Please reflow those long string literals under 100 chars using implicit concatenation; your own sync test will confirm the rendered output stays identical. Two smaller things. The description says the three SKILL.md files were regenerated, but the diff does not touch them; they already matched, so please correct that. In tests/test_document_skills.py the tool-name loop in test_render_documentary_skill_markdown_contains_expected_sections is tautological since content always contains the body verbatim, and get_affected_flows_tool appears in no body. Assert against the frontmatter and title instead, or drop the loop. No conflict with #779 or #821; those edit the other four skills and merge cleanly in either order. |
|
Outside this sweep's mission of verified coding-session token savings: the new documentary generator has byte-identical output and no runtime callers. It does not repair Qoder installation, because neither the installer nor wheel packaging is wired to it; the separate #909 repair uses the existing seven skill files directly. No code from this PR has been retained. |
|
This fails the checks once merged into pytest (py3.13, staging+PR merge): "FAILED tests/test_document_skills.py::test_checked_in_documentary_skills_match_generator" / "1 failed, 3225 passed, 9 skipped, 2 xpassed, 1 warning in 172.01s (0:02:52)". To fix:
Merge PRs now target |
code-review-graph reviewOverall risk: 0.40 (MEDIUM) — 5 changed function(s)/class(es), 1 affected flow(s), 0 test gap(s) Risk-scored changes
Affected execution flows
Token savings: this graph-backed report used ~30,753 fewer tokens (~96%) than reading every changed file in full (estimated, chars/4 approximation). Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
|
Thank you for this PR. I tested your branch with the latest staging, the new tests and ruff. Before I can merge it, please fix these:
The first two problems make the After you push the fix, I will test it again. |
There was a problem hiding this comment.
🟡 Changes recommended
The new regression test fails because all three checked-in skill files differ from the generated output, requiring the templates and skill files to be synchronized.
1 open issue
What changed in this PR
This PR centralizes the definitions of three documentation-driven skills in code_review_graph/skills.py, with generation helpers and regression checks intended to keep checked-in Markdown synchronized.
Changes:
- Defines templates for
build-graph,review-delta, andreview-pr. - Adds Markdown rendering and skill-directory generation helpers.
- Adds tests for expected content, generated files, and checked-in file parity.
| File | Description |
|---|---|
tests/test_document_skills.py |
Adds rendering, generation, and synchronization tests. |
code_review_graph/skills.py |
Adds shared skill definitions and Markdown generation helpers. |
Review effort: Balanced
| for slug in DOCUMENTARY_SKILLS: | ||
| generated = (generated_dir / slug / "SKILL.md").read_text(encoding="utf-8") | ||
| checked_in = (repo_root / "skills" / slug / "SKILL.md").read_text(encoding="utf-8") | ||
| assert generated == checked_in |
d01c1fd
…view of tirth8205#822) DOCUMENTARY_SKILLS still held the August text of build-graph, review-delta and review-pr, so the PR's own sync test failed on staging. Copies the current SKILL.md text in, and splits every string under 100 characters so ruff passes. The rendered files are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ches (review of tirth8205#822) Nothing called generate_documentary_skills, so the dict had no use but a test. scripts/generate_documentary_skills.py now writes the three files from it, and --check lists any that drift and exits 1. Also: - an unknown slug raises a KeyError that names the known skills; - a skill with no argument_hint renders without that line (tested); - files are written with LF so a Windows run does not rewrite them; - the tool-name loop in the render test checked the body against itself, so it now checks the frontmatter, title and body placement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Summary
Generate the three documentation-driven skills from
code_review_graph/skills.pyand keep the checked-inSKILL.mdfiles synced with that source.Changes
build-graph,review-delta, andreview-prskills/*/SKILL.mdfilesValidation
python -m compileall code_review_graph testspytest tests/test_document_skills.py tests/test_skills.py -q194 passed