genome-spy-python 0.1.0__tar.gz
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.
- genome_spy_python-0.1.0/.agents/skills/commit/SKILL.md +105 -0
- genome_spy_python-0.1.0/.agents/skills/proper-code-review/SKILL.md +165 -0
- genome_spy_python-0.1.0/.agents/skills/proper-code-review/references/correctness.md +151 -0
- genome_spy_python-0.1.0/.agents/skills/proper-code-review/references/design.md +161 -0
- genome_spy_python-0.1.0/.agents/skills/proper-code-review/references/performance.md +154 -0
- genome_spy_python-0.1.0/.claude/skills/commit/SKILL.md +105 -0
- genome_spy_python-0.1.0/.claude/skills/proper-code-review/SKILL.md +164 -0
- genome_spy_python-0.1.0/.claude/skills/proper-code-review/references/correctness.md +151 -0
- genome_spy_python-0.1.0/.claude/skills/proper-code-review/references/design.md +161 -0
- genome_spy_python-0.1.0/.claude/skills/proper-code-review/references/performance.md +154 -0
- genome_spy_python-0.1.0/.gitattributes +7 -0
- genome_spy_python-0.1.0/.github/workflows/ci.yml +70 -0
- genome_spy_python-0.1.0/.github/workflows/docs.yml +52 -0
- genome_spy_python-0.1.0/.github/workflows/release.yml +88 -0
- genome_spy_python-0.1.0/.gitignore +249 -0
- genome_spy_python-0.1.0/.pre-commit-config.yaml +17 -0
- genome_spy_python-0.1.0/.python-version +1 -0
- genome_spy_python-0.1.0/AGENTS.md +156 -0
- genome_spy_python-0.1.0/CHANGELOG.md +30 -0
- genome_spy_python-0.1.0/CLAUDE.md +1 -0
- genome_spy_python-0.1.0/CONTRIBUTING.md +218 -0
- genome_spy_python-0.1.0/LICENSE +21 -0
- genome_spy_python-0.1.0/LICENSES/ALTAIR-BSD-3-Clause.txt +27 -0
- genome_spy_python-0.1.0/LICENSES/GALLERY-DATA-MIT.txt +22 -0
- genome_spy_python-0.1.0/PKG-INFO +185 -0
- genome_spy_python-0.1.0/README.md +153 -0
- genome_spy_python-0.1.0/THIRD_PARTY_NOTICES.md +42 -0
- genome_spy_python-0.1.0/docs/_ext/genomespy_gallery.py +593 -0
- genome_spy_python-0.1.0/docs/_static/data/README.md +179 -0
- genome_spy_python-0.1.0/docs/_static/data/airway_metadata.csv +9 -0
- genome_spy_python-0.1.0/docs/_static/data/airway_scaledcounts.csv +38695 -0
- genome_spy_python-0.1.0/docs/_static/data/hapmap_gwas.csv +14413 -0
- genome_spy_python-0.1.0/docs/_static/data/oncoprint_dataset3.json +266 -0
- genome_spy_python-0.1.0/docs/_static/data/pik3ca_mutations.json +1 -0
- genome_spy_python-0.1.0/docs/_static/external-links.js +18 -0
- genome_spy_python-0.1.0/docs/_static/gallery/airway_ma_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/airway_volcano_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/ascat_copy_number.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/ascat_fitting.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/bam_read_alignments.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/bigbed_ccre_track.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/brush_linked_genome_tracks.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/clinvar_variants.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/combined_laml_oncoplot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/composing_genome_browser.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/copy_number.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/cytobands.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/dynseq_bqtl.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/genome_tracks.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/gff3_gene_annotations.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/hcc1954_sv_cnv.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/indexed_fasta_sequence.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/link_mark.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/luad_oncoprint.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/manhattan_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/multiple_sequence_alignment.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/needle_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/oncoprint.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/p53_sequence_comparison.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/pik3ca_tcga_brca_lollipop.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/point_mark.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/rainfall_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/ranged_rule.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/rect_heatmap.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/refseq_scored_genes.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/sashimi_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/scrollable_viewport.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/sequence_logo.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/six_frame_translation.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/stacked_genome_browser.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/tcga_ov_gistic.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/upset_mutations.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/vertical_concat.png +0 -0
- genome_spy_python-0.1.0/docs/_static/gallery/volcano_plot.png +0 -0
- genome_spy_python-0.1.0/docs/_static/genomespy.css +336 -0
- genome_spy_python-0.1.0/docs/_static/snaketie.svg +74 -0
- genome_spy_python-0.1.0/docs/_templates/autosummary/class.rst +31 -0
- genome_spy_python-0.1.0/docs/_templates/autosummary/class_own_members.rst +19 -0
- genome_spy_python-0.1.0/docs/_templates/components/view-this-page.html +15 -0
- genome_spy_python-0.1.0/docs/about.md +47 -0
- genome_spy_python-0.1.0/docs/api.md +217 -0
- genome_spy_python-0.1.0/docs/conf.py +104 -0
- genome_spy_python-0.1.0/docs/datasets.md +73 -0
- genome_spy_python-0.1.0/docs/examples/airway_ma_plot.md +17 -0
- genome_spy_python-0.1.0/docs/examples/airway_ma_plot.py +196 -0
- genome_spy_python-0.1.0/docs/examples/airway_volcano_plot.md +16 -0
- genome_spy_python-0.1.0/docs/examples/airway_volcano_plot.py +210 -0
- genome_spy_python-0.1.0/docs/examples/ascat_copy_number.md +28 -0
- genome_spy_python-0.1.0/docs/examples/ascat_copy_number.py +152 -0
- genome_spy_python-0.1.0/docs/examples/ascat_fitting.md +27 -0
- genome_spy_python-0.1.0/docs/examples/ascat_fitting.py +591 -0
- genome_spy_python-0.1.0/docs/examples/bam_read_alignments.md +37 -0
- genome_spy_python-0.1.0/docs/examples/bam_read_alignments.py +359 -0
- genome_spy_python-0.1.0/docs/examples/bigbed_ccre_track.py +51 -0
- genome_spy_python-0.1.0/docs/examples/brush_linked_genome_tracks.md +48 -0
- genome_spy_python-0.1.0/docs/examples/brush_linked_genome_tracks.py +139 -0
- genome_spy_python-0.1.0/docs/examples/clinvar_variants.md +23 -0
- genome_spy_python-0.1.0/docs/examples/clinvar_variants.py +125 -0
- genome_spy_python-0.1.0/docs/examples/combined_laml_oncoplot.md +30 -0
- genome_spy_python-0.1.0/docs/examples/combined_laml_oncoplot.py +419 -0
- genome_spy_python-0.1.0/docs/examples/composing_genome_browser.md +38 -0
- genome_spy_python-0.1.0/docs/examples/composing_genome_browser.py +50 -0
- genome_spy_python-0.1.0/docs/examples/copy_number.py +67 -0
- genome_spy_python-0.1.0/docs/examples/cytobands.md +24 -0
- genome_spy_python-0.1.0/docs/examples/cytobands.py +116 -0
- genome_spy_python-0.1.0/docs/examples/dynseq_bqtl.md +32 -0
- genome_spy_python-0.1.0/docs/examples/dynseq_bqtl.py +158 -0
- genome_spy_python-0.1.0/docs/examples/genome_tracks.py +206 -0
- genome_spy_python-0.1.0/docs/examples/gff3_gene_annotations.md +21 -0
- genome_spy_python-0.1.0/docs/examples/gff3_gene_annotations.py +216 -0
- genome_spy_python-0.1.0/docs/examples/hcc1954_sv_cnv.md +32 -0
- genome_spy_python-0.1.0/docs/examples/hcc1954_sv_cnv.py +244 -0
- genome_spy_python-0.1.0/docs/examples/indexed_fasta_sequence.py +77 -0
- genome_spy_python-0.1.0/docs/examples/link_mark.py +29 -0
- genome_spy_python-0.1.0/docs/examples/luad_oncoprint.md +10 -0
- genome_spy_python-0.1.0/docs/examples/luad_oncoprint.py +446 -0
- genome_spy_python-0.1.0/docs/examples/manhattan_plot.md +15 -0
- genome_spy_python-0.1.0/docs/examples/manhattan_plot.py +127 -0
- genome_spy_python-0.1.0/docs/examples/multiple_sequence_alignment.md +26 -0
- genome_spy_python-0.1.0/docs/examples/multiple_sequence_alignment.py +91 -0
- genome_spy_python-0.1.0/docs/examples/needle_plot.py +158 -0
- genome_spy_python-0.1.0/docs/examples/oncoprint.md +10 -0
- genome_spy_python-0.1.0/docs/examples/oncoprint.py +219 -0
- genome_spy_python-0.1.0/docs/examples/p53_sequence_comparison.md +29 -0
- genome_spy_python-0.1.0/docs/examples/p53_sequence_comparison.py +246 -0
- genome_spy_python-0.1.0/docs/examples/pik3ca_tcga_brca_lollipop.md +34 -0
- genome_spy_python-0.1.0/docs/examples/pik3ca_tcga_brca_lollipop.py +211 -0
- genome_spy_python-0.1.0/docs/examples/point_mark.py +34 -0
- genome_spy_python-0.1.0/docs/examples/rainfall_plot.md +30 -0
- genome_spy_python-0.1.0/docs/examples/rainfall_plot.py +228 -0
- genome_spy_python-0.1.0/docs/examples/ranged_rule.py +29 -0
- genome_spy_python-0.1.0/docs/examples/rect_heatmap.py +30 -0
- genome_spy_python-0.1.0/docs/examples/refseq_scored_genes.md +27 -0
- genome_spy_python-0.1.0/docs/examples/refseq_scored_genes.py +152 -0
- genome_spy_python-0.1.0/docs/examples/sashimi_plot.md +22 -0
- genome_spy_python-0.1.0/docs/examples/sashimi_plot.py +123 -0
- genome_spy_python-0.1.0/docs/examples/scrollable_viewport.py +35 -0
- genome_spy_python-0.1.0/docs/examples/sequence_logo.py +55 -0
- genome_spy_python-0.1.0/docs/examples/six_frame_translation.md +26 -0
- genome_spy_python-0.1.0/docs/examples/six_frame_translation.py +285 -0
- genome_spy_python-0.1.0/docs/examples/stacked_genome_browser.py +336 -0
- genome_spy_python-0.1.0/docs/examples/tcga_ov_gistic.md +38 -0
- genome_spy_python-0.1.0/docs/examples/tcga_ov_gistic.py +257 -0
- genome_spy_python-0.1.0/docs/examples/upset_mutations.md +30 -0
- genome_spy_python-0.1.0/docs/examples/upset_mutations.py +329 -0
- genome_spy_python-0.1.0/docs/examples/vertical_concat.py +44 -0
- genome_spy_python-0.1.0/docs/examples/volcano_plot.md +15 -0
- genome_spy_python-0.1.0/docs/examples/volcano_plot.py +113 -0
- genome_spy_python-0.1.0/docs/getting-started.md +193 -0
- genome_spy_python-0.1.0/docs/index.md +67 -0
- genome_spy_python-0.1.0/docs/tutorials/annotations.py +198 -0
- genome_spy_python-0.1.0/docs/tutorials/charts_and_marks.py +99 -0
- genome_spy_python-0.1.0/docs/tutorials/composition.py +185 -0
- genome_spy_python-0.1.0/docs/tutorials/configuration.py +102 -0
- genome_spy_python-0.1.0/docs/tutorials/data_inputs.py +73 -0
- genome_spy_python-0.1.0/docs/tutorials/display_controls.py +74 -0
- genome_spy_python-0.1.0/docs/tutorials/encoding_channels.py +136 -0
- genome_spy_python-0.1.0/docs/tutorials/genome_browser_layouts.py +92 -0
- genome_spy_python-0.1.0/docs/tutorials/genomic_coordinates.py +158 -0
- genome_spy_python-0.1.0/docs/tutorials/genomic_data.py +47 -0
- genome_spy_python-0.1.0/docs/tutorials/getting_started.py +80 -0
- genome_spy_python-0.1.0/docs/tutorials/importing_specifications.py +14 -0
- genome_spy_python-0.1.0/docs/tutorials/interaction.py +275 -0
- genome_spy_python-0.1.0/docs/tutorials/notebooks.py +54 -0
- genome_spy_python-0.1.0/docs/tutorials/scales_and_guides.py +71 -0
- genome_spy_python-0.1.0/docs/tutorials/serialization.py +53 -0
- genome_spy_python-0.1.0/docs/tutorials/transforms.py +74 -0
- genome_spy_python-0.1.0/docs/user-guide/annotations.md +95 -0
- genome_spy_python-0.1.0/docs/user-guide/charts.md +131 -0
- genome_spy_python-0.1.0/docs/user-guide/composition.md +151 -0
- genome_spy_python-0.1.0/docs/user-guide/configuration.md +188 -0
- genome_spy_python-0.1.0/docs/user-guide/data.md +162 -0
- genome_spy_python-0.1.0/docs/user-guide/display-controls.md +103 -0
- genome_spy_python-0.1.0/docs/user-guide/encodings.md +157 -0
- genome_spy_python-0.1.0/docs/user-guide/genome-browser-layouts.md +153 -0
- genome_spy_python-0.1.0/docs/user-guide/genomic-axes.md +185 -0
- genome_spy_python-0.1.0/docs/user-guide/genomic-data.md +131 -0
- genome_spy_python-0.1.0/docs/user-guide/importing-specifications.md +53 -0
- genome_spy_python-0.1.0/docs/user-guide/index.md +92 -0
- genome_spy_python-0.1.0/docs/user-guide/interaction.md +215 -0
- genome_spy_python-0.1.0/docs/user-guide/notebooks.md +140 -0
- genome_spy_python-0.1.0/docs/user-guide/scales-axes-legends.md +151 -0
- genome_spy_python-0.1.0/docs/user-guide/serialization.md +62 -0
- genome_spy_python-0.1.0/docs/user-guide/transforms.md +191 -0
- genome_spy_python-0.1.0/pyproject.toml +109 -0
- genome_spy_python-0.1.0/src/genome_spy/__init__.py +199 -0
- genome_spy_python-0.1.0/src/genome_spy/_chart_authoring.py +231 -0
- genome_spy_python-0.1.0/src/genome_spy/_conditions.py +72 -0
- genome_spy_python-0.1.0/src/genome_spy/_embed.py +87 -0
- genome_spy_python-0.1.0/src/genome_spy/_expressions.py +271 -0
- genome_spy_python-0.1.0/src/genome_spy/_parameters.py +267 -0
- genome_spy_python-0.1.0/src/genome_spy/_render.py +207 -0
- genome_spy_python-0.1.0/src/genome_spy/_utils.py +75 -0
- genome_spy_python-0.1.0/src/genome_spy/_widget.py +262 -0
- genome_spy_python-0.1.0/src/genome_spy/api.py +198 -0
- genome_spy_python-0.1.0/src/genome_spy/arrow.py +155 -0
- genome_spy_python-0.1.0/src/genome_spy/channels.py +193 -0
- genome_spy_python-0.1.0/src/genome_spy/chart.py +1240 -0
- genome_spy_python-0.1.0/src/genome_spy/data.py +56 -0
- genome_spy_python-0.1.0/src/genome_spy/data_transformers.py +267 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/__init__.py +189 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_airway.py +219 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_annotations.py +37 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_gistic.py +43 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_grammar.py +66 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_hapmap.py +180 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_mutation.py +289 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/_oncoprint.py +523 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/airway_metadata.csv +9 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/airway_scaledcounts.csv +38695 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/brca.maf.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/hapmap_gwas.csv +14413 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/mutation_impact_reference.json +27 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/oncoprint_dataset3.json +266 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/p53_sequence_comparison.json.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/pik3ca_mutations.json +1 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/pik3ca_tcga_brca_lollipop.json +38 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/refseq_gene_bodies.csv.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tal1_alphagenome_reference.json.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga.tsv +146 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga_laml.maf.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga_laml_annot.tsv +201 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga_laml_combined_oncoplot.json.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga_ov_gistic_lesions.tsv.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/datasets/data/tcga_ov_gistic_scores.tsv.gz +0 -0
- genome_spy_python-0.1.0/src/genome_spy/helpers.py +185 -0
- genome_spy_python-0.1.0/src/genome_spy/jupyter.py +5 -0
- genome_spy_python-0.1.0/src/genome_spy/py.typed +0 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/__init__.py +784 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/_kwds.py +1394 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/_typing.py +186 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/capabilities.json +593 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/channels.py +8943 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/composition.py +1064 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/core.py +51821 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/ergonomics.py +2056 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/expressions.py +476 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/genome-spy-schema.json +33657 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/lazy.py +326 -0
- genome_spy_python-0.1.0/src/genome_spy/schema/mixins.py +11684 -0
- genome_spy_python-0.1.0/src/genome_spy/schemapi.py +264 -0
- genome_spy_python-0.1.0/src/genome_spy/static/widget.js +345 -0
- genome_spy_python-0.1.0/tests/__init__.py +0 -0
- genome_spy_python-0.1.0/tests/test_arrow.py +144 -0
- genome_spy_python-0.1.0/tests/test_chart.py +1904 -0
- genome_spy_python-0.1.0/tests/test_combined_gallery_data.py +233 -0
- genome_spy_python-0.1.0/tests/test_data_transformers.py +320 -0
- genome_spy_python-0.1.0/tests/test_datasets.py +411 -0
- genome_spy_python-0.1.0/tests/test_docs_api_reference.py +91 -0
- genome_spy_python-0.1.0/tests/test_docs_gallery.py +1931 -0
- genome_spy_python-0.1.0/tests/test_docs_tutorial.py +1069 -0
- genome_spy_python-0.1.0/tests/test_expressions.py +106 -0
- genome_spy_python-0.1.0/tests/test_generated_schema_package.py +396 -0
- genome_spy_python-0.1.0/tests/test_generated_transform_methods.py +98 -0
- genome_spy_python-0.1.0/tests/test_render_thumbnails.py +152 -0
- genome_spy_python-0.1.0/tests/test_schema_codegen.py +1139 -0
- genome_spy_python-0.1.0/tests/test_widget.py +238 -0
- genome_spy_python-0.1.0/tests/widget.test.mjs +665 -0
- genome_spy_python-0.1.0/tools/docs_gallery.py +356 -0
- genome_spy_python-0.1.0/tools/generate_api_docs.py +224 -0
- genome_spy_python-0.1.0/tools/generate_schema_wrapper.py +495 -0
- genome_spy_python-0.1.0/tools/prepare_combined_gallery_data.py +313 -0
- genome_spy_python-0.1.0/tools/prepare_refseq_gene_annotations.py +171 -0
- genome_spy_python-0.1.0/tools/render_thumbnails.py +476 -0
- genome_spy_python-0.1.0/tools/schemapi/__init__.py +8 -0
- genome_spy_python-0.1.0/tools/schemapi/codegen.py +4869 -0
- genome_spy_python-0.1.0/tools/schemapi/expression_codegen.py +168 -0
- genome_spy_python-0.1.0/uv.lock +3338 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Commit repository changes in small thematic chunks using conventional commits and concise changelog staging.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Commit Workflow
|
|
7
|
+
|
|
8
|
+
Prefer several small thematic commits over one broad commit.
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
* Run `git status --short` first.
|
|
13
|
+
* Use conventional commits: `<type>(<scope>): <description>`.
|
|
14
|
+
* Split independently meaningful changes.
|
|
15
|
+
* Keep implementation and its direct tests together when they form one change.
|
|
16
|
+
* Leave unrelated user changes unstaged.
|
|
17
|
+
* Do not amend, rewrite history, revert, force-push, or add co-author trailers unless explicitly requested.
|
|
18
|
+
|
|
19
|
+
## Efficient Inspection
|
|
20
|
+
|
|
21
|
+
Minimize token use.
|
|
22
|
+
|
|
23
|
+
Use:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git status --short
|
|
27
|
+
git diff --stat
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use targeted diffs only when needed:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git diff -- <files>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Do not read the full diff or re-review code by default.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
1. Inspect `git status --short`.
|
|
41
|
+
2. Group files into thematic commit slices.
|
|
42
|
+
3. Use targeted diffs only when grouping is unclear.
|
|
43
|
+
4. Stage one slice.
|
|
44
|
+
5. Verify with `git diff --cached --stat`.
|
|
45
|
+
6. Commit with a conventional commit message.
|
|
46
|
+
7. Repeat for remaining slices.
|
|
47
|
+
8. Run `git status --short` at the end.
|
|
48
|
+
9. Update `CHANGELOG_STAGING.md` once if release-relevant changes were committed.
|
|
49
|
+
10. Report commit hashes and remaining uncommitted files.
|
|
50
|
+
|
|
51
|
+
## Commit Boundaries
|
|
52
|
+
|
|
53
|
+
A commit should represent one independently understandable change.
|
|
54
|
+
|
|
55
|
+
Split separate features, fixes, refactors, tooling/config changes, documentation, and unrelated test work.
|
|
56
|
+
|
|
57
|
+
Usually keep together:
|
|
58
|
+
|
|
59
|
+
* implementation and direct tests;
|
|
60
|
+
* API/schema changes and required supporting code;
|
|
61
|
+
* generated files and their source change.
|
|
62
|
+
|
|
63
|
+
Do not split mechanically by file.
|
|
64
|
+
|
|
65
|
+
When cleanly separable, prefer multiple commits.
|
|
66
|
+
|
|
67
|
+
## Conventional Commits
|
|
68
|
+
|
|
69
|
+
Common types:
|
|
70
|
+
|
|
71
|
+
* `feat`
|
|
72
|
+
* `fix`
|
|
73
|
+
* `refactor`
|
|
74
|
+
* `perf`
|
|
75
|
+
* `test`
|
|
76
|
+
* `docs`
|
|
77
|
+
* `chore`
|
|
78
|
+
* `build`
|
|
79
|
+
* `ci`
|
|
80
|
+
|
|
81
|
+
Examples:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
feat(parser): add strand-aware bigwig loading
|
|
85
|
+
fix(cache): invalidate stale entries
|
|
86
|
+
refactor(pipeline): simplify track dispatch
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Changelog Staging
|
|
90
|
+
|
|
91
|
+
`CHANGELOG_STAGING.md` is for future release notes.
|
|
92
|
+
|
|
93
|
+
Update it once per commit session only for release-relevant changes.
|
|
94
|
+
|
|
95
|
+
* Read only the minimum needed context.
|
|
96
|
+
* Add concise bullets under `Added`, `Changed`, `Fixed`, `Removed`, or `Performance`.
|
|
97
|
+
* Prefer one resulting-change bullet over one bullet per commit.
|
|
98
|
+
* Omit routine refactors, formatting, test-only work, and internal details unless release-relevant.
|
|
99
|
+
* Avoid duplicates.
|
|
100
|
+
|
|
101
|
+
## Default Rule
|
|
102
|
+
|
|
103
|
+
> Prefer the smallest coherent commit representing one independently understandable change.
|
|
104
|
+
|
|
105
|
+
Avoid unnecessary diff reading.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: proper-code-review
|
|
3
|
+
description: Review code changes for correctness, simplicity, readability, maintainability, architectural fit, and meaningful system-level performance. Use when asked to review a diff, implementation, branch, or recent code changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
Review the current changes as a senior engineer.
|
|
9
|
+
|
|
10
|
+
Optimize for correctness and low total lifecycle complexity. Prefer simple, readable, maintainable implementations that fit the existing repository and are sufficiently performant for realistic workloads.
|
|
11
|
+
|
|
12
|
+
Prefer a few high-confidence findings over exhaustive commentary.
|
|
13
|
+
|
|
14
|
+
## Core Principles
|
|
15
|
+
|
|
16
|
+
* Correctness comes first.
|
|
17
|
+
* Prefer the simplest adequate solution (the KISS principle).
|
|
18
|
+
* Optimize for local reasoning and localized change.
|
|
19
|
+
* Avoid duplicated knowledge and parallel mechanisms.
|
|
20
|
+
* Reuse existing repository concepts when appropriate.
|
|
21
|
+
* Avoid speculative abstraction and extensibility.
|
|
22
|
+
* Require concrete justification for added complexity.
|
|
23
|
+
* Judge performance at the system level, not only locally.
|
|
24
|
+
* Do not manufacture findings.
|
|
25
|
+
|
|
26
|
+
Complexity must pay for itself through a concrete benefit such as correctness, meaningful reuse, change locality, real variation, necessary scalability, or material performance.
|
|
27
|
+
|
|
28
|
+
## Review Method
|
|
29
|
+
|
|
30
|
+
### 1. Understand the change
|
|
31
|
+
|
|
32
|
+
Read the diff first.
|
|
33
|
+
|
|
34
|
+
Determine:
|
|
35
|
+
|
|
36
|
+
* what problem the change solves;
|
|
37
|
+
* what behavior changes;
|
|
38
|
+
* which interfaces, invariants, state, or architectural concepts are affected.
|
|
39
|
+
|
|
40
|
+
Inspect only enough surrounding repository context to answer concrete review questions.
|
|
41
|
+
|
|
42
|
+
When relevant:
|
|
43
|
+
|
|
44
|
+
* inspect callers before claiming breakage;
|
|
45
|
+
* inspect tests for intended behavior and invariants;
|
|
46
|
+
* search for existing mechanisms before proposing new ones;
|
|
47
|
+
* inspect analogous implementations when evaluating duplication or architectural fit;
|
|
48
|
+
* inspect the broader execution path when evaluating performance.
|
|
49
|
+
|
|
50
|
+
Do not attempt to understand the entire repository.
|
|
51
|
+
|
|
52
|
+
### 2. Verify before judging
|
|
53
|
+
|
|
54
|
+
Treat potential findings as hypotheses.
|
|
55
|
+
|
|
56
|
+
Before reporting a concern, verify it against the repository when possible.
|
|
57
|
+
|
|
58
|
+
Examples:
|
|
59
|
+
|
|
60
|
+
* locate the duplicated representation before claiming duplicated knowledge;
|
|
61
|
+
* inspect callers before claiming API incompatibility;
|
|
62
|
+
* search for existing abstractions before proposing a new one;
|
|
63
|
+
* establish performance significance before criticizing or recommending optimization.
|
|
64
|
+
|
|
65
|
+
Do not present assumptions as facts.
|
|
66
|
+
|
|
67
|
+
### 3. Review correctness
|
|
68
|
+
|
|
69
|
+
Look for concrete:
|
|
70
|
+
|
|
71
|
+
* behavioral bugs and regressions;
|
|
72
|
+
* broken invariants;
|
|
73
|
+
* invalid assumptions;
|
|
74
|
+
* relevant edge cases;
|
|
75
|
+
* unsafe mutation or state transitions;
|
|
76
|
+
* error-handling or resource-lifecycle problems;
|
|
77
|
+
* concurrency issues;
|
|
78
|
+
* unintended compatibility changes.
|
|
79
|
+
|
|
80
|
+
Passing tests are evidence, not proof.
|
|
81
|
+
|
|
82
|
+
Use `references/correctness.md` when deeper analysis is useful.
|
|
83
|
+
|
|
84
|
+
### 4. Review design
|
|
85
|
+
|
|
86
|
+
Evaluate simplicity, readability, maintainability, cohesion, coupling, abstraction, change locality, blast radius, and architectural fit together.
|
|
87
|
+
|
|
88
|
+
Ask:
|
|
89
|
+
|
|
90
|
+
* Could this be simpler? The KISS principle!
|
|
91
|
+
* Can it be understood and changed locally?
|
|
92
|
+
* Does one conceptual change require synchronized edits?
|
|
93
|
+
* Has unnecessary machinery been introduced?
|
|
94
|
+
* Does this duplicate an existing repository mechanism?
|
|
95
|
+
* Does an abstraction represent real shared semantics?
|
|
96
|
+
* Is the solution proportional to the problem?
|
|
97
|
+
* YAGNI principle ("You Aren't Gonna Need It")
|
|
98
|
+
|
|
99
|
+
Prefer straightforward implementations when additional cleverness provides little concrete benefit.
|
|
100
|
+
|
|
101
|
+
Use `references/design.md` when deeper analysis is useful.
|
|
102
|
+
|
|
103
|
+
### 5. Review performance
|
|
104
|
+
|
|
105
|
+
Look for meaningful issues involving:
|
|
106
|
+
|
|
107
|
+
* algorithmic complexity;
|
|
108
|
+
* repeated expensive work;
|
|
109
|
+
* I/O;
|
|
110
|
+
* memory and copying;
|
|
111
|
+
* serialization or data movement;
|
|
112
|
+
* CPU/GPU synchronization;
|
|
113
|
+
* realistic scaling.
|
|
114
|
+
|
|
115
|
+
Judge optimizations by end-to-end impact.
|
|
116
|
+
|
|
117
|
+
Do not accept meaningful complexity for negligible local gains.
|
|
118
|
+
|
|
119
|
+
Use `references/performance.md` when performance is relevant.
|
|
120
|
+
|
|
121
|
+
### 6. Validate findings
|
|
122
|
+
|
|
123
|
+
Before reporting each finding, ask:
|
|
124
|
+
|
|
125
|
+
* Is the problem concrete?
|
|
126
|
+
* Is the consequence meaningful?
|
|
127
|
+
* Does the evidence support it?
|
|
128
|
+
* Is the recommendation proportionate?
|
|
129
|
+
* Does the proposed fix reduce total complexity?
|
|
130
|
+
|
|
131
|
+
Remove speculative, cosmetic, generic, or low-value comments.
|
|
132
|
+
|
|
133
|
+
Prefer no finding over a weak finding.
|
|
134
|
+
|
|
135
|
+
## Output
|
|
136
|
+
|
|
137
|
+
Report findings in descending order of practical impact.
|
|
138
|
+
|
|
139
|
+
For each finding:
|
|
140
|
+
|
|
141
|
+
### `[Severity] Short problem statement`
|
|
142
|
+
|
|
143
|
+
**Location:** Smallest useful code region.
|
|
144
|
+
|
|
145
|
+
**Problem:** What is wrong.
|
|
146
|
+
|
|
147
|
+
**Impact:** Why it matters here.
|
|
148
|
+
|
|
149
|
+
**Recommendation:** Smallest reasonable fix.
|
|
150
|
+
|
|
151
|
+
Use:
|
|
152
|
+
|
|
153
|
+
* **Critical** — correctness, data loss, security, or severe failure.
|
|
154
|
+
* **Important** — substantial behavioral, architectural, maintainability, performance, or scalability issue.
|
|
155
|
+
* **Minor** — worthwhile simplification or readability improvement.
|
|
156
|
+
|
|
157
|
+
Normally omit stylistic nits.
|
|
158
|
+
|
|
159
|
+
Combine findings with the same root cause.
|
|
160
|
+
|
|
161
|
+
State uncertainty explicitly.
|
|
162
|
+
|
|
163
|
+
Do not include generic best-practice advice, speculative future concerns, praise for unaffected code, or alternative architectures merely because they are possible.
|
|
164
|
+
|
|
165
|
+
If no meaningful issues remain, say that no significant issues were found.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Correctness Review
|
|
2
|
+
|
|
3
|
+
Correctness review asks whether the change preserves the intended behavior of the system across realistic inputs, states, and failure conditions.
|
|
4
|
+
|
|
5
|
+
Passing tests are evidence of correctness, not proof.
|
|
6
|
+
|
|
7
|
+
## Understand the Contract
|
|
8
|
+
|
|
9
|
+
Determine what the code is expected to guarantee.
|
|
10
|
+
|
|
11
|
+
Consider:
|
|
12
|
+
|
|
13
|
+
* input assumptions;
|
|
14
|
+
* output guarantees;
|
|
15
|
+
* state transitions;
|
|
16
|
+
* API behavior;
|
|
17
|
+
* ordering;
|
|
18
|
+
* persistence;
|
|
19
|
+
* error behavior;
|
|
20
|
+
* compatibility;
|
|
21
|
+
* important domain invariants.
|
|
22
|
+
|
|
23
|
+
A correctness finding should identify a concrete way the intended contract can be violated.
|
|
24
|
+
|
|
25
|
+
## Behavioral Changes
|
|
26
|
+
|
|
27
|
+
Check whether the patch changes behavior beyond its stated purpose.
|
|
28
|
+
|
|
29
|
+
Look for unintended changes to:
|
|
30
|
+
|
|
31
|
+
* defaults;
|
|
32
|
+
* return values or shapes;
|
|
33
|
+
* ordering;
|
|
34
|
+
* mutation;
|
|
35
|
+
* exceptions;
|
|
36
|
+
* serialization;
|
|
37
|
+
* persistence;
|
|
38
|
+
* handling of missing or invalid input;
|
|
39
|
+
* behavior visible to callers.
|
|
40
|
+
|
|
41
|
+
Small implementation changes can have large effects at module boundaries.
|
|
42
|
+
|
|
43
|
+
## Edge Cases and Invariants
|
|
44
|
+
|
|
45
|
+
Prioritize edge cases that are realistic for the domain and changed logic.
|
|
46
|
+
|
|
47
|
+
Examples include:
|
|
48
|
+
|
|
49
|
+
* empty or single-element inputs;
|
|
50
|
+
* missing or malformed data;
|
|
51
|
+
* duplicates;
|
|
52
|
+
* boundary values;
|
|
53
|
+
* partial failures;
|
|
54
|
+
* large inputs where behavior changes.
|
|
55
|
+
|
|
56
|
+
Identify invariants that must remain true, such as:
|
|
57
|
+
|
|
58
|
+
* related collections remaining aligned;
|
|
59
|
+
* identifiers remaining unique;
|
|
60
|
+
* ordering being preserved;
|
|
61
|
+
* cached state matching source state;
|
|
62
|
+
* state transitions occurring in a valid order.
|
|
63
|
+
|
|
64
|
+
Do not generate exhaustive theoretical edge cases without evidence that they matter.
|
|
65
|
+
|
|
66
|
+
## State and Mutation
|
|
67
|
+
|
|
68
|
+
Ask:
|
|
69
|
+
|
|
70
|
+
* What state is mutated?
|
|
71
|
+
* Is mutation expected by callers?
|
|
72
|
+
* Can partial mutation remain after failure?
|
|
73
|
+
* Is state shared across calls?
|
|
74
|
+
* Can stale state survive?
|
|
75
|
+
* Does aliasing versus copying matter?
|
|
76
|
+
|
|
77
|
+
Pay particular attention when the change introduces shared state, caching, batching, or multiple representations of the same data.
|
|
78
|
+
|
|
79
|
+
## Error and Resource Handling
|
|
80
|
+
|
|
81
|
+
Look for:
|
|
82
|
+
|
|
83
|
+
* swallowed exceptions;
|
|
84
|
+
* overly broad exception handling;
|
|
85
|
+
* failures converted into silently incorrect results;
|
|
86
|
+
* lost error context;
|
|
87
|
+
* retries that can duplicate side effects;
|
|
88
|
+
* cleanup skipped on exceptions or early returns.
|
|
89
|
+
|
|
90
|
+
When relevant, verify lifecycle handling for files, sockets, database connections, subprocesses, locks, temporary files, and accelerator resources.
|
|
91
|
+
|
|
92
|
+
Do not recommend defensive error handling without a concrete failure mode.
|
|
93
|
+
|
|
94
|
+
## Concurrency
|
|
95
|
+
|
|
96
|
+
When the change involves threads, processes, asynchronous execution, or shared state, inspect:
|
|
97
|
+
|
|
98
|
+
* races;
|
|
99
|
+
* ordering assumptions;
|
|
100
|
+
* atomicity;
|
|
101
|
+
* cancellation;
|
|
102
|
+
* shared mutation;
|
|
103
|
+
* duplicated work;
|
|
104
|
+
* deadlocks;
|
|
105
|
+
* partial completion;
|
|
106
|
+
* exception propagation.
|
|
107
|
+
|
|
108
|
+
Do not flag concurrency merely because it is complex. Identify a concrete unsafe interaction.
|
|
109
|
+
|
|
110
|
+
## Boundaries and Compatibility
|
|
111
|
+
|
|
112
|
+
Pay attention where assumptions cross boundaries, such as:
|
|
113
|
+
|
|
114
|
+
* parser → internal representation;
|
|
115
|
+
* serializer → external format;
|
|
116
|
+
* CPU → GPU;
|
|
117
|
+
* synchronous → asynchronous execution;
|
|
118
|
+
* library → application;
|
|
119
|
+
* application → persistent storage.
|
|
120
|
+
|
|
121
|
+
Check relevant types, shapes, units, coordinate systems, encoding, ownership, and lifetime.
|
|
122
|
+
|
|
123
|
+
When interfaces change, inspect relevant consumers before claiming breakage.
|
|
124
|
+
|
|
125
|
+
Do not demand backward compatibility unless the repository actually requires it.
|
|
126
|
+
|
|
127
|
+
## Tests
|
|
128
|
+
|
|
129
|
+
Use tests to understand intended behavior, invariants, and regression risk.
|
|
130
|
+
|
|
131
|
+
Recommend a test when it protects an important contract, subtle behavior, edge case, or plausible regression.
|
|
132
|
+
|
|
133
|
+
Do not request tests merely because code changed.
|
|
134
|
+
|
|
135
|
+
Avoid tests that only duplicate implementation details.
|
|
136
|
+
|
|
137
|
+
## Uncertainty
|
|
138
|
+
|
|
139
|
+
Distinguish demonstrated bugs from risks that still require verification.
|
|
140
|
+
|
|
141
|
+
State missing assumptions explicitly.
|
|
142
|
+
|
|
143
|
+
Never present speculation as fact.
|
|
144
|
+
|
|
145
|
+
## Default Rule
|
|
146
|
+
|
|
147
|
+
Before reporting a correctness finding, answer:
|
|
148
|
+
|
|
149
|
+
> Under what realistic condition does this implementation violate its intended contract?
|
|
150
|
+
|
|
151
|
+
If that cannot be explained, the concern may be a design issue rather than a correctness bug.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Design Review
|
|
2
|
+
|
|
3
|
+
Evaluate simplicity, readability, maintainability, abstraction, coupling, cohesion, change locality, and architectural fit together.
|
|
4
|
+
|
|
5
|
+
The goal is low total cognitive and maintenance burden, not minimum line count or maximum reuse.
|
|
6
|
+
|
|
7
|
+
## Core Rule
|
|
8
|
+
|
|
9
|
+
Every added concept has a cost.
|
|
10
|
+
|
|
11
|
+
Examples include:
|
|
12
|
+
|
|
13
|
+
* classes and interfaces;
|
|
14
|
+
* factories and registries;
|
|
15
|
+
* wrappers and adapters;
|
|
16
|
+
* callbacks and indirection;
|
|
17
|
+
* configuration layers;
|
|
18
|
+
* caching and shared state;
|
|
19
|
+
* concurrency;
|
|
20
|
+
* generic frameworks.
|
|
21
|
+
|
|
22
|
+
Require that added complexity provides a concrete benefit such as:
|
|
23
|
+
|
|
24
|
+
* correctness or invariant enforcement;
|
|
25
|
+
* representing real variation;
|
|
26
|
+
* removing duplicated domain knowledge;
|
|
27
|
+
* improving change locality;
|
|
28
|
+
* meaningful reuse;
|
|
29
|
+
* isolating genuinely volatile behavior;
|
|
30
|
+
* material performance or scalability.
|
|
31
|
+
|
|
32
|
+
Be skeptical of complexity justified mainly by hypothetical future requirements.
|
|
33
|
+
|
|
34
|
+
## Simplicity
|
|
35
|
+
|
|
36
|
+
Prefer the least complicated implementation that adequately solves the current problem.
|
|
37
|
+
|
|
38
|
+
When appropriate, prefer:
|
|
39
|
+
|
|
40
|
+
* functions over classes when state or polymorphism is unnecessary;
|
|
41
|
+
* direct control flow over indirection;
|
|
42
|
+
* ordinary data structures over custom abstractions;
|
|
43
|
+
* small named helpers when they reduce cognitive load;
|
|
44
|
+
* existing repository mechanisms over new parallel systems.
|
|
45
|
+
|
|
46
|
+
Do not equate simplicity with fewer lines, fewer functions, or no abstraction.
|
|
47
|
+
|
|
48
|
+
An abstraction is useful when it reduces total reasoning and maintenance burden more than it adds conceptual or navigation cost.
|
|
49
|
+
|
|
50
|
+
## Abstraction and Duplication
|
|
51
|
+
|
|
52
|
+
Do not abstract merely because code looks similar.
|
|
53
|
+
|
|
54
|
+
Ask:
|
|
55
|
+
|
|
56
|
+
> Does this represent the same knowledge and therefore need to evolve together?
|
|
57
|
+
|
|
58
|
+
If multiple locations must remain synchronized, centralizing that knowledge may improve maintainability.
|
|
59
|
+
|
|
60
|
+
If pieces only look similar but may evolve independently, keeping them separate can be simpler.
|
|
61
|
+
|
|
62
|
+
Distinguish:
|
|
63
|
+
|
|
64
|
+
* **Useful abstraction** — represents real shared semantics or variation.
|
|
65
|
+
* **Premature abstraction** — models hypothetical future variation.
|
|
66
|
+
* **Wrong abstraction** — couples concepts that change for different reasons.
|
|
67
|
+
|
|
68
|
+
A small amount of duplication can be preferable to the wrong abstraction.
|
|
69
|
+
|
|
70
|
+
## Readability
|
|
71
|
+
|
|
72
|
+
Code should make intent, control flow, assumptions, and state understandable without excessive mental simulation.
|
|
73
|
+
|
|
74
|
+
Look for:
|
|
75
|
+
|
|
76
|
+
* unclear intent;
|
|
77
|
+
* deeply nested or hidden control flow;
|
|
78
|
+
* non-obvious mutation;
|
|
79
|
+
* excessive indirection;
|
|
80
|
+
* functions mixing unrelated conceptual levels;
|
|
81
|
+
* names that hide domain meaning.
|
|
82
|
+
|
|
83
|
+
Extract helpers when they name meaningful operations, isolate tricky logic, or reduce cognitive load.
|
|
84
|
+
|
|
85
|
+
Do not extract code solely because a function is long.
|
|
86
|
+
|
|
87
|
+
Prefer comments that explain rationale, constraints, or domain knowledge rather than restating the implementation.
|
|
88
|
+
|
|
89
|
+
## Maintainability and Change Locality
|
|
90
|
+
|
|
91
|
+
Prefer designs where conceptual changes remain localized.
|
|
92
|
+
|
|
93
|
+
Look for:
|
|
94
|
+
|
|
95
|
+
* duplicated domain rules;
|
|
96
|
+
* repeated mappings or configuration;
|
|
97
|
+
* parallel conditionals that must remain synchronized;
|
|
98
|
+
* equivalent state represented in multiple layers;
|
|
99
|
+
* unclear ownership;
|
|
100
|
+
* unnecessary knowledge of another component's internals.
|
|
101
|
+
|
|
102
|
+
Ask:
|
|
103
|
+
|
|
104
|
+
> How many places must change when this concept changes?
|
|
105
|
+
|
|
106
|
+
Multiple edits are not automatically bad. The concern is multiple independent representations of the same knowledge.
|
|
107
|
+
|
|
108
|
+
## Cohesion and Coupling
|
|
109
|
+
|
|
110
|
+
Related behavior should live together.
|
|
111
|
+
|
|
112
|
+
Ask whether a developer would naturally look for the behavior where it currently lives.
|
|
113
|
+
|
|
114
|
+
Flag coupling when implementation details leak across boundaries or unrelated changes propagate through the system.
|
|
115
|
+
|
|
116
|
+
Do not automatically respond with interfaces, dependency injection, or additional abstraction. Recommend new machinery only when it solves the concrete problem more simply.
|
|
117
|
+
|
|
118
|
+
## Architectural Fit
|
|
119
|
+
|
|
120
|
+
Review the change in repository context.
|
|
121
|
+
|
|
122
|
+
Check whether it:
|
|
123
|
+
|
|
124
|
+
* duplicates an existing utility or subsystem;
|
|
125
|
+
* introduces a second mechanism for the same problem;
|
|
126
|
+
* bypasses established ownership boundaries;
|
|
127
|
+
* adds concepts disproportionate to surrounding code.
|
|
128
|
+
|
|
129
|
+
Prefer existing patterns when they are adequate, but do not preserve a clearly harmful pattern merely for consistency.
|
|
130
|
+
|
|
131
|
+
## Change Blast Radius
|
|
132
|
+
|
|
133
|
+
Consider whether the breadth of the implementation is proportional to the conceptual change.
|
|
134
|
+
|
|
135
|
+
Ask:
|
|
136
|
+
|
|
137
|
+
> How much of the repository had to know about this change?
|
|
138
|
+
|
|
139
|
+
Be concerned when a small conceptual change requires synchronized modifications across unrelated layers because the same concept is represented repeatedly.
|
|
140
|
+
|
|
141
|
+
Do not penalize a large diff merely for being large.
|
|
142
|
+
|
|
143
|
+
## Accretion
|
|
144
|
+
|
|
145
|
+
Watch for systems that grow through repeated:
|
|
146
|
+
|
|
147
|
+
* special cases;
|
|
148
|
+
* flags;
|
|
149
|
+
* compatibility branches;
|
|
150
|
+
* wrappers;
|
|
151
|
+
* alternate execution paths.
|
|
152
|
+
|
|
153
|
+
Ask whether existing logic can be simplified, removed, or generalized instead of adding another layer.
|
|
154
|
+
|
|
155
|
+
## Default Rule
|
|
156
|
+
|
|
157
|
+
When multiple implementations are correct and sufficiently performant:
|
|
158
|
+
|
|
159
|
+
> Prefer the implementation with the lowest total cognitive and maintenance burden.
|
|
160
|
+
|
|
161
|
+
Complexity must justify itself.
|