@ijfw/memory-server 1.3.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 (106) hide show
  1. package/bin/ijfw +27 -0
  2. package/bin/ijfw-dashboard +180 -0
  3. package/bin/ijfw-dispatch-plan +41 -0
  4. package/bin/ijfw-memorize +273 -0
  5. package/bin/ijfw-memory +51 -0
  6. package/fixtures/demo-target.js +28 -0
  7. package/package.json +53 -0
  8. package/src/api-client.js +190 -0
  9. package/src/audit-roster.js +315 -0
  10. package/src/caps.js +37 -0
  11. package/src/cold-scan-runner.mjs +37 -0
  12. package/src/compute/edges.js +155 -0
  13. package/src/compute/extract.js +560 -0
  14. package/src/compute/fts5.js +420 -0
  15. package/src/compute/graph-auto-index.js +191 -0
  16. package/src/compute/graph-lock.js +114 -0
  17. package/src/compute/index.js +18 -0
  18. package/src/compute/migration-runner.js +116 -0
  19. package/src/compute/migrations/001-initial.js +23 -0
  20. package/src/compute/migrations/002-porter-stemming-source.js +139 -0
  21. package/src/compute/migrations/003-tier-semantic.js +69 -0
  22. package/src/compute/migrations/004-kg-tables.js +83 -0
  23. package/src/compute/migrations/005-stale-candidate.js +72 -0
  24. package/src/compute/python-resolver.js +106 -0
  25. package/src/compute/runner-vm.js +185 -0
  26. package/src/compute/runner.js +416 -0
  27. package/src/compute/sandbox-detect.js +122 -0
  28. package/src/compute/sandbox-linux.js +164 -0
  29. package/src/compute/sandbox-macos.js +167 -0
  30. package/src/compute/sandbox-windows.js +63 -0
  31. package/src/compute/schema.sql +118 -0
  32. package/src/compute/staleness.js +239 -0
  33. package/src/compute/synonyms.js +367 -0
  34. package/src/compute/traverse.js +180 -0
  35. package/src/cost/aggregator.js +229 -0
  36. package/src/cost/pricing.js +134 -0
  37. package/src/cost/readers/claude.js +179 -0
  38. package/src/cost/readers/codex.js +131 -0
  39. package/src/cost/readers/gemini.js +111 -0
  40. package/src/cost/savings.js +243 -0
  41. package/src/cross-dispatcher.js +437 -0
  42. package/src/cross-orchestrator-cli.js +1885 -0
  43. package/src/cross-orchestrator.js +598 -0
  44. package/src/cross-project-search.js +114 -0
  45. package/src/dashboard-client.html +1180 -0
  46. package/src/dashboard-server.js +895 -0
  47. package/src/design-companion.js +81 -0
  48. package/src/dispatch/colon-syntax.js +732 -0
  49. package/src/dispatch-planner.js +235 -0
  50. package/src/dream/cooldown.js +105 -0
  51. package/src/dream/runner.mjs +373 -0
  52. package/src/dream/staleness-wiring.js +195 -0
  53. package/src/feedback-detector.js +57 -0
  54. package/src/hero-line.js +115 -0
  55. package/src/importers/claude-mem.js +152 -0
  56. package/src/importers/cli.js +311 -0
  57. package/src/importers/common.js +84 -0
  58. package/src/importers/discover.js +235 -0
  59. package/src/importers/rtk.js +107 -0
  60. package/src/intent-router.js +221 -0
  61. package/src/lib/atomic-io.js +201 -0
  62. package/src/lib/cache.js +33 -0
  63. package/src/lib/npm-view.js +104 -0
  64. package/src/lib/status-card.js +95 -0
  65. package/src/lib/token.js +85 -0
  66. package/src/memory/fts5.js +349 -0
  67. package/src/memory/migration-runner.js +116 -0
  68. package/src/memory/migrations/001-fts5-init.js +26 -0
  69. package/src/memory/migrations/002-tier-semantic.js +60 -0
  70. package/src/memory/migrations/003-stale-candidate.js +60 -0
  71. package/src/memory/reader.js +300 -0
  72. package/src/memory/recall-counter.js +76 -0
  73. package/src/memory/schema.sql +79 -0
  74. package/src/memory/search.js +431 -0
  75. package/src/memory/staleness.js +237 -0
  76. package/src/memory/tier-promotion.js +377 -0
  77. package/src/memory/tokenize.js +63 -0
  78. package/src/project-type-detector.js +866 -0
  79. package/src/prompt-check.js +171 -0
  80. package/src/ralph-allowlist.js +88 -0
  81. package/src/receipts.js +129 -0
  82. package/src/redactor.js +107 -0
  83. package/src/sandbox.js +275 -0
  84. package/src/sanitizer.js +69 -0
  85. package/src/scan-resume.js +167 -0
  86. package/src/schema.js +82 -0
  87. package/src/search-bm25.js +108 -0
  88. package/src/server.js +1414 -0
  89. package/src/swarm-config.js +80 -0
  90. package/src/trident/dispatch.js +211 -0
  91. package/src/trident/lens-health.js +253 -0
  92. package/src/update-apply.js +79 -0
  93. package/src/update-check.js +136 -0
  94. package/src/vectors.js +178 -0
  95. package/templates/design/bento-grid.md +84 -0
  96. package/templates/design/brutalist-luxe.md +82 -0
  97. package/templates/design/cinematic-dark.md +82 -0
  98. package/templates/design/data-dense-dashboard.md +88 -0
  99. package/templates/design/editorial-warm.md +81 -0
  100. package/templates/design/glassmorphic.md +84 -0
  101. package/templates/design/magazine-editorial.md +84 -0
  102. package/templates/design/maximalist-vibrant.md +85 -0
  103. package/templates/design/neo-swiss-tech.md +85 -0
  104. package/templates/design/swiss-minimal.md +80 -0
  105. package/templates/design/terminal-native.md +83 -0
  106. package/templates/design/warm-organic.md +84 -0
