pi-harness-runtime 1.1.166 → 1.1.167

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 (118) hide show
  1. package/AGENTS.md +272 -0
  2. package/CLAUDE.md +77 -0
  3. package/SECURITY.md +21 -0
  4. package/TODO-todo-bd-sync.md +124 -0
  5. package/auto-resume-fix-prompt.md +189 -0
  6. package/harness/reports/PROJECT_STATE.md +342 -0
  7. package/harness/reports/PROVIDER_USAGE_RESEARCH.md +115 -0
  8. package/harness/reports/SESSION_STATUS.md +107 -0
  9. package/harness/skills-plan/2026-07-12-herdr-moo-skills-adaptation-plan.md +278 -0
  10. package/harness/skills-plan/2026-07-12-minimax-prompt-step1-sync.md +345 -0
  11. package/harness/skills-plan/2026-07-12-public-skill-export-and-sync-design.md +504 -0
  12. package/harness/skills-plan/ACTION-PLAN.md +108 -0
  13. package/package.json +3 -1
  14. package/packages/a2a-adapter/package.json +1 -1
  15. package/packages/agent-policy/dist/extension.d.ts +2 -1
  16. package/packages/agent-policy/dist/extension.d.ts.map +1 -1
  17. package/packages/agent-policy/dist/extension.js +8 -3
  18. package/packages/agent-policy/dist/extension.js.map +1 -1
  19. package/packages/agent-policy/dist/policy-loader.d.ts.map +1 -1
  20. package/packages/agent-policy/dist/policy-loader.js +14 -2
  21. package/packages/agent-policy/dist/policy-loader.js.map +1 -1
  22. package/packages/agent-policy/package.json +1 -1
  23. package/packages/agent-policy/src/extension.ts +9 -3
  24. package/packages/agent-policy/src/policy-loader.ts +16 -2
  25. package/packages/architecture-generator/package.json +1 -1
  26. package/packages/auth/package.json +1 -1
  27. package/packages/autonomous-refactor/package.json +1 -1
  28. package/packages/autonomous-runtime/package.json +1 -1
  29. package/packages/cache-strategy/package.json +1 -1
  30. package/packages/capability-registry/package.json +1 -1
  31. package/packages/checkpoint/package.json +1 -1
  32. package/packages/cli-plugin-sdk/package.json +1 -1
  33. package/packages/clipboard/package.json +1 -1
  34. package/packages/clipboard-plugin/package.json +1 -1
  35. package/packages/code-generation/package.json +1 -1
  36. package/packages/code-review/package.json +1 -1
  37. package/packages/codex-adapter/package.json +1 -1
  38. package/packages/codex-watcher/package.json +1 -1
  39. package/packages/config-capture/package.json +1 -1
  40. package/packages/context-compiler/package.json +1 -1
  41. package/packages/context-discovery/package.json +1 -1
  42. package/packages/context-manager/package.json +1 -1
  43. package/packages/cookie-sanitizer/package.json +1 -1
  44. package/packages/cost-optimizer/package.json +1 -1
  45. package/packages/dependency-analyzer/package.json +1 -1
  46. package/packages/django-plugin/package.json +1 -1
  47. package/packages/doc-generator/package.json +1 -1
  48. package/packages/evaluation-engine/package.json +1 -1
  49. package/packages/evaluation-runner/package.json +1 -1
  50. package/packages/event-bus/package.json +1 -1
  51. package/packages/event-store/package.json +1 -1
  52. package/packages/experience-replay/package.json +1 -1
  53. package/packages/feedback-collector/package.json +1 -1
  54. package/packages/file-copy-helper/package.json +1 -1
  55. package/packages/framework-detector/package.json +1 -1
  56. package/packages/framework-plugin-sdk/package.json +1 -1
  57. package/packages/frappe-plugin/package.json +1 -1
  58. package/packages/generic-web-plugin/package.json +1 -1
  59. package/packages/health-monitor/package.json +1 -1
  60. package/packages/intent-analyzer/package.json +1 -1
  61. package/packages/jev-judge/package.json +1 -1
  62. package/packages/knowledge-graph/package.json +1 -1
  63. package/packages/knowledge-retrieval/package.json +1 -1
  64. package/packages/laravel-plugin/package.json +1 -1
  65. package/packages/learning-engine/package.json +1 -1
  66. package/packages/mcp-adapter/package.json +1 -1
  67. package/packages/memory-engine/package.json +1 -1
  68. package/packages/milestone-manager/package.json +1 -1
  69. package/packages/model-registry/package.json +1 -1
  70. package/packages/nextjs-plugin/package.json +1 -1
  71. package/packages/notification/package.json +1 -1
  72. package/packages/observability/package.json +1 -1
  73. package/packages/okf-indexer/package.json +1 -1
  74. package/packages/paperclip-integration/package.json +1 -1
  75. package/packages/performance-optimizer/package.json +1 -1
  76. package/packages/privilege-broker/package.json +1 -1
  77. package/packages/project-analyzer/package.json +1 -1
  78. package/packages/project-bootstrap/package.json +1 -1
  79. package/packages/projection-engine/package.json +1 -1
  80. package/packages/prompt-compiler/package.json +1 -1
  81. package/packages/prompt-versioning/package.json +1 -1
  82. package/packages/provider-adapter-sdk/package.json +1 -1
  83. package/packages/provider-router/package.json +1 -1
  84. package/packages/provider-selector/package.json +1 -1
  85. package/packages/providers/package.json +1 -1
  86. package/packages/qdrant-skills/package.json +1 -1
  87. package/packages/quota-manager/package.json +1 -1
  88. package/packages/rate-limiter/package.json +1 -1
  89. package/packages/react-vite-plugin/package.json +1 -1
  90. package/packages/release-manager/package.json +1 -1
  91. package/packages/requirement-compiler/package.json +1 -1
  92. package/packages/runtime/package.json +1 -1
  93. package/packages/scheduler/package.json +1 -1
  94. package/packages/scheduler-adapter/package.json +1 -1
  95. package/packages/session/package.json +1 -1
  96. package/packages/session-api/package.json +1 -1
  97. package/packages/session-export/package.json +1 -1
  98. package/packages/shared-context/package.json +1 -1
  99. package/packages/skill-mcp-client/package.json +1 -1
  100. package/packages/skill-registry/package.json +1 -1
  101. package/packages/skills/package.json +1 -1
  102. package/packages/sprint-planner/package.json +1 -1
  103. package/packages/subscription-engine/package.json +1 -1
  104. package/packages/task-compiler/package.json +1 -1
  105. package/packages/tencentdb-memory/package.json +1 -1
  106. package/packages/tencentdb-sync/package.json +1 -1
  107. package/packages/test-data-generator/package.json +1 -1
  108. package/packages/test-generator/package.json +1 -1
  109. package/packages/todo-bd-sync/package.json +1 -1
  110. package/packages/token-estimation/package.json +1 -1
  111. package/packages/token-optimizer/package.json +1 -1
  112. package/packages/trajectory/package.json +1 -1
  113. package/packages/tui/package.json +1 -1
  114. package/packages/types/package.json +1 -1
  115. package/packages/workflow-events/package.json +1 -1
  116. package/packages/workspace-scanner/package.json +1 -1
  117. package/packages/worktree/package.json +1 -1
  118. package/packages/write-review/package.json +1 -1
