@agent-workshop/adoc-plugin-kanban 0.0.0-stage → 0.1.1

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.
package/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ Copyright (C) 2026 adoc contributors
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,49 @@
1
+ # Third-party notices
2
+
3
+ adoc's original code and documentation use the Zero-Clause BSD License (0BSD). That license does not replace the
4
+ licenses of third-party components, and no third-party component is relicensed by this repository.
5
+
6
+ ## Browser distributions
7
+
8
+ Two packages carry bundled browser code:
9
+
10
+ - `@agent-workshop/adoc-webapp`: the web UI in `dist/`. Its build records the packages actually bundled in
11
+ `dist/licenses/packages.json` and copies their upstream LICENSE, COPYING, COPYRIGHT and NOTICE files beneath
12
+ `dist/licenses/`.
13
+ - `@agent-workshop/adoc-plugin-sketch`: the drawing board in `client/`, with its inventory and license files in
14
+ `client/licenses/`.
15
+
16
+ Keep these files when redistributing the built browser assets.
17
+
18
+ The main browser dependencies are React, React DOM, React Router, Mermaid (with KaTeX), xterm.js and Lucide in the web
19
+ UI, and Excalidraw with React and Radix UI in the drawing board. Most use MIT, ISC, BSD or Apache-2.0.
20
+
21
+ - DOMPurify offers MPL-2.0 OR Apache-2.0; adoc uses the Apache-2.0 option.
22
+ - Some packages are published without a license file although their manifest names one: Excalidraw, the Radix UI
23
+ primitives, react-remove-scroll-bar and fastdom (all MIT). The build includes the upstream texts kept in
24
+ `tooling/licenses/`.
25
+
26
+ ### Eclipse Layout Kernel / elkjs
27
+
28
+ Mermaid bundles elkjs, a separately licensed layout engine, which adoc uses under EPL-2.0 without modifying it. Its
29
+ license is included in the generated license inventory. Corresponding source is available from:
30
+
31
+ - https://github.com/kieler/elkjs (select the release matching the inventory version)
32
+ - https://github.com/eclipse/elk (the underlying Eclipse Layout Kernel)
33
+ - https://www.eclipse.org/legal/epl-2.0/
34
+
35
+ Recipients may obtain, modify and redistribute the EPL-covered source under EPL-2.0. adoc's 0BSD license applies to its
36
+ independent code, not to ELK.
37
+
38
+ ## Fonts
39
+
40
+ - The web UI serves Pretendard, D2Coding (both SIL Open Font License 1.1) and Symbols Nerd Font Mono; their license
41
+ files are next to them in `dist/assets/fonts/`.
42
+ - The drawing board serves the fonts that Excalidraw ships in `client/fonts/` (Excalifont, Virgil, Nunito, Lilita One,
43
+ Comic Shanns, Cascadia Code, Liberation Sans, Assistant and Xiaolai); they are distributed under the terms that
44
+ Excalidraw states for them in https://github.com/excalidraw/excalidraw.
45
+
46
+ ## Installed runtime dependencies
47
+
48
+ The packages that npm installs next to adoc, such as the MCP SDK, ws, yaml, zod, semver, commander, markdown-it and
49
+ highlight.js, are not bundled: each keeps its own license in its own package.
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ import { action, anchor, definePlugin, dropTarget, html, markdown, parseYaml, source } from "@agent-workshop/adoc-plugin-kit";
2
+ const HIDDEN = "REMOVE";
3
+ function parse(doc) {
4
+ const data = parseYaml(doc.text) ?? {};
5
+ if (!Array.isArray(data.columns) || !data.columns.length) throw new Error("columns must be a non-empty list");
6
+ const cards = (data.cards ?? []).map((c) => ({ id: String(c.id), text: String(c.text ?? ""), column: String(c.column) }));
7
+ const lines = doc.text.split("\n");
8
+ const lineOf = (id) => lines.findIndex((l) => new RegExp(`^\\s*-\\s*id:\\s*['"]?${id}['"]?\\s*$`).test(l)) + 1;
9
+ return { title: data.title ?? doc.key, columns: data.columns.map(String), cards, lineOf };
10
+ }
11
+ var index_default = definePlugin({
12
+ description: "One screen of about ten cards in columns, to see where work stands.",
13
+ layout: { kind: "file", extension: ".yaml" },
14
+ summarize(doc) {
15
+ const { title, columns, cards } = parse(doc);
16
+ const shown = cards.filter((c) => c.column !== HIDDEN && columns.includes(c.column));
17
+ const fields = {};
18
+ for (const column of columns.filter((c) => c !== HIDDEN)) fields[column] = shown.filter((c) => c.column === column).length;
19
+ return { title, status: `${shown.length} cards`, fields };
20
+ },
21
+ render(doc) {
22
+ const { columns, cards, lineOf } = parse(doc);
23
+ const card = (c) => html`
24
+ <div class="adoc-card" ${anchor(c.id)} ${source(doc.file, lineOf(c.id))} ${action({ kind: "drag", name: "move", value: c.id })}>
25
+ <span class="adoc-muted">${c.id}</span> ${markdown(c.text, { inline: true })}
26
+ </div>`;
27
+ return html`
28
+ <div class="adoc-board">
29
+ ${columns.filter((col) => col !== HIDDEN).map(
30
+ (col) => html`
31
+ <div class="adoc-column" ${dropTarget("move", col)}>
32
+ <div class="adoc-column-title">${col} <span class="adoc-muted">${cards.filter((c) => c.column === col).length}</span></div>
33
+ ${cards.filter((c) => c.column === col).map(card)}
34
+ </div>`
35
+ )}
36
+ </div>
37
+ ${columns.includes(HIDDEN) ? html`<div class="adoc-trash" ${dropTarget("move", HIDDEN)}>Drop here to remove</div>` : ""}`;
38
+ },
39
+ actions: {
40
+ move(doc, event) {
41
+ const { cards } = parse(doc);
42
+ const card = cards.find((c) => c.id === event.value);
43
+ if (!card) throw new Error(`no card ${event.value}`);
44
+ if (card.column === event.to) return {};
45
+ return { message: `user request: move card ${card.id} "${card.text}": ${card.column} => ${event.to}` };
46
+ }
47
+ }
48
+ });
49
+ export {
50
+ index_default as default
51
+ };
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@agent-workshop/adoc-plugin-kanban",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "license": "0BSD",
5
+ "type": "module",
6
+ "description": "The KANBAN plugin of adoc: one board of about ten cards in columns.",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/dirty49374/adoc.git",
10
+ "directory": "plugins/kanban"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "skill",
15
+ "LICENSE",
16
+ "THIRD_PARTY_NOTICES.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=24"
20
+ },
21
+ "publishConfig": {
22
+ "registry": "https://registry.npmjs.org",
23
+ "access": "public"
24
+ },
25
+ "exports": {
26
+ ".": "./dist/index.js",
27
+ "./package.json": "./package.json"
28
+ },
29
+ "peerDependencies": {
30
+ "@agent-workshop/adoc-plugin-kit": "^0.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "esbuild": "0.28.2",
34
+ "@agent-workshop/adoc-plugin-kit": "0.1.1"
35
+ },
36
+ "scripts": {
37
+ "build": "esbuild index.ts --outfile=dist/index.js --format=esm --platform=node --log-level=warning"
38
+ }
6
39
  }
