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.
@@ -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> Read card details
11
- kanon card create "title" "list" [opts] Create card
12
- kanon card update <id> [opts]Update card (--comment, --add-label, --move, --done, etc.)
13
- kanon board — Board context (lists, labels, members)
14
- kanon cards List all cards
15
- kanon help-all Full command reference with all options
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> --doneMark 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 = `When you receive a card:
22
- 1. Read the title, description, labels, and comments to understand what needs to be done.
23
- 2. If the card references other cards, use \`kanon card <id>\` to read them.
24
- 3. If you need board context (available lists, labels, members), use \`kanon board\`.
25
- 4. Execute the task. If it involves code changes, implement them, then commit and push.
26
- 5. When you start working, move the card to an "In Progress" list if one exists.
27
- 6. When done, add a brief comment summarizing what you did.
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 modify cards you were not asked to work on.
32
- Always read the full card before taking action check comments for recent feedback.`;
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}`, `Title: ${card.title}`];
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)) {