backlog.md 0.1.0 → 0.1.3

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 (165) hide show
  1. package/bin/backlog-darwin-arm64/backlog +0 -0
  2. package/bin/backlog-darwin-x64/backlog +0 -0
  3. package/bin/backlog-linux-arm64/backlog +0 -0
  4. package/{cli → bin/backlog-linux-x64}/backlog +0 -0
  5. package/bin/backlog-win32-x64/backlog.exe +0 -0
  6. package/cli.js +62 -0
  7. package/package.json +57 -46
  8. package/.backlog/archive/drafts/readme.md +0 -3
  9. package/.backlog/archive/drafts/task-41 - temporary-test-task.md +0 -13
  10. package/.backlog/archive/readme.md +0 -6
  11. package/.backlog/archive/tasks/readme.md +0 -3
  12. package/.backlog/archive/tasks/task-41 - cli-migrate-terminal-ui-to-bblessed.md +0 -14
  13. package/.backlog/config.yml +0 -7
  14. package/.backlog/decisions/readme.md +0 -7
  15. package/.backlog/docs/readme.md +0 -20
  16. package/.backlog/drafts/readme.md +0 -3
  17. package/.backlog/drafts/task-26 - docs-add-board-export-step-to-agent-dod.md +0 -21
  18. package/.backlog/drafts/task-28 - add-code-of-conduct.md +0 -20
  19. package/.backlog/drafts/task-30 - create-changelog.md +0 -19
  20. package/.backlog/milestones/m-0 - project-setup.md +0 -8
  21. package/.backlog/milestones/m-1 - cli.md +0 -8
  22. package/.backlog/milestones/m-2 - cli-kanban.md +0 -8
  23. package/.backlog/milestones/m-3 - gui.md +0 -8
  24. package/.backlog/milestones/m-4 - gui-kanban.md +0 -8
  25. package/.backlog/milestones/m-5 - gui-advanced.md +0 -12
  26. package/.backlog/milestones/readme.md +0 -3
  27. package/.backlog/readme.md +0 -5
  28. package/.backlog/tasks/readme.md +0 -37
  29. package/.backlog/tasks/task-1 - cli-setup-core-project.md +0 -23
  30. package/.backlog/tasks/task-10 - gui-init-packaging.md +0 -23
  31. package/.backlog/tasks/task-11 - gui-kanban-board.md +0 -26
  32. package/.backlog/tasks/task-12 - gui-advanced.md +0 -25
  33. package/.backlog/tasks/task-13 - cli-add-agent-instruction-prompt.md +0 -53
  34. package/.backlog/tasks/task-13.1 - cli-agent-instruction-file-selection.md +0 -40
  35. package/.backlog/tasks/task-14 - gui-introduction-screens.md +0 -21
  36. package/.backlog/tasks/task-15 - improve-tasks-readme-with-generic-example-and-cli-reference.md +0 -20
  37. package/.backlog/tasks/task-16 - improve-docs-readme-with-generic-example-and-cli-reference.md +0 -20
  38. package/.backlog/tasks/task-17 - improve-drafts-readme-with-generic-example-and-cli-reference.md +0 -20
  39. package/.backlog/tasks/task-18 - improve-decisions-readme-with-generic-example-and-cli-reference.md +0 -20
  40. package/.backlog/tasks/task-19 - cli-fix-default-task-status-and-remove-draft-from-statuses.md +0 -55
  41. package/.backlog/tasks/task-2 - cli-core-logic-library.md +0 -28
  42. package/.backlog/tasks/task-20 - add-agent-guideline-to-mark-tasks-in-progress-on-start.md +0 -32
  43. package/.backlog/tasks/task-21 - kanban-board-vertical-layout.md +0 -31
  44. package/.backlog/tasks/task-22 - cli-prevent-double-dash-in-task-filenames.md +0 -24
  45. package/.backlog/tasks/task-23 - cli-kanban-board-order-tasks-by-id-asc.md +0 -30
  46. package/.backlog/tasks/task-24 - handle-subtasks-in-the-kanban-view.md +0 -38
  47. package/.backlog/tasks/task-24.1 - cli-kanban-board-milestone-view.md +0 -19
  48. package/.backlog/tasks/task-25 - cli-export-kanban-board-to-readme.md +0 -28
  49. package/.backlog/tasks/task-27 - add-contributing-guidelines.md +0 -27
  50. package/.backlog/tasks/task-29 - add-github-templates.md +0 -28
  51. package/.backlog/tasks/task-3 - cli-implement-backlog-init.md +0 -63
  52. package/.backlog/tasks/task-31 - update-readme-for-open-source.md +0 -26
  53. package/.backlog/tasks/task-32 - cli-hide-empty-'no-status'-column.md +0 -31
  54. package/.backlog/tasks/task-33 - cli-export-milestones-board-as-roadmap.md +0 -20
  55. package/.backlog/tasks/task-34 - split-readme.md-for-users-and-contributors.md +0 -26
  56. package/.backlog/tasks/task-35 - finalize-package.json-metadata-for-publishing.md +0 -24
  57. package/.backlog/tasks/task-36 - cli-prompt-for-project-name-in-init.md +0 -24
  58. package/.backlog/tasks/task-37 - cli-board-view-open-tasks-in-ide.md +0 -19
  59. package/.backlog/tasks/task-38 - cli-improved-agent-selection-for-init.md +0 -25
  60. package/.backlog/tasks/task-39 - cli-fix-empty-agent-instruction-files-on-init.md +0 -31
  61. package/.backlog/tasks/task-4 - cli-task-management-commands.md +0 -28
  62. package/.backlog/tasks/task-4.1 - cli-task-create.md +0 -27
  63. package/.backlog/tasks/task-4.10 - use-cli-to-mark-tasks-done.md +0 -51
  64. package/.backlog/tasks/task-4.11 - docs-add-definition-of-done-to-agent-guidelines.md +0 -23
  65. package/.backlog/tasks/task-4.12 - cli-handle-task-id-conflicts-across-branches.md +0 -53
  66. package/.backlog/tasks/task-4.13 - cli-fix-config-command-local-global-logic.md +0 -58
  67. package/.backlog/tasks/task-4.2 - cli-task-list-view.md +0 -25
  68. package/.backlog/tasks/task-4.3 - cli-task-edit.md +0 -24
  69. package/.backlog/tasks/task-4.4 - cli-task-archive-transition.md +0 -27
  70. package/.backlog/tasks/task-4.5 - cli-init-prompts-for-reporter-name-and-global-local-config.md +0 -28
  71. package/.backlog/tasks/task-4.6 - cli-add-empty-assignee-array-field-for-new-tasks.md +0 -35
  72. package/.backlog/tasks/task-4.7 - cli-parse-unquoted-created_date.md +0 -40
  73. package/.backlog/tasks/task-4.8 - cli-enforce-description-header.md +0 -48
  74. package/.backlog/tasks/task-4.9 - cli-normalize-task-id-inputs.md +0 -66
  75. package/.backlog/tasks/task-40 - cli-board-command-defaults-to-view.md +0 -38
  76. package/.backlog/tasks/task-41 - cli-migrate-terminal-ui-to-bblessed.md +0 -93
  77. package/.backlog/tasks/task-41.1 - cli-bblessed-init-wizard.md +0 -42
  78. package/.backlog/tasks/task-41.2 - cli-bblessed-task-view.md +0 -44
  79. package/.backlog/tasks/task-41.3 - cli-bblessed-doc-view.md +0 -45
  80. package/.backlog/tasks/task-41.4 - cli-bblessed-board-view.md +0 -49
  81. package/.backlog/tasks/task-41.5 - cli-audit-remaining-ui-for-bblessed.md +0 -55
  82. package/.backlog/tasks/task-42 - visual-hierarchy.md +0 -54
  83. package/.backlog/tasks/task-43 - remove-duplicate-acceptance-criteria-and-style-metadata.md +0 -56
  84. package/.backlog/tasks/task-44 - checklist-alignment.md +0 -24
  85. package/.backlog/tasks/task-45 - safe-line-wrapping.md +0 -23
  86. package/.backlog/tasks/task-46 - split-pane-layout.md +0 -24
  87. package/.backlog/tasks/task-47 - sticky-header-in-detail-view.md +0 -43
  88. package/.backlog/tasks/task-48 - footer-hint-line.md +0 -21
  89. package/.backlog/tasks/task-49 - status-styling.md +0 -53
  90. package/.backlog/tasks/task-5 - cli-docs-decisions.md +0 -57
  91. package/.backlog/tasks/task-50 - borders-&-padding.md +0 -22
  92. package/.backlog/tasks/task-51 - code-path-styling.md +0 -23
  93. package/.backlog/tasks/task-52 - cli-filter-tasks-list-by-status-or-assignee.md +0 -29
  94. package/.backlog/tasks/task-6 - cli-packaging.md +0 -65
  95. package/.backlog/tasks/task-6.1 - cli-local-installation-support-for-bunx-npx.md +0 -49
  96. package/.backlog/tasks/task-6.2 - cli-github-actions-for-build-&-publish.md +0 -64
  97. package/.backlog/tasks/task-7 - cli-kanban-view.md +0 -60
  98. package/.backlog/tasks/task-7.1 - cli-kanban-board-detect-remote-task-status.md +0 -62
  99. package/.backlog/tasks/task-8 - gui-project-setup.md +0 -21
  100. package/.backlog/tasks/task-9 - gui-task-crud.md +0 -24
  101. package/.cursorrules +0 -223
  102. package/.gitattributes +0 -2
  103. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
  104. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -15
  105. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  106. package/.github/workflows/ci.yml +0 -36
  107. package/.husky/pre-commit +0 -1
  108. package/AGENTS.md +0 -65
  109. package/CLAUDE.md +0 -87
  110. package/CONTRIBUTING.md +0 -19
  111. package/DEVELOPMENT.md +0 -37
  112. package/biome.json +0 -31
  113. package/bun.lock +0 -152
  114. package/cli/.cursorrules-xh86jabm.md +0 -82
  115. package/cli/AGENTS-xh86jabm.md +0 -82
  116. package/cli/CLAUDE-xh86jabm.md +0 -82
  117. package/cli/cli.js +0 -19622
  118. package/cli/index.js +0 -2
  119. package/docs/npm-publishing.md +0 -69
  120. package/scripts/build.js +0 -73
  121. package/src/agent-instructions.ts +0 -54
  122. package/src/board.ts +0 -263
  123. package/src/cli.ts +0 -806
  124. package/src/constants/index.ts +0 -48
  125. package/src/core/backlog.ts +0 -183
  126. package/src/core/remote-tasks.ts +0 -168
  127. package/src/file-system/operations.ts +0 -515
  128. package/src/git/operations.ts +0 -189
  129. package/src/guidelines/.cursorrules.md +0 -82
  130. package/src/guidelines/AGENTS.md +0 -82
  131. package/src/guidelines/CLAUDE.md +0 -82
  132. package/src/guidelines/index.ts +0 -7
  133. package/src/index.ts +0 -30
  134. package/src/markdown/parser.ts +0 -145
  135. package/src/markdown/serializer.ts +0 -71
  136. package/src/test/agent-instructions.test.ts +0 -62
  137. package/src/test/board.test.ts +0 -291
  138. package/src/test/build.test.ts +0 -28
  139. package/src/test/checklist.test.ts +0 -273
  140. package/src/test/cli.test.ts +0 -1300
  141. package/src/test/code-path.test.ts +0 -204
  142. package/src/test/core.test.ts +0 -330
  143. package/src/test/filesystem.test.ts +0 -435
  144. package/src/test/git.test.ts +0 -26
  145. package/src/test/heading.test.ts +0 -102
  146. package/src/test/line-wrapping.test.ts +0 -252
  147. package/src/test/local-install.test.ts +0 -34
  148. package/src/test/markdown.test.ts +0 -526
  149. package/src/test/parallel-loading.test.ts +0 -160
  150. package/src/test/parent-id-normalization.test.ts +0 -48
  151. package/src/test/remote-id-conflict.test.ts +0 -60
  152. package/src/test/status-icon.test.ts +0 -93
  153. package/src/types/blessed.d.ts +0 -14
  154. package/src/types/index.ts +0 -55
  155. package/src/types/raw.d.ts +0 -4
  156. package/src/ui/board.ts +0 -322
  157. package/src/ui/checklist.ts +0 -103
  158. package/src/ui/code-path.ts +0 -113
  159. package/src/ui/heading.ts +0 -121
  160. package/src/ui/loading.ts +0 -216
  161. package/src/ui/status-icon.ts +0 -53
  162. package/src/ui/task-list.ts +0 -168
  163. package/src/ui/task-viewer.ts +0 -640
  164. package/src/ui/tui.ts +0 -301
  165. package/tsconfig.json +0 -26
