@theglitchking/persistent-planning 3.1.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.documentation/INDEX.md +15 -7
  4. package/.documentation/REGISTRY.md +2 -2
  5. package/.documentation/agents/INDEX.md +2 -2
  6. package/.documentation/agents/REGISTRY.md +2 -2
  7. package/.documentation/api/INDEX.md +2 -2
  8. package/.documentation/api/REGISTRY.md +2 -2
  9. package/.documentation/architecture/INDEX.md +5 -3
  10. package/.documentation/architecture/REGISTRY.md +8 -4
  11. package/.documentation/architecture/lg-mode.md +16 -0
  12. package/.documentation/architecture/lg-plan-artifact-lifecycle.md +104 -0
  13. package/.documentation/architecture/skill-linking-and-reclaim.md +84 -0
  14. package/.documentation/backups/INDEX.md +2 -2
  15. package/.documentation/backups/REGISTRY.md +2 -2
  16. package/.documentation/database/INDEX.md +2 -2
  17. package/.documentation/database/REGISTRY.md +2 -2
  18. package/.documentation/devops/INDEX.md +2 -2
  19. package/.documentation/devops/REGISTRY.md +2 -2
  20. package/.documentation/features/INDEX.md +2 -2
  21. package/.documentation/features/REGISTRY.md +2 -2
  22. package/.documentation/plans/INDEX.md +2 -2
  23. package/.documentation/plans/REGISTRY.md +2 -2
  24. package/.documentation/procedures/INDEX.md +4 -3
  25. package/.documentation/procedures/REGISTRY.md +6 -4
  26. package/.documentation/procedures/plan-completion-and-archive.md +34 -0
  27. package/.documentation/procedures/plugin-update-delivery.md +99 -0
  28. package/.documentation/quickstart/INDEX.md +2 -2
  29. package/.documentation/quickstart/REGISTRY.md +2 -2
  30. package/.documentation/reference/INDEX.md +10 -3
  31. package/.documentation/reference/REGISTRY.md +8 -4
  32. package/.documentation/reference/mandatory-frontmatter.md +71 -0
  33. package/.documentation/reference/skill-version-marker.md +70 -0
  34. package/.documentation/security/INDEX.md +2 -2
  35. package/.documentation/security/REGISTRY.md +2 -2
  36. package/.documentation/standards/INDEX.md +2 -2
  37. package/.documentation/standards/REGISTRY.md +2 -2
  38. package/.documentation/standards/mandatory-closing-phases.md +21 -1
  39. package/.documentation/testing/INDEX.md +2 -2
  40. package/.documentation/testing/REGISTRY.md +2 -2
  41. package/.documentation/testing/test-suite.md +38 -0
  42. package/.documentation/troubleshooting/INDEX.md +8 -8
  43. package/.documentation/troubleshooting/REGISTRY.md +20 -5
  44. package/.documentation/troubleshooting/plan-never-reads-complete.md +109 -0
  45. package/.documentation/troubleshooting/stale-skill-dir-drift.md +115 -0
  46. package/.documentation/workflows/INDEX.md +2 -2
  47. package/.documentation/workflows/REGISTRY.md +2 -2
  48. package/CHANGELOG.md +149 -0
  49. package/bin/persistent-planning.js +56 -6
  50. package/hooks/session-start.js +115 -3
  51. package/package.json +1 -1
  52. package/scripts/archive-plan.sh +3 -6
  53. package/scripts/init-atom.sh +7 -0
  54. package/scripts/init-phase.sh +58 -6
  55. package/scripts/init-planning.sh +18 -6
  56. package/scripts/init-task.sh +7 -0
  57. package/scripts/lib/planning.sh +122 -0
  58. package/scripts/lib/skill-link.js +177 -0
  59. package/scripts/link-skills.js +38 -0
  60. package/scripts/plan-status.sh +85 -10
  61. package/skills/persistent-planning/SKILL.md +5 -2
  62. package/templates/lg/phase.md +7 -4
  63. package/templates/lg/task.md +3 -2
