prizmkit 1.0.94 → 1.0.95
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.
package/bundled/VERSION.json
CHANGED
|
@@ -1036,11 +1036,36 @@ os.replace(tmp, target)
|
|
|
1036
1036
|
else
|
|
1037
1037
|
log_warn "Auto-merge failed — dev branch preserved: $_DEV_BRANCH_NAME"
|
|
1038
1038
|
log_warn "Merge manually: git checkout $_ORIGINAL_BRANCH && git rebase $_DEV_BRANCH_NAME"
|
|
1039
|
+
# branch_merge failed and left us on dev branch — checkout original and commit pipeline artifacts
|
|
1040
|
+
if git -C "$_proj_root" checkout "$_ORIGINAL_BRANCH" 2>/dev/null; then
|
|
1041
|
+
local _merge_failed_current _merge_failed_dirty
|
|
1042
|
+
_merge_failed_current=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || true)
|
|
1043
|
+
if [[ "$_merge_failed_current" == "$_ORIGINAL_BRANCH" ]]; then
|
|
1044
|
+
_merge_failed_dirty=$(git -C "$_proj_root" status --porcelain 2>/dev/null || true)
|
|
1045
|
+
if [[ -n "$_merge_failed_dirty" ]]; then
|
|
1046
|
+
git -C "$_proj_root" add -A 2>/dev/null || true
|
|
1047
|
+
git -C "$_proj_root" commit --no-verify -m "chore: include pipeline state artifacts" 2>/dev/null || true
|
|
1048
|
+
fi
|
|
1049
|
+
fi
|
|
1050
|
+
fi
|
|
1039
1051
|
_DEV_BRANCH_NAME=""
|
|
1040
1052
|
fi
|
|
1041
1053
|
elif [[ -n "$_DEV_BRANCH_NAME" ]]; then
|
|
1042
1054
|
# Session failed — return to original branch, preserve dev branch for inspection
|
|
1043
|
-
git -C "$_proj_root" checkout "$_ORIGINAL_BRANCH" 2>/dev/null
|
|
1055
|
+
if git -C "$_proj_root" checkout "$_ORIGINAL_BRANCH" 2>/dev/null; then
|
|
1056
|
+
# Commit any dirty pipeline state files left on the original branch
|
|
1057
|
+
local _failed_current _failed_dirty
|
|
1058
|
+
_failed_current=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || true)
|
|
1059
|
+
if [[ "$_failed_current" == "$_ORIGINAL_BRANCH" ]]; then
|
|
1060
|
+
_failed_dirty=$(git -C "$_proj_root" status --porcelain 2>/dev/null || true)
|
|
1061
|
+
if [[ -n "$_failed_dirty" ]]; then
|
|
1062
|
+
git -C "$_proj_root" add -A 2>/dev/null || true
|
|
1063
|
+
git -C "$_proj_root" commit --no-verify -m "chore: include pipeline state artifacts" 2>/dev/null || true
|
|
1064
|
+
fi
|
|
1065
|
+
fi
|
|
1066
|
+
else
|
|
1067
|
+
log_warn "Failed to checkout $_ORIGINAL_BRANCH after session failure — pipeline state may be uncommitted"
|
|
1068
|
+
fi
|
|
1044
1069
|
log_warn "Session failed — dev branch preserved for inspection: $_DEV_BRANCH_NAME"
|
|
1045
1070
|
_DEV_BRANCH_NAME=""
|
|
1046
1071
|
fi
|
|
@@ -137,6 +137,34 @@ Sediment DECISIONS and interface conventions to platform memory files. This is w
|
|
|
137
137
|
- Feature completion with notable DECISIONS or interface conventions discovered
|
|
138
138
|
- **Skip for**: trivial fixes, config changes, bug fixes with no new conventions
|
|
139
139
|
|
|
140
|
+
### Write Decision Gate (mandatory before any write)
|
|
141
|
+
|
|
142
|
+
Before writing anything to memory files, apply this evaluation in order:
|
|
143
|
+
|
|
144
|
+
**Gate 1 — Importance**: Is the content worth recording? Only record:
|
|
145
|
+
- New feature implementations with non-obvious design choices
|
|
146
|
+
- Critical logic changes with lasting impact
|
|
147
|
+
- Interface conventions that future sessions must honor
|
|
148
|
+
- **Skip**: simple queries, trivial fixes, one-off config changes, content with no future impact
|
|
149
|
+
|
|
150
|
+
**Gate 2 — Dedup**: If Gate 1 passes, read the existing memory file(s) first. Compare against existing entries by core keywords, feature summary, or function signature. If a highly similar entry already exists, **skip or merge-update** it — never duplicate.
|
|
151
|
+
|
|
152
|
+
**Gate 3 — Write only if both pass**: Write to memory files only when content is both important AND non-duplicate. Do NOT write by default after every feature. Skipping is the correct outcome for routine work.
|
|
153
|
+
|
|
154
|
+
**File size monitor**: After each write, check the file's line count. If it exceeds 500 lines, trigger the compaction flow below.
|
|
155
|
+
|
|
156
|
+
### Compaction Flow (triggered at >500 lines)
|
|
157
|
+
|
|
158
|
+
Goal: reduce file size while preserving all valuable knowledge.
|
|
159
|
+
|
|
160
|
+
Allowed operations (lossless):
|
|
161
|
+
- **Merge similar entries**: combine multiple updates about the same feature/topic into one comprehensive record
|
|
162
|
+
- **Remove stale content**: delete entries explicitly superseded, replaced, or marked as deprecated
|
|
163
|
+
- **Distill verbose logs**: compress long narrative descriptions into concise bullet points, preserving key code snippets, config changes, and decision rationale
|
|
164
|
+
- **Restructure**: reorganize headers and sections for clarity
|
|
165
|
+
|
|
166
|
+
Principle: compaction must be lossless — no valuable operational history or decision rationale may be lost.
|
|
167
|
+
|
|
140
168
|
### Sedimentation Rules
|
|
141
169
|
|
|
142
170
|
1. **Max 3-5 entries per feature**: Only keep DECISIONS and interface conventions that genuinely affect future development
|
|
@@ -150,26 +178,30 @@ Sediment DECISIONS and interface conventions to platform memory files. This is w
|
|
|
150
178
|
- `claude` → target: `CLAUDE.md` in project root
|
|
151
179
|
- `codebuddy` → targets: BOTH `CODEBUDDY.md` in project root AND `memory/MEMORY.md` (dual-write required)
|
|
152
180
|
|
|
153
|
-
**2b-2.**
|
|
181
|
+
**2b-2.** Apply the Write Decision Gate (Importance → Dedup → Write). If gate fails at any step, skip Job 3 entirely.
|
|
182
|
+
|
|
183
|
+
**2b-3.** Collect sedimentation candidates (only if gate passes):
|
|
154
184
|
- From context-snapshot.md '## Implementation Log': DECISIONS and notable discoveries
|
|
155
185
|
- From context-snapshot.md '## Review Notes': quality patterns, architectural observations
|
|
156
186
|
- From git diff analysis: any project-level conventions established
|
|
157
187
|
- Filter: only entries that answer "Would a new session benefit from knowing this decision/convention?"
|
|
158
188
|
|
|
159
|
-
**2b-
|
|
189
|
+
**2b-4.** Read existing memory file(s) content. Check for duplicates or near-duplicates.
|
|
160
190
|
- For Claude Code: read `CLAUDE.md`
|
|
161
191
|
- For CodeBuddy: read BOTH `CODEBUDDY.md` AND `memory/MEMORY.md`
|
|
162
192
|
|
|
163
|
-
**2b-
|
|
193
|
+
**2b-5.** Append to memory file(s) using this format:
|
|
164
194
|
```markdown
|
|
165
195
|
### F-XXX: <feature-title>
|
|
166
196
|
- DECISION: <decision content> — <rationale>
|
|
167
197
|
- INTERFACE: <module.function>: <convention>
|
|
168
198
|
```
|
|
169
199
|
|
|
170
|
-
**2b-
|
|
200
|
+
**2b-6.** For CodeBuddy platform: write identical content to BOTH `CODEBUDDY.md` AND `memory/MEMORY.md` (dual-write, both must be updated).
|
|
201
|
+
|
|
202
|
+
**2b-7.** After writing, check file line count. If >500 lines, run the Compaction Flow before proceeding.
|
|
171
203
|
|
|
172
|
-
**2b-
|
|
204
|
+
**2b-8.** If no Implementation Log or Review Notes sections exist in context-snapshot.md, still attempt to extract DECISIONS from git diff and plan.md. Skip only if no meaningful decisions were made.
|
|
173
205
|
|
|
174
206
|
---
|
|
175
207
|
|