@hasna/todos 0.11.45 → 0.11.47

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.
Files changed (236) hide show
  1. package/README.md +11 -1097
  2. package/dashboard/dist/assets/{index-CVF1vn7Z.js → index-B-w1tUlm.js} +23 -23
  3. package/dashboard/dist/assets/index-BXQ39iMX.css +1 -0
  4. package/dashboard/dist/index.html +2 -2
  5. package/dist/cli/commands/agent-commands.d.ts.map +1 -1
  6. package/dist/cli/commands/cloud-commands.d.ts +3 -0
  7. package/dist/cli/commands/cloud-commands.d.ts.map +1 -0
  8. package/dist/cli/commands/config-serve-commands.d.ts.map +1 -1
  9. package/dist/cli/commands/machines.d.ts.map +1 -1
  10. package/dist/cli/commands/mcp-hooks-commands.d.ts.map +1 -1
  11. package/dist/cli/commands/plan-template-commands.d.ts.map +1 -1
  12. package/dist/cli/commands/project-commands.d.ts.map +1 -1
  13. package/dist/cli/commands/query-commands.d.ts.map +1 -1
  14. package/dist/cli/commands/task-commands.d.ts.map +1 -1
  15. package/dist/cli/index.js +28761 -42785
  16. package/dist/db/agent-metrics.d.ts +0 -101
  17. package/dist/db/agent-metrics.d.ts.map +1 -1
  18. package/dist/db/agent-names.d.ts +5 -1
  19. package/dist/db/agent-names.d.ts.map +1 -1
  20. package/dist/db/builtin-templates.d.ts +0 -17
  21. package/dist/db/builtin-templates.d.ts.map +1 -1
  22. package/dist/db/comments.d.ts.map +1 -1
  23. package/dist/db/database.d.ts +1 -2
  24. package/dist/db/database.d.ts.map +1 -1
  25. package/dist/db/handoffs.d.ts +1 -52
  26. package/dist/db/handoffs.d.ts.map +1 -1
  27. package/dist/db/machines.d.ts +6 -19
  28. package/dist/db/machines.d.ts.map +1 -1
  29. package/dist/db/migrations.d.ts.map +1 -1
  30. package/dist/db/pg-migrate.d.ts +14 -0
  31. package/dist/db/pg-migrate.d.ts.map +1 -0
  32. package/dist/db/pg-migrations.d.ts +8 -0
  33. package/dist/db/pg-migrations.d.ts.map +1 -0
  34. package/dist/db/plans.d.ts.map +1 -1
  35. package/dist/db/schema.d.ts.map +1 -1
  36. package/dist/db/task-commits.d.ts +0 -51
  37. package/dist/db/task-commits.d.ts.map +1 -1
  38. package/dist/db/task-crud.d.ts.map +1 -1
  39. package/dist/db/task-lifecycle.d.ts +1 -16
  40. package/dist/db/task-lifecycle.d.ts.map +1 -1
  41. package/dist/db/task-relations.d.ts +9 -69
  42. package/dist/db/task-relations.d.ts.map +1 -1
  43. package/dist/db/tasks.d.ts +4 -8
  44. package/dist/db/tasks.d.ts.map +1 -1
  45. package/dist/index.d.ts +14 -119
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +15761 -24428
  48. package/dist/lib/auto-assign.d.ts +5 -3
  49. package/dist/lib/auto-assign.d.ts.map +1 -1
  50. package/dist/lib/config.d.ts +0 -317
  51. package/dist/lib/config.d.ts.map +1 -1
  52. package/dist/lib/extract.d.ts +0 -57
  53. package/dist/lib/extract.d.ts.map +1 -1
  54. package/dist/lib/logger.d.ts +12 -6
  55. package/dist/lib/logger.d.ts.map +1 -1
  56. package/dist/mcp/index.d.ts.map +1 -1
  57. package/dist/mcp/index.js +22576 -28974
  58. package/dist/mcp/token-utils.d.ts +2 -2
  59. package/dist/mcp/token-utils.d.ts.map +1 -1
  60. package/dist/mcp/tools/cloud.d.ts +12 -0
  61. package/dist/mcp/tools/cloud.d.ts.map +1 -0
  62. package/dist/mcp/tools/code-tools.d.ts.map +1 -1
  63. package/dist/mcp/tools/machines.d.ts.map +1 -1
  64. package/dist/mcp/tools/task-adv-tools.d.ts.map +1 -1
  65. package/dist/mcp/tools/task-auto-tools.d.ts.map +1 -1
  66. package/dist/mcp/tools/task-crud.d.ts.map +1 -1
  67. package/dist/mcp/tools/task-meta-tools.d.ts.map +1 -1
  68. package/dist/mcp/tools/task-project-tools.d.ts.map +1 -1
  69. package/dist/mcp/tools/task-rel-tools.d.ts.map +1 -1
  70. package/dist/mcp/tools/task-resources.d.ts.map +1 -1
  71. package/dist/mcp/tools/task-workflow-tools.d.ts.map +1 -1
  72. package/dist/mcp/tools/templates.d.ts.map +1 -1
  73. package/dist/sdk/client.d.ts +1 -1
  74. package/dist/sdk/client.d.ts.map +1 -1
  75. package/dist/sdk/types.d.ts +1 -26
  76. package/dist/sdk/types.d.ts.map +1 -1
  77. package/dist/server/index.js +474 -1882
  78. package/dist/server/routes.d.ts.map +1 -1
  79. package/dist/types/index.d.ts +1 -216
  80. package/dist/types/index.d.ts.map +1 -1
  81. package/package.json +6 -30
  82. package/dashboard/dist/assets/index-DJm6m6Yy.css +0 -1
  83. package/dist/capabilities.d.ts +0 -32
  84. package/dist/capabilities.d.ts.map +0 -1
  85. package/dist/cli/commands/agent-reliability-commands.d.ts +0 -3
  86. package/dist/cli/commands/agent-reliability-commands.d.ts.map +0 -1
  87. package/dist/cli/commands/audit-ledger-commands.d.ts +0 -3
  88. package/dist/cli/commands/audit-ledger-commands.d.ts.map +0 -1
  89. package/dist/cli/commands/capacity-commands.d.ts +0 -3
  90. package/dist/cli/commands/capacity-commands.d.ts.map +0 -1
  91. package/dist/cli/commands/environment-snapshots.d.ts +0 -3
  92. package/dist/cli/commands/environment-snapshots.d.ts.map +0 -1
  93. package/dist/cli/commands/knowledge-commands.d.ts +0 -3
  94. package/dist/cli/commands/knowledge-commands.d.ts.map +0 -1
  95. package/dist/cli/commands/local-snapshot-commands.d.ts +0 -3
  96. package/dist/cli/commands/local-snapshot-commands.d.ts.map +0 -1
  97. package/dist/cli/commands/onboarding-commands.d.ts +0 -3
  98. package/dist/cli/commands/onboarding-commands.d.ts.map +0 -1
  99. package/dist/cli/commands/release-compatibility-commands.d.ts +0 -3
  100. package/dist/cli/commands/release-compatibility-commands.d.ts.map +0 -1
  101. package/dist/cli/commands/retrospective-commands.d.ts +0 -3
  102. package/dist/cli/commands/retrospective-commands.d.ts.map +0 -1
  103. package/dist/cli/commands/review-queue-commands.d.ts +0 -3
  104. package/dist/cli/commands/review-queue-commands.d.ts.map +0 -1
  105. package/dist/cli/commands/risk-commands.d.ts +0 -3
  106. package/dist/cli/commands/risk-commands.d.ts.map +0 -1
  107. package/dist/cli/commands/roadmap-commands.d.ts +0 -3
  108. package/dist/cli/commands/roadmap-commands.d.ts.map +0 -1
  109. package/dist/cli/commands/sdk-fixture-commands.d.ts +0 -3
  110. package/dist/cli/commands/sdk-fixture-commands.d.ts.map +0 -1
  111. package/dist/cli-mcp-parity.d.ts +0 -41
  112. package/dist/cli-mcp-parity.d.ts.map +0 -1
  113. package/dist/contracts.d.ts +0 -81
  114. package/dist/contracts.d.ts.map +0 -1
  115. package/dist/contracts.js +0 -16690
  116. package/dist/db/boards.d.ts +0 -56
  117. package/dist/db/boards.d.ts.map +0 -1
  118. package/dist/db/calendar.d.ts +0 -52
  119. package/dist/db/calendar.d.ts.map +0 -1
  120. package/dist/db/inbox.d.ts +0 -47
  121. package/dist/db/inbox.d.ts.map +0 -1
  122. package/dist/db/project-knowledge.d.ts +0 -88
  123. package/dist/db/project-knowledge.d.ts.map +0 -1
  124. package/dist/db/project-risks.d.ts +0 -139
  125. package/dist/db/project-risks.d.ts.map +0 -1
  126. package/dist/db/retrospectives.d.ts +0 -98
  127. package/dist/db/retrospectives.d.ts.map +0 -1
  128. package/dist/db/task-runs.d.ts +0 -130
  129. package/dist/db/task-runs.d.ts.map +0 -1
  130. package/dist/json-contracts.d.ts +0 -56
  131. package/dist/json-contracts.d.ts.map +0 -1
  132. package/dist/lib/activity-timeline.d.ts +0 -43
  133. package/dist/lib/activity-timeline.d.ts.map +0 -1
  134. package/dist/lib/agent-replay-simulator.d.ts +0 -66
  135. package/dist/lib/agent-replay-simulator.d.ts.map +0 -1
  136. package/dist/lib/agent-run-dispatcher.d.ts +0 -62
  137. package/dist/lib/agent-run-dispatcher.d.ts.map +0 -1
  138. package/dist/lib/approval-gates.d.ts +0 -52
  139. package/dist/lib/approval-gates.d.ts.map +0 -1
  140. package/dist/lib/artifact-store.d.ts +0 -68
  141. package/dist/lib/artifact-store.d.ts.map +0 -1
  142. package/dist/lib/audit-ledger.d.ts +0 -59
  143. package/dist/lib/audit-ledger.d.ts.map +0 -1
  144. package/dist/lib/branch-work-plans.d.ts +0 -46
  145. package/dist/lib/branch-work-plans.d.ts.map +0 -1
  146. package/dist/lib/capacity-forecasts.d.ts +0 -70
  147. package/dist/lib/capacity-forecasts.d.ts.map +0 -1
  148. package/dist/lib/context-packs.d.ts +0 -163
  149. package/dist/lib/context-packs.d.ts.map +0 -1
  150. package/dist/lib/doctor.d.ts +0 -46
  151. package/dist/lib/doctor.d.ts.map +0 -1
  152. package/dist/lib/environment-snapshots.d.ts +0 -111
  153. package/dist/lib/environment-snapshots.d.ts.map +0 -1
  154. package/dist/lib/event-hooks.d.ts +0 -58
  155. package/dist/lib/event-hooks.d.ts.map +0 -1
  156. package/dist/lib/external-issue-importers.d.ts +0 -60
  157. package/dist/lib/external-issue-importers.d.ts.map +0 -1
  158. package/dist/lib/local-bridge.d.ts +0 -81
  159. package/dist/lib/local-bridge.d.ts.map +0 -1
  160. package/dist/lib/local-encryption.d.ts +0 -94
  161. package/dist/lib/local-encryption.d.ts.map +0 -1
  162. package/dist/lib/local-extensions.d.ts +0 -75
  163. package/dist/lib/local-extensions.d.ts.map +0 -1
  164. package/dist/lib/local-fields.d.ts +0 -33
  165. package/dist/lib/local-fields.d.ts.map +0 -1
  166. package/dist/lib/local-notifications.d.ts +0 -55
  167. package/dist/lib/local-notifications.d.ts.map +0 -1
  168. package/dist/lib/local-snapshots.d.ts +0 -66
  169. package/dist/lib/local-snapshots.d.ts.map +0 -1
  170. package/dist/lib/mention-resolver.d.ts +0 -43
  171. package/dist/lib/mention-resolver.d.ts.map +0 -1
  172. package/dist/lib/natural-language-intake.d.ts +0 -56
  173. package/dist/lib/natural-language-intake.d.ts.map +0 -1
  174. package/dist/lib/onboarding-fixtures.d.ts +0 -31
  175. package/dist/lib/onboarding-fixtures.d.ts.map +0 -1
  176. package/dist/lib/policy-packs.d.ts +0 -87
  177. package/dist/lib/policy-packs.d.ts.map +0 -1
  178. package/dist/lib/project-bootstrap.d.ts +0 -35
  179. package/dist/lib/project-bootstrap.d.ts.map +0 -1
  180. package/dist/lib/public-release-gate.d.ts +0 -57
  181. package/dist/lib/public-release-gate.d.ts.map +0 -1
  182. package/dist/lib/redaction.d.ts +0 -12
  183. package/dist/lib/redaction.d.ts.map +0 -1
  184. package/dist/lib/release-compatibility.d.ts +0 -59
  185. package/dist/lib/release-compatibility.d.ts.map +0 -1
  186. package/dist/lib/release-notes.d.ts +0 -81
  187. package/dist/lib/release-notes.d.ts.map +0 -1
  188. package/dist/lib/retention-cleanup.d.ts +0 -63
  189. package/dist/lib/retention-cleanup.d.ts.map +0 -1
  190. package/dist/lib/review-queues.d.ts +0 -98
  191. package/dist/lib/review-queues.d.ts.map +0 -1
  192. package/dist/lib/roadmaps.d.ts +0 -133
  193. package/dist/lib/roadmaps.d.ts.map +0 -1
  194. package/dist/lib/runner-sandbox.d.ts +0 -50
  195. package/dist/lib/runner-sandbox.d.ts.map +0 -1
  196. package/dist/lib/saved-search-views.d.ts +0 -60
  197. package/dist/lib/saved-search-views.d.ts.map +0 -1
  198. package/dist/lib/sdk-integration-fixtures.d.ts +0 -65
  199. package/dist/lib/sdk-integration-fixtures.d.ts.map +0 -1
  200. package/dist/lib/task-contracts.d.ts +0 -75
  201. package/dist/lib/task-contracts.d.ts.map +0 -1
  202. package/dist/lib/task-dedupe.d.ts +0 -45
  203. package/dist/lib/task-dedupe.d.ts.map +0 -1
  204. package/dist/lib/terminal-notifications.d.ts +0 -53
  205. package/dist/lib/terminal-notifications.d.ts.map +0 -1
  206. package/dist/lib/todos-md.d.ts +0 -21
  207. package/dist/lib/todos-md.d.ts.map +0 -1
  208. package/dist/lib/verification-providers.d.ts +0 -54
  209. package/dist/lib/verification-providers.d.ts.map +0 -1
  210. package/dist/lib/workflow-prompts.d.ts +0 -38
  211. package/dist/lib/workflow-prompts.d.ts.map +0 -1
  212. package/dist/lib/workspace-trust.d.ts +0 -38
  213. package/dist/lib/workspace-trust.d.ts.map +0 -1
  214. package/dist/mcp/tools/environment-snapshots.d.ts +0 -8
  215. package/dist/mcp/tools/environment-snapshots.d.ts.map +0 -1
  216. package/dist/mcp/tools/workflow-prompts.d.ts +0 -3
  217. package/dist/mcp/tools/workflow-prompts.d.ts.map +0 -1
  218. package/dist/mcp.d.ts +0 -42
  219. package/dist/mcp.d.ts.map +0 -1
  220. package/dist/mcp.js +0 -542
  221. package/dist/registry.d.ts +0 -35
  222. package/dist/registry.d.ts.map +0 -1
  223. package/dist/registry.js +0 -16882
  224. package/dist/release-provenance.json +0 -7
  225. package/dist/sdk/index.js +0 -635
  226. package/dist/storage/index.d.ts +0 -4
  227. package/dist/storage/index.d.ts.map +0 -1
  228. package/dist/storage/interfaces.d.ts +0 -185
  229. package/dist/storage/interfaces.d.ts.map +0 -1
  230. package/dist/storage/local-sqlite.d.ts +0 -7
  231. package/dist/storage/local-sqlite.d.ts.map +0 -1
  232. package/dist/storage.d.ts +0 -4
  233. package/dist/storage.d.ts.map +0 -1
  234. package/dist/storage.js +0 -8237
  235. package/dist/test/no-network.d.ts +0 -7
  236. package/dist/test/no-network.d.ts.map +0 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ Universal task management for AI coding agents - CLI + MCP server + interactive
