feat(service): generic schema and search operations with an osl-tasks skill - #204
Merged
Merged
Conversation
- seven task operations shared by the CLI and the MCP server - fixed status and priority vocabularies; references resolved by label - OSW_PERSON_IRI plus three category overrides, all optional - osl-tasks skill, installed by `osw skill install` or as a plugin - reads the stored page uncached, and verifies a write really landed
- oold's LinkedBaseModel.__init__ clears them, not _store - no wiki call is involved; cls(**jsondata) alone is enough - rename the test to match
- read the field-to-property mapping from the category schema chain - cache the merged context per WtSite, cleared by clear_cache - keep the hardcoded names as a fallback when the schema is unreadable - alias printouts to the property name; SMW keys them by display label - raise instead of querying a property the @context does not declare
- search ask: printouts parameter, result keys forced by an alias - search label: find an entity or category by its display title - schema get: resolve option merges the category inheritance chain - schema props: expose the Semantic MediaWiki property map - entity validate: check a payload against the resolved schema
- exempt uuid and type from required: the osw model supplies both - report pages the schema walk could not use as `skipped`, with a reason - treat a blank schema slot as absent, not as a parse failure - drop a skipped entry when a shorter branch read that page successfully - guard a malformed `required` so it still surfaces as SchemaError
- count per category field how many stored instances populate it - answers which of several same-shaped fields real data uses - guard the category against ask-query injection, as search does - read instances uncached, like the schema walk in the same module - report nothing when the sample is empty, and say why a page failed
- list_tasks, list_projects and list_persons are covered by the generic search ask and search label operations - render_task_view wrote a local Markdown file, which the skill does itself - _resolve_ref now names search_by_label instead of the removed list ops - OSW_PERSON_IRI is no longer read by any operation
- default overwrite changes from 'keep existing' to 'true', so an update writes - created/updated split comes from the pre-write WtPage.exists flag - 'keep existing' now reports the page as skipped instead of updated - the ledger records only pages that were actually written
- replaces the task-specific commands with entity, schema and search ops - keeps the three category page names in prose; they are not discoverable - status and priority vocabularies are read from the category schema - records the update-by-uuid rule and the required-label validation - documents the printout value shapes returned by an ask query
- create_task, update_task and create_person are covered by the osl-tasks skill driving the generic entity, schema and search operations - drops the 'task' CLI group and its three MCP tools - keeps the four OSW_*_CATEGORY and OSW_PERSON_IRI variables; no operation reads them any more, the skill reads the environment directly - corrects the documented status and prio vocabularies: they store page names read from the category schema, not the words the commands took
- the skill now runs 'entity validate' once per run, which catches a wrong status page name against the schema enum before anything is stored - adds the alias mapping the deleted module held, as prose - states that the four env variables are unreachable through the MCP server - a config test now covers the four settings no operation reads
- SKILL.md carries it as metadata.version, the Agent Skills spec field - python-semantic-release rewrites it with pyproject.toml and CITATION.cff - a test fails when the two versions differ or the entry is removed
- register .claude-plugin/plugin.json:version with python-semantic-release - set the plugin and skill versions to the current 2.7.0 after the rebase - parametrize the three version guard tests over skill and plugin
- add the third stamped file to both parametrized guard tests - compare against the release tool's own read, not a UTF-8 read - name all four stamped files in the release workflow comment
Contributor
Release previewMerging this PR would release v2.8.0 (current: Changelog preview (truncated)## v2.8.0 (2026-09-22)
### Bug Fixes
- **service**: Reconcile validate_entity with the write path
([`bff6dc8`](https://github.com/OpenSemanticLab/osw-python/commit/bff6dc805417871d23eeeb7793c26ec3c95fa1cb))
- **service**: Report created, updated and skipped pages separately
([`cc5c13c`](https://github.com/OpenSemanticLab/osw-python/commit/cc5c13c89b5242ac4dfaed2685e2a6e7e39d2200))
- **skill**: Validate before the first write, and cover the task settings
([`a97e423`](https://github.com/OpenSemanticLab/osw-python/commit/a97e4236a130c49503ec2060ae64592fca3add6c))
### Build System
- **release**: Stamp the osw version into the osl-tasks skill
([`9309dc3`](https://github.com/OpenSemanticLab/osw-python/commit/9309dc374fbc1d6f566edb9f85be5c87db473189))
- **release**: Stamp the osw version into the plugin manifest too
([`e349225`](https://github.com/OpenSemanticLab/osw-python/commit/e349225902fcbe9465c65061d2eabb031d92307d))
### Documentation
- **service**: Correct the cause of the emptied reference lists
([`0b0f1ba`](https://github.com/OpenSemanticLab/osw-python/commit/0b0f1ba29d34e12a892b9ed5219e79b98e53c580))
- **service**: Name the two terms that could desync the skipped check
([`e427047`](https://github.com/OpenSemanticLab/osw-python/commit/e4270476278297d1f14a57883ab0274163f10b20))
- **skill**: Drive osl-tasks from the generic operations
([`8b8dabd`](https://github.com/OpenSemanticLab/osw-python/commit/8b8dabd99f70e6fbe6eba646d1fddbe054d04532))
### Features
- **service**: Add generic schema, search and validation operations
([`219a76e`](https://github.com/OpenSemanticLab/osw-python/commit/219a76e30de623b4eca1c0657c4da7ed2d978b13))
- **service**: Add schema field-usage operation
([`50998e9`](https://github.com/OpenSemanticLab/osw-python/commit/50998e90a5a133ee190339a29baaccd867c864d3))
- **service**: Add task and project operations with a Claude skill
([`cdc920e`](https://github.com/OpenSemanticLab/osw-python/commit/cdc920e9c8d2ad6c1321bdf3bea1d31d208b75b9))
- **service**: Derive SMW property names from the category @context
([`d794302`](https://github.com/OpenSemanticLab/osw-python/commit/d7943027645dbf4913ab9da955ad9a42370de2a1))
### Refactoring
- **service**: Drop the task read and render operations
([`f38c400`](https://github.com/OpenSemanticLab/osw-python/commit/f38c400bd5318e52daa44d38e6647f88cc641303))
- **service**: Remove the task service module
([`1dcba96`](https://github.com/OpenSemanticLab/osw-python/commit/1dcba96e48d69e04d02457e2138e1e8f84a489f5))
### Testing
- **release**: Check the version bump touches only the skill frontmatter
([`3ee045b`](https://github.com/OpenSemanticLab/osw-python/commit/3ee045ba6f2bd82603ef9e3afe18a0cff076c4f2))
- **release**: Cover CITATION.cff in the version stamping guards
([`af2ef57`](https://github.com/OpenSemanticLab/osw-python/commit/af2ef57eb4c405aaeb664325bfb61fdf1e211c2c))
- **release**: Drop the version equality check
([`7be7c22`](https://github.com/OpenSemanticLab/osw-python/commit/7be7c22c9abf62d878a85ec252cb860a82a5179a))
Preview via python-semantic-release and conventional commits. |
- a PR is tested against its merge with main, so a release there leaves a branch that edits SKILL.md with an older version in that file only - the check failed on this PR for that reason, not for a real defect - registration and replacement tests still cover the rot that matters - set the skill and plugin versions to main's current 2.7.1
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.
Adds the generic entity, schema and search operations needed to drive OpenSemanticLab task management from a Claude Code skill, so no task-specific service module is required.
New operations
entity validate: check jsondata against the category schema without writing. Uses the same auto-filled-field set and remote-reference handling as the write path.schema get --resolve: merge a category schema with the schemas it inherits from.schema props: field-to-SMW-property map, read from the category@context.schema usage: how often each field is populated across a sample of instances.search label: look up entities by label.skill install(CLI surface only): copy the packaged skill to~/.claude/skills/.Changed behaviour
entity putreportscreated,updatedandskippedseparately instead of listing every page as stored.skippedholds the pages left untouched by thekeep existingpolicy. This is the service-layer half of Overwrite policy: an empty value cannot clear a property, and kept pages are reported as stored #190. The underlyingStoreEntityResultdefect incore.pyis addressed in fix(core): address follow-up issues in the overwrite policy #168.entity putdefaults tooverwrite=trueinstead ofkeep existing, so a write is not silently skipped.WtSitegainsget_jsonld_contextandget_smw_property_map. SMW property names are derived from the category@contextchain instead of being hardcoded, cached perWtSiteand cleared byclear_cache. Printouts are aliased to the property name, because SMW keys results by display label.Skill and plugin
src/osw/skills/osl-tasks/SKILL.mddrives the generic operations. There are no task-specific CLI or MCP commands..claude-plugin/marketplace.jsonand.claude-plugin/plugin.jsonsupport/plugin marketplace add OpenSemanticLab/osw-pythonfollowed by/plugin install osl-tasks.OSW_TASK_CATEGORY,OSW_PERSON_CATEGORY,OSW_PROJECT_CATEGORY,OSW_PERSON_IRI.Release version stamping
CITATION.cff, the skill frontmatter and.claude-plugin/plugin.jsonalongsidepyproject.toml.plugin.json, so a version that never changes keeps plugin users on the skill they first installed.project.version, the entry is registered inversion_variables, and the release tool's own replacement changes exactly one line. The last one matters because the replacement rewrites every match in the file, with no line anchor.Tests
tests/test_service_ops_schema.py,tests/test_wtsite_jsonld_context.py, plus additions to the entities, search, config and skill test modules.make checkpasses.