468 lines
17 KiB
Markdown
468 lines
17 KiB
Markdown
---
|
|
name: pid-version-checker
|
|
description: Check whether an AI agent is using the latest server-hosted Portable Identity Document resources; inspect paddlenet.earth discovery files, compare discovered release metadata against local mirrors when present, summarize available updates, preserve user-owned files, and avoid requiring users to download the skill pack.
|
|
---
|
|
|
|
# PID Version Checker Skill
|
|
|
|
## Compatibility Notes
|
|
|
|
- Version: 0.2.3
|
|
- Status: draft
|
|
- Intended hosts:
|
|
- Codex Desktop
|
|
- Claude Desktop
|
|
- ChatGPT with file/context access
|
|
- other local or cloud AI agent apps that can read files and optionally use Git or network access
|
|
|
|
## Purpose
|
|
|
|
Help an AI agent find and use the latest Portable Identity Document template, skills, and process documents without making the user download or maintain the skill pack locally.
|
|
|
|
This skill is a freshness preflight for the other PID skills. It checks paddlenet.earth discovery assets first, uses the canonical repo as a fallback, compares any local mirror when present, explains what source/version will be used, and records what happened.
|
|
|
|
## Release Source
|
|
|
|
Primary AI entrypoint:
|
|
|
|
```text
|
|
https://paddlenet.earth
|
|
```
|
|
|
|
Preferred discovery files:
|
|
|
|
- `llms.txt`
|
|
- `agents.md`
|
|
- `skills.md`
|
|
- `ai-index.json`
|
|
- `sitemap.xml`
|
|
|
|
Canonical repo fallback:
|
|
|
|
```text
|
|
https://forge.paddlenet.earth/networkSIG/portable-identity-document-template-OPEN
|
|
```
|
|
|
|
Use the discovery files to find releases, tags, `VERSION`, `pid-release.json`, `CHANGELOG.md`, templates, and updated skill files when remote access is available and permitted. Human users should not need to paste the canonical repo URL during normal use.
|
|
|
|
## Contract
|
|
|
|
This skill guarantees:
|
|
|
|
- It will inspect paddlenet.earth discovery assets before using PID skills or templates.
|
|
- It will identify the latest discovered PID resource version from discovery assets, `pid-release.json`, `VERSION`, Git tags, or changelog entries when available.
|
|
- It will compare the discovered version against any local mirror or cached files when the user provides them.
|
|
- It will summarize discovered source, local/cached source when present, latest known version, and relevant changelog entries.
|
|
- It will not require the user to download or clone the skill pack for normal PID work.
|
|
- It will ask for explicit user approval before updating any local mirror.
|
|
- It will preserve user-owned files, especially `skills/PID-update-maintenance-skill-user-variables.md`, review drafts, receipts, and personal PID files.
|
|
- It will continue the calling workflow when remote freshness cannot be verified, unless the user explicitly asks to stop.
|
|
- It will create or update a durable receipt for serious update checks or any applied update.
|
|
|
|
## Inputs
|
|
|
|
The skill expects:
|
|
|
|
- Access to paddlenet.earth discovery assets.
|
|
- Optional local PID repo mirror path.
|
|
- Optional user-provided local variables file path.
|
|
- Optional user preference about whether to check remote versions.
|
|
- Optional user preference about whether to update a local mirror now or only report status.
|
|
|
|
Default server/repo files to identify when available:
|
|
|
|
- `VERSION`
|
|
- `pid-release.json`
|
|
- `CHANGELOG.md`
|
|
- `skills/PID-version-checker-skill.md`
|
|
|
|
## Outputs
|
|
|
|
This skill produces:
|
|
|
|
- A freshness status report.
|
|
- If updates are available, a concise update proposal.
|
|
- If the user approves updating, an update result report.
|
|
- `skills-receipts/PID-version-check-run-receipt-[YYYY-MM-DD].md` for serious checks or update runs.
|
|
|
|
## Skill Shape
|
|
|
|
`service`
|
|
|
|
This is one bounded workflow with clear inputs and outputs. It may be used as a preflight by other PID skills.
|
|
|
|
## Requires
|
|
|
|
This skill requires:
|
|
|
|
- Ability to inspect paddlenet.earth discovery files or a user-provided copy of them.
|
|
- Ability to read release metadata from the canonical repo fallback when discovery is incomplete.
|
|
- Ability to ask the user before updating any local mirror.
|
|
- Ability to write a receipt when file writing is available.
|
|
|
|
Optional:
|
|
|
|
- Git CLI access for tags, remotes, fetch, pull, and status when maintaining an optional local mirror.
|
|
- Network access for server discovery and remote version checks.
|
|
- A local mirror for offline comparison when the user intentionally keeps one.
|
|
|
|
If network access is unavailable, report that freshness could not be fully verified and continue only with clearly labeled local/cached instructions. Do not tell the user to download the full skill pack as the normal path.
|
|
|
|
## Ensures
|
|
|
|
Before finishing, this skill ensures:
|
|
|
|
- Discovered server resource version status is reported.
|
|
- Remote/latest version status is reported when available.
|
|
- Available update details are summarized before any update.
|
|
- User-owned files are not overwritten without explicit user request.
|
|
- Update status is recorded in the calling skill receipt when this skill is used as a preflight.
|
|
- A standalone update-check receipt is created for serious checks or any applied update.
|
|
- Users are not asked to download the skill pack for normal use; local mirror update guidance is treated as an advanced fallback.
|
|
|
|
## Capabilities
|
|
|
|
Required host capabilities:
|
|
|
|
- CLI tools: optional but useful for Git version checks.
|
|
- MCP/connectors: optional.
|
|
- Browser access: optional; use only if the user wants to inspect a web release page.
|
|
- Filesystem access: required for reading optional local variables, optional local mirrors, and writing receipts.
|
|
- Network access: optional for remote checks.
|
|
- Subagent support: not required.
|
|
- Image/document/spreadsheet support: not required.
|
|
|
|
If remote capabilities are unavailable, do not fake the result. Say that only local or cached resource status was verified.
|
|
|
|
## State Scope
|
|
|
|
`project`
|
|
|
|
Persistent writes:
|
|
|
|
- `skills-receipts/PID-version-check-run-receipt-[YYYY-MM-DD].md`
|
|
|
|
Do not write cross-project or long-term user memory.
|
|
|
|
## Host Primitive Adapter
|
|
|
|
Map abstract workflow needs to available host actions:
|
|
|
|
- Ask user: ask before remote checks if required by host policy, and always before applying updates.
|
|
- Read/write files: read version files, changelog, and manifest; write receipts.
|
|
- Run shell command: optionally run Git commands such as `git status`, `git tag --list`, `git fetch --tags`, `git describe`, and `git pull`.
|
|
- Manual files: for optional local mirrors, compare maintainer-owned files only after the user provides a newer trusted source and approves the change.
|
|
- Use connector: not normally required.
|
|
- Use browser: optional for public release pages.
|
|
- Create durable report: write the update-check receipt when possible.
|
|
|
|
If the host cannot provide a required primitive, narrow the workflow and record the limitation.
|
|
|
|
## Workflow
|
|
|
|
### Phase 1: Discover Server Resources And Optional Local Version
|
|
|
|
1. Start at paddlenet.earth.
|
|
2. Inspect available discovery files such as `llms.txt`, `agents.md`, `skills.md`, `ai-index.json`, and `sitemap.xml`.
|
|
3. Identify PID resource URLs, `VERSION`, `pid-release.json`, `CHANGELOG.md`, templates, and skills.
|
|
4. If discovery is incomplete, inspect the canonical repo fallback.
|
|
5. If the user provides a local mirror, read local `VERSION`, `pid-release.json`, changelog, and Git metadata.
|
|
6. Determine the best discovered version and any local/cached version.
|
|
|
|
Completion criteria:
|
|
|
|
- Discovered server resource version is known, or the missing metadata is reported.
|
|
|
|
### Phase 2: Check Latest Available Version
|
|
|
|
Use the safest available method:
|
|
|
|
1. Prefer version metadata found through paddlenet.earth discovery.
|
|
2. If discovery points to a remote manifest, compare `repo_version`.
|
|
3. If the canonical repo is accessible, inspect `VERSION`, `pid-release.json`, `CHANGELOG.md`, and tags.
|
|
4. If a local mirror exists, compare it to the latest discovered server version.
|
|
5. If no remote check is possible, mark latest version as unknown.
|
|
|
|
Completion criteria:
|
|
|
|
- Latest known version is known, or the inability to check is clearly recorded.
|
|
|
|
### Phase 3: Compare Versions
|
|
|
|
1. Compare any local/cached version to the latest discovered version.
|
|
2. Classify status:
|
|
- `current`
|
|
- `update_available`
|
|
- `local_mirror_ahead`
|
|
- `unknown_discovery`
|
|
- `missing_discovery_metadata`
|
|
3. If an update is available, read changelog entries between local and latest when available.
|
|
|
|
Completion criteria:
|
|
|
|
- User gets a clear status and next action.
|
|
|
|
### Phase 4: Propose Update
|
|
|
|
If update is available:
|
|
|
|
1. Summarize what changed.
|
|
2. List likely files to update.
|
|
3. List user-owned files that will be preserved.
|
|
4. State whether an optional local mirror exists and whether it appears Git-managed or manually maintained.
|
|
5. For Git-managed folders, ask whether to apply the update now or continue with the current version.
|
|
6. For users without a local mirror, explain that no local skill update is needed because the AI should use the server-hosted resources. For optional local mirrors, explain the Git or manual comparison path and ask before changing files.
|
|
|
|
Stop here unless the user explicitly approves updating.
|
|
|
|
### Phase 5: Apply Approved Update To Optional Local Mirror
|
|
|
|
If the user keeps an optional local mirror and approves updating it:
|
|
|
|
1. Confirm the mirror path and worktree status before updating.
|
|
2. Warn if there are uncommitted local changes that may conflict.
|
|
3. Prefer normal Git update mechanisms such as fetch, pull, and tag fetch when the mirror is Git-managed.
|
|
4. For manually maintained mirrors, compare maintainer-owned files against the trusted server/canonical source before copying or merging.
|
|
5. Preserve user-owned files from `pid-release.json`, especially `skills/PID-update-maintenance-skill-user-variables.md`.
|
|
6. Re-read `VERSION`, `pid-release.json`, and relevant skill files after updating.
|
|
7. Report success or any files that need manual review.
|
|
|
|
If the user does not keep a local mirror, do not apply any local skill update. Record that the workflow used server-hosted resources.
|
|
|
|
Do not use destructive Git commands such as reset, checkout, clean, or force overwrite unless the user explicitly requests them.
|
|
|
|
### Phase 6: Receipt
|
|
|
|
Write `skills-receipts/PID-version-check-run-receipt-[YYYY-MM-DD].md` when:
|
|
|
|
- the user asked specifically to check or update versions
|
|
- an update was available
|
|
- an update was applied
|
|
- remote checking failed in a way future agents should know about
|
|
- the calling skill is doing a serious PID creation or maintenance workflow
|
|
|
|
## Validation
|
|
|
|
Before finishing, verify:
|
|
|
|
- [ ] Discovered source and version are recorded.
|
|
- [ ] Optional local mirror type is recorded as Git-managed, manual, not present, or unknown.
|
|
- [ ] Discovery/latest version source is recorded, or unavailable status is recorded.
|
|
- [ ] Update status is classified.
|
|
- [ ] User approval was requested before any update was applied.
|
|
- [ ] Users without a local mirror were told no local skill update is required for normal use.
|
|
- [ ] User-owned files were preserved.
|
|
- [ ] Receipt was written when required, or inability to write it was reported.
|
|
|
|
## Validation Tiers
|
|
|
|
### Tier 1: Fast Deterministic Checks
|
|
|
|
Run every time:
|
|
|
|
- `VERSION` and `pid-release.json` agree when both exist.
|
|
- Manifest JSON parses when available.
|
|
- The changelog contains the current version when available.
|
|
- Optional local mirror status is classified when a mirror exists.
|
|
- User-owned files are listed before any update proposal.
|
|
|
|
### Tier 2: Realistic Workflow Review
|
|
|
|
Run before applying updates:
|
|
|
|
- Check Git worktree status.
|
|
- Confirm update source.
|
|
- For optional manual local mirrors, confirm the trusted newer source before merging.
|
|
- Re-read version metadata after update.
|
|
- Confirm user-owned files still exist.
|
|
|
|
### Tier 3: LLM-As-Judge Or Reviewer Panel
|
|
|
|
Use only when changelog interpretation is subjective:
|
|
|
|
- whether release notes imply breaking changes
|
|
- whether the user should update now or continue current work first
|
|
|
|
## Test Surface
|
|
|
|
This skill can be tested through:
|
|
|
|
- Static checks: required sections exist; no unresolved placeholders; frontmatter has only `name` and `description`.
|
|
- Schema checks: `pid-release.json` parses as JSON and contains required keys.
|
|
- Invariant checks: no update without user approval; user-owned files preserved.
|
|
- Fixture tests: missing `VERSION`; missing manifest; local mirror older than discovered version; remote discovery unavailable.
|
|
- Behavioral tests: agent asks before update; agent records skipped remote checks.
|
|
- Freshness checks: skill version matches `pid-release.json`.
|
|
|
|
## Coverage And Edge-Case Audit
|
|
|
|
Before finishing a serious update check, map:
|
|
|
|
- discovery metadata files found or missing
|
|
- optional local mirror metadata found or missing
|
|
- optional local mirror type: Git-managed, manual, not present, or unknown
|
|
- remote discovery access available or unavailable
|
|
- optional local mirror available or unavailable for comparison
|
|
- user-owned files detected
|
|
- update status
|
|
- receipt status
|
|
- risks requiring manual review
|
|
|
|
Mark gaps as:
|
|
|
|
- `[MANUAL]` user decision required
|
|
- `[SOURCE]` version source missing
|
|
- `[CONNECTOR]` remote check unavailable
|
|
- `[PRIVACY]` user-owned or sensitive file at risk
|
|
- `[FUTURE]` good candidate for improved release tooling
|
|
|
|
## Edge Cases
|
|
|
|
Actively handle:
|
|
|
|
- repo has no tags
|
|
- repo has uncommitted local changes
|
|
- `VERSION` and `pid-release.json` disagree
|
|
- changelog is missing current version
|
|
- remote fetch fails
|
|
- network access is unavailable
|
|
- optional local mirror is ahead of the canonical source
|
|
- user variables file contains private paths
|
|
- user has no Git installed
|
|
- manually maintained local mirror is missing `pid-release.json`
|
|
- user wants to continue current skill without updating
|
|
|
|
## Regression Rule
|
|
|
|
If this skill discovers that update checking previously worked and now breaks, create a regression artifact immediately.
|
|
|
|
Acceptable regression artifacts:
|
|
|
|
- updated validation checklist item
|
|
- manifest schema rule
|
|
- anti-pattern
|
|
- edge-case note
|
|
- release-process note
|
|
- STOP gate before applying updates
|
|
|
|
## Ratchet Rules
|
|
|
|
When this skill discovers a recurring versioning mistake, ambiguous update path, failed validation, or risky overwrite case, convert the lesson into at least one durable artifact:
|
|
|
|
- update this skill
|
|
- update `pid-release.json`
|
|
- update README release instructions
|
|
- update changelog format
|
|
- add a manifest field
|
|
- add an anti-pattern
|
|
- add a validation item
|
|
|
|
Do not merely fix the current update.
|
|
|
|
## Anti-Patterns
|
|
|
|
Do not:
|
|
|
|
- update files before the user approves
|
|
- overwrite user variables or personal PID files
|
|
- pretend remote status is known when remote access failed
|
|
- treat informal changelog notes as the only source of version truth
|
|
- use destructive Git commands without explicit user request
|
|
- run Git update commands in a non-Git folder
|
|
- tell users that a local mirror was updated when no local mirror update occurred
|
|
- copy server/canonical files over user-owned files
|
|
- ignore uncommitted local changes
|
|
- block a PID workflow only because remote freshness could not be checked
|
|
- bury available updates without telling the user
|
|
|
|
## Run Receipt
|
|
|
|
Use this Markdown structure when writing `PID-version-check-run-receipt-[YYYY-MM-DD].md`:
|
|
|
|
```md
|
|
# PID Version Check Run Receipt
|
|
|
|
## Skill Run
|
|
|
|
- Skill name:
|
|
- Skill source URL/path:
|
|
- Skill version:
|
|
- Run date:
|
|
- Executor/host:
|
|
- User request:
|
|
|
|
## Sources
|
|
|
|
- Primary discovery entrypoint:
|
|
- Canonical repo fallback:
|
|
- Optional local mirror path:
|
|
- Optional local mirror type: Git-managed / manual / not present / unknown
|
|
|
|
## Local Or Cached Version
|
|
|
|
- VERSION:
|
|
- Manifest version:
|
|
- Git tags:
|
|
- Changelog version:
|
|
|
|
## Latest Discovered Version
|
|
|
|
- Source:
|
|
- Version:
|
|
- Remote check status:
|
|
|
|
## Comparison Result
|
|
|
|
- Status:
|
|
- Update available:
|
|
|
|
## User-Owned Files To Preserve
|
|
|
|
## User Decision
|
|
|
|
- Update approved:
|
|
- Continue with current version:
|
|
|
|
## External State Changed
|
|
|
|
- Files modified:
|
|
- Git commands run:
|
|
- Manual files copied or merged:
|
|
- User-owned files preserved:
|
|
- Nothing changed without explicit approval:
|
|
|
|
## Validation Results
|
|
|
|
## Failures Or Gaps Found
|
|
|
|
## Ratchet Lessons
|
|
|
|
## Resume / Audit Notes
|
|
|
|
## Recommended Next Steps
|
|
```
|
|
|
|
## Receipt Vs Final Report
|
|
|
|
The final report is for the user.
|
|
|
|
The run receipt is for future agents, auditors, and maintainers.
|
|
|
|
Do not rely on the final response as the only record when update status was checked, remote checks failed, files were updated, or a user decision was made.
|
|
|
|
## Final Report
|
|
|
|
When finished, report concisely:
|
|
|
|
- discovered source and version
|
|
- local/cached version when present
|
|
- whether a newer discovered version is available
|
|
- whether an optional local mirror was updated or left unchanged
|
|
- whether the mirror update path was Git-managed or manual comparison
|
|
- whether user-owned files were preserved
|
|
- where the receipt was written, or why it was not written
|
|
|
|
## One-Sentence Version
|
|
|
|
Check paddlenet.earth discovery for the latest PID template and skills, compare any optional local mirror, preserve user-owned files, and record the source/version the agent used so future agents know what happened.
|