@agent-workshop/adoc-plugin-task 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.
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,47 @@
1
+ import { anchor, definePlugin, frontmatter, html, markdown, ref, slug, source } from "@agent-workshop/adoc-plugin-kit";
2
+ function parse(doc) {
3
+ const { data, body, bodyLine } = frontmatter(doc.text);
4
+ const lines = body.split("\n");
5
+ const intro = [];
6
+ const sections = [];
7
+ lines.forEach((l, i) => {
8
+ const m = /^## (.+)$/.exec(l);
9
+ if (m) sections.push({ heading: m[1].trim(), anchor: slug(m[1]), line: bodyLine + i, body: "", bodyLine: bodyLine + i + 1 });
10
+ else if (sections.length) sections[sections.length - 1].body += l + "\n";
11
+ else intro.push(l);
12
+ });
13
+ const title = String(data.title ?? lines.find((l) => l.startsWith("# "))?.slice(2) ?? doc.key);
14
+ return { data, title, status: String(data.status ?? "TODO"), intro: intro.filter((l) => !l.startsWith("# ")).join("\n"), bodyLine, sections };
15
+ }
16
+ var index_default = definePlugin({
17
+ description: "A detailed work order: front matter with title and status, and ## sections.",
18
+ layout: { kind: "file", extension: ".md" },
19
+ summarize(doc) {
20
+ const { data, title, status, sections } = parse(doc);
21
+ const fields = { sections: sections.length };
22
+ if (data.assignee) fields.assignee = String(data.assignee);
23
+ if (Array.isArray(data.notes)) fields.notes = data.notes.join(", ");
24
+ if (Array.isArray(data.related)) fields.related = data.related.join(", ");
25
+ return { title, status, fields };
26
+ },
27
+ render(doc) {
28
+ const { data, intro, bodyLine, sections } = parse(doc);
29
+ return html`
30
+ <div class="adoc-toolbar">
31
+ ${data.assignee ? html`<span class="adoc-muted">assignee: ${String(data.assignee)}</span>` : ""}
32
+ ${Array.isArray(data.notes) ? html`<span class="adoc-muted">notes: ${data.notes.map((k, i) => html`${i ? ", " : ""}${ref(String(k))}`)}</span>` : ""}
33
+ ${Array.isArray(data.related) ? html`<span class="adoc-muted">related: ${data.related.map((k, i) => html`${i ? ", " : ""}${ref(String(k))}`)}</span>` : ""}
34
+ </div>
35
+ ${intro.trim() ? markdown(intro, { file: doc.file, line: bodyLine }) : ""}
36
+ ${sections.map(
37
+ (s) => html`
38
+ <section class="adoc-section" ${anchor(s.anchor)}>
39
+ <h2 ${source(doc.file, s.line)}>${s.heading}</h2>
40
+ ${markdown(s.body, { file: doc.file, line: s.bodyLine })}
41
+ </section>`
42
+ )}`;
43
+ }
44
+ });
45
+ export {
46
+ index_default as default
47
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@agent-workshop/adoc-plugin-task",
3
+ "version": "0.1.0",
4
+ "license": "0BSD",
5
+ "type": "module",
6
+ "description": "The TASK plugin of adoc: work orders that go from TODO through RUNNING and REVIEW to DONE.",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/dirty49374/adoc.git",
10
+ "directory": "plugins/task"
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.0"
35
+ },
36
+ "scripts": {
37
+ "build": "esbuild index.ts --outfile=dist/index.js --format=esm --platform=node --log-level=warning"
38
+ }
39
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: adoc-task
3
+ description: "TASK documents: detailed work orders with front matter and ## sections that go from TODO through RUNNING and REVIEW to DONE. Use when work needs a design and a plan before it is done, when finishing work for review, or when the user reviews, approves or archives tasks."
4
+ ---
5
+
6
+ # TASK documents
7
+
8
+ Document keys look like `TASK-<local id>`. Read the general workflow with `adoc skill view adoc`.
9
+
10
+ ## Purpose
11
+
12
+ A TASK is the work order for one piece of work that needs a design and a plan: what it achieves, how, and when it counts as done, with a log of what happened. It lets the user agree on the work before it starts and review it when it ends.
13
+
14
+ ## States and workflow
15
+
16
+ `TODO` → `RUNNING` → `REVIEW` → `DONE`, then archived.
17
+
18
+ - Write the TASK and agree on it with the user before you start; it usually comes from a NOTE.
19
+ - Set `RUNNING` when you start (a step to commit, see the adoc skill), and log progress in `## Log`.
20
+ - When you finish, set `REVIEW`. **Only the user decides that a task is DONE:** when they approve it, you set `status: DONE`.
21
+ - **Keep the user told.** While any TASK has `status: REVIEW`, end every report to the user in the conversation (after finishing a piece of work, when you go idle) with one line listing those TASKs in the order of `adoc document list --plugin TASK` (the most recently changed first; pick the REVIEW ones yourself): at most three keys, then the number of the others, if any: `Tasks to review: TASK-a, TASK-b, TASK-c and 4 more`.
22
+ - **When the user says they will review:** open the first one of that order with `adoc ui open <KEY>`, say in one or two sentences what it delivered and what to look at, and wait. When they approve it, set `status: DONE`, commit, and open the next one. When they ask for changes, make them and keep the task in REVIEW. Stop when none is left or the user stops.
23
+ - **When ten or more TASKs are DONE** (not archived), ask the user whether to archive them, at most once per session. If they agree, archive each, and the NOTEs listed in their `notes:` unless a task that stays lists them too; run `adoc check` and commit.
24
+
25
+ ## Instructions
26
+
27
+ - When a task comes from one or more NOTEs, always list them in `notes:`, so that the task can be traced back to the discussion.
28
+ - Keep `## Done when` checkable: concrete results the user can verify. Check an item when you have verified it, and log how.
29
+ - Log facts in `## Log` with dates: what changed, what was checked and how, and what was not checked.
30
+ - To split a task, create a new TASK and link both with `[[KEY]]`.
31
+ - When the user asks for a status change the work does not allow yet, such as DONE while `## Done when` items are open, keep the status, say why in your conversation, and ask whether to drop those items.
32
+
33
+ ## File
34
+
35
+ `TASK-<local id>.md`: YAML front matter, then Markdown with `##` sections.
36
+
37
+ ```markdown
38
+ ---
39
+ title: Paginate the order list
40
+ status: RUNNING # TODO | RUNNING | REVIEW | DONE
41
+ assignee: adoc-dev
42
+ notes: [NOTE-260929-order-list-speed]
43
+ related: [TODO-gui]
44
+ ---
45
+
46
+ ## Goal
47
+
48
+ Order list loads in under 200 ms with 10k orders.
49
+
50
+ ## Method
51
+
52
+ 1. Replace `findAll()` with `findPage(cursor, limit)`.
53
+
54
+ ## Done when
55
+
56
+ - [ ] p95 under 200 ms
57
+
58
+ ## Log
59
+
60
+ - 2026-09-30: step 1 done.
61
+ ```
62
+
63
+ - `title` and `status` are expected; `assignee` (who works on it, such as the agent's name), `notes` and `related` are optional and appear in tooltips. `notes` and `related` are YAML lists of document keys, even for one key: `notes: [NOTE-x]`.
64
+ - Write `[[KEY]]` in the body to refer to another document.
65
+ - Recommended local id: today's date (yymmdd) and a title, such as `TASK-260930-order-paging`.
66
+
67
+ ## Anchors
68
+
69
+ The anchor of a section is its heading in lowercase, with every run of other characters than letters and digits turned into one hyphen: `## Done when` is `TASK-…#done-when`.
70
+
71
+ ## Actions
72
+
73
+ None of its own beyond the common `archive` and `unarchive` (see the adoc skill): the user asks for a status change in a comment or in the conversation, and you edit `status:` in the front matter.