sylas-edge-worker 0.2.21

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 (163) hide show
  1. package/README.md +293 -0
  2. package/dist/ActivityPoster.d.ts +15 -0
  3. package/dist/ActivityPoster.d.ts.map +1 -0
  4. package/dist/ActivityPoster.js +194 -0
  5. package/dist/ActivityPoster.js.map +1 -0
  6. package/dist/AgentSessionManager.d.ts +280 -0
  7. package/dist/AgentSessionManager.d.ts.map +1 -0
  8. package/dist/AgentSessionManager.js +1412 -0
  9. package/dist/AgentSessionManager.js.map +1 -0
  10. package/dist/AskUserQuestionHandler.d.ts +97 -0
  11. package/dist/AskUserQuestionHandler.d.ts.map +1 -0
  12. package/dist/AskUserQuestionHandler.js +206 -0
  13. package/dist/AskUserQuestionHandler.js.map +1 -0
  14. package/dist/AttachmentService.d.ts +69 -0
  15. package/dist/AttachmentService.d.ts.map +1 -0
  16. package/dist/AttachmentService.js +369 -0
  17. package/dist/AttachmentService.js.map +1 -0
  18. package/dist/ChatSessionHandler.d.ts +87 -0
  19. package/dist/ChatSessionHandler.d.ts.map +1 -0
  20. package/dist/ChatSessionHandler.js +231 -0
  21. package/dist/ChatSessionHandler.js.map +1 -0
  22. package/dist/ConfigManager.d.ts +91 -0
  23. package/dist/ConfigManager.d.ts.map +1 -0
  24. package/dist/ConfigManager.js +227 -0
  25. package/dist/ConfigManager.js.map +1 -0
  26. package/dist/EdgeWorker.d.ts +670 -0
  27. package/dist/EdgeWorker.d.ts.map +1 -0
  28. package/dist/EdgeWorker.js +3801 -0
  29. package/dist/EdgeWorker.js.map +1 -0
  30. package/dist/GitService.d.ts +39 -0
  31. package/dist/GitService.d.ts.map +1 -0
  32. package/dist/GitService.js +432 -0
  33. package/dist/GitService.js.map +1 -0
  34. package/dist/GlobalSessionRegistry.d.ts +142 -0
  35. package/dist/GlobalSessionRegistry.d.ts.map +1 -0
  36. package/dist/GlobalSessionRegistry.js +254 -0
  37. package/dist/GlobalSessionRegistry.js.map +1 -0
  38. package/dist/PromptBuilder.d.ts +175 -0
  39. package/dist/PromptBuilder.d.ts.map +1 -0
  40. package/dist/PromptBuilder.js +884 -0
  41. package/dist/PromptBuilder.js.map +1 -0
  42. package/dist/RepositoryRouter.d.ts +152 -0
  43. package/dist/RepositoryRouter.d.ts.map +1 -0
  44. package/dist/RepositoryRouter.js +480 -0
  45. package/dist/RepositoryRouter.js.map +1 -0
  46. package/dist/RunnerSelectionService.d.ts +62 -0
  47. package/dist/RunnerSelectionService.d.ts.map +1 -0
  48. package/dist/RunnerSelectionService.js +379 -0
  49. package/dist/RunnerSelectionService.js.map +1 -0
  50. package/dist/SharedApplicationServer.d.ts +107 -0
  51. package/dist/SharedApplicationServer.d.ts.map +1 -0
  52. package/dist/SharedApplicationServer.js +247 -0
  53. package/dist/SharedApplicationServer.js.map +1 -0
  54. package/dist/SharedWebhookServer.d.ts +39 -0
  55. package/dist/SharedWebhookServer.d.ts.map +1 -0
  56. package/dist/SharedWebhookServer.js +150 -0
  57. package/dist/SharedWebhookServer.js.map +1 -0
  58. package/dist/SlackChatAdapter.d.ts +25 -0
  59. package/dist/SlackChatAdapter.d.ts.map +1 -0
  60. package/dist/SlackChatAdapter.js +143 -0
  61. package/dist/SlackChatAdapter.js.map +1 -0
  62. package/dist/UserAccessControl.d.ts +69 -0
  63. package/dist/UserAccessControl.d.ts.map +1 -0
  64. package/dist/UserAccessControl.js +171 -0
  65. package/dist/UserAccessControl.js.map +1 -0
  66. package/dist/WorktreeIncludeService.d.ts +32 -0
  67. package/dist/WorktreeIncludeService.d.ts.map +1 -0
  68. package/dist/WorktreeIncludeService.js +123 -0
  69. package/dist/WorktreeIncludeService.js.map +1 -0
  70. package/dist/index.d.ts +22 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +17 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/label-prompt-template.md +27 -0
  75. package/dist/procedures/ProcedureAnalyzer.d.ts +69 -0
  76. package/dist/procedures/ProcedureAnalyzer.d.ts.map +1 -0
  77. package/dist/procedures/ProcedureAnalyzer.js +271 -0
  78. package/dist/procedures/ProcedureAnalyzer.js.map +1 -0
  79. package/dist/procedures/index.d.ts +7 -0
  80. package/dist/procedures/index.d.ts.map +1 -0
  81. package/dist/procedures/index.js +7 -0
  82. package/dist/procedures/index.js.map +1 -0
  83. package/dist/procedures/registry.d.ts +156 -0
  84. package/dist/procedures/registry.d.ts.map +1 -0
  85. package/dist/procedures/registry.js +240 -0
  86. package/dist/procedures/registry.js.map +1 -0
  87. package/dist/procedures/types.d.ts +103 -0
  88. package/dist/procedures/types.d.ts.map +1 -0
  89. package/dist/procedures/types.js +5 -0
  90. package/dist/procedures/types.js.map +1 -0
  91. package/dist/prompt-assembly/types.d.ts +80 -0
  92. package/dist/prompt-assembly/types.d.ts.map +1 -0
  93. package/dist/prompt-assembly/types.js +8 -0
  94. package/dist/prompt-assembly/types.js.map +1 -0
  95. package/dist/prompts/builder.md +191 -0
  96. package/dist/prompts/debugger.md +128 -0
  97. package/dist/prompts/graphite-orchestrator.md +362 -0
  98. package/dist/prompts/orchestrator.md +290 -0
  99. package/dist/prompts/scoper.md +95 -0
  100. package/dist/prompts/standard-issue-assigned-user-prompt.md +33 -0
  101. package/dist/prompts/subroutines/changelog-update.md +79 -0
  102. package/dist/prompts/subroutines/coding-activity.md +12 -0
  103. package/dist/prompts/subroutines/concise-summary.md +67 -0
  104. package/dist/prompts/subroutines/debugger-fix.md +92 -0
  105. package/dist/prompts/subroutines/debugger-reproduction.md +74 -0
  106. package/dist/prompts/subroutines/full-delegation.md +68 -0
  107. package/dist/prompts/subroutines/get-approval.md +175 -0
  108. package/dist/prompts/subroutines/gh-pr.md +80 -0
  109. package/dist/prompts/subroutines/git-commit.md +37 -0
  110. package/dist/prompts/subroutines/plan-summary.md +21 -0
  111. package/dist/prompts/subroutines/preparation.md +16 -0
  112. package/dist/prompts/subroutines/question-answer.md +8 -0
  113. package/dist/prompts/subroutines/question-investigation.md +8 -0
  114. package/dist/prompts/subroutines/release-execution.md +81 -0
  115. package/dist/prompts/subroutines/release-summary.md +60 -0
  116. package/dist/prompts/subroutines/user-testing-summary.md +87 -0
  117. package/dist/prompts/subroutines/user-testing.md +48 -0
  118. package/dist/prompts/subroutines/validation-fixer.md +56 -0
  119. package/dist/prompts/subroutines/verbose-summary.md +46 -0
  120. package/dist/prompts/subroutines/verifications.md +77 -0
  121. package/dist/prompts/todolist-system-prompt-extension.md +15 -0
  122. package/dist/sinks/IActivitySink.d.ts +60 -0
  123. package/dist/sinks/IActivitySink.d.ts.map +1 -0
  124. package/dist/sinks/IActivitySink.js +2 -0
  125. package/dist/sinks/IActivitySink.js.map +1 -0
  126. package/dist/sinks/LinearActivitySink.d.ts +69 -0
  127. package/dist/sinks/LinearActivitySink.d.ts.map +1 -0
  128. package/dist/sinks/LinearActivitySink.js +111 -0
  129. package/dist/sinks/LinearActivitySink.js.map +1 -0
  130. package/dist/sinks/NoopActivitySink.d.ts +13 -0
  131. package/dist/sinks/NoopActivitySink.d.ts.map +1 -0
  132. package/dist/sinks/NoopActivitySink.js +17 -0
  133. package/dist/sinks/NoopActivitySink.js.map +1 -0
  134. package/dist/sinks/index.d.ts +9 -0
  135. package/dist/sinks/index.d.ts.map +1 -0
  136. package/dist/sinks/index.js +8 -0
  137. package/dist/sinks/index.js.map +1 -0
  138. package/dist/types.d.ts +32 -0
  139. package/dist/types.d.ts.map +1 -0
  140. package/dist/types.js +2 -0
  141. package/dist/types.js.map +1 -0
  142. package/dist/validation/ValidationLoopController.d.ts +54 -0
  143. package/dist/validation/ValidationLoopController.d.ts.map +1 -0
  144. package/dist/validation/ValidationLoopController.js +242 -0
  145. package/dist/validation/ValidationLoopController.js.map +1 -0
  146. package/dist/validation/index.d.ts +7 -0
  147. package/dist/validation/index.d.ts.map +1 -0
  148. package/dist/validation/index.js +7 -0
  149. package/dist/validation/index.js.map +1 -0
  150. package/dist/validation/types.d.ts +82 -0
  151. package/dist/validation/types.d.ts.map +1 -0
  152. package/dist/validation/types.js +29 -0
  153. package/dist/validation/types.js.map +1 -0
  154. package/label-prompt-template.md +27 -0
  155. package/package.json +56 -0
  156. package/prompt-template.md +116 -0
  157. package/prompts/builder.md +191 -0
  158. package/prompts/debugger.md +128 -0
  159. package/prompts/graphite-orchestrator.md +362 -0
  160. package/prompts/orchestrator.md +290 -0
  161. package/prompts/scoper.md +95 -0
  162. package/prompts/standard-issue-assigned-user-prompt.md +33 -0
  163. package/prompts/todolist-system-prompt-extension.md +15 -0
