wayfind 2.0.71 → 2.0.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.71",
3
+ "version": "2.0.72",
4
4
  "description": "Team decision trail for AI-assisted development. The connective tissue between product, engineering, and strategy.",
5
5
  "bin": {
6
6
  "wayfind": "./bin/team-context.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.71",
3
+ "version": "2.0.72",
4
4
  "description": "Team decision trail for AI-assisted development. Session memory, decision journals, and team digests.",
5
5
  "author": {
6
6
  "name": "Wayfind",
package/setup.sh CHANGED
@@ -145,7 +145,6 @@ if [ ! -d "$SPEC_DIR" ]; then
145
145
  fi
146
146
 
147
147
  echo ""
148
- echo "Installing Wayfind for: $TOOL"
149
148
  [ "$DRY_RUN" = true ] && warn "Dry-run mode — no files will be modified"
150
149
  [ "$UPDATE" = true ] && warn "Update mode: overwriting hook scripts and commands (memory files untouched)"
151
150
 
@@ -184,23 +183,24 @@ case "$TOOL" in
184
183
  ;;
185
184
  esac
186
185
 
187
- # ── Step 1: Directories ────────────────────────────────────────────────────────
186
+ # ── Counters for aggregate output ─────────────────────────────────────────────
187
+
188
+ CONFIG_FILES=0
189
+ HOOKS_INSTALLED=0
190
+ COMMANDS_INSTALLED=0
191
+ MCP_OK=false
188
192
 
189
- header "Creating directories"
193
+ # ── Step 1: Directories ────────────────────────────────────────────────────────
190
194
 
191
195
  run mkdir -p "$MEMORY_SUBDIR/journal"
192
- log "Memory directories: $MEMORY_SUBDIR/journal"
193
196
 
194
197
  if [ "$TOOL" = "claude-code" ]; then
195
198
  run mkdir -p "$HOME/.claude/hooks"
196
199
  run mkdir -p "$HOME/.claude/commands"
197
- log "Claude Code hooks and commands directories"
198
200
  fi
199
201
 
200
202
  # ── Step 2: Global state file ─────────────────────────────────────────────────
201
203
 
202
- header "Global state file"
203
-
204
204
  if [ ! -f "$GLOBAL_STATE" ]; then
205
205
  if [ "$TOOL" = "claude-code" ]; then
206
206
  if [ "$DRY_RUN" = false ]; then
@@ -214,29 +214,18 @@ if [ ! -f "$GLOBAL_STATE" ]; then
214
214
  else
215
215
  run cp "$SCRIPT_DIR/templates/global.md" "$GLOBAL_STATE"
216
216
  fi
217
- log "Created $GLOBAL_STATE"
218
- else
219
- info "Already exists: $GLOBAL_STATE — skipped"
217
+ CONFIG_FILES=$((CONFIG_FILES + 1))
220
218
  fi
221
219
 
222
220
  # ── Step 3: Admin state file (team/personal split) ───────────────────────────
223
- # For team repos, use templates/team-state.md (committed, shared context).
224
- # For personal notes, use templates/personal-state.md (gitignored, private).
225
- # The admin state file at ADMIN_STATE is the non-repo catch-all (email, admin, misc).
226
-
227
- header "Admin state file"
228
221
 
229
222
  if [ ! -f "$ADMIN_STATE" ]; then
230
223
  run cp "$SCRIPT_DIR/templates/repo-state.md" "$ADMIN_STATE"
231
- log "Created $ADMIN_STATE"
232
- else
233
- info "Already exists: $ADMIN_STATE — skipped"
224
+ CONFIG_FILES=$((CONFIG_FILES + 1))
234
225
  fi
235
226
 
236
227
  # ── Step 3b: Persona configuration ────────────────────────────────────────────
237
228
 
238
- header "Persona configuration"
239
-
240
229
  case "$TOOL" in
241
230
  claude-code) PERSONAS_DIR="$HOME/.claude/team-context" ;;
242
231
  *) PERSONAS_DIR="$HOME/.ai-memory/team-context" ;;
