@prodero/curator 0.0.0-stage → 0.1.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 (137) hide show
  1. package/ARCHITECTURE.md +298 -0
  2. package/CHANGELOG.md +16 -0
  3. package/CONTRIBUTING.md +9 -0
  4. package/LICENSE +21 -0
  5. package/README.md +94 -2
  6. package/SECURITY.md +7 -0
  7. package/bin/prodero +7 -0
  8. package/dist/cli.js +228 -0
  9. package/dist/context-instructions.js +2 -0
  10. package/dist/contracts.js +50 -0
  11. package/dist/conversation-presentation.js +262 -0
  12. package/dist/core/agent-instructions.js +39 -0
  13. package/dist/core/applicability-label.js +11 -0
  14. package/dist/core/applicability.js +143 -0
  15. package/dist/core/bootstrap.js +129 -0
  16. package/dist/core/consolidation.js +315 -0
  17. package/dist/core/constants.js +21 -0
  18. package/dist/core/context-allocation.js +54 -0
  19. package/dist/core/context-snapshot.js +12 -0
  20. package/dist/core/context.js +489 -0
  21. package/dist/core/curation-clauses.js +68 -0
  22. package/dist/core/curation-evidence.js +98 -0
  23. package/dist/core/curation-graphical.js +105 -0
  24. package/dist/core/curation-review-presentation.js +4 -0
  25. package/dist/core/curation-review-state.js +62 -0
  26. package/dist/core/curation-review.js +573 -0
  27. package/dist/core/curation-revision.js +106 -0
  28. package/dist/core/curation-semantic-contract.js +239 -0
  29. package/dist/core/curation-semantic-jobs.js +280 -0
  30. package/dist/core/diagnostics.js +17 -0
  31. package/dist/core/format.js +114 -0
  32. package/dist/core/ids.js +6 -0
  33. package/dist/core/imports.js +169 -0
  34. package/dist/core/index.js +93 -0
  35. package/dist/core/instruction-review.js +86 -0
  36. package/dist/core/integrity-files.js +174 -0
  37. package/dist/core/intelligence.js +95 -0
  38. package/dist/core/knowledge-analysis.js +46 -0
  39. package/dist/core/knowledge-authority.js +143 -0
  40. package/dist/core/knowledge-curation.js +316 -0
  41. package/dist/core/knowledge-engine.js +475 -0
  42. package/dist/core/knowledge-graph.js +191 -0
  43. package/dist/core/knowledge-lifecycle.js +212 -0
  44. package/dist/core/knowledge-management.js +113 -0
  45. package/dist/core/knowledge-migration.js +84 -0
  46. package/dist/core/knowledge-policy.js +38 -0
  47. package/dist/core/knowledge-provenance.js +90 -0
  48. package/dist/core/knowledge-write-policy.js +85 -0
  49. package/dist/core/language.js +14 -0
  50. package/dist/core/matching.js +6 -0
  51. package/dist/core/memory-index.js +239 -0
  52. package/dist/core/memory-intelligence.js +288 -0
  53. package/dist/core/memory-link-repair.js +66 -0
  54. package/dist/core/memory-operations.js +122 -0
  55. package/dist/core/memory-pressure.js +212 -0
  56. package/dist/core/memory-sync-curator.js +62 -0
  57. package/dist/core/memory-sync.js +463 -0
  58. package/dist/core/memory-transformation-bundle.js +163 -0
  59. package/dist/core/memory-transformation-proposal.js +135 -0
  60. package/dist/core/memory-transformation.js +108 -0
  61. package/dist/core/memory.js +186 -0
  62. package/dist/core/migrations.js +569 -0
  63. package/dist/core/path-scope.js +27 -0
  64. package/dist/core/plugin-files.js +116 -0
  65. package/dist/core/project-root.js +39 -0
  66. package/dist/core/project.js +634 -0
  67. package/dist/core/promotion.js +279 -0
  68. package/dist/core/reconciliation.js +61 -0
  69. package/dist/core/secrets.js +67 -0
  70. package/dist/core/semantic-safety.js +33 -0
  71. package/dist/core/session-index.js +112 -0
  72. package/dist/core/session-review.js +150 -0
  73. package/dist/core/sessions.js +289 -0
  74. package/dist/core/settings.js +76 -0
  75. package/dist/core/skill-curation.js +239 -0
  76. package/dist/core/skill-polish.js +41 -0
  77. package/dist/core/skills.js +368 -0
  78. package/dist/core/storage.js +408 -0
  79. package/dist/core/sync-transaction.js +254 -0
  80. package/dist/core/telemetry.js +64 -0
  81. package/dist/core/templates.js +53 -0
  82. package/dist/core/types.js +2 -0
  83. package/dist/core/update.js +320 -0
  84. package/dist/curation-review-adapter.js +92 -0
  85. package/dist/diagnostic-boundary.js +54 -0
  86. package/dist/filesystem/permissions.js +39 -0
  87. package/dist/hosts/adapters.js +119 -0
  88. package/dist/hosts/files.js +133 -0
  89. package/dist/hosts/manager.js +150 -0
  90. package/dist/hosts/public-entry.js +47 -0
  91. package/dist/hosts/runtime-command.js +66 -0
  92. package/dist/hosts/runtime.js +139 -0
  93. package/dist/hosts/wizard.js +114 -0
  94. package/dist/knowledge-table.js +38 -0
  95. package/dist/mcp-development.js +69 -0
  96. package/dist/mcp-workspace.js +141 -0
  97. package/dist/memory-presentation.js +172 -0
  98. package/dist/plugins/api.js +2 -0
  99. package/dist/plugins/context.js +20 -0
  100. package/dist/plugins/mcp.js +72 -0
  101. package/dist/plugins/registry.js +106 -0
  102. package/dist/presentation-cards.js +32 -0
  103. package/dist/presentation-server.js +79 -0
  104. package/dist/presentation-trace.js +174 -0
  105. package/dist/presentation.js +412 -0
  106. package/dist/providers/mcp-sampling.js +45 -0
  107. package/dist/server.js +656 -0
  108. package/dist/settings-definition.js +22 -0
  109. package/dist/skill-instructions.js +2 -0
  110. package/dist-ui/index.html +214 -0
  111. package/docs/APPLICABILITY.md +151 -0
  112. package/docs/COMPATIBILITY.md +49 -0
  113. package/docs/CONTEXT-SELECTION-V2.md +61 -0
  114. package/docs/CURATION-APP-REVIEW.md +156 -0
  115. package/docs/CURATION-CLAUSE-REFINEMENT.md +45 -0
  116. package/docs/IMPORTER-CURATION.md +142 -0
  117. package/docs/KNOWLEDGE-AUTHORITY.md +165 -0
  118. package/docs/KNOWLEDGE-SCHEMA-V2.md +150 -0
  119. package/docs/MIGRATIONS.md +99 -0
  120. package/docs/PRIVACY.md +28 -0
  121. package/docs/RECOVERY.md +56 -0
  122. package/docs/RELEASING.md +40 -0
  123. package/docs/hosts.md +134 -0
  124. package/docs/plugins.md +83 -0
  125. package/docs/ui-themes.md +43 -0
  126. package/instructions/AGENTS.md +33 -0
  127. package/package.json +88 -4
  128. package/plugins/migrate_ai_studio/README.md +101 -0
  129. package/plugins/migrate_ai_studio/index.cjs +396 -0
  130. package/plugins/migrate_ai_studio/instructions/audit.md +25 -0
  131. package/plugins/migrate_ai_studio/instructions/classify.md +41 -0
  132. package/plugins/migrate_ai_studio/instructions/migrate.md +34 -0
  133. package/plugins/migrate_ai_studio/instructions/verify.md +20 -0
  134. package/plugins/migrate_ai_studio/plugin.json +11 -0
  135. package/plugins/migrate_ai_studio/schema.cjs +20 -0
  136. package/plugins/migrate_ai_studio/ui/dist/index.html +77 -0
  137. package/prodero.release.json +5 -0
