codeforerunner 0.4.5__tar.gz → 0.4.6__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.
Files changed (64) hide show
  1. {codeforerunner-0.4.5/src/codeforerunner.egg-info → codeforerunner-0.4.6}/PKG-INFO +3 -3
  2. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/README.md +2 -2
  3. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/pyproject.toml +2 -2
  4. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/cli.py +31 -28
  5. codeforerunner-0.4.6/src/codeforerunner/distribution.py +56 -0
  6. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/doctor.py +24 -43
  7. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/installer.py +124 -109
  8. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/mcp_server.py +12 -10
  9. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompt_session.py +40 -0
  10. codeforerunner-0.4.6/src/codeforerunner/release_surfaces.json +77 -0
  11. codeforerunner-0.4.6/src/codeforerunner/release_surfaces.py +115 -0
  12. codeforerunner-0.4.6/src/codeforerunner/skill_parity.py +95 -0
  13. {codeforerunner-0.4.5 → codeforerunner-0.4.6/src/codeforerunner.egg-info}/PKG-INFO +3 -3
  14. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner.egg-info/SOURCES.txt +9 -0
  15. codeforerunner-0.4.6/tests/test_distribution.py +54 -0
  16. codeforerunner-0.4.6/tests/test_inspect_npm_package.py +122 -0
  17. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_installer.py +39 -0
  18. codeforerunner-0.4.6/tests/test_package_metadata.py +35 -0
  19. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_prompt_session.py +31 -1
  20. codeforerunner-0.4.6/tests/test_release_surfaces.py +87 -0
  21. codeforerunner-0.4.6/tests/test_skill_parity.py +100 -0
  22. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_workflows_yaml.py +76 -1
  23. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/LICENSE.md +0 -0
  24. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/setup.cfg +0 -0
  25. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/__init__.py +0 -0
  26. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/bundle.py +0 -0
  27. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/check.py +0 -0
  28. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/config.py +0 -0
  29. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/partials/context-format.md +0 -0
  30. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/partials/output-rules.md +0 -0
  31. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/partials/stack-hints.md +0 -0
  32. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/system/base.md +0 -0
  33. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/api-docs.md +0 -0
  34. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/arch-review.md +0 -0
  35. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/audit.md +0 -0
  36. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/changelog.md +0 -0
  37. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/check.md +0 -0
  38. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/diagrams.md +0 -0
  39. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/flows.md +0 -0
  40. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/init-agent-onboarding.md +0 -0
  41. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/readme.md +0 -0
  42. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/refresh.md +0 -0
  43. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/review.md +0 -0
  44. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/scan.md +0 -0
  45. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/stack-docs.md +0 -0
  46. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/prompts/tasks/version-audit.md +0 -0
  47. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/tasks.json +0 -0
  48. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner/tasks.py +0 -0
  49. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner.egg-info/dependency_links.txt +0 -0
  50. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner.egg-info/entry_points.txt +0 -0
  51. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner.egg-info/requires.txt +0 -0
  52. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/src/codeforerunner.egg-info/top_level.txt +0 -0
  53. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_bundle.py +0 -0
  54. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_check.py +0 -0
  55. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_check_config_integration.py +0 -0
  56. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_check_versions.py +0 -0
  57. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_cli.py +0 -0
  58. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_config.py +0 -0
  59. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_doctor.py +0 -0
  60. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_examples.py +0 -0
  61. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_hooks_manifest.py +0 -0
  62. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_mcp_server.py +0 -0
  63. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_tasks.py +0 -0
  64. {codeforerunner-0.4.5 → codeforerunner-0.4.6}/tests/test_validate_codex_marketplace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeforerunner
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Model-agnostic repository documentation tooling (prompt-first; thin CLI).
5
5
  Author: Derek Palmer
6
6
  License-Expression: LicenseRef-Codeforerunner-SAL-0.1
@@ -29,7 +29,7 @@ Dynamic: license-file
29
29
 
30
30
  # codeForerunner
31
31
 
