swellai 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.
- package/README.md +711 -0
- package/dist/agents/linear-agent.d.ts +32 -0
- package/dist/agents/linear-agent.d.ts.map +1 -0
- package/dist/agents/linear-agent.js +263 -0
- package/dist/agents/linear-agent.js.map +1 -0
- package/dist/agents/planning-agent.d.ts +36 -0
- package/dist/agents/planning-agent.d.ts.map +1 -0
- package/dist/agents/planning-agent.js +248 -0
- package/dist/agents/planning-agent.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +102 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/install.d.ts +11 -0
- package/dist/cli/install.d.ts.map +1 -0
- package/dist/cli/install.js +257 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/manifest.d.ts +27 -0
- package/dist/cli/manifest.d.ts.map +1 -0
- package/dist/cli/manifest.js +65 -0
- package/dist/cli/manifest.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/claude-agent-sdk.d.ts +73 -0
- package/dist/lib/claude-agent-sdk.d.ts.map +1 -0
- package/dist/lib/claude-agent-sdk.js +114 -0
- package/dist/lib/claude-agent-sdk.js.map +1 -0
- package/dist/lib/conversation-logger.d.ts +66 -0
- package/dist/lib/conversation-logger.d.ts.map +1 -0
- package/dist/lib/conversation-logger.js +159 -0
- package/dist/lib/conversation-logger.js.map +1 -0
- package/dist/lib/opencode.d.ts +68 -0
- package/dist/lib/opencode.d.ts.map +1 -0
- package/dist/lib/opencode.js +151 -0
- package/dist/lib/opencode.js.map +1 -0
- package/dist/lib/turso-schema.d.ts +13 -0
- package/dist/lib/turso-schema.d.ts.map +1 -0
- package/dist/lib/turso-schema.js +69 -0
- package/dist/lib/turso-schema.js.map +1 -0
- package/dist/lib/turso.d.ts +56 -0
- package/dist/lib/turso.d.ts.map +1 -0
- package/dist/lib/turso.js +144 -0
- package/dist/lib/turso.js.map +1 -0
- package/dist/lib/types.d.ts +31 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +20 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +34 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +72 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/scripts/build-templates.d.ts +17 -0
- package/dist/scripts/build-templates.d.ts.map +1 -0
- package/dist/scripts/build-templates.js +132 -0
- package/dist/scripts/build-templates.js.map +1 -0
- package/dist/scripts/claude-agent-runner.d.ts +28 -0
- package/dist/scripts/claude-agent-runner.d.ts.map +1 -0
- package/dist/scripts/claude-agent-runner.js +278 -0
- package/dist/scripts/claude-agent-runner.js.map +1 -0
- package/dist/src/agents/linear-agent.d.ts +32 -0
- package/dist/src/agents/linear-agent.d.ts.map +1 -0
- package/dist/src/agents/linear-agent.js +285 -0
- package/dist/src/agents/linear-agent.js.map +1 -0
- package/dist/src/agents/planning-agent.d.ts +36 -0
- package/dist/src/agents/planning-agent.d.ts.map +1 -0
- package/dist/src/agents/planning-agent.js +248 -0
- package/dist/src/agents/planning-agent.js.map +1 -0
- package/dist/src/cli/index.d.ts +3 -0
- package/dist/src/cli/index.d.ts.map +1 -0
- package/dist/src/cli/index.js +102 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/install.d.ts +11 -0
- package/dist/src/cli/install.d.ts.map +1 -0
- package/dist/src/cli/install.js +257 -0
- package/dist/src/cli/install.js.map +1 -0
- package/dist/src/cli/manifest.d.ts +27 -0
- package/dist/src/cli/manifest.d.ts.map +1 -0
- package/dist/src/cli/manifest.js +65 -0
- package/dist/src/cli/manifest.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +17 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/claude-agent-sdk.d.ts +73 -0
- package/dist/src/lib/claude-agent-sdk.d.ts.map +1 -0
- package/dist/src/lib/claude-agent-sdk.js +114 -0
- package/dist/src/lib/claude-agent-sdk.js.map +1 -0
- package/dist/src/lib/conversation-logger.d.ts +66 -0
- package/dist/src/lib/conversation-logger.d.ts.map +1 -0
- package/dist/src/lib/conversation-logger.js +159 -0
- package/dist/src/lib/conversation-logger.js.map +1 -0
- package/dist/src/lib/opencode.d.ts +153 -0
- package/dist/src/lib/opencode.d.ts.map +1 -0
- package/dist/src/lib/opencode.js +153 -0
- package/dist/src/lib/opencode.js.map +1 -0
- package/dist/src/lib/turso-schema.d.ts +13 -0
- package/dist/src/lib/turso-schema.d.ts.map +1 -0
- package/dist/src/lib/turso-schema.js +69 -0
- package/dist/src/lib/turso-schema.js.map +1 -0
- package/dist/src/lib/turso.d.ts +56 -0
- package/dist/src/lib/turso.d.ts.map +1 -0
- package/dist/src/lib/turso.js +144 -0
- package/dist/src/lib/turso.js.map +1 -0
- package/dist/src/lib/types.d.ts +31 -0
- package/dist/src/lib/types.d.ts.map +1 -0
- package/dist/src/lib/types.js +20 -0
- package/dist/src/lib/types.js.map +1 -0
- package/dist/src/lib/utils.d.ts +34 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +72 -0
- package/dist/src/lib/utils.js.map +1 -0
- package/package.json +63 -0
- package/templates/.env.example +51 -0
- package/templates/agents/codebase-analyzer.md +121 -0
- package/templates/agents/codebase-locator.md +105 -0
- package/templates/agents/coding-agent.md +187 -0
- package/templates/agents/debug-agent.md +300 -0
- package/templates/prompts/consolidate-and-create-linear.md +282 -0
- package/templates/prompts/implementation.md +94 -0
- package/templates/prompts/plan-generation.md +171 -0
- package/templates/prompts/review.md +39 -0
- package/templates/prompts/verify.md +80 -0
- package/templates/scripts/claude-agent-runner.js +12887 -0
- package/templates/scripts/detect-runtime.sh +95 -0
- package/templates/scripts/linear-agent.js +1753 -0
- package/templates/scripts/planning-agent.js +1738 -0
- package/templates/workflows/claude-implement.yml +931 -0
- package/templates/workflows/claude-plan.yml +301 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
## Task
|
|
2
|
+
You are tasked with creating detailed implementation plans through an interactive, iterative process. You should be skeptical, thorough, and work to produce high-quality technical specifications.
|
|
3
|
+
|
|
4
|
+
### FIRST: Read the Project Specification
|
|
5
|
+
|
|
6
|
+
Start by orienting yourself:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
# 1. See your working directory
|
|
10
|
+
pwd
|
|
11
|
+
|
|
12
|
+
# 2. List files to understand project structure
|
|
13
|
+
ls -la
|
|
14
|
+
|
|
15
|
+
# 3. Review the app spec (if available)
|
|
16
|
+
cat spec.txt
|
|
17
|
+
|
|
18
|
+
# 4. Review the recent git history
|
|
19
|
+
git log -5 --stat
|
|
20
|
+
```
|
|
21
|
+
After this step, move to the planning phase.
|
|
22
|
+
|
|
23
|
+
## Planning Phase
|
|
24
|
+
Create a TODO list based on the below.
|
|
25
|
+
|
|
26
|
+
1. **Read all mentioned files immediately and FULLY**:
|
|
27
|
+
- Ticket files
|
|
28
|
+
- Research documents
|
|
29
|
+
- Website links
|
|
30
|
+
- Related implementation plans
|
|
31
|
+
- Any JSON/data files mentioned
|
|
32
|
+
- **IMPORTANT**: Use the Read tool WITHOUT limit/offset parameters to read entire files
|
|
33
|
+
- **NEVER** read files partially - if a file is mentioned, read it completely
|
|
34
|
+
|
|
35
|
+
2. **Gather codebase context**:
|
|
36
|
+
- Find all files related to the ticket/task
|
|
37
|
+
- Understand how the current implementation works
|
|
38
|
+
- Use the deepwiki MCP. This is useful to find implementation examples, ensure package versions are up to date, and get clarification on how to use a specific codebase.
|
|
39
|
+
|
|
40
|
+
3. **Analyze and verify understanding**:
|
|
41
|
+
- Cross-reference the issue/feature requirements with actual code
|
|
42
|
+
- Identify any discrepancies or misunderstandings
|
|
43
|
+
- Note assumptions that need verification
|
|
44
|
+
- Determine true scope based on codebase reality
|
|
45
|
+
|
|
46
|
+
## Output Format
|
|
47
|
+
|
|
48
|
+
You MUST respond with a structured Markdown implementation plan. Do NOT use JSON. Use this structure:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
[Brief description of what we're implementing and why]
|
|
54
|
+
|
|
55
|
+
## Implementation Task List:
|
|
56
|
+
1. [Task name] - [what it accomplishes]
|
|
57
|
+
2. [Task name] - [what it accomplishes]
|
|
58
|
+
3. [Task name] - [what it accomplishes]
|
|
59
|
+
|
|
60
|
+
## Current State Analysis
|
|
61
|
+
|
|
62
|
+
[What exists now, what's missing, key constraints discovered, open questions]
|
|
63
|
+
|
|
64
|
+
## Desired End State
|
|
65
|
+
|
|
66
|
+
[A Specification of the desired end state after this plan is complete, and how to verify it]
|
|
67
|
+
|
|
68
|
+
### Key Discoveries:
|
|
69
|
+
- [Important finding with file:line reference]
|
|
70
|
+
- [Pattern to follow]
|
|
71
|
+
- [Constraint to work within]
|
|
72
|
+
|
|
73
|
+
## What We're NOT Doing
|
|
74
|
+
|
|
75
|
+
[Explicitly list out-of-scope items to prevent scope creep]
|
|
76
|
+
|
|
77
|
+
## Implementation Approach
|
|
78
|
+
|
|
79
|
+
[High-level strategy and reasoning]
|
|
80
|
+
|
|
81
|
+
## Files to Edit
|
|
82
|
+
|
|
83
|
+
[A list of files to be edited along with the specific line numbers to be edited]
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Task 1: [Task Description]
|
|
88
|
+
**Files to edit/create**: `path/to/file.ext`
|
|
89
|
+
**Description of Changes**: [Detailed description of changes, do not include code]
|
|
90
|
+
**Assumptions**: [List of assumptions]
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Success Criteria:
|
|
94
|
+
|
|
95
|
+
#### Feature Verification (include all relevant test cases, this may be long):
|
|
96
|
+
category: functional
|
|
97
|
+
description: Brief description of the feature and what this test verifies
|
|
98
|
+
steps:
|
|
99
|
+
- Step 1: Navigate to relevant page
|
|
100
|
+
- Step 2: Perform action
|
|
101
|
+
- Step 3: Verify expected result
|
|
102
|
+
passes: false
|
|
103
|
+
---
|
|
104
|
+
category: style
|
|
105
|
+
description: Brief description of UI/UX requirement
|
|
106
|
+
steps:
|
|
107
|
+
- Step 1: Navigate to page
|
|
108
|
+
- Step 2: Take screenshot
|
|
109
|
+
- Step 3: Verify visual requirements
|
|
110
|
+
passes: false
|
|
111
|
+
|
|
112
|
+
#### Automated Verification:
|
|
113
|
+
- [ ] Migration applies cleanly: `make migrate`
|
|
114
|
+
- [ ] Unit tests pass: `make test-component`
|
|
115
|
+
- [ ] Type checking passes: `npm run typecheck`
|
|
116
|
+
- [ ] Linting passes: `make lint`
|
|
117
|
+
- [ ] Integration tests pass: `make test-integration`
|
|
118
|
+
- [ ] Test "New chat button creates a fresh conversation" from @features.json with the playwright MCP in headless mode
|
|
119
|
+
|
|
120
|
+
#### Manual Verification:
|
|
121
|
+
- [ ] Feature works as expected when tested via UI
|
|
122
|
+
- [ ] Performance is acceptable under load
|
|
123
|
+
- [ ] Edge case handling verified manually
|
|
124
|
+
- [ ] No regressions in related features
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Task 2: [Task Description]
|
|
129
|
+
|
|
130
|
+
[Similar structure with both automated and manual success criteria...]
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## References
|
|
135
|
+
|
|
136
|
+
- Related research: `[relevant].md`
|
|
137
|
+
- Similar implementation: `[file:line]`
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Important Guidelines
|
|
141
|
+
|
|
142
|
+
1. **Be Skeptical**:
|
|
143
|
+
- Question vague requirements
|
|
144
|
+
- Identify potential issues early
|
|
145
|
+
- Ask "why" and "what about"
|
|
146
|
+
- Don't assume - verify with code
|
|
147
|
+
|
|
148
|
+
2. **Be Thorough**:
|
|
149
|
+
- Read all context files COMPLETELY before planning
|
|
150
|
+
- Research actual code patterns using parallel sub-tasks
|
|
151
|
+
- Include specific file paths and line numbers
|
|
152
|
+
- Write measurable success criteria with clear automated vs manual distinction
|
|
153
|
+
|
|
154
|
+
3. **Be Practical**:
|
|
155
|
+
- Focus on incremental, testable changes
|
|
156
|
+
- Consider migration and rollback
|
|
157
|
+
- Think about edge cases
|
|
158
|
+
- Include "what we're NOT doing"
|
|
159
|
+
- Ignore any directories that mention "prompts"
|
|
160
|
+
|
|
161
|
+
- Unless otherwise noted, backwards compatibility is not required.
|
|
162
|
+
|
|
163
|
+
## Task Details
|
|
164
|
+
|
|
165
|
+
## Issue Title
|
|
166
|
+
{{ISSUE_TITLE}}
|
|
167
|
+
|
|
168
|
+
## Issue Description
|
|
169
|
+
{{ISSUE_BODY}}
|
|
170
|
+
|
|
171
|
+
Begin your analysis now and provide your implementation plan. DO NOT IMPLEMENT. Only create the plan and do not stop until a plan is created.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
You are reviewing {{NUM_IMPLEMENTATIONS}} parallel implementations of this feature request:
|
|
2
|
+
|
|
3
|
+
{{LINEAR_ISSUE}}
|
|
4
|
+
|
|
5
|
+
The implementations are in:
|
|
6
|
+
- {{WORKTREES_DIR}}/impl-1
|
|
7
|
+
- {{WORKTREES_DIR}}/impl-2
|
|
8
|
+
- {{WORKTREES_DIR}}/impl-3
|
|
9
|
+
|
|
10
|
+
## Review Process
|
|
11
|
+
|
|
12
|
+
For each implementation:
|
|
13
|
+
|
|
14
|
+
1. **Examine the changes**:
|
|
15
|
+
```bash
|
|
16
|
+
cd {{WORKTREES_DIR}}/impl-N
|
|
17
|
+
git diff main...HEAD
|
|
18
|
+
git log main...HEAD --oneline
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. **Evaluate on these criteria**:
|
|
22
|
+
- **Code quality**: Clean, maintainable, follows conventions, proper error handling
|
|
23
|
+
- **Completeness**: Fully implements the feature, handles edge cases
|
|
24
|
+
- **Correctness**: Logic is sound, no bugs
|
|
25
|
+
- **Simplicity**: Not over-engineered
|
|
26
|
+
|
|
27
|
+
3. **Check for issues**:
|
|
28
|
+
- Security vulnerabilities
|
|
29
|
+
- Breaking changes
|
|
30
|
+
- Missing tests
|
|
31
|
+
- Incomplete implementation
|
|
32
|
+
|
|
33
|
+
## Decision
|
|
34
|
+
|
|
35
|
+
After reviewing all implementations, select the best one.
|
|
36
|
+
|
|
37
|
+
Your response will be validated against a JSON schema. Provide:
|
|
38
|
+
- "best": The implementation number (1, 2, or 3)
|
|
39
|
+
- "reasoning": A detailed comparison explaining why this implementation is best
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
You are senior software engineer with a high bar for quality. You will review a branch and ensure it was fully implemented.
|
|
2
|
+
|
|
3
|
+
{{LINEAR_ISSUE}}
|
|
4
|
+
|
|
5
|
+
The implementation is on branch: {{WINNING_BRANCH}}
|
|
6
|
+
PR Number: {{PR_NUMBER}}
|
|
7
|
+
|
|
8
|
+
Start by orienting yourself:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# 1. See your working directory
|
|
12
|
+
pwd
|
|
13
|
+
|
|
14
|
+
# 2. List files to understand project structure
|
|
15
|
+
ls -la
|
|
16
|
+
|
|
17
|
+
# 3. Review the app spec (if available)
|
|
18
|
+
cat spec.txt
|
|
19
|
+
|
|
20
|
+
#4. Get the Linear Issue details
|
|
21
|
+
mcp__linear-server__get_issue(id: "DEL-####")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Instructions
|
|
25
|
+
- Always follow the .sessions pattern in @claude-parallel/.sessions/README.md
|
|
26
|
+
|
|
27
|
+
When given a Linear issue:
|
|
28
|
+
- Read the issue and subissues completely, including any comments.
|
|
29
|
+
- Read all files mentioned in the plan
|
|
30
|
+
- **Read files fully** - never use limit/offset parameters, you need complete context
|
|
31
|
+
- Think deeply about how the pieces fit together
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Pre-computed Build Results
|
|
35
|
+
|
|
36
|
+
The following checks have already been run:
|
|
37
|
+
|
|
38
|
+
| Check | Status |
|
|
39
|
+
|-------|--------|
|
|
40
|
+
| Build | {{BUILD_STATUS}} |
|
|
41
|
+
| Tests | {{TESTS_STATUS}} |
|
|
42
|
+
| Lint | {{LINT_STATUS}} |
|
|
43
|
+
| TypeCheck | {{TYPECHECK_STATUS}} |
|
|
44
|
+
|
|
45
|
+
### Build Output
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
{{BUILD_OUTPUT}}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Your Verification Tasks
|
|
52
|
+
|
|
53
|
+
Since builds have already been run, focus on:
|
|
54
|
+
|
|
55
|
+
1. **Review the code changes**:
|
|
56
|
+
```bash
|
|
57
|
+
git log --oneline -5
|
|
58
|
+
git diff main...HEAD --stat
|
|
59
|
+
git diff main...HEAD
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
2. **Analyze build failures** (if any):
|
|
63
|
+
- If build/tests/lint/typecheck failed, identify the root cause
|
|
64
|
+
- The Iron Law: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
|
|
65
|
+
- Use the @agent-debug-agent to find the root cause
|
|
66
|
+
- Once the root cause is found use a general-puspose subagent to implement the fix
|
|
67
|
+
|
|
68
|
+
3. **Verify feature implementation**:
|
|
69
|
+
- It is critical to remember that the implementation does not need to be identical to the linear issue as long as it accomplish the overarching goal and all feature verification is confirmed as passing.
|
|
70
|
+
- Take your time and only move to this step once all build/tests/lint/typecheck failures are fixed.
|
|
71
|
+
- Review the changes against the linear issue
|
|
72
|
+
- Review the implementation against the Feature Verification section in each Linear issue. Be skeptical and review each feature indivudually even if it is marked as passing.
|
|
73
|
+
- Use the @agent-coding-agent to implement any features that are not implemented.
|
|
74
|
+
- Once you are VERY confident the implementation is complete and correct, mark each issue as `passing` and assign it a status of `Ready for Review`
|
|
75
|
+
|
|
76
|
+
4. Update spec.txt
|
|
77
|
+
- Review and update the spec.txt file to reflect any changes to the application.
|
|
78
|
+
|
|
79
|
+
4. **Commit and Push**:
|
|
80
|
+
- Once all changes/fixes have been made commit with a descriptive message and push
|