wogiflow 1.0.21 → 1.0.22

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 (121) hide show
  1. package/.claude/commands/wogi-bug.md +43 -0
  2. package/.claude/commands/wogi-bulk.md +144 -0
  3. package/.claude/commands/wogi-changelog.md +36 -0
  4. package/.claude/commands/wogi-compact.md +99 -0
  5. package/.claude/commands/wogi-config.md +50 -0
  6. package/.claude/commands/wogi-context.md +68 -0
  7. package/.claude/commands/wogi-correction.md +73 -0
  8. package/.claude/commands/wogi-debt.md +128 -0
  9. package/.claude/commands/wogi-deps.md +32 -0
  10. package/.claude/commands/wogi-epics.md +145 -0
  11. package/.claude/commands/wogi-export.md +100 -0
  12. package/.claude/commands/wogi-feature.md +149 -0
  13. package/.claude/commands/wogi-guided-edit.md +83 -0
  14. package/.claude/commands/wogi-health.md +43 -0
  15. package/.claude/commands/wogi-help.md +96 -0
  16. package/.claude/commands/wogi-hybrid-edit.md +36 -0
  17. package/.claude/commands/wogi-hybrid-off.md +24 -0
  18. package/.claude/commands/wogi-hybrid-setup.md +79 -0
  19. package/.claude/commands/wogi-hybrid-status.md +45 -0
  20. package/.claude/commands/wogi-hybrid.md +54 -0
  21. package/.claude/commands/wogi-import.md +44 -0
  22. package/.claude/commands/wogi-init.md +618 -0
  23. package/.claude/commands/wogi-log.md +38 -0
  24. package/.claude/commands/wogi-map-add.md +29 -0
  25. package/.claude/commands/wogi-map-check.md +35 -0
  26. package/.claude/commands/wogi-map-index.md +98 -0
  27. package/.claude/commands/wogi-map-scan.md +38 -0
  28. package/.claude/commands/wogi-map-sync.md +91 -0
  29. package/.claude/commands/wogi-map.md +33 -0
  30. package/.claude/commands/wogi-morning.md +65 -0
  31. package/.claude/commands/wogi-onboard.md +99 -0
  32. package/.claude/commands/wogi-plan.md +173 -0
  33. package/.claude/commands/wogi-ready.md +84 -0
  34. package/.claude/commands/wogi-resume.md +95 -0
  35. package/.claude/commands/wogi-review.md +636 -0
  36. package/.claude/commands/wogi-roadmap.md +241 -0
  37. package/.claude/commands/wogi-rules.md +104 -0
  38. package/.claude/commands/wogi-search.md +33 -0
  39. package/.claude/commands/wogi-session-end.md +49 -0
  40. package/.claude/commands/wogi-setup-stack.md +151 -0
  41. package/.claude/commands/wogi-skill-learn.md +66 -0
  42. package/.claude/commands/wogi-skills.md +87 -0
  43. package/.claude/commands/wogi-standup.md +28 -0
  44. package/.claude/commands/wogi-start.md +465 -0
  45. package/.claude/commands/wogi-status.md +41 -0
  46. package/.claude/commands/wogi-statusline-setup/skill.md +109 -0
  47. package/.claude/commands/wogi-story.md +98 -0
  48. package/.claude/commands/wogi-suspend.md +87 -0
  49. package/.claude/commands/wogi-test-browser.md +43 -0
  50. package/.claude/commands/wogi-trace.md +198 -0
  51. package/.claude/docs/architecture.md +37 -0
  52. package/.claude/docs/commands.md +343 -0
  53. package/.claude/docs/knowledge-base/01-setup-onboarding/README.md +177 -0
  54. package/.claude/docs/knowledge-base/01-setup-onboarding/component-indexing.md +341 -0
  55. package/.claude/docs/knowledge-base/01-setup-onboarding/framework-detection.md +269 -0
  56. package/.claude/docs/knowledge-base/01-setup-onboarding/installation.md +146 -0
  57. package/.claude/docs/knowledge-base/01-setup-onboarding/onboarding-existing.md +317 -0
  58. package/.claude/docs/knowledge-base/01-setup-onboarding/team-setup.md +346 -0
  59. package/.claude/docs/knowledge-base/02-task-execution/01-task-planning.md +259 -0
  60. package/.claude/docs/knowledge-base/02-task-execution/02-execution-loop.md +443 -0
  61. package/.claude/docs/knowledge-base/02-task-execution/03-verification.md +417 -0
  62. package/.claude/docs/knowledge-base/02-task-execution/04-completion.md +374 -0
  63. package/.claude/docs/knowledge-base/02-task-execution/05-session-review.md +170 -0
  64. package/.claude/docs/knowledge-base/02-task-execution/README.md +173 -0
  65. package/.claude/docs/knowledge-base/02-task-execution/external-integrations.md +133 -0
  66. package/.claude/docs/knowledge-base/02-task-execution/model-management.md +202 -0
  67. package/.claude/docs/knowledge-base/02-task-execution/specification-mode.md +292 -0
  68. package/.claude/docs/knowledge-base/02-task-execution/sync-daemon.md +96 -0
  69. package/.claude/docs/knowledge-base/02-task-execution/trade-offs.md +345 -0
  70. package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +357 -0
  71. package/.claude/docs/knowledge-base/03-self-improvement/README.md +199 -0
  72. package/.claude/docs/knowledge-base/03-self-improvement/long-input-processing.md +160 -0
  73. package/.claude/docs/knowledge-base/03-self-improvement/model-learning.md +334 -0
  74. package/.claude/docs/knowledge-base/03-self-improvement/project-learning.md +301 -0
  75. package/.claude/docs/knowledge-base/03-self-improvement/skill-learning.md +372 -0
  76. package/.claude/docs/knowledge-base/03-self-improvement/skill-matching.md +304 -0
  77. package/.claude/docs/knowledge-base/03-self-improvement/team-learning.md +342 -0
  78. package/.claude/docs/knowledge-base/04-memory-context/README.md +189 -0
  79. package/.claude/docs/knowledge-base/04-memory-context/context-management.md +308 -0
  80. package/.claude/docs/knowledge-base/04-memory-context/memory-commands.md +176 -0
  81. package/.claude/docs/knowledge-base/04-memory-context/memory-systems.md +359 -0
  82. package/.claude/docs/knowledge-base/04-memory-context/prd-management.md +115 -0
  83. package/.claude/docs/knowledge-base/04-memory-context/session-persistence.md +359 -0
  84. package/.claude/docs/knowledge-base/04-memory-context/team-history.md +317 -0
  85. package/.claude/docs/knowledge-base/05-development-tools/README.md +84 -0
  86. package/.claude/docs/knowledge-base/05-development-tools/code-traces.md +278 -0
  87. package/.claude/docs/knowledge-base/05-development-tools/figma-analyzer.md +253 -0
  88. package/.claude/docs/knowledge-base/05-development-tools/guided-edit.md +173 -0
  89. package/.claude/docs/knowledge-base/05-development-tools/mcp-integrations.md +286 -0
  90. package/.claude/docs/knowledge-base/06-safety-guardrails/README.md +153 -0
  91. package/.claude/docs/knowledge-base/06-safety-guardrails/checkpoint-rollback.md +302 -0
  92. package/.claude/docs/knowledge-base/06-safety-guardrails/commit-gates.md +309 -0
  93. package/.claude/docs/knowledge-base/06-safety-guardrails/damage-control.md +292 -0
  94. package/.claude/docs/knowledge-base/06-safety-guardrails/security-scanning.md +291 -0
  95. package/.claude/docs/knowledge-base/README.md +92 -0
  96. package/.claude/docs/knowledge-base/configuration/README.md +228 -0
  97. package/.claude/docs/knowledge-base/configuration/all-options.md +1632 -0
  98. package/.claude/docs/knowledge-base/future-features.md +277 -0
  99. package/.claude/docs/stack.md +25 -0
  100. package/.claude/docs/testing.md +71 -0
  101. package/.claude/rules/README.md +60 -0
  102. package/.claude/rules/architecture/component-reuse.md +38 -0
  103. package/.claude/rules/architecture/document-structure.md +76 -0
  104. package/.claude/rules/architecture/feature-refactoring-cleanup.md +87 -0
  105. package/.claude/rules/architecture/model-management.md +35 -0
  106. package/.claude/rules/code-style/naming-conventions.md +55 -0
  107. package/.claude/rules/security/security-patterns.md +116 -0
  108. package/.claude/skills/.gitkeep +0 -0
  109. package/.claude/skills/README.md +131 -0
  110. package/.claude/skills/_template/commands/.gitkeep +0 -0
  111. package/.claude/skills/_template/knowledge/anti-patterns.md +49 -0
  112. package/.claude/skills/_template/knowledge/learnings.md +60 -0
  113. package/.claude/skills/_template/knowledge/patterns.md +45 -0
  114. package/.claude/skills/_template/rules/.gitkeep +0 -0
  115. package/.claude/skills/_template/skill.md +99 -0
  116. package/.claude/skills/_template/templates/.gitkeep +0 -0
  117. package/.claude/skills/figma-analyzer/knowledge/anti-patterns.md +216 -0
  118. package/.claude/skills/figma-analyzer/knowledge/patterns.md +144 -0
  119. package/.claude/skills/figma-analyzer/skill.md +236 -0
  120. package/lib/installer.js +59 -19
  121. package/package.json +5 -1
