All skills
Skillintermediate
Path Resolution Migration Plan
This plan describes the concrete work needed to migrate README generation to the final path-resolution strategy (relative asset paths resolved per output file).
Claude Code Knowledge Pack7/10/2026
Overview
Path Resolution Migration Plan
This plan describes the concrete work needed to migrate README generation to the final path-resolution strategy (relative asset paths resolved per output file).
Scope
- Keep style-specific templates intact (extra/classic/awesome/flat).
- Remove all path-specific assumptions from templates and markup.
- Centralize asset path resolution in the generator.
Plan
-
Audit templates and markup
- Inventory all occurrences of
{{ASSET_PREFIX}},{{ASSET_PATH(...)}},assets/,../assets,/assets. - Identify every generator/markup call site that injects or assumes a prefix.
- Map all output locations (root README, README_ALTERNATIVES, .github, etc.).
- Inventory all occurrences of
-
Introduce a single asset token scheme
- Choose one token format (e.g.,
asset:foo.pngor{{ASSET_PATH('foo.png')}}). - Implement a resolver that:
- finds
repo_rootviapyproject.toml - computes a relative path from the output file’s directory to
/assets - replaces tokens with correct POSIX paths
- finds
- Remove
ASSET_PREFIXandis_root_readmeassumptions from templates.
- Choose one token format (e.g.,
-
Wire the resolver into generation
- Apply the resolver after template substitution but before writing files.
- Update markup helpers to emit tokenized asset references instead of prefixes.
- Ensure style selector and repo ticker resolve through the same mechanism.
-
Add generated-file header
- Insert `` into all outputs.
- Ensure templates or generator handle this consistently.
-
Update tests and docs
- Add/adjust tests to validate asset paths for all output locations.
- Ensure
test-regenerateremains the canonical drift check. - Update docs to reflect the new token scheme and remove obsolete guidance.
Completion Criteria
- No templates or markup contain concrete asset prefixes.
- Outputs render correctly in-place and on GitHub across all locations.
make test-regeneratepasses with a clean working tree.