[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X27D04FP7E43P2WYJQQCGT":3,"skill-same:01M6X27D04FP7E43P2WYJQQCGT":170},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":77,"commitSha":78,"skillDirectory":79,"forksCount":14,"repositoryHtmlUrl":80,"repositoryHomepageUrl":81,"ownerHtmlUrl":82,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":83,"install":84,"resources":97},"01M6X27D04FP7E43P2WYJQQCGT","pk-doctor",null,"Aggregator health-check for a processkit-managed repository. Runs a fixed suite of detect-only checks over the live context\u002F tree plus src\u002Fcontext\u002F drift and surfaces ERROR \u002F WARN \u002F INFO findings in a single report. Use when the user invokes `\u002Fpk-doctor`, asks \"is this repo healthy\", or has just finished an upgrade and wants a sanity pass. Detect-only by default; `--fix` \u002F `--fix-all` opt in to scoped repairs that route through existing MCP write tools only — doctor never hand-edits files under `context\u002F`.","projectious-work\u002Fprocesskit","projectious-work","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F263889726?v=4","01M6N97TJJ118WQ35CHRV8RD0E","projectious.work","01M6N97TPWJPF0BMKYQ4PBY5W8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"doctor","pk doctor","when","MCP","phase","managed","hand","errors","sanity","error","aggregator","upgrade","drift","health-check","default","files","log","only","never","fix","2026-11-10 10:12:30",false,"---\nname: pk-doctor\ndescription: |\n  Aggregator health-check for a processkit-managed repository. Runs a fixed suite of detect-only checks over the live context\u002F tree plus src\u002Fcontext\u002F drift and surfaces ERROR \u002F WARN \u002F INFO findings in a single report. Use when the user invokes `\u002Fpk-doctor`, asks \"is this repo healthy\", or has just finished an upgrade and wants a sanity pass. Detect-only by default; `--fix` \u002F `--fix-all` opt in to scoped repairs that route through existing MCP write tools only — doctor never hand-edits files under `context\u002F`.\nmetadata:\n  processkit:\n    apiVersion: processkit.projectious.work\u002Fv1\n    id: SKILL-pk-doctor\n    version: \"1.0.0\"\n    created: 2026-04-20T00:00:00Z\n    category: processkit\n    layer: 3\n    uses:\n      - skill: event-log\n        purpose: Emit the single `doctor.report` LogEntry per run (the audit trail for every invocation).\n      - skill: migration-management\n        purpose: List pending migrations for the `migrations` check and apply them under `--fix`.\n      - skill: index-management\n        purpose: (future) surface index errors alongside doctor findings in Phase 2.\n    commands:\n      - name: pk-doctor\n        args: \"[--category=...] [--fix=... | --fix-all] [--since=\u003Cref>] [--yes]\"\n        description: \"Run the health-check aggregator and print a single report.\"\n---\n\n# pk-doctor\n\n## Intro\n\n`\u002Fpk-doctor` is the single user-visible health-check surface for a\nprocesskit repository. It is the diagnostic you run after an upgrade,\nbefore a release, or any time you need to answer the question \"is this\nrepo healthy?\" in one command. The skill pattern is deliberately modelled\non `npm doctor`, `brew doctor`, and `rustup doctor`: detect by default,\nfix only when explicitly asked, and keep the report skimmable.\n\nThis skill is the Phase 1 landing. It ships four checks. Phase 2 and\nPhase 3 add more checks, lift the aggregator into an MCP server, and\nharden the `--fix` paths — each with their own WorkItem.\n\n## Overview\n\n### Invocation\n\n```\n\u002Fpk-doctor                              # detect-only; all 4 checks; report + log\n\u002Fpk-doctor --category=schemas,migrations\n\u002Fpk-doctor --fix=migrations             # opt-in scoped fix\n\u002Fpk-doctor --fix-all                    # every fix path enabled\n\u002Fpk-doctor --since=v0.18.2              # scope file-walk checks only\n\u002Fpk-doctor --yes                        # non-interactive (auto-confirms safe fixes)\n```\n\n`--fix` and `--fix-all` are mutually exclusive. Exit code is `0` if no\nERRORs were produced, `1` otherwise. Every run — regardless of outcome —\nwrites exactly one `doctor.report` LogEntry via the event-log MCP.\n\n### The four Phase 1 checks\n\n1. **`schema_filename`** — walks every `context\u002F\u003Ckind>\u002F**\u002F*.md`. Loads\n   the matching schema from `src\u002Fcontext\u002Fschemas\u002F\u003Ckind>.yaml` (the LIVE\n   source, never the template mirror) and validates the file's frontmatter\n   against it. Also checks that the filename stem equals `metadata.id`\n   and that any date encoded in the filename matches `metadata.created`.\n   Phase 1 is WARN-only for rename suggestions — no auto-fix.\n2. **`sharding`** — logs must live under `context\u002Flogs\u002FYYYY\u002FMM\u002F` subdirs;\n   migrations must live under their `spec.state` subdir (`pending\u002F`,\n   `in-progress\u002F`, `applied\u002F`). WARN on any file in the wrong bucket.\n3. **`migrations`** — calls\n   `mcp__processkit-migration-management__list_migrations(state=\"pending\")`.\n   INFO for the pending count; WARN for any pending entry older than\n   14 days. Under `--fix=migrations` or `--fix-all`, interactively\n   prompts `Apply MIG-xxx? [y\u002FN\u002Fs]` per entry and invokes\n   `apply_migration` on yes.\n4. **`drift`** — subprocess-invokes `scripts\u002Fcheck-src-context-drift.sh`\n   from the repo root. Exit 0 → one INFO \"trees in sync\". Exit 1 →\n   one WARN per offending line reported by the script.\n5. **`commands_consistency`** — walks every\n   `context\u002Fskills\u002Fprocesskit\u002F*\u002FSKILL.md` and verifies that each entry\n   in `metadata.processkit.commands:` has a matching `commands\u002F\u003Cname>.md`\n   file alongside the SKILL.md. ERROR per missing file; WARN for\n   stray `commands\u002F*.md` files not declared in the metadata. Added\n   after v0.19.1 shipped pk-doctor without its own commands\u002F directory.\n\nAdditional checks added after Phase 1:\n\n- **`team_consistency`** — wraps `team-manager.check_all()`.\n- **`release_integrity`** — see DEC-20260422_1348-SnowyWolf-local-only-release-bulletproofing.\n- **`mcp_config_drift`** — reads `context\u002F.processkit-mcp-manifest.json`\n  (produced at release time by `scripts\u002Fgenerate-mcp-manifest.py`) and\n  recomputes the per-skill `mcp-config.json` sha256es. A missing manifest\n  or stale aggregate surfaces as WARN (run the generator). In a\n  derived-project context (`aibox.lock` + `.mcp.json` both present at\n  the repo root), any processkit server missing from `.mcp.json`'s\n  `mcpServers` map surfaces as ERROR with a \"run `aibox sync` to\n  re-merge\" hint. Exists because `aibox sync` currently gates\n  `.mcp.json` re-merge on processkit version delta only, so per-skill\n  MCP-config edits within a release cycle never reach derived projects\n  until the next version bump — see DEC-20260423_2049-VastLake and\n  projectious-work\u002Faibox#54.\n- **`server_header_drift`** — walks every `context\u002Fskills\u002Fprocesskit\u002F*\u002Fmcp\u002Fserver.py`,\n  hashes its PEP 723 inline metadata block (`# \u002F\u002F\u002F script` ... `# \u002F\u002F\u002F`),\n  and compares against the manifest's `per_server_header` baseline. WARN\n  on any drift listing the affected skill slugs — signal that someone\n  edited a dep header without regenerating the manifest, and the harness\n  needs a restart to pick up the new deps. Detect-only; the fix is\n  user-driven (regenerate manifest + restart harness). Per\n  DEC-20260424_0127-QuickPine (SharpBrook split, RapidSwan ships the\n  dep-drift half).\n\n### What doctor will NEVER do\n\n- Hand-edit any file under `context\u002F`. All writes route through the\n  appropriate MCP tool (e.g. `apply_migration`).\n- Touch `context\u002Ftemplates\u002F` (read-only diff baseline).\n- Touch `.mcp.json` (merged file; pk-doctor has no MCP server in Phase 1).\n- Write to `context\u002Flogs\u002F` directly — reports go through\n  `mcp__processkit-event-log__log_event`.\n- Run fixes without an explicit `--fix=\u003Ccategory>` or `--fix-all` flag.\n\n### Report shape\n\nAfter the stdout human-readable summary, the skill emits a single\n`doctor.report` LogEntry:\n\n```json\n{\n  \"event_type\": \"doctor.report\",\n  \"summary\": \"\u002Fpk-doctor --fix=migrations — 0 ERROR \u002F 2 WARN \u002F 3 INFO\",\n  \"details\": {\n    \"doctor_version\": \"1.0.0\",\n    \"invocation\": \"\u002Fpk-doctor --fix=migrations\",\n    \"categories\": {\n      \"schema_filename\": {\"ERROR\": 0, \"WARN\": 1, \"INFO\": 140},\n      \"sharding\": {\"ERROR\": 0, \"WARN\": 0, \"INFO\": 1},\n      \"migrations\": {\"ERROR\": 0, \"WARN\": 1, \"INFO\": 1},\n      \"drift\": {\"ERROR\": 0, \"WARN\": 0, \"INFO\": 1}\n    },\n    \"top_findings\": [\n      {\"severity\": \"WARN\", \"id\": \"migration.stale-pending\", \"entity_ref\": \"MIG-...\", \"message\": \"...\"}\n    ],\n    \"fixes_applied\": [],\n    \"duration_ms\": 2340\n  }\n}\n```\n\n`top_findings` caps at 20 to keep the log entry compact; the full\nstdout report remains authoritative for the details of a specific run.\n\n### Interactive prompts\n\nInteractive prompts gate on `sys.stdin.isatty()`. If a `--fix` was\nrequested but the process isn't attached to a terminal, the skill emits\na `WARN` (`fix.non-interactive`) and skips the fix — it does not silently\nprompt and hang. `--yes` auto-confirms every prompt except any marked\n`data_loss=True` (none in Phase 1, but the hook is present).\n\n### `--since` scope\n\n`--since=\u003Cgit-ref>` restricts only the file-walk checks\n(`schema_filename`, `sharding`). The `migrations` and `drift` checks\nalways run full-scan: migrations pull from an MCP tool with its own\nstate, and drift compares entire trees.\n\n### Resolved policy defaults\n\nThese were agreed with the owner during shape review:\n\n- **YAML-datetime vs JSON-Schema string coercion** failures surface as\n  `WARN schema.datetime-coercion` (not ERROR). Parser-layer quirk.\n- **Slash command location** — `.claude\u002Fcommands\u002Fpk-doctor.md` only.\n  Not mirrored to `src\u002F.claude\u002Fcommands\u002F`. Downstream aibox ships its\n  own slash commands.\n- **Filename auto-rename** — WARN only in Phase 1. Phase 2 adds\n  orchestrated rename + reindex.\n\n## Gotchas\n\nAgent-specific failure modes — provider-neutral pause-and-self-check items:\n\n- **Running doctor with implicit fixes.** Detect-only by default. An\n  agent that invokes doctor with `--fix-all` \"to be safe\" without\n  owner approval is the opposite of safe: it applies migrations,\n  potentially across unrelated upgrade cycles, with no per-entry\n  review. Always confirm scope with the owner before any `--fix`.\n- **Treating drift warnings as noise.** The drift check exists because\n  v0.15.0–v0.18.0 shipped four releases with silent drift. If the\n  drift check produces a WARN, it has found a real divergence —\n  do not dismiss without investigating.\n- **Hand-editing files to \"clear\" a doctor warning.** Doctor warnings\n  are diagnostic. Fixing the underlying cause through the right MCP\n  write tool (not by editing the offending file directly) preserves\n  the audit trail. A WARN that reappears next run is more useful than\n  a hand-fixed tree with no record of the fix.\n- **Validating against `context\u002Ftemplates\u002F` schemas.** The template\n  mirror is a diff baseline, not the live schema source. Validation\n  must read `src\u002Fcontext\u002Fschemas\u002F\u003Ckind>.yaml` — the authoritative\n  copy. Validating against templates will produce stale false\n  positives after any schema evolution.\n- **Forgetting the `doctor.report` LogEntry on dry-run.** Even a\n  detect-only run must emit the report: it is the audit record of the\n  invocation. A run that prints to stdout but logs nothing strands\n  the next session with no record of what was checked.\n- **Running doctor mid-migration.** Doctor's `migrations` check will\n  list pending migrations and (under `--fix`) offer to apply them. If\n  you are already in the middle of a manual migration review, running\n  `--fix=migrations` can reorder work silently. Finish or pause the\n  manual review first.\n\n## Full reference\n\n### CLI contract\n\n```\ndoctor.py [--category=LIST] [--fix=LIST | --fix-all] [--since=REF] [--yes]\n```\n\n| Flag           | Meaning |\n|----------------|---------|\n| `--category`   | Comma list of categories to run. Default: all four. |\n| `--fix`        | Comma list of categories to enable fixes for. Mutex with `--fix-all`. |\n| `--fix-all`    | Enable fixes for every category that supports them. Mutex with `--fix`. |\n| `--since`      | Git ref; restricts `schema_filename` + `sharding` to files changed since. |\n| `--yes`        | Auto-confirm all non-`data_loss` fix prompts. |\n\n### Adding a check in Phase 2\n\n1. Drop a new module in `scripts\u002Fchecks\u002F\u003Cname>.py` exporting a\n   `run(ctx) -> list[CheckResult]` function (and optional\n   `run_fix(ctx, results) -> list[dict]`).\n2. Register it in `scripts\u002Fchecks\u002F__init__.py` in `REGISTRY`.\n3. Add a gotcha for that check here in SKILL.md.\n4. Mirror both files into `src\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002F`.\n\nThe aggregator in `doctor.py` does not need to change.\n\n### What this skill does NOT do (yet)\n\n- Validate cross-references (Phase 2).\n- Check `PROVENANCE.toml` drift (Phase 2).\n- Check `mcp-config.json` integrity (Phase 2).\n- Smoke-import MCP servers (Phase 2).\n- Detect version skew between `aibox.lock` and installed SKILL.md pins\n  (Phase 2).\n- Expose itself as an MCP server for machine invocation (Phase 3, only\n  if demand shows up).\n","# pk-doctor\n\n## Intro\n\n`\u002Fpk-doctor` is the single user-visible health-check surface for a\nprocesskit repository. It is the diagnostic you run after an upgrade,\nbefore a release, or any time you need to answer the question \"is this\nrepo healthy?\" in one command. The skill pattern is deliberately modelled\non `npm doctor`, `brew doctor`, and `rustup doctor`: detect by default,\nfix only when explicitly asked, and keep the report skimmable.\n\nThis skill is the Phase 1 landing. It ships four checks. Phase 2 and\nPhase 3 add more checks, lift the aggregator into an MCP server, and\nharden the `--fix` paths — each with their own WorkItem.\n\n## Overview\n\n### Invocation\n\n```\n\u002Fpk-doctor                              # detect-only; all 4 checks; report + log\n\u002Fpk-doctor --category=schemas,migrations\n\u002Fpk-doctor --fix=migrations             # opt-in scoped fix\n\u002Fpk-doctor --fix-all                    # every fix path enabled\n\u002Fpk-doctor --since=v0.18.2              # scope file-walk checks only\n\u002Fpk-doctor --yes                        # non-interactive (auto-confirms safe fixes)\n```\n\n`--fix` and `--fix-all` are mutually exclusive. Exit code is `0` if no\nERRORs were produced, `1` otherwise. Every run — regardless of outcome —\nwrites exactly one `doctor.report` LogEntry via the event-log MCP.\n\n### The four Phase 1 checks\n\n1. **`schema_filename`** — walks every `context\u002F\u003Ckind>\u002F**\u002F*.md`. Loads\n   the matching schema from `src\u002Fcontext\u002Fschemas\u002F\u003Ckind>.yaml` (the LIVE\n   source, never the template mirror) and validates the file's frontmatter\n   against it. Also checks that the filename stem equals `metadata.id`\n   and that any date encoded in the filename matches `metadata.created`.\n   Phase 1 is WARN-only for rename suggestions — no auto-fix.\n2. **`sharding`** — logs must live under `context\u002Flogs\u002FYYYY\u002FMM\u002F` subdirs;\n   migrations must live under their `spec.state` subdir (`pending\u002F`,\n   `in-progress\u002F`, `applied\u002F`). WARN on any file in the wrong bucket.\n3. **`migrations`** — calls\n   `mcp__processkit-migration-management__list_migrations(state=\"pending\")`.\n   INFO for the pending count; WARN for any pending entry older than\n   14 days. Under `--fix=migrations` or `--fix-all`, interactively\n   prompts `Apply MIG-xxx? [y\u002FN\u002Fs]` per entry and invokes\n   `apply_migration` on yes.\n4. **`drift`** — subprocess-invokes `scripts\u002Fcheck-src-context-drift.sh`\n   from the repo root. Exit 0 → one INFO \"trees in sync\". Exit 1 →\n   one WARN per offending line reported by the script.\n5. **`commands_consistency`** — walks every\n   `context\u002Fskills\u002Fprocesskit\u002F*\u002FSKILL.md` and verifies that each entry\n   in `metadata.processkit.commands:` has a matching `commands\u002F\u003Cname>.md`\n   file alongside the SKILL.md. ERROR per missing file; WARN for\n   stray `commands\u002F*.md` files not declared in the metadata. Added\n   after v0.19.1 shipped pk-doctor without its own commands\u002F directory.\n\nAdditional checks added after Phase 1:\n\n- **`team_consistency`** — wraps `team-manager.check_all()`.\n- **`release_integrity`** — see DEC-20260422_1348-SnowyWolf-local-only-release-bulletproofing.\n- **`mcp_config_drift`** — reads `context\u002F.processkit-mcp-manifest.json`\n  (produced at release time by `scripts\u002Fgenerate-mcp-manifest.py`) and\n  recomputes the per-skill `mcp-config.json` sha256es. A missing manifest\n  or stale aggregate surfaces as WARN (run the generator). In a\n  derived-project context (`aibox.lock` + `.mcp.json` both present at\n  the repo root), any processkit server missing from `.mcp.json`'s\n  `mcpServers` map surfaces as ERROR with a \"run `aibox sync` to\n  re-merge\" hint. Exists because `aibox sync` currently gates\n  `.mcp.json` re-merge on processkit version delta only, so per-skill\n  MCP-config edits within a release cycle never reach derived projects\n  until the next version bump — see DEC-20260423_2049-VastLake and\n  projectious-work\u002Faibox#54.\n- **`server_header_drift`** — walks every `context\u002Fskills\u002Fprocesskit\u002F*\u002Fmcp\u002Fserver.py`,\n  hashes its PEP 723 inline metadata block (`# \u002F\u002F\u002F script` ... `# \u002F\u002F\u002F`),\n  and compares against the manifest's `per_server_header` baseline. WARN\n  on any drift listing the affected skill slugs — signal that someone\n  edited a dep header without regenerating the manifest, and the harness\n  needs a restart to pick up the new deps. Detect-only; the fix is\n  user-driven (regenerate manifest + restart harness). Per\n  DEC-20260424_0127-QuickPine (SharpBrook split, RapidSwan ships the\n  dep-drift half).\n\n### What doctor will NEVER do\n\n- Hand-edit any file under `context\u002F`. All writes route through the\n  appropriate MCP tool (e.g. `apply_migration`).\n- Touch `context\u002Ftemplates\u002F` (read-only diff baseline).\n- Touch `.mcp.json` (merged file; pk-doctor has no MCP server in Phase 1).\n- Write to `context\u002Flogs\u002F` directly — reports go through\n  `mcp__processkit-event-log__log_event`.\n- Run fixes without an explicit `--fix=\u003Ccategory>` or `--fix-all` flag.\n\n### Report shape\n\nAfter the stdout human-readable summary, the skill emits a single\n`doctor.report` LogEntry:\n\n```json\n{\n  \"event_type\": \"doctor.report\",\n  \"summary\": \"\u002Fpk-doctor --fix=migrations — 0 ERROR \u002F 2 WARN \u002F 3 INFO\",\n  \"details\": {\n    \"doctor_version\": \"1.0.0\",\n    \"invocation\": \"\u002Fpk-doctor --fix=migrations\",\n    \"categories\": {\n      \"schema_filename\": {\"ERROR\": 0, \"WARN\": 1, \"INFO\": 140},\n      \"sharding\": {\"ERROR\": 0, \"WARN\": 0, \"INFO\": 1},\n      \"migrations\": {\"ERROR\": 0, \"WARN\": 1, \"INFO\": 1},\n      \"drift\": {\"ERROR\": 0, \"WARN\": 0, \"INFO\": 1}\n    },\n    \"top_findings\": [\n      {\"severity\": \"WARN\", \"id\": \"migration.stale-pending\", \"entity_ref\": \"MIG-...\", \"message\": \"...\"}\n    ],\n    \"fixes_applied\": [],\n    \"duration_ms\": 2340\n  }\n}\n```\n\n`top_findings` caps at 20 to keep the log entry compact; the full\nstdout report remains authoritative for the details of a specific run.\n\n### Interactive prompts\n\nInteractive prompts gate on `sys.stdin.isatty()`. If a `--fix` was\nrequested but the process isn't attached to a terminal, the skill emits\na `WARN` (`fix.non-interactive`) and skips the fix — it does not silently\nprompt and hang. `--yes` auto-confirms every prompt except any marked\n`data_loss=True` (none in Phase 1, but the hook is present).\n\n### `--since` scope\n\n`--since=\u003Cgit-ref>` restricts only the file-walk checks\n(`schema_filename`, `sharding`). The `migrations` and `drift` checks\nalways run full-scan: migrations pull from an MCP tool with its own\nstate, and drift compares entire trees.\n\n### Resolved policy defaults\n\nThese were agreed with the owner during shape review:\n\n- **YAML-datetime vs JSON-Schema string coercion** failures surface as\n  `WARN schema.datetime-coercion` (not ERROR). Parser-layer quirk.\n- **Slash command location** — `.claude\u002Fcommands\u002Fpk-doctor.md` only.\n  Not mirrored to `src\u002F.claude\u002Fcommands\u002F`. Downstream aibox ships its\n  own slash commands.\n- **Filename auto-rename** — WARN only in Phase 1. Phase 2 adds\n  orchestrated rename + reindex.\n\n## Gotchas\n\nAgent-specific failure modes — provider-neutral pause-and-self-check items:\n\n- **Running doctor with implicit fixes.** Detect-only by default. An\n  agent that invokes doctor with `--fix-all` \"to be safe\" without\n  owner approval is the opposite of safe: it applies migrations,\n  potentially across unrelated upgrade cycles, with no per-entry\n  review. Always confirm scope with the owner before any `--fix`.\n- **Treating drift warnings as noise.** The drift check exists because\n  v0.15.0–v0.18.0 shipped four releases with silent drift. If the\n  drift check produces a WARN, it has found a real divergence —\n  do not dismiss without investigating.\n- **Hand-editing files to \"clear\" a doctor warning.** Doctor warnings\n  are diagnostic. Fixing the underlying cause through the right MCP\n  write tool (not by editing the offending file directly) preserves\n  the audit trail. A WARN that reappears next run is more useful than\n  a hand-fixed tree with no record of the fix.\n- **Validating against `context\u002Ftemplates\u002F` schemas.** The template\n  mirror is a diff baseline, not the live schema source. Validation\n  must read `src\u002Fcontext\u002Fschemas\u002F\u003Ckind>.yaml` — the authoritative\n  copy. Validating against templates will produce stale false\n  positives after any schema evolution.\n- **Forgetting the `doctor.report` LogEntry on dry-run.** Even a\n  detect-only run must emit the report: it is the audit record of the\n  invocation. A run that prints to stdout but logs nothing strands\n  the next session with no record of what was checked.\n- **Running doctor mid-migration.** Doctor's `migrations` check will\n  list pending migrations and (under `--fix`) offer to apply them. If\n  you are already in the middle of a manual migration review, running\n  `--fix=migrations` can reorder work silently. Finish or pause the\n  manual review first.\n\n## Full reference\n\n### CLI contract\n\n```\ndoctor.py [--category=LIST] [--fix=LIST | --fix-all] [--since=REF] [--yes]\n```\n\n| Flag           | Meaning |\n|----------------|---------|\n| `--category`   | Comma list of categories to run. Default: all four. |\n| `--fix`        | Comma list of categories to enable fixes for. Mutex with `--fix-all`. |\n| `--fix-all`    | Enable fixes for every category that supports them. Mutex with `--fix`. |\n| `--since`      | Git ref; restricts `schema_filename` + `sharding` to files changed since. |\n| `--yes`        | Auto-confirm all non-`data_loss` fix prompts. |\n\n### Adding a check in Phase 2\n\n1. Drop a new module in `scripts\u002Fchecks\u002F\u003Cname>.py` exporting a\n   `run(ctx) -> list[CheckResult]` function (and optional\n   `run_fix(ctx, results) -> list[dict]`).\n2. Register it in `scripts\u002Fchecks\u002F__init__.py` in `REGISTRY`.\n3. Add a gotcha for that check here in SKILL.md.\n4. Mirror both files into `src\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002F`.\n\nThe aggregator in `doctor.py` does not need to change.\n\n### What this skill does NOT do (yet)\n\n- Validate cross-references (Phase 2).\n- Check `PROVENANCE.toml` drift (Phase 2).\n- Check `mcp-config.json` integrity (Phase 2).\n- Smoke-import MCP servers (Phase 2).\n- Detect version skew between `aibox.lock` and installed SKILL.md pins\n  (Phase 2).\n- Expose itself as an MCP server for machine invocation (Phase 3, only\n  if demand shows up).\n",{"name":5,"metadata":54,"description":76},{"processkit":55},{"id":56,"uses":57,"layer":67,"created":68,"version":69,"category":70,"commands":71,"apiVersion":75},"SKILL-pk-doctor",[58,61,64],{"skill":59,"purpose":60},"event-log","Emit the single `doctor.report` LogEntry per run (the audit trail for every invocation).",{"skill":62,"purpose":63},"migration-management","List pending migrations for the `migrations` check and apply them under `--fix`.",{"skill":65,"purpose":66},"index-management","(future) surface index errors alongside doctor findings in Phase 2.",3,1776643200000,"1.0.0","processkit",[72],{"args":73,"name":5,"description":74},"[--category=...] [--fix=... | --fix-all] [--since=\u003Cref>] [--yes]","Run the health-check aggregator and print a single report.","processkit.projectious.work\u002Fv1","Aggregator health-check for a processkit-managed repository. Runs a fixed suite of detect-only checks over the live context\u002F tree plus src\u002Fcontext\u002F drift and surfaces ERROR \u002F WARN \u002F INFO findings in a single report. Use when the user invokes `\u002Fpk-doctor`, asks \"is this repo healthy\", or has just finished an upgrade and wants a sanity pass. Detect-only by default; `--fix` \u002F `--fix-all` opt in to scoped repairs that route through existing MCP write tools only — doctor never hand-edits files under `context\u002F`.\n","main","4876a92620ee792aac2ac9a1a806322d8a572367","archive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit","https:\u002F\u002Fprojectious-work.github.io\u002Fprocesskit\u002F","https:\u002F\u002Fgithub.com\u002Fprojectious-work","2026-11-11 23:24:18",{"source":8,"skillName":5,"commands":85,"prompt":95,"zipAvailable":96},[86,89,92],{"tool":87,"command":88},"npx","npx skills add projectious-work\u002Fprocesskit --skill pk-doctor",{"tool":90,"command":91},"bunx","bunx skills add projectious-work\u002Fprocesskit --skill pk-doctor",{"tool":93,"command":94},"pnpm","pnpm dlx skills add projectious-work\u002Fprocesskit --skill pk-doctor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002FSKILL.md",true,[98,104,110,114,118,122,126,130,134,138,142,146,150,154,158,162,166],{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"commands\u002Fpk-doctor.md","REFERENCE","参考文档",287,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fcommands\u002Fpk-doctor.md",{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fchecks\u002F__init__.py","SCRIPT","脚本",1346,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002F__init__.py",{"path":111,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":112,"sourceHtmlUrl":113},"scripts\u002Fchecks\u002Fcommands_consistency.py",3966,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fcommands_consistency.py",{"path":115,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":116,"sourceHtmlUrl":117},"scripts\u002Fchecks\u002Fcommon.py",1407,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fcommon.py",{"path":119,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":120,"sourceHtmlUrl":121},"scripts\u002Fchecks\u002Fdrift.py",2185,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fdrift.py",{"path":123,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":124,"sourceHtmlUrl":125},"scripts\u002Fchecks\u002Fmcp_config_drift.py",6756,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fmcp_config_drift.py",{"path":127,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":128,"sourceHtmlUrl":129},"scripts\u002Fchecks\u002Fmigration_integrity.py",4236,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fmigration_integrity.py",{"path":131,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":132,"sourceHtmlUrl":133},"scripts\u002Fchecks\u002Fmigrations.py",7927,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fmigrations.py",{"path":135,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":136,"sourceHtmlUrl":137},"scripts\u002Fchecks\u002Fpreauth_applied.py",7386,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fpreauth_applied.py",{"path":139,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":140,"sourceHtmlUrl":141},"scripts\u002Fchecks\u002Frelease_integrity.py",6496,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Frelease_integrity.py",{"path":143,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":144,"sourceHtmlUrl":145},"scripts\u002Fchecks\u002Fschema_filename.py",17136,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fschema_filename.py",{"path":147,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":148,"sourceHtmlUrl":149},"scripts\u002Fchecks\u002Fserver_header_drift.py",6807,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fserver_header_drift.py",{"path":151,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":152,"sourceHtmlUrl":153},"scripts\u002Fchecks\u002Fsharding.py",4798,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fsharding.py",{"path":155,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":156,"sourceHtmlUrl":157},"scripts\u002Fchecks\u002Fskill_dag.py",9392,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fskill_dag.py",{"path":159,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":160,"sourceHtmlUrl":161},"scripts\u002Fchecks\u002Fteam_consistency.py",3954,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fchecks\u002Fteam_consistency.py",{"path":163,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":164,"sourceHtmlUrl":165},"scripts\u002Fdoctor.py",10597,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Fdoctor.py",{"path":167,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":168,"sourceHtmlUrl":169},"scripts\u002Ftest_doctor.py",27995,"https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.23.0\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fpk-doctor\u002Fscripts\u002Ftest_doctor.py",[171,178,185,191,215,234],{"skillNo":172,"name":173,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":177},"01M7665G2ED3624R3X93304265","standard-ui-design","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-ui-design\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":177},"01M76651QTC6W0HJ4AFW2MMR3V","standard-agent-use","Company standard for working with AI agents. Use when deciding what to delegate to agents, capturing open work, keeping agent memory or knowledge notes, improving an agent workflow, or introducing agent work in a team or for a client.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-agent-use\u002FSKILL.md",[],[],{"skillNo":186,"name":187,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"publishedAt":177},"01M76650NN4T8P241021NBR64S","standard-agent-building","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-agent-building\u002FSKILL.md",[],[],{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":198,"publishedAt":49},"01M6X5MTC89B4ZGXW3JVSQCPF8","skill-management","Manage Skill package manifests as v1 ontology entities.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fskill-management\u002FSKILL.md",[197],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[199,200,201,202,203,204,205,206,207,208,209,210,193,211,212,213,214],"management","skill management","ontology","v1","create","as","work","transition","get","manage","update","alpha","list","package","skill package","manifests",{"skillNo":216,"name":217,"nameZh":6,"description":218,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":219,"categories":220,"keywords":222,"publishedAt":49},"01M6X5MCV74NHW5MEDNHZRF2C8","schema-management","Manage generated processkit schema contracts through deterministic MCP rebuild and inspection workflows.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fschema-management\u002FSKILL.md",[221],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[223,224,199,225,226,227,228,229,230,32,231,232,205,207,208,210,233],"schema","schema management","contract","rebuild","contracts","workflows","wed","generated","validation","deterministic","mode",{"skillNo":235,"name":236,"nameZh":6,"description":237,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":238,"categories":239,"keywords":240,"publishedAt":49},"01M6X5M5G6YJ96AMZGSCZJ1D13","proposition-management","Record claims, risks, beliefs, world facts, WSJF estimates, and assumptions through the Proposition interface.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fproposition-management\u002FSKILL.md",[],[241,199,242,243,203,244,245,246,205,207,247,248,209,249,210,250,251,252,253,45],"proposition management","proposition","interface","claims","record","world","creation","event","WSJF","index","updates","query","facts"]