@@ -6,13 +6,13 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for persistent-planning - Persistent markdown-based planning for Claude Code. Context engineering pattern with task directories, progress tracking, and working memory that persists across sessions.",
9
- "version": "3.1.0"
9
+ "version": "3.4.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "persistent-planning",
14
14
  "description": "Persistent markdown-based planning for Claude Code. Uses on-disk markdown files as working memory for planning, progress tracking, and knowledge storage. Plans persist across sessions and support multiple concurrent tasks.",
15
- "version": "3.1.0",
15
+ "version": "3.4.0",
16
16
  "author": {
17
17
  "name": "TheGlitchKing"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "persistent-planning",
3
- "version": "3.1.0",
3
+ "version": "3.4.0",
4
4
  "description": "Persistent markdown-based planning with task directories, progress tracking, and context engineering for multi-step Claude Code workflows",
5
5
  "author": {
6
6
  "name": "TheGlitchKing"
@@ -3,7 +3,7 @@ title: Documentation Index
3
3
  tier: reference
4
4
  domains: [root]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Navigation hub for all documentation
9
9
  ---
@@ -18,20 +18,20 @@ purpose: Navigation hub for all documentation
18
18
  |--------|-----------|-------------|
19
19
  | [Agents](#agents) | 0 | Expert agent documentation, specialty matrix |
20
20
  | [API](#api) | 0 | API endpoints, routes, specifications, contracts |
21
- | [Architecture](#architecture) | 2 | System design, AI coach, project registry, patterns |
21
+ | [Architecture](#architecture) | 4 | System design, AI coach, project registry, patterns |
22
22
  | [Backups](#backups) | 0 | Backup/restore guides, disaster recovery |
23
23
  | [Database](#database) | 0 | Schema, migrations, RLS, queries, procedures |
24
24
  | [DevOps](#devops) | 0 | Deployment, CI/CD, Docker, environments, infrastructure |
25
25
  | [Features](#features) | 0 | Feature implementation guides, admin docs |
26
26
  | [Plans](#plans) | 0 | Planning documents, roadmaps, proposals |
27
- | [Procedures](#procedures) | 1 | Step-by-step operational procedures (SOP) |
27
+ | [Procedures](#procedures) | 2 | Step-by-step operational procedures (SOP) |
28
28
  | [Quickstart](#quickstart) | 1 | Setup guides, dev workflow, onboarding |
29
29
  | [Security](#security) | 0 | Security, auth, Vault, Keycloak, RLS |
30
30
  | [Standards](#standards) | 2 | Coding standards (backend, frontend, database, devops, security) |
31
31
  | [Testing](#testing) | 1 | Test strategies, fixtures, patterns, integration/e2e |
32
- | [Troubleshooting](#troubleshooting) | 0 | Debug guides, common issues, solutions |
32
+ | [Troubleshooting](#troubleshooting) | 2 | Debug guides, common issues, solutions |
33
33
  | [Workflows](#workflows) | 0 | Process documentation, multi-step operations |
34
- | [Reference](#reference) | 1 | Schema, frontmatter, and CLI reference material for the planning artifacts |
34
+ | [Reference](#reference) | 3 | Schema, frontmatter, and CLI reference material for the planning artifacts |
35
35
 
36
36
  ---
37
37
 
@@ -65,6 +65,8 @@ purpose: Navigation hub for all documentation
65
65
  |----------|------|--------|----------|
66
66
  | [Manus Context Engineering Principles](architecture/context-engineering-principles.md) | reference | active | 2026-08-31 |
67
67
  | [Lg-Mode Layered Planning Guide](architecture/lg-mode.md) | guide | active | 2026-05-07 |
68
+ | [lg plan artifact lifecycle — who writes what](architecture/lg-plan-artifact-lifecycle.md) | reference | active | 2026-09-04 |
69
+ | [Skill linking and reclaim](architecture/skill-linking-and-reclaim.md) | reference | active | 2026-09-04 |
68
70
 
69
71
  ---
70
72
 
@@ -127,6 +129,7 @@ purpose: Navigation hub for all documentation
127
129
  | Document | Tier | Status | Updated |
128
130
  |----------|------|--------|----------|
129
131
  | [Plan Completion and Archive](procedures/plan-completion-and-archive.md) | guide | active | 2026-08-31 |
132
+ | [Plugin update delivery — what actually runs, and when](procedures/plugin-update-delivery.md) | guide | active | 2026-09-04 |
130
133
 
131
134
  ---
132
135
 
@@ -183,7 +186,10 @@ purpose: Navigation hub for all documentation
183
186
 
184
187
  **Path:** `troubleshooting/`
185
188
 
186
- *No documents yet.*
189
+ | Document | Tier | Status | Updated |
190
+ |----------|------|--------|----------|
191
+ | [A plan won't read COMPLETE](troubleshooting/plan-never-reads-complete.md) | guide | active | 2026-09-04 |
192
+ | [Stale skill directory — commands run frozen code](troubleshooting/stale-skill-dir-drift.md) | guide | active | 2026-09-04 |
187
193
 
188
194
  ---
189
195
 
@@ -205,12 +211,14 @@ purpose: Navigation hub for all documentation
205
211
 
206
212
  | Document | Tier | Status | Updated |
207
213
  |----------|------|--------|----------|
214
+ | [`mandatory:` task frontmatter](reference/mandatory-frontmatter.md) | reference | active | 2026-09-04 |
215
+ | [Skill version marker (`.version`)](reference/skill-version-marker.md) | reference | active | 2026-09-04 |
208
216
  | [workspace.json schema](reference/workspace-json.md) | standard | active | 2026-05-07 |
209
217
 
210
218
  ---
211
219
 
212
220
  ## Maintenance
213
221
 
214
- - **Last generated:** 2026-08-31
222
+ - **Last generated:** 2026-09-04
215
223
  - **Run maintenance:** `npx hit-em-with-the-docs maintain`
216
224
  - **Regenerate index:** `npx hit-em-with-the-docs index`
@@ -3,7 +3,7 @@ title: Documentation Registry
3
3
  tier: reference
4
4
  domains: [root]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for all documentation domains
9
9
  ---
@@ -77,4 +77,4 @@ purpose: Quick reference for all documentation domains
77
77
 
78
78
  ---
79
79
 
80
- *Last updated: 2026-08-31*
80
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Agents Documentation Index
3
3
  tier: reference
4
4
  domains: [agents]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of agents documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: agent, agents, ai, assistant, expert, specialist, llm, langc
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Agents Registry
3
3
  tier: reference
4
4
  domains: [agents]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for agents documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for agents documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: API Documentation Index
3
3
  tier: reference
4
4
  domains: [api]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of api documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: api, endpoint, endpoints, route, routes, rest, restful, grap
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: API Registry
3
3
  tier: reference
4
4
  domains: [api]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for api documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for api documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Architecture Documentation Index
3
3
  tier: reference
4
4
  domains: [architecture]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of architecture documentation
9
9
  ---
@@ -14,7 +14,7 @@ purpose: Complete listing of architecture documentation
14
14
 
15
15
  ## Overview
16
16
 
17
- - **Total Documents:** 2
17
+ - **Total Documents:** 4
18
18
  - **Domain:** `architecture/`
19
19
  - **Category:** development
20
20
  - **Load Priority:** 7/10
@@ -32,6 +32,8 @@ purpose: Complete listing of architecture documentation
32
32
  | Document | Status | Updated | Words |
33
33
  |----------|--------|---------|-------|
34
34
  | [Manus Context Engineering Principles](context-engineering-principles.md) | active | 2026-08-31 | 428 |
35
+ | [lg plan artifact lifecycle — who writes what](lg-plan-artifact-lifecycle.md) | active | 2026-09-04 | 438 |
36
+ | [Skill linking and reclaim](skill-linking-and-reclaim.md) | active | 2026-09-04 | 348 |
35
37
 
36
38
  ## Keywords
37
39
 
@@ -45,4 +47,4 @@ This domain covers: architecture, design, system, system-design, pattern, patter
45
47
 
46
48
  ---
47
49
 
48
- *Last updated: 2026-08-31*
50
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Architecture Registry
3
3
  tier: reference
4
4
  domains: [architecture]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for architecture documentation
9
9
  ---
@@ -16,7 +16,7 @@ purpose: Quick reference for architecture documentation
16
16
 
17
17
  | Metric | Value |
18
18
  |--------|-------|
19
- | Documents | 2 |
19
+ | Documents | 4 |
20
20
  | Category | development |
21
21
  | Load Priority | 7/10 |
22
22
 
@@ -24,9 +24,13 @@ purpose: Quick reference for architecture documentation
24
24
 
25
25
  - [Manus Context Engineering Principles](context-engineering-principles.md)
26
26
  - [Lg-Mode Layered Planning Guide](lg-mode.md)
27
+ - [lg plan artifact lifecycle — who writes what](lg-plan-artifact-lifecycle.md)
28
+ - [Skill linking and reclaim](skill-linking-and-reclaim.md)
27
29
 
28
30
  ## Recently Updated
29
31
 
32
+ - [lg plan artifact lifecycle — who writes what](lg-plan-artifact-lifecycle.md) - 2026-09-04
33
+ - [Skill linking and reclaim](skill-linking-and-reclaim.md) - 2026-09-04
30
34
  - [Manus Context Engineering Principles](context-engineering-principles.md) - 2026-08-31
31
35
  - [Lg-Mode Layered Planning Guide](lg-mode.md) - 2026-05-07
32
36
 
@@ -34,7 +38,7 @@ purpose: Quick reference for architecture documentation
34
38
 
35
39
  | Status | Count |
36
40
  |--------|-------|
37
- | active | 2 |
41
+ | active | 4 |
38
42
  | draft | 0 |
39
43
  | deprecated | 0 |
40
44
  | archived | 0 |
@@ -50,4 +54,4 @@ purpose: Quick reference for architecture documentation
50
54
 
51
55
  ---
52
56
 
53
- *Last updated: 2026-08-31*
57
+ *Last updated: 2026-09-04*
@@ -142,3 +142,19 @@ To explicitly migrate a v2 plan to lg, manually:
142
142
  - `templates/lg/{phase,task,atom,notes}.md` — frontmatter shapes
143
143
  - `scripts/detect-mode.sh` — mode resolution logic
144
144
  - `scripts/init-{phase,task,atom}.sh` — init script implementations
145
+
146
+
147
+ ## How the skill reaches a consumer repo
148
+
149
+ `.claude/skills/persistent-planning` is a **symlink** into the installed package, created
150
+ by `scripts/link-skills.js`. A real directory there is stale v1 debris and means commands
151
+ are running frozen code — see
152
+ [Skill linking and reclaim](skill-linking-and-reclaim.md) and
153
+ [Stale skill directory](../troubleshooting/stale-skill-dir-drift.md).
154
+
155
+
156
+ ## Who writes which artifact
157
+
158
+ Creating a task writes it into its phase's list; creating an atom writes it into its
159
+ task's list. Full ownership table and the insertion rule:
160
+ [lg plan artifact lifecycle](lg-plan-artifact-lifecycle.md).
@@ -0,0 +1,104 @@
1
+ ---
2
+ title: lg plan artifact lifecycle — who writes what
3
+ tier: reference
4
+ domains:
5
+ - architecture
6
+ audience:
7
+ - developers
8
+ tags: []
9
+ status: active
10
+ last_updated: '2026-09-04'
11
+ version: 1.0.0
12
+ purpose: >-
13
+ Which script writes which lg plan artifact, the rule that creating a child writes it
14
+ into its parent's list, and how insertion keeps the mandatory closers last.
15
+ estimated_read_time: 3 minutes
16
+ word_count: 438
17
+ last_validated: '2026-09-04'
18
+ backlinks: []
19
+ ---
20
+
21
+ # lg plan artifact lifecycle — who writes what
22
+
23
+ In lg mode a plan is a tree of markdown artifacts, and more than one thing writes
24
+ into them. This page states the ownership, because for a long time nothing did —
25
+ and the gap it left is [issue #12](https://github.com/the-glitch-kingdom/persistent-planning/issues/12).
26
+
27
+ ## Ownership
28
+
29
+ | Artifact | Created by | Its list is written by |
30
+ |---|---|---|
31
+ | `<phase>/phase.md` | `init-phase.sh` | `init-task.sh`, on every new task |
32
+ | `<phase>/notes.md` | `init-phase.sh` | humans |
33
+ | `<phase>/<task>/task.md` | `init-task.sh` (closers: `init-phase.sh`) | `init-atom.sh`, on every new atom |
34
+ | `<phase>/<task>/notes.md` | `init-task.sh` | humans |
35
+ | `<phase>/<task>/atoms/<atom>.md` | `init-atom.sh` | humans |
36
+
37
+ The rule worth remembering: **creating a child writes it into its parent's list.**
38
+ Before 3.3.0, `init-task.sh` referenced `phase.md` only in an existence check and
39
+ `init-atom.sh` never touched `task.md`, so every list was maintained by hand — and a
40
+ phase could report "no tasks yet" with six task directories on disk.
41
+
42
+ ## The insertion rule
43
+
44
+ `planning_insert_list_item <file> <section> <line>` in `scripts/lib/planning.sh`:
45
+
46
+ - inserts **above the first item marked MANDATORY**, so the closers stay last by
47
+ construction rather than by anyone remembering the rule;
48
+ - appends after the last item when the section has no MANDATORY entries (atom lists);
49
+ - drops the `(no … yet)` placeholder, including indented continuation lines, the
50
+ first time a real item lands;
51
+ - is idempotent — an identical line already present is left alone, so re-running
52
+ under `PLANNING_FORCE=1` cannot double-insert;
53
+ - is section-scoped (`## Heading` to the next `## `), so it cannot wander into a
54
+ neighbouring list.
55
+
56
+ It **anchors on the MANDATORY marker, never on line numbers.** The list is a
57
+ human-editable surface; positions do not survive contact with editing. This is tested
58
+ against a hand-reordered, partially-checked, annotated list.
59
+
60
+ ## The two closers
61
+
62
+ Every phase is scaffolded with both closing tasks as real directories:
63
+
64
+ ```
65
+ <phase>/validate-success-through-comprehensive-testing/
66
+ <phase>/documentation-pass-create-update-deprecate-docs/
67
+ ```
68
+
69
+ Each gets `task.md` (with `mandatory: true`, `parallelizable: false`), `notes.md`,
70
+ `atoms/`, and seeded atoms — not empty placeholders. They were previously two lines
71
+ of prose in `phase.md`, which made the most important tasks in every plan the only
72
+ ones with no artifact a subagent could read and nowhere to record decisions.
73
+
74
+ See [Mandatory frontmatter](../reference/mandatory-frontmatter.md) for what
75
+ `mandatory: true` does, and
76
+ [Mandatory closing phases](../standards/mandatory-closing-phases.md) for why they exist.
77
+
78
+ ## Placeholders are not work
79
+
80
+ `(no tasks yet …)` and `(no atoms yet …)` are **italic text, not checkboxes**. They
81
+ used to ship as `- [ ]`, and `plan-status.sh` counts every checkbox under a plan — so
82
+ a fresh phase with two tasks reported `0/5 boxes` and a plan could reach 100% by
83
+ ticking lines asserting that nothing existed. See
84
+ [Plan never reads complete](../troubleshooting/plan-never-reads-complete.md).
85
+
86
+ ## What is version-controlled
87
+
88
+ Active plans are **tracked**. They are the artifact a team coordinates around and that
89
+ subagents read via the planning MCP — and lg mode is selected precisely because there is
90
+ a team (≥2 git authors in 90 days). Ignoring them would defeat the mode's purpose.
91
+
92
+ Only `.planning/.archive/` is ignored: a completed plan is local history. Both init
93
+ scripts and `archive-plan.sh` write that one entry through
94
+ `planning_ensure_archive_gitignored` (sm keeps its own self-contained copy).
95
+
96
+ A repo that already carries a blanket `.planning/` line from v1 keeps it — the tool warns
97
+ once and never rewrites a user's `.gitignore`. To start sharing plans, replace that line
98
+ with `.planning/.archive/`.
99
+
100
+ ## sm mode is different, on purpose
101
+
102
+ `scripts/init-planning.sh` writes a single flat `task_plan.md` where phases-as-checkboxes
103
+ *is* the entire artifact. None of the above applies, and per `CLAUDE.md` its v2 behavior
104
+ is preserved bit-for-bit — the test suite diffs its output against the pre-change render.
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: Skill linking and reclaim
3
+ tier: reference
4
+ domains:
5
+ - architecture
6
+ audience:
7
+ - developers
8
+ tags: []
9
+ status: active
10
+ last_updated: '2026-09-04'
11
+ version: 1.0.0
12
+ purpose: How the skill directory reaches a consumer repo as a symlink, the four states it can
13
+ be in, and how a stale real directory is reclaimed without ever deleting it.
14
+ estimated_read_time: 2 minutes
15
+ word_count: 348
16
+ last_validated: '2026-09-04'
17
+ backlinks: []
18
+ ---
19
+
20
+ # Skill linking and reclaim
21
+
22
+ How `skills/persistent-planning/` reaches a consumer repo, and how a stale copy is
23
+ reclaimed. Implemented in `scripts/lib/skill-link.js` and `scripts/link-skills.js`.
24
+
25
+ ## The link
26
+
27
+ `scripts/link-skills.js` runs as npm `postinstall` and delegates to
28
+ `@theglitchking/claude-plugin-runtime`'s `runPostinstall()`, which symlinks each
29
+ directory under `skills/` into the consumer's `.claude/skills/`.
30
+
31
+ The runtime's linker reconciles a symlink but **skips a real directory** — it warns
32
+ and moves on, every time, forever. That is correct caution (the directory might be
33
+ hand-managed) and it is also how v1 debris survived five months: v1's
34
+ `persistent-planning install`, removed in 2.0.0, *copied* the skill dir, and nothing
35
+ since could reclaim it.
36
+
37
+ ## The reclaim
38
+
39
+ `reclaimStaleSkillDirs()` runs **before** the delegation. It renames a real directory
40
+ to `<name>.bak-<ISO8601>`, which leaves a clean destination the runtime's linker then
41
+ symlinks normally.
42
+
43
+ That ordering is the whole trick — it needs no change to `claude-plugin-runtime`, so
44
+ the fix ships as one release of this package rather than a runtime publish plus a
45
+ coordinated rollout. The runtime's skip is still worth fixing upstream; this shim is
46
+ written to be harmless if that ever lands.
47
+
48
+ Rules the implementation holds to:
49
+
50
+ - **Never delete.** A failed rename falls through to the runtime's old skip, but says
51
+ so loudly and names `relink`. The directory may contain hand edits.
52
+ - **Idempotent.** A healthy symlink is left completely alone, so a second run makes no
53
+ second backup.
54
+ - **Best-effort.** Any failure is caught; a reclaim problem never blocks an install.
55
+
56
+ ## The four states
57
+
58
+ `describeSkill()` classifies `.claude/skills/<name>`:
59
+
60
+ | State | Meaning |
61
+ |---|---|
62
+ | `absent` | nothing there; the linker will create the symlink |
63
+ | `symlink-ok` | points at this package (relative or absolute, both accepted) |
64
+ | `symlink-foreign` | points somewhere else — another install owns it |
65
+ | `real-dir` | **drift.** Nothing in the current system creates one |
66
+
67
+ `real-dir` and `symlink-foreign` are what `driftedSkills()` reports and what the
68
+ SessionStart hook warns about.
69
+
70
+ ## Escape hatches
71
+
72
+ | Variable | Effect |
73
+ |---|---|
74
+ | `PERSISTENT_PLANNING_SKIP_LINK=1` | no linking at all (runtime convention) |
75
+ | `PERSISTENT_PLANNING_NO_RECLAIM=1` | link, but never move an existing directory aside |
76
+
77
+ `updatePolicy: off` in `.claude/persistent-planning.json` suppresses the warning and
78
+ the automatic repair.
79
+
80
+ ## Related
81
+
82
+ - [Plugin update delivery](../procedures/plugin-update-delivery.md)
83
+ - [Skill version marker](../reference/skill-version-marker.md)
84
+ - [Stale skill directory](../troubleshooting/stale-skill-dir-drift.md)
@@ -3,7 +3,7 @@ title: Backups Documentation Index
3
3
  tier: reference
4
4
  domains: [backups]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of backups documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: backup, backups, restore, recovery, disaster, disaster-recov
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Backups Registry
3
3
  tier: reference
4
4
  domains: [backups]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for backups documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for backups documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Database Documentation Index
3
3
  tier: reference
4
4
  domains: [database]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of database documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: database, db, postgres, postgresql, mysql, sql, schema, migr
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Database Registry
3
3
  tier: reference
4
4
  domains: [database]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for database documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for database documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: DevOps Documentation Index
3
3
  tier: reference
4
4
  domains: [devops]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of devops documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: devops, deployment, deploy, ci, cd, ci/cd, pipeline, docker,
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: DevOps Registry
3
3
  tier: reference
4
4
  domains: [devops]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for devops documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for devops documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Features Documentation Index
3
3
  tier: reference
4
4
  domains: [features]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of features documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: feature, features, implementation, guide, how-to, tutorial,
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Features Registry
3
3
  tier: reference
4
4
  domains: [features]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for features documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for features documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Plans Documentation Index
3
3
  tier: reference
4
4
  domains: [plans]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of plans documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: plan, plans, planning, roadmap, proposal, proposals, rfc, de
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Plans Registry
3
3
  tier: reference
4
4
  domains: [plans]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for plans documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for plans documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-08-31*
38
+ *Last updated: 2026-09-04*
@@ -3,7 +3,7 @@ title: Procedures Documentation Index
3
3
  tier: reference
4
4
  domains: [procedures]
5
5
  status: active
6
- last_updated: '2026-08-31'
6
+ last_updated: '2026-09-04'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of procedures documentation
9
9
  ---
@@ -14,7 +14,7 @@ purpose: Complete listing of procedures documentation
14
14
 
15
15
  ## Overview
16
16
 
17
- - **Total Documents:** 1
17
+ - **Total Documents:** 2
18
18
  - **Domain:** `procedures/`
19
19
  - **Category:** features
20
20
  - **Load Priority:** 6/10
@@ -26,6 +26,7 @@ purpose: Complete listing of procedures documentation
26
26
  | Document | Status | Updated | Words |
27
27
  |----------|--------|---------|-------|
28
28
  | [Plan Completion and Archive](plan-completion-and-archive.md) | active | 2026-08-31 | 812 |
29
+ | [Plugin update delivery — what actually runs, and when](plugin-update-delivery.md) | active | 2026-09-04 | 539 |
29
30
 
30
31
  ## Keywords
31
32
 
@@ -39,4 +40,4 @@ This domain covers: procedure, procedures, sop, standard-operating-procedure, st
39
40
 
40
41
  ---
41
42
 
42
- *Last updated: 2026-08-31*
43
+ *Last updated: 2026-09-04*