-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
"Completed tasks carry full details and testStrategy indefinitely, inflating tasks.json. In our 51-tag workspace, tasks.json is 13 MB / 85K lines — most of that is done tasks that will never be read in detail again."
Motivation
When a task is marked status: "done", its details and testStrategy fields are no longer actionable. These fields often contain multi-paragraph implementation plans, code snippets, and test strategies that were useful during development but serve no purpose after completion. Retaining them inflates tasks.json and increases parse time for every read operation.
Proposed Solution
When set_task_status transitions a task to "done", automatically:
- Remove
detailsfield (or set to empty string) - Remove
testStrategyfield (or set to empty string) - Truncate
descriptionto first 200 characters (preserving the summary)
This is a one-way slim — the git history preserves the original content if ever needed.
High-Level Workflow
set_task_status({id: "5", status: "done"})is called- Before writing, check if new status is
"done" - If so, strip
details,testStrategy, truncatedescription - Write slimmed task to tasks.json
- Git commit preserves pre-slim state in history
Key Elements
- Only triggers on transition TO
done(not on already-done tasks) - Preserves
title,id,status,priority,dependencies,subtasks descriptiontruncated to 200 chars with...suffix- Could be opt-in via config flag:
"slimDoneTasks": true - A separate
slim_done_taskstool could retroactively slim all existing done tasks
Example Workflow
// Before slim (task with status: "done"):
{
"id": "5",
"title": "Implement auth system",
"description": "Set up JWT-based authentication with bcrypt hashing, token refresh, and session management...", // 500 chars
"details": "Use bcrypt for hashing...\nImplement refresh tokens...\n...", // 2000 chars
"testStrategy": "Unit tests for auth functions...\nIntegration tests...\n...", // 1500 chars
"status": "done"
}
// Total: ~4000 chars
// After slim:
{
"id": "5",
"title": "Implement auth system",
"description": "Set up JWT-based authentication with bcrypt hashing, token refresh, and session management...", // truncated to 200 chars
"details": "",
"testStrategy": "",
"status": "done"
}
// Total: ~300 chars (92% reduction per task)Implementation Considerations
- Git history preserves original data — no information is permanently lost
- Should respect a config flag for users who want to keep full details
- Subtasks should also be slimmed when parent goes to done
- Could include a migration tool to slim existing done tasks retroactively
Benchmarks (from our implementation)
We implemented this in our Python MCP replacement:
- Before slimming: 13 MB tasks.json
- After retroactive slim of all done tasks: ~30% size reduction on large tags
- Parse time improvement proportional to size reduction
Out of Scope (Future Considerations)
- Archiving done tasks to a separate file
- Compression of tasks.json