@@ -246,15 +235,11 @@ PERSONAS_DEST="$PERSONAS_DIR/personas.json"
246
235
  if [ ! -f "$PERSONAS_DEST" ]; then
247
236
  run mkdir -p "$PERSONAS_DIR"
248
237
  run cp "$SCRIPT_DIR/templates/personas.json" "$PERSONAS_DEST"
249
- log "Created $PERSONAS_DEST (default personas — edit to customize)"
250
- else
251
- info "Already exists: $PERSONAS_DEST — skipped (your customizations are preserved)"
238
+ CONFIG_FILES=$((CONFIG_FILES + 1))
252
239
  fi
253
240
 
254
241
  # ── Step 4: Tool-specific files ───────────────────────────────────────────────
255
242
 
256
- header "Tool-specific files ($TOOL)"
257
-
258
243
  case "$TOOL" in
259
244
  claude-code)
260
245
  # Global CLAUDE.md fragment
@@ -263,9 +248,10 @@ case "$TOOL" in
263
248
  info "[dry-run] Would append Session State Protocol to $GLOBAL_CLAUDE_MD"
264
249
  else
265
250
  touch "$GLOBAL_CLAUDE_MD"
266
- append_if_missing "Session State Protocol" \
267
- "$(cat "$SPEC_DIR/CLAUDE.md-global-fragment.md")" \
268
- "$GLOBAL_CLAUDE_MD"
251
+ if ! grep -qF "Session State Protocol" "$GLOBAL_CLAUDE_MD" 2>/dev/null; then
252
+ cat "$SPEC_DIR/CLAUDE.md-global-fragment.md" >> "$GLOBAL_CLAUDE_MD"
253
+ CONFIG_FILES=$((CONFIG_FILES + 1))
254
+ fi
269
255
  fi
270
256
  fi
271
257
 
@@ -274,88 +260,63 @@ case "$TOOL" in
274
260
  if [ ! -f "$HOOK_DEST" ] || [ "$UPDATE" = true ]; then
275
261
  run cp "$SPEC_DIR/hooks/check-global-state.sh" "$HOOK_DEST"
276
262
  run chmod +x "$HOOK_DEST"
277
- log "Installed hook: $HOOK_DEST"
278
- else
279
- info "Hook already exists: $HOOK_DEST — skipped"
263
+ HOOKS_INSTALLED=$((HOOKS_INSTALLED + 1))
280
264
  fi
281
265
 
282
266
  SESSION_END_DEST="$HOME/.claude/hooks/session-end.sh"
283
267
  if [ ! -f "$SESSION_END_DEST" ] || [ "$UPDATE" = true ]; then
284
268
  run cp "$SPEC_DIR/hooks/session-end.sh" "$SESSION_END_DEST"
285
269
  run chmod +x "$SESSION_END_DEST"
286
- log "Installed hook: $SESSION_END_DEST"
287
- else
288
- info "Hook already exists: $SESSION_END_DEST — skipped"
270
+ HOOKS_INSTALLED=$((HOOKS_INSTALLED + 1))
289
271
  fi
290
272
 
291
- # init-memory command
273
+ # Commands
292
274
  CMD_DEST="$HOME/.claude/commands/init-memory.md"
293
275
  if [ ! -f "$CMD_DEST" ] || [ "$UPDATE" = true ]; then
294
276
  run cp "$SPEC_DIR/commands/init-memory.md" "$CMD_DEST"
295
- log "Installed command: /init-memory"
296
- else
297
- info "/init-memory command already exists — skipped"
277
+ COMMANDS_INSTALLED=$((COMMANDS_INSTALLED + 1))
298
278
  fi
299
279
 
300
- # doctor command
301
280
  DOCTOR_CMD_DEST="$HOME/.claude/commands/doctor.md"
302
281
  if [ ! -f "$DOCTOR_CMD_DEST" ] || [ "$UPDATE" = true ]; then
303
282
  run cp "$SPEC_DIR/commands/doctor.md" "$DOCTOR_CMD_DEST"
