@youtyan/code-viewer 0.6.2 → 0.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youtyan/code-viewer",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Local browser-based code and git diff viewer",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: code-viewer-journal
3
+ description: Use when reading, creating, updating, claiming, completing, or linking code-viewer Work Log tasks through the `code-viewer journal` CLI. Triggers on "work log", "journal task", "task queue", "AI task", "GitHub Issue", "ワークログ", "タスク管理", "タスク一覧", "Issue紐づけ".
4
+ ---
5
+
6
+ # code-viewer journal
7
+
8
+ Operate code-viewer Work Log tasks through the CLI. The CLI is the contract;
9
+ do not edit `.code-viewer/daily-journal.json` or `.code-viewer/tasks.json`
10
+ directly.
11
+
12
+ ## Requirements
13
+
14
+ - A code-viewer server must already be running for the repository
15
+ (the human starts it with: `code-viewer`). The journal CLI never starts one.
16
+ - Run from inside the repository, or pass `--cwd <repo>`.
17
+ - If `code-viewer` is not on PATH, prefix every command with
18
+ `npx -y @youtyan/code-viewer`.
19
+ - For GitHub Issue listing or linking, `gh` must be installed. Check with:
20
+
21
+ ```sh
22
+ code-viewer doctor --json
23
+ ```
24
+
25
+ The `github.gh` row reports whether `gh --version` works. Doctor does not
26
+ inspect GitHub auth metadata.
27
+
28
+ ## Read tasks
29
+
30
+ Use JSON whenever another agent step will parse the result:
31
+
32
+ ```sh
33
+ code-viewer journal tasks --json
34
+ code-viewer journal tasks --status todo --label ai-ready --json
35
+ code-viewer journal task-next --label ai-ready --limit 5 --json
36
+ ```
37
+
38
+ Guidelines:
39
+
40
+ - Use `task-next` for execution order; do not invent your own sort unless the
41
+ human asked for it.
42
+ - Treat labels as filters, priority as importance, and board order as human
43
+ ordering.
44
+ - Do not process `draft` tasks unless the human explicitly asked for drafts.
45
+
46
+ ## Create tasks
47
+
48
+ Create local tasks through `task-add`:
49
+
50
+ ```sh
51
+ code-viewer journal task-add \
52
+ --title "Implement example workflow" \
53
+ --status todo \
54
+ --priority p1 \
55
+ --label ai-ready \
56
+ --label backend \
57
+ --body "Acceptance criteria and notes."
58
+ ```
59
+
60
+ Use `--dry-run` before generated or bulk task creation:
61
+
62
+ ```sh
63
+ code-viewer journal task-add --title "Check task shape" --label ai-ready --dry-run
64
+ ```
65
+
66
+ ## Update tasks
67
+
68
+ Use `task-update` for title, status, priority, labels, due/source dates, and
69
+ body changes:
70
+
71
+ ```sh
72
+ code-viewer journal task-update <task-id> --status doing
73
+ code-viewer journal task-update <task-id> --priority p0 --label ai-ready --label ui
74
+ code-viewer journal task-update <task-id> --title "New title" --body "Updated notes."
75
+ ```
76
+
77
+ When replacing labels, pass every label that should remain. Use
78
+ `--clear-labels` only when the task should end with no labels.
79
+
80
+ ## Claim and finish
81
+
82
+ Claim exactly one task before editing code:
83
+
84
+ ```sh
85
+ code-viewer journal task-claim <task-id> --by agent --wip-limit 1
86
+ ```
87
+
88
+ Mark the task done with a concrete verification note:
89
+
90
+ ```sh
91
+ code-viewer journal task-done <task-id> --by agent --note "Implemented and verified with bun test."
92
+ ```
93
+
94
+ ## GitHub Issues
95
+
96
+ List GitHub Issues read-only:
97
+
98
+ ```sh
99
+ code-viewer journal github-issues --repo owner/repo --json
100
+ ```
101
+
102
+ Link an issue to the local board without updating GitHub:
103
+
104
+ ```sh
105
+ code-viewer journal task-link-issue 123 --repo owner/repo --status draft --label ai-ready
106
+ ```
107
+
108
+ Rules:
109
+
110
+ - Never copy the GitHub Issue body into a local task.
111
+ - `task-link-issue` reads only metadata needed for the local link.
112
+ - The local task receives `github` and `issue-<number>` labels automatically.
113
+ - Put private planning notes in the local task body or a later
114
+ `task-update`, not in GitHub.
115
+
116
+ ## Daily entries
117
+
118
+ Use daily entries for work not already represented by a task:
119
+
120
+ ```sh
121
+ code-viewer journal add --date today --label ai --body "..."
122
+ code-viewer journal list --limit 7 --json
123
+ ```
124
+
125
+ ## Full reference
126
+
127
+ Before composing non-trivial commands, read the complete agent guide:
128
+
129
+ ```sh
130
+ code-viewer journal agent-help
131
+ ```