@@ -0,0 +1,74 @@
1
+ <version-tag value="debugger-reproduction-v1.0.0" />
2
+
3
+ You are in the **Bug Reproduction Phase** of the debugging workflow.
4
+
5
+ ## Objective
6
+
7
+ Reproduce the reported bug with a **failing test case** and perform **root cause analysis**. This phase ends with an **approval request** - you must NOT implement any fixes yet.
8
+
9
+ ## Your Tasks
10
+
11
+ ### 1. Initial Investigation (Task-Driven)
12
+
13
+ Use Task extensively to understand the bug:
14
+
15
+ ```
16
+ Task: "analyze bug report for key symptoms and error messages"
17
+ Task: "search codebase for error occurrence patterns"
18
+ Task: "find all files related to the error"
19
+ Task: "identify recent changes that might have introduced the bug"
20
+ ```
21
+
22
+ ### 2. Root Cause Analysis (Task-Driven)
23
+
24
+ Trace the error to its source:
25
+
26
+ ```
27
+ Task: "trace error from symptom to source code"
28
+ Task: "analyze data flow leading to the error"
29
+ Task: "check edge cases and boundary conditions"
30
+ Task: "identify missing validation or error handling"
31
+ ```
32
+
33
+ ### 3. Create Reproduction (Minimal File Loading)
34
+
35
+ **ONLY NOW** load test files to create a failing test:
36
+
37
+ - Create a minimal test case that reproduces the bug
38
+ - Ensure the test fails with the exact error reported
39
+ - Verify the test is deterministic and reliable
40
+ - Document the reproduction steps clearly
41
+
42
+ ## Output Format
43
+
44
+ **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
45
+
46
+ After completing your investigation, provide a brief completion message (1 sentence max):
47
+
48
+ ```
49
+ Reproduction complete - root cause identified in [component/file] and failing test created.
50
+ ```
51
+
52
+ Example: "Reproduction complete - root cause identified in session expiry logic and failing test created."
53
+
54
+ ## Critical Constraints
55
+
56
+ - ❌ **DO NOT implement any fixes** - this is reproduction only
57
+ - ❌ **DO NOT modify production code** - only test files
58
+ - ❌ **DO NOT commit or push anything** - that happens in later phases
59
+ - ❌ **DO NOT create todos for fixing the issue** - fix planning happens in debugger-fix phase
60
+ - ❌ **DO NOT touch the changelog** - a separate subroutine handles changelog updates
61
+ - ✅ **DO use Task extensively** for all analysis
62
+ - ✅ **DO create a clear, failing test**
63
+ - ✅ **DO provide detailed root cause analysis**
64
+ - ✅ **DO use TodoWrite for tracking reproduction/analysis tasks** if helpful (e.g., "Investigate error X", "Create test for Y")
65
+
66
+ ## What Happens Next
67
+
68
+ After you present your findings:
69
+
70
+ 1. This subroutine will complete
71
+ 2. The next subroutine (fix implementation) will begin automatically
72
+ 3. You will implement the fix based on your reproduction and analysis
73
+
74
+ **Remember**: Your job is to UNDERSTAND and REPRODUCE the bug, not to fix it yet!
@@ -0,0 +1,68 @@
1
+ # Full Delegation — Single-Session Workflow
2
+
3
+ You are responsible for the entire development lifecycle in this single session.
4
+ Complete ALL of the following phases in order. Do not skip any phase.
5
+
6
+ ## Phase 1: Understand
7
+
8
+ - Read the issue title and description carefully
9
+ - Identify acceptance criteria, requirements, and constraints
10
+ - Explore the codebase to understand existing patterns and conventions
11
+
12
+ ## Phase 2: Implement
13
+
14
+ - Write production-ready code that satisfies the requirements
15
+ - Follow existing codebase patterns and conventions
16
+ - Handle edge cases and errors properly
17
+
18
+ ## Phase 3: Verify
19
+
20
+ - Run tests and ensure they pass
21
+ - Run linting and type checking
22
+ - Validate ALL acceptance criteria from the issue description
23
+ - If any verification fails, fix the issue and re-verify
24
+
25
+ ## Phase 4: Commit & PR
26
+
27
+ - Stage and commit changes with clear, descriptive commit messages following the project's conventions
28
+ - Push to the remote branch
29
+ - Create or update the Pull Request with:
30
+ - Descriptive title
31
+ - Summary of changes, implementation approach, and testing performed
32
+ - Link to the Linear issue
33
+
34
+ **Draft PR policy**: Check `<agent_guidance>` in your context. If it specifies `--draft` or mentions keeping PRs as drafts, keep the PR as a draft. Otherwise, mark it as ready for review.
35
+
36
+ ## Phase 5: Summary
37
+
38
+ Your **final message** MUST be a concise summary for posting to Linear. Format:
39
+
40
+ ```
41
+ ## Summary
42
+
43
+ [1-2 sentence description of what was done]
44
+
45
+ +++Changes Made
46
+ - [Key change 1]
47
+ - [Key change 2]
48
+ +++
49
+
50
+ +++Files Modified
51
+ - [File 1]
52
+ - [File 2]
53
+ +++
54
+
55
+ ## Status
56
+
57
+ [Completion status, PR link, any follow-up needed]
58
+ ```
59
+
60
+ Use `+++Section Title\n...\n+++` for collapsible sections.
61
+
62
+ **To mention someone**: Use `https://linear.app/linear/profiles/username` syntax.
63
+
64
+ ## Rules
65
+
66
+ - Do NOT post Linear comments yourself — Sylas handles that
67
+ - Do NOT touch the changelog unless the project's CLAUDE.md explicitly requires it as part of commits
68
+ - Complete ALL phases. Your final message is what gets posted to Linear.
@@ -0,0 +1,175 @@
1
+ <version-tag value="get-approval-v1.0.0" />
2
+
3
+ You are in the **Get Approval Phase** of the workflow.
4
+
5
+ ## Objective
6
+
7
+ Request user approval for a specific action or plan. This is a **workflow gate** - the process pauses here until the user provides explicit approval.
8
+
9
+ ## What to Request Approval For
10
+
11
+ This subroutine can be used for various approval scenarios:
12
+
13
+ - **Reproduction approval** (debugging): Approve proceeding with bug fix implementation
14
+ - **Architecture approval**: Approve proposed technical design
15
+ - **Scope approval**: Approve expanded scope or additional changes
16
+ - **Breaking change approval**: Approve changes that affect API compatibility
17
+ - **Deployment approval**: Approve releasing changes to production
18
+ - **Resource approval**: Approve using external services or APIs
19
+ - **Cost approval**: Approve operations that incur costs
20
+
21
+ ## Your Task
22
+
23
+ Present your findings/plan in a clear, structured format and explicitly request approval.
24
+
25
+ **IMPORTANT:** You have exactly **one response** to present your approval request. Make it comprehensive and complete in a single message.
26
+
27
+ ### Required Format
28
+
29
+ Your output MUST follow this structure:
30
+
31
+ ```markdown
32
+ # [Title of What Needs Approval]
33
+
34
+ ## Summary
35
+ [1-2 sentence summary of what you're requesting approval for]
36
+
37
+ ## Details
38
+ [Detailed explanation of the proposal, findings, or plan]
39
+
40
+ ### [Section 1]
41
+ [Content]
42
+
43
+ ### [Section 2]
44
+ [Content]
45
+
46
+ ## Impact Assessment
47
+ - **Scope**: [What will be affected]
48
+ - **Risk**: [Low/Medium/High - explain]
49
+ - **Effort**: [Estimated time/complexity]
50
+ - **Reversibility**: [Can this be easily undone?]
51
+
52
+ ## Recommendation
53
+ [Your professional recommendation with rationale]
54
+
55
+ ---
56
+
57
+ **🔴 APPROVAL REQUIRED**
58
+
59
+ Please review the above and provide your approval to proceed.
60
+
61
+ **Options:**
62
+ - ✅ **Approve** - I will proceed with [action]
63
+ - ❌ **Reject** - I will not proceed and await further instructions
64
+ - 💬 **Feedback** - I will incorporate your feedback and revise the plan
65
+
66
+ I am pausing here and will wait for your response before continuing.
67
+ ```
68
+
69
+ ## Critical Requirements
70
+
71
+ - ✅ **DO be specific** - clearly state what you're requesting approval for
72
+ - ✅ **DO provide context** - explain why this needs approval
73
+ - ✅ **DO assess impact** - help the user make an informed decision
74
+ - ✅ **DO give options** - make it easy to approve, reject, or provide feedback
75
+ - ✅ **DO explicitly pause** - make it clear you're waiting for input
76
+ - ❌ **DO NOT proceed** - never assume approval and continue automatically
77
+ - ❌ **DO NOT be vague** - "is this okay?" is not sufficient
78
+ - ❌ **DO NOT skip details** - provide all information needed for decision
79
+
80
+ ## System Integration
81
+
82
+ When you complete this subroutine:
83
+
84
+ 1. The system detects your approval request format
85
+ 2. An **elicitation** is posted to Linear with an authorization button
86
+ 3. The user clicks the button to approve (or provides feedback in Linear)
87
+ 4. The workflow resumes with the next subroutine (or stays here if feedback given)
88
+
89
+ ## Context Variables
90
+
91
+ The system will provide context about what approval is being requested for based on the procedure configuration. Use that context to tailor your approval request appropriately.
92
+
93
+ ## Examples
94
+
95
+ ### Example 1: Debugging Reproduction Approval
96
+
97
+ ```markdown
98
+ # Bug Reproduction Complete
99
+
100
+ ## Summary
101
+ I've identified the root cause of the authentication timeout bug and created a failing test case.
102
+
103
+ ## Details
104
+
105
+ ### Root Cause
106
+ The session cookie expiration check is using server time instead of UTC, causing timezone-dependent failures...
107
+
108
+ ### Reproduction Steps
109
+ 1. Set server timezone to UTC+8
110
+ 2. Create a session at 11:00 PM local time
111
+ 3. Wait 2 hours
112
+ 4. Attempt to access protected route
113
+ 5. Expected: Session valid (1 hour old in UTC)
114
+ 6. Actual: Session expired (appears 3 hours old due to timezone)
115
+
116
+ ### Failing Test Case
117
+ - File: `tests/auth/session-expiry.test.ts`
118
+ - Test name: "should handle cross-timezone session expiration"
119
+ - Status: ✅ Test created and failing as expected
120
+
121
+ ## Impact Assessment
122
+ - **Scope**: Authentication module only
123
+ - **Risk**: Low - fix is isolated to date comparison logic
124
+ - **Effort**: ~30 minutes to implement + verify
125
+ - **Reversibility**: High - simple code change
126
+
127
+ ## Recommendation
128
+ Proceed with implementing the fix by normalizing all date comparisons to UTC.
129
+
130
+ ---
131
+
132
+ **🔴 APPROVAL REQUIRED**
133
+
134
+ Please review the above findings and approve to proceed with implementing the fix.
135
+ ```
136
+
137
+ ### Example 2: Architecture Approval
138
+
139
+ ```markdown
140
+ # Proposed Architecture Change: Event-Driven Notifications
141
+
142
+ ## Summary
143
+ Requesting approval to refactor the notification system from polling to event-driven architecture.
144
+
145
+ ## Details
146
+
147
+ ### Current State
148
+ - Polling every 5 seconds (inefficient)
149
+ - High database load
150
+ - Delayed notifications
151
+
152
+ ### Proposed Change
153
+ - WebSocket-based event stream
154
+ - Real-time notifications
155
+ - 80% reduction in DB queries
156
+
157
+ ## Impact Assessment
158
+ - **Scope**: Notification system, WebSocket server, client components
159
+ - **Risk**: Medium - requires testing across browsers
160
+ - **Effort**: 2-3 days development + testing
161
+ - **Reversibility**: Medium - can rollback but requires redeployment
162
+
163
+ ## Recommendation
164
+ Proceed with the refactor during the next sprint to reduce infrastructure costs.
165
+
166
+ ---
167
+
168
+ **🔴 APPROVAL REQUIRED**
169
+
170
+ Please approve this architectural change or provide feedback on concerns.
171
+ ```
172
+
173
+ ## Remember
174
+
175
+ This is a **pause point** in the workflow. The system is designed to stop here and wait for user input. Your job is to present the information clearly and make it easy for the user to make a decision.
@@ -0,0 +1,80 @@
1
+ # GitHub PR - Pull Request Management
2
+
3
+ A draft PR exists and all changes have been committed and pushed. Now update the PR with a full description and optionally mark it as ready.
4
+
5
+ ## Your Tasks
6
+
7
+ ### 1. Get PR Information
8
+ First, get the current PR URL and verify the base branch:
9
+ ```bash
10
+ gh pr view --json url,baseRefName -q '"\(.url) targeting \(.baseRefName)"'
11
+ ```
12
+
13
+ **IMPORTANT**: Verify that the PR targets the correct base branch (from `<base_branch>` in the issue context). If it doesn't, update it:
14
+ ```bash
15
+ gh pr edit --base [correct base branch]
16
+ ```
17
+
18
+ ### 2. Update PR with Full Description
19
+ Update the PR with a comprehensive description:
20
+ ```bash
21
+ gh pr edit --title "[descriptive title]" --body "[full description]"
22
+ ```
23
+
24
+ The PR description should include:
25
+ - Summary of changes
26
+ - Implementation approach
27
+ - Testing performed
28
+ - Any breaking changes or migration notes
29
+ - Link to the Linear issue
30
+
31
+ Ensure the PR has a clear, descriptive title (remove "WIP:" prefix if present).
32
+
33
+ ### 3. Mark PR as Ready (CONDITIONAL)
34
+
35
+ **CRITICAL**: Before running `gh pr ready`, you MUST check the `<agent_guidance>` section in your context.
36
+
37
+ **DO NOT run `gh pr ready` if ANY of the following conditions are true:**
38
+ - The agent guidance specifies `--draft` in PR creation commands
39
+ - The agent guidance mentions keeping PRs as drafts
40
+ - The user has explicitly requested the PR remain as a draft
41
+ - The project instructions specify draft PRs
42
+
43
+ **Only if none of the above conditions apply**, convert the draft PR to ready for review:
44
+ ```bash
45
+ gh pr ready
46
+ ```
47
+
48
+ ### 4. Final Checks
49
+ - Confirm the PR URL is valid and accessible
50
+ - Verify all commits are included in the PR
51
+ - Verify the PR targets the correct base branch (from `<base_branch>` in context)
52
+ - Check that CI/CD pipelines start running (if applicable)
53
+
54
+ ## Important Notes
55
+
56
+ - **A draft PR already exists** - you're updating it and optionally marking it ready
57
+ - **All commits are pushed** - the changelog already includes the PR link
58
+ - **Be thorough with the PR description** - it should be self-contained and informative
59
+ - **RESPECT AGENT GUIDANCE** - if guidance specifies draft PRs, do NOT mark as ready
60
+ - **Verify the correct base branch** - ensure PR targets the `<base_branch>` from context
61
+ - Take as many turns as needed to complete these tasks
62
+
63
+ ## Expected Output
64
+
65
+ **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
66
+
67
+ Provide a brief completion message (1 sentence max) that includes the PR URL and status:
68
+
69
+ If marked as ready:
70
+ ```
71
+ PR ready at [PR URL].
72
+ ```
73
+
74
+ If kept as draft (due to agent guidance or user request):
75
+ ```
76
+ Draft PR updated at [PR URL] (kept as draft per guidance).
77
+ ```
78
+
79
+ Example: "PR ready at https://github.com/org/repo/pull/123."
80
+ Example: "Draft PR updated at https://github.com/org/repo/pull/123 (kept as draft per guidance)."
@@ -0,0 +1,37 @@
1
+ # Git Commit - Version Control
2
+
3
+ Changelog updates are complete (with PR link included). Now commit all changes and push to the remote.
4
+
5
+ ## Your Tasks
6
+
7
+ ### 1. Stage and Commit Changes
8
+ - **STAGE all relevant changes** using `git add` (including any changelog updates with PR link)
9
+ - **COMMIT changes** with clear, descriptive commit messages following the project's commit message format
10
+ - Ensure commit history is clean and meaningful
11
+ - Follow the git workflow instructions from the project's CLAUDE.md if present
12
+
13
+ ### 2. Push to Remote
14
+ - **PUSH changes** to remote repository
15
+ - Ensure all work is synchronized with the remote repository
16
+ - Verify the push was successful
17
+
18
+ ## Important Notes
19
+
20
+ - **All verifications have already passed** - you're just committing the verified work
21
+ - **Follow the project's commit message conventions** - check CLAUDE.md or recent commits for format
22
+ - **Include changelog updates** - the changelog (with PR link) was updated in the previous subroutine
23
+ - **Do NOT touch the changelog content** - changelog updates were handled in the previous subroutine
24
+ - **Draft PR already exists** - pushing will update it
25
+ - Take as many turns as needed to complete these tasks
26
+
27
+ ## Expected Output
28
+
29
+ **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
30
+
31
+ Provide a brief completion message (1 sentence max):
32
+
33
+ ```
34
+ Changes committed and pushed to [branch-name].
35
+ ```
36
+
37
+ Example: "Changes committed and pushed to feature/add-user-auth."
@@ -0,0 +1,21 @@
1
+ # Plan Summary
2
+
3
+ Present EITHER your clarifying questions OR your implementation plan:
4
+
5
+ **Format in Linear-compatible markdown:**
6
+ - Use `+++Section Name\n...\n+++` for collapsible sections
7
+ - Use `https://linear.app/linear/profiles/username` for @mentions
8
+ - Be clear and well-structured
9
+
10
+ **If presenting clarifying questions:**
11
+ - List specific questions that need answers
12
+ - Explain why each question is important
13
+ - Suggest possible approaches if helpful
14
+
15
+ **If presenting implementation plan:**
16
+ - Outline the implementation approach
17
+ - List key files/components to modify
18
+ - Note any risks or dependencies
19
+ - Provide estimated complexity if relevant
20
+
21
+ Keep it concise (3-5 paragraphs max).
@@ -0,0 +1,16 @@
1
+ # Preparation Phase
2
+
3
+ Analyze the request to determine if it needs clarification or can be planned:
4
+
5
+ **If unclear requirements:**
6
+ - Identify ambiguities and missing information
7
+ - Formulate specific clarifying questions
8
+ - Prepare questions for Linear posting
9
+
10
+ **If requirements are clear:**
11
+ - Break down the work into steps
12
+ - Identify files/components to modify
13
+ - Consider dependencies and edge cases
14
+ - Prepare implementation plan for Linear posting
15
+
16
+ Complete with: `Preparation complete - [ready to plan/needs clarification].`
@@ -0,0 +1,8 @@
1
+ # Answer Question
2
+
3
+ Provide a clear, direct answer using investigation findings:
4
+ - Present in Linear-compatible markdown (supports `+++collapsible+++`, @mentions via `https://linear.app/linear/profiles/username`)
5
+ - Include code references with line numbers
6
+ - Be complete but concise
7
+
8
+ Don't mention the investigation process - just answer the question.
@@ -0,0 +1,8 @@
1
+ # Investigate Question
2
+
3
+ Gather information to answer the question (DON'T answer yet):
4
+ - Search codebase for relevant files/functions
5
+ - Read necessary files
6
+ - Use tools if needed
7
+
8
+ Complete with: `Investigation complete - gathered information from [sources].`
@@ -0,0 +1,81 @@
1
+ # Release Execution Phase
2
+
3
+ You are performing a software release. Your task is to execute the release process for this project.
4
+
5
+ ## Step 1: Check for Release Instructions
6
+
7
+ Check for release instructions in this priority order:
8
+
9
+ ### Priority 1: Release Skill
10
+ 1. Use the `Skill` tool to check for available skills (invoke with skill name like "release")
11
+ 2. Look for skills named "release", "publish", "deploy", or similar
12
+ 3. Check `.claude/skills/` directory for SKILL.md files related to releasing
13
+
14
+ ### Priority 2: CLAUDE.md
15
+ 1. Read `CLAUDE.md` in the project root
16
+ 2. Look for sections about "Release", "Publishing", "Deployment", or similar
17
+ 3. Follow any documented release procedures
18
+
19
+ ### Priority 3: README.md
20
+ 1. Read `README.md` in the project root
21
+ 2. Look for sections about "Release", "Publishing", "Deployment", or similar
22
+ 3. Follow any documented release procedures
23
+
24
+ ## Step 2: Execute Release
25
+
26
+ ### If a release skill exists:
27
+
28
+ Invoke the release skill using the `Skill` tool:
29
+ ```
30
+ skill: "release"
31
+ ```
32
+
33
+ Follow the skill's instructions completely. The skill will contain project-specific release procedures including:
34
+ - Version bumping
35
+ - Changelog updates
36
+ - Package publishing order
37
+ - Git tagging
38
+ - GitHub release creation
39
+
40
+ ### If CLAUDE.md or README.md has release instructions:
41
+
42
+ Follow those documented instructions step by step. These may include:
43
+ - Version bump procedures
44
+ - Changelog update requirements
45
+ - Build and test commands
46
+ - Publishing commands
47
+ - Tag and release creation
48
+
49
+ ### If NO release instructions exist anywhere:
50
+
51
+ Use the `AskUserQuestion` tool to gather release information:
52
+
53
+ ```
54
+ AskUserQuestion with questions:
55
+ 1. "How should releases be performed for this project?"
56
+ - Options: "npm publish", "GitHub Releases only", "Custom script", "Other"
57
+
58
+ 2. "What versioning scheme does this project use?"
59
+ - Options: "Semantic versioning (semver)", "CalVer (date-based)", "Other"
60
+ ```
61
+
62
+ Based on the user's response, attempt a reasonable release workflow:
63
+ - For npm projects: Check package.json for publish config
64
+ - For monorepos: Look for workspace/lerna/nx configuration
65
+ - For other projects: Follow user guidance
66
+
67
+ ## Guidelines
68
+
69
+ - **Read CHANGELOG.md** if present to understand recent changes
70
+ - **Check package.json** for version and publish configuration
71
+ - **Look for existing release scripts** in package.json or scripts/
72
+ - **Verify you're on the correct branch** before releasing
73
+ - **Run tests/build** before publishing if not already verified
74
+
75
+ ## Constraints
76
+
77
+ - **Do NOT guess** release procedures without skill or user input
78
+ - **Do NOT publish** to registries without explicit confirmation
79
+ - **Do NOT push tags** without verifying the release was successful
80
+
81
+ Complete with: `Release execution complete - [what was released and where].`
@@ -0,0 +1,60 @@
1
+ # Release Summary
2
+
3
+ Generate a summary of the release process for posting to Linear.
4
+
5
+ ## Your Task
6
+
7
+ Create a clear summary of what was released:
8
+
9
+ ### 1. Release Information
10
+ - Version released (e.g., v0.2.7)
11
+ - Package(s) published
12
+ - Registry/destination (npm, GitHub Releases, etc.)
13
+
14
+ ### 2. Changes Included
15
+ - Brief summary of what's in this release
16
+ - Link to changelog or release notes if available
17
+
18
+ ### 3. Post-Release Actions
19
+ - Tags pushed
20
+ - GitHub release created (with link if applicable)
21
+ - Any follow-up tasks needed
22
+
23
+ ### 4. Linear Issue Updates
24
+ - If Linear issues were mentioned in the changelog, note which issues should be moved from 'MergedUnreleased' to 'ReleasedMonitoring' status
25
+
26
+ ## Format Requirements
27
+
28
+ - **Be concise** - focus on what was released
29
+ - Use markdown formatting for readability
30
+ - Include version numbers and links where helpful
31
+ - **To mention someone**: Use `https://linear.app/linear/profiles/username` syntax
32
+
33
+ ## Constraints
34
+
35
+ - **You have exactly 1 turn** - generate the summary in a single response
36
+ - This is the final output that will be posted to Linear
37
+ - Focus on the release outcome, not the process details
38
+
39
+ ## Example Format
40
+
41
+ ```
42
+ ## Release Complete
43
+
44
+ **Version**: v0.2.7
45
+ **Published to**: npm (@sylas-ai/*)
46
+
47
+ ### What's Included
48
+ - Feature X improvements
49
+ - Bug fix for Y
50
+ - Performance optimizations
51
+
52
+ ### Links
53
+ - [GitHub Release](https://github.com/org/repo/releases/tag/v0.2.7)
54
+ - [Changelog](./CHANGELOG.md)
55
+
56
+ ### Linear Issues
57
+ The following issues can be moved to 'ReleasedMonitoring':
58
+ - CYPACK-XXX
59
+ - CYPACK-YYY
60
+ ```