dirban 0.1.5 → 0.1.7

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 (3) hide show
  1. package/README.md +15 -6
  2. package/dist/dirban.js +87 -14
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  > **Zero-database, folder-based Kanban board for builders, knowledge workers, and AI agents.**
4
4
 
5
- [![CI](https://github.com/SYip/dirban/actions/workflows/publish.yml/badge.svg)](https://github.com/SYip/dirban/actions)
5
+ [![CI](https://github.com/SYip/dirban/actions/workflows/ci.yml/badge.svg)](https://github.com/SYip/dirban/actions/workflows/ci.yml)
6
6
  [![npm version](https://img.shields.io/npm/v/dirban.svg?color=cb3837)](https://www.npmjs.com/package/dirban)
7
7
  [![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/syip.dirban-vscode?color=blue&label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=syip.dirban-vscode)
8
8
  [![Open VSX](https://img.shields.io/open-vsx/v/syip/dirban-vscode?color=purple&label=Open%20VSX)](https://open-vsx.org/extension/syip/dirban-vscode)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-ffdd00?logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/sywong)
10
11
 
11
12
  ---
12
13
 
@@ -19,7 +20,7 @@
19
20
  ![Dirban Terminal TUI](docs/assets/dirban-cli-tui.jpg)
20
21
 
21
22
  - **Directories as Columns**: Workflow stages are plain folders (`01-todo/`, `02-doing/`, `03-done/`).
22
- - **Customizable Workflows**: Tailor column names, staging pipelines, and priority tiers to your exact workflow using [`.dirban.json`](docs/concepts/configuration.md).
23
+ - **Configurable Workspace & Git Automation**: Tailor priority tiers, archive paths, and Git branching/worktree strategies using [`.dirban.json`](docs/concepts/configuration.md).
23
24
  - **Isolated Task Files**: Each task is a self-contained Markdown file with an optional priority and checklist (`- [ ]`). Editing one task never collides with another in Git or file sync.
24
25
  - **Agent-Ready & Context-Efficient**: AI tools and scripts read only the active task file (`dirban current`), keeping token usage low and focus sharp.
25
26
  - **Git is Completely Optional**: While Dirban automates Git branching and worktrees for developers, it works equally well on plain folders (`branchStrategy: "none"`) in Obsidian vaults, Dropbox, or local drives.
@@ -52,11 +53,11 @@ dirban init
52
53
  This creates a lightweight task hierarchy under `docs/tasks/`:
53
54
  ```text
54
55
  docs/tasks/
55
- ├── backlog/ # Staging and future ideas
56
+ ├── 00-backlog/ # Staging, future ideas, and blocked tasks
56
57
  ├── 01-todo/ # Ready to be picked up
57
58
  ├── 02-doing/ # Actively executing tasks (human or AI agent)
58
59
  ├── 03-done/ # Completed tasks
59
- └── archive/ # Historical archive
60
+ └── 04-archive/ # Historical archive (partitioned by year, e.g. 2026/)
60
61
  ```
61
62
 
62
63
  ---
@@ -107,7 +108,7 @@ Dirban maps directly to the questions developers and AI agents ask when executin
107
108
  | Question You're Asking | Command | What Dirban Does |
108
109
  | :--- | :--- | :--- |
109
110
  | **"Where do things stand overall?"** | `dirban board` | Opens the interactive Kanban TUI (or `--static` for stdout) |
110
- | **"How do I queue up work from the backlog?"** | `dirban ready <id>` | Moves unblocked tasks from `backlog/` into `01-todo/` |
111
+ | **"How do I queue up work from the backlog?"** | `dirban ready <id>` | Moves unblocked tasks from `00-backlog/` into `01-todo/` |
111
112
  | **"What should I focus on next?"** | `dirban next` | Recommends the highest-priority unblocked task in `01-todo/` |
112
113
  | **"How do I begin working on it?"** | `dirban start <id>` | Moves task to `02-doing/` and creates a matching Git branch or worktree |
113
114
  | **"What am I currently doing?"** | `dirban current` | Displays the active task, branch alignment, and criteria checklist |
@@ -122,7 +123,7 @@ Dirban maps directly to the questions developers and AI agents ask when executin
122
123
 
123
124
  - 📋 **[Technical Specification & Standards (`spec.md`)](spec.md)**: Google OKF schemas, trunk-based branching, state precedence, and engine invariants.
124
125
  - 📖 **[Why Dirban: Philosophy & Comparative Positioning](docs/concepts/why-dirban.md)**: Fast agent cycles (minutes) vs cloud tools (weeks), comparison matrix, and trade-offs.
125
- - ⚙️ **[Configuration Guide (`.dirban.json`)](docs/concepts/configuration.md)**: Custom columns, workflows, semantic priorities, and Git worktrees.
126
+ - ⚙️ **[Configuration Guide (`.dirban.json`)](docs/concepts/configuration.md)**: Semantic priorities, archive paths, and Git branch/worktree strategies.
126
127
  - 💻 **[CLI & TUI Reference Manual](docs/cli-reference.md)**: Full command reference, options, and keyboard shortcuts.
127
128
  - 🌿 **[Trunk-Based Git Workflow](docs/concepts/git-workflow.md)**: Git branch automation, worktree isolation, and squash merging.
128
129
  - 🐚 **[Forget About Dirban](docs/concepts/forget-about-dirban.md)**: Complete mapping of every Dirban command to raw POSIX shell (`ls`, `mv`, `cat`).
@@ -140,6 +141,14 @@ Feedback, bug reports, and suggestions are welcome on [GitHub Discussions](https
140
141
 
141
142
  ---
142
143
 
144
+ ## Support
145
+
146
+ If you find Dirban useful, you can support its development:
147
+
148
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/sywong)
149
+
150
+ ---
151
+
143
152
  ## License
144
153
 
145
154
  [MIT](LICENSE)
package/dist/dirban.js CHANGED
@@ -7195,6 +7195,73 @@ __exportCjs(exports_dist, {
7195
7195
  var import_picocolors25 = __toESM(require_picocolors(), 1);
7196
7196
  import { parseArgs } from "util";
7197
7197
  import * as process8 from "process";
7198
+ // package.json
7199
+ var package_default = {
7200
+ name: "dirban",
7201
+ version: "0.1.7",
7202
+ description: "Zero-Database, Agent-Native Kanban Engine & TUI Backed by the File System and Google Open Knowledge Format (OKF)",
7203
+ type: "module",
7204
+ main: "./dist/dirban.js",
7205
+ bin: {
7206
+ dirban: "dist/dirban.js"
7207
+ },
7208
+ files: [
7209
+ "dist/dirban.js",
7210
+ "README.md",
7211
+ "LICENSE"
7212
+ ],
7213
+ repository: {
7214
+ type: "git",
7215
+ url: "git+https://github.com/SYip/dirban.git"
7216
+ },
7217
+ keywords: [
7218
+ "kanban",
7219
+ "agentic",
7220
+ "ai-agents",
7221
+ "markdown",
7222
+ "git",
7223
+ "cli",
7224
+ "tui",
7225
+ "task-management"
7226
+ ],
7227
+ author: "SYip",
7228
+ license: "MIT",
7229
+ funding: {
7230
+ type: "buymeacoffee",
7231
+ url: "https://buymeacoffee.com/sywong"
7232
+ },
7233
+ scripts: {
7234
+ dirban: "bun run main.ts",
7235
+ "build:cli": "bun build ./main.ts --target node --outfile dist/dirban.js",
7236
+ build: "bun run build:cli && bun build ./main.ts --compile --outfile dirban && (command -v codesign > /dev/null 2>&1 && codesign --force --sign - dirban || true)",
7237
+ prepack: "bun run build:cli",
7238
+ "install:local": "bun build ./main.ts --compile --outfile ~/.local/bin/dirban && (command -v codesign > /dev/null 2>&1 && codesign --force --sign - ~/.local/bin/dirban || true)",
7239
+ "build:extension": "bun --filter dirban-vscode build",
7240
+ "watch:extension": "bun --filter dirban-vscode watch",
7241
+ "package:extension": "bun --filter dirban-vscode package",
7242
+ "build:binaries": "bun run scripts/build-binaries.ts",
7243
+ bump: "bun run scripts/bump.ts",
7244
+ test: "bun test",
7245
+ typecheck: "tsc --noEmit && bun --filter dirban-vscode typecheck",
7246
+ lint: "biome lint",
7247
+ format: "biome format --write",
7248
+ check: "biome check"
7249
+ },
7250
+ workspaces: [
7251
+ "packages/*"
7252
+ ],
7253
+ dependencies: {
7254
+ neverthrow: "^8.2.0",
7255
+ picocolors: "^1.1.1",
7256
+ yaml: "^2.7.0"
7257
+ },
7258
+ devDependencies: {
7259
+ "@biomejs/biome": "2.6.7",
7260
+ "@types/bun": "^1.2.4",
7261
+ "@types/node": "^22.13.0",
7262
+ typescript: "^5.8.2"
7263
+ }
7264
+ };
7198
7265
 
7199
7266
  // src/config/config.ts
7200
7267
  import * as fs from "node:fs";
@@ -8356,12 +8423,15 @@ var parseTaskDocument = (rawContent, filename) => {
8356
8423
 
8357
8424
  // src/vcs/git/commit.ts
8358
8425
  import { spawnSync } from "node:child_process";
8359
- var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8426
+ var commitSingleGitFile = (context, filePaths, message, cwd = process.cwd()) => {
8360
8427
  if (!context.isAvailable || context.repoRoot == null) {
8361
8428
  return $ok(undefined);
8362
8429
  }
8430
+ if (filePaths.length === 0) {
8431
+ return $ok(undefined);
8432
+ }
8363
8433
  try {
8364
- const addRes = spawnSync("git", ["add", filePath], {
8434
+ const addRes = spawnSync("git", ["add", "--", ...filePaths], {
8365
8435
  cwd,
8366
8436
  encoding: "utf-8",
8367
8437
  stdio: ["pipe", "pipe", "pipe"]
@@ -8369,10 +8439,10 @@ var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8369
8439
  if (addRes.status !== 0) {
8370
8440
  return $err({
8371
8441
  kind: "COMMAND_ERROR",
8372
- message: `Failed to stage file '${filePath}': ${addRes.stderr.trim()}`
8442
+ message: `Failed to stage file(s) '${filePaths.join(", ")}': ${addRes.stderr.trim()}`
8373
8443
  });
8374
8444
  }
8375
- const commitRes = spawnSync("git", ["commit", "-m", message, "--", filePath], {
8445
+ const commitRes = spawnSync("git", ["commit", "-m", message, "--", ...filePaths], {
8376
8446
  cwd,
8377
8447
  encoding: "utf-8",
8378
8448
  stdio: ["pipe", "pipe", "pipe"]
@@ -8380,7 +8450,7 @@ var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8380
8450
  if (commitRes.status !== 0) {
8381
8451
  return $err({
8382
8452
  kind: "COMMAND_ERROR",
8383
- message: `Failed to commit file '${filePath}': ${commitRes.stderr.trim()}`
8453
+ message: `Failed to commit file(s) '${filePaths.join(", ")}': ${commitRes.stderr.trim()}`
8384
8454
  });
8385
8455
  }
8386
8456
  return $ok(undefined);
@@ -8703,10 +8773,10 @@ class GitVcsProvider {
8703
8773
  const ctx = this.getContext(cwd);
8704
8774
  return checkGitWorkingTreeClean(ctx, options);
8705
8775
  }
8706
- commitFile(filePath, message, cwd) {
8776
+ commitFile(filePaths, message, cwd) {
8707
8777
  const workingDir = cwd ?? process.cwd();
8708
8778
  const ctx = this.getContext(workingDir);
8709
- return commitSingleGitFile(ctx, filePath, message, workingDir);
8779
+ return commitSingleGitFile(ctx, filePaths, message, workingDir);
8710
8780
  }
8711
8781
  autoMergeAndCleanup(options) {
8712
8782
  const cwd = options.cwd ?? process.cwd();
@@ -8835,7 +8905,7 @@ class NoopVcsProvider {
8835
8905
  checkWorkingTreeClean(_options) {
8836
8906
  return $ok(undefined);
8837
8907
  }
8838
- commitFile(_filePath, _message, _cwd) {
8908
+ commitFile(_filePaths, _message, _cwd) {
8839
8909
  return $ok(undefined);
8840
8910
  }
8841
8911
  autoMergeAndCleanup(_options) {
@@ -10868,7 +10938,8 @@ var syncBlockedTaskToRoot = (taskFile, rootOldPath, repoRoot, tasksDir, taskFile
10868
10938
  fs10.unlinkSync(rootOldPath);
10869
10939
  }
10870
10940
  const commitMsg = `chore(task): block ${effectiveId} (${blockers.join(", ")})`;
10871
- vcs.commitFile(rootTarget, commitMsg, repoRoot);
10941
+ const filesToCommit = rootOldPath !== rootTarget ? [rootOldPath, rootTarget] : [rootTarget];
10942
+ vcs.commitFile(filesToCommit, commitMsg, repoRoot);
10872
10943
  } catch {}
10873
10944
  };
10874
10945
  var blockTask = (board, taskIdOrPath, reasons, options) => {
@@ -11150,7 +11221,8 @@ var resumeTask = (board, config, taskId, options) => {
11150
11221
  if (!isVcsOperationSkipped(vcsCtx, strategy.name, options?.noGit)) {
11151
11222
  const taskTitle = task.document.frontmatter.title ?? effectiveId;
11152
11223
  const commitMsg = `chore(task): resume ${effectiveId} ${taskTitle}`.trim();
11153
- vcs.commitFile(targetFilePath, commitMsg, cwd);
11224
+ const filesToCommit = task.filePath !== targetFilePath ? [task.filePath, targetFilePath] : [targetFilePath];
11225
+ vcs.commitFile(filesToCommit, commitMsg, cwd);
11154
11226
  }
11155
11227
  return $ok({
11156
11228
  task: updatedTask,
@@ -11217,13 +11289,14 @@ var resumeCommand = {
11217
11289
  var import_picocolors10 = __toESM(require_picocolors2(), 1);
11218
11290
 
11219
11291
  // src/tasks/lifecycle/start.ts
11220
- var commitStartMoveToTarget = (vcs, vcsCtx, filePath, displayId, title, cwd, strategyName, noGit) => {
11292
+ var commitStartMoveToTarget = (vcs, vcsCtx, oldFilePath, newFilePath, displayId, title, cwd, strategyName, noGit) => {
11221
11293
  if (isVcsOperationSkipped(vcsCtx, strategyName, noGit)) {
11222
11294
  return $ok(undefined);
11223
11295
  }
11224
11296
  const taskTitle = title ?? displayId;
11225
11297
  const commitMsg = `chore(task): start ${displayId} ${taskTitle}`.trim();
11226
- const commitRes = vcs.commitFile(filePath, commitMsg, cwd);
11298
+ const filesToCommit = oldFilePath !== newFilePath ? [oldFilePath, newFilePath] : [newFilePath];
11299
+ const commitRes = vcs.commitFile(filesToCommit, commitMsg, cwd);
11227
11300
  if (commitRes.isErr()) {
11228
11301
  return $err({
11229
11302
  kind: "GIT_CONFLICT",
@@ -11297,7 +11370,7 @@ var startTask = (board, config, taskId, options) => {
11297
11370
  }
11298
11371
  updatedTask = moveResult.value;
11299
11372
  }
11300
- const commitRes = commitStartMoveToTarget(vcs, vcsCtx, updatedTask.filePath, displayId, task.document.frontmatter.title ?? task.document.id, cwd, strategy.name, options?.noGit);
11373
+ const commitRes = commitStartMoveToTarget(vcs, vcsCtx, task.filePath, updatedTask.filePath, displayId, task.document.frontmatter.title ?? task.document.id, cwd, strategy.name, options?.noGit);
11301
11374
  if (commitRes.isErr()) {
11302
11375
  return $err(commitRes.error);
11303
11376
  }
@@ -12894,7 +12967,7 @@ var runCli = async (args) => {
12894
12967
  return 0;
12895
12968
  }
12896
12969
  if (flags.version) {
12897
- console.log("dirban v0.1.0 (Phase 1)");
12970
+ console.log(`dirban v${package_default.version}`);
12898
12971
  return 0;
12899
12972
  }
12900
12973
  const configRes = loadConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirban",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Zero-Database, Agent-Native Kanban Engine & TUI Backed by the File System and Google Open Knowledge Format (OKF)",
5
5
  "type": "module",
6
6
  "main": "./dist/dirban.js",
@@ -28,6 +28,10 @@
28
28
  ],
29
29
  "author": "SYip",
30
30
  "license": "MIT",
31
+ "funding": {
32
+ "type": "buymeacoffee",
33
+ "url": "https://buymeacoffee.com/sywong"
34
+ },
31
35
  "scripts": {
32
36
  "dirban": "bun run main.ts",
33
37
  "build:cli": "bun build ./main.ts --target node --outfile dist/dirban.js",