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,94 @@
1
+ # Memory System Index
2
+
3
+ This index helps you quickly find relevant learnings across all memory files in the Sublation-OS framework.
4
+
5
+ **Last Updated:** 2025-11-04
6
+
7
+ ---
8
+
9
+ ## 📚 Table of Contents
10
+
11
+ ### Learning Categories
12
+
13
+ 1. **[Backend Lessons](backend-lessons.md)** - APIs, databases, services, server-side logic
14
+ 2. **[Frontend Lessons](frontend-lessons.md)** - UI components, state management, user interactions
15
+ 3. **[Testing Lessons](testing-lessons.md)** - Testing strategies, frameworks, mocking, QA
16
+ 4. **[Architecture Lessons](architecture-lessons.md)** - System design, patterns, project structure
17
+ 5. **[General Lessons](general-lessons.md)** - Workflow, tooling, debugging, cross-functional
18
+
19
+ ### Legacy Files
20
+
21
+ - **[learned-lessons.md](learned-lessons.md)** - Original unified file (maintained for backward compatibility)
22
+
23
+ ---
24
+
25
+ ## 🏷️ Tag Index
26
+
27
+ This section will be automatically updated as you add learnings. Use tags to find related lessons across categories.
28
+
29
+ ### Common Tags
30
+ - `#performance` - Performance optimization learnings
31
+ - `#database` - Database-related learnings
32
+ - `#api` - API design and implementation
33
+ - `#testing` - Testing strategies and techniques
34
+ - `#security` - Security best practices
35
+ - `#patterns` - Design patterns and architecture
36
+ - `#debugging` - Debugging techniques
37
+ - `#tooling` - Development tools and workflows
38
+
39
+ ---
40
+
41
+ ## 📝 Recent Learnings
42
+
43
+ *This section shows the most recent 10 learnings across all categories*
44
+
45
+ No learnings recorded yet. Use `/sublation-os:learn` to capture your first learning!
46
+
47
+ ---
48
+
49
+ ## 🔍 How to Search
50
+
51
+ ### By Category
52
+ 1. Click on the category link above to browse all learnings in that domain
53
+ 2. Each file is organized chronologically with the most recent learnings at the bottom
54
+
55
+ ### By Tag
56
+ 1. Find tags in the Tag Index section above
57
+ 2. Use Ctrl+F within category files to search for specific tags (format: `#tagname`)
58
+
59
+ ### By Keyword
60
+ 1. Use the `/sublation-os:recall` command to search across all memory files
61
+ 2. Or use Ctrl+F to search within specific category files
62
+
63
+ ---
64
+
65
+ ## ✍️ Adding New Learnings
66
+
67
+ Use the `/sublation-os:learn` command to capture new learnings. The command will:
68
+ 1. Prompt you to select a category (backend, frontend, testing, architecture, general)
69
+ 2. Guide you through providing context, lesson, application, and examples
70
+ 3. Automatically tag and organize the entry in the appropriate file
71
+ 4. Update this index with new tags and recent entries
72
+
73
+ ---
74
+
75
+ ## 🎯 Best Practices
76
+
77
+ 1. **Be Specific** - Include file paths, class names, method signatures
78
+ 2. **Be Actionable** - Provide clear steps for applying the lesson
79
+ 3. **Use Examples** - Show before/after code when possible
80
+ 4. **Tag Liberally** - Use 3-5 relevant tags per entry for better discoverability
81
+ 5. **Capture Immediately** - Record learnings right after discovery while context is fresh
82
+ 6. **Review Regularly** - Revisit old learnings to validate or update them
83
+
84
+ ---
85
+
86
+ ## 🤝 Team Collaboration
87
+
88
+ If using Sublation-OS in a team:
89
+ - Consider keeping memory files in version control to share learnings
90
+ - Review and discuss learnings during code reviews
91
+ - Use consistent tagging conventions across the team
92
+ - Archive or deprecate outdated learnings periodically
93
+
94
+ See [MEMORY_GUIDE.md](MEMORY_GUIDE.md) for detailed documentation on using the memory system.
@@ -0,0 +1,75 @@
1
+ # Learned Lessons
2
+
3
+ This file contains durable learnings from Claude Code sessions to help future sessions work more effectively on this codebase.
4
+
5
+ **Search tips:**
6
+ - Use Ctrl+F to find specific services or patterns
7
+ - Look for 🏷️ Tags sections to find related lessons
8
+ - Entries are chronological - recent ones are at the bottom
9
+
10
+ ---
11
+
12
+ ## Entry Template
13
+
14
+ ### 🧠 Context
15
+ Describe the situation or problem that led to this learning. What were you trying to accomplish?
16
+
17
+ ### 📘 Lesson
18
+ The key insight or principle learned. What should future Claude sessions remember?
19
+
20
+ ### ⚙️ Application
21
+ How to apply this lesson in practice. Specific steps or guidelines.
22
+
23
+ ### 🧩 Example (Optional)
24
+ Code examples showing the right and wrong way:
25
+
26
+ **❌ Wrong:**
27
+ ```language
28
+ // Anti-pattern code
29
+ ```
30
+
31
+ **✅ Correct:**
32
+ ```language
33
+ // Better approach
34
+ ```
35
+
36
+ ### 🏷️ Tags
37
+ `#tag1` `#tag2` `#tag3`
38
+
39
+ ---
40
+
41
+ ## Example Entry - 2025-01-01 12:00
42
+
43
+ ### 🧠 Context
44
+ When implementing a new feature that required database queries, the initial implementation was loading too much data into memory, causing performance issues.
45
+
46
+ ### 📘 Lesson
47
+ Always use pagination and projection when querying large datasets. Fetch only the fields you need, and limit the number of records returned in a single query.
48
+
49
+ ### ⚙️ Application
50
+ 1. Use `Select()` to project to DTOs with only required fields
51
+ 2. Use `Skip()` and `Take()` for pagination
52
+ 3. Add indexes on frequently filtered columns
53
+ 4. Monitor query execution time in development
54
+
55
+ ### 🧩 Example
56
+ **❌ Wrong - loads all entities:**
57
+ ```csharp
58
+ var items = dbContext.Items.ToList();
59
+ ```
60
+
61
+ **✅ Correct - paginated with projection:**
62
+ ```csharp
63
+ var items = dbContext.Items
64
+ .Select(i => new ItemDto { Id = i.Id, Name = i.Name })
65
+ .Skip(pageNumber * pageSize)
66
+ .Take(pageSize)
67
+ .ToList();
68
+ ```
69
+
70
+ ### 🏷️ Tags
71
+ `#performance` `#database` `#pagination`
72
+
73
+ ---
74
+
75
+ *Add your own learned lessons below this line. Each entry should follow the template above.*
@@ -0,0 +1,41 @@
1
+ # Testing Lessons
2
+
3
+ This file contains learnings specific to testing strategies, test frameworks, mocking, and quality assurance.
4
+
5
+ **Search tips:**
6
+ - Use Ctrl+F to find specific patterns or technologies
7
+ - Look for 🏷️ Tags sections to find related lessons
8
+ - Entries are chronological - recent ones are at the bottom
9
+
10
+ ---
11
+
12
+ ## Entry Template
13
+
14
+ ### 🧠 Context
15
+ Describe the situation or problem that led to this learning. What were you trying to accomplish?
16
+
17
+ ### 📘 Lesson
18
+ The key insight or principle learned. What should future Claude sessions remember?
19
+
20
+ ### ⚙️ Application
21
+ How to apply this lesson in practice. Specific steps or guidelines.
22
+
23
+ ### 🧩 Example (Optional)
24
+ Code examples showing the right and wrong way:
25
+
26
+ **❌ Wrong:**
27
+ ```language
28
+ // Anti-pattern code
29
+ ```
30
+
31
+ **✅ Correct:**
32
+ ```language
33
+ // Better approach
34
+ ```
35
+
36
+ ### 🏷️ Tags
37
+ `#tag1` `#tag2` `#tag3`
38
+
39
+ ---
40
+
41
+ *Add testing-specific learned lessons below this line.*
File without changes
@@ -0,0 +1,10 @@
1
+ ## API endpoint standards and conventions
2
+
3
+ - **RESTful Design**: Follow REST principles with clear resource-based URLs and appropriate HTTP methods (GET, POST, PUT, PATCH, DELETE)
4
+ - **Consistent Naming**: Use consistent, lowercase, hyphenated or underscored naming conventions for endpoints across the API
5
+ - **Versioning**: Implement API versioning strategy (URL path or headers) to manage breaking changes without disrupting existing clients
6
+ - **Plural Nouns**: Use plural nouns for resource endpoints (e.g., `/users`, `/products`) for consistency
7
+ - **Nested Resources**: Limit nesting depth to 2-3 levels maximum to keep URLs readable and maintainable
8
+ - **Query Parameters**: Use query parameters for filtering, sorting, pagination, and search rather than creating separate endpoints
9
+ - **HTTP Status Codes**: Return appropriate, consistent HTTP status codes that accurately reflect the response (200, 201, 400, 404, 500, etc.)
10
+ - **Rate Limiting Headers**: Include rate limit information in response headers to help clients manage their usage
@@ -0,0 +1,9 @@
1
+ ## Database migration best practices
2
+
3
+ - **Reversible Migrations**: Always implement rollback/down methods to enable safe migration reversals
4
+ - **Small, Focused Changes**: Keep each migration focused on a single logical change for clarity and easier troubleshooting
5
+ - **Zero-Downtime Deployments**: Consider deployment order and backwards compatibility for high-availability systems
6
+ - **Separate Schema and Data**: Keep schema changes separate from data migrations for better rollback safety
7
+ - **Index Management**: Create indexes on large tables carefully, using concurrent options when available to avoid locks
8
+ - **Naming Conventions**: Use clear, descriptive names that indicate what the migration does
9
+ - **Version Control**: Always commit migrations to version control and never modify existing migrations after deployment
@@ -0,0 +1,10 @@
1
+ ## Database model best practices
2
+
3
+ - **Clear Naming**: Use singular names for models and plural for tables following your framework's conventions
4
+ - **Timestamps**: Include created and updated timestamps on all tables for auditing and debugging
5
+ - **Data Integrity**: Use database constraints (NOT NULL, UNIQUE, foreign keys) to enforce data rules at the database level
6
+ - **Appropriate Data Types**: Choose data types that match the data's purpose and size requirements
7
+ - **Indexes on Foreign Keys**: Index foreign key columns and other frequently queried fields for performance
8
+ - **Validation at Multiple Layers**: Implement validation at both model and database levels for defense in depth
9
+ - **Relationship Clarity**: Define relationships clearly with appropriate cascade behaviors and naming conventions
10
+ - **Avoid Over-Normalization**: Balance normalization with practical query performance needs
@@ -0,0 +1,9 @@
1
+ ## Database query best practices
2
+
3
+ - **Prevent SQL Injection**: Always use parameterized queries or ORM methods; never interpolate user input into SQL strings
4
+ - **Avoid N+1 Queries**: Use eager loading or joins to fetch related data in a single query instead of multiple queries
5
+ - **Select Only Needed Data**: Request only the columns you need rather than using SELECT * for better performance
6
+ - **Index Strategic Columns**: Index columns used in WHERE, JOIN, and ORDER BY clauses for query optimization
7
+ - **Use Transactions for Related Changes**: Wrap related database operations in transactions to maintain data consistency
8
+ - **Set Query Timeouts**: Implement timeouts to prevent runaway queries from impacting system performance
9
+ - **Cache Expensive Queries**: Cache results of complex or frequently-run queries when appropriate
@@ -0,0 +1,10 @@
1
+ ## UI accessibility best practices
2
+
3
+ - **Semantic HTML**: Use appropriate HTML elements (nav, main, button, etc.) that convey meaning to assistive technologies
4
+ - **Keyboard Navigation**: Ensure all interactive elements are accessible via keyboard with visible focus indicators
5
+ - **Color Contrast**: Maintain sufficient contrast ratios (4.5:1 for normal text) and don't rely solely on color to convey information
6
+ - **Alternative Text**: Provide descriptive alt text for images and meaningful labels for all form inputs
7
+ - **Screen Reader Testing**: Test and verify that all views are accessible on screen reading devices.
8
+ - **ARIA When Needed**: Use ARIA attributes to enhance complex components when semantic HTML isn't sufficient
9
+ - **Logical Heading Structure**: Use heading levels (h1-h6) in proper order to create a clear document outline
10
+ - **Focus Management**: Manage focus appropriately in dynamic content, modals, and single-page applications
@@ -0,0 +1,11 @@
1
+ ## UI component best practices
2
+
3
+ - **Single Responsibility**: Each component should have one clear purpose and do it well
4
+ - **Reusability**: Design components to be reused across different contexts with configurable props
5
+ - **Composability**: Build complex UIs by combining smaller, simpler components rather than monolithic structures
6
+ - **Clear Interface**: Define explicit, well-documented props with sensible defaults for ease of use
7
+ - **Encapsulation**: Keep internal implementation details private and expose only necessary APIs
8
+ - **Consistent Naming**: Use clear, descriptive names that indicate the component's purpose and follow team conventions
9
+ - **State Management**: Keep state as local as possible; lift it up only when needed by multiple components
10
+ - **Minimal Props**: Keep the number of props manageable; if a component needs many props, consider composition or splitting it
11
+ - **Documentation**: Document component usage, props, and provide examples for easier adoption by team members
@@ -0,0 +1,7 @@
1
+ ## CSS best practices
2
+
3
+ - **Consistent Methodology**: Apply and stick to the project's consistent CSS methodology (Tailwind, BEM, utility classes, CSS modules, etc.) across the entire project
4
+ - **Avoid Overriding Framework Styles**: Work with your framework's patterns rather than fighting against them with excessive overrides
5
+ - **Maintain Design System**: Establish and document design tokens (colors, spacing, typography) for consistency
6
+ - **Minimize Custom CSS**: Leverage framework utilities and components to reduce custom CSS maintenance burden
7
+ - **Performance Considerations**: Optimize for production with CSS purging/tree-shaking to remove unused styles
@@ -0,0 +1,11 @@
1
+ ## Responsive design best practices
2
+
3
+ - **Mobile-First Development**: Start with mobile layout and progressively enhance for larger screens
4
+ - **Standard Breakpoints**: Consistently use standard breakpoints across the application (e.g., mobile, tablet, desktop)
5
+ - **Fluid Layouts**: Use percentage-based widths and flexible containers that adapt to screen size
6
+ - **Relative Units**: Prefer rem/em units over fixed pixels for better scalability and accessibility
7
+ - **Test Across Devices**: Test and verify UI changes across multiple screen sizes from mobile to tablet to desktop screen sizes and ensure a balanced, user-friendly viewing and reading experience on all
8
+ - **Touch-Friendly Design**: Ensure tap targets are appropriately sized (minimum 44x44px) for mobile users
9
+ - **Performance on Mobile**: Optimize images and assets for mobile network conditions and smaller screens
10
+ - **Readable Typography**: Maintain readable font sizes across all breakpoints without requiring zoom
11
+ - **Content Priority**: Show the most important content first on smaller screens through thoughtful layout decisions
@@ -0,0 +1,10 @@
1
+ ## Coding style best practices
2
+
3
+ - **Consistent Naming Conventions**: Establish and follow naming conventions for variables, functions, classes, and files across the codebase
4
+ - **Automated Formatting**: Maintain consistent code style (indenting, line breaks, etc.)
5
+ - **Meaningful Names**: Choose descriptive names that reveal intent; avoid abbreviations and single-letter variables except in narrow contexts
6
+ - **Small, Focused Functions**: Keep functions small and focused on a single task for better readability and testability
7
+ - **Consistent Indentation**: Use consistent indentation (spaces or tabs) and configure your editor/linter to enforce it
8
+ - **Remove Dead Code**: Delete unused code, commented-out blocks, and imports rather than leaving them as clutter
9
+ - **Backward compatability only when required:** Unless specifically instructed otherwise, assume you do not need to write additional code logic to handle backward compatability.
10
+ - **DRY Principle**: Avoid duplication by extracting common logic into reusable functions or modules
@@ -0,0 +1,5 @@
1
+ ## Code commenting best practices
2
+
3
+ - **Self-Documenting Code**: Write code that explains itself through clear structure and naming
4
+ - **Minimal, helpful comments**: Add concise, minimal comments to explain large sections of code logic.
5
+ - **Don't comment changes or fixes**: Do not leave code comments that speak to recent or temporary changes or fixes. Comments should be evergreen informational texts that are relevant far into the future.
@@ -0,0 +1,11 @@
1
+ ## General development conventions
2
+
3
+ - **Consistent Project Structure**: Organize files and directories in a predictable, logical structure that team members can navigate easily
4
+ - **Clear Documentation**: Maintain up-to-date README files with setup instructions, architecture overview, and contribution guidelines
5
+ - **Version Control Best Practices**: Use clear commit messages, feature branches, and meaningful pull/merge requests with descriptions
6
+ - **Environment Configuration**: Use environment variables for configuration; never commit secrets or API keys to version control
7
+ - **Dependency Management**: Keep dependencies up-to-date and minimal; document why major dependencies are used
8
+ - **Code Review Process**: Establish a consistent code review process with clear expectations for reviewers and authors
9
+ - **Testing Requirements**: Define what level of testing is required before merging (unit tests, integration tests, etc.)
10
+ - **Feature Flags**: Use feature flags for incomplete features rather than long-lived feature branches
11
+ - **Changelog Maintenance**: Keep a changelog or release notes to track significant changes and improvements
@@ -0,0 +1,9 @@
1
+ ## Error handling best practices
2
+
3
+ - **User-Friendly Messages**: Provide clear, actionable error messages to users without exposing technical details or security information
4
+ - **Fail Fast and Explicitly**: Validate input and check preconditions early; fail with clear error messages rather than allowing invalid state
5
+ - **Specific Exception Types**: Use specific exception/error types rather than generic ones to enable targeted handling
6
+ - **Centralized Error Handling**: Handle errors at appropriate boundaries (controllers, API layers) rather than scattering try-catch blocks everywhere
7
+ - **Graceful Degradation**: Design systems to degrade gracefully when non-critical services fail rather than breaking entirely
8
+ - **Retry Strategies**: Implement exponential backoff for transient failures in external service calls
9
+ - **Clean Up Resources**: Always clean up resources (file handles, connections) in finally blocks or equivalent mechanisms
@@ -0,0 +1,31 @@
1
+ ## Tech stack
2
+
3
+ Define your technical stack below. This serves as a reference for all team members and helps maintain consistency across the project.
4
+
5
+ ### Framework & Runtime
6
+ - **Application Framework:** [e.g., Rails, Django, Next.js, Express]
7
+ - **Language/Runtime:** [e.g., Ruby, Python, Node.js, Java]
8
+ - **Package Manager:** [e.g., bundler, pip, npm, yarn]
9
+
10
+ ### Frontend
11
+ - **JavaScript Framework:** [e.g., React, Vue, Svelte, Alpine, vanilla JS]
12
+ - **CSS Framework:** [e.g., Tailwind CSS, Bootstrap, custom]
13
+ - **UI Components:** [e.g., shadcn/ui, Material UI, custom library]
14
+
15
+ ### Database & Storage
16
+ - **Database:** [e.g., PostgreSQL, MySQL, MongoDB]
17
+ - **ORM/Query Builder:** [e.g., ActiveRecord, Prisma, Sequelize]
18
+ - **Caching:** [e.g., Redis, Memcached]
19
+
20
+ ### Testing & Quality
21
+ - **Test Framework:** [e.g., Jest, RSpec, pytest]
22
+ - **Linting/Formatting:** [e.g., ESLint, Prettier, RuboCop]
23
+
24
+ ### Deployment & Infrastructure
25
+ - **Hosting:** [e.g., Heroku, AWS, Vercel, Railway]
26
+ - **CI/CD:** [e.g., GitHub Actions, CircleCI]
27
+
28
+ ### Third-Party Services
29
+ - **Authentication:** [e.g., Auth0, Devise, NextAuth]
30
+ - **Email:** [e.g., SendGrid, Postmark]
31
+ - **Monitoring:** [e.g., Sentry, Datadog]
@@ -0,0 +1,11 @@
1
+ ## Validation best practices
2
+
3
+ - **Validate on Server Side**: Always validate on the server; never trust client-side validation alone for security or data integrity
4
+ - **Client-Side for UX**: Use client-side validation to provide immediate user feedback, but duplicate checks server-side
5
+ - **Fail Early**: Validate input as early as possible and reject invalid data before processing
6
+ - **Specific Error Messages**: Provide clear, field-specific error messages that help users correct their input
7
+ - **Allowlists Over Blocklists**: When possible, define what is allowed rather than trying to block everything that's not
8
+ - **Type and Format Validation**: Check data types, formats, ranges, and required fields systematically
9
+ - **Sanitize Input**: Sanitize user input to prevent injection attacks (SQL, XSS, command injection)
10
+ - **Business Rule Validation**: Validate business rules (e.g., sufficient balance, valid dates) at the appropriate application layer
11
+ - **Consistent Validation**: Apply validation consistently across all entry points (web forms, API endpoints, background jobs)
@@ -0,0 +1,9 @@
1
+ ## Test coverage best practices
2
+
3
+ - **Write Minimal Tests During Development**: Do NOT write tests for every change or intermediate step. Focus on completing the feature implementation first, then add strategic tests only at logical completion points
4
+ - **Test Only Core User Flows**: Write tests exclusively for critical paths and primary user workflows. Skip writing tests for non-critical utilities and secondary workflows until if/when you're instructed to do so.
5
+ - **Defer Edge Case Testing**: Do NOT test edge cases, error states, or validation logic unless they are business-critical. These can be addressed in dedicated testing phases, not during feature development.
6
+ - **Test Behavior, Not Implementation**: Focus tests on what the code does, not how it does it, to reduce brittleness
7
+ - **Clear Test Names**: Use descriptive names that explain what's being tested and the expected outcome
8
+ - **Mock External Dependencies**: Isolate units by mocking databases, APIs, file systems, and other external services
9
+ - **Fast Execution**: Keep unit tests fast (milliseconds) so developers run them frequently during development
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sublation-OS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # Sublation-OS Framework
2
+
3
+ A comprehensive development framework for Claude Code that enhances your AI-assisted development workflow with standards, specifications, memory, and powerful agents.
4
+
5
+ ## What is Sublation-OS?
6
+
7
+ Sublation-OS is a framework that supercharges your Claude Code experience by providing:
8
+
9
+ - **📚 Standards Library**: Coding conventions, API design patterns, testing practices, and more
10
+ - **📋 Specification System**: Structured approach to feature planning with requirements, tasks, and verification
11
+ - **🧠 Memory System**: Durable learnings that persist across Claude Code sessions
12
+ - **🤖 Specialized Agents**: 7 powerful agents for implementing, verifying, and planning features
13
+ - **⚡ Slash Commands**: Quick commands for common workflows
14
+
15
+ ## Quick Start
16
+
17
+ ### Installation
18
+
19
+ Install Sublation-OS in your project with a single command:
20
+
21
+ ```bash
22
+ npx sublation-os
23
+ ```
24
+
25
+ That's it! The framework will be installed in your current directory.
26
+
27
+ For alternative installation methods (script installation, git submodules), see the [Installation Guide](INSTALL.md).
28
+
29
+ ### What Gets Installed
30
+
31
+ The installer will create/update these directories in your project:
32
+
33
+ ```
34
+ your-project/
35
+ ├── .sublation-os/ # Framework core
36
+ │ ├── config.yml # Configuration
37
+ │ ├── memory/ # Learned lessons
38
+ │ ├── specs/ # Feature specifications
39
+ │ └── standards/ # Coding standards
40
+ ├── .claude/
41
+ │ ├── agents/sublation-os/ # 7 specialized agents
42
+ │ └── commands/sublation-os/ # Slash commands
43
+ ```
44
+
45
+ ## Features
46
+
47
+ ### Standards Library
48
+
49
+ 15 comprehensive standards files covering:
50
+ - Backend development (API design, error handling, security)
51
+ - Frontend development (UI/UX, state management, accessibility)
52
+ - Data & Testing (database, testing practices)
53
+ - DevOps & Documentation
54
+
55
+ Customize these for your tech stack to give Claude Code consistent guidance.
56
+
57
+ ### Specification Workflow
58
+
59
+ Create structured specifications for new features:
60
+
61
+ 1. **Initialize**: Use the spec-initializer agent to create a new spec
62
+ 2. **Plan**: Define requirements, create task lists, gather visuals
63
+ 3. **Implement**: Follow the task list with the implementer agent
64
+ 4. **Verify**: Ensure end-to-end functionality with verification agent
65
+
66
+ ### Memory System
67
+
68
+ Capture durable learnings from each session:
69
+ - Anti-patterns discovered
70
+ - Performance optimizations
71
+ - Architecture decisions
72
+ - Gotchas and edge cases
73
+
74
+ Claude Code automatically loads these lessons in future sessions.
75
+
76
+ ### Slash Commands
77
+
78
+ Quick access to common workflows:
79
+
80
+ - `/sublation-os:learn` - Capture a learning
81
+ - `/sublation-os:plan-product` - Create product documentation
82
+ - `/sublation-os:create-tasks` - Generate task list from spec
83
+ - `/sublation-os:implement-tasks` - Implement tasks from spec
84
+ - `/sublation-os:commit-message` - Generate git commit message
85
+ - `/sublation-os:review` - Code review
86
+ - `/sublation-os:pr-description` - Generate PR description
87
+
88
+ ## Documentation
89
+
90
+ - [Installation Guide](INSTALL.md) - Detailed installation options
91
+ - [Setup Guide](docs/setup-guide.md) - First-time setup and customization
92
+ - [Updating Guide](docs/updating.md) - How to update the framework
93
+ - [Agents & Commands](docs/agents-and-commands.md) - Using the specialized agents
94
+ - [Customizing Standards](docs/customizing-standards.md) - Adapting to your tech stack
95
+
96
+ ## Philosophy
97
+
98
+ Sublation-OS is inspired by the philosophical concept of *Aufheben* (sublation) - the idea of preserving and transcending knowledge. Each development session builds on learnings from previous sessions, creating a continuously improving development experience.
99
+
100
+ ## Requirements
101
+
102
+ - [Claude Code](https://claude.ai/claude-code) - AI-powered CLI development tool
103
+ - [Node.js](https://nodejs.org/) (version 14 or higher) - For npx installation
104
+ - Git (optional, for submodule installation)
105
+
106
+ ## Updating
107
+
108
+ Sublation-OS separates framework files (commands, agents) from your project data (memory, standards, specs). Updates only replace framework files while preserving your data.
109
+
110
+ **Using npx (Recommended):**
111
+
112
+ Simply run the installer again to update to the latest version:
113
+
114
+ ```bash
115
+ npx sublation-os@latest
116
+ ```
117
+
118
+ The installer will detect your existing installation, create a backup, and update to the latest version.
119
+
120
+ **Using the update scripts:**
121
+
122
+ Linux/Mac:
123
+ ```bash
124
+ ./update-framework.sh
125
+ ```
126
+
127
+ Windows:
128
+ ```powershell
129
+ .\update-framework.ps1
130
+ ```
131
+
132
+ **Manual update:**
133
+ ```bash
134
+ # Clone the latest version
135
+ git clone https://github.com/nicolosaullo/sublation-os.git /tmp/sublation-os-update
136
+
137
+ # Update framework files only
138
+ rm -rf .claude/commands/sublation-os .claude/agents/sublation-os
139
+ cp -r /tmp/sublation-os-update/.claude/commands/sublation-os .claude/commands/
140
+ cp -r /tmp/sublation-os-update/.claude/agents/sublation-os .claude/agents/
141
+ ```
142
+
143
+ Your `.sublation-os/` directory (memory, standards, specs) remains untouched.
144
+
145
+ ## Contributing
146
+
147
+ Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
148
+
149
+ ## License
150
+
151
+ MIT License - see [LICENSE](LICENSE) for details.
152
+
153
+ ## Credits
154
+
155
+ Created to enhance Claude Code development workflows. Built with love for developers who want their AI assistant to remember and improve.