32
- [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.5)](https://socket.dev/npm/package/codeforerunner)
32
+ [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.6)](https://socket.dev/npm/package/codeforerunner)
33
33
 
34
34
  Model-agnostic repository documentation tooling. Ships a prompt pack for codebase analysis and doc generation, a thin Python CLI, an MCP server, drift-detection rules that keep docs honest — and native slash-command skills for Claude Code, Codex, Gemini CLI, and other agent CLIs.
35
35
 
@@ -148,7 +148,7 @@ jobs:
148
148
  runs-on: ubuntu-latest
149
149
  steps:
150
150
  - uses: actions/checkout@v6.0.2
151
- - uses: derek-palmer/codeforerunner@v0.4.5
151
+ - uses: derek-palmer/codeforerunner@v0.4.6
152
152
  with:
153
153
  fail-on-drift: "true" # set "false" to warn-only
154
154
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  # codeForerunner
4
4
 
5
- [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.5)](https://socket.dev/npm/package/codeforerunner)
5
+ [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.6)](https://socket.dev/npm/package/codeforerunner)
6
6
 
7
7
  Model-agnostic repository documentation tooling. Ships a prompt pack for codebase analysis and doc generation, a thin Python CLI, an MCP server, drift-detection rules that keep docs honest — and native slash-command skills for Claude Code, Codex, Gemini CLI, and other agent CLIs.
8
8
 
@@ -121,7 +121,7 @@ jobs:
121
121
  runs-on: ubuntu-latest
122
122
  steps:
123
123
  - uses: actions/checkout@v6.0.2
124
- - uses: derek-palmer/codeforerunner@v0.4.5
124
+ - uses: derek-palmer/codeforerunner@v0.4.6
125
125
  with:
126
126
  fail-on-drift: "true" # set "false" to warn-only
127
127
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codeforerunner"
7
- version = "0.4.5"
7
+ version = "0.4.6"
8
8
  description = "Model-agnostic repository documentation tooling (prompt-first; thin CLI)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -50,7 +50,7 @@ forerunner = "codeforerunner.cli:main"
50
50
  where = ["src"]
51
51
 
52
52
  [tool.setuptools.package-data]
53
- codeforerunner = ["py.typed", "prompts/**/*.md", "tasks.json"]
53
+ codeforerunner = ["py.typed", "prompts/**/*.md", "tasks.json", "release_surfaces.json"]
54
54
 
55
55
  [tool.pytest.ini_options]
56
56
  testpaths = ["tests"]
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
  from typing import Sequence
10
10
 
11
11
  from codeforerunner.bundle import find_prompts_root
12
- from codeforerunner.prompt_session import Denial, PromptSession
12
+ from codeforerunner.prompt_session import OutcomeKind, PromptSession
13
13
  from codeforerunner.tasks import refresh_tasks as _refresh_tasks
14
14
  SCAN_DONE_ENV = "FORERUNNER_SCAN_DONE"
15
15
 
@@ -23,64 +23,67 @@ def _scan_satisfied(repo_root: Path) -> bool:
23
23
  )
24
24
 
25
25
 
26
- def _get_bundle(args: argparse.Namespace) -> tuple[str, int]:
27
- """Resolve bundle for args.task. Returns (bundle_text, exit_code). exit_code != 0 on error."""
26
+ def _resolve_bundle(repo, task: str) -> tuple[str, int]:
27
+ """Resolve bundle text for *task* under *repo*. Returns (text, exit_code).
28
+
29
+ Encodes the session's closed Outcome into CLI exit codes; the gate/order
30
+ lives in the Prompt Session, this is just the encoder.
31
+ """
28
32
  try:
29
- prompts_root = find_prompts_root(args.repo)
33
+ prompts_root = find_prompts_root(repo)
30
34
  except FileNotFoundError as e:
31
35
  print(f"error: {e}", file=sys.stderr)
32
36
  return "", 2
33
37
 
34
- repo_root = Path(args.repo).resolve() if args.repo else Path.cwd()
38
+ repo_root = Path(repo).resolve() if repo else Path.cwd()
35
39
  session = PromptSession(prompts_root, _scan_satisfied(repo_root))