@@ -0,0 +1,359 @@
1
+ # Memory Systems
2
+
3
+ Facts, relevance decay, and memory tiers.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ WogiFlow has multiple memory systems:
10
+ - **Local Facts**: Project-specific knowledge
11
+ - **Memory Blocks**: Current session context
12
+ - **Relevance Decay**: Time-based importance
13
+ - **Automatic Memory**: Self-managing storage
14
+
15
+ ---
16
+
17
+ ## Configuration
18
+
19
+ ```json
20
+ {
21
+ "memory": {
22
+ "enabled": true,
23
+ "localDb": ".workflow/memory/local.db",
24
+ "embeddingModel": "Xenova/all-MiniLM-L6-v2",
25
+ "maxLocalFacts": 1000,
26
+ "autoRemember": false
27
+ },
28
+ "automaticMemory": {
29
+ "enabled": true,
30
+ "entropyThreshold": 0.7,
31
+ "compactOnSessionEnd": true,
32
+ "relevanceDecay": {
33
+ "enabled": true,
34
+ "decayRate": 0.033,
35
+ "neverAccessedPenalty": 0.1
36
+ },
37
+ "demotion": {
38
+ "relevanceThreshold": 0.3,
39
+ "coldRetentionDays": 90
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Local Facts
48
+
49
+ Stored in SQLite database:
50
+
51
+ ```
52
+ .workflow/memory/local.db
53
+ ```
54
+
55
+ ### Fact Structure
56
+
57
+ ```json
58
+ {
59
+ "id": "fact-001",
60
+ "content": "API tokens expire after 1 hour",
61
+ "category": "architecture",
62
+ "relevance": 0.95,
63
+ "createdAt": "2024-01-15T10:30:00Z",
64
+ "lastAccessed": "2024-01-15T14:00:00Z",
65
+ "accessCount": 3
66
+ }
67
+ ```
68
+
69
+ ### Categories
70
+
71
+ | Category | Purpose |
72
+ |----------|---------|
73
+ | architecture | Structural decisions |
74
+ | pattern | Coding patterns |
75
+ | convention | Team conventions |
76
+ | context | Project-specific context |
77
+ | temporary | Short-term facts |
78
+
79
+ ---
80
+
81
+ ## Memory Blocks
82
+
83
+ Active session context:
84
+
85
+ ```javascript
86
+ const memoryBlocks = {
87
+ currentTask: {
88
+ id: "TASK-015",
89
+ title: "Add authentication",
90
+ acceptanceCriteria: [...]
91
+ },
92
+ keyFacts: [
93
+ "Using JWT tokens with refresh",
94
+ "Auth state in Zustand store"
95
+ ],
96
+ recentFiles: [
97
+ "src/services/AuthService.ts",
98
+ "src/components/LoginForm.tsx"
99
+ ],
100
+ importantDecisions: [
101
+ "Use localStorage for tokens",
102
+ "1 hour token expiry"
103
+ ]
104
+ };
105
+ ```
106
+
107
+ ### Operations
108
+
109
+ ```javascript
110
+ // Add fact
111
+ addKeyFact("API uses v2 endpoints");
112
+
113
+ // Set current task
114
+ setCurrentTask("TASK-015", "Add authentication");
115
+
116
+ // Clear on completion
117
+ clearCurrentTask();
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Relevance Decay
123
+
124
+ Facts become less relevant over time:
125
+
126
+ ```
127
+ Relevance Score
128
+
129
+ 1.0 ├──────╮
130
+ │ ╲
131
+ 0.8 │ ╲
132
+ │ ╲ decay rate: 0.033
133
+ 0.6 │ ╲
134
+ │ ╲
135
+ 0.4 │ ╲
136
+ │ ╲
137
+ 0.2 │──────────────╲─────────────
138
+ │ threshold (demotion)
139
+ 0.0 └─────────────────────────────▶
140
+ 0 10 20 30 40 days
141
+ ```
142
+
143
+ ### Configuration
144
+
145
+ ```json
146
+ {
147
+ "automaticMemory": {
148
+ "relevanceDecay": {
149
+ "enabled": true,
150
+ "decayRate": 0.033, // ~3% per day
151
+ "neverAccessedPenalty": 0.1 // Extra penalty if never used
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ ### Decay Formula
158
+
159
+ ```
160
+ newRelevance = currentRelevance * (1 - decayRate) ^ daysSinceAccess
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Memory Tiers
166
+
167
+ Facts move through tiers based on relevance:
168
+
169
+ ```
170
+ ┌─────────────────────────────────────────────────────────────┐
171
+ │ MEMORY TIERS │
172
+ ├─────────────────────────────────────────────────────────────┤
173
+ │ │
174
+ │ ┌─────────────────┐ │
175
+ │ │ HOT MEMORY │ Relevance > 0.7 │
176
+ │ │ Active context │ Always loaded │
177
+ │ └────────┬────────┘ │
178
+ │ │ decay │
179
+ │ ▼ │
180
+ │ ┌─────────────────┐ │
181
+ │ │ WARM MEMORY │ Relevance 0.3-0.7 │
182
+ │ │ Recent facts │ Loaded on demand │
183
+ │ └────────┬────────┘ │
184
+ │ │ decay │
185
+ │ ▼ │
186
+ │ ┌─────────────────┐ │
187
+ │ │ COLD MEMORY │ Relevance < 0.3 │
188
+ │ │ Archived │ Searchable only │
189
+ │ └────────┬────────┘ │
190
+ │ │ expires │
191
+ │ ▼ │
192
+ │ [Deleted] After coldRetentionDays │
193
+ │ │
194
+ └─────────────────────────────────────────────────────────────┘
195
+ ```
196
+
197
+ ### Demotion
198
+
199
+ ```json
200
+ {
201
+ "automaticMemory": {
202
+ "demotion": {
203
+ "relevanceThreshold": 0.3, // Below this → cold
204
+ "coldRetentionDays": 90 // Days before deletion
205
+ }
206
+ }
207
+ }
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Automatic Memory
213
+
214
+ Self-managing memory system:
215
+
216
+ ```json
217
+ {
218
+ "automaticMemory": {
219
+ "enabled": true,
220
+ "entropyThreshold": 0.7, // How "interesting" to remember
221
+ "compactOnSessionEnd": true
222
+ }
223
+ }
224
+ ```
225
+
226
+ ### What's Auto-Remembered
227
+
228
+ - Important decisions made
229
+ - Patterns discovered
230
+ - Key architectural choices
231
+ - Frequently referenced facts
232
+
233
+ ### Entropy Threshold
234
+
235
+ Higher = more selective (only very important facts)
236
+ Lower = more inclusive (remembers more)
237
+
238
+ ---
239
+
240
+ ## Self-Tuning
241
+
242
+ Automatic parameter adjustment:
243
+
244
+ ```json
245
+ {
246
+ "automaticMemory": {
247
+ "selfTuning": {
248
+ "enabled": false,
249
+ "adjustOnOverflow": true, // Adjust when memory full
250
+ "adjustOnFailures": true // Adjust when facts missed
251
+ }
252
+ }
253
+ }
254
+ ```
255
+
256
+ When enabled:
257
+ - Adjusts decay rate based on usage
258
+ - Adjusts threshold based on misses
259
+ - Optimizes for your usage patterns
260
+
261
+ ---
262
+
263
+ ## PRD Chunking
264
+
265
+ Large documents are chunked for efficient retrieval:
266
+
267
+ ```json
268
+ {
269
+ "prd": {
270
+ "enabled": true,
271
+ "maxContextTokens": 2000, // Max tokens per retrieval
272
+ "chunkSize": 500, // Tokens per chunk
273
+ "autoRetrieve": false // Auto-retrieve relevant chunks
274
+ }
275
+ }
276
+ ```
277
+
278
+ ### How It Works
279
+
280
+ 1. PRD is split into chunks
281
+ 2. Chunks are embedded for similarity search
282
+ 3. When relevant, matching chunks are retrieved
283
+ 4. Only needed context is loaded
284
+
285
+ ---
286
+
287
+ ## Fact Access
288
+
289
+ Facts gain relevance when accessed:
290
+
291
+ ```javascript
292
+ // When a fact is used
293
+ function accessFact(factId) {
294
+ fact.lastAccessed = new Date();
295
+ fact.accessCount++;
296
+ fact.relevance = recalculateRelevance(fact);
297
+ }
298
+ ```
299
+
300
+ Frequently used facts stay in hot memory.
301
+
302
+ ---
303
+
304
+ ## Commands
305
+
306
+ ```bash
307
+ # (Future) View memory stats
308
+ flow memory stats
309
+
310
+ # (Future) Search facts
311
+ flow memory search "authentication"
312
+
313
+ # Clear temporary facts
314
+ flow memory clear --temporary
315
+ ```
316
+
317
+ ---
318
+
319
+ ## Best Practices
320
+
321
+ 1. **Let Auto-Memory Work**: Don't manually manage everything
322
+ 2. **Mark Important Facts**: Explicitly add key facts
323
+ 3. **Review Periodically**: Check what's being remembered
324
+ 4. **Adjust Decay Rate**: Lower for stable projects
325
+ 5. **Use PRD Chunking**: For large documents
326
+
327
+ ---
328
+
329
+ ## Troubleshooting
330
+
331
+ ### Important Fact Forgotten
332
+
333
+ Check relevance score. If too low:
334
+ - Access the fact to boost relevance
335
+ - Lower decay rate in config
336
+ - Mark as permanent (future feature)
337
+
338
+ ### Memory Growing Too Large
339
+
340
+ Check maxLocalFacts setting:
341
+ ```json
342
+ {
343
+ "memory": {
344
+ "maxLocalFacts": 500
345
+ }
346
+ }
347
+ ```
348
+
349
+ ### Slow Retrieval
350
+
351
+ Consider reducing embeddingModel complexity or maxLocalFacts.
352
+
353
+ ---
354
+
355
+ ## Related
356
+
357
+ - [Context Management](./context-management.md) - Active context
358
+ - [Session Persistence](./session-persistence.md) - Session memory
359
+ - [Configuration](../configuration/all-options.md) - All settings
@@ -0,0 +1,115 @@
1
+ # PRD Management
2
+
3
+ Load and query Product Requirement Documents for task context.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ PRD Management allows you to load large specification documents and query relevant sections for specific tasks. PRDs are chunked and stored in the memory database for semantic retrieval.
10
+
11
+ **Script**: `flow-prd-manager.js`
12
+
13
+ ---
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ # Load a PRD into memory
19
+ flow prd load <file>
20
+
21
+ # Get relevant PRD context for a task
22
+ flow prd context "<task description>"
23
+
24
+ # List all loaded PRDs
25
+ flow prd list
26
+
27
+ # Clear all PRD data
28
+ flow prd clear
29
+ ```
30
+
31
+ ---
32
+
33
+ ## How It Works
34
+
35
+ ### 1. Loading
36
+
37
+ When you load a PRD:
38
+ 1. Document is parsed (Markdown, text, or JSON)
39
+ 2. Split into semantic chunks (~500-1000 tokens each)
40
+ 3. Embeddings generated for each chunk
41
+ 4. Stored in `.workflow/memory/local.db`
42
+
43
+ ### 2. Querying
44
+
45
+ When you request context:
46
+ 1. Task description is embedded
47
+ 2. Semantic search finds relevant chunks
48
+ 3. Top chunks returned with relevance scores
49
+
50
+ ---
51
+
52
+ ## Example Workflow
53
+
54
+ ```bash
55
+ # Load the product spec
56
+ flow prd load docs/product-spec.md
57
+
58
+ # Starting a task - get relevant requirements
59
+ flow prd context "implement user authentication"
60
+
61
+ # Output shows relevant PRD sections:
62
+ # - Section 3.2: Authentication Requirements
63
+ # - Section 5.1: Security Considerations
64
+ # - Section 2.4: User Stories - Login
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Supported Formats
70
+
71
+ | Format | Extension | Notes |
72
+ |--------|-----------|-------|
73
+ | Markdown | `.md` | Headers become section boundaries |
74
+ | Plain Text | `.txt` | Paragraph-based chunking |
75
+ | JSON | `.json` | Object-based chunking |
76
+
77
+ ---
78
+
79
+ ## Storage
80
+
81
+ PRD chunks are stored in SQLite:
82
+
83
+ ```sql
84
+ -- View loaded PRDs
85
+ SELECT DISTINCT source_file FROM prd_chunks;
86
+
87
+ -- Count chunks per PRD
88
+ SELECT source_file, COUNT(*) FROM prd_chunks GROUP BY source_file;
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Integration with Tasks
94
+
95
+ When starting a task with `/wogi-start`:
96
+ 1. System can auto-query PRD for task context
97
+ 2. Relevant requirements injected into prompt
98
+ 3. Helps maintain spec compliance
99
+
100
+ Enable in config:
101
+ ```json
102
+ {
103
+ "prd": {
104
+ "autoInject": true,
105
+ "maxChunks": 3
106
+ }
107
+ }
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Related
113
+
114
+ - [Memory Systems](./memory-systems.md) - How memory database works
115
+ - [Context Management](./context-management.md) - Token budget management