claude-dev-env 1.67.0 → 1.67.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "1.67.0",
3
+ "version": "1.67.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -435,7 +435,7 @@ def test_reuse_audit_without_verdict_keyword_fails(tmp_path: Path) -> None:
435
435
  validator_run = run_validator(packet_directory)
436
436
 
437
437
  assert validator_run.returncode == 2
438
- assert "reuse-audit.md must record a reuse verdict for each new item" in validator_run.stderr
438
+ assert "reuse-audit.md must name a justifying reuse verdict" in validator_run.stderr
439
439
 
440
440
 
441
441
  def test_reuse_audit_with_verdict_keyword_passes(tmp_path: Path) -> None:
@@ -453,3 +453,21 @@ def test_reuse_audit_with_verdict_keyword_passes(tmp_path: Path) -> None:
453
453
  validator_run = run_validator(packet_directory)
454
454
 
455
455
  assert validator_run.returncode == 0, validator_run.stderr
456
+
457
+
458
+ def test_reuse_audit_with_only_unjustified_reproduction_fails(tmp_path: Path) -> None:
459
+ packet_directory = tmp_path / "docs" / "plans" / "add-login"
460
+ write_valid_packet(packet_directory)
461
+ (packet_directory / "validation" / "reuse-audit.md").write_text(
462
+ "# Reuse Audit\n\n"
463
+ "| Item | Kind | Verdict | Searched | Found | Decision | Evidence |\n"
464
+ "|---|---|---|---|---|---|---|\n"
465
+ "| duplicate_alert | helper | unjustified-reproduction | shared_utils/alerts | no existing equivalent | duplicate the logic | src/alert.py:9 |\n\n"
466
+ "Summary: unjustified-reproduction 1.\n",
467
+ encoding="utf-8",
468
+ )
469
+
470
+ validator_run = run_validator(packet_directory)
471
+
472
+ assert validator_run.returncode == 2
473
+ assert "reuse-audit.md must name a justifying reuse verdict" in validator_run.stderr
@@ -187,21 +187,37 @@ def tdd_plan_errors(packet_directory: Path) -> list[str]:
187
187
 
188
188
 
189
189
  def reuse_audit_errors(packet_directory: Path) -> list[str]:
190
- """Return errors for a reuse audit that records no per-item verdict.
190
+ """Return errors for a reuse audit that names no justifying reuse verdict.
191
191
 
192
192
  Args:
193
193
  packet_directory: Directory that should contain validation/reuse-audit.md.
194
194
 
195
195
  Returns:
196
- An error string when the reuse audit names no reuse verdict, else an empty list.
196
+ An error string when the reuse audit names none of the justifying reuse
197
+ verdicts (reused, extract-to-shared, new-justified, config-local) as a
198
+ whole token, else an empty list. Each verdict matches only as a whole
199
+ token, so unjustified-reproduction does not satisfy the check through the
200
+ justified or reproduction substrings, and an audit naming only the
201
+ unjustified-reproduction verdict is an error.
197
202
  """
198
203
  reuse_audit_file = packet_directory / "validation" / "reuse-audit.md"
199
204
  if not reuse_audit_file.is_file():
200
205
  return []
201
206
  reuse_audit_text = reuse_audit_file.read_text(encoding="utf-8").lower()
202
- verdict_keywords = ("reused", "extract", "justified", "config-local", "reproduction")
203
- if not any(each_keyword in reuse_audit_text for each_keyword in verdict_keywords):
204
- return ["reuse-audit.md must record a reuse verdict for each new item"]
207
+ justifying_verdict_tokens = (
208
+ "reused",
209
+ "extract-to-shared",
210
+ "new-justified",
211
+ "config-local",
212
+ )
213
+ if not any(
214
+ re.search(r"\b" + re.escape(each_token) + r"\b", reuse_audit_text)
215
+ for each_token in justifying_verdict_tokens
216
+ ):
217
+ return [
218
+ "reuse-audit.md must name a justifying reuse verdict "
219
+ "(reused, extract-to-shared, new-justified, or config-local)"
220
+ ]
205
221
  return []
206
222
 
207
223