package/skill/SKILL.md ADDED
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: adoc-kanban
3
+ description: "KANBAN documents: one board of about ten cards in columns, to see where work stands. Use when the user wants an overview of work in progress, moves a card, or asks to add or remove cards."
4
+ ---
5
+
6
+ # KANBAN documents
7
+
8
+ Document keys look like `KANBAN-<local id>`. Read the general workflow with `adoc skill view adoc`.
9
+
10
+ ## Purpose
11
+
12
+ A KANBAN board is one screen that shows where about ten pieces of work stand, so that the user sees the state of the work at a glance. It keeps no history; git does.
13
+
14
+ ## States and workflow
15
+
16
+ - The columns are the states, in the order of `columns`, usually `TODO`, `RUNNING` and `DONE`. A column named `REMOVE` is not a state but a hidden drop target: a card dropped there is to be deleted, never left in it.
17
+ - The user drags a card to another column in the web UI; that reaches you as a request, and you move the card in the file. Move or remove a card only when the user asks for it or agrees.
18
+
19
+ ## Instructions
20
+
21
+ - Keep the board to about ten cards: when it has more, ask the user whether to remove DONE cards.
22
+ - Keep each card one line; refer to the document that holds the details with `[[KEY]]`.
23
+ - Ask the user in your conversation, not in the file: the view shows only the cards.
24
+ - A board is independent: moving a card never changes the documents its text refers to, and changing those documents never moves a card. Update both only when the user asks for it.
25
+ - Give a new card an id one higher than any id the board has had; never reuse the id of a removed card (look at the board's git history when the highest card was removed).
26
+
27
+ ## File
28
+
29
+ `KANBAN-<local id>.yaml`:
30
+
31
+ ```yaml
32
+ title: Sprint 12
33
+ columns: [TODO, RUNNING, DONE, REMOVE]
34
+ cards:
35
+ - id: c1
36
+ text: Paginate the order list [[TASK-260930-order-paging]]
37
+ column: RUNNING
38
+ - id: c2
39
+ text: Dark mode
40
+ column: DONE
41
+ ```
42
+
43
+ - `columns` is the column order. A column named `REMOVE` is not shown; dropping a card on it asks for its removal.
44
+ - Each card has a unique short `id` (`c1`, `c2`, …), a one-line `text` (may contain `[[KEY]]`) and its `column`, which must be one of `columns`; a card in another column is not shown.
45
+ - Recommended local id: a topic, such as a project or a team: `KANBAN-adoc`, `KANBAN-sprint12`.
46
+
47
+ ## Anchors
48
+
49
+ The anchor of a card is its `id`: `KANBAN-sprint12#c1`.
50
+
51
+ ## Actions
52
+
53
+ | action | what adoc already did | what you do |
54
+ |---|---|---|
55
+ | `move` (drag a card), message `user request: move card c1 "…": RUNNING => DONE` | nothing (`applied: false`); no message when the card is already in that column | set that card's `column` to the new column; for `REMOVE`, delete the card from `cards` |
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.