304
- log "Installed command: /doctor"
305
- else
306
- info "/doctor command already exists — skipped"
283
+ COMMANDS_INSTALLED=$((COMMANDS_INSTALLED + 1))
307
284
  fi
308
285
 
309
- # doctor.sh script
286
+ # Support scripts
310
287
  run mkdir -p "$HOME/.claude/team-context"
311
288
  DOCTOR_DEST="$HOME/.claude/team-context/doctor.sh"
312
289
  if [ ! -f "$DOCTOR_DEST" ] || [ "$UPDATE" = true ]; then
313
290
  run cp "$SCRIPT_DIR/doctor.sh" "$DOCTOR_DEST"
314
291
  run chmod +x "$DOCTOR_DEST"
315
- log "Installed doctor script: $DOCTOR_DEST"
316
- else
317
- info "doctor.sh already exists: $DOCTOR_DEST — skipped"
318
292
  fi
319
293
 
320
- # journal-summary.sh script
321
294
  JOURNAL_DEST="$HOME/.claude/team-context/journal-summary.sh"
322
295
  if [ ! -f "$JOURNAL_DEST" ] || [ "$UPDATE" = true ]; then
323
296
  run cp "$SCRIPT_DIR/journal-summary.sh" "$JOURNAL_DEST"
324
297
  run chmod +x "$JOURNAL_DEST"
325
- log "Installed journal summary script: $JOURNAL_DEST"
326
- else
327
- info "journal-summary.sh already exists: $JOURNAL_DEST — skipped"
328
298
  fi
329
299
 
330
- # /journal command
331
300
  JOURNAL_CMD_DEST="$HOME/.claude/commands/journal.md"
332
301
  if [ ! -f "$JOURNAL_CMD_DEST" ] || [ "$UPDATE" = true ]; then
333
302
  run cp "$SPEC_DIR/commands/journal.md" "$JOURNAL_CMD_DEST"
334
- log "Installed command: /journal"
335
- else
336
- info "/journal command already exists — skipped"
303
+ COMMANDS_INSTALLED=$((COMMANDS_INSTALLED + 1))
337
304
  fi
338
305
 
339
- # /init-team command
340
306
  TEAM_CMD_DEST="$HOME/.claude/commands/init-team.md"
341
307
  if [ ! -f "$TEAM_CMD_DEST" ] || [ "$UPDATE" = true ]; then
342
308
  if [ -f "$SPEC_DIR/commands/init-team.md" ]; then
343
309
  run cp "$SPEC_DIR/commands/init-team.md" "$TEAM_CMD_DEST"
344
- log "Installed command: /init-team"
310
+ COMMANDS_INSTALLED=$((COMMANDS_INSTALLED + 1))
345
311
  fi
346
- else
347
- info "/init-team command already exists — skipped"
348
312
  fi
349
313
 
350
- # /review-prs command
351
314
  REVIEW_CMD_DEST="$HOME/.claude/commands/review-prs.md"
352
315
  if [ ! -f "$REVIEW_CMD_DEST" ] || [ "$UPDATE" = true ]; then
353
316
  if [ -f "$SPEC_DIR/commands/review-prs.md" ]; then
354
317
  run cp "$SPEC_DIR/commands/review-prs.md" "$REVIEW_CMD_DEST"
355
- log "Installed command: /review-prs"
318
+ COMMANDS_INSTALLED=$((COMMANDS_INSTALLED + 1))
356
319
  fi
357
- else
358
- info "/review-prs command already exists — skipped"
359
320
  fi
360
321
 
361
322
  # settings.json — merge hooks, don't overwrite
@@ -365,7 +326,7 @@ case "$TOOL" in
365
326
 
366
327
  if [ ! -f "$SETTINGS" ]; then
367
328
  run cp "$SPEC_DIR/settings.json" "$SETTINGS"
368
- log "Created $SETTINGS with hook registration"
329
+ CONFIG_FILES=$((CONFIG_FILES + 1))
369
330
  else