8
8
  ## Install
9
9
 
10
10
  ```bash
11
- bun install -g @hasna/todos
11
+ npm install -g @hasna/todos
12
12
  ```
13
13
 
14
14
  ## CLI Usage
@@ -17,1082 +17,6 @@ bun install -g @hasna/todos
17
17
  todos --help
18
18
  ```
19
19
 
20
- ## Local Project Bootstrap
21
-
22
- Bootstrap discovers the current local workspace, registers a project identity,
23
- creates the default task list, records local source metadata, and works for
24
- monorepo package roots without contacting hosted services:
25
-
26
- ```bash
27
- todos project-bootstrap .
28
- todos project-bootstrap packages/cli --name todos-cli --task-list todos-cli
29
- todos project-bootstrap . --dry-run --json
30
- ```
31
-
32
- MCP clients can use `bootstrap_project` for the same local-only workflow. The
33
- command is idempotent, so running it again refreshes machine-local paths without
34
- duplicating projects, task lists, or source records.
35
-
36
- ## Local Machine Topology
37
-
38
- Machine registry state stays in local SQLite. Machines can record identity,
39
- last-seen heartbeats, workspace paths, git roots, and user-provided Tailscale
40
- or LAN addresses without probing the network:
41
-
42
- ```bash
43
- todos machines register spark01 --ssh hasna@spark01 --tailscale-name spark01.tailnet --tailscale-ip 100.64.0.10 --lan-address 192.168.8.10 --workspace ~/workspace
44
- todos machines heartbeat spark01 --workspace ~/workspace
45
- todos machines topology --json
46
- todos projects-path set <project-id> ~/workspace/my-project
47
- ```
48
-
49
- `todos machines topology` reports stale machines, missing local path overrides,
50
- missing local paths, and projects whose machine-local paths differ across
51
- registered machines. MCP clients can use `machines_register`,
52
- `machines_heartbeat`, `machines_topology`, and `machines_list` for the same
53
- offline diagnostics.
54
-
55
- ## Local Workspace Trust
56
-
57
- Workspace trust profiles live in `~/.hasna/todos/config.json` and keep agent
58
- permissions local. Profiles declare trusted roots, command allowlists and
59
- denylists, tool permissions, write scopes, environment-key redaction patterns,
60
- and whether unsafe checks should require an explicit prompt:
61
-
62
- ```bash
63
- todos trust add . --preset standard --allow-command bun,git,todos --write-scope src,tests --redact-env API_KEY,TOKEN
64
- todos trust status .
65
- todos trust check . --command "bun test" --write src/index.ts --env OPENAI_API_KEY,PATH
66
- todos trust remove .
67
- ```
68
-
69
- MCP clients can use `set_workspace_trust`, `get_workspace_trust`,
70
- `list_workspace_trust_profiles`, `check_workspace_permission`, and
71
- `remove_workspace_trust`. The checks do not call a hosted policy service; they
72
- return deterministic JSON showing whether an action is allowed, why it needs a
73
- prompt, and which environment keys should be redacted.
74
-
75
- Secret safety uses the same local config. Add project-specific regexes and
76
- metadata keys with `todos redaction add --pattern <regex> --key <name>`, then
77
- scan text or files with `todos redaction scan` without printing matched values.
78
- Comments, local run evidence, and bridge exports are redacted before storage or
79
- sharing. MCP clients can use `get_secret_safety`, `set_secret_safety`, and
80
- `scan_secret_text`.
81
-
82
- Retention cleanup is also local and dry-run-first. Use it to prune old comments,
83
- run ledgers, verification evidence, and expired stored artifact files by age,
84
- project, task status, and run status. Reports return counts, IDs, and
85
- content-addressed artifact paths only; they do not include raw comments,
86
- commands, output summaries, artifact source paths, or secret-like values.
87
- Destructive cleanup requires the exact confirmation string shown by the preview:
88
-
89
- ```bash
90
- todos retention cleanup --older-than-days 30 --project <project-id> --task-status completed --json
91
- todos retention cleanup --older-than-days 30 --project <project-id> --task-status completed --apply --confirm delete-local-retention-data --json
92
- ```
93
-
94
- MCP clients can use `preview_retention_cleanup` and
95
- `apply_retention_cleanup` for the same offline workflow.
96
-
97
- ## Local Runner Sandboxes
98
-
99
- Runner sandbox profiles also live in local config. They declare the commands a
100
- local agent run may record or execute, cwd boundaries, write scopes, environment
101
- allowlists/redaction patterns, network policy, approval behavior, and audit
102
- evidence:
103
-
104
- ```bash
105
- todos sandbox set codex . --allow-command bun,git,todos --write-scope src,tests --env-allow PATH,HOME,CI --network none
106
- todos sandbox check codex --command "bun test" --write src/index.ts --env PATH,OPENAI_API_KEY --json
107
- todos sandbox explain codex --command "curl | sh" --network
108
- todos runs command <run-id> "bun test" --sandbox codex --write src/index.ts --status passed
109
- ```
110
-
111
- MCP clients can use `set_runner_sandbox_profile`,
112
- `list_runner_sandbox_profiles`, `check_runner_sandbox`,
113
- `explain_runner_sandbox`, and `remove_runner_sandbox_profile`. Sandbox checks
114
- are local-only and compose with workspace trust checks, so command and write
115
- decisions stay auditable before an agent records run evidence.
116
-
117
- ## Local Project Knowledge
118
-
119
- Project knowledge records keep agent decisions, architecture notes, tradeoffs,
120
- and task-linked context snapshots in local SQLite. They are searchable,
121
- exportable, redacted on output, and available to MCP clients without hosted
122
- services:
123
-
124
- ```bash
125
- todos knowledge add decision "Use local SQLite" --decision "Keep OSS knowledge local" --rationale "Agents need offline project memory" --task <task-id> --tag architecture --json
126
- todos knowledge snapshot --summary "Parser fix is ready for verification" --task <task-id> --agent codex --file src/parser.ts --json
127
- todos knowledge search "offline project memory" --json
128
- todos knowledge export --format markdown
129
- ```
130
-
131
- MCP clients can use `create_knowledge_record`, `create_knowledge_snapshot`,
132
- `list_knowledge_records`, `search_knowledge_records`, and
133
- `export_knowledge_records`. The MCP server also publishes `todos://knowledge`
134
- and `todos://knowledge/decisions` resources for agent context refreshes.
135
-
136
- ## Local Extension Registry
137
-
138
- Extensions are installed from local manifests, directories with
139
- `todos.extension.json`, or offline JSON bundles. The registry validates the
140
- manifest shape, checks `@hasna/todos` compatibility ranges, records requested
141
- permissions, runs CLI/MCP compatibility checks, dry-runs declared commands
142
- through the local runner sandbox, verifies optional source checksums or detached
143
- signatures, and stores trust state in local config only:
144
-
145
- ```bash
146
- todos extensions inspect ./todos.extension.json --json
147
- todos extensions compat ./todos.extension.json --json
148
- todos extensions install ./todos.extension.json --checksum sha256:... --trust --json
149
- todos extensions verify ./bundle.todos-extension.json --signature <signature> --public-key "$PUBLIC_KEY"
150
- todos extensions list
151
- todos extensions remove my-extension
152
- ```
153
-
154
- Unsigned extensions are allowed but installed as local records with warnings.
155
- Without `--trust`, installs remain in `needs_review` so agents can discover
156
- custom commands, MCP tools, hooks, and permissions without treating them as
157
- approved. MCP clients can use `inspect_local_extension`,
158
- `test_local_extension_compatibility`, `install_local_extension`,
159
- `list_local_extensions`, and `remove_local_extension` for the same offline
160
- workflow.
161
-
162
- ## Local Workflow Prompts
163
-
164
- The package includes bundled MCP prompts for common agent workflows:
165
- `goal_planning`, `task_claiming`, `review`, `verification`, `handoff`,
166
- `release_prep`, `import_triage`, and `incident_response`. They are static,
167
- local-only prompt resources that can be listed or rendered without a model call:
168
-
169
- ```bash
170
- todos workflows list
171
- todos workflows show goal_planning --objective "Ship release" --task 1234abcd --json
172
- todos workflows export --format markdown
173
- ```
174
-
175
- MCP clients can discover the same catalog at `todos://workflow-prompts` and call
176
- the matching prompt by ID. Prompt output is deterministic and is intended for
177
- Codex, Claude Code, Takumi, and other agent-native clients that need reusable
178
- local guidance for planning, claiming, review, verification, handoff, release,
179
- triage, and incident workflows.
180
-
181
- Agent setup recipes for MCP registration, `/goal` planning, task
182
- claim/update/complete loops, evidence comments, and no-cloud verification live
183
- in [docs/agent-adapters.md](docs/agent-adapters.md).
184
-
185
- ## Local Policy Packs
186
-
187
- Policy packs are project-local done gates for agents. They validate task status,
188
- passed verification commands, prohibited commands, linked commits and pull
189
- requests, approvals, branch names, run ledgers, artifacts, changed paths, and
190
- minimum evidence counts from the local SQLite database and config only:
191
-
192
- ```bash
193
- todos policies set release . \
194
- --required-status completed \
195
- --required-command "bun test,bun run typecheck" \
196
- --prohibited-command "npm install -g,git reset --hard" \
197
- --require-passed-verification \
198
- --require-commit \
199
- --require-pr \
200
- --require-run \
201
- --require-artifact
202
- todos policies validate release <task-id> --json
203
- todos policies explain release <task-id>
204
- ```
205
-
206
- MCP clients can use `set_policy_pack`, `list_policy_packs`,
207
- `validate_policy_pack`, `explain_policy_pack`, and `remove_policy_pack`.
208
- Validation is a dry local read of recorded task evidence; it never calls a
209
- hosted enforcement service.
210
-
211
- ## Local Source TODO Index
212
-
213
- Source extraction scans local code for `TODO`, `FIXME`, `HACK`, `BUG`, `XXX`,
214
- and `NOTE` comments, respects `.gitignore` plus explicit excludes, records
215
- source files, line anchors, nearby symbols, and stable dedupe fingerprints, and
216
- can run as a finite local watcher:
217
-
218
- ```bash
219
- todos extract . --dry-run --index --json
220
- todos extract . --exclude fixtures/** --tags tech-debt
221
- todos extract-watch . --dry-run --max-runs 1 --json
222
- ```
223
-
224
- Created tasks are tagged with `extracted` and linked back to the source file.
225
- MCP clients can call `extract_todos` and `watch_source_todos` for the same
226
- offline workflow; no hosted code search, cloud sync, or telemetry is used.
227
-
228
- ## Local Editor Integrations
229
-
230
- Editor recipes live in `docs/editor-integrations.md` and
231
- `examples/editor-integrations/`. They include VS Code task definitions,
232
- JetBrains external tool recipes, Neovim Lua helpers, a shell statusline snippet,
233
- and a Bun task picker. Every example uses only `todos` CLI JSON output or MCP
234
- tool names, so editors can claim tasks, inspect local queues, build context
235
- packs, and link source files without importing private modules or hosted code.
236
-
237
- ## Task Contracts and Reviews
238
-
239
- Task contracts make acceptance criteria, required verification, expected
240
- artifacts, relevant files, risk, and review state machine-readable for agents:
241
-
242
- ```bash
243
- todos contracts set <task-id> \
244
- --criteria "Parser handles quotes;Parser rejects malformed checkboxes" \
245
- --verify "bun test src/parser.test.ts" \
246
- --artifact logs/parser.txt \
247
- --file src/parser.ts \
248
- --risk medium \
249
- --done "review approved" \
250
- --json
251
- todos contracts request-review <task-id> --requester codex --reviewer reviewer
252
- todos record-verification <task-id> "bun test src/parser.test.ts" --status passed --artifact logs/parser.txt
253
- todos contracts review <task-id> --state approved --reviewer reviewer
254
- todos contracts check <task-id> --json
255
- ```
256
-
257
- Contracts are stored in local task metadata, mirror acceptance criteria for
258
- context packs, and are checked only against local status, review state, and
259
- recorded verification evidence. MCP clients can use `set_task_contract`,
260
- `get_task_contract`, `request_task_review`, `record_task_review`, and
261
- `check_task_done_contract`.
262
-
263
- ## Local Approval Gates
264
-
265
- Approval gates are manual checkpoints stored in the local task database. Agents
266
- can require, approve, reject, expire, list, and check gates before risky plan or
267
- run work. Blocked checks exit nonzero, including JSON mode, so local automation
268
- cannot silently bypass a missing or denied checkpoint:
269
-
270
- ```bash
271
- todos approvals require <task-id> deploy --requester codex --reviewer reviewer --run <run-id> --reason "production-affecting action"
272
- todos approvals check <task-id> deploy --json
273
- todos approvals approve <task-id> deploy --reviewer reviewer --note "safe to proceed"
274
- todos approvals list <task-id> --json
275
- ```
276
-
277
- MCP clients can use `require_approval_gate`, `approve_approval_gate`,
278
- `reject_approval_gate`, `expire_approval_gate`, `check_approval_gate`, and
279
- `list_approval_gates`. Gate events are written to task audit history and, when
280
- a run is linked, to the local run ledger.
281
-
282
- ## Local Review Queues
283
-
284
- Review queues turn local task review into an explicit agent workflow: request a
285
- review, route it to a queue, claim it, return it with changes, reopen it, or
286
- approve it. Routing rules live in local config and can match tags, priorities,
287
- and projects without hosted users, orgs, or cloud services:
288
-
289
- ```bash
290
- todos reviews rules set security --queue security-review --reviewers reviewer --tags security --priorities high
291
- todos reviews request <task-id> --requester codex --reason "security-sensitive change"
292
- todos reviews claim <task-id> --reviewer reviewer
293
- todos reviews return <task-id> --reviewer reviewer --changes "Add tests;Record verification"
294
- todos reviews approve <task-id> --reviewer reviewer
295
- todos reviews list --queue security-review --json
296
- ```
297
-
298
- MCP clients can use `list_review_queue`, `request_review_queue`,
299
- `claim_review_item`, `return_review_item`, `approve_review_item`,
300
- `reopen_review_item`, `set_review_routing_rule`, `list_review_routing_rules`,
301
- and `remove_review_routing_rule`. Queue transitions are written to audit
302
- history and emitted to local event hooks as `review.requested`,
303
- `review.claimed`, `review.returned`, `review.approved`, and `review.reopened`.
304
-
305
- ## Local Roadmaps
306
-
307
- Roadmaps group local tasks, plans, runs, milestones, and release labels into a
308
- portable planning view. They live in local config, summarize dependency
309
- readiness from the task graph, and export deterministic JSON or Markdown
310
- bundles:
311
-
312
- ```bash
313
- todos roadmaps create "Public package launch" --release v1 --json
314
- todos roadmaps milestones add <roadmap-id> "Docs and examples" --tasks <task-id> --due 2026-06-01 --release v1 --json
315
- todos roadmaps releases set <roadmap-id> v1 --milestones <milestone-id> --release-version 1.0.0 --json
316
- todos roadmaps show <roadmap-id> --format markdown
317
- todos roadmaps export <roadmap-id> --out roadmap.json
318
- todos roadmaps import roadmap.json --apply --json
319
- ```
320
-
321
- MCP clients can use `create_roadmap`, `list_roadmaps`,
322
- `get_roadmap_summary`, `update_roadmap`, `delete_roadmap`,
323
- `create_milestone`, `update_milestone`, `delete_milestone`,
324
- `set_release_group`, `export_roadmap`, and `import_roadmap`.
325
-
326
- ## Local Event Hooks
327
-
328
- Event hooks are local subscriptions for task, plan, run, approval, import, and
329
- export events. They can append redacted JSONL to a file, deliver to a Unix
330
- socket, expose a stdout test payload, or run a sandbox-checked local script with
331
- retry/backoff and SHA-256 integrity metadata:
332
-
333
- ```bash
334
- todos event-hooks set audit --event task.completed,run.failed --target file --file .todos/events.jsonl
335
- todos event-hooks set notify --event task.blocked --target script --command "notify-send \"$TODOS_EVENT_TYPE\"" --sandbox codex --attempts 2
336
- todos event-hooks test audit --event task.completed --payload '{"id":"demo"}' --json
337
- todos event-hooks list --json
338
- ```
339
-
340
- MCP clients can use `set_local_event_hook`, `list_local_event_hooks`,
341
- `test_local_event_hook`, and `remove_local_event_hook`. Hook delivery is
342
- local-only; it does not call hosted webhooks or cloud automation services.
343
-
344
- ## Local Terminal Notifications
345
-
346
- Terminal notification rules are local watch rules for agents that want concise
347
- event signals in a shell, tmux pane, or editor terminal. Rules match task, run,
348
- plan, approval, import, and export events by severity, agent, project, priority,
349
- status, and payload text, then render deterministic line or JSON notifications:
350
-
351
- ```bash
352
- todos terminal-notifications set blocked --event task.blocked,task.failed --min-severity warning --agent codex --priority high --contains deploy --bell
353
- todos terminal-notifications set due --event task.due,task.sla_breached --min-severity warning --quiet-hours 22:00-07:00
354
- todos notifications check --emit-hooks --terminal --quiet-hours 22:00-07:00 --json
355
- todos terminal-notifications test blocked --event task.failed --payload '{"id":"demo","title":"Deploy failed","agent_id":"codex","priority":"high"}' --json
356
- todos terminal-notifications list --json
357
- ```
358
-
359
- MCP clients can use `set_terminal_notification_rule`,
360
- `list_terminal_notification_rules`, `test_terminal_notification_rule`,
361
- `evaluate_terminal_watch_rules`, `check_local_notifications`, and
362
- `remove_terminal_notification_rule`. Notifications are evaluated from local
363
- event payloads, can respect quiet hours, and do not require a desktop
364
- notification daemon, hosted queue, or cloud webhook service.
365
-
366
- ## Local Encryption Profiles
367
-
368
- Encryption profiles are optional local config entries for sensitive fields and
369
- secure bridge exports. Profiles store algorithm metadata, a nonsecret salt, and
370
- the name of the environment variable that contains key material. The key itself
371
- is never written to config, bundles, artifacts, or logs:
372
-
373
- ```bash
374
- export TODOS_ENCRYPTION_KEY="use a strong local passphrase from your secret manager"
375
- todos encryption set default --key-env TODOS_ENCRYPTION_KEY
376
- todos encryption status default --json
377
- todos encryption test default --json
378
- todos export --format bridge --encrypt --output todos-bridge.enc.json
379
- todos bridge-import todos-bridge.enc.json --decrypt --json
380
- todos bridge-import todos-bridge.enc.json --decrypt --apply
381
- ```
382
-
383
- Plain bridge exports are still supported for compatibility, but the CLI prints
384
- a warning because bridge bundles may contain task metadata, evidence summaries,
385
- comments, and stored artifact content. MCP clients can use
386
- `set_encryption_profile`, `list_encryption_profiles`,
387
- `get_encryption_status`, `encrypt_local_value`, `decrypt_local_value`, and
388
- `remove_encryption_profile` for local-only encrypted field workflows.
389
-
390
- ## Local Agent Run Queue
391
-
392
- Agent run adapters and queue entries are local. Queueing a task creates a run
393
- ledger immediately, then `run-next` launches the configured command template
394
- with `{task_id}`, `{run_id}`, and `{agent_id}` placeholders. Dry-runs show the
395
- command without execution, and cancellation/retry are recorded in the same local
396
- run ledger:
397
-
398
- ```bash
399
- todos agent-runs adapter-set codex --command "codex exec --task {task_id}" --sandbox codex
400
- todos agent-runs queue <task-id> --adapter codex --agent codex --claim --json
401
- todos agent-runs run-next --dry-run --json
402
- todos agent-runs run-next --json
403
- todos agent-runs retry <run-id>
404
- ```
405
-
406
- MCP clients can use `set_agent_run_adapter`, `queue_agent_run`,
407
- `list_agent_run_queue`, `run_next_agent_dispatch`,
408
- `cancel_agent_run_dispatch`, and `retry_agent_run_dispatch`. These commands
409
- launch only local processes and do not call hosted runners.
410
-
411
- ## Local Agent Replay Simulation
412
-
413
- Replay simulation turns a recorded context pack or run fixture into a
414
- deterministic dry-run snapshot without opening the project database or mutating
415
- tasks. Use it to debug agent plans, verification commands, task transitions,
416
- failures, touched files, artifacts, and approval decisions offline:
417
-
418
- ```bash
419
- todos context-pack <task-id> --format json > replay.json
420
- todos runs simulate replay.json --agent codex --scenario parser-failure --json
421
- todos runs simulate replay.json --format markdown
422
- ```
423
-
424
- MCP clients can use `simulate_agent_replay` with a fixture object and optional
425
- `agent_id` or `scenario`. The simulator redacts fixture values before hashing
426
- or rendering, reports `mutates_database: false`, and emits stable command,
427
- approval, failure, file, artifact, and warning summaries for local debugging.
428
-
429
- ## Local Dependency Workflows
430
-
431
- Dependencies are stored in the local SQLite database and never require hosted
432
- services. Use them to keep agents from starting blocked work:
433
-
434
- ```bash
435
- todos deps <task-id> --needs <blocking-task-id>
436
- todos deps <task-id> --graph
437
- todos blocked
438
- todos ready
439
- ```
440
-
441
- The same workflow is available to MCP clients through
442
- `add_task_dependency`, `remove_task_dependency`, `get_task_dependencies`, and
443
- `get_blocked_tasks`. Dependency writes reject cycles, `ready` omits locked or
444
- blocked pending tasks, and startup schema repair recreates the local dependency
445
- table for older databases.
446
-
447
- ## Local Risk Register And Health
448
-
449
- Risks are stored in local SQLite and can be linked to projects, plans, or tasks
450
- with an owner, mitigation, due date, severity, probability, tags, and metadata:
451
-
452
- ```bash
453
- todos risks add "Release blocker" --plan 1234abcd --severity high --owner codex --mitigation "Ship fallback" --json
454
- todos risks list --plan 1234abcd --json
455
- todos risks score --plan 1234abcd --json
456
- todos risks export --project my-project --json
457
- ```
458
-
459
- Health reports score a plan or project from local evidence only: blocked tasks,
460
- overdue open work, failed verification records, failed run ledgers, dependency
461
- depth, and open risks. MCP clients get the same surface through `create_risk`,
462
- `list_risks`, `update_risk`, `close_risk`, `score_plan_health`,
463
- `score_project_health`, and `export_risk_register`.
464
-
465
- ## Local Retrospectives
466
-
467
- Retrospectives summarize a project or plan using local evidence: completed
468
- plans, missed estimates, repeated blockers, failed verification records,
469
- lessons learned, and suggested follow-up tasks.
470
-
471
- ```bash
472
- todos retrospectives create --plan 1234abcd --json
473
- todos retrospectives list --project my-project --json
474
- todos retrospectives export --plan 1234abcd --format markdown
475
- ```
476
-
477
- Use `--create-followups` to create the suggested follow-up tasks locally. MCP
478
- clients get the same reports through `create_retrospective`,
479
- `list_retrospectives`, and `export_retrospectives`.
480
-
481
- ## Local Agent Reliability Scorecards
482
-
483
- Reliability scorecards summarize each agent from local evidence only: completed
484
- and failed tasks, passed and failed verification records, failed run ledgers,
485
- stale task/resource locks, retry history, and handoff quality.
486
-
487
- ```bash
488
- todos reliability show codex --json
489
- todos reliability list --project my-project --json
490
- todos reliability export --format markdown
491
- ```
492
-
493
- MCP clients get the same summaries through `get_agent_reliability_scorecard`,
494
- `export_agent_reliability_scorecards`, and the `todos://agents/reliability`
495
- resource.
496
-
497
- ## Local Agent Locking
498
-
499
- Task claims and locks are local SQLite leases. Agents can claim the next ready
500
- task, renew their lock by re-locking it during long work, inspect stale work,
501
- and safely steal or redistribute stale tasks without hosted coordination:
502
-
503
- ```bash
504
- todos claim codex
505
- todos --agent codex lock <task-id>
506
- todos stale --minutes 30
507
- todos claim codex --steal-stale --stale-minutes 30
508
- todos redistribute codex --max-age 60
509
- ```
510
-
511
- MCP clients get the same local coordination through `claim_next_task`,
512
- `lock_task`, `unlock_task`, `check_task_lock`, and `get_stale_tasks`.
513
- `claim_next_task` can opt into stale recovery with `steal_stale` and
514
- `stale_minutes`.
515
-
516
- ## Local Plan Templates
517
-
518
- Reusable plan templates live in the local SQLite database. The package also
519
- ships a marketplace-free local library for bug fixes, feature implementation,
520
- security review, releases, migrations, incidents, docs refreshes, QA, and open
521
- source package bootstraps. Templates can create one task or a full ordered plan
522
- with dependencies, variables, priorities, tags, and descriptions:
523
-
524
- ```bash
525
- todos template-library --json
526
- todos template-library --write .todos/templates
527
- todos template-init
528
- todos template-preview <template-id> --var name=api
529
- todos templates --use <template-id> --var name=api
530
- todos template-export <template-id> > plan-template.json
531
- todos template-import plan-template.json
532
- ```
533
-
534
- `todos template-library --write` writes editable JSON files that use the same
535
- shape as `todos template-import`, so teams can fork a built-in workflow without
536
- contacting any hosted marketplace. `todos templates --use` creates every task in
537
- a multi-task template and wires its local dependency graph, so agents can
538
- immediately run `todos ready`, `todos blocked`, or
539
- `todos deps <task-id> --graph` against the generated plan. The same local-only
540
- workflow is available to MCP clients through `list_template_library`,
541
- `write_template_library`, `init_templates`, `create_template`, `list_templates`,
542
- `create_task_from_template`, `preview_template`, `export_template`, and
543
- `import_template`.
544
-
545
- ## Local Git Traceability
546
-
547
- Tasks can be linked to local git evidence without contacting hosted services:
548
-
549
- ```bash
550
- todos link-commit <task-id> <sha> --message "fix parser" --files src/parser.ts
551
- todos link-ref <task-id> task/parser-fix --type branch
552
- todos link-ref <task-id> 42 --type pr --url https://github.com/hasna/todos/pull/42
553
- todos record-verification <task-id> "bun test" --status passed --summary "1522 pass"
554
- todos trace <task-id>
555
- todos find-commit <sha-prefix>
556
- todos find-ref <branch-or-pr>
557
- todos blame src/parser.ts
558
- ```
559
-
560
- MCP clients get the same local data through `link_task_to_commit`,
561
- `find_task_by_commit`, `link_task_git_ref`, `find_tasks_by_git_ref`,
562
- `add_task_verification`, and `get_task_traceability`, so agents can explain
563
- which task changed a commit, branch, PR, file, or verification command.
564
-
565
- ## Local Mention Resolution
566
-
567
- Agents can resolve task references before adding them to descriptions, plans, or
568
- handoffs. The resolver validates local files and line anchors, scans local source
569
- declarations for symbols, checks local git commits, branches, and fetched pull
570
- request refs, and resolves plans, runs, tasks, and agents from the local SQLite
571
- state:
572
-
573
- ```bash
574
- todos references resolve file:src/index.ts:12 symbol:createTask branch:main --json
575
- todos refs resolve plan:release run:abc123 agent:marcus --workspace .
576
- ```
577
-
578
- The JSON output includes canonical reference keys and validated backlinks such
579
- as `file:src/index.ts:12`, `symbol:createTask@src/index.ts:40`, `commit:<sha>`,
580
- `plan:<id>`, and `run:<id>`. MCP clients can call `resolve_mentions` for the
581
- same local-only report; pull request refs are validated only when present in
582
- local git refs, and the resolver never calls hosted code search.
583
-
584
- ## Local Branch-Safe Work Plans
585
-
586
- Before an agent starts a branch, it can ask for a local branch work plan that
587
- checks the task or plan scope, planned files, active file conflicts, local git
588
- status, and suggested branch/traceability commands:
589
-
590
- ```bash
591
- todos branch-plan 1234abcd --branch task/parser-fix --path src/parser.ts --json
592
- todos branch-plan --plan <plan-id> --branch task/release-plan --no-git-status --json
593
- ```
594
-
595
- MCP clients can call `create_branch_work_plan` with `task_id` or `plan_id`.
596
- The result is local-only: it does not create a branch, fetch from a remote, or
597
- contact hosted code review services. Agents can inspect `safe_to_start`,
598
- `conflicts`, `reasons`, and `commands` before running any git operation.
599
-
600
- ## Local Release Notes
601
-
602
- Generate changelogs from completed local tasks and their linked plans, commits,
603
- verification records, breaking-change notes, and migration notes:
604
-
605
- ```bash
606
- todos release-notes --project . --format markdown
607
- todos release-notes --tag release --since 2026-01-01T00:00:00.000Z --json
608
- ```
609
-
610
- Tasks can add release metadata through `metadata.breaking_change`,
611
- `metadata.breaking_changes`, `metadata.migration_note`, or
612
- `metadata.migration_notes`. MCP clients use `generate_release_notes` for the
613
- same deterministic JSON or Markdown output without hosted release tooling.
614
-
615
- ## Local Verification Providers
616
-
617
- Optional provider adapters let agents standardize local verification without a
618
- hosted dependency. Providers can classify CI logs, verify browser/screenshot
619
- artifacts, or run explicitly configured command, script, and testbox-style
620
- commands with retry and redacted evidence capture:
621
-
622
- ```bash
623
- todos verify-providers set local --kind command --command "bun test" --attempts 2 --json
624
- todos verify-providers set ci --kind ci_log --json
625
- todos verify-providers capabilities local --json
626
- todos verify-providers run local --task <task-id> --agent codex --json
627
- todos verify-providers run ci --task <task-id> --log-file /tmp/ci.log --json
628
- ```
629
-
630
- Blacksmith/testbox-style providers are inert until a local command is explicitly
631
- configured, so the package never calls a cloud runner by default. MCP clients
632
- use `set_verification_provider`, `list_verification_providers`,
633
- `get_verification_provider_capabilities`, `run_verification_provider`, and
634
- `remove_verification_provider` for the same local-only workflow.
635
-
636
- ## Local Agent Handoffs
637
-
638
- Handoffs let one local agent leave continuation context for another without a
639
- hosted inbox. A handoff records the session, referenced tasks, relevant files,
640
- run ids, completed work, current blockers, and next steps. Readers can filter
641
- for unread handoffs and acknowledge them per agent:
642
-
643
- ```bash
644
- todos handoff --create --agent codex --session codex-42 --summary "Parser work ready for review" --tasks <task-id> --files src/parser.ts --runs <run-id> --next "Review failing fixture" --json
645
- todos handoff --unread-for claude --json
646
- todos handoff --read <handoff-id> --json
647
- todos handoff --ack <handoff-id> --agent claude --json
648
- todos handoff --recover --agent codex --session codex-42 --json
649
- todos handoff --export <handoff-id> --output handoff.json --json
650
- todos handoff --import handoff.json --json
651
- todos handoff --import handoff.json --apply --json
652
- ```
653
-
654
- MCP clients can use `create_handoff`, `list_handoffs`, `read_handoff`,
655
- `export_handoff`, `import_handoff`, `acknowledge_handoff`,
656
- `recover_stale_session_handoff`, and `get_latest_handoff`. Recovery handoffs
657
- inspect local in-progress tasks, file links, and run evidence for the
658
- agent/session and create a deterministic continuation packet; no hosted queue
659
- or cloud service is involved. Handoff imports default to a dry-run preview;
660
- `--apply` writes the local handoff and preserves per-agent acknowledgement
661
- state.
662
-
663
- ## Local Run Ledger
664
-
665
- Agent runs can record local evidence without uploading artifacts or calling a
666
- hosted API:
667
-
668
- ```bash
669
- RUN_ID=$(todos runs start <task-id> --agent codex --title "Parser fix" --claim --json | jq -r .id)
670
- todos runs event "$RUN_ID" progress "writing regression tests"
671
- todos runs command "$RUN_ID" "bun test src/parser.test.ts" --status passed --summary "14 pass"
672
- todos runs file "$RUN_ID" src/parser.ts --status modified
673
- todos runs artifact "$RUN_ID" logs/parser-test.txt --type log --description "focused test output" --require-file
674
- todos runs artifact-verify "$RUN_ID"
675
- todos runs finish "$RUN_ID" --status completed --summary "parser fixed and verified"
676
- todos runs show "$RUN_ID"
677
- ```
678
-
679
- Run command evidence is also mirrored into task verification evidence, file
680
- events are linked to task file tracking, and comments can be recorded into the
681
- task timeline. Sensitive-looking tokens, keys, passwords, and bearer values are
682
- redacted before evidence is stored. Artifact files are copied into a local
683
- content-addressed store beside the SQLite database, with SHA-256 integrity
684
- metadata, redaction status, retention metadata, and metadata-only fallback when
685
- the original path is unavailable. Use `--no-store` to record only artifact
686
- metadata.
687
-
688
- ## Local Time Tracking
689
-
690
- Manual time logs and focus sessions stay in the local SQLite database and roll
691
- up into `task.actual_minutes` for planning and retrospectives:
692
-
693
- ```bash
694
- todos time log <task-id> 25 --agent codex --notes "reviewed parser"
695
- SESSION=$(todos time start <task-id> --agent codex --idle-after 30 --json | jq -r .id)
696
- todos time pause "$SESSION"
697
- todos time resume "$SESSION"
698
- todos time stop "$SESSION" --notes "implemented and tested"
699
- todos time report --include-open --json
700
- ```
701
-
702
- Focus sessions can be linked to tasks, plans, or run ledgers. Stopping a
703
- completed task-linked session writes a time log with the session id and run id,
704
- then recalculates actual minutes from all local logs. `todos time idle` and the
705
- `get_idle_focus_prompts` MCP tool report active sessions that exceeded their
706
- local idle threshold; no desktop notification service or hosted telemetry is
707
- required.
708
-
709
- ## Local Capacity Forecasts
710
-
711
- Capacity profiles give agents a local way to forecast whether a project or plan
712
- is realistic from task estimates, actual minutes, due dates, and available
713
- minutes per day:
714
-
715
- ```bash
716
- todos capacity set codex --minutes-per-day 240 --days 1,2,3,4,5 --json
717
- todos capacity forecast --plan <plan-id> --agent codex --start-date 2026-06-01 --json
718
- todos capacity forecast --project <project-id> --format markdown
719
- todos capacity list --json
720
- ```
721
-
722
- Forecasts report remaining estimated minutes, logged actual minutes, forecast
723
- work days, projected completion date, missing estimates, overdue open tasks,
724
- and risk flags. MCP clients use `set_capacity_profile`,
725
- `list_capacity_profiles`, `remove_capacity_profile`, and
726
- `get_planning_forecast`.
727
-
728
- ## Local Audit Ledger
729
-
730
- Audit ledger checkpoints hash local evidence into a deterministic chain so an
731
- agent can seal task, run, verification, approval, and handoff records and verify
732
- later that the local evidence still matches:
733
-
734
- ```bash
735
- todos audit-ledger show --task <task-id> --entries --json
736
- todos audit-ledger seal release-checkpoint --task <task-id> --json
737
- todos audit-ledger verify release-checkpoint --json
738
- todos audit-ledger list --json
739
- ```
740
-
741
- The ledger stores only local checkpoint metadata in config. It does not call a
742
- hosted service and it does not claim to prevent local deletion; it detects
743
- changes against a previously sealed root hash. MCP clients use
744
- `get_audit_ledger`, `seal_audit_ledger`, `list_audit_ledger_checkpoints`, and
745
- `verify_audit_ledger`.
746
-
747
- ## Release Compatibility
748
-
749
- Release compatibility checks give agents a local dry-run report before publish
750
- or update work. They verify the package stays `@hasna/todos`, public, pointed at
751
- `hasna/todos`, export-stable, migration-compatible from recent local schema
752
- levels, and ready for Bun global install smoke tests:
753
-
754
- ```bash
755
- todos release-compat check --json
756
- todos release-compat check --format markdown
757
- ```
758
-
759
- The report also includes changelog surfaces and rollback commands. MCP clients
760
- use `check_release_compatibility` for the same `release_compatibility_report`
761
- JSON contract.
762
-
763
- ## Local Activity Timeline
764
-
765
- The timeline command gives agents one ordered, redacted view of local comments,
766
- task history, run events, command evidence, and artifacts:
767
-
768
- ```bash
769
- todos timeline --task <task-id> --json
770
- todos timeline --project <project-id> --limit 50
771
- todos timeline --run <run-id> --order asc
772
- ```
773
-
774
- MCP clients can call `get_activity_timeline` with `entity_type`, `entity_id`,
775
- `limit`, `offset`, `since`, and `until`. Timeline entries are derived from the
776
- local SQLite store and local bridge exports already include the underlying
777
- comments, runs, run evidence, files, commits, and verification records needed to
778
- rebuild the same timeline after import.
779
-
780
- ## Local Scheduling and SLA Escalation
781
-
782
- Tasks can carry local due dates, recurrence rules, and SLA thresholds without a
783
- hosted scheduler. Recurring tasks spawn their next local task from the previous
784
- scheduled due date, preserving cadence even when completion happens late:
785
-
786
- ```bash
787
- todos add "Weekly review" --due 2026-06-01 --recurrence "every week" --sla-minutes 120 --json
788
- todos update <task-id> --due 2026-06-08 --recurrence "every monday" --sla 90 --json
789
- todos overdue --json
790
- todos sla --json
791
- todos notifications check --due-within-minutes 60 --stale-minutes 30 --terminal --json
792
- ```
793
-
794
- `todos overdue` returns unfinished tasks past `due_at`. `todos sla` returns
795
- unfinished tasks that are past `due_at` or whose `sla_minutes` threshold has
796
- elapsed from `started_at` when present, otherwise `created_at`. MCP clients use
797
- `create_task` and `update_task` with `deadline`, `recurrence_rule`, and
798
- `sla_minutes`, and can call `get_sla_breaches` for the same local escalation
799
- view. `todos notifications check` turns due, due-soon, SLA, stale task,
800
- completed run, and local reminder records into redacted local alerts; it can
801
- emit configured file/socket/script/stdout event hooks, evaluate terminal watch
802
- rules, and suppress delivery during quiet hours without contacting an external
803
- notification service.
804
-
805
- ## Local Task Fields
806
-
807
- Tasks can carry local labels, severity, owner, area, and custom metadata while
808
- keeping canonical priority on the task itself:
809
-
810
- ```bash
811
- todos fields set <task-id> --labels bug,cli --priority high --severity s1 --owner codex --area parser --field component=parser --json
812
- todos fields show <task-id> --json
813
- todos fields query --labels bug,cli --severity s1 --field component=parser --json
814
- ```
815
-
816
- Custom values are redacted before storage, labels are mirrored into task tags
817
- for existing filters, and the metadata is included in local bridge exports.
818
- MCP clients use `get_task_fields`, `set_task_fields`, and
819
- `query_tasks_by_fields` for the same local-only workflow.
820
-
821
- ## Local Calendar And ICS
822
-
823
- Calendar events are derived from local tasks, SLA thresholds, run ledgers, and
824
- authored local reminders, milestones, or work blocks. Exported ICS files are
825
- deterministic and can be redacted before sharing:
826
-
827
- ```bash
828
- todos calendar list --from 2026-06-01T00:00:00.000Z --json
829
- todos calendar add "Release milestone" --kind milestone --start 2026-06-01T09:00:00.000Z --json
830
- todos calendar export --redact --out todos.ics
831
- todos calendar import team.ics --json
832
- ```
833
-
834
- Recurring task rules are mapped into ICS `RRULE` values when possible, and task
835
- SLA thresholds appear as local calendar events without any Google Calendar,
836
- hosted API, or cloud sync dependency. MCP clients use `create_calendar_item`,
837
- `list_calendar_events`, `export_calendar_ics`, and `import_calendar_ics`.
838
-
839
- ## Local Saved Search Views
840
-
841
- Saved views are local SQLite records for repeatable task, project, plan, run,
842
- comment, and cross-entity searches. They can filter by query text, project,
843
- task list, plan, task, status, priority, assignee, agent, tags, local fields,
844
- dependency direction, and time windows:
845
-
846
- ```bash
847
- todos views save active-cli --query parser --status pending,in_progress --tag cli --field-area parser --json
848
- todos views list --json
849
- todos views run active-cli --json
850
- todos search parser --scope all --limit 50 --json
851
- ```
852
-
853
- View output is stable JSON with `{ view, scope, filters, count, results }`.
854
- Local bridge exports include saved views, so explicit backups and machine moves
855
- preserve the filters without any hosted service. MCP clients use
856
- `save_search_view`, `list_search_views`, `run_search_view`, and
857
- `delete_search_view`.
858
-
859
- ## Local Kanban Boards
860
-
861
- Boards are local SQLite records for task and plan workflow views. Lanes map to
862
- workflow statuses, can carry WIP limits, and render blocked/ready badges for
863
- agent planning:
864
-
865
- ```bash
866
- todos board create local-flow --lane "Ready=pending" "Doing=in_progress:3" --json
867
- todos board show local-flow
868
- todos board tui local-flow --json
869
- todos board move local-flow <task-id> --lane Doing --json
870
- todos board export local-flow --json
871
- ```
872
-
873
- Task boards render tasks; plan boards use `--scope plans` and render plans by
874
- plan status. Board snapshots include terminal key bindings for keyboard/TUI
875
- clients, but the state is still just local data and can be exported or imported
876
- without a hosted web UI. MCP clients use `create_board`, `list_boards`,
877
- `get_board_snapshot`, and `move_board_card`.
878
-
879
- ## Local Duplicate Detection
880
-
881
- Agents can scan local tasks for likely duplicates from imported issue URLs,
882
- stack traces, exact titles, and similar task text, then merge duplicate evidence
883
- without deleting either task record:
884
-
885
- ```bash
886
- todos dedupe scan --threshold 0.8 --json
887
- todos dedupe merge <primary-task-id> <duplicate-task-id> --reason "same imported issue" --json
888
- ```
889
-
890
- Merges archive the duplicate as `cancelled`, add a `duplicates` relationship,
891
- and preserve comments, dependencies, dependents, run ledgers, files, inbox
892
- items, verification evidence, history, git refs, commits, and checklist rows on
893
- the primary task. MCP clients use `find_duplicate_tasks` and
894
- `merge_duplicate_task` for the same local-only workflow.
895
-
896
- ## Local Agent Context Packs
897
-
898
- Context packs create deterministic run-start bundles for Codex, Claude Code,
899
- Takumi, or any local agent. A pack selects task, project, plan, dependencies,
900
- acceptance criteria, recent comments, relevant files, verification history,
901
- traceability, and run-ledger evidence from the local SQLite database only:
902
-
903
- ```bash
904
- todos context-pack <task-id> --profile codex --format markdown
905
- todos context-pack <task-id> --profile claude --format json
906
- todos context-pack <task-id> --profile takumi --run <run-id> --comments 12 --files 40
907
- todos context-pack <task-id> --profile codex --token-budget 1800 --exclude runs --compact
908
- ```
909
-
910
- MCP clients can call `build_agent_context_pack` with the same limits and choose
911
- JSON, Markdown, compact JSON, or compact Markdown output. Long text and evidence
912
- are redacted and size-limited, and stale or omitted local data is surfaced as
913
- warnings in the pack.
914
-
915
- Budget-aware context packing is local and deterministic. Use `--token-budget`
916
- for an approximate character-based token budget, `--include` or `--exclude` to
917
- shape sections, and `--summary-chars` to cap the redacted summaries generated
918
- for omitted evidence. When the pack is too large, lower-priority evidence such
919
- as runs, traceability, comments, files, dependencies, and plan context is
920
- summarized in a stable `context_budget` block so agents still know what was left
921
- out.
922
-
923
- ## Local External Issue Imports
924
-
925
- Import issue records from pasted JSON, files, stdin, or explicit URLs without
926
- depending on any hosted Hasna service. Imports default to a dry-run preview;
927
- `--apply` creates local tasks, stores redacted source metadata, creates linked
928
- inbox evidence, and skips existing tasks that already have the same source URL,
929
- GitHub owner/repo/number, or external issue key:
930
-
931
- ```bash
932
- todos issues import --file issues.json --provider github --json
933
- todos issues import --file issues.json --provider github --apply --json
934
- todos issues import --provider linear --apply < linear-export.json
935
- todos issues import "Title: Fix parser\nURL: https://tracker.example/BUG-42" --apply --json
936
- ```
937
-
938
- GitHub, Linear, Jira, and plain URL records are normalized into local task
939
- metadata and tags. Network access is off unless `--allow-network` is passed; for
940
- GitHub that explicitly shells out through the authenticated `gh` CLI, while
941
- offline files and pasted exports work without tokens. MCP clients use
942
- `import_external_issues` with the same dry-run, apply, inbox, and dedupe
943
- controls.
944
-
945
- ## Local Inbox Intake
946
-
947
- Paste failures, CI logs, GitHub issue URLs, files, or local git context into a
948
- deduped inbox and create a linked task:
949
-
950
- ```bash
951
- todos inbox add "bun test failed: parser regression" --source-type ci_log
952
- todos inbox add --file /tmp/ci.log --source-name "local CI"
953
- todos inbox add https://github.com/hasna/todos/issues/42 --source-url https://github.com/hasna/todos/issues/42
954
- todos inbox parse "Add task fix parser priority high @codex #cli due tomorrow" --json
955
- todos inbox parse --file plan-notes.txt --apply --json
956
- todos inbox git --diff
957
- todos inbox list
958
- ```
959
-
960
- Inbox bodies and metadata are redacted before storage. Repeated input resolves
961
- to the existing inbox item instead of creating duplicate tasks. Natural-language
962
- intake parsing is deterministic and local-only; it defaults to a dry-run preview
963
- and creates projects, plans, tasks, dependencies, and acceptance criteria only
964
- with `--apply`.
965
-
966
- ## Bundled Onboarding Fixtures
967
-
968
- The package ships deterministic local demo fixtures for first-run onboarding and
969
- agent integration tests. The default `agent-project-demo` fixture shows the
970
- simple flow used by the public demo: create a project, add todos, generate a
971
- plan, run an agent, record command/artifact/verification evidence, review the
972
- remaining task, and prove export/import with the local bridge bundle.
973
-
974
- ```bash
975
- todos onboarding --json
976
- todos onboarding --show agent-project-demo > agent-project-demo.bridge.json
977
- todos onboarding --import agent-project-demo --json
978
- todos onboarding --import agent-project-demo --apply
979
- ```
980
-
981
- Fixtures are bundled with `@hasna/todos`, redacted, offline, and local-only.
982
- Imports default to dry-run mode and use the same bridge importer as normal
983
- exports, so CLI, MCP, and SDK consumers can test against the exact project,
984
- tasks, plan, run ledger, evidence, saved view, and board records.
985
-
986
- MCP clients can read `todos://onboarding/fixtures` or
987
- `todos://onboarding/demo`, then use `list_onboarding_fixtures`,
988
- `get_onboarding_fixture`, and `import_onboarding_fixture`.
989
-
990
- ## Local Agent Snapshots
991
-
992
- Agents can refresh context through stable local snapshots for projects, tasks,
993
- plans, runs, dependencies, activity events, and evidence. Snapshots are
994
- redacted, deterministic, and include cursors plus fingerprints so MCP clients
995
- can poll for changes without a hosted event stream.
996
-
997
- ```bash
998
- todos snapshots --json
999
- todos snapshots --show tasks --json
1000
- todos snapshots --show evidence --markdown
1001
- todos snapshots --poll --types tasks,evidence --since 2026-05-22T00:00:00.000Z --json
1002
- ```
1003
-
1004
- MCP clients can read `todos://snapshots/catalog` and
1005
- `todos://snapshots/tasks` through `todos://snapshots/evidence`, or use
1006
- `list_local_snapshots`, `get_local_snapshot`, and `poll_local_snapshots` for
1007
- JSON or Markdown payloads.
1008
-
1009
- ## SDK Integration Fixtures
1010
-
1011
- Downstream SDK, CLI JSON, MCP, and agent-adapter tests can generate a complete
1012
- local fixture pack from the bundled demo project:
1013
-
1014
- ```bash
1015
- todos sdk-fixtures --json
1016
- todos sdk-fixtures --show > sdk-fixture-pack.json
1017
- todos sdk-fixtures --write .todos/sdk-integrations --json
1018
- ```
1019
-
1020
- The pack includes a local bridge fixture, stable JSON contract snapshots,
1021
- project/task/plan/run/evidence snapshots, and a context pack. Copy-pasteable
1022
- examples live in `examples/sdk-integrations/`, and the full guide is in
1023
- `docs/sdk-integrations.md`.
1024
-
1025
- ## Local Bridge Import/Export
1026
-
1027
- Export a versioned local bridge bundle for migration, backup, or explicit
1028
- hand-off to another local store:
1029
-
1030
- ```bash
1031
- todos export --format bridge --output todos-bridge.json
1032
- todos export --format bridge --encrypt --output todos-bridge.enc.json
1033
- todos bridge-import todos-bridge.json --json
1034
- todos bridge-import todos-bridge.json --apply
1035
- todos bridge-import todos-bridge.json --apply --resolve-conflicts
1036
- ```
1037
-
1038
- Bridge bundles include local projects, task lists, plans, tasks, dependencies,
1039
- comments, run ledgers, command evidence, file evidence, artifacts, stored
1040
- artifact contents, commits, refs, verification records, saved views, local board
1041
- definitions, and local calendar items. Imports default to dry-run mode and
1042
- report conflicts before writing. The package does not upload bundles or call
1043
- hosted services; any hosted sync must consume the exported JSON explicitly.
1044
-
1045
- For multi-machine local work, `--resolve-conflicts` performs a safe task merge
1046
- instead of overwriting local edits. It fills blank local fields from the
1047
- incoming bundle, unions tags, merges non-conflicting metadata keys, and records
1048
- unresolved divergent fields in `metadata.sync_conflicts` for manual review.
1049
- Local non-empty title, status, priority, and metadata values win when both sides
1050
- changed.
1051
-
1052
- ## todos.md Markdown Import/Export
1053
-
1054
- `todos.md` files are readable Markdown checklists with an embedded local bridge
1055
- bundle for lossless round trips. Export keeps the visible tasks, projects, and
1056
- plans easy to inspect while preserving local ids, comments, run ledgers,
1057
- dependencies, files, commits, and verification evidence in a hidden metadata
1058
- block:
1059
-
1060
- ```bash
1061
- todos export --format todos.md --output todos.md
1062
- todos todos-md-import todos.md --json
1063
- todos todos-md-import todos.md --apply
1064
- todos todos-md-import todos.md --apply --resolve-conflicts
1065
- ```
1066
-
1067
- Existing plain checklists also import locally. Use `# Project: Name`, `## Plan:
1068
- Name`, checkbox items, optional `priority: high`, `comment: ...`, `depends_on:
1069
- Other task title`, `run: completed smoke`, `#tags`, and `@agent` markers to
1070
- migrate older files without a hosted service.
1071
-
1072
- ## Local Doctor and Repair
1073
-
1074
- `todos doctor` audits the local SQLite database without calling hosted services.
1075
- By default it is a dry-run and reports schema/migration drift, orphaned rows,
1076
- duplicate indexes, invalid JSON metadata, missing project roots, and unsafe
1077
- database file permissions:
1078
-
1079
- ```bash
1080
- todos doctor
1081
- todos doctor --json
1082
- ```
1083
-
1084
- Safe repairs require explicit apply mode. Before any mutation, the command
1085
- creates a local backup next to the database when the database is file-backed:
1086
-
1087
- ```bash
1088
- todos doctor --apply
1089
- ```
1090
-
1091
- Repairs are limited to local integrity fixes such as running the migration
1092
- safety net, clearing missing parent references, pruning orphaned dependency/run
1093
- rows, resetting invalid metadata JSON to `{}`, dropping duplicate non-primary
1094
- indexes, and tightening database file permissions.
1095
-
1096
20
  ## MCP Server
