@4-r-c-4-n-4/todo 0.1.2

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 (55) hide show
  1. package/BIBLE.md +212 -0
  2. package/LICENSE +21 -0
  3. package/README.md +2 -0
  4. package/dist/bundle.js +5109 -0
  5. package/dist/cli.d.ts +2 -0
  6. package/dist/cli.js +36 -0
  7. package/dist/commands/analyze.d.ts +2 -0
  8. package/dist/commands/analyze.js +77 -0
  9. package/dist/commands/close.d.ts +2 -0
  10. package/dist/commands/close.js +75 -0
  11. package/dist/commands/dedup.d.ts +2 -0
  12. package/dist/commands/dedup.js +74 -0
  13. package/dist/commands/edit.d.ts +2 -0
  14. package/dist/commands/edit.js +82 -0
  15. package/dist/commands/export.d.ts +2 -0
  16. package/dist/commands/export.js +25 -0
  17. package/dist/commands/init.d.ts +2 -0
  18. package/dist/commands/init.js +29 -0
  19. package/dist/commands/link.d.ts +2 -0
  20. package/dist/commands/link.js +101 -0
  21. package/dist/commands/list.d.ts +2 -0
  22. package/dist/commands/list.js +91 -0
  23. package/dist/commands/new.d.ts +2 -0
  24. package/dist/commands/new.js +157 -0
  25. package/dist/commands/scan.d.ts +2 -0
  26. package/dist/commands/scan.js +114 -0
  27. package/dist/commands/show.d.ts +2 -0
  28. package/dist/commands/show.js +132 -0
  29. package/dist/commands/transition.d.ts +2 -0
  30. package/dist/commands/transition.js +66 -0
  31. package/dist/commands/work.d.ts +2 -0
  32. package/dist/commands/work.js +128 -0
  33. package/dist/config.d.ts +7 -0
  34. package/dist/config.js +77 -0
  35. package/dist/context.d.ts +7 -0
  36. package/dist/context.js +24 -0
  37. package/dist/dedup.d.ts +8 -0
  38. package/dist/dedup.js +63 -0
  39. package/dist/errors.d.ts +1 -0
  40. package/dist/errors.js +26 -0
  41. package/dist/fingerprint.d.ts +9 -0
  42. package/dist/fingerprint.js +27 -0
  43. package/dist/format.d.ts +14 -0
  44. package/dist/format.js +44 -0
  45. package/dist/git.d.ts +19 -0
  46. package/dist/git.js +115 -0
  47. package/dist/scan.d.ts +7 -0
  48. package/dist/scan.js +146 -0
  49. package/dist/state.d.ts +13 -0
  50. package/dist/state.js +108 -0
  51. package/dist/ticket.d.ts +23 -0
  52. package/dist/ticket.js +143 -0
  53. package/dist/types.d.ts +94 -0
  54. package/dist/types.js +3 -0
  55. package/package.json +51 -0
