sxn 0.2.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 (156) hide show
  1. checksums.yaml +7 -0
  2. data/.gem_rbs_collection/addressable/2.8/.rbs_meta.yaml +9 -0
  3. data/.gem_rbs_collection/addressable/2.8/addressable.rbs +62 -0
  4. data/.gem_rbs_collection/async/2.12/.rbs_meta.yaml +9 -0
  5. data/.gem_rbs_collection/async/2.12/async.rbs +119 -0
  6. data/.gem_rbs_collection/async/2.12/kernel.rbs +5 -0
  7. data/.gem_rbs_collection/async/2.12/manifest.yaml +7 -0
  8. data/.gem_rbs_collection/bcrypt/3.1/.rbs_meta.yaml +9 -0
  9. data/.gem_rbs_collection/bcrypt/3.1/bcrypt.rbs +47 -0
  10. data/.gem_rbs_collection/bcrypt/3.1/manifest.yaml +2 -0
  11. data/.gem_rbs_collection/bigdecimal/3.1/.rbs_meta.yaml +9 -0
  12. data/.gem_rbs_collection/bigdecimal/3.1/bigdecimal-math.rbs +119 -0
  13. data/.gem_rbs_collection/bigdecimal/3.1/bigdecimal.rbs +1630 -0
  14. data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
  15. data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +4 -0
  16. data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +26 -0
  17. data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +4 -0
  18. data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +65 -0
  19. data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
  20. data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
  21. data/.gem_rbs_collection/diff-lcs/1.5/.rbs_meta.yaml +9 -0
  22. data/.gem_rbs_collection/diff-lcs/1.5/diff-lcs.rbs +11 -0
  23. data/.gem_rbs_collection/listen/3.9/.rbs_meta.yaml +9 -0
  24. data/.gem_rbs_collection/listen/3.9/listen.rbs +25 -0
  25. data/.gem_rbs_collection/listen/3.9/listener.rbs +24 -0
  26. data/.gem_rbs_collection/mini_mime/0.1/.rbs_meta.yaml +9 -0
  27. data/.gem_rbs_collection/mini_mime/0.1/mini_mime.rbs +14 -0
  28. data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
  29. data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
  30. data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
  31. data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
  32. data/.gem_rbs_collection/rake/13.0/rake.rbs +39 -0
  33. data/.gem_rbs_collection/rubocop-ast/1.46/.rbs_meta.yaml +9 -0
  34. data/.gem_rbs_collection/rubocop-ast/1.46/rubocop-ast.rbs +822 -0
  35. data/.gem_rbs_collection/sqlite3/2.0/.rbs_meta.yaml +9 -0
  36. data/.gem_rbs_collection/sqlite3/2.0/database.rbs +20 -0
  37. data/.gem_rbs_collection/sqlite3/2.0/pragmas.rbs +5 -0
  38. data/.rspec +4 -0
  39. data/.rubocop.yml +121 -0
  40. data/.simplecov +51 -0
  41. data/CHANGELOG.md +49 -0
  42. data/Gemfile +24 -0
  43. data/Gemfile.lock +329 -0
  44. data/LICENSE.txt +21 -0
  45. data/README.md +225 -0
  46. data/Rakefile +54 -0
  47. data/Steepfile +50 -0
  48. data/bin/sxn +6 -0
  49. data/lib/sxn/CLI.rb +275 -0
  50. data/lib/sxn/commands/init.rb +137 -0
  51. data/lib/sxn/commands/projects.rb +350 -0
  52. data/lib/sxn/commands/rules.rb +435 -0
  53. data/lib/sxn/commands/sessions.rb +300 -0
  54. data/lib/sxn/commands/worktrees.rb +416 -0
  55. data/lib/sxn/commands.rb +13 -0
  56. data/lib/sxn/config/config_cache.rb +295 -0
  57. data/lib/sxn/config/config_discovery.rb +242 -0
  58. data/lib/sxn/config/config_validator.rb +562 -0
  59. data/lib/sxn/config.rb +259 -0
  60. data/lib/sxn/core/config_manager.rb +290 -0
  61. data/lib/sxn/core/project_manager.rb +307 -0
  62. data/lib/sxn/core/rules_manager.rb +306 -0
  63. data/lib/sxn/core/session_manager.rb +336 -0
  64. data/lib/sxn/core/worktree_manager.rb +281 -0
  65. data/lib/sxn/core.rb +13 -0
  66. data/lib/sxn/database/errors.rb +29 -0
  67. data/lib/sxn/database/session_database.rb +691 -0
  68. data/lib/sxn/database.rb +24 -0
  69. data/lib/sxn/errors.rb +76 -0
  70. data/lib/sxn/rules/base_rule.rb +367 -0
  71. data/lib/sxn/rules/copy_files_rule.rb +346 -0
  72. data/lib/sxn/rules/errors.rb +28 -0
  73. data/lib/sxn/rules/project_detector.rb +871 -0
  74. data/lib/sxn/rules/rules_engine.rb +485 -0
  75. data/lib/sxn/rules/setup_commands_rule.rb +307 -0
  76. data/lib/sxn/rules/template_rule.rb +262 -0
  77. data/lib/sxn/rules.rb +148 -0
  78. data/lib/sxn/runtime_validations.rb +96 -0
  79. data/lib/sxn/security/secure_command_executor.rb +364 -0
  80. data/lib/sxn/security/secure_file_copier.rb +478 -0
  81. data/lib/sxn/security/secure_path_validator.rb +258 -0
  82. data/lib/sxn/security.rb +15 -0
  83. data/lib/sxn/templates/common/gitignore.liquid +99 -0
  84. data/lib/sxn/templates/common/session-info.md.liquid +58 -0
  85. data/lib/sxn/templates/errors.rb +36 -0
  86. data/lib/sxn/templates/javascript/README.md.liquid +59 -0
  87. data/lib/sxn/templates/javascript/session-info.md.liquid +206 -0
  88. data/lib/sxn/templates/rails/CLAUDE.md.liquid +78 -0
  89. data/lib/sxn/templates/rails/database.yml.liquid +31 -0
  90. data/lib/sxn/templates/rails/session-info.md.liquid +144 -0
  91. data/lib/sxn/templates/template_engine.rb +346 -0
  92. data/lib/sxn/templates/template_processor.rb +279 -0
  93. data/lib/sxn/templates/template_security.rb +410 -0
  94. data/lib/sxn/templates/template_variables.rb +713 -0
  95. data/lib/sxn/templates.rb +28 -0
  96. data/lib/sxn/ui/output.rb +103 -0
  97. data/lib/sxn/ui/progress_bar.rb +91 -0
  98. data/lib/sxn/ui/prompt.rb +116 -0
  99. data/lib/sxn/ui/table.rb +183 -0
  100. data/lib/sxn/ui.rb +12 -0
  101. data/lib/sxn/version.rb +5 -0
  102. data/lib/sxn.rb +63 -0
  103. data/rbs_collection.lock.yaml +180 -0
  104. data/rbs_collection.yaml +39 -0
  105. data/scripts/test.sh +31 -0
  106. data/sig/external/liquid.rbs +116 -0
  107. data/sig/external/thor.rbs +99 -0
  108. data/sig/external/tty.rbs +71 -0
  109. data/sig/sxn/cli.rbs +46 -0
  110. data/sig/sxn/commands/init.rbs +38 -0
  111. data/sig/sxn/commands/projects.rbs +72 -0
  112. data/sig/sxn/commands/rules.rbs +95 -0
  113. data/sig/sxn/commands/sessions.rbs +62 -0
  114. data/sig/sxn/commands/worktrees.rbs +82 -0
  115. data/sig/sxn/commands.rbs +6 -0
  116. data/sig/sxn/config/config_cache.rbs +67 -0
  117. data/sig/sxn/config/config_discovery.rbs +64 -0
  118. data/sig/sxn/config/config_validator.rbs +64 -0
  119. data/sig/sxn/config.rbs +74 -0
  120. data/sig/sxn/core/config_manager.rbs +67 -0
  121. data/sig/sxn/core/project_manager.rbs +52 -0
  122. data/sig/sxn/core/rules_manager.rbs +54 -0
  123. data/sig/sxn/core/session_manager.rbs +59 -0
  124. data/sig/sxn/core/worktree_manager.rbs +50 -0
  125. data/sig/sxn/core.rbs +87 -0
  126. data/sig/sxn/database/errors.rbs +37 -0
  127. data/sig/sxn/database/session_database.rbs +151 -0
  128. data/sig/sxn/database.rbs +83 -0
  129. data/sig/sxn/errors.rbs +89 -0
  130. data/sig/sxn/rules/base_rule.rbs +137 -0
  131. data/sig/sxn/rules/copy_files_rule.rbs +65 -0
  132. data/sig/sxn/rules/errors.rbs +33 -0
  133. data/sig/sxn/rules/project_detector.rbs +115 -0
  134. data/sig/sxn/rules/rules_engine.rbs +118 -0
  135. data/sig/sxn/rules/setup_commands_rule.rbs +60 -0
  136. data/sig/sxn/rules/template_rule.rbs +44 -0
  137. data/sig/sxn/rules.rbs +287 -0
  138. data/sig/sxn/runtime_validations.rbs +16 -0
  139. data/sig/sxn/security/secure_command_executor.rbs +63 -0
  140. data/sig/sxn/security/secure_file_copier.rbs +79 -0
  141. data/sig/sxn/security/secure_path_validator.rbs +30 -0
  142. data/sig/sxn/security.rbs +128 -0
  143. data/sig/sxn/templates/errors.rbs +43 -0
  144. data/sig/sxn/templates/template_engine.rbs +50 -0
  145. data/sig/sxn/templates/template_processor.rbs +44 -0
  146. data/sig/sxn/templates/template_security.rbs +62 -0
  147. data/sig/sxn/templates/template_variables.rbs +103 -0
  148. data/sig/sxn/templates.rbs +104 -0
  149. data/sig/sxn/ui/output.rbs +50 -0
  150. data/sig/sxn/ui/progress_bar.rbs +39 -0
  151. data/sig/sxn/ui/prompt.rbs +38 -0
  152. data/sig/sxn/ui/table.rbs +43 -0
  153. data/sig/sxn/ui.rbs +63 -0
  154. data/sig/sxn/version.rbs +5 -0
  155. data/sig/sxn.rbs +29 -0
  156. metadata +635 -0