@@ -0,0 +1,278 @@
1
+ # Herdr-style Skill Adaptation Plan for `pi-harness-runtime`
2
+
3
+ ## Goal
4
+
5
+ Study Herdr's reusable `SKILL.md` distribution model and adapt the idea to `pi-harness-runtime` **without** treating the live MooCoding skill corpus as publishable package content.
6
+
7
+ ## Source Context
8
+
9
+ ### External reference
10
+
11
+ - Herdr docs: `https://herdr.dev/docs/agent-skill/`
12
+ - Herdr source skill: `https://github.com/ogulcancelik/herdr/blob/master/SKILL.md`
13
+
14
+ ### Local source of truth to protect
15
+
16
+ - Live skills: `/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills/*`
17
+
18
+ ### Current runtime state
19
+
20
+ - `pi-harness-runtime` already exposes bundled skills via:
21
+ - `package.json` -> `pi.skills = ["./skills"]`
22
+ - Current bundled repo skill set is minimal:
23
+ - `skills/harness-runtime/SKILL.md`
24
+ - `packages/skill-registry` is currently an in-memory registry, not a filesystem `SKILL.md` loader.
25
+
26
+ ---
27
+
28
+ ## Critical Constraints
29
+
30
+ ### 1. Live MooCoding skills must remain the evolving knowledge base
31
+
32
+ The directory:
33
+
34
+ `/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills/*`
35
+
36
+ is continuously updated and acts as the operational knowledge base.
37
+
38
+ Implication:
39
+
40
+ - `pi-harness-runtime` must **not** become the primary authoring location for those skills.
41
+ - Any adaptation must preserve the bench-side corpus as the editable source of truth.
42
+
43
+ ### 2. Live MooCoding skills are not yet safe to publish
44
+
45
+ Those skills may still contain:
46
+
47
+ - client names
48
+ - project-specific identifiers
49
+ - internal procedures
50
+ - sensitive business context
51
+ - unsanitized examples
52
+
53
+ Implication:
54
+
55
+ - Do **not** copy the entire MooCoding corpus into the publishable `pi-harness-runtime` package.
56
+ - Do **not** expose those files through npm/GitHub package distribution until sanitization is proven.
57
+ - Treat publication as a separate release stage with explicit validation gates.
58
+
59
+ ---
60
+
61
+ ## What Herdr Actually Gives Us
62
+
63
+ Herdr demonstrates a **distribution pattern**, not a safe-content pipeline:
64
+
65
+ - repository-hosted `SKILL.md`
66
+ - installable via `npx skills add <repo> --skill <name> -g`
67
+ - raw `SKILL.md` is the manual fallback/source of truth
68
+
69
+ Useful takeaway:
70
+
71
+ - `pi-harness-runtime` can adopt Herdr's packaging/install ergonomics for skills
72
+ - but must add a stronger separation between **live private skill source** and **sanitized public skill artifacts**
73
+
74
+ ---
75
+
76
+ ## Recommended Architecture
77
+
78
+ Use a **three-tier model**.
79
+
80
+ ### Tier A — Private live source
81
+
82
+ Location:
83
+
84
+ - `/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills/*`
85
+
86
+ Role:
87
+
88
+ - authoritative editable knowledge base
89
+ - may contain unsanitized internal content
90
+ - never published directly
91
+
92
+ ### Tier B — Curated staging area
93
+
94
+ Proposed role:
95
+
96
+ - local-only review area for candidate skills
97
+ - explicit human or automated sanitization review
98
+ - contains only skills being prepared for distribution
99
+
100
+ Possible future location options:
101
+
102
+ - `pi-harness-runtime/harness/skills-staging/`
103
+ - separate private repo
104
+ - generated temporary export directory outside package root
105
+
106
+ ### Tier C — Public distributable skills
107
+
108
+ Location:
109
+
110
+ - `pi-harness-runtime/skills/*`
111
+
112
+ Role:
113
+
114
+ - sanitized, approved subset only
115
+ - package-safe
116
+ - installable Herdr-style through repo/package distribution
117
+
118
+ ---
119
+
120
+ ## Recommended Plan
121
+
122
+ ## Phase 1 — Keep publication and live authoring separate
123
+
124
+ Decision:
125
+
126
+ - Keep MooCoding skills authored only in the bench-side directory
127
+ - Keep `pi-harness-runtime/skills/*` as a **public distribution surface**, not the live working corpus
128
+
129
+ Actions:
130
+
131
+ 1. Document the split-brain model clearly:
132
+ - private live source
133
+ - public curated export
134
+ 2. Do not auto-sync all live skills into the package
135
+ 3. Only allow explicit export of selected skills
136
+
137
+ Success criteria:
138
+
139
+ - no accidental publication path from private corpus to npm package
140
+ - package repo remains safe by default
141
+
142
+ ## Phase 2 — Define a sanitization gate before export
143
+
144
+ Create a formal checklist for any skill before publication.
145
+
146
+ Required checks:
147
+
148
+ - no client names
149
+ - no private URLs/IPs/domains
150
+ - no credentials/tokens/cookies
151
+ - no environment-specific hostnames
152
+ - no private repo names unless intended for public disclosure
153
+ - no business-sensitive examples
154
+ - no customer-specific workflow assumptions
155
+
156
+ Recommended validation modes:
157
+
158
+ 1. automated scanner
159
+ 2. manual human review
160
+ 3. approved export manifest
161
+
162
+ Success criteria:
163
+
164
+ - every published skill has traceable sanitization approval
165
+ - the export path is auditable
166
+
167
+ ## Phase 3 — Add an explicit export workflow
168
+
169
+ Instead of publishing directly from the live skill tree, add a tool/script that:
170
+
171
+ 1. selects one or more source skills from the private corpus
172
+ 2. copies them into a staging/export area
173
+ 3. runs sanitization checks
174
+ 4. writes approved results into `pi-harness-runtime/skills/`
175
+
176
+ Important rule:
177
+
178
+ - export should be **pull-based and explicit**, never automatic background mirroring
179
+
180
+ Suggested future command shape:
181
+
182
+ - `scripts/export-skill.ts --source <private-skill> --target <public-skill>`
183
+ - optional `--check-only`
184
+ - optional `--manifest approved-skills.json`
185
+
186
+ Success criteria:
187
+
188
+ - no bulk one-shot publish of the entire MooCoding corpus
189
+ - each public skill has an intentional export event
190
+
191
+ ## Phase 4 — Use Herdr-style installation only for approved public skills
192
+
193
+ Once a sanitized skill exists inside `pi-harness-runtime/skills/<name>/SKILL.md`:
194
+
195
+ - expose it through the existing `pi.skills` package field
196
+ - document Herdr-style installation ergonomics for the public subset
197
+
198
+ This gives the benefit of Herdr's distribution model without risking raw private content leakage.
199
+
200
+ Success criteria:
201
+
202
+ - only sanitized skills are installable from the public runtime package
203
+ - public docs never point users at the live private MooCoding corpus
204
+
205
+ ## Phase 5 — Optional local filesystem loader for private use
206
+
207
+ If desired, extend `packages/skill-registry` later to read `SKILL.md` files from configurable local directories.
208
+
209
+ This should be treated as a **local runtime feature**, not a publication mechanism.
210
+
211
+ Potential capabilities:
212
+
213
+ - discover local private skills from configured paths
214
+ - list them in the runtime
215
+ - mark source type: `bundled` vs `external-private`
216
+ - never publish external-private skills automatically
217
+
218
+ Important safeguard:
219
+
220
+ - external-private discovery must not imply packaging or registry distribution
221
+
222
+ Success criteria:
223
+
224
+ - local users can benefit from private skills dynamically
225
+ - private skill ingestion remains isolated from public release paths
226
+
227
+ ---
228
+
229
+ ## Non-Goals
230
+
231
+ The following should **not** happen in the first implementation:
232
+
233
+ - copying the full MooCoding skill corpus into `pi-harness-runtime/skills/`
234
+ - publishing unsanitized skills to npm/GitHub
235
+ - treating the package repo as the authoring source of truth
236
+ - building automatic bidirectional sync between private and public skill trees
237
+ - assuming Herdr's install model is sufficient without a content-safety layer
238
+
239
+ ---
240
+
241
+ ## Proposed Deliverables
242
+
243
+ ### Immediate deliverable
244
+
245
+ - this planning note in `harness/skills-plan/`
246
+
247
+ ### Next implementation deliverables
248
+
249
+ 1. `PUBLIC_SKILLS_POLICY.md` or similar policy doc
250
+ 2. sanitization checklist/spec
251
+ 3. explicit export script for selected skills
252
+ 4. public skill index for approved packaged skills
253
+ 5. optional file-backed registry loader for local-only skill discovery
254
+
255
+ ---
256
+
257
+ ## Suggested Execution Order
258
+
259
+ 1. Write policy: private vs public skill boundary
260
+ 2. Define sanitization rules and approval process
261
+ 3. Implement export workflow for selected skills only
262
+ 4. Publish one or two proven-safe sample skills first
263
+ 5. Only then consider broader Herdr-style public skill distribution
264
+ 6. Later, separately, consider local private skill loading in `packages/skill-registry`
265
+
266
+ ---
267
+
268
+ ## Recommendation
269
+
270
+ **Do not adapt by importing the full MooCoding corpus into `pi-harness-runtime` right now.**
271
+
272
+ Best first move:
273
+
274
+ - keep MooCoding skills private and live
275
+ - make `pi-harness-runtime` the home only for **sanitized exported skills**
276
+ - treat Herdr as the inspiration for install UX, not as the whole architecture
277
+
278
+ This preserves your knowledge base, avoids accidental disclosure, and still leaves room for a clean public skill distribution story later.
@@ -0,0 +1,345 @@
1
+ # Minimax Prompt — Implement Skills Sync First Slice
2
+
3
+ Use this prompt with Minimax to implement the first safe slice of the MooCoding skill export pipeline.
4
+
5
+ ---
6
+
7
+ You are coding inside this repo:
8
+
9
+ - `/home/frappe/pi-harness-runtime`
10
+
11
+ Read these planning notes first:
12
+
13
+ 1. `harness/skills-plan/2026-07-12-herdr-moo-skills-adaptation-plan.md`
14
+ 2. `harness/skills-plan/2026-07-12-public-skill-export-and-sync-design.md`
15
+
16
+ Also inspect this existing script for repo conventions:
17
+
18
+ - `scripts/convert-skills-to-okf.ts`
19
+
20
+ ## Goal
21
+
22
+ Implement only the **first safe slice** of the design:
23
+
24
+ 1. add private staging manifest files
25
+ 2. add a one-way `skills-sync.ts` command
26
+ 3. make sure sync updates only private staging and never public package skills
27
+
28
+ Do **not** implement sanitize or export in this task.
29
+
30
+ ---
31
+
32
+ ## Critical constraints
33
+
34
+ The live private source of truth is:
35
+
36
+ - `/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills/*`
37
+
38
+ This source changes often and may contain private or unsanitized content.
39
+
40
+ Therefore:
41
+
42
+ - sync is allowed
43
+ - publish is not allowed
44
+ - sync must go only into private staging
45
+ - sync must never write to `skills/*`
46
+ - sync must never mirror the whole private corpus by default
47
+ - sync must be allowlist/manifest driven
48
+
49
+ Treat this as a privacy-sensitive workflow.
50
+
51
+ ---
52
+
53
+ ## Scope to implement
54
+
55
+ ### 1. Create staging manifest files
56
+
57
+ Create these files:
58
+
59
+ - `harness/skills-staging/manifests/source-index.json`
60
+ - `harness/skills-staging/manifests/approval-index.json`
61
+
62
+ Use safe initial content.
63
+
64
+ Suggested initial shape:
65
+
66
+ `source-index.json`
67
+
68
+ ```json
69
+ {
70
+ "version": 1,
71
+ "sourceRoot": "/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills",
72
+ "skills": []
73
+ }
74
+ ```
75
+
76
+ `approval-index.json`
77
+
78
+ ```json
79
+ {
80
+ "version": 1,
81
+ "skills": []
82
+ }
83
+ ```
84
+
85
+ The `skills` entries in `source-index.json` should support at least:
86
+
87
+ ```json
88
+ {
89
+ "sourceName": "form-state-persistence-fix",
90
+ "targetName": "form-state-persistence-fix",
91
+ "sync": true,
92
+ "publicCandidate": true
93
+ }
94
+ ```
95
+
96
+ You may define TypeScript interfaces in the sync script or a small helper module if needed.
97
+
98
+ ### 2. Create private staging ignore rules
99
+
100
+ Add a repo-local ignore strategy so private mirrored content is not accidentally treated as public package content.
101
+
102
+ Preferred approach:
103
+
104
+ - create `harness/skills-staging/.gitignore`
105
+ - ignore these directories:
106
+ - `source-mirror/`
107
+ - `sanitized-candidates/`
108
+ - `reports/`
109
+ - do **not** ignore `manifests/`
110
+
111
+ If you think an additional package-level safeguard is needed, explain it in your final summary, but keep the implementation minimal.
112
+
113
+ ### 3. Implement `scripts/skills-sync.ts`
114
+
115
+ Create a Bun TypeScript script using repo style similar to `scripts/convert-skills-to-okf.ts`.
116
+
117
+ Use:
118
+
119
+ - shebang: `#!/usr/bin/env bun`
120
+ - ESM imports
121
+ - `fs/promises`
122
+ - `existsSync` if useful
123
+ - no extra dependencies
124
+
125
+ ### 4. Add package script aliases
126
+
127
+ Add at least these package.json scripts:
128
+
129
+ ```json
130
+ {
131
+ "skills:sync": "bun scripts/skills-sync.ts",
132
+ "skills:sync:check": "bun scripts/skills-sync.ts --check-only"
133
+ }
134
+ ```
135
+
136
+ Do not remove or alter existing scripts unrelated to this task.
137
+
138
+ ---
139
+
140
+ ## CLI requirements for `skills-sync.ts`
141
+
142
+ Support these flags:
143
+
144
+ ### Selection
145
+
146
+ - `--skill <name>`
147
+ - `--all-from-manifest`
148
+
149
+ Exactly one selection mode must be used.
150
+
151
+ ### Modifiers
152
+
153
+ - `--changed-only`
154
+ - `--check-only`
155
+
156
+ Allowed combinations:
157
+
158
+ - `--skill <name>`
159
+ - `--skill <name> --changed-only`
160
+ - `--skill <name> --check-only`
161
+ - `--all-from-manifest`
162
+ - `--all-from-manifest --changed-only`
163
+ - `--all-from-manifest --check-only`
164
+
165
+ If flags are invalid or missing, print usage and exit non-zero.
166
+
167
+ ---
168
+
169
+ ## Sync behavior
170
+
171
+ ### Source manifest loading
172
+
173
+ Read `harness/skills-staging/manifests/source-index.json`.
174
+
175
+ Use `sourceRoot` from that file.
176
+
177
+ Optionally allow env override:
178
+
179
+ - `MOO_SKILLS_SOURCE_ROOT`
180
+
181
+ If you add the override, document it in code comments and final summary.
182
+
183
+ ### Skill selection
184
+
185
+ - `--skill <name>` should only operate on a matching manifest entry
186
+ - `--all-from-manifest` should only operate on manifest entries where `sync: true`
187
+ - if a requested skill is not in the manifest, fail clearly
188
+ - do not discover and sync arbitrary folders outside the manifest
189
+
190
+ ### Per-skill source path
191
+
192
+ For each selected skill:
193
+
194
+ - source file:
195
+ - `<sourceRoot>/<sourceName>/SKILL.md`
196
+ - staging target file:
197
+ - `harness/skills-staging/source-mirror/<targetName>/SKILL.md`
198
+
199
+ ### Hashing and drift detection
200
+
201
+ Compute a SHA-256 hash for the source file.
202
+
203
+ Also determine previous mirror hash if the mirrored target file already exists.
204
+
205
+ Use this to calculate:
206
+
207
+ - `changed: true|false`
208
+ - `previousHash`
209
+ - `sourceHash`
210
+
211
+ ### `--changed-only`
212
+
213
+ When enabled:
214
+
215
+ - only copy files whose source hash differs from the current mirror hash
216
+ - unchanged skills should still appear in the report as skipped/unchanged
217
+
218
+ ### `--check-only`
219
+
220
+ When enabled:
221
+
222
+ - do not write mirrored skill files
223
+ - do not update reports except possibly a dry-run style summary file if you think that is useful
224
+ - printing a summary is enough
225
+
226
+ ### Normal sync mode
227
+
228
+ When not in `--check-only` mode:
229
+
230
+ - create parent directories as needed
231
+ - copy source `SKILL.md` into staging mirror
232
+ - never write to `skills/*`
233
+ - never modify approval manifest
234
+
235
+ ---
236
+
237
+ ## Reporting requirements
238
+
239
+ Write a machine-readable report file at:
240
+
241
+ - `harness/skills-staging/reports/sync-report.json`
242
+
243
+ Only in non-check mode.
244
+
245
+ Suggested report structure:
246
+
247
+ ```json
248
+ {
249
+ "version": 1,
250
+ "executedAt": "2026-07-12T00:00:00.000Z",
251
+ "mode": {
252
+ "selection": "skill",
253
+ "checkOnly": false,
254
+ "changedOnly": true
255
+ },
256
+ "skills": [
257
+ {
258
+ "sourceName": "form-state-persistence-fix",
259
+ "targetName": "form-state-persistence-fix",
260
+ "sourcePath": "...",
261
+ "mirrorPath": "...",
262
+ "sourceHash": "...",
263
+ "previousHash": "...",
264
+ "changed": true,
265
+ "status": "synced"
266
+ }
267
+ ]
268
+ }
269
+ ```
270
+
271
+ Reasonable status values:
272
+
273
+ - `synced`
274
+ - `unchanged`
275
+ - `missing-source`
276
+ - `skipped`
277
+ - `error`
278
+
279
+ Also print a concise human-readable CLI summary.
280
+
281
+ ---
282
+
283
+ ## Error handling
284
+
285
+ Fail clearly and non-zero for:
286
+
287
+ - missing manifest file
288
+ - invalid manifest JSON
289
+ - invalid flags
290
+ - requested skill not present in manifest
291
+ - missing source `SKILL.md`
292
+
293
+ For `--all-from-manifest`, if one skill fails, continue collecting results for others if reasonable, but exit non-zero if any error occurred.
294
+
295
+ ---
296
+
297
+ ## Out of scope
298
+
299
+ Do **not** implement in this task:
300
+
301
+ - `skills-sanitize.ts`
302
+ - `skills-export.ts`
303
+ - writing anything into `skills/*`
304
+ - package manifest changes beyond adding `skills:sync` scripts
305
+ - `packages/skill-registry` loader changes
306
+ - automatic approval
307
+ - automatic public publishing
308
+
309
+ ---
310
+
311
+ ## Expected files changed
312
+
313
+ You should likely touch only these areas:
314
+
315
+ - `package.json`
316
+ - `scripts/skills-sync.ts`
317
+ - `harness/skills-staging/.gitignore`
318
+ - `harness/skills-staging/manifests/source-index.json`
319
+ - `harness/skills-staging/manifests/approval-index.json`
320
+
321
+ If you add a small helper file under `scripts/`, keep it minimal and explain why.
322
+
323
+ ---
324
+
325
+ ## Implementation style
326
+
327
+ - keep the first slice small and reviewable
328
+ - prefer explicit code over framework-heavy abstractions
329
+ - keep data shapes simple JSON
330
+ - do not introduce dependencies
331
+ - follow current repo script style
332
+ - keep comments only where they clarify safety boundaries or flag behavior
333
+
334
+ ---
335
+
336
+ ## Final response format
337
+
338
+ When done, respond with:
339
+
340
+ 1. summary of files changed
341
+ 2. CLI usage examples
342
+ 3. safety guarantees confirming sync never writes to `skills/*`
343
+ 4. any open questions or follow-up suggestions
344
+
345
+ Do not commit or push anything.