package/BIBLE.md ADDED
@@ -0,0 +1,212 @@
1
+ # todo BIBLE
2
+
3
+ ## What is `todo`
4
+
5
+ `todo` is a git-native ticket tracker. Tickets are JSON files committed alongside code in `.todo/`. Agents are first-class citizens: every command is designed to be run by a coding agent, not just a human. The proof is in the workflow, not the README.
6
+
7
+ ---
8
+
9
+ ## Two Modes of Work
10
+
11
+ ### Standalone ticket
12
+ One bug, one fix, one commit.
13
+
14
+ ```
15
+ todo new "Fix null pointer in auth handler" --type bug --source log
16
+ todo work <id>
17
+ # ... fix it ...
18
+ todo close <id>
19
+ ```
20
+
21
+ ### Feature build (parent + children)
22
+ A parent ticket tracks the feature. Children track subtasks. All children share the parent's branch.
23
+
24
+ ```
25
+ todo new "Add OAuth2 login" --type feature
26
+ todo new "Add /auth/callback route" --type chore --parent <feature-id>
27
+ todo new "Store session tokens" --type chore --parent <feature-id>
28
+ todo work <child-id> # checks out todo/<feature-id> branch
29
+ ```
30
+
31
+ Children resolve on the parent branch. Close all children before closing the parent.
32
+
33
+ ---
34
+
35
+ ## The Full Lifecycle
36
+
37
+ 1. **Capture** — Create a ticket.
38
+ ```
39
+ todo new "Summary of the problem" --type bug --source human
40
+ ```
41
+
42
+ 2. **Triage** — Tag, edit, set context.
43
+ ```
44
+ todo edit <id> --type bug --tags "auth,crash"
45
+ todo link <id> --to path/to/file.ts
46
+ ```
47
+
48
+ 3. **Analyze** — Add structured analysis entries.
49
+ ```
50
+ todo analyze <id> --type hypothesis --content "Null check missing in auth.ts:42" --confidence medium
51
+ todo analyze <id> --type evidence --content "Reproduced with test_auth.py::test_login_null"
52
+ todo analyze <id> --type conclusion --content "Missing guard on user.profile before access" --supporting "0,1"
53
+ ```
54
+
55
+ 4. **Implement** — Start work, write code, commit.
56
+ ```
57
+ todo work <id>
58
+ # write fix
59
+ git add -A
60
+ git commit -m "todo:<id> — fix null check in auth handler"
61
+ ```
62
+
63
+ 5. **Close** — Resolve and record.
64
+ ```
65
+ todo close <id> --note "Added null guard at line 42"
66
+ git add .todo/
67
+ git commit -m "todo:<id> — close"
68
+ ```
69
+
70
+ ---
71
+
72
+ ## The Branch Workflow
73
+
74
+ Step by step:
75
+
76
+ ```bash
77
+ # 1. Start work — creates branch todo/<id>, transitions ticket to active
78
+ todo work <id>
79
+
80
+ # 2. Implement the fix
81
+ # ... edit files ...
82
+
83
+ # 3. Commit with the convention
84
+ git add -A
85
+ git commit -m "todo:<id> — describe what you did"
86
+
87
+ # 4. Close the ticket (captures HEAD commit as resolution)
88
+ todo close <id>
89
+
90
+ # 5. Commit the ticket state change
91
+ git add .todo/
92
+ git commit -m "todo:<id> — close"
93
+
94
+ # 6. Merge back to main
95
+ git checkout main
96
+ git merge --no-ff todo/<id>
97
+ git branch -d todo/<id>
98
+ ```
99
+
100
+ For child tickets: `todo work <child-id>` checks out the parent's branch, not a new one.
101
+
102
+ ---
103
+
104
+ ## Ticket Types
105
+
106
+ | Type | When to use |
107
+ |------|-------------|
108
+ | `bug` | Something is broken and needs fixing |
109
+ | `feature` | New capability that doesn't exist yet |
110
+ | `refactor` | Code change with no behavior change |
111
+ | `chore` | Tooling, config, dependency updates, cleanup |
112
+ | `debt` | Known-bad code that needs to be addressed later |
113
+
114
+ ---
115
+
116
+ ## The Done Contract
117
+
118
+ What's required before closing each ticket type:
119
+
120
+ | Type | Required to close |
121
+ |------|-------------------|
122
+ | `bug` | Commit SHA, ideally a test reference |
123
+ | `feature` | Commit SHA, children all closed |
124
+ | `refactor` | Commit SHA, tests still passing |
125
+ | `chore` | Commit SHA |
126
+ | `debt` | Commit SHA, note explaining what changed |
127
+
128
+ Close command: `todo close <id> --note "what you did" --test tests/foo.ts::test_name`
129
+
130
+ ---
131
+
132
+ ## Commit Message Convention
133
+
134
+ Format: `todo:<id> — <description>`
135
+
136
+ Examples:
137
+ ```
138
+ todo:a1b2c3d4 — fix null pointer in auth handler
139
+ todo:a1b2c3d4 — close
140
+ todo:e5f6a7b8 — add /auth/callback route
141
+ ```
142
+
143
+ The `<id>` is the full 8-char ticket ID. Always include it. This ties commits to tickets and enables commit-based dedup and linking.
144
+
145
+ ---
146
+
147
+ ## Common Mistakes
148
+
149
+ 1. **Closing before committing** — `todo close` captures HEAD. If you haven't committed the fix, the resolution commit is wrong. Always commit code first.
150
+
151
+ 2. **Forgetting `git add .todo/`** — Ticket files live in `.todo/`. They must be committed. After any `todo` command that writes, stage `.todo/`.
152
+
153
+ 3. **Squash merging breaks commit refs** — Tickets store resolution commits. Squash merging replaces them with a new SHA. The linked commit disappears. Use `--no-ff` merges or update the resolution commit after squash.
154
+
155
+ 4. **Using a short prefix when IDs are ambiguous** — If two tickets share a prefix, commands fail. Use more characters of the ID.
156
+
157
+ 5. **Not committing parent ticket after adding children** — Parent `relationships.children` is updated when you create a child. Commit `.todo/` after creating children.
158
+
159
+ ---
160
+
161
+ ## CLI Quick Reference
162
+
163
+ ```
164
+ todo init Initialize .todo/ in current git repo
165
+ todo new <summary> Create a ticket
166
+ --type bug|feature|refactor|chore|debt
167
+ --source log|test|agent|human|comment
168
+ --file <path> --lines <start,end>
169
+ --tags <t1,t2> --parent <id> --pipe
170
+ todo list List open tickets
171
+ --state --type --tag --file --done --all
172
+ todo show <id> Show ticket detail
173
+ --raw
174
+ todo edit <id> Edit ticket fields
175
+ --summary --description --type --tags --add-tag --rm-tag
176
+ todo transition <id> <state> Transition state
177
+ --commit --test --note --depends-on --duplicate-of
178
+ todo close <id> Shorthand: transition to done
179
+ --commit --test --note --checkout
180
+ todo work <id> Start/resume work on a ticket
181
+ --branch --actor
182
+ todo analyze <id> Add analysis entry
183
+ --type blame|hypothesis|evidence|conclusion (required)
184
+ --content <text> (required)
185
+ --confidence low|medium|high
186
+ --supporting <indices>
187
+ todo link <id> Link ticket to commit/file/ticket
188
+ --to <target> (required)
189
+ --relation depends_on|blocks|related|duplicates
190
+ --as <note>
191
+ todo scan Scan source tree for TODO/FIXME comments
192
+ --dry-run --type <tickettype>
193
+ todo dedup Find duplicate tickets
194
+ --strategy fingerprint|file-line|semantic
195
+ --apply
196
+ todo export <id> Export ticket as JSON/markdown
197
+ --format json|markdown
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Skill Interface
203
+
204
+ Agents operate via four named skills. Each maps to a phase of the lifecycle.
205
+
206
+ **todo-capture** — Create a ticket from any signal (log, test failure, comment, agent observation). Use `todo new` with `--source` and `--pipe` as appropriate. Always commit the result.
207
+
208
+ **todo-triage** — Set type, tags, file links, relationships. Use `todo edit`, `todo link`. Run `todo dedup` after bulk captures. Commit `.todo/`.
209
+
210
+ **todo-analyze** — Build up the understanding of a bug or requirement. Use `todo analyze` with sequenced entries: hypothesis → evidence → conclusion. Reference supporting indices. Commit when done.
211
+
212
+ **todo-implement** — Run `todo work` to branch, implement, commit with the `todo:<id>` prefix, then `todo close`. Always commit `.todo/` after close.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ivy dearest
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # todo
2
+ Making working on work work