370
331
  # Merge both hooks into existing settings.json using Python
371
332
  NEEDS_MERGE=false
@@ -426,7 +387,6 @@ with open(out_path, "w") as f:
426
387
  f.write("\n")
427
388
  PYEOF
428
389
  mv "$TMP_SETTINGS" "$SETTINGS"
429
- log "Merged hooks into existing $SETTINGS"
430
390
  else
431
391
  rm -f "$TMP_SETTINGS"
432
392
  warn "Could not auto-merge hooks into $SETTINGS (malformed JSON or python3 unavailable)."
@@ -435,8 +395,6 @@ PYEOF
435
395
  else
436
396
  info "[dry-run] Would merge hooks into $SETTINGS"
437
397
  fi
438
- else
439
- info "Hooks already registered in settings.json — skipped"
440
398
  fi
441
399
  fi
442
400
 
@@ -469,20 +427,19 @@ with open(out_path, "w") as f:
469
427
  f.write("\n")
470
428
  PYEOF
471
429
  mv "$TMP_SETTINGS" "$SETTINGS"
472
- log "Registered wayfind MCP server in ~/.claude/settings.json"
430
+ MCP_OK=true
473
431
  else
474
432
  rm -f "$TMP_SETTINGS"
475
- warn "Could not register MCP server — add manually to ~/.claude/settings.json:"
476
- warn " \"mcpServers\": { \"wayfind\": { \"command\": \"$MCP_BIN\" } }"
433
+ warn "Could not register MCP server — add manually to ~/.claude/settings.json"
477
434
  fi
478
435
  else
479
436
  info "[dry-run] Would register wayfind MCP server ($MCP_BIN) in $SETTINGS"
480
437
  fi
481
438
  else
482
- info "MCP server already registered in settings.json — skipped"
439
+ MCP_OK=true
483
440
  fi
484
441
  else
485
- warn "wayfind-mcp binary not found — skipping MCP registration. Re-run after npm install."
442
+ warn "wayfind-mcp not found — MCP registration skipped. Re-run setup after npm install."
486
443
  fi
487
444
 
488
445
  ;;
@@ -493,9 +450,7 @@ PYEOF
493
450
  GLOBAL_RULE="$HOME/.cursor/rules/ai-memory.mdc"
494
451
  if [ ! -f "$GLOBAL_RULE" ] || [ "${UPDATE:-false}" = true ]; then
495
452
  run cp "$SPEC_DIR/global-rule.mdc" "$GLOBAL_RULE"
496
- log "Installed global Cursor rule: $GLOBAL_RULE"
497
- else
498
- info "Global Cursor rule already exists — skipped"
453
+ CONFIG_FILES=$((CONFIG_FILES + 1))
499
454
  fi
500
455
 
501
456
  # Per-repo rule (if --repo was passed)
@@ -505,8 +460,7 @@ PYEOF
505
460
  run mkdir -p "$RULE_DIR"
506
461
  if [ ! -f "$RULE_DIR/memory.mdc" ] || [ "${UPDATE:-false}" = true ]; then
507
462
  run cp "$SPEC_DIR/repo-rule.mdc" "$RULE_DIR/memory.mdc"
508
- log "Installed repo rule: $RULE_DIR/memory.mdc"
509
- warn "Edit $RULE_DIR/memory.mdc to add repo name and initial status"
463
+ CONFIG_FILES=$((CONFIG_FILES + 1))
510
464
  else
511
465
  info "Repo rule already exists — skipped"
512
466
  fi
@@ -530,7 +484,7 @@ PYEOF
530
484
  if [ "$DRY_RUN" = false ]; then
531
485
  if [ ! -f "$CURSOR_MCP" ]; then
532
486
  printf '{\n "mcpServers": {\n "wayfind": {\n "command": "%s",\n "args": []\n }\n }\n}\n' "$CURSOR_MCP_BIN" > "$CURSOR_MCP"
533
- log "Created ~/.cursor/mcp.json with wayfind MCP server"
487
+ MCP_OK=true
534
488
  else