@@ -0,0 +1,206 @@
1
+ # JavaScript Session: {{ session.name }}
2
+
3
+ ## Session Details
4
+ - **Name**: {{ session.name }}
5
+ - **Type**: JavaScript/Node.js Development
6
+ - **Created**: {{ session.created_at }}
7
+ - **Last Updated**: {{ session.updated_at }}
8
+ - **Path**: `{{ session.path }}`
9
+
10
+ {% if session.description %}
11
+ ## Description
12
+ {{ session.description }}
13
+ {% endif %}
14
+
15
+ ## Environment Information
16
+ {% if environment.node %}
17
+ ### Node.js Environment
18
+ - **Version**: {{ environment.node.version }}
19
+ - **Package Manager**: {{ project.package_manager | default: "npm" }}
20
+ {% endif %}
21
+
22
+ ### System
23
+ - **OS**: {{ environment.os.name }} ({{ environment.os.arch }})
24
+ - **User**: {{ user.git_name | default: user.username }}
25
+
26
+ ## Projects
27
+ {% if session.worktrees %}
28
+ {% for worktree in session.worktrees %}
29
+ ### {{ worktree.name }}
30
+ - **Path**: `{{ worktree.path }}`
31
+ - **Branch**: `{{ worktree.branch }}`
32
+ - **Type**: {{ project.type | capitalize }}
33
+ - **Created**: {{ worktree.created_at }}
34
+
35
+ {% if project.scripts %}
36
+ #### Available Scripts
37
+ {% for script in project.scripts limit: 5 %}
38
+ - `{{ script[0] }}`: {{ script[1] | truncate: 50 }}
39
+ {% endfor %}
40
+ {% if project.scripts.size > 5 %}
41
+ - ... and {{ project.scripts.size | minus: 5 }} more
42
+ {% endif %}
43
+ {% endif %}
44
+ {% endfor %}
45
+ {% else %}
46
+ No projects have been added to this session yet.
47
+ {% endif %}
48
+
49
+ ## Git Context
50
+ {% if git.branch %}
51
+ - **Current Branch**: `{{ git.branch }}`
52
+ {% endif %}
53
+ {% if git.author_name %}
54
+ - **Git User**: {{ git.author_name }} <{{ git.author_email }}>
55
+ {% endif %}
56
+ {% if git.remote_url %}
57
+ - **Remote**: {{ git.remote_url }}
58
+ {% endif %}
59
+
60
+ {% if git.has_changes %}
61
+ ### Working Directory Status
62
+ - **Modified**: {{ git.modified_files | default: 0 }} files
63
+ - **Added**: {{ git.added_files | default: 0 }} files
64
+ - **Deleted**: {{ git.deleted_files | default: 0 }} files
65
+ - **Untracked**: {{ git.untracked_files | default: 0 }} files
66
+ {% endif %}
67
+
68
+ ## Quick Commands
69
+
70
+ ### Session Management
71
+ ```bash
72
+ # Navigate to session
73
+ cd {{ session.path }}
74
+
75
+ # List sessions
76
+ sxn list
77
+
78
+ # Switch to this session
79
+ sxn use {{ session.name }}
80
+
81
+ # Add project to session
82
+ sxn worktree add <project> <branch>
83
+ ```
84
+
85
+ ### Development Workflow
86
+ ```bash
87
+ {% if session.worktrees %}
88
+ {% for worktree in session.worktrees limit: 1 %}
89
+ # Navigate to {{ worktree.name }}
90
+ cd {{ worktree.path }}
91
+
92
+ # Install dependencies
93
+ {% if project.package_manager == "yarn" %}
94
+ yarn install
95
+ {% elsif project.package_manager == "pnpm" %}
96
+ pnpm install
97
+ {% else %}
98
+ npm install
99
+ {% endif %}
100
+
101
+ # Start development
102
+ {% if project.package_manager == "yarn" %}
103
+ yarn dev
104
+ {% elsif project.package_manager == "pnpm" %}
105
+ pnpm dev
106
+ {% else %}
107
+ npm run dev
108
+ {% endif %}
109
+
110
+ # Run tests
111
+ {% if project.package_manager == "yarn" %}
112
+ yarn test
113
+ {% elsif project.package_manager == "pnpm" %}
114
+ pnpm test
115
+ {% else %}
116
+ npm test
117
+ {% endif %}
118
+ {% endfor %}
119
+ {% endif %}
120
+ ```
121
+
122
+ ### Code Quality
123
+ ```bash
124
+ # Lint code
125
+ {% if project.package_manager == "yarn" %}
126
+ yarn lint
127
+ {% elsif project.package_manager == "pnpm" %}
128
+ pnpm lint
129
+ {% else %}
130
+ npm run lint
131
+ {% endif %}
132
+
133
+ # Format code
134
+ {% if project.package_manager == "yarn" %}
135
+ yarn format
136
+ {% elsif project.package_manager == "pnpm" %}
137
+ pnpm format
138
+ {% else %}
139
+ npm run format
140
+ {% endif %}
141
+
142
+ # Type checking (if TypeScript)
143
+ {% if project.type == "typescript" %}
144
+ {% if project.package_manager == "yarn" %}
145
+ yarn type-check
146
+ {% elsif project.package_manager == "pnpm" %}
147
+ pnpm type-check
148
+ {% else %}
149
+ npm run type-check
150
+ {% endif %}
151
+ {% endif %}
152
+ ```
153
+
154
+ ## Dependencies Overview
155
+ {% if project.dependencies %}
156
+ ### Production Dependencies ({{ project.dependencies.size }})
157
+ {% for dep in project.dependencies limit: 10 %}
158
+ - {{ dep }}
159
+ {% endfor %}
160
+ {% if project.dependencies.size > 10 %}
161
+ - ... and {{ project.dependencies.size | minus: 10 }} more
162
+ {% endif %}
163
+ {% endif %}
164
+
165
+ {% if project.dev_dependencies %}
166
+ ### Development Dependencies ({{ project.dev_dependencies.size }})
167
+ {% for dep in project.dev_dependencies limit: 5 %}
168
+ - {{ dep }}
169
+ {% endfor %}
170
+ {% if project.dev_dependencies.size > 5 %}
171
+ - ... and {{ project.dev_dependencies.size | minus: 5 }} more
172
+ {% endif %}
173
+ {% endif %}
174
+
175
+ ## Development Notes
176
+ {% if session.tags %}
177
+ ### Tags
178
+ {% for tag in session.tags %}
179
+ - {{ tag }}
180
+ {% endfor %}
181
+ {% endif %}
182
+
183
+ ### Session-Based Development
184
+ - This session uses git worktrees for project isolation
185
+ - Each project maintains its own dependencies and configuration
186
+ - Follow the session-based workflow for all development activities
187
+
188
+ ### Best Practices
189
+ - Use the correct Node.js version (check `.nvmrc` if present)
190
+ - Run linting and tests before committing
191
+ - Follow conventional commit message format
192
+ - Use environment variables for configuration
193
+ - Keep dependencies up to date
194
+
195
+ ## Environment Variables
196
+ Create `.env.local` files for each project with local configuration:
197
+
198
+ ```bash
199
+ # Example environment variables
200
+ NODE_ENV=development
201
+ API_URL=http://localhost:3001
202
+ DATABASE_URL=postgresql://localhost/{{ session.name | replace: "-", "_" }}_development
203
+ ```
204
+
205
+ ---
206
+ *Generated on {{ timestamp.now }} using sxn template engine*
@@ -0,0 +1,78 @@
1
+ # Rails Project: {{project.name}}
2
+
3
+ ## Session: {{session.name}}
4
+
5
+ ### Project Information
6
+ - **Name**: {{project.name}}
7
+ - **Type**: {{project.type | capitalize}}
8
+ - **Path**: `{{project.path}}`
9
+ - **Ruby Version**: {{environment.ruby.version}}
10
+ - **Rails Version**: {{project.rails_version | default: 'Not detected'}}
11
+
12
+ ### Session Details
13
+ - **Created**: {{session.created_at | date: "%Y-%m-%d %H:%M:%S"}}
14
+ - **Updated**: {{session.updated_at | date: "%Y-%m-%d %H:%M:%S"}}
15
+ - **Status**: {{session.status}}
16
+ - **Path**: `{{session.path}}`
17
+ {% if session.linear_task %}- **Linear Task**: [{{session.linear_task}}](https://linear.app/team/issue/{{session.linear_task}}){% endif %}
18
+ {% if session.description %}- **Description**: {{session.description}}{% endif %}
19
+
20
+ ### Git Information
21
+ {% if git.available %}
22
+ - **Current Branch**: `{{git.branch}}`
23
+ - **Last Commit**: {{git.short_sha}}... - {{git.last_commit.message}}
24
+ - **Author**: {{git.author.name}} <{{git.author.email}}>
25
+ - **Status**: {{git.status.status}}
26
+ {% else %}
27
+ - Git information not available
28
+ {% endif %}
29
+
30
+ ### Session Projects
31
+ {% for proj in session.projects %}
32
+ - {{proj | capitalize}}
33
+ {% endfor %}
34
+
35
+ ## Development Commands
36
+
37
+ ```bash
38
+ # Navigate to session
39
+ cd {{session.path}}
40
+
41
+ # Run tests
42
+ bundle exec rspec
43
+
44
+ # Start Rails server
45
+ bin/rails server
46
+
47
+ # Rails console
48
+ bin/rails console
49
+
50
+ # Database operations
51
+ bin/rails db:migrate
52
+ bin/rails db:seed
53
+ ```
54
+
55
+ ## Cursor Rules Integration
56
+
57
+ For enhanced development experience, this project integrates with cursor rules:
58
+
59
+ ```javascript
60
+ // Use these contexts for AI assistance:
61
+ mcp__cursor_rules__get_contextual_rules({ context: "rails_development" })
62
+ mcp__cursor_rules__get_contextual_rules({ context: "ruby_development" })
63
+ mcp__cursor_rules__get_contextual_rules({ context: "git_commit" })
64
+ ```
65
+
66
+ ## Session-Based Development
67
+
68
+ This is a session-based development environment using git worktrees for isolated feature development.
69
+
70
+ ### Key Concepts:
71
+ - Each session represents a feature or task
72
+ - Worktrees provide isolated working directories
73
+ - Changes are contained within the session
74
+ - Easy context switching between features
75
+
76
+ ---
77
+
78
+ *Generated for session {{session.name}} at {{timestamp}}*
@@ -0,0 +1,31 @@
1
+ # Database configuration for {{ session.name }}
2
+ # This file provides database configuration specific to this session
3
+
4
+ default: &default
5
+ adapter: postgresql
6
+ encoding: unicode
7
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
8
+ username: <%= ENV["DB_USER"] || "postgres" %>
9
+ password: <%= ENV["DB_PASSWORD"] || "" %>
10
+ host: <%= ENV["DB_HOST"] || "localhost" %>
11
+ port: <%= ENV["DB_PORT"] || 5432 %>
12
+
13
+ development:
14
+ <<: *default
15
+ database: {{ session.name | replace: "-", "_" }}_development
16
+
17
+ test:
18
+ <<: *default
19
+ database: {{ session.name | replace: "-", "_" }}_test
20
+
21
+ # Production configuration should not be in session-specific files
22
+ # Use the main project's database.yml for production settings
23
+ production:
24
+ <<: *default
25
+ database: <%= ENV["DATABASE_URL"] %>
26
+
27
+ # Session-specific database notes:
28
+ # - Database names are prefixed with session name for isolation
29
+ # - Development and test databases are session-specific
30
+ # - Production uses the main project configuration
31
+ # - Environment variables can override these settings
@@ -0,0 +1,144 @@
1
+ # Session Information: {{ session.name }}
2
+
3
+ ## Overview
4
+ This session was created for Rails development work{% if session.linear_task %} related to Linear task {{ session.linear_task }}{% endif %}.
5
+
6
+ ### Session Details
7
+ - **Session Name**: {{ session.name }}
8
+ - **Created**: {{ session.created_at }}
9
+ - **Last Updated**: {{ session.updated_at }}
10
+ - **Status**: {{ session.status }}
11
+ - **Path**: `{{ session.path }}`
12
+
13
+ {% if session.description %}
14
+ ### Description
15
+ {{ session.description }}
16
+ {% endif %}
17
+
18
+ ## Projects in This Session
19
+ {% if session.worktrees %}
20
+ {% for worktree in session.worktrees %}
21
+ ### {{ worktree.name | capitalize }}
22
+ - **Path**: `{{ worktree.path }}`
23
+ - **Branch**: `{{ worktree.branch }}`
24
+ - **Created**: {{ worktree.created_at }}
25
+ {% endfor %}
26
+ {% else %}
27
+ No worktrees have been created yet. Use `sxn worktree add <project>` to add projects to this session.
28
+ {% endif %}
29
+
30
+ ## Development Environment
31
+ ### Ruby Environment
32
+ - **Version**: {{ environment.ruby.version }}
33
+ - **Platform**: {{ environment.ruby.platform }}
34
+ {% if environment.rails %}
35
+ - **Rails Version**: {{ environment.rails.version }}
36
+ {% endif %}
37
+
38
+ ### System Information
39
+ - **OS**: {{ environment.os.name }} ({{ environment.os.arch }})
40
+ - **User**: {{ user.git_name | default: user.username }}
41
+
42
+ {% if environment.database %}
43
+ ### Available Databases
44
+ {% for database in environment.database %}
45
+ - **{{ database[0] | capitalize }}**: {{ database[1] }}
46
+ {% endfor %}
47
+ {% endif %}
48
+
49
+ ## Git Context
50
+ {% if git.branch %}
51
+ - **Current Branch**: `{{ git.branch }}`
52
+ {% endif %}
53
+ {% if git.author %}
54
+ - **Git User**: {{ git.author.name }} <{{ git.author.email }}>
55
+ {% endif %}
56
+ {% if git.remote_url %}
57
+ - **Remote URL**: {{ git.remote_url }}
58
+ {% endif %}
59
+
60
+ {% if git.status %}
61
+ ### Working Directory Status
62
+ - **Modified Files**: {{ git.status.modified_files | default: 0 }}
63
+ - **Added Files**: {{ git.status.added_files | default: 0 }}
64
+ - **Deleted Files**: {{ git.status.deleted_files | default: 0 }}
65
+ - **Untracked Files**: {{ git.status.untracked_files | default: 0 }}
66
+ - **Total Changes**: {{ git.status.total_changes | default: 0 }}
67
+ {% endif %}
68
+
69
+ ## Session Commands
70
+
71
+ ### Quick Navigation
72
+ ```bash
73
+ # Navigate to session root
74
+ cd {{ session.path }}
75
+
76
+ {% if session.worktrees %}
77
+ {% for worktree in session.worktrees %}
78
+ # Navigate to {{ worktree.name }}
79
+ cd {{ worktree.path }}
80
+
81
+ {% endfor %}
82
+ {% endif %}
83
+ ```
84
+
85
+ ### Session Management
86
+ ```bash
87
+ # List all sessions
88
+ sxn list
89
+
90
+ # Switch to this session
91
+ sxn use {{ session.name }}
92
+
93
+ # Show current session
94
+ sxn current
95
+
96
+ # Add a new project to this session
97
+ sxn worktree add <project-name> <branch-name>
98
+
99
+ # List worktrees in this session
100
+ sxn worktree list
101
+ ```
102
+
103
+ ### Rails Development Workflow
104
+ ```bash
105
+ # Standard Rails development commands
106
+ bundle install
107
+ bin/rails db:create db:migrate
108
+ bin/rails server
109
+ bin/rails console
110
+
111
+ # Testing
112
+ bundle exec rspec
113
+ RAILS_ENV=test bin/rails console
114
+
115
+ # Code quality
116
+ bundle exec rubocop
117
+ bundle exec rubocop -a
118
+ ```
119
+
120
+ ## Session Rules Applied
121
+ {% if session.rules_applied %}
122
+ The following rules were applied when creating this session:
123
+ {% for rule in session.rules_applied %}
124
+ - {{ rule.type | capitalize }}: {{ rule.description }}
125
+ {% endfor %}
126
+ {% endif %}
127
+
128
+ ## Notes
129
+ {% if session.tags %}
130
+ ### Tags
131
+ {% for tag in session.tags %}
132
+ - {{ tag }}
133
+ {% endfor %}
134
+ {% endif %}
135
+
136
+ ### Development Reminders
137
+ - This session follows the session-based development workflow
138
+ - Always load cursor rules before making changes
139
+ - Run tests before committing changes
140
+ - Use proper environment setup for Rails commands
141
+ - Follow conventional commit message format
142
+
143
+ ---
144
+ *Session created on {{ timestamp.now }} using sxn v{{ sxn.version | default: "unknown" }}*