kanon-cli 0.1.0 → 0.1.2
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/bin/kanon.js +134 -1
- package/package.json +5 -3
- package/src/commands/canvas.js +45 -0
- package/src/commands/card.js +14 -1
- package/src/commands/cards.js +3 -2
- package/src/commands/label.js +1 -1
- package/src/commands/list.js +1 -1
- package/src/commands/note.js +79 -0
- package/src/commands/sheet.js +137 -0
- package/src/commands/subcard.js +59 -0
- package/src/commands/watch.js +9 -0
- package/src/dashboard/dist/assets/index-ClOAcx9M.css +1 -0
- package/src/dashboard/dist/assets/index-DrHjrBfj.js +216 -0
- package/src/dashboard/dist/index.html +2 -2
- package/src/dashboard/server/index.js +36 -1
- package/src/dashboard/server/proxy.js +5 -1
- package/src/dashboard/server/settings.js +251 -11
- package/src/lib/admin.js +29 -3
- package/src/lib/api.js +55 -0
- package/src/lib/claude.js +65 -9
- package/src/prompts/templates.js +55 -19
- package/src/dashboard/dist/assets/index-Dcbpx-Xz.js +0 -186
- package/src/dashboard/dist/assets/index-DhFfv70f.css +0 -1
package/src/prompts/templates.js
CHANGED
|
@@ -5,31 +5,44 @@
|
|
|
5
5
|
|
|
6
6
|
export const DEFAULT_SYSTEM = `You are a Kanon board agent. You interact with the board using the \`kanon\` CLI which is in your PATH. The CLI is already authenticated.
|
|
7
7
|
|
|
8
|
+
The card details below already contain the full card content — do NOT re-read the card with \`kanon card <id>\` unless you need to refresh after making changes.
|
|
9
|
+
|
|
8
10
|
## Key Commands
|
|
9
11
|
\`\`\`
|
|
10
|
-
kanon card <id>
|
|
11
|
-
kanon card
|
|
12
|
-
kanon card update <id>
|
|
13
|
-
kanon
|
|
14
|
-
kanon
|
|
15
|
-
kanon
|
|
12
|
+
kanon card update <id> --comment "text" — Add a comment
|
|
13
|
+
kanon card update <id> --move "List" — Move card to a list (by name)
|
|
14
|
+
kanon card update <id> --done — Mark card as done
|
|
15
|
+
kanon card update <id> --description "x" — Set description
|
|
16
|
+
kanon card update <id> --add-label "x" — Add a label
|
|
17
|
+
kanon card <id> — Re-read card (only if needed)
|
|
18
|
+
kanon board — Board context (only if you need list names or members)
|
|
19
|
+
kanon cards — List all cards (only if task requires it)
|
|
20
|
+
kanon subcard <parentId> — List subcards
|
|
21
|
+
kanon subcard <parentId> nest <cardId> — Nest card under parent
|
|
22
|
+
kanon subcard <parentId> unnest <cardId> — Unnest card from parent
|
|
23
|
+
kanon card create <title> <list> --parent <id> — Create as subcard
|
|
24
|
+
kanon sheet <id> — Read sheet data
|
|
25
|
+
kanon sheet <id> set <tab> <row> <col> "val" — Set cell (0-indexed)
|
|
26
|
+
kanon sheet <id> export — CSV output
|
|
27
|
+
kanon note <id> — Read note text
|
|
28
|
+
kanon note <id> set "text" — Set note text
|
|
29
|
+
kanon note <id> append "text" — Append to note
|
|
30
|
+
kanon canvas <id> — Read canvas objects & connections
|
|
31
|
+
kanon help-all — Full command reference
|
|
16
32
|
\`\`\`
|
|
17
33
|
|
|
18
|
-
Run \`kanon help-all\` to see all available commands including checklists, labels, lists, and attachments.
|
|
19
34
|
Be concise and fast. Do not explain what you will do — just do it.`;
|
|
20
35
|
|
|
21
|
-
export const DEFAULT_TASK =
|
|
22
|
-
1.
|
|
23
|
-
2. If the
|
|
24
|
-
3.
|
|
25
|
-
4.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
7. When the task is fully complete, move the card to a "Review" list if one exists and mark it as done.
|
|
29
|
-
8. If something is unclear, add a comment with your questions instead of guessing.
|
|
36
|
+
export const DEFAULT_TASK = `## Instructions
|
|
37
|
+
1. The card details above are already complete — start working immediately.
|
|
38
|
+
2. If the task involves code changes, implement them, then commit and push.
|
|
39
|
+
3. When done, add a brief comment summarizing what you did.
|
|
40
|
+
4. Move the card to "Review" and mark it done:
|
|
41
|
+
\`kanon card update <id> --move "Review" --done\`
|
|
42
|
+
5. If something is unclear, add a comment with your questions instead of guessing.
|
|
30
43
|
|
|
31
|
-
Do not
|
|
32
|
-
|
|
44
|
+
Do not run \`kanon board\`, \`kanon cards\`, or \`kanon help-all\` unless the task specifically requires that information.
|
|
45
|
+
Do not modify cards you were not asked to work on.`;
|
|
33
46
|
|
|
34
47
|
export const DEFAULT_BUNDLE = `You have multiple cards to work on. Review each card below and process them.
|
|
35
48
|
Use sub-agents (the Agent tool) to work on cards in parallel where possible.
|
|
@@ -40,7 +53,10 @@ For each card, follow the task instructions above.`;
|
|
|
40
53
|
* Format card details into a readable block.
|
|
41
54
|
*/
|
|
42
55
|
export function formatCard(card) {
|
|
43
|
-
const parts = [`Card ID: ${card.id}
|
|
56
|
+
const parts = [`Card ID: ${card.id}`];
|
|
57
|
+
if (card.boardId) parts.push(`Board ID: ${card.boardId}`);
|
|
58
|
+
if (card.list_name) parts.push(`List: ${card.list_name}`);
|
|
59
|
+
parts.push(`Title: ${card.title}`);
|
|
44
60
|
|
|
45
61
|
if (card.description) {
|
|
46
62
|
parts.push(`Description: ${card.description}`);
|
|
@@ -60,6 +76,26 @@ export function formatCard(card) {
|
|
|
60
76
|
}
|
|
61
77
|
}
|
|
62
78
|
|
|
79
|
+
if (card.subcards?.length) {
|
|
80
|
+
parts.push(`\nSubcards:`);
|
|
81
|
+
for (const sc of card.subcards) {
|
|
82
|
+
const done = sc.is_done ? ' [done]' : '';
|
|
83
|
+
parts.push(`- ${sc.title} (${sc.id})${done}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (card.parent_card_id) {
|
|
88
|
+
parts.push(`Parent card: ${card.parent_card_id}`);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const attachments = [];
|
|
92
|
+
if (card.has_sheet) attachments.push('sheet');
|
|
93
|
+
if (card.has_note) attachments.push('note');
|
|
94
|
+
if (card.has_whiteboard) attachments.push('canvas');
|
|
95
|
+
if (attachments.length) {
|
|
96
|
+
parts.push(`Attachments: ${attachments.join(', ')} (use \`kanon ${attachments[0]} ${card.id}\` to read)`);
|
|
97
|
+
}
|
|
98
|
+
|
|
63
99
|
if (card.comments?.length) {
|
|
64
100
|
parts.push(`\nComments (newest first):`);
|
|
65
101
|
for (const c of card.comments.slice(0, 10)) {
|