@@ -0,0 +1,84 @@
1
+ # Warm Organic - DESIGN.md
2
+
3
+ ## 1. Visual Theme & Atmosphere
4
+ Natural, approachable, and round - the aesthetic of products that feel like they were designed by someone who cares about you, not just your subscription. Warm sand backgrounds, earthy browns and greens, generous border-radius, and shadows that feel like sunlight rather than depth. It's professional without feeling corporate, friendly without feeling juvenile. Use for productivity tools, scheduling apps, CRMs, creator tools, internal tools, and any SaaS aimed at individuals and small teams who want calm and clarity.
5
+
6
+ ## 2. Color Palette & Roles
7
+ - `--color-bg`: #FAF6F0 (page background - warm sand)
8
+ - `--color-surface`: #FFFFFF (card/panel surface)
9
+ - `--color-surface-tint`: #F5F0E8 (subtle tinted surface for sidebars/sections)
10
+ - `--color-border`: #E8E0D4 (dividers, input borders)
11
+ - `--color-border-focus`: #C8B89A (focused border - warm tan)
12
+ - `--color-text-primary`: #2D2318 (headings, primary content - warm espresso)
13
+ - `--color-text-secondary`: #8C7B6B (supporting text, labels)
14
+ - `--color-text-placeholder`: #BFB0A0 (placeholder text)
15
+ - `--color-accent`: #2E7D5E (CTAs, links, highlights - forest green)
16
+ - `--color-accent-hover`: #235F47 (interactive accent state)
17
+ - `--color-accent-light`: rgba(46,125,94,0.1) (accent tint background)
18
+ - `--color-warm`: #C4784A (secondary warm accent - terracotta, use sparingly)
19
+
20
+ ## 3. Typography Rules
21
+ - **Display font**: Plus Jakarta Sans - Google Fonts - weights 400, 600, 700, 800
22
+ - **Body font**: Plus Jakarta Sans - Google Fonts - weights 400, 500
23
+ - **Mono font**: JetBrains Mono - for code, data, IDs
24
+ - **Scale**: Display 52px / H1 36px / H2 26px / H3 20px / Body 15px / Small 13px
25
+ - **Line height**: 1.7 for body / 1.2 for display
26
+ - **Letter spacing**: 0 for body / -0.01em for display
27
+ - **Font loading**: `@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono&display=swap')`
28
+
29
+ ## 4. Component Stylings
30
+ ### Buttons
31
+ Primary: `background: --color-accent`, white text, `font-weight: 600`, `border-radius: 12px`, `padding: 11px 24px`, `font-size: 15px`. Hover: `--color-accent-hover`. Secondary: `background: --color-surface`, `border: 1px solid --color-border`, `color: --color-text-primary`, `border-radius: 12px`. Both have `box-shadow: 0 1px 3px rgba(45,35,24,0.08)` on resting state.
32
+
33
+ ### Cards
34
+ `background: --color-surface`, `border: 1px solid --color-border`, `border-radius: 16px`, `padding: 24px`, `box-shadow: 0 2px 8px rgba(45,35,24,0.06)`. Hover: `box-shadow: 0 4px 16px rgba(45,35,24,0.1)`, `transform: translateY(-1px)`. Featured: `border-color: --color-accent`, `border-width: 1.5px`.
35
+
36
+ ### Navigation
37
+ Height 60px, `border-bottom: 1px solid --color-border`, background `--color-bg`. Logo: Plus Jakarta Sans weight 700. Nav items: 14px, `font-weight: 500`, `color: --color-text-secondary`. Active: `color: --color-accent`, `background: --color-accent-light`, `border-radius: 8px`, `padding: 6px 12px`. Sidebar variant: 240px, warm surface `--color-surface-tint`.
38
+
39
+ ### Inputs
40
+ `background: --color-surface`, `border: 1.5px solid --color-border`, `border-radius: 12px`, `padding: 10px 14px`, `font-size: 15px`, `color: --color-text-primary`. Focus: `border-color: --color-border-focus`, `box-shadow: 0 0 0 3px rgba(46,125,94,0.12)`. Placeholder: `--color-text-placeholder`. Labels: 13px, `font-weight: 600`, `color: --color-text-secondary`, margin-bottom 6px.
41
+
42
+ ### Badges / Chips
43
+ `background: --color-surface-tint`, `border: 1px solid --color-border`, `border-radius: 20px`, `padding: 4px 12px`, `font-size: 12px`, `font-weight: 600`, `color: --color-text-secondary`. Accent variant: `background: --color-accent-light`, `border-color: rgba(46,125,94,0.25)`, `color: --color-accent`. Warm variant: `background: rgba(196,120,74,0.1)`, `color: --color-warm`.
44
+
45
+ ## 5. Layout Principles
46
+ - **Grid**: 12-column, 24px gutters
47
+ - **Max width**: 1140px
48
+ - **Section padding**: 72px vertical
49
+ - **Spacing scale**: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 72px
50
+ - **Whitespace philosophy**: generous - the warmth of the palette needs room; crowded layouts fight the aesthetic
51
+
52
+ ## 6. Depth & Elevation
53
+ - **Surface hierarchy**: Level 0 = `--color-bg`, Level 1 = `--color-surface` (with warm shadow), Level 2 = modal with `box-shadow: 0 24px 64px rgba(45,35,24,0.15)`
54
+ - **Shadow tokens**: low = `0 1px 4px rgba(45,35,24,0.06)`; mid = `0 4px 16px rgba(45,35,24,0.08)`; high = `0 12px 40px rgba(45,35,24,0.12)`
55
+ - **Border usage**: 1px warm borders everywhere; `--color-border-focus` on interactive states; no purely decorative borders
56
+
57
+ ## 7. Do's and Don'ts
58
+ **Do:**
59
+ - Use `border-radius: 12-20px` on all interactive components - roundness is the system's signature
60
+ - Apply warm box-shadows (brown-tinted, low opacity) instead of neutral grey shadows
61
+ - Use the forest green accent for all positive actions; terracotta (`--color-warm`) for alerts or secondary actions only
62
+ - Give labels adequate margin from their inputs (6-8px) - this palette breathes
63
+ - Use `--color-surface-tint` for sidebar backgrounds and secondary panels to create gentle depth
64
+
65
+ **Don't:**
66
+ - Use cool grey shadows (`rgba(0,0,0,...)`) - warm shadows are load-bearing to the aesthetic
67
+ - Use border-radius below 10px on cards and buttons; it fights the organic feel
68
+ - Apply the terracotta `--color-warm` as a primary CTA - it reads as warning in this palette
69
+ - Use pure white or cool backgrounds; the warmth must persist across all surfaces
70
+ - Stack more than two card shadow levels in a single viewport
71
+
72
+ ## 8. Responsive Behavior
73
+ - **Mobile breakpoint**: 375px
74
+ - **Tablet breakpoint**: 768px
75
+ - **Touch targets**: minimum 44px (rounded components already tend toward this)
76
+ - **Typography scaling**: Display drops to 32px / H1 to 24px on mobile; body stays 15px
77
+ - **Layout collapse**: sidebar collapses to bottom tab bar; 12-col → single column; section padding reduces to 40px; cards go full-width with 16px side margin
78
+
79
+ ## 9. Agent Prompt Guide
80
+ Use these prompts with Claude Design or ijfw-design to stay on-system:
81
+
82
+ - **New screen**: "Build a [screen type] following the Warm Organic DESIGN.md. Match the color tokens and type scale exactly."
83
+ - **Component**: "Add a [component] that fits the Warm Organic aesthetic - reference section 4 for styling rules."
84
+ - **Variant**: "Create a [light/dark/compact] variant of this screen. Keep the same token names, adjust the values."