36
- decision = session.can_run(args.task)
37
- if not decision.allowed:
38
- if decision.reason is Denial.UNKNOWN_TASK:
39
- print(f"error: unknown task '{args.task}'", file=sys.stderr)
40
- return "", 2
40
+ outcome = session.resolve(task)
41
+ if outcome.kind is OutcomeKind.ALLOWED:
42
+ return outcome.text, 0
43
+ if outcome.kind is OutcomeKind.UNKNOWN_TASK:
44
+ print(f"error: unknown task '{task}'", file=sys.stderr)
45
+ return "", 2
46
+ if outcome.kind is OutcomeKind.SCAN_REQUIRED:
41
47
  print(
42
48
  f"error: scan-first required — run `forerunner scan` first "
43
49
  f"(writes .forerunner/scan.md). Set {SCAN_DONE_ENV}=1 to skip.",
44
50
  file=sys.stderr,
45
51
  )
46
52
  return "", 1
47
-
48
- try:
49
- return session.bundle_for(args.task), 0
50
- except FileNotFoundError as e:
51
- print(f"error: {e}", file=sys.stderr)
52
- return "", 2
53
+ # MISSING
54
+ print(f"error: {outcome.message}", file=sys.stderr)
55
+ return "", 2
53
56
 
54
57
 
55
- def cmd_doc(args: argparse.Namespace) -> int:
56
- """Resolve base + partials + task bundle to stdout."""
57
- bundle, rc = _get_bundle(args)
58
+ def _emit_task(repo, task: str) -> int:
59
+ """Resolve *task* under *repo* and write its bundle to stdout. Returns rc."""
60
+ bundle, rc = _resolve_bundle(repo, task)
58
61
  if rc != 0:
59
62
  return rc
60
63
  sys.stdout.write(bundle)
61
64
  return 0
62
65
 
63
66
 
64
- def _doc_for(args: argparse.Namespace, task: str) -> int:
65
- """Emit bundle for *task* by delegating to cmd_doc with a synthetic Namespace."""
66
- ns = argparse.Namespace(repo=getattr(args, "repo", None), task=task)
67
- return cmd_doc(ns)
67
+ def cmd_doc(args: argparse.Namespace) -> int:
68
+ """Resolve base + partials + task bundle to stdout."""
69
+ return _emit_task(args.repo, args.task)
68
70
 
69
71
 
70
72
  def cmd_init(args: argparse.Namespace) -> int:
71
73
  """Emit onboarding bundle; prepend scan bundle when --full is given."""
74
+ repo = getattr(args, "repo", None)
72
75
  if getattr(args, "full", False):
73
76
  sys.stdout.write("<!-- forerunner init --full: section 1/2 (scan) -->\n")
74
- rc = _doc_for(args, "scan")
77
+ rc = _emit_task(repo, "scan")
75
78
  if rc != 0:
76
79
  return rc
77
80
  sys.stdout.write("\n<!-- forerunner init --full: section 2/2 (onboarding) -->\n")
78
- return _doc_for(args, "init-agent-onboarding")
81
+ return _emit_task(repo, "init-agent-onboarding")
79
82
 
80
83
 
81
84
  def cmd_scan(args: argparse.Namespace) -> int:
82
85
  """Emit the scan prompt bundle and hint about scan artifact."""
83
- rc = _doc_for(args, "scan")
86
+ rc = _emit_task(getattr(args, "repo", None), "scan")
84
87
  if rc == 0:
85
88
  print(
86
89
  "hint: write the scan result to .forerunner/scan.md to satisfy the "
@@ -123,10 +126,10 @@ def cmd_mcp_server(args: argparse.Namespace) -> int:
123
126
 
124
127
  def cmd_refresh(args: argparse.Namespace) -> int:
125
128
  """Emit scan + check + all doc-task bundles to stdout for a full doc refresh."""
129
+ repo = getattr(args, "repo", None)
126
130
  task_names = [t.name for t in _refresh_tasks()]
127
131
  for i, task in enumerate(task_names):
128
- ns = argparse.Namespace(repo=getattr(args, "repo", None), task=task)
129
- rc = cmd_doc(ns)
132
+ rc = _emit_task(repo, task)
130
133
  if rc != 0:
131
134
  return rc
132
135
  if i < len(task_names) - 1:
@@ -0,0 +1,56 @@
1
+ """Distribution Inventory — single source of truth for distribution artifact
2
+ identity and install policy.
3
+
4
+ Owns the packaging facts that were previously duplicated across the installer,
5
+ doctor, and validation scripts: the canonical skill path, its distributed copy
6
+ paths, the Codex marketplace manifest path, the managed-region markers, and the
7
+ default install-destination templates. Consumers consult this module instead of
8
+ re-declaring constants, so a packaging change is one edit here.
9
+
10
+ Mirrors the Task Registry (``tasks.py``) and Release Surface Manifest
11
+ (``release_surfaces.py``) single-source pattern.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ from pathlib import Path
17
+
18
+ # --- artifact identity (repo-relative) ------------------------------------
19
+
20
+ # Source of truth for the codeforerunner skill body; copies derive from it.
21
+ CANONICAL_SKILL_REL = Path("agent/codeforerunner.skill.md")
22
+
23
+ # Distributed copies whose bodies must match the canonical (V10 body parity).
24
+ DISTRIBUTED_SKILL_COPIES_REL: tuple[Path, ...] = (
25
+ Path("plugins/codeforerunner/skills/codeforerunner/SKILL.md"),
26
+ Path("skills/codeforerunner/SKILL.md"),
27
+ )
28
+
29
+ # Codex marketplace manifest shipped as a release asset.
30
+ MARKETPLACE_MANIFEST_REL = Path("plugins/codex/marketplace.json")
31
+
32
+ # --- managed-region markers -----------------------------------------------
33
+
34
+ # Delimit the installer-owned region in a destination file so re-runs are
35
+ # idempotent and unmanaged content is never clobbered.
36
+ MARKER_BEGIN = "<!-- forerunner:begin managed=codeforerunner.skill -->"
37
+ MARKER_END = "<!-- forerunner:end -->"
38
+
39
+ # --- install-destination templates ----------------------------------------
40
+
41
+ # Agents whose default skill destination the inventory can resolve.
42
+ SKILL_DEST_AGENTS: tuple[str, ...] = ("codex", "claude")
43
+
44
+
45
+ def skill_destination(agent: str, slug: str, home: Path) -> Path:
46
+ """Default install path for skill ``slug`` under ``agent``, relative to ``home``."""
47
+ if agent == "codex":
48
+ return home / f".codex/skills/{slug}/SKILL.md"
49
+ if agent == "claude":
50
+ return home / f".claude/plugins/codeforerunner/skills/{slug}/SKILL.md"
51
+ raise ValueError(f"no default skill destination for agent {agent!r} (expected: {', '.join(SKILL_DEST_AGENTS)})")
52
+
53
+
54
+ def marketplace_destination(home: Path) -> Path:
55
+ """Default install path for the Codex marketplace manifest, relative to ``home``."""
56
+ return home / ".codex/marketplaces/codeforerunner.json"
@@ -11,17 +11,18 @@ from dataclasses import dataclass
11
11
  from pathlib import Path
12
12
  from typing import Callable
13
13
 
14
+ from codeforerunner import distribution as _dist
15
+ from codeforerunner import skill_parity as _parity
14
16
  from codeforerunner.config import CONFIG_FILENAME, ConfigError, load_from_repo
15
17
 
16
- CANONICAL_REL = Path("agent/codeforerunner.skill.md")
17
- SKILL_COPIES_REL: tuple[Path, ...] = (
18
- Path("plugins/codeforerunner/skills/codeforerunner/SKILL.md"),
19
- Path("skills/codeforerunner/SKILL.md"),
20
- )
21
- MARKETPLACE_REL = Path("plugins/codex/marketplace.json")
18
+ # Distribution artifact identity and markers come from the Distribution
19
+ # Inventory; re-exported here for callers/tests that import them off doctor.
20
+ CANONICAL_REL = _dist.CANONICAL_SKILL_REL
21
+ SKILL_COPIES_REL: tuple[Path, ...] = _dist.DISTRIBUTED_SKILL_COPIES_REL
22
+ MARKETPLACE_REL = _dist.MARKETPLACE_MANIFEST_REL
22
23
 
23
- MARKER_BEGIN = "<!-- forerunner:begin managed=codeforerunner.skill -->"
24
- MARKER_END = "<!-- forerunner:end -->"
24
+ MARKER_BEGIN = _dist.MARKER_BEGIN
25
+ MARKER_END = _dist.MARKER_END
25
26
 
26
27
 
27
28
  @dataclass(frozen=True)
@@ -37,14 +38,14 @@ def _installed_skill_destinations() -> list[Path]:
37
38
  """Return default install paths for the codeforerunner skill across supported agents."""
38
39
  home = Path(os.path.expanduser("~"))
39
40
  return [
40
- home / ".codex/skills/codeforerunner/SKILL.md",
41
- home / ".claude/plugins/codeforerunner/skills/codeforerunner/SKILL.md",
41
+ _dist.skill_destination(agent, "codeforerunner", home)
42
+ for agent in _dist.SKILL_DEST_AGENTS
42
43
  ]
43
44
 
44
45
 
45
46
  def _installed_marketplace_destination() -> Path:
46
47
  """Return default install path for the Codex marketplace manifest."""
47
- return Path(os.path.expanduser("~")) / ".codex/marketplaces/codeforerunner.json"
48
+ return _dist.marketplace_destination(Path(os.path.expanduser("~")))
48
49
 
49
50
 
50
51
  def _load_script_module(repo: Path, relpath: str, module_name: str):
@@ -62,25 +63,14 @@ def _load_script_module(repo: Path, relpath: str, module_name: str):
62
63
 
63
64
 
64
65
  def _check_skill_body_parity(repo: Path, run_scripts: bool = False) -> list[Finding]:
65
- """Verify that all distributed skill copies match the canonical body."""
66
- if not run_scripts:
67
- return [
68
- Finding(
69
- "warn",
70
- "skill-body-parity",
71
- "skipping script validation (pass --run-scripts to allow executing repo scripts)",
72
- )
73
- ]
74
- try:
75
- skill_mod = _load_script_module(
76
- repo, "scripts/validate_skill_copies.py", "_forerunner_doctor_skill_copies"
77
- )
78
- strip_frontmatter: Callable[[str], str] = skill_mod.strip_frontmatter
79
- except Exception as exc: # pragma: no cover - defensive
80
- return [Finding("error", "skill-body-parity", f"loader failure: {exc}")]
81
-
82
- canonical_path = repo / CANONICAL_REL
83
- if not canonical_path.is_file():
66
+ """Verify that all distributed skill copies match the canonical body.
67
+
68
+ Body parity is owned by the Skill Body Parity module, which only reads
69
+ files (no target-repo code is executed), so this runs regardless of
70
+ ``run_scripts`` — that flag still gates checks that load repo scripts.
71
+ """
72
+ result = _parity.check_skill_body_parity(repo)
73
+ if result.missing_canonical:
84
74
  return [
85
75
  Finding(
86
76
  "error",
@@ -88,21 +78,12 @@ def _check_skill_body_parity(repo: Path, run_scripts: bool = False) -> list[Find
88
78
  f"canonical skill missing: {CANONICAL_REL}",
89
79
  )
90
80
  ]
91
- canonical_body = strip_frontmatter(canonical_path.read_text(encoding="utf-8"))
92
81
 
93
82
  findings: list[Finding] = []
94
- for rel in SKILL_COPIES_REL:
95
- p = repo / rel
96
- if not p.is_file():
97
- findings.append(
98
- Finding("error", "skill-body-parity", f"copy missing: {rel}")
99
- )
100
- continue
101
- body = strip_frontmatter(p.read_text(encoding="utf-8"))
102
- if body != canonical_body:
103
- findings.append(
104
- Finding("error", "skill-body-parity", f"body drift in {rel}")
105
- )
83
+ for rel in result.missing_copies:
84
+ findings.append(Finding("error", "skill-body-parity", f"copy missing: {rel}"))
85
+ for rel in result.drifted_copies:
86
+ findings.append(Finding("error", "skill-body-parity", f"body drift in {rel}"))
106
87
  if not findings:
107
88
  findings.append(
108
89
  Finding(