@forloop-cc/forloop-opencode-plugin-planner 2.2.1
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/CHANGELOG.md +225 -0
- package/CODE_OF_CONDUCT.md +77 -0
- package/CONTRIBUTING.md +176 -0
- package/LICENSE +21 -0
- package/README.md +211 -0
- package/SECURITY.md +69 -0
- package/docs/CONFIGURATION.md +283 -0
- package/docs/DEVELOPER-VS-USER.md +129 -0
- package/docs/IMPROVED-AUTHENTICATION.md +317 -0
- package/docs/INSTALLATION-SCRIPTS.md +304 -0
- package/docs/PLANNER-AGENT-IMPROVEMENTS.md +88 -0
- package/docs/PLUGIN-ARCHITECTURE.md +308 -0
- package/docs/QUICKSTART-NON-DEV.md +94 -0
- package/docs/README-FOR-HUMANS-AND-AI.md +109 -0
- package/docs/README.md +70 -0
- package/docs/SKILLS-GAP-ANALYSIS.md +157 -0
- package/docs/USER-INTERACTION-MODEL.md +106 -0
- package/docs/file-management/2026-04-12-forloop-aivy-documents-sync.md +395 -0
- package/docs/file-management/FILE_UPLOAD_ENHANCEMENT.md +431 -0
- package/docs/file-management/FILE_UPLOAD_FLOW.md +300 -0
- package/docs/images/forloop-opencode-flow.png +0 -0
- package/docs/images/forloop-opencode-header.png +0 -0
- package/docs/superpowers/plans/2026-05-03-sprint-isolated-directory-structure.md +1450 -0
- package/docs/superpowers/plans/2026-05-29-install-system.md +850 -0
- package/docs/superpowers/specs/2026-05-03-sprint-isolated-directory-structure-design.md +149 -0
- package/docs/superpowers/specs/2026-05-19-opencode-message-recording-design.md +468 -0
- package/docs/superpowers/specs/2026-05-29-install-system-design.md +135 -0
- package/install.sh +317 -0
- package/package.json +87 -0
- package/plugins/capabilities/api-client.ts +556 -0
- package/plugins/capabilities/auth.ts +120 -0
- package/plugins/capabilities/config.ts +195 -0
- package/plugins/capabilities/context-resolver.ts +106 -0
- package/plugins/capabilities/token-storage.ts +98 -0
- package/plugins/forloop-plugin.ts +186 -0
- package/plugins/hooks/message-recorder.ts +258 -0
- package/plugins/hooks/shell-env.ts +62 -0
- package/plugins/tools/agent-sprint-tools.ts +100 -0
- package/plugins/tools/agent-suggestion-tools.ts +275 -0
- package/plugins/tools/agent-tools.ts +114 -0
- package/plugins/tools/ai-trigger-tools.ts +79 -0
- package/plugins/tools/developer-status-tool.ts +97 -0
- package/plugins/tools/file-tools.ts +240 -0
- package/plugins/tools/folder-tools.ts +75 -0
- package/plugins/tools/organization-tools.ts +213 -0
- package/plugins/tools/schedule-tools.ts +173 -0
- package/plugins/tools/sprint-tools.ts +287 -0
- package/plugins/tools/story-tools.ts +320 -0
- package/plugins/tools/sync-tools.ts +509 -0
- package/plugins/tools/template-tools.ts +170 -0
- package/plugins/tools/user-tools.ts +146 -0
- package/scripts/migrate-tokens.js +90 -0
- package/scripts/use-prod.sh +11 -0
- package/tsconfig.json +17 -0
- package/update.sh +172 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [2.2.0] - 2026-03-25
|
|
9
|
+
|
|
10
|
+
### Added - Sprint & Story API Enhancements
|
|
11
|
+
|
|
12
|
+
#### New Sprint Tools
|
|
13
|
+
- **forloopSprintCreate** - Create new sprint with dates and settings
|
|
14
|
+
- Arguments: title, description, startDate, endDate, isPrivate, organizationId
|
|
15
|
+
- Confirmation messages with sprint details
|
|
16
|
+
- **forloopSprintUpdate** - Update sprint details
|
|
17
|
+
- Arguments: sprintId, title, description, startDate, endDate, isPrivate
|
|
18
|
+
- Partial updates supported
|
|
19
|
+
- **forloopSprintDelete** - Delete sprint (with confirmation)
|
|
20
|
+
- Arguments: sprintId, confirm (required for safety)
|
|
21
|
+
- Warning message before deletion
|
|
22
|
+
|
|
23
|
+
#### New Story Tools
|
|
24
|
+
- **forloopStoryGet** - Retrieve story by ID
|
|
25
|
+
- Arguments: storyId
|
|
26
|
+
- Returns: story details, sprint info, assignee info, description
|
|
27
|
+
|
|
28
|
+
#### Enhanced Story Create
|
|
29
|
+
- **forloopStoryCreate** - Added missing server-compatible arguments:
|
|
30
|
+
- `status` - Initial story status (default: 'todo')
|
|
31
|
+
- `assigneeId` - User ID for assignment
|
|
32
|
+
- `assigneeType` - 'user' or 'agent' (default: 'user')
|
|
33
|
+
- `x`, `y` - Canvas position coordinates
|
|
34
|
+
- `zIndex` - Canvas layering order
|
|
35
|
+
- `templateId` - Template for story creation
|
|
36
|
+
- `metadata` - Additional JSON metadata
|
|
37
|
+
|
|
38
|
+
#### API Client Updates
|
|
39
|
+
- **CreateStoryRequest interface** - Extended with all server-compatible fields
|
|
40
|
+
- Matches server expectations in `server_lambda/src/controllers/storyController.ts`
|
|
41
|
+
- Proper type definitions for all optional fields
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [2.1.0] - 2026-03-24
|
|
46
|
+
|
|
47
|
+
### Added - Phase 2a: Agents & Skills Integration
|
|
48
|
+
|
|
49
|
+
#### Custom Agents
|
|
50
|
+
- **forLoopPlanner** (Primary Agent) - Sprint planning specialist
|
|
51
|
+
- Tab-switchable primary agent for sprint workflows
|
|
52
|
+
- Guides users through sprint planning process
|
|
53
|
+
- Creates stories with INVEST criteria
|
|
54
|
+
- Invokes forLoopStoryEvaluator for estimates
|
|
55
|
+
- Auto-loads sprint-planning, story-creation, story-points skills
|
|
56
|
+
|
|
57
|
+
- **forLoopStoryEvaluator** (Subagent) - Story point estimation specialist
|
|
58
|
+
- Invoked via `@forLoopStoryEvaluator` mention
|
|
59
|
+
- 4-dimension analysis: complexity, effort, uncertainty, risk
|
|
60
|
+
- Provides confidence levels and reasoning
|
|
61
|
+
- Suggests splitting stories >5 points
|
|
62
|
+
- Calibration with historical stories
|
|
63
|
+
|
|
64
|
+
#### Workflow Skills
|
|
65
|
+
- **sprint-planning** skill - Structured sprint planning workflow
|
|
66
|
+
- Process flowchart with decision points
|
|
67
|
+
- Pre-planning and during-planning checklists
|
|
68
|
+
- Tool usage examples (sprint.list, sprint.get, story.create)
|
|
69
|
+
- Capacity planning calculations
|
|
70
|
+
- Common mistakes and fixes
|
|
71
|
+
|
|
72
|
+
- **story-creation** skill - User story best practices
|
|
73
|
+
- User story template (As a... I want... So that...)
|
|
74
|
+
- Given/When/Then acceptance criteria format
|
|
75
|
+
- INVEST criteria checklist
|
|
76
|
+
- Story sizing guidelines
|
|
77
|
+
- Epic decomposition examples
|
|
78
|
+
|
|
79
|
+
- **story-points** skill - Estimation framework
|
|
80
|
+
- 4-dimension estimation approach
|
|
81
|
+
- Points reference scale (0-10)
|
|
82
|
+
- Estimation techniques (triangulation, affinity mapping)
|
|
83
|
+
- Factors checklist (technical, knowledge, testing)
|
|
84
|
+
- Calibration examples by point value
|
|
85
|
+
|
|
86
|
+
#### Configuration
|
|
87
|
+
- Skill permissions system integration
|
|
88
|
+
- Agent-specific permission overrides
|
|
89
|
+
- Auto-loading skills based on permissions
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
- Updated package.json to include `agent/` and `skills/` directories
|
|
93
|
+
- Enhanced README.md with agents and skills documentation
|
|
94
|
+
- Updated version to 2.1.0
|
|
95
|
+
|
|
96
|
+
### Technical
|
|
97
|
+
- Skills follow Superpowers pattern (frontmatter, flowcharts, checklists)
|
|
98
|
+
- Agents follow OpenAgentsControl pattern (markdown with frontmatter)
|
|
99
|
+
- Files distributed via npm/git package
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## [2.0.0] - 2026-03-23
|
|
104
|
+
|
|
105
|
+
### Added - Phase 2: AI Agent Integration
|
|
106
|
+
|
|
107
|
+
#### New Tools
|
|
108
|
+
- `forloopAgentSuggest` - Get AI-powered suggestions for story breakdowns, estimates, and planning
|
|
109
|
+
- `forloopAgentBreakdown` - Automatically break down stories into actionable subtasks
|
|
110
|
+
- `forloopAgentEstimate` - Get AI-suggested story points with rationale
|
|
111
|
+
- `forloopAgentHistory` - View and filter conversation history with AI agents
|
|
112
|
+
- `forloopAgentClear` - Clear conversation history (individual or bulk)
|
|
113
|
+
|
|
114
|
+
#### Server-Side Features
|
|
115
|
+
- New `/api/agents/suggestions` endpoint for context-aware AI suggestions
|
|
116
|
+
- New `/api/agents/stories/:id/breakdown` for story task decomposition
|
|
117
|
+
- New `/api/agents/stories/:id/estimate` for story point estimation
|
|
118
|
+
- New `/api/agents/conversations` for conversation history management
|
|
119
|
+
- Integration with existing WebSocket/Redis infrastructure for async AI responses
|
|
120
|
+
- Support for conversation tracking by sprint and agent
|
|
121
|
+
|
|
122
|
+
#### Agent Capabilities
|
|
123
|
+
- **Breakdown suggestions**: Context-aware task decomposition based on story type
|
|
124
|
+
- Login/auth features → authentication middleware, password encryption
|
|
125
|
+
- Analytics features → data queries, visualization components
|
|
126
|
+
- Generic → database, API, UI, tests, documentation
|
|
127
|
+
|
|
128
|
+
- **Estimation**: Smart story point calculation
|
|
129
|
+
- Considers complexity, priority, description length
|
|
130
|
+
- Suggests points on Fibonacci-like scale (1-13)
|
|
131
|
+
- Provides estimation rationale
|
|
132
|
+
|
|
133
|
+
- **Conversation tracking**: Full history management
|
|
134
|
+
- Filter by sprint
|
|
135
|
+
- View request/response pairs
|
|
136
|
+
- Delete individual or bulk conversations
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
- Updated plugin architecture to support Phase 2 features
|
|
140
|
+
- Enhanced API client with new methods for agent operations
|
|
141
|
+
|
|
142
|
+
### Technical
|
|
143
|
+
- Added `agentSuggestionController.ts`
|
|
144
|
+
- Added `conversationController.ts`
|
|
145
|
+
- Added `agentSuggestionRoutes.ts`
|
|
146
|
+
- Updated `app.ts` to register agent routes
|
|
147
|
+
- Added type definitions for agent suggestions and conversations
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## [1.0.0] - 2026-03-23
|
|
152
|
+
|
|
153
|
+
### Added - Phase 1: Foundation & Authentication
|
|
154
|
+
|
|
155
|
+
#### Core Features
|
|
156
|
+
- `forloopTokenSet` - Set/update ForLoop API token
|
|
157
|
+
- `forloopTokenGet` - Check if API token is configured
|
|
158
|
+
- `forloopSprintGet` - Get sprint details with stories and files
|
|
159
|
+
- `forloopSprintList` - List all accessible sprints
|
|
160
|
+
- `forloopStoryCreate` - Create new stories
|
|
161
|
+
- `forloopStoryUpdate` - Update existing stories
|
|
162
|
+
- `forloopStoryDelete` - Delete stories
|
|
163
|
+
- `forloopAgentQuery` - Query AI agents for analysis
|
|
164
|
+
|
|
165
|
+
#### Server-Side
|
|
166
|
+
- `OpencodeApiToken` database table with proper indexes
|
|
167
|
+
- Token-based authentication middleware
|
|
168
|
+
- API token validation with scope enforcement
|
|
169
|
+
- RESTful endpoints at `/api/opencode/*`
|
|
170
|
+
|
|
171
|
+
#### Infrastructure
|
|
172
|
+
- Token storage in `~/.config/forloop/tokens.json`
|
|
173
|
+
- Automatic sprint ID detection from git branches
|
|
174
|
+
- Environment variable injection via `shell.env` hook
|
|
175
|
+
- Installation scripts for local and global deployment
|
|
176
|
+
|
|
177
|
+
#### Documentation
|
|
178
|
+
- Comprehensive README.md
|
|
179
|
+
- Installation scripts (5 methods)
|
|
180
|
+
- Skill documentation
|
|
181
|
+
- MIT License
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Version History
|
|
186
|
+
|
|
187
|
+
| Version | Release Date | Phase | Features |
|
|
188
|
+
|---------|--------------|-------|----------|
|
|
189
|
+
| 0.1.0 | 2026-03-20 | Pre-Alpha | Initial prototype |
|
|
190
|
+
| 1.0.0 | 2026-03-23 | Phase 1 | Foundation & Authentication |
|
|
191
|
+
| 2.0.0 | 2026-03-23 | Phase 2 | AI Agent Integration |
|
|
192
|
+
| 2.1.0 | 2026-03-24 | Phase 2a | Agents & Skills Integration |
|
|
193
|
+
| 3.0.0 | TBA | Phase 3 | Autopilot & AWS |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Semantic Versioning
|
|
198
|
+
|
|
199
|
+
This project follows Semantic Versioning (SemVer):
|
|
200
|
+
|
|
201
|
+
- **MAJOR** version for incompatible changes (e.g., breaking API changes)
|
|
202
|
+
- **MINOR** version for backwards-compatible features
|
|
203
|
+
- **PATCH** version for backwards-compatible bug fixes
|
|
204
|
+
|
|
205
|
+
**Format:** `MAJOR.MINOR.PATCH` (e.g., 2.0.0)
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Upcoming Features (v3.0.0 - Phase 3)
|
|
210
|
+
|
|
211
|
+
Planned for next release:
|
|
212
|
+
|
|
213
|
+
- `forloop.autopilot.run` - Trigger autopilot development cycles
|
|
214
|
+
- `forloop.autopilot.approve` - Approve/reject AI-generated change sets
|
|
215
|
+
- `forloop.aws.deploy_lambda` - Deploy Lambda functions directly
|
|
216
|
+
- `forloop.aws.create_resource` - Create AWS resources via AI
|
|
217
|
+
- Enhanced WebSocket support for real-time AI responses
|
|
218
|
+
- Multi-agent coordination features
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
**Unreleased** changes can be viewed on the `main` branch.
|
|
223
|
+
|
|
224
|
+
[2.0.0]: https://github.com/forloop-cc/forloop-opencode-plugin/releases/tag/v2.0.0
|
|
225
|
+
[1.0.0]: https://github.com/forloop-cc/forloop-opencode-plugin/releases/tag/v1.0.0
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
+
|
|
13
|
+
- Demonstrating empathy and kindness toward other people
|
|
14
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
- Giving and gracefully accepting constructive feedback
|
|
16
|
+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
- Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
- Public or private harassment
|
|
24
|
+
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Enforcement Responsibilities
|
|
28
|
+
|
|
29
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
## Enforcement Guidelines
|
|
44
|
+
|
|
45
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
46
|
+
|
|
47
|
+
### 1. Correction
|
|
48
|
+
|
|
49
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
50
|
+
|
|
51
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
52
|
+
|
|
53
|
+
### 2. Warning
|
|
54
|
+
|
|
55
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
56
|
+
|
|
57
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
|
|
61
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
62
|
+
|
|
63
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, during this period is allowed. Violating these terms may lead to a permanent ban.
|
|
64
|
+
|
|
65
|
+
### 4. Permanent Ban
|
|
66
|
+
|
|
67
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
70
|
+
|
|
71
|
+
## Attribution
|
|
72
|
+
|
|
73
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
76
|
+
|
|
77
|
+
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Contributing to ForLoop Plugin
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to the ForLoop Plugin! It's people like you that make the ForLoop Plugin such a great tool for the community.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
|
|
8
|
+
|
|
9
|
+
## I have a question!
|
|
10
|
+
|
|
11
|
+
Before creating an issue, check if:
|
|
12
|
+
- The [README](README.md) answers your question
|
|
13
|
+
- The [docs/](docs/) folder has relevant documentation
|
|
14
|
+
- A similar issue already exists in the [issue tracker](https://github.com/forloop-cc/forloop-opencode-plugin/issues)
|
|
15
|
+
|
|
16
|
+
If not, feel free to open an issue with the "question" label.
|
|
17
|
+
|
|
18
|
+
## I want to report a bug!
|
|
19
|
+
|
|
20
|
+
Bugs are tracked as [GitHub issues](https://github.com/forloop-cc/forloop-opencode-plugin/issues). Create an issue and provide the following information:
|
|
21
|
+
|
|
22
|
+
- **Summary**: A clear, descriptive title
|
|
23
|
+
- **Environment**: opencode version, Node.js version, OS
|
|
24
|
+
- **Steps to Reproduce**: Detailed steps to reproduce the issue
|
|
25
|
+
- **Expected behavior**: What you expected to happen
|
|
26
|
+
- **Actual behavior**: What actually happened
|
|
27
|
+
- **Logs**: Any relevant error messages or logs
|
|
28
|
+
- **Additional context**: Screenshots, workarounds tried, etc.
|
|
29
|
+
|
|
30
|
+
## I want to suggest a feature!
|
|
31
|
+
|
|
32
|
+
Feature suggestions are welcome! Create an issue with:
|
|
33
|
+
|
|
34
|
+
- **Summary**: Clear, descriptive title
|
|
35
|
+
- **Problem statement**: What problem does this solve?
|
|
36
|
+
- **Proposed solution**: How should it work?
|
|
37
|
+
- **Alternatives considered**: Other approaches you've thought about
|
|
38
|
+
- **Use cases**: Who will benefit from this feature?
|
|
39
|
+
- **Additional context**: Examples, mockups, etc.
|
|
40
|
+
|
|
41
|
+
## I want to contribute code!
|
|
42
|
+
|
|
43
|
+
### Development Setup
|
|
44
|
+
|
|
45
|
+
1. **Fork the repository** and clone it locally:
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/YOUR_USERNAME/forloop-opencode-plugin.git
|
|
48
|
+
cd forloop-opencode-plugin
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
2. **Install dependencies**:
|
|
52
|
+
```bash
|
|
53
|
+
npm install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
3. **Set up local development**:
|
|
57
|
+
```bash
|
|
58
|
+
# Add the plugin to your local opencode.json pointing to this directory
|
|
59
|
+
jq '.plugin |= (. // []) + ["file://'"$(pwd)"'"] | .plugin |= unique' \
|
|
60
|
+
opencode.json > opencode.json.tmp && mv opencode.json.tmp opencode.json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
4. **Make your changes** following the coding conventions
|
|
64
|
+
|
|
65
|
+
5. **Run tests**:
|
|
66
|
+
```bash
|
|
67
|
+
# Run all tests
|
|
68
|
+
npm test
|
|
69
|
+
|
|
70
|
+
# Run specific test suite
|
|
71
|
+
npm run test:unit
|
|
72
|
+
npm run test:integration
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
6. **Run type checking**:
|
|
76
|
+
```bash
|
|
77
|
+
npm run typecheck
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Pull Request Process
|
|
81
|
+
|
|
82
|
+
1. **Create a branch** from `main`:
|
|
83
|
+
```bash
|
|
84
|
+
git checkout -b feature/your-feature-name
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
2. **Make your changes** following our coding standards:
|
|
88
|
+
- Write tests for new functionality
|
|
89
|
+
- Update documentation for user-facing changes
|
|
90
|
+
- Follow existing code style
|
|
91
|
+
- Add inline comments only when necessary (code should be self-documenting)
|
|
92
|
+
|
|
93
|
+
3. **Commit your changes** with clear, descriptive messages:
|
|
94
|
+
```bash
|
|
95
|
+
git commit -m "feat: add new feature description"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
99
|
+
- `feat:` for new features
|
|
100
|
+
- `fix:` for bug fixes
|
|
101
|
+
- `docs:` for documentation changes
|
|
102
|
+
- `style:` for formatting changes
|
|
103
|
+
- `refactor:` for code refactoring
|
|
104
|
+
- `test:` for adding tests
|
|
105
|
+
- `chore:` for maintenance tasks
|
|
106
|
+
|
|
107
|
+
4. **Push to your fork**:
|
|
108
|
+
```bash
|
|
109
|
+
git push origin feature/your-feature-name
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
5. **Open a Pull Request** against the `main` branch
|
|
113
|
+
|
|
114
|
+
### PR Checklist
|
|
115
|
+
|
|
116
|
+
Before submitting your PR, ensure:
|
|
117
|
+
- [ ] Tests pass (`npm test`)
|
|
118
|
+
- [ ] Type checking passes (`npm run typecheck`)
|
|
119
|
+
- [ ] Code follows existing style
|
|
120
|
+
- [ ] Documentation is updated
|
|
121
|
+
- [ ] Commit messages are clear and follow conventions
|
|
122
|
+
- [ ] PR description explains the change and why
|
|
123
|
+
|
|
124
|
+
### Code Style
|
|
125
|
+
|
|
126
|
+
- **TypeScript**: Strict mode enabled, explicit types
|
|
127
|
+
- **Formatting**: Consistent indentation, meaningful variable names
|
|
128
|
+
- **Error handling**: Return user-friendly error messages from tools
|
|
129
|
+
- **Comments**: Only for complex logic, not for obvious code
|
|
130
|
+
|
|
131
|
+
### Testing Guidelines
|
|
132
|
+
|
|
133
|
+
- **Unit tests**: Test individual functions/components in isolation
|
|
134
|
+
- **Integration tests**: Test API interactions (requires API token)
|
|
135
|
+
- **Test naming**: Describe the expected behavior
|
|
136
|
+
- **Test structure**: Arrange, Act, Assert pattern
|
|
137
|
+
|
|
138
|
+
Example:
|
|
139
|
+
```typescript
|
|
140
|
+
describe('forloopSprintList', () => {
|
|
141
|
+
it('should list sprints successfully', async () => {
|
|
142
|
+
// Arrange
|
|
143
|
+
mockClient.listSprints.mockResolvedValue([...])
|
|
144
|
+
|
|
145
|
+
// Act
|
|
146
|
+
const result = await tool.execute({}, {} as any)
|
|
147
|
+
|
|
148
|
+
// Assert
|
|
149
|
+
expect(result).toContain('Sprints')
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Releasing (Maintainers Only)
|
|
155
|
+
|
|
156
|
+
1. Update `CHANGELOG.md` with new version and changes
|
|
157
|
+
2. Bump version in `package.json`:
|
|
158
|
+
```bash
|
|
159
|
+
npm version patch # or minor, or major
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
3. Push tags:
|
|
163
|
+
```bash
|
|
164
|
+
git push --follow-tags
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
4. Publish to npm:
|
|
168
|
+
```bash
|
|
169
|
+
npm publish
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Questions?
|
|
173
|
+
|
|
174
|
+
Feel free to open an issue or reach out to the maintainers.
|
|
175
|
+
|
|
176
|
+
Thank you for contributing! 🚀
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ForLoop
|
|
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.
|