claude-dev-env 8.36.2 → 8.36.4
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.
- package/.agents/skills/usage-pause/scripts/resolve_usage_window.py +1 -1
- package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +5 -5
- package/docs/codex-compatibility.md +1 -1
- package/docs/rule-guides/bdd.md +28 -0
- package/docs/rule-guides/code-standards.md +38 -0
- package/docs/rule-guides/correction-lens-excerpt.md +35 -0
- package/docs/rule-guides/doc-inventory-integrity.md +39 -0
- package/docs/rule-guides/docstring-prose-matches-implementation.md +49 -0
- package/docs/rule-guides/failure-blast-radius.md +123 -0
- package/docs/rule-guides/orphan-css-class.md +25 -0
- package/docs/rule-guides/paired-test-coverage.md +39 -0
- package/docs/rule-guides/plain-illustrative-docstrings.md +88 -0
- package/docs/rule-guides/windows-filesystem-safe.md +11 -0
- package/package.json +1 -1
- package/rules/bdd.md +2 -23
- package/rules/code-standards.md +3 -32
- package/rules/correction-lens.md +2 -30
- package/rules/doc-inventory-integrity.md +6 -32
- package/rules/docstring-prose-matches-implementation.md +4 -42
- package/rules/failure-blast-radius.md +4 -114
- package/rules/orphan-css-class.md +4 -18
- package/rules/paired-test-coverage.md +4 -32
- package/rules/plain-illustrative-docstrings.md +4 -81
- package/rules/windows-filesystem-safe.md +3 -5
- package/scripts/codex_compat_materializer.py +4 -1
- package/scripts/tests/test_codex_capability_bridge.py +1 -1
- package/scripts/tests/test_codex_compat_materializer.py +18 -18
|
@@ -174,8 +174,8 @@ def test_public_legacy_call_forms_validate_collection_entries(tmp_path: Path) ->
|
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
def test_render_codex_instruction_excerpt_requires_the_excerpt_heading() -> None:
|
|
177
|
-
with pytest.raises(MaterializerError, match="
|
|
178
|
-
materializer.render_codex_instruction_excerpt("# No excerpt\n", "
|
|
177
|
+
with pytest.raises(MaterializerError, match="docs/rule-guides/correction-lens-excerpt.md requires a Codex excerpt"):
|
|
178
|
+
materializer.render_codex_instruction_excerpt("# No excerpt\n", "docs/rule-guides/correction-lens-excerpt.md")
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
def test_validation_rejects_reparse_point_from_portable_attribute_seam(
|
|
@@ -820,11 +820,11 @@ def test_frontmatter_rejects_non_string_name() -> None:
|
|
|
820
820
|
|
|
821
821
|
|
|
822
822
|
def test_failure_blast_radius_projection_uses_the_canonical_excerpt() -> None:
|
|
823
|
-
canonical_rule_path = Path(__file__).parents[2] / "
|
|
823
|
+
canonical_rule_path = Path(__file__).parents[2] / "docs" / "rule-guides" / "failure-blast-radius.md"
|
|
824
824
|
canonical_rule = canonical_rule_path.read_text(encoding="utf-8")
|
|
825
825
|
|
|
826
826
|
projected_instruction = materializer.render_codex_instruction_excerpt(
|
|
827
|
-
canonical_rule, "
|
|
827
|
+
canonical_rule, "docs/rule-guides/failure-blast-radius.md"
|
|
828
828
|
)
|
|
829
829
|
|
|
830
830
|
assert projected_instruction.startswith("Failure handling for this run")
|
|
@@ -833,12 +833,12 @@ def test_failure_blast_radius_projection_uses_the_canonical_excerpt() -> None:
|
|
|
833
833
|
|
|
834
834
|
|
|
835
835
|
def test_codex_instruction_projection_carries_every_listed_rule(tmp_path: Path) -> None:
|
|
836
|
-
|
|
836
|
+
package_root = Path(__file__).parents[2]
|
|
837
837
|
source = tmp_path / "source"
|
|
838
838
|
target = tmp_path / "target"
|
|
839
|
-
(source / "rules").mkdir(parents=True)
|
|
840
839
|
for each_relative_path in materializer.codex_instruction_rule_relative_paths:
|
|
841
|
-
canonical_path =
|
|
840
|
+
canonical_path = package_root / each_relative_path
|
|
841
|
+
(source / each_relative_path).parent.mkdir(parents=True, exist_ok=True)
|
|
842
842
|
(source / each_relative_path).write_text(
|
|
843
843
|
canonical_path.read_text(encoding="utf-8"), encoding="utf-8"
|
|
844
844
|
)
|
|
@@ -851,17 +851,17 @@ def test_codex_instruction_projection_carries_every_listed_rule(tmp_path: Path)
|
|
|
851
851
|
assert "Failure handling for this run" in projected_instruction
|
|
852
852
|
assert "Correction handling for this run" in projected_instruction
|
|
853
853
|
manifest_record = _manifest_files(_required_manifest_path(config))["AGENTS.md"]
|
|
854
|
-
assert manifest_record["source"] == "
|
|
854
|
+
assert manifest_record["source"] == "docs/rule-guides/failure-blast-radius.md, docs/rule-guides/correction-lens-excerpt.md"
|
|
855
855
|
|
|
856
856
|
|
|
857
857
|
def test_codex_instruction_projection_skips_an_absent_listed_rule(
|
|
858
858
|
tmp_path: Path,
|
|
859
859
|
) -> None:
|
|
860
|
-
|
|
860
|
+
guides_root = Path(__file__).parents[2] / "docs" / "rule-guides"
|
|
861
861
|
source = tmp_path / "source"
|
|
862
|
-
(source / "
|
|
863
|
-
(source / "
|
|
864
|
-
(
|
|
862
|
+
(source / "docs" / "rule-guides").mkdir(parents=True)
|
|
863
|
+
(source / "docs" / "rule-guides" / "correction-lens-excerpt.md").write_text(
|
|
864
|
+
(guides_root / "correction-lens-excerpt.md").read_text(encoding="utf-8"),
|
|
865
865
|
encoding="utf-8",
|
|
866
866
|
)
|
|
867
867
|
config = MaterializerConfig(source, tmp_path / "target", should_apply=False)
|
|
@@ -869,7 +869,7 @@ def test_codex_instruction_projection_skips_an_absent_listed_rule(
|
|
|
869
869
|
projection = materializer._build_codex_instruction_projection(config)
|
|
870
870
|
|
|
871
871
|
assert projection is not None
|
|
872
|
-
assert projection.source_identity == "
|
|
872
|
+
assert projection.source_identity == "docs/rule-guides/correction-lens-excerpt.md"
|
|
873
873
|
assert "Correction handling for this run" in projection.content
|
|
874
874
|
assert "Failure handling for this run" not in projection.content
|
|
875
875
|
|
|
@@ -877,10 +877,10 @@ def test_codex_instruction_projection_skips_an_absent_listed_rule(
|
|
|
877
877
|
def test_build_plan_publishes_owned_agents_projection_and_tracks_drift(
|
|
878
878
|
tmp_path: Path,
|
|
879
879
|
) -> None:
|
|
880
|
-
canonical_rule_path = Path(__file__).parents[2] / "
|
|
880
|
+
canonical_rule_path = Path(__file__).parents[2] / "docs" / "rule-guides" / "failure-blast-radius.md"
|
|
881
881
|
source = tmp_path / "source"
|
|
882
882
|
target = tmp_path / "target"
|
|
883
|
-
rule_path = source / "
|
|
883
|
+
rule_path = source / "docs" / "rule-guides" / "failure-blast-radius.md"
|
|
884
884
|
rule_path.parent.mkdir(parents=True)
|
|
885
885
|
rule_path.write_text(canonical_rule_path.read_text(encoding="utf-8"), encoding="utf-8")
|
|
886
886
|
config = MaterializerConfig(source, target, should_apply=True)
|
|
@@ -892,7 +892,7 @@ def test_build_plan_publishes_owned_agents_projection_and_tracks_drift(
|
|
|
892
892
|
first_projection = projected_path.read_text(encoding="utf-8")
|
|
893
893
|
manifest_record = _manifest_files(_required_manifest_path(config))["AGENTS.md"]
|
|
894
894
|
assert manifest_record["ownership"] == "codex-compat"
|
|
895
|
-
assert manifest_record["source"] == "
|
|
895
|
+
assert manifest_record["source"] == "docs/rule-guides/failure-blast-radius.md"
|
|
896
896
|
|
|
897
897
|
rule_path.write_text(
|
|
898
898
|
rule_path.read_text(encoding="utf-8").replace("Three attempts, then park.", "Three tested attempts, then park."),
|
|
@@ -944,12 +944,12 @@ def _prepare_projection_fixture(
|
|
|
944
944
|
) -> tuple[Path, Path, dict[str, Any], Path]:
|
|
945
945
|
source = tmp_path / "source"
|
|
946
946
|
target = tmp_path.parent / "codex-prod-target"
|
|
947
|
-
source_rule = source / "
|
|
947
|
+
source_rule = source / "docs" / "rule-guides" / "failure-blast-radius.md"
|
|
948
948
|
source_hooks = source / "hooks" / "hooks.json"
|
|
949
949
|
source_rule.parent.mkdir(parents=True)
|
|
950
950
|
source_hooks.parent.mkdir(parents=True)
|
|
951
951
|
source_rule.write_text(
|
|
952
|
-
(Path(__file__).parents[2] / "
|
|
952
|
+
(Path(__file__).parents[2] / "docs" / "rule-guides" / "failure-blast-radius.md").read_text(
|
|
953
953
|
encoding="utf-8"
|
|
954
954
|
),
|
|
955
955
|
encoding="utf-8",
|