@@ -1,252 +0,0 @@
1
- import { afterEach, beforeEach, describe, expect, test } from "bun:test";
2
- import { createRequire } from "node:module";
3
- import { WRAP_LIMIT } from "../constants/index.ts";
4
-
5
- // Helper to load blessed dynamically
6
- // biome-ignore lint/suspicious/noExplicitAny: blessed is a third-party library without types
7
- async function loadBlessed(): Promise<any | null> {
8
- try {
9
- const require = createRequire(import.meta.url);
10
- const blessed = require("blessed");
11
- return blessed;
12
- } catch {
13
- try {
14
- const mod = await import("blessed");
15
- return mod.default ?? mod;
16
- } catch {
17
- return null;
18
- }
19
- }
20
- }
21
-
22
- describe("Line Wrapping", () => {
23
- // biome-ignore lint/suspicious/noExplicitAny: blessed is a third-party library without types
24
- let blessed: any;
25
-
26
- beforeEach(async () => {
27
- blessed = await loadBlessed();
28
- });
29
-
30
- test("WRAP_LIMIT constant is set to 72", () => {
31
- expect(WRAP_LIMIT).toBe(72);
32
- });
33
-
34
- test("blessed box with wrap:true enables text wrapping", async () => {
35
- if (!blessed) {
36
- console.log("Skipping blessed test - blessed not available");
37
- return;
38
- }
39
-
40
- const screen = blessed.screen({ smartCSR: false });
41
-
42
- // Create a long text that should wrap
43
- const longText =
44
- "This is a very long line of text that should definitely wrap when displayed in a blessed box because it exceeds the 72 character limit that we have set";
45
-
46
- const box = blessed.box({
47
- parent: screen,
48
- content: longText,
49
- width: WRAP_LIMIT,
50
- height: 10,
51
- wrap: true,
52
- });
53
-
54
- // Verify wrap is enabled
55
- expect(box.options.wrap).toBe(true);
56
- expect(box.width).toBe(WRAP_LIMIT);
57
-
58
- screen.destroy();
59
- });
60
-
61
- test("blessed box without wrap:false does not break mid-word", async () => {
62
- if (!blessed) {
63
- console.log("Skipping blessed test - blessed not available");
64
- return;
65
- }
66
-
67
- const screen = blessed.screen({ smartCSR: false });
68
-
69
- // Create text with long words
70
- const textWithLongWords =
71
- "Supercalifragilisticexpialidocious is a very extraordinarily long word that should not be broken in the middle when wrapping";
72
-
73
- const box = blessed.box({
74
- parent: screen,
75
- content: textWithLongWords,
76
- width: 50,
77
- height: 10,
78
- wrap: true,
79
- });
80
-
81
- screen.render();
82
-
83
- const lines = box.getLines();
84
-
85
- // Check that words are not broken mid-word
86
- // This is a simplified check - blessed should handle word boundaries
87
- for (let i = 0; i < lines.length - 1; i++) {
88
- // biome-ignore lint/suspicious/noControlCharactersInRegex: testing ANSI escape sequences
89
- const currentLine = lines[i].replace(/\x1b\[[0-9;]*m/g, "").trim();
90
- // biome-ignore lint/suspicious/noControlCharactersInRegex: testing ANSI escape sequences
91
- const nextLine = lines[i + 1]?.replace(/\x1b\[[0-9;]*m/g, "").trim();
92
-
93
- if (currentLine && nextLine) {
94
- // If a line doesn't end with a space or punctuation, and the next line
95
- // doesn't start with a space, it might be a mid-word break
96
- const lastChar = currentLine[currentLine.length - 1];
97
- const firstChar = nextLine[0];
98
-
99
- // Basic check: if both characters are letters, it might be mid-word
100
- if (/[a-zA-Z]/.test(lastChar) && /[a-zA-Z]/.test(firstChar)) {
101
- // This is acceptable for blessed as it handles word wrapping internally
102
- // We're mainly checking that wrap:true is set
103
- expect(box.options.wrap).toBe(true);
104
- }
105
- }
106
- }
107
-
108
- screen.destroy();
109
- });
110
-
111
- test("task viewer boxes have wrap enabled", async () => {
112
- if (!blessed) {
113
- console.log("Skipping blessed test - blessed not available");
114
- return;
115
- }
116
-
117
- const screen = blessed.screen({ smartCSR: false });
118
-
119
- // Simulate task viewer boxes
120
- const testBoxes = [
121
- {
122
- name: "header",
123
- box: blessed.box({
124
- parent: screen,
125
- content: "Task-123 - This is a very long task title that should wrap properly",
126
- wrap: true,
127
- }),
128
- },
129
- {
130
- name: "tagBox",
131
- box: blessed.box({
132
- parent: screen,
133
- content: "[label1] [label2] [label3] [label4] [label5] [label6] [label7] [label8]",
134
- wrap: true,
135
- }),
136
- },
137
- {
138
- name: "metadata",
139
- box: blessed.box({
140
- parent: screen,
141
- content: "Status: In Progress\nAssignee: @user1, @user2, @user3\nCreated: 2024-01-01",
142
- wrap: true,
143
- }),
144
- },
145
- {
146
- name: "description",
147
- box: blessed.box({
148
- parent: screen,
149
- content:
150
- "This is a very long description that contains multiple sentences and should wrap properly without breaking words in the middle.",
151
- wrap: true,
152
- }),
153
- },
154
- ];
155
-
156
- // Verify all boxes have wrap enabled
157
- for (const testBox of testBoxes) {
158
- expect(testBox.box.options.wrap).toBe(true);
159
- }
160
-
161
- screen.destroy();
162
- });
163
-
164
- test("board view content respects width constraints", async () => {
165
- if (!blessed) {
166
- console.log("Skipping blessed test - blessed not available");
167
- return;
168
- }
169
-
170
- const screen = blessed.screen({ smartCSR: false });
171
-
172
- // Simulate board column
173
- const column = blessed.box({
174
- parent: screen,
175
- width: "33%",
176
- height: "100%",
177
- border: "line",
178
- });
179
-
180
- // Task list items should fit within column
181
- const taskList = blessed.list({
182
- parent: column,
183
- width: "100%-2",
184
- items: [
185
- "TASK-1 - Short task",
186
- "TASK-2 - This is a much longer task title that might need special handling",
187
- "TASK-3 - Another task with @assignee",
188
- ],
189
- });
190
-
191
- screen.render();
192
-
193
- // The list should be constrained by its parent width
194
- expect(taskList.width).toBeLessThan(screen.width);
195
-
196
- screen.destroy();
197
- });
198
-
199
- test("popup content boxes have wrap enabled", async () => {
200
- if (!blessed) {
201
- console.log("Skipping blessed test - blessed not available");
202
- return;
203
- }
204
-
205
- const screen = blessed.screen({ smartCSR: false });
206
-
207
- // Simulate popup boxes
208
- const statusLine = blessed.box({
209
- parent: screen,
210
- content: "● In Progress • @user1, @user2 • 2024-01-01",
211
- wrap: true,
212
- });
213
-
214
- const metadataLine = blessed.box({
215
- parent: screen,
216
- content: "[label1] [label2] [label3]",
217
- wrap: true,
218
- });
219
-
220
- const contentArea = blessed.box({
221
- parent: screen,
222
- content: "Task content goes here with descriptions and acceptance criteria",
223
- wrap: true,
224
- });
225
-
226
- // Verify wrap is enabled
227
- expect(statusLine.options.wrap).toBe(true);
228
- expect(metadataLine.options.wrap).toBe(true);
229
- expect(contentArea.options.wrap).toBe(true);
230
-
231
- screen.destroy();
232
- });
233
-
234
- test("UI components use percentage-based widths", () => {
235
- // This test verifies that our UI components are configured to use
236
- // percentage-based widths, which allows blessed to handle wrapping
237
- // based on the actual terminal size
238
- const widthConfigs = [
239
- { component: "task-viewer header", width: "100%" },
240
- { component: "task-viewer tagBox", width: "100%" },
241
- { component: "task-viewer description", width: "60%" },
242
- { component: "task-viewer bottomBox", width: "100%" },
243
- { component: "board column", width: "dynamic%" },
244
- { component: "popup contentArea", width: "100%" },
245
- ];
246
-
247
- // Verify we're using percentage-based widths
248
- for (const config of widthConfigs) {
249
- expect(config.width).toMatch(/%$/);
250
- }
251
- });
252
- });
@@ -1,34 +0,0 @@
1
- import { afterAll, beforeAll, describe, expect, it } from "bun:test";
2
- import { mkdtemp, rm } from "node:fs/promises";
3
- import { tmpdir } from "node:os";
4
- import { join } from "node:path";
5
-
6
- let projectDir: string;
7
- let tarball: string;
8
-
9
- describe("local bunx/npx execution", () => {
10
- beforeAll(async () => {
11
- projectDir = await mkdtemp(join(tmpdir(), "backlog-local-"));
12
- await Bun.spawn(["npm", "init", "-y"], { cwd: projectDir }).exited;
13
- await Bun.spawn(["bun", "run", "build"]).exited;
14
- const pack = Bun.spawnSync(["npm", "pack"], { stdout: "pipe" });
15
- const lines = pack.stdout.toString().trim().split("\n");
16
- tarball = lines[lines.length - 1] ?? "";
17
- await Bun.spawn(["npm", "install", join(process.cwd(), tarball)], { cwd: projectDir }).exited;
18
- });
19
-
20
- afterAll(async () => {
21
- await rm(projectDir, { recursive: true, force: true });
22
- await rm(tarball, { force: true }).catch(() => {});
23
- });
24
-
25
- it("runs via npx", () => {
26
- const result = Bun.spawnSync(["npx", "backlog", "--help"], { cwd: projectDir });
27
- expect(result.stdout.toString()).toContain("Backlog project management CLI");
28
- });
29
-
30
- it("runs via bunx", () => {
31
- const result = Bun.spawnSync(["bun", "x", "backlog", "--help"], { cwd: projectDir });
32
- expect(result.stdout.toString()).toContain("Backlog project management CLI");
33
- });
34
- });