535
489
  TMP_MCP="$(mktemp)"
536
490
  if python3 - "$CURSOR_MCP" "$CURSOR_MCP_BIN" "$TMP_MCP" <<'PYEOF' 2>/dev/null; then
@@ -549,21 +503,20 @@ with open(out_path, "w") as f:
549
503
  f.write("\n")
550
504
  PYEOF
551
505
  mv "$TMP_MCP" "$CURSOR_MCP"
552
- log "Registered wayfind MCP server in ~/.cursor/mcp.json"
506
+ MCP_OK=true
553
507
  else
554
508
  rm -f "$TMP_MCP"
555
- warn "Could not register MCP server — add manually to ~/.cursor/mcp.json:"
556
- warn " \"mcpServers\": { \"wayfind\": { \"command\": \"$CURSOR_MCP_BIN\", \"args\": [] } }"
509
+ warn "Could not register MCP server — add manually to ~/.cursor/mcp.json"
557
510
  fi
558
511
  fi
559
512
  else
560
513
  info "[dry-run] Would register wayfind MCP server ($CURSOR_MCP_BIN) in ~/.cursor/mcp.json"
561
514
  fi
562
515
  else
563
- info "MCP server already registered in ~/.cursor/mcp.json — skipped"
516
+ MCP_OK=true
564
517
  fi
565
518
  else
566
- warn "wayfind-mcp binary not found — skipping Cursor MCP registration. Re-run after npm install."
519
+ warn "wayfind-mcp not found — MCP registration skipped. Re-run setup after npm install."
567
520
  fi
568
521
  ;;
569
522
 
@@ -591,7 +544,6 @@ if [ -n "$INSTALL_VERSION" ]; then
591
544
  TMP_VER="$(mktemp)"
592
545
  echo "$INSTALL_VERSION" > "$TMP_VER"
593
546
  mv "$TMP_VER" "$VERSION_DEST"
594
- log "Version v${INSTALL_VERSION} written to $VERSION_DEST"
595
547
  else
596
548
  info "[dry-run] Would write v${INSTALL_VERSION} to $KIT_DEST_DIR/.wayfind-version"
597
549
  fi
@@ -658,7 +610,27 @@ fi
658
610
  # ── Summary ──────────────────────────────────────────────────────────────────
659
611
 
660
612
  echo ""
661
- echo -e "${GREEN}✓${RESET} Wayfind installed."
613
+
614
+ # Aggregate summary of what was installed
615
+ SUMMARY_PARTS=""
616
+ [ "$CONFIG_FILES" -gt 0 ] && SUMMARY_PARTS="${SUMMARY_PARTS}${CONFIG_FILES} config files"
617
+ if [ "$HOOKS_INSTALLED" -gt 0 ]; then
618
+ [ -n "$SUMMARY_PARTS" ] && SUMMARY_PARTS="${SUMMARY_PARTS}, "
619
+ SUMMARY_PARTS="${SUMMARY_PARTS}${HOOKS_INSTALLED} hooks"
620
+ fi
621
+ if [ "$COMMANDS_INSTALLED" -gt 0 ]; then
622
+ [ -n "$SUMMARY_PARTS" ] && SUMMARY_PARTS="${SUMMARY_PARTS}, "
623
+ SUMMARY_PARTS="${SUMMARY_PARTS}${COMMANDS_INSTALLED} commands"
624
+ fi
625
+ if [ "$MCP_OK" = true ]; then
626
+ [ -n "$SUMMARY_PARTS" ] && SUMMARY_PARTS="${SUMMARY_PARTS}, "
627
+ SUMMARY_PARTS="${SUMMARY_PARTS}MCP server"
628
+ fi
629
+ if [ -n "$SUMMARY_PARTS" ]; then
630
+ log "Created ${SUMMARY_PARTS}"
631
+ fi
632
+
633
+ echo -e "${GREEN}✓${RESET} Wayfind installed for ${TOOL}."
662
634
  echo ""
663
635
 
664
636
  if [ "$TOOL" = "claude-code" ]; then