greplica 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 (115) hide show
  1. package/README.md +177 -0
  2. package/dist/apps/cli/main.d.ts +2 -0
  3. package/dist/apps/cli/main.js +404 -0
  4. package/dist/apps/cli/main.js.map +1 -0
  5. package/dist/apps/cli/repo-context.d.ts +2 -0
  6. package/dist/apps/cli/repo-context.js +58 -0
  7. package/dist/apps/cli/repo-context.js.map +1 -0
  8. package/dist/libs/agent-runner/codex.d.ts +2 -0
  9. package/dist/libs/agent-runner/codex.js +53 -0
  10. package/dist/libs/agent-runner/codex.js.map +1 -0
  11. package/dist/libs/agent-runner/metrics.d.ts +10 -0
  12. package/dist/libs/agent-runner/metrics.js +72 -0
  13. package/dist/libs/agent-runner/metrics.js.map +1 -0
  14. package/dist/libs/agent-runner/types.d.ts +23 -0
  15. package/dist/libs/agent-runner/types.js +2 -0
  16. package/dist/libs/agent-runner/types.js.map +1 -0
  17. package/dist/libs/config/greplica-config.d.ts +24 -0
  18. package/dist/libs/config/greplica-config.js +121 -0
  19. package/dist/libs/config/greplica-config.js.map +1 -0
  20. package/dist/libs/config/greplica-home.d.ts +1 -0
  21. package/dist/libs/config/greplica-home.js +6 -0
  22. package/dist/libs/config/greplica-home.js.map +1 -0
  23. package/dist/libs/env/load-local-env.d.ts +19 -0
  24. package/dist/libs/env/load-local-env.js +69 -0
  25. package/dist/libs/env/load-local-env.js.map +1 -0
  26. package/dist/libs/install/edit-marked-section.d.ts +1 -0
  27. package/dist/libs/install/edit-marked-section.js +22 -0
  28. package/dist/libs/install/edit-marked-section.js.map +1 -0
  29. package/dist/libs/install/install.d.ts +18 -0
  30. package/dist/libs/install/install.js +80 -0
  31. package/dist/libs/install/install.js.map +1 -0
  32. package/dist/libs/install/instruction-blocks.d.ts +1 -0
  33. package/dist/libs/install/instruction-blocks.js +13 -0
  34. package/dist/libs/install/instruction-blocks.js.map +1 -0
  35. package/dist/libs/install/paths.d.ts +12 -0
  36. package/dist/libs/install/paths.js +31 -0
  37. package/dist/libs/install/paths.js.map +1 -0
  38. package/dist/libs/knowledge-graph/claim.d.ts +11 -0
  39. package/dist/libs/knowledge-graph/claim.js +2 -0
  40. package/dist/libs/knowledge-graph/claim.js.map +1 -0
  41. package/dist/libs/knowledge-graph/commit.d.ts +10 -0
  42. package/dist/libs/knowledge-graph/commit.js +2 -0
  43. package/dist/libs/knowledge-graph/commit.js.map +1 -0
  44. package/dist/libs/knowledge-graph/edge.d.ts +13 -0
  45. package/dist/libs/knowledge-graph/edge.js +17 -0
  46. package/dist/libs/knowledge-graph/edge.js.map +1 -0
  47. package/dist/libs/knowledge-graph/folder-export.d.ts +6 -0
  48. package/dist/libs/knowledge-graph/folder-export.js +337 -0
  49. package/dist/libs/knowledge-graph/folder-export.js.map +1 -0
  50. package/dist/libs/knowledge-graph/graph-context/bm25.d.ts +9 -0
  51. package/dist/libs/knowledge-graph/graph-context/bm25.js +62 -0
  52. package/dist/libs/knowledge-graph/graph-context/bm25.js.map +1 -0
  53. package/dist/libs/knowledge-graph/graph-context/config.d.ts +39 -0
  54. package/dist/libs/knowledge-graph/graph-context/config.js +48 -0
  55. package/dist/libs/knowledge-graph/graph-context/config.js.map +1 -0
  56. package/dist/libs/knowledge-graph/graph-context/context-builder.d.ts +18 -0
  57. package/dist/libs/knowledge-graph/graph-context/context-builder.js +276 -0
  58. package/dist/libs/knowledge-graph/graph-context/context-builder.js.map +1 -0
  59. package/dist/libs/knowledge-graph/graph-context/documents.d.ts +20 -0
  60. package/dist/libs/knowledge-graph/graph-context/documents.js +81 -0
  61. package/dist/libs/knowledge-graph/graph-context/documents.js.map +1 -0
  62. package/dist/libs/knowledge-graph/graph-context/embedder.d.ts +6 -0
  63. package/dist/libs/knowledge-graph/graph-context/embedder.js +8 -0
  64. package/dist/libs/knowledge-graph/graph-context/embedder.js.map +1 -0
  65. package/dist/libs/knowledge-graph/graph-context/exact.d.ts +3 -0
  66. package/dist/libs/knowledge-graph/graph-context/exact.js +37 -0
  67. package/dist/libs/knowledge-graph/graph-context/exact.js.map +1 -0
  68. package/dist/libs/knowledge-graph/graph-context/local-embedder.d.ts +13 -0
  69. package/dist/libs/knowledge-graph/graph-context/local-embedder.js +74 -0
  70. package/dist/libs/knowledge-graph/graph-context/local-embedder.js.map +1 -0
  71. package/dist/libs/knowledge-graph/graph-context/openai-embedder.d.ts +14 -0
  72. package/dist/libs/knowledge-graph/graph-context/openai-embedder.js +59 -0
  73. package/dist/libs/knowledge-graph/graph-context/openai-embedder.js.map +1 -0
  74. package/dist/libs/knowledge-graph/graph-context/rank.d.ts +16 -0
  75. package/dist/libs/knowledge-graph/graph-context/rank.js +52 -0
  76. package/dist/libs/knowledge-graph/graph-context/rank.js.map +1 -0
  77. package/dist/libs/knowledge-graph/graph-context/render.d.ts +38 -0
  78. package/dist/libs/knowledge-graph/graph-context/render.js +114 -0
  79. package/dist/libs/knowledge-graph/graph-context/render.js.map +1 -0
  80. package/dist/libs/knowledge-graph/graph-context/types.d.ts +58 -0
  81. package/dist/libs/knowledge-graph/graph-context/types.js +2 -0
  82. package/dist/libs/knowledge-graph/graph-context/types.js.map +1 -0
  83. package/dist/libs/knowledge-graph/graph-context/vector.d.ts +3 -0
  84. package/dist/libs/knowledge-graph/graph-context/vector.js +25 -0
  85. package/dist/libs/knowledge-graph/graph-context/vector.js.map +1 -0
  86. package/dist/libs/knowledge-graph/proposal.d.ts +65 -0
  87. package/dist/libs/knowledge-graph/proposal.js +135 -0
  88. package/dist/libs/knowledge-graph/proposal.js.map +1 -0
  89. package/dist/libs/knowledge-graph/schema.d.ts +32 -0
  90. package/dist/libs/knowledge-graph/schema.js +2 -0
  91. package/dist/libs/knowledge-graph/schema.js.map +1 -0
  92. package/dist/libs/knowledge-graph/scope.d.ts +16 -0
  93. package/dist/libs/knowledge-graph/scope.js +2 -0
  94. package/dist/libs/knowledge-graph/scope.js.map +1 -0
  95. package/dist/libs/knowledge-graph/service.d.ts +54 -0
  96. package/dist/libs/knowledge-graph/service.js +89 -0
  97. package/dist/libs/knowledge-graph/service.js.map +1 -0
  98. package/dist/libs/knowledge-graph/validate-proposal.d.ts +9 -0
  99. package/dist/libs/knowledge-graph/validate-proposal.js +166 -0
  100. package/dist/libs/knowledge-graph/validate-proposal.js.map +1 -0
  101. package/dist/libs/storage/sqlite/db.d.ts +3 -0
  102. package/dist/libs/storage/sqlite/db.js +16 -0
  103. package/dist/libs/storage/sqlite/db.js.map +1 -0
  104. package/dist/libs/storage/sqlite/migrate.d.ts +2 -0
  105. package/dist/libs/storage/sqlite/migrate.js +56 -0
  106. package/dist/libs/storage/sqlite/migrate.js.map +1 -0
  107. package/dist/libs/storage/sqlite/repository.d.ts +95 -0
  108. package/dist/libs/storage/sqlite/repository.js +310 -0
  109. package/dist/libs/storage/sqlite/repository.js.map +1 -0
  110. package/dist/libs/storage/sqlite/schema.d.ts +1 -0
  111. package/dist/libs/storage/sqlite/schema.js +93 -0
  112. package/dist/libs/storage/sqlite/schema.js.map +1 -0
  113. package/package.json +37 -0
  114. package/skills/greplica-bootstrap/SKILL.md +116 -0
  115. package/skills/greplica-update-working-memory/SKILL.md +183 -0
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: greplica-bootstrap
3
+ description: Bootstrap Greplica memory for the current repository or folder. Use only when the user explicitly invokes greplica-bootstrap or asks to create initial engineering memory with the greplica CLI.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Bootstrap Greplica Memory
8
+
9
+ Create shallow, high-signal Greplica memory for the current repository or folder.
10
+
11
+ ## Preconditions
12
+
13
+ Run from the target repository root, a subdirectory inside it, or a non-Git folder that should have its own memory.
14
+
15
+ Do not run `greplica doctor` as a routine preflight. Run the needed Greplica commands directly; if one fails, use the error to decide whether `greplica doctor` would help diagnose installation, target detection, or embedding-provider configuration.
16
+
17
+ If `greplica` is missing, tell the user to run the Greplica setup prompt from the README.
18
+
19
+ Local embeddings are the default and do not require `OPENAI_API_KEY`. If Greplica is configured for OpenAI and a command reports that `OPENAI_API_KEY` is missing, stop. Do not ask the user to paste the key into chat. Tell them to set it in their shell before launching the coding agent, or in target-root `.env.local`.
20
+
21
+ `greplica` automatically prepares memory state; do not ask the user to run a separate initialization command.
22
+
23
+ ## Inspect The Repo Shallowly
24
+
25
+ Read enough to orient a future coding agent:
26
+
27
+ - README and docs if present.
28
+ - package/config/build files.
29
+ - top-level tree.
30
+ - app/lib entrypoints.
31
+ - schema/type/model files that define durable concepts.
32
+ - bundled skill files such as `skills/*/SKILL.md`, when present.
33
+ - tests only when they clarify important behavior.
34
+ - existing memory with `greplica graph read`.
35
+
36
+ Do not perform a deep audit. Prefer major subsystems and human workflows over file-by-file or function-level memory.
37
+
38
+ When the repo has separate files for related responsibilities, keep them separate if that helps navigation. In particular:
39
+
40
+ - Do not collapse proposal normalization and proposal validation when they live in different files.
41
+ - Do not collapse persistent repository operations and database schema/open/migration code when they live in different files.
42
+ - Represent graph schema/type/model files as their own component when they define the memory model.
43
+ - Represent bundled agent skills as a component when the repo ships skills that guide important workflows.
44
+ - Add a dedicated flow for compact relationship fields becoming canonical graph edges when the repo supports compact proposal syntax.
45
+
46
+ ## Proposal Format
47
+
48
+ Write a JSON proposal to a temporary file:
49
+
50
+ ```json
51
+ {
52
+ "title": "Bootstrap repo memory",
53
+ "summary": "Top-level engineering memory for this repository.",
54
+ "creates": {
55
+ "components": [
56
+ {
57
+ "id": "component.example",
58
+ "name": "Example component",
59
+ "code_anchor": "src/example.ts"
60
+ }
61
+ ],
62
+ "flows": [
63
+ {
64
+ "id": "flow.example",
65
+ "name": "Example workflow",
66
+ "touches": ["component.example"]
67
+ }
68
+ ],
69
+ "claims": [
70
+ {
71
+ "id": "claim.example",
72
+ "kind": "fact",
73
+ "text": "Example component participates in Example workflow.",
74
+ "truth": "code_verified",
75
+ "intent": "unknown",
76
+ "about": ["component.example", "flow.example"]
77
+ }
78
+ ],
79
+ "sources": [],
80
+ "edges": []
81
+ }
82
+ }
83
+ ```
84
+
85
+ Allowed claim kinds: `fact`, `requirement`, `decision`, `task`, `question`, `risk`.
86
+ Allowed truth values: `code_verified`, `source_verified`, `unknown`.
87
+ Allowed intent values: `intended`, `accidental`, `unknown`.
88
+ Allowed source kinds: `session`.
89
+
90
+ Use compact relationship fields where possible:
91
+
92
+ - `flow.touches[]` for Flow -> Component.
93
+ - `component.contains[]` for Component -> Component.
94
+ - `flow.contains[]` for Flow -> Flow.
95
+ - `claim.about[]` for Claim -> Component/Flow.
96
+ - `claim.supersedes[]`, `component.supersedes[]`, or `flow.supersedes[]` only when replacing known existing memory.
97
+
98
+ Sources currently represent session artifacts. Do not create a source just because code was inspected during bootstrap.
99
+
100
+ ## Quality Bar
101
+
102
+ - Prefer roughly 4-10 major components for a small repo.
103
+ - Include major flows that help future agents decide where to look.
104
+ - Include claims that capture why the main modules matter, not just which commands exist.
105
+ - Capture boundary facts such as thin CLI wrappers, service boundaries, target detection, global source storage, and shallow bootstrap guidance when the inspected code or skill files support them.
106
+ - Use `code_verified` only for claims grounded in inspected code.
107
+ - Use `unknown` truth for unverified questions, risks, or tasks.
108
+ - Add open questions/tasks for important areas that need deeper inspection.
109
+ - Avoid noisy structure nodes, tiny helpers, private functions, and one claim per file.
110
+
111
+ ## Validate And Apply
112
+
113
+ 1. Run `greplica proposal validate <proposal-file>`.
114
+ 2. Fix validation errors until valid.
115
+ 3. Run `greplica proposal apply <proposal-file>`.
116
+ 4. Summarize what memory was created and mention the proposal file path if it still exists.
@@ -0,0 +1,183 @@
1
+ ---
2
+ name: greplica-update-working-memory
3
+ description: Update Greplica working memory from the current coding-agent session, recent code changes, and durable decisions. Use only when the user explicitly invokes greplica-update-working-memory or asks to update working memory.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Update Greplica Working Memory
8
+
9
+ Update working memory with durable information learned during this coding session.
10
+
11
+ ## Preconditions
12
+
13
+ Run from the target repository root, a subdirectory inside it, or a non-Git folder that should have its own memory.
14
+
15
+ Do not run `greplica doctor` as a routine preflight. Run the needed Greplica commands directly; if one fails, use the error to decide whether `greplica doctor` would help diagnose installation, target detection, or embedding-provider configuration.
16
+
17
+ If `greplica` is missing, tell the user to run the Greplica setup prompt from the README.
18
+
19
+ Local embeddings are the default and do not require `OPENAI_API_KEY`. If Greplica is configured for OpenAI and a command reports that `OPENAI_API_KEY` is missing, stop. Do not ask the user to paste the key into chat. Tell them to set it in their shell before launching the coding agent, or in target-root `.env.local`.
20
+
21
+ `greplica` automatically prepares memory state; do not ask the user to run a separate initialization command.
22
+
23
+ ## Gather Evidence
24
+
25
+ Use the current conversation/session context plus code evidence. Read:
26
+
27
+ - `git status --short`
28
+ - `git diff --stat`
29
+ - focused `git diff` for changed areas
30
+ - files touched by the session when needed to verify claims
31
+ - existing relevant memory with `greplica graph context "<task or changed area>"`
32
+
33
+ Use the current session as context, but verify durable code facts against files or diffs when possible.
34
+
35
+ When you have a transcript file, run this transcript extraction workflow before writing the proposal:
36
+
37
+ 1. Get the transcript line count, then read every line in chunks if needed.
38
+ 2. Build a candidate inventory from the transcript before relying on code diffs or final assistant summaries.
39
+ 3. Put candidates into buckets: code facts, flow facts, user constraints, rationale, trade-offs/rejected alternatives, negative decisions/do-not-do rules, deferred work/future work, drift, and eval/fixture/testing/process constraints.
40
+ 4. For each candidate, record the source line/message, intended memory role, and whether it should be code_verified, source_verified, unknown, or dropped.
41
+ 5. Drop only candidates that are transient, duplicate, unsupported, obvious from local code, or not useful to a future agent.
42
+ 6. Keep explicit user corrections, "do not" statements, "not built" statements, and eval/process constraints unless they are clearly transient.
43
+ 7. Write one focused claim per kept durable candidate. Do not merge candidates from different buckets into one broad claim.
44
+ 8. Before validating, review dropped candidates and re-add any durable session decision that would be hard to recover from code alone.
45
+
46
+ Prioritize user messages and final accepted decisions over assistant suggestions. Search around terms such as `source`, `evidence`, `session`, `reason`, `metadata`, `future`, `next`, `later`, `out of scope`, `not built`, `proposal`, `eval`, `fixture`, `rubric`, `wrong`, `reject`, `don't`, and `instead`.
47
+
48
+ When creating a session source, derive its identity from the actual session:
49
+
50
+ - If a transcript file is available, read its session metadata first. For Codex JSONL transcripts, use `session_meta.payload.id`; also use `session_meta.payload.source` or `session_meta.payload.originator` to identify the session kind when present.
51
+ - Build a stable source ID from that metadata, for example `source.codex_session.<session_id_slug>` or `source.claude_code_session.<session_id_slug>`. Slug the session ID by lowercasing it and replacing non-alphanumeric characters with `_`.
52
+ - Set `ref` to a stable reference such as `codex-session:<session-id>` or `claude-code-session:<session-id>`, and set `title` to a concise human-readable session title.
53
+ - Do not use generic IDs like `source.current_session` when a session ID or transcript identity is available.
54
+
55
+ Before writing the proposal, scan the session against this checklist:
56
+
57
+ - What code facts changed?
58
+ - What cross-component flows changed?
59
+ - What constraints did the user impose?
60
+ - What rationale explains why the code was shaped this way?
61
+ - What trade-offs or alternatives were discussed, rejected, or deferred?
62
+ - What drift did the implementation introduce without an explicit durable decision?
63
+ - What tasks remain?
64
+ - What future work was explicitly discussed?
65
+
66
+ Skip a category when the session has no clear evidence for it. Do not invent future work from implementation gaps; future work should be explicit in the session or clearly stated as a deferred part of the larger plan.
67
+
68
+ ## What To Store
69
+
70
+ Create memory for durable changes only:
71
+
72
+ - **Code facts**: specific implementation facts verified against code or diffs.
73
+ - **Flow facts**: how behavior works across multiple components or commands.
74
+ - **Constraints**: rules future agents must preserve while editing.
75
+ - **Rationale**: why a design exists when the reason is not obvious from code.
76
+ - **Trade-offs**: alternatives discussed, rejected, postponed, or intentionally kept out of scope.
77
+ - **Drift**: important behavior or design consequences that exist without a clear explicit decision.
78
+ - **Tasks**: next work that should be done.
79
+ - **Future work**: planned later capabilities or follow-up directions that should not be forgotten.
80
+
81
+ When existing memory is now too vague or stale, create a clearer claim with `supersedes[]` pointing at the old claim. In particular, look for old claims returned by `greplica graph context` that describe the changed area broadly but miss the new session nuance. A claim can be worth superseding even when the old text is not false, if it is now materially incomplete and future agents would be misled by leaving it active.
82
+
83
+ If a new claim materially narrows, qualifies, or corrects an existing claim returned by `greplica graph context`, encode that relationship with `supersedes[]`; do not rely on wording alone. Before validating, review the proposal for changed validation rules, compact relationship behavior, and workflow claims that should supersede older broad memory.
84
+
85
+ Do not store:
86
+
87
+ - temporary debugging chatter
88
+ - every implementation detail
89
+ - command logs
90
+ - secrets or environment variable values
91
+ - obvious local code facts that a future agent can read immediately
92
+ - claims based only on vague conversation unless marked `unknown`
93
+
94
+ Do not stop at patch-visible facts. Also extract non-obvious session nuance: why the code was shaped this way, what alternatives were rejected, what future work was deferred, and what implicit drift the implementation introduced.
95
+
96
+ Keep distinct durable memories distinct. "Small update" means no transcript junk or unnecessary implementation detail; it does not mean merging separate code facts, constraints, rationales, trade-offs, drift, tasks, and future work into one broad claim. If the session contains separate durable statements, create separate focused claims with the right claim kind and truth value.
97
+
98
+ Preserve explicit negative or deferred decisions as first-class memory when they affect future work. Examples include "do not create code sources from code inspection", "proposal JSON remains the primitive", "a session ingest command was discussed but not built", "fixed eval fixtures should stay stable", and "compact shorthand still exists but no longer satisfies reasoned evidence validation".
99
+
100
+ Avoid broad code-verified claims about entire skills or workflows unless every part was verified against the patch. Prefer narrower claims tied to exact code/doc changes, and keep rationale or policy from the transcript as separate source-verified claims.
101
+
102
+ ## Proposal Format
103
+
104
+ Write a JSON proposal to a temporary file:
105
+
106
+ ```json
107
+ {
108
+ "title": "Update working memory from session",
109
+ "summary": "Durable context learned during the current coding session.",
110
+ "creates": {
111
+ "components": [],
112
+ "flows": [],
113
+ "claims": [
114
+ {
115
+ "id": "claim.example_session_decision",
116
+ "kind": "decision",
117
+ "text": "The session decided to keep the CLI primitive-focused and put workflows in coding-agent skills.",
118
+ "truth": "source_verified",
119
+ "intent": "intended",
120
+ "about": []
121
+ }
122
+ ],
123
+ "sources": [
124
+ {
125
+ "id": "source.codex_session.example_session_id",
126
+ "kind": "session",
127
+ "ref": "codex-session:example-session-id",
128
+ "title": "Codex session example-session-id"
129
+ }
130
+ ],
131
+ "edges": [
132
+ {
133
+ "kind": "evidenced_by",
134
+ "from": "claim.example_session_decision",
135
+ "to": "source.codex_session.example_session_id",
136
+ "metadata": {
137
+ "reason": "The decision was discussed and agreed during the current coding-agent session."
138
+ }
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ ```
144
+
145
+ Allowed claim kinds: `fact`, `requirement`, `decision`, `task`, `question`, `risk`.
146
+ Allowed truth values: `code_verified`, `source_verified`, `unknown`.
147
+ Allowed intent values: `intended`, `accidental`, `unknown`.
148
+ Allowed source kinds: `session`.
149
+
150
+ Use compact relationship fields where possible:
151
+
152
+ - `flow.touches[]` for Flow -> Component.
153
+ - `component.contains[]` for Component -> Component.
154
+ - `flow.contains[]` for Flow -> Flow.
155
+ - `claim.about[]` for Claim -> Component/Flow.
156
+ - `claim.supersedes[]`, `component.supersedes[]`, or `flow.supersedes[]` only when replacing known existing memory.
157
+
158
+ For source-backed claims, use explicit `edges[]` entries with `kind: "evidenced_by"` and `metadata.reason`. Do not use compact `claim.evidenced_by[]`; every evidence edge must explain why the session supports the claim.
159
+
160
+ If you create a session source, connect non-code session-derived claims with `evidenced_by` edges. Code-verified claims do not need session evidence unless the claim is also recording a session decision, requirement, question, risk, trade-off, or task.
161
+
162
+ Each source-backed session claim should have its own `evidenced_by` edge to the session source with a reason specific to that claim. Do not use one bundled source-backed claim to cover multiple unrelated decisions, constraints, rationales, trade-offs, drift items, tasks, or future work.
163
+
164
+ ## Quality Bar
165
+
166
+ - Prefer a small update over broad memory churn.
167
+ - Reuse existing components/flows when `greplica graph context` finds them.
168
+ - Create new components/flows only when the session introduced or clarified a durable area.
169
+ - Use `code_verified` only for claims checked against code.
170
+ - Use `source_verified` for claims grounded in the session.
171
+ - Use `unknown` for unresolved tasks, questions, and risks.
172
+ - Create one `session` source for the current session when storing session-derived claims, with a source ID derived from the actual session metadata.
173
+ - Add a concise free-text `metadata.reason` to each `evidenced_by` edge.
174
+ - Include tasks and future work only when the session discussed what remains to be built.
175
+ - Prefer one precise superseding claim over leaving an older broad claim active beside a more specific update.
176
+ - If the session changed validation, proposal normalization, or skill behavior, explicitly query existing memory for those areas and decide whether an older claim should be superseded.
177
+
178
+ ## Validate And Apply
179
+
180
+ 1. Run `greplica proposal validate <proposal-file>`.
181
+ 2. Fix validation errors until valid.
182
+ 3. Run `greplica proposal apply <proposal-file>`.
183
+ 4. Summarize the durable memory update and mention anything intentionally not stored.