pgserve 2.1.3 → 2.2.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 (228) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +105 -1
  3. package/bin/autopg-wrapper.cjs +16 -0
  4. package/bin/pgserve-wrapper.cjs +31 -6
  5. package/bin/postgres-server.js +56 -0
  6. package/console/README.md +131 -0
  7. package/console/api.js +173 -0
  8. package/console/app.jsx +483 -0
  9. package/console/colors_and_type.css +227 -0
  10. package/console/components.jsx +167 -0
  11. package/console/console.css +1666 -0
  12. package/console/data.jsx +350 -0
  13. package/console/index.html +31 -0
  14. package/console/screens/databases.jsx +5 -0
  15. package/console/screens/health.jsx +5 -0
  16. package/console/screens/ingress.jsx +5 -0
  17. package/console/screens/optimizer.jsx +5 -0
  18. package/console/screens/rlm-sim.jsx +5 -0
  19. package/console/screens/rlm-trace.jsx +5 -0
  20. package/console/screens/security.jsx +5 -0
  21. package/console/screens/settings.jsx +611 -0
  22. package/console/screens/sql.jsx +5 -0
  23. package/console/screens/sync.jsx +5 -0
  24. package/console/screens/tables.jsx +5 -0
  25. package/console/tweaks-panel.jsx +425 -0
  26. package/package.json +11 -1
  27. package/src/cli-config.cjs +310 -0
  28. package/src/cli-install.cjs +98 -11
  29. package/src/cli-restart.cjs +228 -0
  30. package/src/cli-ui.cjs +580 -0
  31. package/src/cluster.js +43 -38
  32. package/src/postgres.js +141 -19
  33. package/src/settings-loader.cjs +235 -0
  34. package/src/settings-migrate.cjs +212 -0
  35. package/src/settings-pg-args.cjs +146 -0
  36. package/src/settings-schema.cjs +422 -0
  37. package/src/settings-validator.cjs +416 -0
  38. package/src/settings-writer.cjs +288 -0
  39. package/.claude/context/windows-debug.md +0 -119
  40. package/.genie/AGENTS.md +0 -15
  41. package/.genie/agents/README.md +0 -110
  42. package/.genie/agents/analyze.md +0 -176
  43. package/.genie/agents/forge.md +0 -290
  44. package/.genie/agents/garbage-cleaner.md +0 -324
  45. package/.genie/agents/garbage-collector.md +0 -596
  46. package/.genie/agents/github-issue-gc.md +0 -618
  47. package/.genie/agents/review.md +0 -380
  48. package/.genie/agents/semantic-analyzer/find-duplicates.md +0 -90
  49. package/.genie/agents/semantic-analyzer/find-orphans.md +0 -99
  50. package/.genie/agents/semantic-analyzer.md +0 -101
  51. package/.genie/agents/update.md +0 -182
  52. package/.genie/agents/wish.md +0 -357
  53. package/.genie/brainstorms/pgserve-v2/DESIGN.md +0 -174
  54. package/.genie/code/AGENTS.md +0 -694
  55. package/.genie/code/agents/audit/risk.md +0 -173
  56. package/.genie/code/agents/audit/security.md +0 -189
  57. package/.genie/code/agents/audit.md +0 -145
  58. package/.genie/code/agents/challenge.md +0 -230
  59. package/.genie/code/agents/change-reviewer.md +0 -295
  60. package/.genie/code/agents/code-garbage-collector.md +0 -425
  61. package/.genie/code/agents/code-quality.md +0 -410
  62. package/.genie/code/agents/commit-suggester.md +0 -255
  63. package/.genie/code/agents/commit.md +0 -124
  64. package/.genie/code/agents/consensus.md +0 -204
  65. package/.genie/code/agents/daily-standup.md +0 -722
  66. package/.genie/code/agents/docgen.md +0 -48
  67. package/.genie/code/agents/explore.md +0 -79
  68. package/.genie/code/agents/fix.md +0 -100
  69. package/.genie/code/agents/git/commit-advisory.md +0 -219
  70. package/.genie/code/agents/git/workflows/issue.md +0 -244
  71. package/.genie/code/agents/git/workflows/pr.md +0 -179
  72. package/.genie/code/agents/git/workflows/release.md +0 -460
  73. package/.genie/code/agents/git/workflows/report.md +0 -342
  74. package/.genie/code/agents/git.md +0 -432
  75. package/.genie/code/agents/implementor.md +0 -161
  76. package/.genie/code/agents/install.md +0 -515
  77. package/.genie/code/agents/issue-creator.md +0 -344
  78. package/.genie/code/agents/polish.md +0 -116
  79. package/.genie/code/agents/qa.md +0 -653
  80. package/.genie/code/agents/refactor.md +0 -294
  81. package/.genie/code/agents/release.md +0 -1129
  82. package/.genie/code/agents/roadmap.md +0 -885
  83. package/.genie/code/agents/tests.md +0 -557
  84. package/.genie/code/agents/tracer.md +0 -50
  85. package/.genie/code/agents/update/upstream-update.md +0 -85
  86. package/.genie/code/agents/update/versions/generic-update.md +0 -305
  87. package/.genie/code/agents/vibe.md +0 -1317
  88. package/.genie/code/spells/agent-configuration.md +0 -58
  89. package/.genie/code/spells/automated-rc-publishing.md +0 -106
  90. package/.genie/code/spells/branch-tracker-guidance.md +0 -28
  91. package/.genie/code/spells/debug.md +0 -320
  92. package/.genie/code/spells/emoji-naming-convention.md +0 -303
  93. package/.genie/code/spells/evidence-storage.md +0 -26
  94. package/.genie/code/spells/file-naming-rules.md +0 -35
  95. package/.genie/code/spells/forge-code-blueprints.md +0 -195
  96. package/.genie/code/spells/genie-integration.md +0 -153
  97. package/.genie/code/spells/publishing-protocol.md +0 -61
  98. package/.genie/code/spells/team-consultation-protocol.md +0 -284
  99. package/.genie/code/spells/tool-requirements.md +0 -20
  100. package/.genie/code/spells/triad-maintenance-protocol.md +0 -154
  101. package/.genie/code/teams/tech-council/council.md +0 -328
  102. package/.genie/code/teams/tech-council/jt.md +0 -352
  103. package/.genie/code/teams/tech-council/nayr.md +0 -305
  104. package/.genie/code/teams/tech-council/oettam.md +0 -375
  105. package/.genie/neurons/README.md +0 -193
  106. package/.genie/neurons/forge.md +0 -106
  107. package/.genie/neurons/genie.md +0 -63
  108. package/.genie/neurons/review.md +0 -106
  109. package/.genie/neurons/wish.md +0 -104
  110. package/.genie/product/README.md +0 -20
  111. package/.genie/product/cli-automation.md +0 -359
  112. package/.genie/product/environment.md +0 -60
  113. package/.genie/product/mission.md +0 -60
  114. package/.genie/product/roadmap.md +0 -44
  115. package/.genie/product/tech-stack.md +0 -34
  116. package/.genie/product/templates/context-template.md +0 -218
  117. package/.genie/product/templates/qa-done-report-template.md +0 -68
  118. package/.genie/product/templates/review-report-template.md +0 -89
  119. package/.genie/product/templates/wish-template.md +0 -120
  120. package/.genie/scripts/helpers/analyze-commit.js +0 -195
  121. package/.genie/scripts/helpers/bullet-counter.js +0 -194
  122. package/.genie/scripts/helpers/bullet-find.js +0 -289
  123. package/.genie/scripts/helpers/bullet-id.js +0 -244
  124. package/.genie/scripts/helpers/check-secrets.js +0 -237
  125. package/.genie/scripts/helpers/count-tokens.js +0 -200
  126. package/.genie/scripts/helpers/create-frontmatter.js +0 -456
  127. package/.genie/scripts/helpers/detect-markers.js +0 -293
  128. package/.genie/scripts/helpers/detect-todos.js +0 -267
  129. package/.genie/scripts/helpers/detect-unlabeled-blocks.js +0 -135
  130. package/.genie/scripts/helpers/embeddings.js +0 -344
  131. package/.genie/scripts/helpers/find-empty-sections.js +0 -158
  132. package/.genie/scripts/helpers/index.js +0 -319
  133. package/.genie/scripts/helpers/validate-frontmatter.js +0 -578
  134. package/.genie/scripts/helpers/validate-links.js +0 -207
  135. package/.genie/scripts/helpers/validate-paths.js +0 -373
  136. package/.genie/spells/README.md +0 -9
  137. package/.genie/spells/ace-protocol.md +0 -118
  138. package/.genie/spells/ask-one-at-a-time.md +0 -175
  139. package/.genie/spells/backup-analyzer.md +0 -542
  140. package/.genie/spells/blocker.md +0 -12
  141. package/.genie/spells/break-things-move-fast.md +0 -56
  142. package/.genie/spells/context-candidates.md +0 -72
  143. package/.genie/spells/context-critic.md +0 -51
  144. package/.genie/spells/defer-to-expertise.md +0 -278
  145. package/.genie/spells/delegate-dont-do.md +0 -292
  146. package/.genie/spells/error-investigation-protocol.md +0 -328
  147. package/.genie/spells/evidence-based-completion.md +0 -273
  148. package/.genie/spells/experiment.md +0 -65
  149. package/.genie/spells/file-creation-protocol.md +0 -229
  150. package/.genie/spells/forge-integration.md +0 -281
  151. package/.genie/spells/forge-orchestration.md +0 -514
  152. package/.genie/spells/gather-context.md +0 -18
  153. package/.genie/spells/global-health-check.md +0 -34
  154. package/.genie/spells/global-noop-roundtrip.md +0 -25
  155. package/.genie/spells/install-genie.md +0 -1232
  156. package/.genie/spells/install.md +0 -82
  157. package/.genie/spells/investigate-before-commit.md +0 -112
  158. package/.genie/spells/know-yourself.md +0 -288
  159. package/.genie/spells/learn.md +0 -828
  160. package/.genie/spells/mcp-diagnostic-protocol.md +0 -246
  161. package/.genie/spells/mcp-first.md +0 -124
  162. package/.genie/spells/multi-step-execution.md +0 -67
  163. package/.genie/spells/orchestration-boundary-protocol.md +0 -256
  164. package/.genie/spells/orchestrator-not-implementor.md +0 -189
  165. package/.genie/spells/prompt.md +0 -746
  166. package/.genie/spells/reflect.md +0 -404
  167. package/.genie/spells/routing-decision-matrix.md +0 -368
  168. package/.genie/spells/run-in-parallel.md +0 -12
  169. package/.genie/spells/session-state-updater-example.md +0 -196
  170. package/.genie/spells/session-state-updater.md +0 -220
  171. package/.genie/spells/track-long-running-tasks.md +0 -133
  172. package/.genie/spells/troubleshoot-infrastructure.md +0 -176
  173. package/.genie/spells/upgrade-genie.md +0 -415
  174. package/.genie/spells/url-presentation-protocol.md +0 -301
  175. package/.genie/spells/wish-initiation.md +0 -158
  176. package/.genie/spells/wish-issue-linkage.md +0 -410
  177. package/.genie/spells/wish-lifecycle.md +0 -100
  178. package/.genie/state/provider-status.json +0 -3
  179. package/.genie/state/version.json +0 -16
  180. package/.genie/wishes/canonical-pgserve-pm2-supervision/WISH.md +0 -290
  181. package/.genie/wishes/pgserve-v2/BRIEF-from-genie-pgserve.md +0 -99
  182. package/.genie/wishes/pgserve-v2/WISH.md +0 -442
  183. package/.genie/wishes/release-system-genie-pattern/WISH.md +0 -268
  184. package/.genie/wishes/release-system-genie-pattern/validation.md +0 -205
  185. package/.gitguardian.yaml +0 -29
  186. package/.gitguardianignore +0 -16
  187. package/.github/workflows/ci.yml +0 -122
  188. package/.github/workflows/release.yml +0 -289
  189. package/.github/workflows/version.yml +0 -228
  190. package/.husky/pre-commit +0 -2
  191. package/AGENTS.md +0 -433
  192. package/CLAUDE.md +0 -1
  193. package/Makefile +0 -285
  194. package/assets/icon.ico +0 -0
  195. package/bun.lock +0 -435
  196. package/bunfig.toml +0 -28
  197. package/ecosystem.config.cjs +0 -23
  198. package/eslint.config.js +0 -63
  199. package/examples/multi-tenant-demo.js +0 -104
  200. package/install.sh +0 -123
  201. package/knip.json +0 -9
  202. package/scripts/test-bun-self-heal.sh +0 -163
  203. package/scripts/test-npx.sh +0 -60
  204. package/tests/audit.test.js +0 -189
  205. package/tests/backpressure.test.js +0 -167
  206. package/tests/benchmarks/runner.js +0 -1197
  207. package/tests/benchmarks/vector-generator.js +0 -368
  208. package/tests/cli-install.test.js +0 -322
  209. package/tests/control-db.test.js +0 -285
  210. package/tests/daemon-args.test.js +0 -86
  211. package/tests/daemon-control.test.js +0 -171
  212. package/tests/daemon-fingerprint-integration.test.js +0 -111
  213. package/tests/daemon-pr24-regression.test.js +0 -198
  214. package/tests/fingerprint.test.js +0 -263
  215. package/tests/fixtures/240-orphan-seed.sql +0 -30
  216. package/tests/multi-tenant.test.js +0 -374
  217. package/tests/orphan-cleanup.test.js +0 -390
  218. package/tests/pg-version-regex.test.js +0 -129
  219. package/tests/quick-bench.js +0 -135
  220. package/tests/router-handshake-retry.test.js +0 -119
  221. package/tests/router-handshake-watchdog.test.js +0 -110
  222. package/tests/sdk.test.js +0 -71
  223. package/tests/stale-postmaster-pid.test.js +0 -85
  224. package/tests/stress-test.js +0 -439
  225. package/tests/sync-perf-test.js +0 -150
  226. package/tests/tcp-listen.test.js +0 -368
  227. package/tests/tenancy.test.js +0 -403
  228. package/tests/wrapper-supervision.test.js +0 -107