@@ -0,0 +1,165 @@
1
+ # Knowledge authority and safe automatic memory
2
+
3
+ > v0.1 contract: Local/Versioned describe Git storage and sharing, not a security boundary against the connected agent. Review and approval are workflow safeguards, not authenticated human consent. The agent may create, promote and maintain Versioned files. Curator does not commit or push; users review repository changes before doing so. See [Privacy](PRIVACY.md).
4
+
5
+ Runtime policy reference. The current runtime extends this model with [Knowledge Schema v3 applicability](APPLICABILITY.md); authority and policy guarantees remain in force.
6
+
7
+ ## Core architecture
8
+
9
+ Current targets are Knowledge Schema v3 and Project Schema v8. The authority
10
+ checks are runtime policy checks, not a reinterpretation of existing knowledge.
11
+ `context_policy` remains independent of category, priority and authority.
12
+
13
+ `core/knowledge-authority.ts` evaluates transitions. `core/knowledge-write-policy.ts`
14
+ applies that decision to an entire canonical transaction **before** the durable
15
+ journal exists. Remember, deterministic and assisted Sync, imports, lifecycle
16
+ transformations, maintenance, supersession and publication converge on
17
+ `commitSyncTransaction`. Presentation does not decide authorization.
18
+
19
+ The adapter checks paths/preimages, loads only referenced canonical bodies through
20
+ the catalog, decides replacements before retirements, prevents protected rules from
21
+ being hidden by unauthorized supersession, then uses the existing journal,
22
+ checkpoint, index rebuild and recovery mechanism. Recovery replays an already
23
+ validated decision; serialized authority or evidence does not authorize new work.
24
+
25
+ The low-level `writeKnowledge` function is a trusted canonical-storage primitive
26
+ used by fixtures, not by any production inference writer. Migration, restore,
27
+ manual filesystem editing and arbitrary code running inside the Core process are
28
+ trusted administrative capabilities, outside the model-facing security boundary.
29
+ This is not a sandbox against a malicious plugin with filesystem/process access.
30
+
31
+ ## Authority and trust boundary
32
+
33
+ | Classification | Meaning | How it is established |
34
+ | --- | --- | --- |
35
+ | `inferred` | Agent/session-derived knowledge | Automatic default |
36
+ | `imported` | Imported source knowledge | Import adapter; relevant by default |
37
+ | `legacy_inherited` | Behavior mechanically inherited from v1 | Existing migration, never a new agent promotion |
38
+ | `explicit_user` | Rule attributed to an explicit user request | Model-mediated chat command or optional host adapter; the label is not authentication |
39
+ | `reviewed` | Exact policy change attributed to a review | Core embedding capability; provenance alone does not authenticate a person |
40
+
41
+ Classification is provenance, not a permission token or confidence score. Neither
42
+ `kind: rule`, evidence with `kind: user_instruction`, existing prose, a model-written
43
+ quote by itself, nor `approved: true` alone in tool arguments grants policy authority. The explicit Required chat command described below is a model-callable exception with bound content and request provenance. Existing
44
+ source-session, observation and evidence references are retained.
45
+
46
+ `withTrustedKnowledgeIntent` is an in-process, async-scoped capability bound to the
47
+ resolved project, exact content/category/scope/priority/status, intended policy,
48
+ auditable reference, and optionally exact source preimage. It expires when the
49
+ operation completes, including detached async callbacks. It is not persisted or
50
+ exposed as an MCP input. Entry points must bind the authorized operation; the engine cannot independently prove user intent relayed by an assistant or host.
51
+
52
+ `createServer({currentUserRule})` optionally accepts a **host-supplied** verifier.
53
+ It returns the current turn ID, actual user text, explicit mandatory intent and
54
+ exact intended content/scope/importance. `rememberCurrentUserRule` checks binding
55
+ and applies that intent without a second confirmation. No lexical classifier
56
+ pretends to prove intent. Generic, missing, mismatched or unavailable attestations
57
+ fall back to ordinary Remember when no explicit Required chat command is supplied. The stock stdio MCP transport does not provide authenticated user-turn intent.
58
+
59
+ For a direct user request such as "remember: always reply in Russian", the assistant may call `prodero_remember` with `kind: "rule"`, `required: true`, and `userInstruction` containing the exact current request. This explicit command authorizes only the supplied rule through the same scoped writer boundary; it records `chat-user-request` provenance, not a fabricated host attestation. The assistant must not use this command for inferred lessons, imported documents or embedded instructions. No second confirmation is required. Missing request text or a non-rule kind is rejected. The default applicability is the current project; path rules remain scoped. Ordinary Remember and automatic learning retain their existing Relevant defaults.
60
+
61
+ Use memory search and an exact `replaceId` to make an existing Relevant rule Required. The result reports its actual context policy. Open continues to load only applicable Required instructions; it does not include all Relevant rules.
62
+
63
+ ## Automatic versus reviewed transitions
64
+
65
+ - New facts, decisions, lessons and inferred instructions are relevant/inferred.
66
+ Newly imported instructions are relevant/imported. New inferred criticality is
67
+ capped at important; critical remains distinct from required.
68
+ - Category hints classify knowledge, never mandate delivery. Global instruction
69
+ candidates retain their existing pending lifecycle.
70
+ - Relevant wording refinement, deduplication and provenance enrichment remain
71
+ automatic within the original scope and policy/authority ceiling.
72
+ - Exact copies/publication retain existing policy and authority. Equal-policy,
73
+ equal-authority, equal-scope and equal-priority source clauses may be combined
74
+ losslessly; no new normative clause is granted by that combination.
75
+ - Protected records include required, critical, explicit_user and reviewed
76
+ knowledge. Inference cannot change their policy, authority, scope, priority,
77
+ category, protected clauses or effective active status. Safe whitespace
78
+ normalization and exact clause-preserving consolidation remain possible.
79
+ - Scope changes on existing inferred records are conservatively preserved too;
80
+ new replacements inherit a common source applicability boundary.
81
+ - Unauthorized new promotion is downgraded to a safe relevant record. Ambiguous
82
+ automatic edits preserve the original; changed content can be retained as a
83
+ separate relevant Local record with a relationship to the original.
84
+ - Exact requested protected mutations (maintenance/forget) fail before canonical
85
+ changes with `POLICY_REVIEW_REQUIRED`. A model-callable approval boolean cannot
86
+ select between incompatible authoritative states. Trusted Core intent can
87
+ authorize an exact change, including de-escalation.
88
+ - Publication review authorizes the publication layer only. It never establishes
89
+ `reviewed`, upgrades relevant to required, or grants new criticality.
90
+
91
+ Semantic equality is intentionally conservative: whole source clauses must be
92
+ preserved. An LLM assertion of equivalence is not proof. Paraphrases that cannot be
93
+ proven safe remain separate relevant knowledge, or require exact review when the
94
+ caller explicitly requests changing the original rule.
95
+
96
+ ## Writers and lifecycle
97
+
98
+ Remember saves an agent-selected rule as instruction/relevant/inferred. Generic
99
+ “remember this” remains ordinary memory. An unsafe replacement reports the preserved
100
+ source separately rather than falsely reporting that the original was replaced.
101
+
102
+ Deterministic Sync and assisted reconciliation use the same transaction gate.
103
+ Existing extractive validation, source verification, graph constraints and bounded
104
+ retrieval remain in place. Model prompts are not the enforcement mechanism.
105
+ A rejected protected rewrite can retain the new information locally without
106
+ retiring its authoritative source. Checkpoints retain aggregate transition reasons.
107
+
108
+ Memory Transformation applies the shared policy to proposed new records and skips
109
+ unsafe replacement/archive links. Clean Local transformations stay automatic.
110
+ Archive moves additionally validate the original source; moving to a new filename
111
+ cannot bypass protected retirement checks. Reviewed publication and instruction
112
+ optimization use exact policy validation at commit rather than silently applying
113
+ a different policy from the reviewed plan.
114
+
115
+ AI Studio classification is unchanged. Even historical text classified as an
116
+ instruction becomes relevant/imported on new import. Import/publication approval
117
+ is not approval to create a mandatory rule. Existing migrated records are untouched.
118
+
119
+ ## Review and presentation
120
+
121
+ Core distinguishes `allowed`, `allowed_with_safe_fallback`, `review_recommended`,
122
+ `review_required`, and `forbidden`, with reasons and an independent blocking flag.
123
+ Optional recommendations are aggregate checkpoint/Sync diagnostics, not a forced
124
+ queue, per-record approval popup, or permanent UI panel. There is no new memory
125
+ review prompt during an ordinary session. A batch may contain ten inferred
126
+ instructions and finish close/Sync/next Prepare without review.
127
+
128
+ Prepare exposes `policyReadiness` and UI blocking state for an **applicable explicit
129
+ required-policy contradiction or unresolved required dispute**. Merely matching
130
+ rule titles or suggesting promotion does not block work. The session remains
131
+ available; resolve the policy and retry Prepare with the same task/session. The
132
+ agent must honor this structured readiness state; Curator cannot stop unrelated
133
+ external tools from executing. Text and UI explain whether work must wait.
134
+
135
+ Policy mutation errors expose the same structured blocking/preserved state through
136
+ UI tools and the text gateway. Existing maintenance screens remain, but their
137
+ model-callable `approved` flag cannot authorize an otherwise protected edit.
138
+ The curation App adapter can grant exact reviewed mutations after validating saved
139
+ review state. This is a workflow consistency boundary, not authenticated human
140
+ consent. Optional host attestations are distinct from stock model-mediated chat
141
+ and App paths; v0.1 does not require a trusted-host authorization subsystem.
142
+
143
+ ## Compatibility and deferred work
144
+
145
+ Policy checks preserve existing protected metadata and use the current schema,
146
+ applicability and migration boundaries. See [Knowledge Schema v2](KNOWLEDGE-SCHEMA-V2.md)
147
+ for the historical policy-format migration and [Applicability](APPLICABILITY.md)
148
+ for the current v3 representation.
149
+
150
+ Optional future host attestations and richer normative-equivalence proofs are outside
151
+ the v0.1 contract. Current importer and applicability behavior is documented separately. Arbitrary content semantics cannot be proven by a generic LLM;
152
+ conservative retention is deliberate. Ordinary automatic inference does not grant Required policy. Exact chat commands,
153
+ validated review adapters, mechanical legacy migration and equivalent existing
154
+ policy use the current Core boundary. The connected agent can supply chat/review
155
+ arguments; these checks cannot prove who intended them.
156
+
157
+ ## Verification
158
+
159
+ Tests use temporary repositories, fixture records and in-memory MCP clients.
160
+ Coverage includes ordinary Remember, ten inferred observations, deterministic and
161
+ assisted Sync, protected source retention, escalation/de-escalation, trusted current
162
+ turns, stale/wrong-project/expired intent, imports, lifecycle archive/replacement,
163
+ publication, exact protected mutation errors, UI/text parity and conflict readiness.
164
+ Existing migration, v2 round-trip, cache, recovery, instruction consolidation and
165
+ full regression suites are also run. See [release verification](RELEASING.md) for reproducible validation.
@@ -0,0 +1,150 @@
1
+ # Knowledge Policy Schema v2
2
+
3
+ Historical schema reference. The current runtime extends this model with [Knowledge Schema v3 applicability](APPLICABILITY.md); authority and policy guarantees remain in force.
4
+
5
+ ## Architecture and canonical format
6
+
7
+ This transition introduced knowledge schema 2 on project schema 6. Current targets in
8
+ `prodero.release.json` are project 8 and knowledge 3; project-local `.prodero/config.json` remains authoritative.
9
+ The adjacent `knowledge-policy-1-2` compatible-semantic transition is registered in
10
+ Core's existing migration engine. There is no separate conversion command or lock.
11
+
12
+ Canonical Markdown frontmatter now includes:
13
+
14
+ ```yaml
15
+ version: 2
16
+ kind: knowledge
17
+ category: instruction
18
+ context_policy: relevant
19
+ authority: inferred
20
+ ```
21
+
22
+ Category describes the
23
+ kind of knowledge. `context_policy: required` selects mandatory delivery when
24
+ applicable; `relevant` uses ordinary retrieval and does not mean unimportant.
25
+ Priority, critical status, scope and relevance score retain their existing meanings.
26
+ All categories support relevant. Only instruction supports required in this phase.
27
+ Decision/constraint/invariant required combinations are rejected, not auto-promoted.
28
+
29
+ Core uses `version`, `contextPolicy`, `authority`. Record version is an explicit
30
+ parser discriminator, not another independently evolving project version axis.
31
+ Malformed v2 records missing version/policy/authority fail validation; project-bound
32
+ readers also reject v1 records in projects declaring knowledge v2. Pure serializers
33
+ have no project identity. Project-bound storage operations retain the Foundation's
34
+ newer-project/newer-knowledge barrier.
35
+
36
+ ## Authority and trust boundary
37
+
38
+ Authority values: `legacy_inherited`, `inferred`, `imported`, `explicit_user`,
39
+ `reviewed`. They classify the provenance basis of a policy, not confidence, priority,
40
+ or proof of authorization. Evidence stays in existing `evidence`, `sourceSessions`,
41
+ `derivedFrom` and relationship fields; no second evidence system was added.
42
+
43
+ No Phase 1A conversational, Sync or transformation writer grants explicit_user or
44
+ reviewed merely from agent assertions, user_instruction evidence, or publication
45
+ approval. Existing creation behavior uses inferred; imports use imported. Trusted
46
+ canonical input can represent stronger classifications, but consumers must not treat
47
+ that string as authenticated user intent. Phase 1B must establish the actual grant
48
+ boundary. Remember still creates required instructions as before, with conservative
49
+ inferred authority. This is intentional compatibility, not a completed safety model.
50
+
51
+ ## Mechanical migration and recovery
52
+
53
+ Every canonical record in both memory layers and both monthly archives is converted,
54
+ including historical/disputed records. Instructions become required; every other
55
+ category becomes relevant, including critical decisions. All migrated authority is
56
+ legacy_inherited. No model, content heuristics, scope inference or reclassification
57
+ runs. Modern frontmatter receives only structural metadata; bodies and unrelated
58
+ metadata are preserved. Legacy unstructured Markdown receives canonical defaults
59
+ matching its compatibility reader. The converter checks complete parsed-record
60
+ identity apart from the schema discriminator. Checkpoint preimages remain historical
61
+ evidence, not live canonical records, and are not rewritten.
62
+
63
+ Foundation planning/approval, full backup, staging, validation, cache rebuild,
64
+ journal, config-last commit, history and rollback are reused. Versions advance only
65
+ after staged v2 validates. Recovery restores preimages then retries. Current checks
66
+ are no-ops. The release's previous Foundation runtime rejects knowledge 2 at storage;
67
+ pre-Foundation runtimes reject project 6. This cannot protect arbitrary external
68
+ editors that bypass Prodero's storage contract.
69
+
70
+ ## Readers, writers, retrieval and contracts
71
+
72
+ The v1 compatibility reader alone derives policy from category. Normal v2 parsing
73
+ uses explicit metadata. The transitional draft creation adapter preserves existing
74
+ writer defaults until Phase 1B; its fallback never applies to parsed v2 records.
75
+ Render/read/edit/archive/publication preserve policy and authority. Same-category
76
+ replacements inherit source policy; mixed policies cannot be silently consolidated.
77
+ Instruction optimization groups by policy/authority as well as existing boundaries.
78
+
79
+ Prepare and Bootstrap share policy-based required applicability. Scope matching,
80
+ ranking, overflow, token budgets and item limits are unchanged. The Markdown router's
81
+ Required section now uses policy rather than global importance. Genuine instruction
82
+ category behavior remains in consolidation, protected merge checks, candidate
83
+ lifecycle, instruction editing/optimization, importer classification and category
84
+ filters. These are not globally replaced with policy checks.
85
+
86
+ MemoryIndex format 9 stores policy and authority, invalidating old disposable caches.
87
+ Canonical Markdown remains authoritative. Snapshot JSON retains canonical fields.
88
+ MCP exposes contextPolicy/authority on canonical records and summaries. The temporary
89
+ instruction `enforcement` alias is derived exclusively from contextPolicy; `kind`
90
+ continues to describe instruction category. Neither alias is canonical on disk.
91
+ Bootstrap's alias is required because that collection contains required records only.
92
+
93
+ Open/Prepare use the Foundation's temporary Knowledge update available view. The
94
+ same approved Core action is available through UI, chat/text and CLI; no shell is
95
+ needed. UI resumes the original tool call; text returns exact resumable arguments.
96
+ After migration normal views are unchanged; legacy authority is not added as a badge.
97
+ No new policy editor or promotion authorization surface is introduced.
98
+
99
+ ## Validation evidence
100
+
101
+ Permanent tests use synthetic records plus focused round trips, malformed data, historical migration,
102
+ selectors, cache deletion/rebuild, maintenance, publication, replacement, text resume,
103
+ older-runtime barriers, failure injection and interrupted production migration.
104
+ Foundation tests continue to cover UI approval, progress/resume, newer project
105
+ schemas, plan immutability and ordered synthetic future migrations.
106
+
107
+ ## Phase 1B escalation paths (historical Phase 1A audit)
108
+
109
+ These paths are now governed by [Knowledge authority](KNOWLEDGE-AUTHORITY.md).
110
+ The following describes the Phase 1A baseline, not current runtime permissions.
111
+
112
+ The following still require authority/intent enforcement, intentionally unchanged:
113
+
114
+ - Remember `kind: rule` and replacements: agent-supplied assertions of user intent.
115
+ - Session observations with `categoryHint: instruction` and deterministic Sync.
116
+ - Assisted distillation/reconciliation and audit-created instruction candidates.
117
+ - Memory Transformation/lifecycle creation that changes category into instruction.
118
+ - Import source classification (including must/should/use/run rules) and apply paths.
119
+ - Trusted direct Core draft writers, canonical manual edits, and future promotion APIs.
120
+ - Policy changes across explicit supersession/reclassification boundaries; publication
121
+ approval must remain distinct from approval to establish mandatory authority.
122
+
123
+ Global instruction candidates remain pending, and skill/instruction candidate review
124
+ retains its current checks. Phase 1A adds metadata preservation, not a claim that all
125
+ escalation routes are authorized. No applicability redesign, corpus cleanup, lexical
126
+ reclassification, new required categories, budgets/item-limit changes, evidence
127
+ verification, policy editor or complete authorization system is included.
128
+
129
+ ## Implementation map
130
+
131
+ - `core/knowledge-policy.ts`: supported combinations, strict policy validation,
132
+ compatibility draft adapter and policy-preserving replacement helper.
133
+ - `core/knowledge-migration.ts`, `core/migrations.ts`: production registry step,
134
+ current/archive traversal and mechanical equivalence validation.
135
+ - `core/memory.ts`, `core/types.ts`, `core/memory-index.ts`: canonical persistence,
136
+ compatibility parsing, shared model and disposable index format 9.
137
+ - `core/bootstrap.ts`, `core/context.ts`, `core/index.ts`: mandatory selection and
138
+ Required router labeling. No selection caps or applicability changes.
139
+ - `core/consolidation.ts`, `core/knowledge-engine.ts`, `core/knowledge-lifecycle.ts`,
140
+ `core/promotion.ts`, `core/instruction-review.ts`: writer/merge preservation.
141
+ - `core/imports.ts`: explicit imported classification with existing category logic.
142
+ - `core/knowledge-provenance.ts`, `core/memory-transformation-bundle.ts`,
143
+ `core/skill-curation.ts`, `core/sync-transaction.ts`: project-aware validation at
144
+ additional read/write boundaries.
145
+ - `test/knowledge-policy-v2.test.mjs`: focused production migration and v2 regressions.
146
+ Existing migration, project, scope and update tests use explicit format fixtures.
147
+
148
+ All paths above are relative to `src/` except the test path. The existing MCP server,
149
+ presentation model, UI handlers and CLI migration actions delegate to the same Core
150
+ engine; Phase 1A does not fork those implementations.
@@ -0,0 +1,99 @@
1
+ # Migration Foundation
2
+
3
+ ## Audit and reused mechanisms
4
+
5
+ Before this change, `core/migrations.ts` provided ordered project migrations 1→5,
6
+ canonical validation, backups, a recovery journal, cache invalidation, and rollback.
7
+ `storage.ts` rejected newer project schemas, checked paths/symlinks, and wrote files
8
+ with same-directory rename. `sync-transaction.ts` provided a shared process lock,
9
+ stale-owner recovery, and a separate Sync preimage journal. Initialization and Prepare
10
+ automatically migrated. Open loaded memory without first presenting compatibility.
11
+ MemoryIndex, session index and graph have disposable cache formats; config uses a
12
+ passthrough validator. MCP UI and text already share presentation contracts.
13
+
14
+ This extends that migration engine; there is no second conversion or lock system.
15
+
16
+ ## Versions and registries
17
+
18
+ `.prodero/config.json` is authoritative: `schemaVersion` describes project structure;
19
+ `knowledgeSchemaVersion` describes canonical knowledge. Missing knowledge version
20
+ means legacy format 1. Runtime targets come from `prodero.release.json`.
21
+ Project transition 5→6 only records knowledge version 1. It preserves record bytes.
22
+ The project bump also fences older, pre-foundation runtimes supporting only schema 5.
23
+ No sessions/skills/config version axes are introduced.
24
+ Project transition 6→7 refreshes the managed AGENTS.md block for text-only skill
25
+ execution. Open/Prepare use the existing update review. The migration snapshots
26
+ AGENTS.md, preserves text outside the managed block, commits it before the project
27
+ version, and restores it on failure without overwriting concurrent user edits.
28
+ Project transition 7→8 replaces the embedded block with a three-line reference to
29
+ `prodero_instructions_read`. This text-only MCP tool reads `instructions/AGENTS.md`
30
+ from its own installation, so dev/package switching needs no project edits. This is a one-time
31
+ project migration using the same approval, backup and rollback flow. Subsequent
32
+ instruction-only updates replace the packaged document and need no project schema
33
+ bump or edits to consumer repositories. Project/knowledge format changes still
34
+ require migrations.
35
+
36
+ `MIGRATIONS` and `KNOWLEDGE_MIGRATIONS` contain adjacent transitions. Descriptors
37
+ carry class, description, affected stores, transform and optional validation.
38
+ Classes are structural, compatible-semantic and review-required. The latter is
39
+ blocked until a migration-specific review resolver exists; `approved:true` never
40
+ substitutes for semantic decisions. The knowledge registry contains the ordered compatible-semantic `knowledge-policy-1-2` and `knowledge-applicability-2-3` transitions. The current target is knowledge schema 3; see [Knowledge Schema v2](KNOWLEDGE-SCHEMA-V2.md) and [Applicability](APPLICABILITY.md).
41
+
42
+ ## Planning, approval and continuation
43
+
44
+ `planProjectMigration` reads metadata without creating directories, sessions, caches
45
+ or recovering journals. It reports targets, ordered steps, backup policy, safety,
46
+ review/block state, runtime identity and a metadata/registry plan hash.
47
+ `applyProjectMigration` requires explicit approval bound to that plan; it rechecks
48
+ under the shared writer lock. Current projects are idempotent no-ops.
49
+
50
+ Open, lightweight/detailed status and Prepare inspect this plan before reading
51
+ canonical knowledge. Current projects have no migration controls. Other states use
52
+ one Core plan and one view-model in UI/text. `prodero_migrate` is also exposed through
53
+ `prodero_text`. CLI `migrate status` plans; `migrate` is explicit approval to update
54
+ (or restore an interrupted update). Review-required steps remain blocked.
55
+
56
+ An interrupted Prepare returns a resumable request containing its exact original
57
+ arguments. Migration preserves this request. The App invokes the actual original
58
+ tool after success; text agents can immediately invoke the returned request. This
59
+ is not a durable host task scheduler: following a client restart, the agent must use
60
+ the model-visible request. No session is created before compatibility is resolved.
61
+
62
+ ## Transaction and recovery
63
+
64
+ The existing shared lock excludes Sync/session/migration writers. A validated full
65
+ backup includes config, indexes, both knowledge layers, archives, sessions, skills
66
+ and checkpoints. Backups are outside disposable caches. A journal references the
67
+ backup, its integrity digest and diagnostic history before transformation begins.
68
+ Transforms and each transition's validation run in a separate staged project.
69
+
70
+ Derived indexes are rebuilt against the target schema in staging. Commit installs
71
+ canonical data and rebuilt indexes using atomic individual file replacements under
72
+ the journal/read fence, then writes the new version last. Disposable cache stamps
73
+ are revalidated by the usual loaders at their installed paths. This is a recoverable
74
+ logical transaction, not an operating-system atomic directory swap. Failure restores
75
+ the validated backup and invalidates derived caches. Interrupted transactions roll
76
+ back deterministically before a new attempt. Backup corruption blocks recovery;
77
+ Prodero never guesses missing preimages. Legacy v1 journals remain recoverable.
78
+ Partial backup creation cannot change canonical data; orphan backups may be retained.
79
+ History under `.prodero/.migrations` records IDs, versions, runtime, times, status and
80
+ backup reference. These ignored diagnostic files are not schema authority.
81
+
82
+ ## Knowledge format 2
83
+
84
+ Phase 1A registers knowledge 1→2 and makes explicit policy and conservative authority
85
+ canonical. Existing instruction behavior is preserved mechanically. See
86
+ [Knowledge Schema v2](KNOWLEDGE-SCHEMA-V2.md) for the schema and trust boundary.
87
+ Foundation runtimes reject newer knowledge versions at the common storage barrier;
88
+ pre-foundation runtimes reject project schema 6. UI metadata diagnostics remain
89
+ available without interpreting newer knowledge. Direct low-level serializers are
90
+ not project-bound storage APIs.
91
+
92
+ ## Boundaries
93
+
94
+ Recovery is rollback-and-retry, not arbitrary user rollback after later writes.
95
+ Backups are local recovery copies, not an off-machine disaster-recovery service.
96
+ No power-loss/fsync durability guarantee beyond the existing filesystem primitives
97
+ is added. External tools editing `.prodero` outside Prodero's lock are unsupported.
98
+ No global project registry, bulk migration or backup retention policy is provided.
99
+ Migration review is distinct from the curation review workflow.
@@ -0,0 +1,28 @@
1
+ # Privacy and local storage
2
+
3
+ ## v0.1 agent and Git trust model
4
+
5
+ v0.1 trust model: Local Knowledge is Git-ignored working state, not a security boundary against the connected agent. Versioned Knowledge is Git-shareable project state; the agent may create, promote and maintain it. Review/preview/approval steps are workflow safeguards, not authenticated human authorization; `approved:true` does not prove human consent. Curator does not commit or push. Users must review repository changes before committing or pushing.
6
+
7
+ The connected agent can read both layers and can supply the approval arguments itself. Exact hashes, revision checks, App-only visibility and reviewed-plan flags check workflow consistency; they do not authenticate a person. This applies equally to UI, text and generic/plugin dispatch. Do not store information here on the assumption that the agent cannot place it in Git-shareable files.
8
+
9
+ ## Storage and retention
10
+
11
+ Prodero canonical knowledge is plaintext local/project storage. Git-ignore rules keep normal learning out of new commits; they are not access control or encryption. Anyone who can read your working tree, filesystem backups or Git history may be able to read its contents.
12
+
13
+ - Local memories, inferred skill candidates and dismissed proposals live under `.prodero/local/`. Sessions and checkpoints are also ignored. These are durable data, not disposable cache.
14
+ - Runtime setup installs directory-wide Git exclusions for `local/`, `sessions/`, `checkpoints/`, `.cache/`, `.transactions/`, `.backups/` and `.migrations/` before creating runtime state. These cover interrupted writes and unknown filenames, with only the root `sessions/.gitkeep` and `checkpoints/.gitkeep` placeholders allowed. Atomic `*.tmp-*` files anywhere under `.prodero/` are also ignored. Existing user ignore rules and files are retained; ignore rules do not untrack files already in Git or prevent deliberate force-adds/ignore overrides.
15
+ - On POSIX platforms, Curator creates managed private directories with `0700` and files with `0600`, including atomic scratch files, Local knowledge/skills, sessions, checkpoints, caches, reviews/reasoning, transactions and migration recovery copies. Runtime setup tightens existing private store roots; checked access tightens the addressed private path, without recursively changing unrelated children. Dormant legacy files can retain old modes behind an owner-only parent until accessed. Linked files and other owners' inodes are not chmod targets; inability to enforce permissions fails the operation. Versioned files retain ordinary repository permissions. On Windows, POSIX chmod is skipped and native filesystem ACLs/inheritance apply; no owner-only Windows ACL guarantee is claimed. These modes are not encryption or a boundary against the same OS user, the connected agent or administrators.
16
+ - Versioned Knowledge lives in `.prodero/memory/`; explicitly created, promoted or imported skills live in `.prodero/skills/` (including legacy candidates). These are Git-shareable working-tree files, not necessarily committed or pushed. Normal session learning produces Local Knowledge; promotion, maintenance, skill creation, imports and selected Sync operations can change Versioned state.
17
+ - Ordinary `forget` retires Local Knowledge. It rejects Versioned Knowledge and asks for explicit repository maintenance. **Forget is not secure erase**: historical records, source sessions, checkpoints, recovery journals/backups, filesystem backups and Git history may retain content. Retiring a local superseder can make the unchanged versioned record relevant again.
18
+ - Secret screening rejects high-confidence credential patterns before normal memory/session/skill writes, publication and optional provider calls. Diagnostics omit the detected value. Obvious placeholders and environment-variable examples are supported. Detection is conservative, can reject legitimate examples, and is **not a universal DLP guarantee**. Do not enter credentials into Prodero. Manually edited or older unsafe canonical content is rejected when read; it is not silently deleted or scrubbed.
19
+ - Optional host sampling sends selected project content to the host/model for consolidation, promotion or skill curation. The adapter requests no additional host context, but the host/model's retention and privacy policies apply. Deterministic mode does not use this sampling path. MCP context/search results intentionally deliver selected knowledge to the calling agent, whose own policies also apply.
20
+ - Installed executable `.cjs` plugins are trusted local code, not a security sandbox. They may have the process's filesystem/network capabilities. Review plugins before installation; core screening cannot constrain arbitrary plugin behavior or another process editing the files.
21
+
22
+ If a real credential was stored, revoke or rotate it with its issuer. Review canonical data, recovery copies and publication history before deciding what to remove. Deleting `.cache/` or calling `forget` alone does not resolve an exposure. Prodero does not rewrite Git history automatically.
23
+
24
+ ## Import integrity hashing
25
+
26
+ Importer semantic ingestion retains its bounded text selection and common secret screening. Integrity digests additionally hash eligible ordinary files outside that selection to detect unrelated edits, but exclude recognized sensitive paths, private Curator runtime trees and Git-ignored files. An explicitly selected, screened Git-ignored legacy document can still participate as exact evidence, independently of tree hashing. Internal canonical-state integrity includes Local memory/skills/archive, sessions and checkpoints to protect concurrent-change and receipt checks; reviews, caches, transactions and backups are outside that snapshot.
27
+
28
+ Digest/snapshot passes have hard count, byte, depth, entry and time bounds and stream content instead of buffering whole files. This is not complete DLP: content-only credentials in ordinary eligible filenames can be read while hashing, and Git consults configuration/ignore metadata. No claim is made about unchanged excluded files. See [the detailed importer contract](../plugins/migrate_ai_studio/README.md#integrity-scope-and-limits-plugin-170).
@@ -0,0 +1,56 @@
1
+ # Storage recovery
2
+
3
+ Canonical knowledge, sessions, skills and checkpoints are durable project data. Normal learning and inferred proposals remain in ignored storage; the promotion review workflow writes Git-shareable Versioned Knowledge. Review/approval is a workflow safeguard, not human authentication; Curator does not commit or push. See [Privacy](PRIVACY.md).
4
+
5
+ | Location | Role | Safe to delete as cache? |
6
+ | --- | --- | --- |
7
+ | `.prodero/memory/`, `local/memory/`, `sessions/`, `skills/`, `local/skills/`, `checkpoints/`, `config.json` | Canonical data | No |
8
+ | `.prodero/.cache/` | Rebuildable memory/session indexes and graph | Yes, after old-runtime migration backups have been relocated as described below |
9
+ | `.prodero/index.md`, `local/index.md` | Generated routers | Rebuildable; root router may include Local skill metadata. This repository ignores it; inspect other projects before sharing |
10
+ | `.prodero/.transactions/` | Writer lock, pending Sync/migration journal | No |
11
+ | `.prodero/.backups/` | Migration recovery snapshots, excluded by root rules and its own `.gitignore` | No |
12
+ | `.prodero/.migrations/` | Migration history, excluded by root rules and its own `.gitignore` | No |
13
+
14
+ A clone or worktree normally has no ignored `local/` or `.cache/`. Prodero recreates missing runtime directories without rewriting tracked placeholders. It does not reconstruct lost Local Knowledge: deleting `local/` from an existing working tree deletes canonical local data, not a cache.
15
+
16
+ Runtime setup also upgrades missing Git-ignore rules in existing projects before new runtime writes. Sessions/checkpoints are excluded by directory contents, not filename extensions, while their root `.gitkeep` placeholders remain trackable. Atomic and interrupted-write remnants stay ignored, including `*.tmp-*` beside Versioned files. This does not delete recovery artifacts, change atomic-write/recovery behavior, or untrack existing user files.
17
+
18
+ ## Invalid canonical files
19
+
20
+ LF and CRLF are supported. Modern knowledge, session and skill metadata is validated, including IDs, lifecycle state and timestamps. Unknown statuses, stripped modern metadata, invalid configuration and malformed checkpoints produce file-oriented diagnostics instead of active defaults. Deliberately supported legacy Markdown remains readable; old date-ID `checkpoint-ready` sessions are recognized explicitly. Files are not silently repaired or rewritten merely because they were read.
21
+
22
+ Correct a damaged canonical file from Git or a known backup after stopping writers. Do not remove it as a cache fix. Prodero rejects symlinks in its storage paths and IDs that could escape their directory; replace unintended links with the intended ordinary directories only after inspecting them.
23
+
24
+ ## Interrupted Sync
25
+
26
+ Both deterministic and assisted Sync validate a complete write plan, persist `.transactions/pending.json`, then apply atomic file replacements with the immutable checkpoint last. The next Sync recovers that journal before processing more evidence. `prepare` runs this recovery through automatic Sync. A crash after the checkpoint but before journal cleanup is also recoverable and does not process the same snapshot twice.
27
+
28
+ To recover, keep `.transactions/` and canonical files intact, stop competing writers, and run `prodero sync-sessions --root=/absolute/project` or ask the agent to prepare the project. Missing or structurally invalid cache entries rebuild from canonical data. Deleting `.cache/` does not delete the Sync journal.
29
+
30
+ If a canonical file was independently edited after the journal was prepared, recovery stops with the affected path and preserves the journal. Inspect the file and its journal before/after hashes; restore the intended preimage or already-applied result before retrying. Never discard the journal merely to clear an error.
31
+
32
+ ## Interrupted migration
33
+
34
+ Migrations use the same per-worktree writer exclusion as Sync and session writes. All supported migration steps and canonical input are checked before applying a migration; each attempt has a complete recovery snapshot. The schema is written only after the steps, post-validation and cache invalidation succeed.
35
+
36
+ Backups now live under `.prodero/.backups/schema-<version>-<id>/`. Existing `.cache/migration-backups/` from older runtimes are relocated into `.backups/legacy-cache-<id>/` when initialization/preparation/migration next accesses the project. Run one of those operations with the hardened runtime before deleting an old runtime's cache if it contains recovery backups.
37
+
38
+ A failed migration restores its snapshot and reports its backup path. A process interruption retains `.transactions/migration.json`. Open and Prepare present a recovery action before normal work. Approving recovery restores the snapshot; the next plan offers the update again. Explicit CLI initialization retains its legacy recovery behavior. This also handles a rollback interrupted while restoring `config.json`. New session writes fail explicitly while a migration recovery journal remains, so a later rollback cannot erase an acknowledged observation.
39
+
40
+ If automatic restoration fails, stop all Prodero writers and retain both the journal and its referenced backup. Restore the snapshot's `config.json`, `index.md`, `memory/`, `local/`, `sessions/`, `skills/`, `archive/` and `checkpoints/` together, preserving their original presence/absence. Do not mix snapshots. Verify the result before clearing the migration marker and retrying. Never copy an uninspected or symlinked backup over project data.
41
+
42
+ ## Concurrency and limits
43
+
44
+ Session creation, record and close share a filesystem lock across processes. Session mutations wait up to five seconds for a writer; a timeout reports failure, never success. Acknowledged observations remain in the file, and a closed session cannot be reopened by a late record. An empty repeated close remains successful; repeated close with nonempty final entries is explicitly rejected, so callers should inspect the session after an uncertain response rather than replay that final batch blindly.
45
+
46
+ A dead PID owner can be reclaimed. An ownerless/invalid lock or interrupted lock-recovery guard fails conservatively: after stopping all writers, inspect `.transactions/lock` and `.transactions/lock-recovery` before removing stale lock directories. PID reuse is intentionally handled conservatively rather than risking deletion of a live owner's lock.
47
+
48
+ These guarantees are verified with local filesystem process-crash, injected I/O-error and multiprocess tests. They do not provide a multi-file snapshot to unrelated readers while a journal is being applied, nor protection against hostile processes replacing the directory topology during filesystem operations. Network filesystems and sudden hardware/power loss have not been certified. Do not edit storage concurrently with migration/recovery.
49
+
50
+ Migration Foundation adds independent knowledge compatibility, staged transforms, backup integrity, diagnostic history and resumable Open/Prepare actions. See [Migration Foundation](MIGRATIONS.md).
51
+
52
+ ### Private recovery permissions
53
+
54
+ On POSIX platforms, new migration backups, staging trees, history, transaction journals and locks use owner-only directories (`0700`) and files (`0600`), including interrupted-write artifacts. Runtime setup tightens existing private store roots without recursively chmod-ing their children; existing files are tightened when checked/accessed or replaced. Do not interpret this as a historical cleanup or ACL audit. Symlinks, multiply linked files and another owner's data are not permission-repair targets.
55
+
56
+ Migration backups preserve shared-file mode metadata separately from their private content copies. Successful commits preserve existing shared target modes; rollback restores saved shared modes (older backups use their original source modes). Versioned stores are not made private merely because they passed through staging. Curation simulations live beneath the private, ignored `.cache` tree and are removed by the normal simulation cleanup. Windows uses native ACL behavior rather than POSIX chmod.
@@ -0,0 +1,40 @@
1
+ # Release candidate gate
2
+
3
+ From a clean checkout on Node 22.14+ (22.x):
4
+
5
+ ```sh
6
+ npm run release:gate
7
+ ```
8
+
9
+ The gate copies tracked working files plus non-ignored new files into a clean temporary checkout (never node_modules/dist), runs `npm ci`, build, tests, pack, then installs the tarball into a separate prefix with production dependencies only. Its standalone runner resolves SDK dependencies from that installation. CLI, stdio MCP, bundled resources, the knowledge lifecycle, Git boundaries, restart and synthetic manual upgrade preservation are checked. `npm test` rebuilds first; ordinary `npm pack` runs the full tests through prepack. The gate's pack skips lifecycle scripts only after its build/tests have passed.
10
+
11
+ For host-integration verification, use a fresh temporary directory outside the real user home, an isolated HOME and Codex/Claude/XDG configuration, and no inherited host registrations. Keep custom `PRODERO_GATE_OUTPUT` paths outside real-home ancestry: normal workspace checks inspect ancestors and can correctly report `HOST_SCOPE_CONFLICT`. Never disable those checks or alter real settings to make a smoke test pass.
12
+
13
+ CI allows 45 minutes per matrix job. Child-command output is streamed to the console and written continuously to evidence logs, so cancellation retains partial test diagnostics. The limit remains finite; a timeout is not a passing check.
14
+
15
+ Gate outputs and the tarball remain in the printed temporary directory for inspection. Nothing is published. CI repeats the gate on macOS/Ubuntu and the declared minimum/latest Node 22. Remote CI results must actually pass before those targets are certified.
16
+
17
+ A protocol runner is not a real host. Independently connect a primary host to the **installed artifact** in a synthetic Git project, run open/init/prepare/record/close/next prepare/remember/search/edit/restart, inspect tool results and Git status, and record host/runtime/artifact versions. Review promotion outcomes and approve only the intended synthetic fixture publication. Apps rendering needs its own host check.
18
+
19
+ ## Install the artifact for review
20
+
21
+ Before the first npm publication, install the generated tarball instead of a registry release:
22
+
23
+ ```sh
24
+ npm install --global /absolute/path/prodero-curator-0.1.0.tgz
25
+ prodero install
26
+ ```
27
+
28
+ Use the isolated host environment described above for automated verification. For a deliberate real-host check, review the installer’s configuration changes and restart the selected coding agent. Open a synthetic project and type `prodero`. The tarball includes the compiled server, Apps and plugin resources; no source checkout or development dependencies are needed.
29
+
30
+ ## Final human publication checklist
31
+
32
+ 1. Independently audit the RC, review diffs, run the full gate on the exact committed tree and obtain green declared CI matrix runs. Record artifact SHA-256 and primary-host evidence.
33
+ 2. Review the intended public Git tree **and history** for private content. Ignoring runtime files today does not remove old commits. Decide explicitly what history to publish; never rewrite it automatically.
34
+ 3. Confirm ownership of npm scope `@prodero`, package/repository identity `@prodero/curator` / `prodero/curator`, and permission to release. A registry 404 does not establish scope ownership.
35
+ 4. Create/configure the intended public repository only with explicit approval. Enable Issues and private vulnerability reporting; verify the links and update any identity/channel changes in docs and package metadata.
36
+ 5. Confirm version `0.1.0`, MIT license, changelog date, preview limitations and exact artifact contents. Obtain explicit approval for publication.
37
+ 6. Authenticate npm with the account's required 2FA/provenance policy. Publish the **reviewed tarball**, not an unreviewed rebuild: `npm publish /absolute/path/prodero-curator-0.1.0.tgz --access public`.
38
+ 7. Verify external `npm install --global @prodero/curator@0.1.0`, `prodero --version` and `prodero check-update`. Only with separate approval create/push the `v0.1.0` tag and release notes or announcements.
39
+
40
+ The automated gate does not publish or push and does not change the source repository history. It creates an isolated disposable test commit in its temporary checkout. Package upgrades do not move project knowledge. Back up the full `.prodero` directory before preview upgrades; `.cache` is disposable, migration recovery backups are not.