kandown 0.1.0

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.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Kandown",
3
+ "short_name": "Kandown",
4
+ "description": "File-based Kanban engine backed by Markdown",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#0a0a0a",
8
+ "theme_color": "#0a0a0a",
9
+ "icons": [
10
+ {
11
+ "src": "/favicon.svg",
12
+ "sizes": "any",
13
+ "type": "image/svg+xml",
14
+ "purpose": "any"
15
+ }
16
+ ]
17
+ }
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "kandown",
3
+ "version": "0.1.0",
4
+ "description": "File-based Kanban engine backed by Markdown. Zero backend, AI-agent friendly.",
5
+ "type": "module",
6
+ "bin": {
7
+ "kandown": "bin/kandown.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "bin",
12
+ "templates",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "keywords": [
17
+ "kanban",
18
+ "markdown",
19
+ "task-manager",
20
+ "ai-agents",
21
+ "local-first",
22
+ "file-over-app"
23
+ ],
24
+ "author": "Vanessa Depraute (https://github.com/vava-nessa)",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/vava-nessa/kandown.git"
28
+ },
29
+ "homepage": "https://github.com/vava-nessa/kandown#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/vava-nessa/kandown/issues"
32
+ },
33
+ "license": "MIT",
34
+ "scripts": {
35
+ "dev": "node scripts/sync-agent-kandown.js && vite",
36
+ "dev:cli": "tsup --watch",
37
+ "build": "node scripts/sync-agent-kandown.js && tsc -b && vite build && pnpm build:cli",
38
+ "build:cli": "tsup",
39
+ "preview": "vite preview",
40
+ "typecheck": "tsc --noEmit",
41
+ "sync:agent": "node scripts/sync-agent-kandown.js"
42
+ },
43
+ "dependencies": {
44
+ "@tabler/icons-react": "3.41.1",
45
+ "@wysimark/react": "3.0.20",
46
+ "i18next": "26.0.5",
47
+ "ink": "7.0.1",
48
+ "marked": "18.0.2",
49
+ "motion": "^12.38.0",
50
+ "react": "^19.0.0",
51
+ "react-dom": "^19.0.0",
52
+ "react-i18next": "17.0.4",
53
+ "three": "^0.171.0",
54
+ "zustand": "^5.0.0"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "25.6.0",
58
+ "@types/react": "^19.0.0",
59
+ "@types/react-dom": "^19.0.0",
60
+ "@types/three": "0.182.0",
61
+ "@vitejs/plugin-react": "^4.3.4",
62
+ "autoprefixer": "^10.4.20",
63
+ "postcss": "^8.5.1",
64
+ "tailwindcss": "^3.4.17",
65
+ "tsup": "8.5.1",
66
+ "typescript": "^5.7.3",
67
+ "vite": "^6.0.7",
68
+ "vite-plugin-singlefile": "^2.1.0"
69
+ },
70
+ "engines": {
71
+ "node": ">=18"
72
+ }
73
+ }
@@ -0,0 +1,102 @@
1
+ # Kandown conventions for AI agents
2
+
3
+ This project uses a file-based Kandown board located in `.kandown/`. Read this file before touching task files.
4
+
5
+ ## Source of truth
6
+
7
+ Tasks are the source of truth. There is no board index to maintain.
8
+
9
+ ```
10
+ .kandown/
11
+ ├── kandown.json ← project settings and board columns
12
+ ├── tasks/
13
+ │ ├── t1.md ← task status, metadata, subtasks, notes, report
14
+ │ └── ...
15
+ └── kandown.html ← local web UI
16
+ ```
17
+
18
+ Columns are stored in `.kandown/kandown.json` under `board.columns`. A task belongs to a column through its frontmatter `status`.
19
+
20
+ If a task has no `status`, treat it as `Backlog`.
21
+
22
+ ## Task file format
23
+
24
+ ```markdown
25
+ ---
26
+ id: t1
27
+ title: Full task title
28
+ status: Todo
29
+ priority: P1
30
+ tags: [backend, security]
31
+ assignee: username
32
+ created: 2026-04-10
33
+ due: 2026-04-25
34
+ ownerType: human
35
+ tools: filesystem, cli, websearch
36
+ ---
37
+
38
+ # Task title
39
+
40
+ ## Context
41
+
42
+ Background, links, decisions.
43
+
44
+ ## Subtasks
45
+
46
+ - [ ] First step
47
+ - [ ] Second step
48
+
49
+ ## Notes
50
+
51
+ Additional information.
52
+ ```
53
+
54
+ Frontmatter fields:
55
+ - `status` — current board column.
56
+ - `order` — optional numeric order inside the column.
57
+ - `ownerType: human` — task is meant for a human.
58
+ - `ownerType: ai` — task is meant for an AI agent.
59
+ - `tools` — free-form tool hints, such as `filesystem, cli, websearch, browser`.
60
+
61
+ ## Working on a task
62
+
63
+ 1. Open the specific task file the user requested.
64
+ 2. Set `status: In Progress` when you start.
65
+ 3. Check off subtasks as you complete them.
66
+ 4. Add a short report below completed subtasks when useful.
67
+ 5. When done, add or update the completion report and set `status: Done`.
68
+
69
+ Example completion report in frontmatter:
70
+
71
+ ```yaml
72
+ report: |
73
+ ## Changes
74
+ - Created `src/auth.ts` with JWT validation.
75
+ - Added `/api/auth/login`.
76
+
77
+ ## Files
78
+ - `src/auth.ts`
79
+
80
+ ## Decisions
81
+ - Used RS256 for better key rotation support.
82
+ ```
83
+
84
+ ## Creating tasks
85
+
86
+ Create a new `tasks/<id>.md` file. Pick the next available ID by scanning filenames in `.kandown/tasks/`. Task IDs use the format `t<N>` (e.g. `t1`, `t2`, `t45`).
87
+
88
+ ## Mutation rules
89
+
90
+ | Action | Files to edit |
91
+ |---|---|
92
+ | Move task between columns | Task file only: update frontmatter `status` |
93
+ | Reorder task | Task file only: update frontmatter `order` |
94
+ | Change title/priority/tags/assignee | Task file frontmatter only |
95
+ | Change ownerType/tools | Task file frontmatter only |
96
+ | Edit description/notes/subtasks/report | Task file body/frontmatter only |
97
+ | Create task | Create one file in `.kandown/tasks/` |
98
+ | Delete task | Delete its file from `.kandown/tasks/` |
99
+
100
+ ## Scope control
101
+
102
+ If you notice unrelated cleanup while working, create a separate task file instead of fixing it inline. Keep the current task focused.
@@ -0,0 +1,146 @@
1
+ # Kandown — AI Agent Rules
2
+
3
+ ## The System
4
+
5
+ Kandown is a file-based Kanban backed by plain markdown. All task state lives in `.kandown/tasks/*.md` — no separate board index, no database.
6
+
7
+ ```
8
+ .kandown/
9
+ ├── tasks/ # Task files (source of truth)
10
+ ├── kandown.json # Board columns + project settings
11
+ └── kandown.html # Web UI
12
+ ```
13
+
14
+ **Board columns** are configured in `kandown.json` at `board.columns`. Tasks without a `status` go to **Backlog**.
15
+
16
+ ---
17
+
18
+ ## Critical: Real-Time Task Updates
19
+
20
+ ⚠️ **ALWAYS keep task files up to date as you work.** This is not optional — it lets the user see exactly what you're doing, what was decided, and what's left.
21
+
22
+ When you make progress:
23
+ 1. Check off completed subtasks: `- [ ]` → `- [x]`
24
+ 2. Add a `report:` under each done subtask with what changed
25
+ 3. Move the task to the appropriate column by updating `status:` in frontmatter
26
+ 4. Write a completion `report:` in frontmatter when the task is done
27
+
28
+ ---
29
+
30
+ ## Task Lifecycle
31
+
32
+ ### Start working on a task
33
+ Update the task frontmatter: `status: In Progress`
34
+
35
+ ### While working — UPDATE THE TASK FILE AS YOU GO
36
+
37
+ **This is the most important rule.** Every time you make progress — writing code, making a decision, discovering something — update the task file immediately. Do not wait until the task is done.
38
+
39
+ For each subtask you complete:
40
+ 1. Check it off: `- [ ]` → `- [x]`
41
+ 2. Add a `report:` line under it with what changed
42
+
43
+ Example subtask with report:
44
+ ```markdown
45
+ - [x] Set up project structure
46
+ report: Created src/, dist/, and bin/. Initialized package.json with dependencies.
47
+ - [ ] Add authentication
48
+ ```
49
+
50
+ If there are no subtasks yet, add them as you discover what needs to be done. The task file is your real-time work log — the user should be able to open it and see exactly where things stand.
51
+
52
+ **Never** wait until the end to update the task. If you finish a session without updating, you're leaving the user in the dark.
53
+
54
+ ### Complete a task
55
+
56
+ When the task is done:
57
+ 1. Set `status: Done` in the frontmatter
58
+ 2. Write a completion `report:` in the frontmatter summarizing:
59
+ - **Changes**: What was created/modified/deleted
60
+ - **Decisions**: Why you chose a particular approach
61
+ - **Files**: List of affected files (especially new ones)
62
+
63
+ ```yaml
64
+ ---
65
+ status: Done
66
+ report: |
67
+ ## Changes
68
+ - Created src/auth.ts with JWT validation
69
+ - Added /api/auth/login endpoint
70
+ ## Decisions
71
+ - Used RS256 for better key rotation support
72
+ ## Files
73
+ - src/auth.ts (new)
74
+ - src/routes.ts (modified)
75
+ ---
76
+ ```
77
+
78
+ The `report:` field supports markdown and is displayed prominently in the UI. Write it as a real summary, not a placeholder.
79
+
80
+ ---
81
+
82
+ ## Mutation Rules
83
+
84
+ | Action | File to edit |
85
+ |--------|-------------|
86
+ | Move task between columns | Task file: update `status:` in frontmatter |
87
+ | Reorder task | Task file: update `order:` in frontmatter |
88
+ | Change title/priority/tags/assignee | Task file frontmatter |
89
+ | Edit description/notes/subtasks | Task file body only |
90
+ | Create task | Create one new `.kandown/tasks/t-NNN.md` |
91
+ | Delete task | Delete the task file |
92
+ | Create/rename/delete columns | `kandown.json` at `board.columns` |
93
+
94
+ **One task file = one source of truth.** Never maintain a separate board index.
95
+
96
+ ---
97
+
98
+ ## Task File Format
99
+
100
+ ```markdown
101
+ ---
102
+ id: t1
103
+ title: Task title
104
+ status: Backlog
105
+ order: 0
106
+ priority: P1
107
+ tags: [backend]
108
+ assignee: username
109
+ created: 2026-04-10
110
+ ownerType: human
111
+ ---
112
+
113
+ # Task title
114
+
115
+ ## Context
116
+
117
+ Why this exists, background, links.
118
+
119
+ ## Subtasks
120
+
121
+ - [ ] First step
122
+ - [x] Second step
123
+ report: What changed.
124
+
125
+ ## Notes
126
+
127
+ Edge cases, gotchas.
128
+ ```
129
+
130
+ ### Frontmatter fields
131
+
132
+ | Field | Description |
133
+ |-------|-------------|
134
+ | `status` | Board column (Backlog, Todo, In Progress, Review, Done) |
135
+ | `order` | Sort order within the column |
136
+ | `priority` | P1–P4 |
137
+ | `tags` | Free-form labels |
138
+ | `assignee` | Username or AI agent name |
139
+ | `ownerType` | `human` or `ai` |
140
+ | `report` | Completion summary (markdown, shown in UI) |
141
+
142
+ ---
143
+
144
+ ## Stack
145
+
146
+ React, Motion, Tailwind, Vite, Zustand, TypeScript, Node.js ESM CLI.
@@ -0,0 +1,65 @@
1
+ # Kandown — AI Agent Rules
2
+
3
+ You are working on a task managed by **Kandown**, a file-based Kanban system.
4
+ Complete the task and keep its task file updated as you work.
5
+
6
+ ## File Locations
7
+
8
+ ```
9
+ .kandown/
10
+ ├── tasks/<id>.md ← full task details and source of truth
11
+ └── kandown.json ← project config, including board.columns
12
+ ```
13
+
14
+ ## When You Start
15
+
16
+ 1. Open `.kandown/tasks/<id>.md`.
17
+ 2. Set frontmatter `status: In Progress`.
18
+ 3. Read the full task context before editing code.
19
+
20
+ ## While Working
21
+
22
+ After completing each subtask:
23
+ 1. Check it off in the task file: `- [ ]` → `- [x]`.
24
+ 2. Add a report line below it when useful: ` report: What you did.`
25
+
26
+ Example:
27
+
28
+ ```markdown
29
+ - [x] Create auth module
30
+ report: Created src/auth.ts with JWT validation. Added /api/auth route.
31
+ - [ ] Add tests
32
+ ```
33
+
34
+ ## When You Finish
35
+
36
+ 1. Write the `report:` field in the task frontmatter (markdown supported, displayed in UI report panel):
37
+
38
+ ```yaml
39
+ ---
40
+ id: t19
41
+ title: My task
42
+ status: Done
43
+ report: |
44
+ ## Changes
45
+ - Created src/auth.ts (JWT, RS256)
46
+ - Added /api/auth/login endpoint
47
+ ## Files
48
+ - src/auth.ts (new)
49
+ ## Decisions
50
+ - Used RS256 for better key rotation support
51
+ ---
52
+ ```
53
+
54
+ 2. Set frontmatter `status: Done`.
55
+ 3. Leave all subtasks checked if the task is complete.
56
+
57
+ **Subtask reports**: Write per-step reports in the `[REPORT]` section under each subtask in the body, not in separate sections.
58
+
59
+ ## Rules
60
+
61
+ - The task file is the source of truth.
62
+ - Do not maintain a separate board index.
63
+ - If a task has no `status`, treat it as `Backlog`.
64
+ - Board columns are configured in `.kandown/kandown.json` at `board.columns`.
65
+ - If you notice unrelated issues, create a separate task file instead of fixing inline.
@@ -0,0 +1,48 @@
1
+ # .kandown/
2
+
3
+ File-based kanban for this project. Zero backend, plain markdown on disk.
4
+
5
+ ## Usage
6
+
7
+ 1. Open `kandown.html` in Chrome, Edge, Brave or Opera (File System Access API required)
8
+ 2. Click **Select folder** and pick the project folder, then grant read/write permission
9
+ 3. Start editing tasks
10
+
11
+ The app remembers the last 10 projects you've opened.
12
+
13
+ ## Structure
14
+
15
+ ```
16
+ .kandown/
17
+ ├── tasks/
18
+ │ ├── t1.md ← full task details and board status
19
+ │ └── ...
20
+ ├── kandown.html ← the engine (single file, no dependencies)
21
+ ├── kandown.json ← project preferences, columns, appearance, optional fields
22
+ ├── AGENT.md ← AI coding agent conventions
23
+ └── README.md ← this file
24
+ ```
25
+
26
+ ## Settings
27
+
28
+ Open Settings from the app header to tune this project. Board columns are stored in `kandown.json` at `board.columns`. Each task chooses a column with its frontmatter `status`.
29
+
30
+ ## Editing without the app
31
+
32
+ Everything is plain markdown. Edit files directly in your IDE, Obsidian, or vim. Click **Reload** in the app (or press `R`) to see changes.
33
+
34
+ ## For AI agents
35
+
36
+ See `AGENT.md`. The key convention: each task file is its own source of truth. Moving a task means editing the task's frontmatter `status`.
37
+
38
+ ## Keyboard shortcuts
39
+
40
+ | Key | Action |
41
+ |---|---|
42
+ | `⌘K` / `Ctrl+K` | Command palette |
43
+ | `⌘1` / `⌘2` | Board / list view |
44
+ | `N` | New task |
45
+ | `R` | Reload |
46
+ | `/` | Focus search |
47
+ | `Esc` | Close drawer / palette |
48
+ | `⌘S` | Save current task |
@@ -0,0 +1,34 @@
1
+ {
2
+ "ui": {
3
+ "language": "en",
4
+ "theme": "auto",
5
+ "skin": "kandown",
6
+ "font": "inter"
7
+ },
8
+ "agent": {
9
+ "suggestFollowUp": false,
10
+ "maxSuggestions": 3
11
+ },
12
+ "board": {
13
+ "columns": ["Backlog", "Todo", "In Progress", "Review", "Done"],
14
+ "defaultPriority": "P3",
15
+ "defaultOwnerType": "human"
16
+ },
17
+ "fields": {
18
+ "priority": false,
19
+ "assignee": false,
20
+ "tags": false,
21
+ "dueDate": false,
22
+ "ownerType": false,
23
+ "tools": false
24
+ },
25
+ "notifications": {
26
+ "browser": false,
27
+ "sound": false,
28
+ "soundId": "soft",
29
+ "statusChanges": true,
30
+ "taskEdits": true,
31
+ "subtaskCompletions": true,
32
+ "editDebounceMs": 2000
33
+ }
34
+ }
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: t1
3
+ title: Welcome to your kanban
4
+ status: Todo
5
+ priority: P3
6
+ tags: [example]
7
+ created: 2026-04-16
8
+ ownerType: human
9
+ tools:
10
+ ---
11
+
12
+ # Welcome to your kanban
13
+
14
+ ## Context
15
+
16
+ This is an example task. You can delete it once you're comfortable with the tool.
17
+
18
+ Everything here is plain markdown on your disk. The app reads and writes these files directly.
19
+ No database, no backend, no account.
20
+
21
+ ## Subtasks
22
+
23
+ - [x] Install with `npx kandown init`
24
+ - [x] Open `kanban.html` in Chrome
25
+ - [ ] Create your first real task
26
+ - [ ] Delete this example
27
+
28
+ ## Notes
29
+
30
+ Press `⌘K` to open the command palette and fuzzy-search any task.
@@ -0,0 +1,32 @@
1
+ ---
2
+ id: t2
3
+ title: add some error handlers
4
+ status: Done
5
+ created: 2026-04-17
6
+ assignee: opencode
7
+ priority: P1
8
+ ---
9
+
10
+ check for error handlers and good quality code so the app never crashes.
11
+
12
+ ## What was done
13
+
14
+ Added comprehensive error guards across the codebase to prevent crashes from malformed data:
15
+
16
+ ### serializer.ts
17
+ - `serializeTaskFile()`: Added guards for frontmatter being a valid object, type checking for frontmatter values, multiline report preservation, and null coalescing for body
18
+
19
+ ### parser.ts
20
+ - `parseSimpleYaml()`: Added early return for falsy/invalid input, guards for `m[2]` and regex match access, safe array mapping
21
+ - `buildColumnsFromTasks()`: Added fallback handling for missing statuses and unknown columns
22
+ - `parseTaskFile()`: Added early return guard for empty input
23
+ - `extractSubtasks()`: Added guards for body being a valid string, all line accesses, regex match groups, and text extraction
24
+ - `injectSubtasks()`: Added nullish guards on lines array access, safe array slicing bounds, null coalescing for line content
25
+
26
+ These changes ensure the app handles corrupted, incomplete, or malformed markdown files gracefully without crashing.
27
+
28
+ ## Subtasks
29
+
30
+ - [x] check the code for errors
31
+ - [x] add some error handlers to avoid crashes
32
+ - [x] document that
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: t3
3
+ title: New task
4
+ status: Backlog
5
+ created: 2026-04-17
6
+ ---
7
+
8
+ # New task
9
+
10
+ ## Context
11
+
12
+
13
+ ## Subtasks