Apply versioned line patches to OpenSpec skills
Project description
openspec-patcher
osp applies versioned, line-based patches to OpenSpec skills without maintaining an OpenSpec fork.
osp install <patch.json>
osp [patch-id]
osp status
osp list
osp restore [patch-id] [-f]
Installed patches are stored per user. A patched project receives an openspec.patch manifest containing immutable skill baselines, active patch references, and rendered hashes.
Patch positions always refer to the original skill content. Every apply or restore rerenders all active patches from that baseline.
Patch Format
{
"schemaVersion": 1,
"id": "zh-cn-output",
"name": "Simplified Chinese output",
"operations": {
"1.4.0-1.4.3,1.5.0": [
{
"content": "replacement text",
"positions": [
{
"tool": "opencode",
"skill": "openspec-apply-change",
"startLine": 12,
"endLine": 12
}
]
}
]
}
}
Version selectors accept MAJOR.MINOR.PATCH and inclusive from-to ranges separated by commas. Different selector keys in one patch must not overlap. Every position is resolved through src/openspec_patcher/resources/paths.json; positions for unavailable tools are skipped.
Storage and Recovery
On Windows, installed patches are stored in %LOCALAPPDATA%\openspec-patcher\patches. Linux uses $XDG_DATA_HOME/openspec-patcher/patches (or ~/.local/share), and macOS uses ~/Library/Application Support/openspec-patcher/patches. Set OSP_DATA_DIR to override the location, which is useful for isolated testing.
The project-level openspec.patch stores only active patch IDs and SHA-256 values. The matching patch documents must remain available locally to rerender any patch that stays active. osp restore -f ignores changed current skill hashes and rebuilds from the saved original content; it can overwrite manual skill edits.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openspec_patcher-0.1.0.tar.gz.
File metadata
- Download URL: openspec_patcher-0.1.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f6860f6fc7b8287e11308c4978646dd5bf6e96ed1f8f44ba70254d50974ac4
|
|
| MD5 |
c6e26a6b76f6884b86cf0a78a5ec41bd
|
|
| BLAKE2b-256 |
2d2182bb59905bed9477b4557690bfa8d0819016473c2edb2bb6482ebf735644
|
Provenance
The following attestation bundles were made for openspec_patcher-0.1.0.tar.gz:
Publisher:
publish.yml on DarkskyX15/openspec-patcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openspec_patcher-0.1.0.tar.gz -
Subject digest:
f4f6860f6fc7b8287e11308c4978646dd5bf6e96ed1f8f44ba70254d50974ac4 - Sigstore transparency entry: 2178967834
- Sigstore integration time:
-
Permalink:
DarkskyX15/openspec-patcher@13fe0614fe7c248d94d123d13ccdf3c2d4d33007 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DarkskyX15
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@13fe0614fe7c248d94d123d13ccdf3c2d4d33007 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openspec_patcher-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openspec_patcher-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7238b409544a2b30be41414b9192a90d9a3f9f74d2b186968c12cf3ca397c2c
|
|
| MD5 |
5922cc0f202f51be45b44b6cbe92f9a6
|
|
| BLAKE2b-256 |
cec5b2ed9e724f1d976c4f4677d1912a727160af7d0fec2429e60c15ba031824
|
Provenance
The following attestation bundles were made for openspec_patcher-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on DarkskyX15/openspec-patcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openspec_patcher-0.1.0-py3-none-any.whl -
Subject digest:
c7238b409544a2b30be41414b9192a90d9a3f9f74d2b186968c12cf3ca397c2c - Sigstore transparency entry: 2178967879
- Sigstore integration time:
-
Permalink:
DarkskyX15/openspec-patcher@13fe0614fe7c248d94d123d13ccdf3c2d4d33007 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DarkskyX15
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@13fe0614fe7c248d94d123d13ccdf3c2d4d33007 -
Trigger Event:
push
-
Statement type: