sublation-os 1.0.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 (52) hide show
  1. package/.claude/agents/sublation-os/implementation-verifier.md +141 -0
  2. package/.claude/agents/sublation-os/implementer-v2.md +542 -0
  3. package/.claude/agents/sublation-os/implementer.md +53 -0
  4. package/.claude/agents/sublation-os/product-planner.md +210 -0
  5. package/.claude/agents/sublation-os/spec-initializer.md +92 -0
  6. package/.claude/agents/sublation-os/spec-shaper.md +300 -0
  7. package/.claude/agents/sublation-os/spec-writer.md +139 -0
  8. package/.claude/agents/sublation-os/tasks-list-creator.md +236 -0
  9. package/.claude/commands/sublation-os/address-comments.md +74 -0
  10. package/.claude/commands/sublation-os/commit-message.md +84 -0
  11. package/.claude/commands/sublation-os/create-tasks.md +40 -0
  12. package/.claude/commands/sublation-os/implement-tasks.md +55 -0
  13. package/.claude/commands/sublation-os/investigate.md +164 -0
  14. package/.claude/commands/sublation-os/learn.md +131 -0
  15. package/.claude/commands/sublation-os/optimise.md +108 -0
  16. package/.claude/commands/sublation-os/plan-product.md +36 -0
  17. package/.claude/commands/sublation-os/pr-description.md +15 -0
  18. package/.claude/commands/sublation-os/recall.md +114 -0
  19. package/.claude/commands/sublation-os/review-v2.md +701 -0
  20. package/.claude/commands/sublation-os/review.md +12 -0
  21. package/.claude/commands/sublation-os/shape-spec.md +52 -0
  22. package/.claude/commands/sublation-os/test-plan.md +12 -0
  23. package/.claude/commands/sublation-os/write-spec.md +22 -0
  24. package/.sublation-os/config.yml +13 -0
  25. package/.sublation-os/memory/MEMORY_GUIDE.md +344 -0
  26. package/.sublation-os/memory/architecture-lessons.md +41 -0
  27. package/.sublation-os/memory/backend-lessons.md +41 -0
  28. package/.sublation-os/memory/frontend-lessons.md +41 -0
  29. package/.sublation-os/memory/general-lessons.md +41 -0
  30. package/.sublation-os/memory/index.md +94 -0
  31. package/.sublation-os/memory/learned-lessons.md +75 -0
  32. package/.sublation-os/memory/testing-lessons.md +41 -0
  33. package/.sublation-os/specs/.gitkeep +0 -0
  34. package/.sublation-os/standards/backend/api.md +10 -0
  35. package/.sublation-os/standards/backend/migrations.md +9 -0
  36. package/.sublation-os/standards/backend/models.md +10 -0
  37. package/.sublation-os/standards/backend/queries.md +9 -0
  38. package/.sublation-os/standards/frontend/accessibility.md +10 -0
  39. package/.sublation-os/standards/frontend/components.md +11 -0
  40. package/.sublation-os/standards/frontend/css.md +7 -0
  41. package/.sublation-os/standards/frontend/responsive.md +11 -0
  42. package/.sublation-os/standards/global/coding-style.md +10 -0
  43. package/.sublation-os/standards/global/commenting.md +5 -0
  44. package/.sublation-os/standards/global/conventions.md +11 -0
  45. package/.sublation-os/standards/global/error-handling.md +9 -0
  46. package/.sublation-os/standards/global/tech-stack.md +31 -0
  47. package/.sublation-os/standards/global/validation.md +11 -0
  48. package/.sublation-os/standards/testing/test-writing.md +9 -0
  49. package/LICENSE +21 -0
  50. package/README.md +155 -0
  51. package/bin/install.js +137 -0
  52. package/package.json +43 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ argument-hint: [message]
3
+ description: Diagnose errors using ReAct (Reasoning + Acting) methodology with iterative investigation
4
+ ---
5
+
6
+ You are investigating an error using the **ReAct (Reasoning + Acting)** approach, which combines systematic reasoning with targeted actions to diagnose issues.
7
+
8
+ ## Error to Investigate
9
+ $message
10
+
11
+ ---
12
+
13
+ ## Investigation Process
14
+
15
+ Use the **Thought-Action-Observation** loop iteratively until the root cause is identified. Document each cycle clearly.
16
+
17
+ ### Investigation Cycle 1: Initial Analysis
18
+
19
+ **THOUGHT**:
20
+ Analyze the error systematically before taking action:
21
+ - What does the error message tell me? (error type, location, context)
22
+ - Based on the error type, what are the 3 most likely causes?
23
+ - What information would help me confirm or eliminate these hypotheses?
24
+ - What should I investigate first to get maximum diagnostic value?
25
+
26
+ **ACTION**:
27
+ {Describe what you're doing and why}
28
+ Examples:
29
+ - Read the file mentioned in the stack trace to understand context
30
+ - Search for recent changes to the affected code
31
+ - Check logs for related errors or warnings
32
+ - Examine configuration files
33
+ - Review related test files
34
+
35
+ **OBSERVATION**:
36
+ After completing the action, document what you learned:
37
+ - What did I find? (specific findings, not interpretations)
38
+ - Does this confirm or eliminate any hypotheses?
39
+ - What new questions or patterns emerge?
40
+ - Do I have enough information, or do I need another cycle?
41
+
42
+ ---
43
+
44
+ ### Investigation Cycle 2: Hypothesis Testing
45
+
46
+ **THOUGHT**:
47
+ Based on the previous observation, reason through the next step:
48
+ - Which hypothesis is most likely now? Why?
49
+ - What specific evidence would confirm or reject this hypothesis?
50
+ - What's the next best action to take?
51
+
52
+ **ACTION**:
53
+ {Targeted investigation based on your reasoning}
54
+
55
+ **OBSERVATION**:
56
+ {What you discovered and how it changes your understanding}
57
+
58
+ ---
59
+
60
+ ### Investigation Cycle 3-N: Iterative Deep Dive
61
+
62
+ **THOUGHT**: {Continue reasoning based on accumulated observations}
63
+ **ACTION**: {Continue investigating}
64
+ **OBSERVATION**: {Continue learning}
65
+
66
+ *Continue cycles until you have high confidence in the root cause (typically 3-5 cycles)*
67
+
68
+ ---
69
+
70
+ ## Root Cause Analysis
71
+
72
+ After completing investigation cycles, synthesize your findings:
73
+
74
+ ### 🎯 Root Cause
75
+ {Clear, specific statement of what's wrong - reference exact files and line numbers if possible}
76
+
77
+ ### 🔍 Evidence Trail
78
+ Document the key observations that led to this conclusion:
79
+ 1. {First key finding}
80
+ 2. {Second key finding}
81
+ 3. {Confirming evidence}
82
+
83
+ ### 📊 Confidence Level
84
+ **Confidence**: ⬛⬛⬛⬜⬜ (High/Medium/Low)
85
+
86
+ **Reasoning**: {Why are you confident or uncertain? What alternative explanations remain?}
87
+
88
+ ---
89
+
90
+ ## Resolution Plan
91
+
92
+ ### ✅ Recommended Fix
93
+
94
+ **THOUGHT**:
95
+ Given the root cause, what's the best approach to fix it?
96
+ - Consider multiple solutions if applicable
97
+ - Think through trade-offs and side effects
98
+ - Evaluate complexity and risk
99
+
100
+ **Primary Solution**:
101
+ {Detailed fix with code examples or specific changes}
102
+
103
+ **Why This Approach**:
104
+ {Reasoning for why this is the best solution}
105
+
106
+ **Alternative Solutions** (if applicable):
107
+ {Other viable approaches and why they weren't chosen}
108
+
109
+ ### 🧪 Verification Steps
110
+ How to confirm the fix works:
111
+ 1. {Specific test or check}
112
+ 2. {Expected outcome}
113
+ 3. {Additional validation}
114
+
115
+ ### ⚠️ Potential Side Effects
116
+ {Any risks or areas to watch after applying the fix}
117
+
118
+ ---
119
+
120
+ ## Documentation
121
+
122
+ Save this investigation report to:
123
+ `.sublation-os/investigations/[YYYY-MM-DD]-[brief-description].md`
124
+
125
+ Use this format for the filename:
126
+ - `2025-01-15-auth-token-expiry.md`
127
+ - `2025-01-15-database-connection-timeout.md`
128
+
129
+ ---
130
+
131
+ ## Quality Standards
132
+
133
+ **Good Investigation Example**:
134
+
135
+ **THOUGHT**: The error "Cannot read property 'map' of undefined" in UserList.tsx:45 suggests data isn't loaded. Most likely causes: (1) API call failed, (2) API returned unexpected format, (3) race condition in component mounting. I'll check the API call first since that's most common.
136
+
137
+ **ACTION**: Read UserList.tsx to see how data is fetched and when map() is called.
138
+
139
+ **OBSERVATION**: Line 45 calls users.map() but users comes from useState with no default value. The useEffect fetches users, but there's no loading state. The map() runs before data arrives.
140
+
141
+ ✅ **Specific and actionable**
142
+ ✅ **Clear reasoning documented**
143
+ ✅ **Each step builds on previous learning**
144
+
145
+ **Poor Investigation Example**:
146
+
147
+ **THOUGHT**: Something is wrong with the code.
148
+ **ACTION**: Look at files.
149
+ **OBSERVATION**: Found a problem.
150
+
151
+ ❌ **Too vague**
152
+ ❌ **No reasoning shown**
153
+ ❌ **Not helpful for learning**
154
+
155
+ ---
156
+
157
+ ## Integration with Memory System
158
+
159
+ After resolving the issue, consider running `/learn` to capture:
160
+ - The mistake or pattern that caused the issue
161
+ - How to detect similar issues in the future
162
+ - Codebase-specific gotchas discovered
163
+
164
+ This helps future debugging sessions by building institutional knowledge.
@@ -0,0 +1,131 @@
1
+ ---
2
+ description: Append a new learning entry to categorized memory files so it can be reloaded by the agent for future reasoning
3
+ model: sonnet
4
+ ---
5
+
6
+ You are capturing a learning moment from the current session to help future Claude sessions work more effectively on this codebase.
7
+
8
+ ## Your Task
9
+
10
+ Analyze the recent conversation context and generate a structured learning entry. Focus on:
11
+
12
+ 1. **What went wrong or required correction** (if applicable)
13
+ 2. **What pattern or practice should be followed**
14
+ 3. **Codebase-specific insights** (architecture, conventions, gotchas)
15
+ 4. **Tool usage patterns** that worked well or should be avoided
16
+
17
+ ## Step 1: Determine Category
18
+
19
+ First, determine which category this learning belongs to:
20
+
21
+ - **backend** - APIs, databases, services, server-side logic, data access
22
+ - **frontend** - UI components, state management, user interactions, styling
23
+ - **testing** - Testing strategies, frameworks, mocking, test organization
24
+ - **architecture** - System design, patterns, project structure, cross-cutting concerns
25
+ - **general** - Workflow, tooling, debugging, anything that doesn't fit above
26
+
27
+ The target file will be: `.sublation-os/memory/{category}-lessons.md`
28
+
29
+ ## Entry Format
30
+
31
+ Generate the entry in this exact format:
32
+
33
+ ```markdown
34
+ ## Entry {N} - {YYYY-MM-DD HH:mm}
35
+
36
+ ### 🧠 Context
37
+ {1-2 sentences: What happened? What was the task or correction?}
38
+
39
+ ### 📘 Lesson
40
+ {Core principle or insight as a durable rule. Be specific to this codebase when possible.}
41
+
42
+ ### ⚙️ Application
43
+ {How should this affect future reasoning? Be actionable and specific. Include:
44
+ - Which files/services/patterns this applies to
45
+ - What to check before making similar changes
46
+ - What tools or approaches work best}
47
+
48
+ ### 🧩 Example
49
+ {OPTIONAL: Concrete before/after or do/don't example}
50
+
51
+ ### 🏷️ Tags
52
+ {Comma-separated tags for searchability: e.g., "Work service, bulk operations, async patterns, testing"}
53
+
54
+ ---
55
+
56
+ ```
57
+
58
+ ## Instructions
59
+
60
+ 1. **Read the existing file** (if it exists) to:
61
+ - Determine the next entry number
62
+ - Ensure consistent formatting
63
+ - Avoid duplicate lessons
64
+
65
+ 2. **Generate the entry** with:
66
+ - Current timestamp in format: YYYY-MM-DD HH:mm
67
+ - Specific references to files, services, or patterns
68
+ - Tags for easy searching (service names, patterns, concepts)
69
+
70
+ 3. **Append to file**: `.sublation-os/memory/{category}-lessons.md`
71
+ - The file should already exist with a template header
72
+ - Append the new entry at the end of the file
73
+ - Ensure proper spacing between entries
74
+
75
+ 4. **Update index** (optional): If adding significant new tags or this is a notable learning, you may update `.sublation-os/memory/index.md` to add the new tags to the tag index
76
+
77
+ 5. **Confirm to user**:
78
+ - Show the generated entry
79
+ - Mention the category, entry number, and file location
80
+ - Suggest when this learning might be relevant
81
+
82
+ ## File Header (if creating new file)
83
+
84
+ ```markdown
85
+ # Learned Lessons
86
+
87
+ This file contains durable learnings from Claude Code sessions to help future sessions work more effectively on this codebase.
88
+
89
+ **Search tips:**
90
+ - Use Ctrl+F to find specific services or patterns
91
+ - Look for 🏷️ Tags sections to find related lessons
92
+ - Entries are chronological - recent ones are at the bottom
93
+
94
+ ---
95
+
96
+ ```
97
+
98
+ ## Quality Standards
99
+
100
+ - **Be specific**: "In Work service bulk operations, always use IWorkRepository.BulkUpdateAsync" not "Use async methods"
101
+ - **Be actionable**: "Check WorkRepository.cs:245 for the pattern" not "Follow existing patterns"
102
+ - **Be contextual**: Reference actual files, classes, methods when possible
103
+ - **Be relevant**: Focus on lessons that will help future Claude sessions, not general programming advice
104
+
105
+ ## Examples of Good Lessons
106
+
107
+ ✅ "When adding new bulk operations to Work service, use BulkUpdate domain entity pattern (WorkRepository.cs:245-280) rather than individual update loops. Provides better performance and progress tracking."
108
+
109
+ ✅ "AR service uses legacy .NET Framework 4.8. Cannot use C# 9+ features like records or init-only properties. Check .csproj TargetFramework before suggesting modern syntax."
110
+
111
+ ✅ "Multi-tenant queries MUST include TenantPermaKey filter. Found missing in WorkRepository.GetWorkItems - caused cross-tenant data leak in testing."
112
+
113
+ ❌ "Use async/await for better performance" (too generic)
114
+ ❌ "Follow SOLID principles" (not actionable)
115
+ ❌ "Write tests" (not specific to this codebase)
116
+
117
+ ## After Writing
118
+
119
+ Confirm to the user:
120
+ ```
121
+ ✅ Learning captured as Entry {N} in .sublation-os/memory/{category}-lessons.md
122
+
123
+ Category: {category}
124
+ This lesson will help future sessions with: {brief description}
125
+
126
+ You can search for it using tags: {list key tags}
127
+ ```
128
+
129
+ ## Notes on Legacy File
130
+
131
+ The original `learned-lessons.md` file is maintained for backward compatibility. New learnings should go to the categorized files, but you may still read the legacy file if it contains existing entries.
@@ -0,0 +1,108 @@
1
+ ---
2
+ description: Analyze this code for performance issues
3
+ ---
4
+
5
+ # Performance Optimization Analysis
6
+
7
+ You are a performance optimization specialist for .NET applications. Analyze the selected code or current context for performance issues and provide actionable recommendations.
8
+
9
+ ## Analysis Framework
10
+
11
+ ### 1. Identify Performance Issues
12
+ Scan for these common .NET performance bottlenecks:
13
+
14
+ **Database & ORM Issues:**
15
+ - N+1 query problems (especially with NHibernate)
16
+ - Missing indexes or inefficient queries
17
+ - Large result sets without pagination
18
+ - SELECT * queries instead of specific columns
19
+ - Unnecessary database round-trips
20
+ - Missing async/await for database operations
21
+
22
+ **Memory & Resource Issues:**
23
+ - Improper disposal of IDisposable resources
24
+ - Large object allocations
25
+ - String concatenation in loops (use StringBuilder)
26
+ - Boxing/unboxing of value types
27
+ - Memory leaks from event handlers or static references
28
+ - Inefficient LINQ queries causing multiple enumerations
29
+
30
+ **Concurrency & Threading:**
31
+ - Blocking calls on async code (`.Result`, `.Wait()`)
32
+ - Missing ConfigureAwait(false) in library code
33
+ - Improper use of locks or synchronization
34
+ - Thread pool starvation
35
+
36
+ **Algorithm & Logic Issues:**
37
+ - Inefficient algorithms (O(n²) when O(n) or O(log n) possible)
38
+ - Unnecessary loops or iterations
39
+ - Redundant computations
40
+ - Missing caching for expensive operations
41
+
42
+ **API & Network:**
43
+ - Synchronous I/O operations
44
+ - Chatty API calls (multiple calls when one would suffice)
45
+ - Missing response compression
46
+ - Large payloads without pagination
47
+
48
+ ### 2. Prioritize Issues
49
+ Rank findings by:
50
+ - **Impact**: High/Medium/Low performance impact
51
+ - **Effort**: Easy/Medium/Hard to fix
52
+ - **Risk**: Low/Medium/High risk of introducing bugs
53
+
54
+ ### 3. Provide Specific Recommendations
55
+ For each issue found:
56
+ 1. **What**: Clearly describe the problem
57
+ 2. **Where**: Reference specific file and line numbers (file_path:line_number)
58
+ 3. **Why**: Explain the performance impact with estimated improvement if possible
59
+ 4. **How**: Provide concrete code examples showing before/after
60
+ 5. **Trade-offs**: Mention any downsides or considerations
61
+
62
+ ### 4. Optimization Techniques
63
+ Consider these .NET-specific optimizations:
64
+ - Use `Span<T>` and `Memory<T>` for memory-intensive operations
65
+ - Leverage `ValueTask<T>` for frequently synchronous async methods
66
+ - Apply `readonly struct` for immutable value types
67
+ - Use `ArrayPool<T>` for temporary buffers
68
+ - Implement proper async patterns throughout the call stack
69
+ - Apply lazy initialization for expensive objects
70
+ - Use compiled queries for repeated NHibernate/EF queries
71
+
72
+ ## Output Format
73
+
74
+ Structure your analysis as:
75
+
76
+ ### 🔴 Critical Issues (Fix Immediately)
77
+ - Issue description with file location
78
+ - Performance impact and fix recommendation
79
+
80
+ ### 🟡 Significant Issues (Should Fix Soon)
81
+ - Issue description with file location
82
+ - Performance impact and fix recommendation
83
+
84
+ ### 🟢 Minor Improvements (Nice to Have)
85
+ - Issue description with file location
86
+ - Performance impact and fix recommendation
87
+
88
+ ### ✅ Good Practices Found
89
+ - Highlight any exemplary performance patterns
90
+
91
+ ### 📊 Estimated Overall Impact
92
+ - Provide realistic expectations for performance improvements
93
+
94
+ ## Context Awareness
95
+ - Consider the BalancedLabs multi-tenant architecture
96
+ - Account for NHibernate usage patterns
97
+ - Consider IIS hosting implications
98
+ - Be aware of SQL Server query optimization opportunities
99
+ - Reference the CLAUDE.md performance considerations
100
+
101
+ ## Deliverables
102
+ 1. Prioritized list of issues with file locations
103
+ 2. Code snippets showing recommended changes
104
+ 3. Rationale for each recommendation
105
+ 4. Estimated performance impact
106
+ 5. Implementation difficulty assessment
107
+
108
+ Begin your analysis now with the selected code or current file context.
@@ -0,0 +1,36 @@
1
+ ## Product Planning Process
2
+
3
+ You are helping to plan and document the mission, roadmap and tech stack for the current product. This will include:
4
+
5
+ - **Gathering Information**: The user's product vision, user personas, problems and key features
6
+ - **Mission Document**: Take what you've gathered and create a concise mission document
7
+ - **Roadmap**: Create a phased development plan with prioritized features
8
+ - **Tech stack**: Establish the technical stack used for all aspects of this product's codebase
9
+
10
+ This process will create these files in `.sublation-os/product/` directory.
11
+
12
+ ### PHASE 1: Gather Product Requirements
13
+
14
+ Use the **product-planner** subagent to create comprehensive product documentation.
15
+
16
+ IF the user has provided any details in regards to the product idea, its purpose, features list, target users and any other details then provide those to the **product-planner** subagent.
17
+
18
+ The product-planner will:
19
+ - Confirm (or gather) product idea, features, target users, confirm the tech stack and gather other details
20
+ - Create `.sublation-os/product/mission.md` with product vision and strategy
21
+ - Create `.sublation-os/product/roadmap.md` with phased development plan
22
+ - Create `.sublation-os/product/tech-stack.md` documenting all of this product's tech stack choices
23
+
24
+ ### PHASE 2: Inform the user
25
+
26
+ After all steps are complete, output the following to inform the user:
27
+
28
+ ```
29
+ Your product planning is all set!
30
+
31
+ ✅ Product mission: `.sublation-os/product/mission.md`
32
+ ✅ Product roadmap: `.sublation-os/product/roadmap.md`
33
+ ✅ Product tech stack: `.sublation-os/product/tech-stack.md`
34
+
35
+ NEXT STEP 👉 Run `/shape-spec` or `/write-spec` to start work on a feature!
36
+ ```
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Generate a pull request description
3
+ ---
4
+
5
+ ## Title
6
+ {Summarize the PR with a clear, concise title}
7
+
8
+ ## What does this PR do?
9
+ {Describe what this PR accomplishes from a product or user-facing perspective}
10
+
11
+ ## How does it do it?
12
+ {Explain the key code or architectural changes that implement the solution}
13
+
14
+ ## Notes / Validation (optional)
15
+ {Include any testing notes, known issues, or next steps if applicable}
@@ -0,0 +1,114 @@
1
+ ---
2
+ description: Search across all memory files to find relevant learnings by keyword or tag
3
+ model: haiku
4
+ ---
5
+
6
+ You are helping the user search for relevant learnings in the Sublation-OS memory system.
7
+
8
+ ## Your Task
9
+
10
+ Search across all memory files to find learnings that match the user's query. The user may search by:
11
+ - **Keywords** - Any text that might appear in context, lesson, or application sections
12
+ - **Tags** - Specific tags like `#performance`, `#database`, `#api`, etc.
13
+ - **Category** - backend, frontend, testing, architecture, general
14
+
15
+ ## Memory File Locations
16
+
17
+ Search in these files:
18
+ - `.sublation-os/memory/backend-lessons.md`
19
+ - `.sublation-os/memory/frontend-lessons.md`
20
+ - `.sublation-os/memory/testing-lessons.md`
21
+ - `.sublation-os/memory/architecture-lessons.md`
22
+ - `.sublation-os/memory/general-lessons.md`
23
+ - `.sublation-os/memory/learned-lessons.md` (legacy file for backward compatibility)
24
+
25
+ ## Instructions
26
+
27
+ 1. **Understand the query**: Analyze what the user is looking for
28
+ - If they mention a specific category, focus on that file first
29
+ - If they use a hashtag (e.g., `#performance`), search for tags
30
+ - Otherwise, search for keywords in all text content
31
+
32
+ 2. **Use Grep tool** to search across files:
33
+ - Use pattern matching for keywords or tags
34
+ - Search in all memory files unless user specified a category
35
+ - Use `-A` and `-B` flags to show context around matches
36
+
37
+ 3. **Present results**:
38
+ - Show entry number, date, and category for each match
39
+ - Display the relevant sections (Context, Lesson, Application)
40
+ - If many matches, show top 5 most relevant
41
+ - Include the file path for reference
42
+
43
+ 4. **Provide navigation**:
44
+ - Suggest related tags the user might want to search
45
+ - Mention how many total matches were found
46
+ - Offer to show more results if there are many
47
+
48
+ ## Example Search Patterns
49
+
50
+ **Search by tag:**
51
+ ```
52
+ User query: "performance"
53
+ → Use Grep with pattern: `#performance` or `performance` in all memory files
54
+ ```
55
+
56
+ **Search by keyword:**
57
+ ```
58
+ User query: "database queries"
59
+ → Use Grep with pattern: `database.*queries` or just `database` in all memory files
60
+ ```
61
+
62
+ **Search by category:**
63
+ ```
64
+ User query: "backend learnings about APIs"
65
+ → Focus on backend-lessons.md, search for `API` or `api`
66
+ ```
67
+
68
+ ## Output Format
69
+
70
+ Present results like this:
71
+
72
+ ```
73
+ 🔍 Found {N} learning(s) matching "{query}":
74
+
75
+ ---
76
+
77
+ **Entry {N} - {Category}** ({date})
78
+ File: .sublation-os/memory/{category}-lessons.md
79
+
80
+ ### 🧠 Context
81
+ {context text}
82
+
83
+ ### 📘 Lesson
84
+ {lesson text}
85
+
86
+ ### ⚙️ Application
87
+ {application text}
88
+
89
+ ### 🏷️ Tags
90
+ {tags}
91
+
92
+ ---
93
+
94
+ 💡 Related tags you might want to search: {suggested tags}
95
+ ```
96
+
97
+ ## If No Results
98
+
99
+ If no matches are found:
100
+ ```
101
+ ❌ No learnings found matching "{query}"
102
+
103
+ Suggestions:
104
+ - Try broader keywords
105
+ - Check spelling and try synonyms
106
+ - Browse categories: backend, frontend, testing, architecture, general
107
+ - Use `/sublation-os:learn` to capture a new learning on this topic
108
+ ```
109
+
110
+ ## Additional Features
111
+
112
+ - If user asks to "show more", display additional results beyond the first 5
113
+ - If user wants to see a specific entry in full, read that file and show the complete entry
114
+ - Suggest creating a new learning if the topic isn't well covered