refactor(distribution): add Distribution Inventory as single source#78
Merged
Conversation
Centralize distribution artifact identity and install policy — canonical skill path, distributed copy paths, marketplace manifest path, managed-region markers, and default install-destination templates — in codeforerunner.distribution. installer, doctor, and the skill-copy validator now consult the inventory instead of re-declaring constants, so a packaging change is one edit. Install behavior is unchanged. Closes #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #50.
What
Adds
src/codeforerunner/distribution.py— the Distribution Inventory that owns distribution artifact identity and install policy, previously duplicated across installer/doctor/validators:agent/codeforerunner.skill.md)MARKER_BEGIN/MARKER_END)skill_destination,marketplace_destination)Consumers now consult the inventory:
installer.py—resolve_target/resolve_skill_targetdelegate toskill_destination; markers/paths re-exported for back-compat.doctor.py— destinations and markers sourced from the inventory.scripts/validate_skill_copies.py— canonical/copy paths sourced from the inventory (src on path for standalone runs).Install behavior unchanged: idempotent writes, body-parity, managed markers, overlay safety all intact.
Tests (TDD)
tests/test_distribution.py— 6 tests covering constants, markers, and per-agent/slug destination resolution.271 pytest green;
validate_skill_copies.py,validate_codex_marketplace.py,check_versions.pyall green.Out of scope
No installer UX, marker string, or marketplace schema changes.
🤖 Generated with Claude Code