@@ -1,415 +0,0 @@
1
- # Upgrade Genie Framework
2
-
3
- ## Purpose
4
- Orchestrate Genie framework upgrades with intelligent conflict resolution and user customization preservation.
5
-
6
- ## When to Use
7
- - User runs `genie update`
8
- - Automatic check detects new version (max once per day)
9
- - Post-install upgrade prompt
10
-
11
- ## Core Principles
12
-
13
- ### 1. Preserve User Intent
14
- **Rule:** Never overwrite user customizations without explicit consent
15
-
16
- **User Files (Never Touched):**
17
- - `.genie/USERCONTEXT.md`
18
- - `.genie/.session`
19
- - `.genie/reports/**/*.md`
20
- - `.genie/spells/custom-*.md`
21
- - `.genie/code/agents/custom-*.md`
22
-
23
- **Framework Files (Upgraded):**
24
- - `AGENTS.md` (root - master genie)
25
- - `CLAUDE.md` (root - meta-loader)
26
- - `.genie/spells/*.md` (official)
27
- - `.genie/code/AGENTS.md`
28
- - `.genie/workflows/*.md`
29
-
30
- ### 2. Smart Merge, Not Overwrite
31
- **Rule:** Use git diff to intelligently merge changes
32
-
33
- **Strategy:**
34
- ```bash
35
- # Generate diff between old and new framework
36
- git diff ${OLD_COMMIT} ${NEW_COMMIT} -- .genie/**/*.md
37
-
38
- # Apply only framework files
39
- git apply --check upgrade.patch
40
-
41
- # If clean: Apply automatically
42
- # If conflicts: Delegate to Update Agent
43
- ```
44
-
45
- ### 3. User Guidance Required
46
- **Rule:** Conflicts require user input, never auto-resolved
47
-
48
- **Conflict Types:**
49
- - **Additive:** User and upstream both added content → Merge both (ask for ordering)
50
- - **Deletive:** Upstream removed section user kept → Ask user to confirm deletion
51
- - **Conflicting:** Both modified same lines → Present options, user decides
52
-
53
- ### 4. Atomic Operations
54
- **Rule:** Upgrade succeeds completely or rolls back (no partial states)
55
-
56
- **Implementation:**
57
- ```bash
58
- # Backup before upgrade
59
- cp -r .genie .genie.backup-${timestamp}
60
-
61
- # Apply upgrade
62
- git apply upgrade.patch || {
63
- # On failure: Rollback
64
- rm -rf .genie
65
- mv .genie.backup-${timestamp} .genie
66
- echo "Upgrade failed, rolled back"
67
- }
68
- ```
69
-
70
- ## Upgrade Workflow
71
-
72
- ### Step 1: Version Check
73
- ```javascript
74
- const installed = readFrameworkVersion('.genie/.framework-version')
75
- const available = getGlobalPackageVersion('automagik-genie')
76
-
77
- if (semver.gt(available, installed)) {
78
- console.log(`🔔 New version available: ${available}`)
79
- const answer = await prompt('Upgrade now? (Y/n)')
80
-
81
- if (answer === 'y') {
82
- await initiateUpgrade(installed, available)
83
- }
84
- }
85
- ```
86
-
87
- ### Step 2: Fetch Framework Diff
88
- ```bash
89
- # Clone template repo (or use cached)
90
- git clone https://github.com/namastexlabs/automagik-genie /tmp/genie-template
91
-
92
- # Generate diff
93
- cd /tmp/genie-template
94
- git diff ${OLD_COMMIT} ${NEW_COMMIT} -- .genie/ > /tmp/upgrade.patch
95
-
96
- # Filter to framework files only
97
- git diff ${OLD_COMMIT} ${NEW_COMMIT} -- \
98
- 'AGENTS.md' \
99
- 'CLAUDE.md' \
100
- '.genie/spells/*.md' \
101
- '.genie/code/**/*.md' \
102
- '.genie/workflows/*.md' \
103
- > /tmp/framework-upgrade.patch
104
- ```
105
-
106
- ### Step 3: Test Apply (Detect Conflicts)
107
- ```bash
108
- cd ${USER_WORKSPACE}
109
-
110
- git apply --check /tmp/framework-upgrade.patch
111
-
112
- if [ $? -eq 0 ]; then
113
- echo "✅ Clean merge possible!"
114
- UPGRADE_TYPE="clean"
115
- else
116
- echo "⚠️ Conflicts detected"
117
- UPGRADE_TYPE="conflicts"
118
- fi
119
- ```
120
-
121
- ### Step 4: Clean Merge Path
122
- ```bash
123
- if [ "$UPGRADE_TYPE" = "clean" ]; then
124
- # Backup first
125
- cp -r .genie .genie.backup-$(date +%s)
126
-
127
- # Apply upgrade
128
- git apply /tmp/framework-upgrade.patch
129
-
130
- # Update version tracking
131
- echo "{\"installed_version\": \"${NEW_VERSION}\", ...}" > .genie/.framework-version
132
-
133
- # Commit
134
- git add .genie/
135
- git commit -m "Upgrade Genie framework ${OLD_VERSION} → ${NEW_VERSION}"
136
-
137
- echo "✅ Upgrade complete!"
138
- fi
139
- ```
140
-
141
- ### Step 5: Conflict Resolution Path
142
- ```bash
143
- if [ "$UPGRADE_TYPE" = "conflicts" ]; then
144
- # Parse conflicts
145
- CONFLICTS=$(git apply /tmp/framework-upgrade.patch 2>&1 | grep "error:")
146
-
147
- echo "⚠️ Conflicts in ${CONFLICT_COUNT} files:"
148
- echo "${CONFLICTS}"
149
-
150
- # Create Forge task for Update Agent
151
- TASK_ID=$(forge create-task \
152
- --title "Resolve upgrade conflicts (${OLD_VERSION} → ${NEW_VERSION})" \
153
- --description "Conflicts: ${CONFLICTS}")
154
-
155
- # Start Update Agent in isolated worktree
156
- forge start-attempt ${TASK_ID}
157
-
158
- echo "🤖 Update Agent spawned: ${TASK_ID}"
159
- echo "📍 Monitor: https://forge.namastex.ai/tasks/${TASK_ID}"
160
- echo ""
161
- echo "The agent will:"
162
- echo " 1. Analyze conflicts"
163
- echo " 2. Preserve your customizations"
164
- echo " 3. Ask for your input if needed"
165
- echo " 4. Propose resolution for your review"
166
- }
167
- ```
168
-
169
- ### Step 6: Post-Upgrade Validation
170
- ```bash
171
- # After upgrade applied (clean or resolved)
172
-
173
- # Validate markdown syntax
174
- find .genie -name "*.md" -exec markdownlint {} \;
175
-
176
- # Check cross-references
177
- node .genie/scripts/validate-cross-references.js
178
-
179
- # Test skill loading
180
- genie --test-skills
181
-
182
- # If validation fails: Rollback
183
- if [ $? -ne 0 ]; then
184
- echo "❌ Validation failed, rolling back..."
185
- rm -rf .genie
186
- mv .genie.backup-${TIMESTAMP} .genie
187
- echo "Rolled back to ${OLD_VERSION}"
188
- fi
189
- ```
190
-
191
- ## Update Agent Delegation
192
-
193
- **When to Delegate:**
194
- - Conflicts detected during `git apply`
195
- - User-modified framework file conflicts with upstream
196
- - Structural changes require intelligent merging
197
-
198
- **Agent Workflow:**
199
- @.genie/agents/update.md
200
-
201
- **Delegation Pattern:**
202
- ```javascript
203
- async function resolveConflicts(conflicts, upgradeContext) {
204
- // Create Forge task
205
- const task = await forge.createTask({
206
- project_id: GENIE_PROJECT_ID,
207
- title: `Resolve upgrade conflicts (${conflicts.length} files)`,
208
- description: JSON.stringify({
209
- type: 'framework-upgrade',
210
- old_version: upgradeContext.oldVersion,
211
- new_version: upgradeContext.newVersion,
212
- conflicts: conflicts
213
- })
214
- })
215
-
216
- // Start Update Agent in isolated worktree
217
- const attempt = await forge.startTaskAttempt(task.id)
218
-
219
- // Return monitor info
220
- return {
221
- taskId: task.id,
222
- monitorUrl: `https://forge.namastex.ai/tasks/${task.id}`,
223
- worktreePath: attempt.worktree_path
224
- }
225
- }
226
- ```
227
-
228
- ## User Interaction Examples
229
-
230
- ### Example 1: Clean Upgrade (No Conflicts)
231
- ```bash
232
- $ genie update
233
-
234
- 📦 Checking for updates...
235
- 🔔 New version available: v2.5.0-rc.16 (current: v2.5.0-rc.15)
236
-
237
- Changes:
238
- + 3 new spells (qa-validation, parallel-execution, sequential-questioning)
239
- ~ 12 updated files (AGENTS.md, learn.md, delegate-dont-do.md)
240
- - 0 deletions
241
-
242
- Upgrade now? (Y/n): y
243
-
244
- 📝 Fetching framework diff...
245
- 🧪 Testing merge...
246
- ✅ No conflicts detected!
247
-
248
- 📦 Applying upgrade...
249
- ✅ .genie/AGENTS.md (12 lines added)
250
- ✅ .genie/spells/learn.md (token efficiency section enhanced)
251
- ✅ .genie/spells/qa-validation.md (new)
252
- ... (14 more)
253
-
254
- ✅ Upgrade complete!
255
- Installed: v2.5.0-rc.16
256
- Files updated: 17
257
- User files preserved: 4
258
-
259
- 🎉 Your Genie is up to date!
260
- ```
261
-
262
- ### Example 2: Conflicts Detected
263
- ```bash
264
- $ genie update
265
-
266
- 📦 Checking for updates...
267
- 🔔 New version available: v2.5.0-rc.16
268
-
269
- ⚠️ Conflicts detected in 2 files:
270
- - .genie/code/AGENTS.md (you added custom section, upstream restructured)
271
- - .genie/spells/learn.md (both modified token efficiency)
272
-
273
- 🤖 Launching Update Agent to resolve conflicts...
274
-
275
- Creating Forge task: Resolve upgrade conflicts
276
- Task ID: task_abc123
277
- Worktree: /var/tmp/automagik-forge/worktrees/task_abc123
278
-
279
- 🔗 Monitor progress: https://forge.namastex.ai/tasks/abc123
280
-
281
- The Update Agent will:
282
- 1. Analyze your customizations
283
- 2. Integrate upstream changes
284
- 3. Ask for your input on ambiguous conflicts
285
- 4. Propose resolution for your review
286
-
287
- Continue? (Y/n): y
288
-
289
- [Update Agent working in background...]
290
-
291
- 🔔 Update Agent needs your input!
292
-
293
- File: .genie/code/AGENTS.md
294
- Conflict: You added "Custom Workflows" section (lines 45-60).
295
- Upstream restructured the file.
296
-
297
- Options:
298
- 1. Keep your section (merge after upstream's new structure)
299
- 2. Move content into upstream's new "Workflows" section
300
- 3. Show me both versions (manual edit)
301
-
302
- Your choice (1/2/3): 1
303
-
304
- ✅ Got it! Proceeding with option 1.
305
-
306
- [Resolving remaining conflicts...]
307
-
308
- ✅ All conflicts resolved!
309
-
310
- Resolution summary:
311
- ✅ .genie/code/AGENTS.md - Custom section preserved at line 78
312
- ✅ .genie/spells/learn.md - User examples + upstream formulas merged
313
-
314
- Apply this resolution? (Y/n): y
315
-
316
- ✅ Upgrade complete! Customizations preserved.
317
- 🎉 Genie is now on v2.5.0-rc.16!
318
- ```
319
-
320
- ## Version Tracking Schema
321
-
322
- **File:** `.genie/.framework-version`
323
-
324
- ```json
325
- {
326
- "installed_version": "2.5.0-rc.16",
327
- "installed_commit": "bd1cc98a",
328
- "installed_date": "2025-10-23T08:30:00Z",
329
- "package_name": "automagik-genie",
330
- "customized_files": [
331
- ".genie/spells/custom-deployment.md",
332
- ".genie/code/agents/my-custom-agent.md"
333
- ],
334
- "deleted_files": [
335
- ".genie/spells/deprecated-spell.md"
336
- ],
337
- "last_upgrade_date": "2025-10-23T08:30:00Z",
338
- "previous_version": "2.5.0-rc.15"
339
- }
340
- ```
341
-
342
- ## Rollback Strategy
343
-
344
- **Automatic Rollback (Upgrade Fails):**
345
- ```bash
346
- # Backup created before upgrade
347
- .genie.backup-1729672200/
348
-
349
- # On failure:
350
- rm -rf .genie
351
- mv .genie.backup-1729672200 .genie
352
- echo "Rolled back to v2.5.0-rc.15"
353
- ```
354
-
355
- **Manual Rollback:**
356
- ```bash
357
- genie update --rollback
358
-
359
- Available backups:
360
- 1. v2.5.0-rc.15 (2025-10-23 07:40 UTC)
361
- 2. v2.5.0-rc.14 (2025-10-22 14:20 UTC)
362
-
363
- Rollback to (1/2): 1
364
-
365
- Rolling back to v2.5.0-rc.15...
366
- ✅ Rollback complete!
367
- ```
368
-
369
- ## Edge Cases
370
-
371
- ### Offline Mode
372
- ```bash
373
- $ genie update
374
-
375
- 📦 Checking for updates... (offline mode)
376
-
377
- Using cached template repo:
378
- Location: ~/.genie/templates/automagik-genie
379
- Last updated: 2025-10-22 (1 day old)
380
-
381
- ⚠️ Cache may be stale. Upgrade anyway? (Y/n): y
382
-
383
- [Proceeds with cached version...]
384
- ```
385
-
386
- ### Interrupted Upgrade
387
- ```bash
388
- $ genie
389
-
390
- ⚠️ Incomplete upgrade detected!
391
- Started: 2025-10-23 08:30 UTC
392
- Status: conflicts-resolving
393
-
394
- Options:
395
- 1. Resume upgrade (continue where you left off)
396
- 2. Rollback (restore to v2.5.0-rc.15)
397
- 3. Abandon (delete incomplete state)
398
-
399
- Your choice (1/2/3): _
400
- ```
401
-
402
- ## Success Metrics
403
-
404
- - 🎯 Zero data loss (user files never overwritten)
405
- - 🎯 <60s for clean merges
406
- - 🎯 Interactive conflict resolution (user always in control)
407
- - 🎯 Atomic operations (never partial state)
408
- - 🎯 Rollback capability (undo anytime)
409
-
410
- ## Future Enhancements
411
-
412
- - **Preview Mode:** `genie update --preview` (show diff before applying)
413
- - **Selective Upgrade:** `genie update --only-spells` (granular control)
414
- - **Auto-Upgrade:** Configure auto-upgrade on `npm install -g`
415
- - **Analytics:** Track common conflicts, improve merge strategies
@@ -1,301 +0,0 @@
1
- ---
2
- name: URL Presentation Protocol
3
- description: Full URLs are sacred. Never truncate action items. URLs are interfaces, not decorations.
4
- ---
5
-
6
- # URL Presentation Protocol
7
-
8
- ## Core Principle 🔴 CRITICAL
9
-
10
- **Full URLs Are Sacred - Never Truncate Action Items**
11
-
12
- URLs are PRIMARY interfaces for accessing work, not decorative metadata. User workflow depends on clicking them.
13
-
14
- ## The Violation
15
-
16
- ❌ **Wrong Presentation:**
17
- ```
18
- Forge URL: http://localhost:8887/projects/.../ff8b5629...
19
- ```
20
-
21
- ✅ **Correct Presentation:**
22
- ```
23
- Forge URL: http://localhost:8887/projects/ee8f0a72-44da-411d-a23e-f2c6529b62ce/tasks/ff8b5629-fbfd-4418-8017-b076042de756/attempts/ff8b5629-fbfd-4418-8017-b076042de756?view=diffs
24
- ```
25
-
26
- **Why This Matters:**
27
- > "returning me the url of the tasks at all times is very important"
28
- > — User teaching, 2025-10-23
29
-
30
- **Impact of Truncation:**
31
- - ❌ User can't click truncated URL
32
- - ❌ User can't copy-paste to browser
33
- - ❌ Must manually search Forge UI for task
34
- - ❌ Extra friction in workflow
35
- - ❌ Defeats entire purpose of providing URL
36
-
37
- ## URL Semantics
38
-
39
- ### Forge Task URL Structure
40
-
41
- ```
42
- http://localhost:8887/projects/{project_id}/tasks/{task_id}/attempts/{attempt_id}?view={mode}
43
-
44
- Components:
45
- - project_id: ee8f0a72-44da-411d-a23e-f2c6529b62ce (UUID)
46
- - task_id: ff8b5629-fbfd-4418-8017-b076042de756 (UUID)
47
- - attempt_id: ff8b5629-fbfd-4418-8017-b076042de756 (usually same as task_id)
48
- - view mode: diffs | preview (CRITICAL - controls interface behavior)
49
- ```
50
-
51
- ### Query Parameters - NOT Optional
52
-
53
- **`?view=diffs`** — Code/text editing view
54
- - For backend work, API changes, configuration
55
- - Shows code diffs, file edits, text changes
56
- - Pair programming on code
57
-
58
- **`?view=preview`** — Frontend real-time UI preview
59
- - For UI work, component development, styling
60
- - Shows live preview of frontend changes
61
- - Pair programming on visual interface
62
- - Real-time rendering as code changes
63
-
64
- **These are NOT decorations - they control the VIEW MODE that user sees.**
65
-
66
- ## Protocol for URL Presentation
67
-
68
- ### Rule 1: Never Truncate Functional Links
69
-
70
- **URLs are ACTION ITEMS, not decorations.**
71
-
72
- ```
73
- Full URL = User can click/copy → Access work immediately
74
- Partial URL = Useless → Must search manually
75
- ```
76
-
77
- **Think of URLs like:**
78
- - Door keys (truncated key doesn't unlock door)
79
- - Phone numbers (partial number doesn't call)
80
- - Coordinates (approximate location doesn't navigate)
81
-
82
- ### Rule 2: Preserve Query Parameters
83
-
84
- **Query parameters control interface behavior - they're part of the link.**
85
-
86
- ❌ **Wrong:**
87
- ```
88
- http://localhost:8887/projects/abc123/tasks/def456
89
- ```
90
-
91
- ✅ **Right:**
92
- ```
93
- http://localhost:8887/projects/abc123/tasks/def456?view=diffs
94
- ```
95
-
96
- **The `?view=` parameter determines what the user sees. Without it, they may get wrong view.**
97
-
98
- ### Rule 3: Format for Visibility
99
-
100
- **Make URLs easy to find, click, and copy:**
101
-
102
- **Option 1: Markdown link (preferred when supported)**
103
- ```markdown
104
- [View Task in Forge](http://localhost:8887/projects/ee8f0a72.../attempts/ff8b5629...?view=diffs)
105
- ```
106
-
107
- **Option 2: Bold label + clickable URL**
108
- ```markdown
109
- **Forge URL:** http://localhost:8887/projects/ee8f0a72.../attempts/ff8b5629...?view=diffs
110
- ```
111
-
112
- **Option 3: Own line with context**
113
- ```markdown
114
- ✅ Wish created successfully!
115
-
116
- **Session:** websocket-tools-investigation
117
- **Task ID:** ff8b5629-fbfd-4418-8017-b076042de756
118
- **Forge URL:** http://localhost:8887/projects/ee8f0a72-44da-411d-a23e-f2c6529b62ce/tasks/ff8b5629-fbfd-4418-8017-b076042de756/attempts/ff8b5629-fbfd-4418-8017-b076042de756?view=diffs
119
-
120
- View code changes in real-time!
121
- ```
122
-
123
- ### Rule 4: Copy Verbatim from MCP
124
-
125
- **When MCP returns URL → Copy EXACTLY → Present VERBATIM**
126
-
127
- ❌ **Wrong:**
128
- ```javascript
129
- // MCP returns
130
- Forge URL: http://localhost:8887/projects/ee8f0a72.../ff8b5629...?view=diffs
131
-
132
- // I present
133
- Forge URL: http://localhost:8887/projects/.../ff8b5629...
134
- ```
135
-
136
- ✅ **Right:**
137
- ```javascript
138
- // MCP returns
139
- Forge URL: http://localhost:8887/projects/ee8f0a72.../ff8b5629...?view=diffs
140
-
141
- // I present EXACTLY
142
- Forge URL: http://localhost:8887/projects/ee8f0a72.../ff8b5629...?view=diffs
143
- ```
144
-
145
- **No editing. No "cleaning up". No truncation. VERBATIM.**
146
-
147
- ### Rule 5: Understand URL Purpose
148
-
149
- **URLs are not information - they're INTERFACES.**
150
-
151
- **Not:** "Here's a reference to the task"
152
- **Yes:** "Here's how you ACCESS the task"
153
-
154
- **Not:** "Here's the task ID for documentation"
155
- **Yes:** "Here's the clickable link to VIEW the task"
156
-
157
- **Not:** "Here's an example of the URL format"
158
- **Yes:** "Here's YOUR URL to open RIGHT NOW"
159
-
160
- ## Common Violations
161
-
162
- ### Violation 1: Aesthetic Truncation
163
-
164
- **Wrong thinking:**
165
- ```
166
- "Long URLs look messy, let me clean them up with ..."
167
- "User can figure out the full URL from context"
168
- "The important part is the task ID, rest is obvious"
169
- ```
170
-
171
- **Correct thinking:**
172
- ```
173
- "User needs to CLICK this URL right now"
174
- "Can user copy-paste this and it will work? NO → FIX IT"
175
- "URLs are functional tools, not documentation"
176
- ```
177
-
178
- ### Violation 2: Missing Query Parameters
179
-
180
- **Wrong:**
181
- ```
182
- Forge URL: http://localhost:8887/projects/abc/tasks/123
183
- ```
184
-
185
- **Right:**
186
- ```
187
- Forge URL: http://localhost:8887/projects/abc/tasks/123?view=diffs
188
- ```
189
-
190
- **Query parameters change what user sees. Missing them = wrong interface mode.**
191
-
192
- ### Violation 3: Assuming Context
193
-
194
- **Wrong:**
195
- ```
196
- "Task ff8b5629 in Forge" (assumes user knows how to build URL)
197
- ```
198
-
199
- **Right:**
200
- ```
201
- http://localhost:8887/projects/ee8f0a72.../tasks/ff8b5629...?view=diffs
202
- (gives user the ACTUAL working link)
203
- ```
204
-
205
- ## Pattern Recognized
206
-
207
- **This is part of larger pattern:**
208
-
209
- Optimizing for MY aesthetics instead of USER functionality:
210
- - Learning #11: Silent failures → suggest manual workaround (not investigating)
211
- - Learning #13: Can't verify → mark complete anyway (not checking)
212
- - Learning #14: Have full URLs → truncate them (not preserving) ← **THIS ONE**
213
-
214
- **Common thread:** Taking shortcuts that make things "cleaner" for me but BROKEN for user.
215
-
216
- **Root cause:** Not thinking from user's perspective - "What do they need to DO with this information?"
217
-
218
- **Fix:** Before presenting ANY information, ask: **"Can user ACT on this? Is it FUNCTIONAL?"**
219
-
220
- ## Real-World Example
221
-
222
- **Bug:** During wish creation, I presented:
223
- ```
224
- Forge URL: http://localhost:8887/projects/.../ff8b5629...
225
- Forge URL: http://localhost:8887/projects/.../4172bf6c...
226
- ```
227
-
228
- **User reaction:**
229
- ```
230
- "this is really unfortunate, you returning me the url of the tasks
231
- at all times is very important"
232
- ```
233
-
234
- **What I did:** Manually truncated URLs thinking it was "cleaner"
235
-
236
- **What user needed:** Full clickable URLs to access their work
237
-
238
- **Correct presentation:**
239
- ```
240
- Forge URL: http://localhost:8887/projects/ee8f0a72-44da-411d-a23e-f2c6529b62ce/tasks/ff8b5629-fbfd-4418-8017-b076042de756/attempts/ff8b5629-fbfd-4418-8017-b076042de756?view=diffs
241
-
242
- Forge URL: http://localhost:8887/projects/ee8f0a72-44da-411d-a23e-f2c6529b62ce/tasks/4172bf6c-f9ed-4dfc-9a6e-0a109542345c/attempts/4172bf6c-f9ed-4dfc-9a6e-0a109542345c?view=diffs
243
- ```
244
-
245
- **Result:** User can click, access work immediately, no friction.
246
-
247
- ## Pre-Response Checklist
248
-
249
- **Before presenting task results to user:**
250
- - [ ] Are there URLs in MCP output?
251
- - [ ] Have I copied them VERBATIM?
252
- - [ ] Are query parameters preserved?
253
- - [ ] Can user click/copy them?
254
- - [ ] Did I truncate anything? (If yes → FIX IT)
255
-
256
- ## Output Template
257
-
258
- **Standard Forge task presentation:**
259
- ```markdown
260
- ✅ [Task type] created successfully!
261
-
262
- **Session:** [session-name]
263
- **Task ID:** [task-id]
264
- **Forge URL:** [FULL URL FROM MCP - NO TRUNCATION]
265
-
266
- [Context about what view mode to use or what to expect]
267
- ```
268
-
269
- **Example:**
270
- ```markdown
271
- ✅ Wish created successfully!
272
-
273
- **Session:** websocket-tools-investigation
274
- **Task ID:** ff8b5629-fbfd-4418-8017-b076042de756
275
- **Forge URL:** http://localhost:8887/projects/ee8f0a72-44da-411d-a23e-f2c6529b62ce/tasks/ff8b5629-fbfd-4418-8017-b076042de756/attempts/ff8b5629-fbfd-4418-8017-b076042de756?view=diffs
276
-
277
- View code changes as the agent works in real-time! The `?view=diffs` parameter shows the code editing interface.
278
- ```
279
-
280
- ## Success Criteria
281
-
282
- **This protocol is working when:**
283
- - ✅ Never truncate URLs again
284
- - ✅ Always preserve query parameters
285
- - ✅ Present URLs as clickable action items
286
- - ✅ User can access tasks with one click
287
- - ✅ No more "unfortunate" truncations
288
- - ✅ No manual searching needed
289
-
290
- **Validation:**
291
- - Next MCP returns URL → I copy verbatim → User clicks → Accesses immediately → Seamless workflow
292
-
293
- ## Integration with Other Protocols
294
-
295
- **Evidence-Based Completion:** Full URLs are evidence (user can verify task exists by clicking)
296
-
297
- **MCP Diagnostic Protocol:** URLs from MCP must be preserved exactly (diagnostic info)
298
-
299
- **Orchestration Boundary:** When delegating, provide full URL so user can monitor (not truncated reference)
300
-
301
- **Core Fix:** URLs are INTERFACES to work, not informational metadata. Treat them as action items, not decorations.