1097
21
 
1098
22
  ```bash
@@ -1102,7 +26,7 @@ todos-mcp
1102
26
  The MCP server defaults to the token-saving `TODOS_PROFILE=minimal` profile.
1103
27
  Use `TODOS_PROFILE=standard` for broader task/project/resource tools, or
1104
28
  `TODOS_PROFILE=full` when you explicitly need every tool. You can add groups
1105
- with `TODOS_TOOL_GROUPS=templates`.
29
+ with `TODOS_TOOL_GROUPS=cloud,templates`.
1106
30
 
1107
31
  High-volume tools return compact payloads by default. Pass `detail: "full"` to
1108
32
  MCP calls such as `get_task`, `get_status`, `get_context`, `bootstrap`, and
@@ -1134,29 +58,19 @@ curl "http://localhost:19427/api/tasks/<id>?fields=id,title,status"
1134
58
  curl "http://localhost:19427/api/tasks/<id>/history?limit=20"
1135
59
  ```
1136
60
 
1137
- ## Data Directory
1138
-
1139
- Data is stored in `~/.hasna/todos/`.
61
+ ## Cloud Sync
1140
62
 
1141
- ## Local-Only Security Boundary
63
+ This package supports cloud sync via `@hasna/cloud`:
1142
64
 
1143
- `@hasna/todos` is an open source, local-first package. The CLI, MCP server, SDK,
1144
- and local dashboard read and write local state by default and do not require a
1145
- hosted API, cloud account, billing provider, or remote model provider.
65
+ ```bash
66
+ cloud setup
67
+ cloud sync push --service todos
68
+ cloud sync pull --service todos
69
+ ```
1146
70
 
1147
- Release checks enforce that boundary before publishing:
71
+ ## Data Directory
1148
72
 
1149
- - package metadata must stay public and point at `hasna/todos`
1150
- - install snippets must use `bun install -g @hasna/todos`
1151
- - package dependencies and generated tarballs are scanned for private or hosted
1152
- service coupling
1153
- - public text surfaces and packed files are scanned for secret-like values
1154
- - local runtime tests use a no-network fixture for local-only workflows
1155
- - `bun run verify:release` builds, packs, validates provenance, and runs a clean
1156
- Bun global install smoke test from the candidate tarball
1157
- - the install smoke plan itself is covered by tests: it installs only with Bun,
1158
- verifies `todos`, `todos-mcp`, and `todos-serve`, and rejects private or
1159
- hosted endpoint references
73
+ Data is stored in `~/.hasna/todos/`.
1160
74
 
1161
75
  ## License
1162
76