Adding a Task Provider to aidev
Use this skill when adding a new task source (e.g. Notion, Trello) so the agent follows the project’s provider pattern and wiring.
Checklist
Implement TaskProvider — Create
src/providers/<name>.tsimplementing the interface fromsrc/providers/base.ts:fetchTasks(): Promise<Task[]>postComment(taskId, text): Promise<void>getComments(taskId): Promise<Comment[]>updateStatus(taskId, status): Promise<void>createTask(params): Promise<CreateTaskResult>Use nativefetchonly; no shell interpolation; usespawnSync(bin, [...args])if calling a CLI.
Register in factory — In
src/providers/index.ts: import the new provider class and add acase '<name>': return new XxxProvider(config);increateProvider(). For not-yet-implemented providers keep:throw new Error('X provider is not yet implemented. Contributions welcome!');Config types — In
src/types.ts: add any provider-specific fields to theConfiginterface (e.g.xxxApiKey,xxxProject).Config loading — In
src/config.tsinsideloadConfig():- When
provider === '<name>', add the required env var keys to therequiredarray and ensure they are validated. - Map
process.envto the newConfigfields (with defaults if appropriate).
- When
Documentation — Add a section to
.env.aidev.examplefor the new provider’s env vars. Update README.md if it lists providers or setup steps.Tests — Add or extend tests in
src/__tests__/providers.test.ts(or a dedicated test file) so the new provider is covered. Runnpm testand fix failures.
Reference
- Existing implementations:
src/providers/clickup.ts,src/providers/jira.ts. - Interface:
src/providers/base.ts. - Types:
src/types.ts(Task,Comment,CreateTaskParams,CreateTaskResult,Config).
Source: qelos-io/aidev — distributed by TomeVault.