feat: integration builder prompt + MCP sources fix - #71
Merged
Conversation
Generalizes the hardcoded Todoist integration into an open, pluggable source system. Any external service (Teams, Outlook, Slack, etc.) can now be ingested via a common JSONL intermediate format. Key changes: - Task.todoistId → Task.sources?: Record<string,string> (slug→id map) - WarningCode 'duplicate-todoist-id' → 'duplicate-source-id' - New patterns: BRACE_TOKEN, BRACE_TOKEN_NON_RESERVED, TODOIST_ID_LEGACY, RESERVED_SLUGS - New parser helpers: extractSources(), formatSources() - New core ingest module: parseJsonl(), ingestRecordToLine(), ingestRecords() - New types: SourceTask, FetchOptions, SourceProvider, IngestRecord - New TodoistProvider implementing SourceProvider interface - New CLI command: md2do ingest <file.jsonl> [--output] [--vault] [--dry-run] - All downstream packages updated: vscode, config, cli formatters - 38 new tests (extractSources, ingest engine) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README: add multi-source ingestion feature bullet; update task format
table with {slug:ID} pattern; update roadmap; update project structure
- docs/guide/task-format: replace Todoist-only "Todoist Integration"
section with general "Source Links" section; update parsing rules and
syntax migration table
- docs/cli/overview: add ingest command entry
- docs/cli/ingest: new full reference page (options, JSONL spec, vault
convention, examples)
- docs/integrations/ingest: new conceptual guide (JSONL format, vault
layout, MCP agent workflow, SourceProvider interface)
- docs/integrations/todoist: note {todoist:ID} as instance of {slug:ID};
add cross-ref to ingest guide
- docs/development/roadmap: update to v0.7.x; add ingest and SourceProvider
to completed; add MCP agent workflow and native integrations roadmap items
- vitepress config: add ingest to CLI sidebar; add Multi-Source Ingestion
to Integrations sidebar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add `build_integration` MCP prompt: generates a ready-to-use prompt
for any Claude agent to fetch tasks from an external source and write
valid md2do JSONL ingest files; supports `source` (required) and
`mode=provider` (appends SourceProvider skeleton) arguments
- Fix `formatTask()` in MCP list-tasks to include `sources` field so
Claude can see external IDs (e.g. `{teams: "msg-789"}`) on ingested tasks
- Add `docs/integrations/prompts/build-integration.md` as canonical
prompt reference with fields table and worked Teams example
- Update MCP docs: "Building Integrations" section, sources note on
list_tasks, build_integration prompt entry, broaden Todoist section
to cover all external sources
- Add sidebar entry for Integration Builder Prompt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add provider.test.ts with 16 tests covering fetchTasks (priority mapping, dueDate, tags, options passthrough), completeTask, and reopenTask using a mock client. Coverage now at 95%+. Exclude client.ts from coverage (thin network wrapper with no unit-testable logic) and raise thresholds to 80/80/90/80. Broaden ESLint test override from **/tests/e2e/** to **/tests/** so mock-heavy unit tests can use vi.fn() without unsafe-* errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use `tasks[0]!` instead of array destructuring to satisfy noUncheckedIndexedAccess / strict null checks in tsc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Coverage after merging feat/pluggable-ingest into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build_integrationMCP prompt — generates a ready-to-use prompt for any Claude agent (one with Teams, Outlook, Slack, gcal, etc. access) to fetch tasks and write valid md2do JSONL ingest files; supportssource(required) andmode=provider(appends TypeScriptSourceProviderskeleton)sourcesfix —formatTask()now includestask.sourcesin JSON output so Claude can see external IDs (e.g.{ teams: "msg-789" }) on ingested tasksdocs/integrations/prompts/build-integration.mdwith the canonical prompt text, field reference table, and worked Microsoft Teams examplesourcesnote onlist_tasks, broadened "Combining with Todoist" → "Combining with External Sources"Changes
docs/integrations/prompts/build-integration.mddocs/.vitepress/config.mjspackages/mcp/src/types.tsBUILD_INTEGRATIONconstantpackages/mcp/src/prompts/templates.tsgetBuildIntegrationPrompt()packages/mcp/src/tools/list-tasks.tssourcestoformatTask()docs/integrations/mcp.mdTest plan
pnpm --filter @md2do/mcp build— clean buildpnpm -r run test:run— all 467 tests pass, no regressionsnpx @modelcontextprotocol/inspector node packages/mcp/dist/index.js→ list prompts →build_integrationpresent; calllist_taskson vault with ingested tasks →sourcesfield appears🤖 Generated with Claude Code