Conversation
Extend TaskCreate to accept an optional array parameter for creating multiple tasks in a single atomic call. The existing scalar / parameters remain fully backward-compatible. Key changes: - Add for atomic batch creation within a single lock - Add array parameter to TaskCreate tool (mutually exclusive with scalar params) - Add validation: reject mixing with / - Add validation: require + when not using - 6 new unit tests for createMany (IDs, persistence, metadata, empty array) - 10 new integration tests for TaskCreate batch mode - Updated README with batch usage docs and parameter tables This approach modifies the existing tool rather than adding a new one, avoiding context bloat from an additional tool definition while keeping the API surface minimal.
The parameter descriptions and prompt guidelines already convey the distinction. The extra section was redundant and added context bloat for the LLM.
Rename the TaskCreate batch array parameter from `tasks` to `batch` to make it more distinctive and searchable. Update all references in source, tests, and README accordingly.
Owner
Author
|
Closing this in favor of the rebased branch on v2nic/pi-tasks, which updates tintinweb#24 — that's the correct home for this work. |
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.
Purpose
Creating several related tasks currently requires multiple sequential
TaskCreatetool calls — slow and noisy for multi-step plans, and it burns extra model/tool round trips when the agent already knows the full task list.This is a rebase of tintinweb/pi-tasks#24 (
feat: add batch task creation to TaskCreate tool) ontov0.7.0, so the batch feature sits cleanly on top of the current upstream master (including the@earendil-worksscope migration, widget display settings, and thecontext-hook system-reminder rework).Summary
TaskCreateaccepts abatcharray to create multiple tasks in a single tool callsubject+descriptionsingle-task usage still works unchangedbatchand scalar params are mutually exclusive (validated with a clear error)TaskStore.createMany()for atomic-ish batch creationbatchfor multi-task plansVerification
npm run typecheck— cleannpm run lint— no new warnings (4 pre-existinguseOptionalChainwarnings in untouched code)npm test— 184 passed (6 files)npm run build— cleanNote
Upstream has a competing PR (tintinweb/pi-tasks#25) solving the same problem with a
tasksarray instead ofbatch. This branch keeps thebatchnaming from PR tintinweb#24 — happy to align with either shape.— swift-viper-90 🤖