agent-diary 4.3.0__py3-none-any.whl

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.
Files changed (59) hide show
  1. agent_diary-4.3.0.dist-info/METADATA +599 -0
  2. agent_diary-4.3.0.dist-info/RECORD +59 -0
  3. agent_diary-4.3.0.dist-info/WHEEL +5 -0
  4. agent_diary-4.3.0.dist-info/entry_points.txt +4 -0
  5. agent_diary-4.3.0.dist-info/licenses/LICENSE +21 -0
  6. agent_diary-4.3.0.dist-info/top_level.txt +1 -0
  7. claude_diary/__init__.py +3 -0
  8. claude_diary/__main__.py +5 -0
  9. claude_diary/cli/__init__.py +213 -0
  10. claude_diary/cli/config.py +190 -0
  11. claude_diary/cli/maintenance.py +146 -0
  12. claude_diary/cli/notion_common.py +30 -0
  13. claude_diary/cli/notion_ensure.py +190 -0
  14. claude_diary/cli/notion_init.py +148 -0
  15. claude_diary/cli/notion_ops.py +553 -0
  16. claude_diary/cli/notion_push/__init__.py +397 -0
  17. claude_diary/cli/notion_push/artifacts.py +146 -0
  18. claude_diary/cli/notion_push/ordinals.py +70 -0
  19. claude_diary/cli/notion_push/preview.py +59 -0
  20. claude_diary/cli/notion_push/properties.py +234 -0
  21. claude_diary/cli/notion_push/relations.py +119 -0
  22. claude_diary/cli/notion_push/tasks.py +75 -0
  23. claude_diary/cli/notion_push/validate.py +97 -0
  24. claude_diary/cli/notion_review.py +147 -0
  25. claude_diary/cli/search.py +158 -0
  26. claude_diary/cli/setup.py +675 -0
  27. claude_diary/cli/stats.py +216 -0
  28. claude_diary/cli/team.py +72 -0
  29. claude_diary/cli/write.py +309 -0
  30. claude_diary/config.py +112 -0
  31. claude_diary/core.py +227 -0
  32. claude_diary/dashboard.py +308 -0
  33. claude_diary/exporters/__init__.py +0 -0
  34. claude_diary/exporters/base.py +30 -0
  35. claude_diary/exporters/discord.py +73 -0
  36. claude_diary/exporters/github.py +100 -0
  37. claude_diary/exporters/loader.py +154 -0
  38. claude_diary/exporters/notion.py +77 -0
  39. claude_diary/exporters/notion_hierarchical.py +680 -0
  40. claude_diary/exporters/notion_views.py +996 -0
  41. claude_diary/exporters/obsidian.py +80 -0
  42. claude_diary/exporters/slack.py +60 -0
  43. claude_diary/formatter.py +710 -0
  44. claude_diary/hook.py +80 -0
  45. claude_diary/i18n.py +172 -0
  46. claude_diary/indexer.py +141 -0
  47. claude_diary/lib/__init__.py +0 -0
  48. claude_diary/lib/audit.py +127 -0
  49. claude_diary/lib/categorizer.py +64 -0
  50. claude_diary/lib/git_info.py +212 -0
  51. claude_diary/lib/notion_cache.py +126 -0
  52. claude_diary/lib/parser.py +216 -0
  53. claude_diary/lib/secret_scanner.py +85 -0
  54. claude_diary/lib/stats.py +80 -0
  55. claude_diary/lib/team_security.py +210 -0
  56. claude_diary/log.py +42 -0
  57. claude_diary/team.py +336 -0
  58. claude_diary/types.py +63 -0
  59. claude_diary/writer.py +45 -0
@@ -0,0 +1,599 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-diary
3
+ Version: 4.3.0
4
+ Summary: Record Claude Code and Codex work sessions as Markdown or Notion work diaries
5
+ Author: solzip
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/solzip/agent-diary
8
+ Project-URL: Repository, https://github.com/solzip/agent-diary
9
+ Keywords: claude-code,codex,productivity,work-diary,automation,hooks
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Documentation
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Provides-Extra: notion
25
+ Requires-Dist: requests>=2.28; extra == "notion"
26
+ Provides-Extra: all
27
+ Requires-Dist: requests>=2.28; extra == "all"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # Agent Diary
35
+
36
+ **Remember what you did with an AI.** Automatically when a Claude Code session ends, or on one command in Codex, Agent Diary records what you asked for and what changed.
37
+
38
+ [![CI](https://github.com/solzip/agent-diary/actions/workflows/ci.yml/badge.svg)](https://github.com/solzip/agent-diary/actions/workflows/ci.yml)
39
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
40
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
41
+ [![Core Dependencies: 0](https://img.shields.io/badge/core%20dependencies-0-brightgreen)](https://github.com/solzip/agent-diary)
42
+
43
+ > English | [한국어](README.md)
44
+ >
45
+ > This is a community project. It is not an official Anthropic or OpenAI project.
46
+
47
+ ![Agent Diary demo](docs/demo.svg)
48
+
49
+ ## 1. Why
50
+
51
+ Work done with an AI lives in a chat window, and chat windows close. Two days later there is no way back to why a file was changed the way it was, and when a weekly review or a status report comes due you are working from memory. A commit log keeps the result; it does not keep what you asked for or what was tried on the way there.
52
+
53
+ Agent Diary captures that context at the moment a session ends. There is no habit to build.
54
+
55
+ One finished session appends an entry like this.
56
+
57
+ ```markdown
58
+ ### ⏰ 14:30:15 | 📁 `my-app`
59
+
60
+ **🏷️ Categories:** `feature` `test`
61
+
62
+ **📋 Task Requests:**
63
+ 1. Add JWT authentication to login
64
+ 2. Write the tests as well
65
+
66
+ **📄 Files Created:**
67
+ - `src/auth/jwt_handler.py`
68
+ - `tests/test_auth.py`
69
+
70
+ **✏️ Files Modified:**
71
+ - `src/api/routes.py`
72
+
73
+ **🔀 Git:**
74
+ - 🌿 Branch: `feat/jwt-auth`
75
+ - Commit: `a1b2c3d` feat: verify tokens and cover login
76
+
77
+ **📊 Code Stats:** +145 / -12 lines (5 files)
78
+
79
+ **⚡ Key Commands:**
80
+ - `export API_KEY=****`
81
+ - `pytest -q`
82
+
83
+ **📝 Work Summary:**
84
+ - Added JWT verification middleware and covered the login failure path
85
+
86
+ **🔒 1 secrets masked**
87
+ ```
88
+
89
+ Categories are inferred from the work. Branch, commits and diff stats are read from the repository. Anything that looks like a secret — the `API_KEY` above — is masked **before** the file is written.
90
+
91
+ ### What makes it different
92
+
93
+ - **It is automatic.** In Claude Code a Stop Hook picks up the end of a session. You never have to decide to record something.
94
+ - **Zero core dependencies.** Standard library only. `requests` is added only if you use the Notion integration.
95
+ - **Local files.** Plain Markdown, so it greps, it opens in Obsidian, and it outlives any service.
96
+ - **It scales to a team.** Push to a Notion work-log database when you need to, or export to Slack, Discord and GitHub.
97
+
98
+ ```bash
99
+ pip install agent-diary
100
+ agent-diary init
101
+ ```
102
+
103
+ Nothing else is required. Every Claude Code session from then on lands in `~/working-diary/YYYY-MM-DD.md`.
104
+
105
+ > This project was `claude-diary`, then `working-diary`, and is now `agent-diary`. If you installed it under an older name, the `working-diary` and `claude-diary` commands still work.
106
+ >
107
+ > The internal Python package is still `claude_diary`. `install` writes `python -m claude_diary.hook` into the user's `settings.json`, so renaming it would stop an existing Stop Hook silently. A distribution name that differs from the import name is ordinary in Python.
108
+
109
+ ### Supported Agents
110
+
111
+ | Agent | Auto diary | Manual Markdown | Notion work log | Apply/refresh |
112
+ |-------|------------|-----------------|-----------------|---------------|
113
+ | Claude Code | Stop Hook | `/diary` | `/diary-notion` | `agent-diary install --force` |
114
+ | Codex | None | `$diary` | `$diary-notion` | `agent-diary install --force --codex-only` |
115
+
116
+ Package installation is shared, but agent setup is different. Use `--codex-only` for Codex-only setup without modifying Claude Code settings. `--codex` remains as a compatibility option that also refreshes the Claude Code hook and slash commands.
117
+
118
+ ### Storage Paths
119
+
120
+ Automatic diaries are appended to daily files.
121
+
122
+ ```text
123
+ ~/working-diary/
124
+ 2026-03-15.md
125
+ 2026-03-16.md
126
+ .session_counts.json
127
+ weekly/
128
+ W11_2026-03-09.md
129
+ ```
130
+
131
+ Manual diaries are stored separately by date and project.
132
+
133
+ ```text
134
+ ~/working-diary/manual/
135
+ 2026-04-29/
136
+ my-project/
137
+ 2026-04-29.md
138
+ ```
139
+
140
+ ## 2. Usage
141
+
142
+ Follow the sequence for the target workflow.
143
+
144
+ | Goal | Command sequence |
145
+ |------|------------------|
146
+ | Claude Code Markdown auto/manual diary | `pip install agent-diary` -> `agent-diary init` -> `agent-diary install --force` |
147
+ | Claude Code with Notion work log | `pip install "agent-diary[notion]"` -> `agent-diary init` -> `agent-diary install --force` -> `agent-diary diary-notion init` -> `agent-diary diary-notion ensure` |
148
+ | Codex Markdown manual diary | `pip install agent-diary` -> `agent-diary init --codex-only` -> `agent-diary install --force --codex-only` -> open a new Codex session |
149
+ | Codex with Notion work log | `pip install "agent-diary[notion]"` -> `agent-diary init --codex-only` -> `agent-diary install --force --codex-only` -> `agent-diary diary-notion init` -> `agent-diary diary-notion ensure` -> open a new Codex session |
150
+
151
+ ### 2-1. Package Install And Basic Setup
152
+
153
+ pip install:
154
+
155
+ ```bash
156
+ pip install agent-diary
157
+ agent-diary init
158
+ ```
159
+
160
+ With Notion support:
161
+
162
+ ```bash
163
+ pip install "agent-diary[notion]"
164
+ agent-diary init
165
+ ```
166
+
167
+ Claude Code plugin installation is a separate distribution path for Claude Code plugin marketplace users.
168
+
169
+ ```bash
170
+ # Run inside Claude Code
171
+ /plugin marketplace add https://github.com/solzip/agent-diary
172
+ /plugin install working-diary
173
+ ```
174
+
175
+ The plugin distributes Claude Code hook settings. The `working-diary` CLI comes from the Python package, so Python package installation and `agent-diary init` are still required.
176
+
177
+ Install from source:
178
+
179
+ ```bash
180
+ git clone https://github.com/solzip/agent-diary.git
181
+ cd working-diary
182
+ pip install -e .
183
+ agent-diary init
184
+ ```
185
+
186
+ Install from source with Notion support:
187
+
188
+ ```bash
189
+ pip install -e ".[notion]"
190
+ ```
191
+
192
+ `agent-diary init` creates the config file and diary directory, and it also registers the Claude Code Stop Hook. If you only use Codex, run `agent-diary init --codex-only` to avoid modifying Claude Code settings.
193
+
194
+ Run the agent-specific apply command below to refresh Claude Code slash commands or Codex skills.
195
+
196
+ ### 2-2. Claude Code Usage
197
+
198
+ Claude Code supports automatic diaries when sessions end and manual diaries during a session.
199
+
200
+ Apply or refresh Claude Code setup:
201
+
202
+ ```bash
203
+ agent-diary install --force
204
+ ```
205
+
206
+ Automatic diary flow:
207
+
208
+ ```text
209
+ Claude Code session ends
210
+ -> Stop Hook runs
211
+ -> transcript is parsed
212
+ -> ~/working-diary/YYYY-MM-DD.md
213
+ ```
214
+
215
+ Manual Markdown diary:
216
+
217
+ ```text
218
+ /diary
219
+ ```
220
+
221
+ Notion work log:
222
+
223
+ ```text
224
+ /diary-notion
225
+ ```
226
+
227
+ `/diary` finds the Claude Code transcript for the current project and records it through the `agent-diary write` core. `/diary-notion` creates task-row JSON from the session and passes it to `agent-diary diary-notion push`.
228
+
229
+ ### 2-3. Codex Usage
230
+
231
+ Codex does not use an automatic hook. It records only when the user invokes a skill.
232
+
233
+ Apply or refresh Codex setup:
234
+
235
+ ```bash
236
+ agent-diary install --force --codex-only
237
+ ```
238
+
239
+ `--codex-only` installs only the Codex skills under `~/.codex/skills` and does not modify Claude Code hooks or slash commands. `--codex` remains as a compatibility option that also refreshes the Claude Code setup.
240
+
241
+ Manual Markdown diary:
242
+
243
+ ```text
244
+ $diary
245
+ ```
246
+
247
+ Notion work log:
248
+
249
+ ```text
250
+ $diary-notion
251
+ ```
252
+
253
+ `$diary` and `$diary-notion` create JSON from the current Codex conversation and tool activity, then call the same core CLI. Already-running Codex sessions keep the skills loaded at startup. Refreshed skills are applied in a new Codex session.
254
+
255
+ ### 2-4. First Notion Setup
256
+
257
+ Notion work logs require the optional `requests` dependency.
258
+
259
+ ```bash
260
+ pip install "agent-diary[notion]"
261
+ ```
262
+
263
+ For source installs:
264
+
265
+ ```bash
266
+ pip install -e ".[notion]"
267
+ ```
268
+
269
+ Setup steps:
270
+
271
+ 1. Create a Notion integration at https://www.notion.so/my-integrations and copy the token.
272
+ 2. Create a Notion root page, for example `Agent Diary`.
273
+ 3. Share the root page with the integration.
274
+ 4. Save the configuration.
275
+
276
+ ```bash
277
+ agent-diary diary-notion init
278
+ ```
279
+
280
+ `diary-notion init` stores the Notion token and root page ID you enter in local config. If you later set `CLAUDE_DIARY_NOTION_TOKEN` or `CLAUDE_DIARY_NOTION_ROOT_PAGE_ID`, those environment variables override the saved config values.
281
+
282
+ 5. Ensure the yearly `Entries` database, schema, and views.
283
+
284
+ ```bash
285
+ agent-diary diary-notion ensure
286
+ ```
287
+
288
+ 6. Run `/diary-notion` or `$diary-notion` from an agent session.
289
+
290
+ ### 2-5. Notion Push Behavior
291
+
292
+ ```bash
293
+ agent-diary diary-notion push --input .diary-notion-<id>.json
294
+ agent-diary diary-notion push --input .diary-notion-<id>.json --force
295
+ agent-diary diary-notion push --input .diary-notion-<id>.json --dry-run
296
+ ```
297
+
298
+ - Default push skips rows already recorded with the same `Session ID + Task Index`.
299
+ - `--force` archives prior rows for the session and pushes again.
300
+ - `--dry-run` prints the rows and page bodies that would be created without writing to Notion. Add `--preview-file <path>` to save the same rendering as Markdown.
301
+ - If a `Task Group` already has recorded sessions, the title gets an `(N차)` ordinal. The first session of a group is left alone.
302
+ - If any task fails, the command exits with code `1` and preserves the input JSON.
303
+ - Fully successful pushes and already-skipped pushes exit with code `0`.
304
+
305
+ ### 2-6. What A Push Leaves On Disk (Run Artifacts)
306
+
307
+ Every push writes a record of the run under the current working directory, **by default**. `--dry-run` writes it too.
308
+
309
+ ```text
310
+ <cwd>/.codefleet/runs/<YYYYMMDD-HHMMSS-session>/
311
+ input.json the original task JSON
312
+ git-diff.patch the working tree diff at push time
313
+ preview.md the rendered Notion body
314
+ manifest.json the files above with sha256, plus a push result summary
315
+ ```
316
+
317
+ Notion is the destination, not the record. If a push half-fails, or a row is later edited by hand, this local copy is the only way back to what was actually submitted.
318
+
319
+ **`git-diff.patch` contains your uncommitted code.** Keep it out of your repository:
320
+
321
+ ```gitignore
322
+ .codefleet/runs/
323
+ ```
324
+
325
+ To relocate or disable it:
326
+
327
+ ```bash
328
+ agent-diary diary-notion push --input <json> --artifact-dir build/diary-runs
329
+ agent-diary diary-notion push --input <json> --no-artifacts
330
+ ```
331
+
332
+ ### 2-7. Review Queue
333
+
334
+ Review is a judgement a person makes after the fact, so no stage of the recording pipeline declares work reviewed on its own. Push files every new row as `Needs Review`, and only this command's `--apply` promotes a row to `Reviewed`.
335
+
336
+ ```bash
337
+ agent-diary diary-notion review # list rows awaiting review (read-only)
338
+ agent-diary diary-notion review --apply # set Reviewed + Last Reviewed=today
339
+ agent-diary diary-notion review --year 2026
340
+ ```
341
+
342
+ Without `--apply` nothing is written, matching the `ensure --dry-run` / `ensure` pattern.
343
+
344
+ ### 2-8. Notion Sub-Items
345
+
346
+ Expandable task hierarchy uses Notion native Sub-items. Enable it once in the Notion UI.
347
+
348
+ 1. Open the yearly `Entries` database.
349
+ 2. Open the top-right `...` menu and enable `Sub-items`.
350
+ 3. Run `agent-diary diary-notion ensure` again.
351
+
352
+ Rows are still recorded if Sub-items are not enabled. Only visual nesting is missing, and push prints a hint.
353
+
354
+ ## 3. Logic
355
+
356
+ ### 3-1. Core Logic
357
+
358
+ The core handles actual recording independently of the agent.
359
+
360
+ ```text
361
+ input
362
+ -> transcript or agent-authored JSON
363
+ -> cwd, session_id, task metadata
364
+
365
+ core processing
366
+ -> parser
367
+ -> Git enrichment
368
+ -> category inference
369
+ -> secret scan
370
+ -> formatter
371
+ -> writer or Notion exporter
372
+ -> audit/index/export retry
373
+ ```
374
+
375
+ Key modules:
376
+
377
+ | Area | File | Role |
378
+ |------|------|------|
379
+ | CLI entry | `src/claude_diary/cli/__init__.py` | Routes the `agent-diary` command and its `working-diary` / `claude-diary` aliases |
380
+ | Automatic diary core | `src/claude_diary/core.py` | Claude Code Stop Hook diary pipeline |
381
+ | Manual diary core | `src/claude_diary/cli/write.py` | Handles `/diary`, `$diary`, and `agent-diary write` |
382
+ | Notion push | `src/claude_diary/cli/notion_push/` | Pushes task JSON as Notion rows (split into validate/properties/relations/artifacts) |
383
+ | Notion schema/view | `src/claude_diary/cli/notion_ensure.py` | Ensures schema v8, 5 core views and 5 operating views |
384
+ | Notion review queue | `src/claude_diary/cli/notion_review.py` | Lists `Needs Review` rows; `--apply` records `Reviewed` |
385
+ | Formatter | `src/claude_diary/formatter.py` | Creates Markdown entries and Notion page bodies |
386
+
387
+ ### 3-2. Claude Code Logic
388
+
389
+ Automatic diary:
390
+
391
+ ```text
392
+ Claude Code Stop Hook
393
+ -> src/claude_diary/hook.py
394
+ -> core.process_session(session_id, transcript_path, cwd)
395
+ -> ~/working-diary/YYYY-MM-DD.md
396
+ ```
397
+
398
+ Manual diary:
399
+
400
+ ```text
401
+ /diary
402
+ -> agent-diary write
403
+ -> find Claude transcript for the current cwd
404
+ -> append to manual diary path
405
+
406
+ /diary-notion
407
+ -> agent creates task JSON
408
+ -> agent-diary diary-notion push --input <json>
409
+ -> push rows to Notion Entries DB
410
+ ```
411
+
412
+ `agent-diary install --force` refreshes:
413
+
414
+ - `~/.claude/settings.json` Stop Hook
415
+ - `~/.claude/commands/diary.md`
416
+ - `~/.claude/commands/diary-notion.md`
417
+
418
+ ### 3-3. Codex Logic
419
+
420
+ Codex has no Stop Hook. Global skills call the core CLI.
421
+
422
+ ```text
423
+ $diary
424
+ -> Codex writes current session content to .diary-<id>.json
425
+ -> agent-diary write --input .diary-<id>.json
426
+ -> append to manual diary path
427
+
428
+ $diary-notion
429
+ -> Codex splits the session into tasks
430
+ -> writes .diary-notion-<id>.json
431
+ -> agent-diary diary-notion push --input .diary-notion-<id>.json
432
+ -> push rows to Notion Entries DB
433
+ ```
434
+
435
+ `agent-diary install --force --codex-only` refreshes:
436
+
437
+ - `~/.codex/skills/diary/SKILL.md`
438
+ - `~/.codex/skills/diary-notion/SKILL.md`
439
+
440
+ ## 4. CLI
441
+
442
+ Core commands:
443
+
444
+ ```bash
445
+ agent-diary init
446
+ agent-diary init --codex-only
447
+ agent-diary install --force
448
+ agent-diary install --force --codex
449
+ agent-diary install --force --codex-only
450
+ agent-diary uninstall
451
+ agent-diary uninstall --codex
452
+ agent-diary uninstall --codex-only
453
+
454
+ agent-diary write
455
+ agent-diary write --input .diary-<id>.json
456
+
457
+ agent-diary diary-notion init
458
+ agent-diary diary-notion ensure
459
+ agent-diary diary-notion ensure --dry-run
460
+ agent-diary diary-notion ensure --year 2026
461
+
462
+ agent-diary diary-notion push --input .diary-notion-<id>.json
463
+ agent-diary diary-notion push --input .diary-notion-<id>.json --force
464
+ agent-diary diary-notion push --input .diary-notion-<id>.json --dry-run
465
+ agent-diary diary-notion push --input .diary-notion-<id>.json --preview-file preview.md
466
+ agent-diary diary-notion push --input .diary-notion-<id>.json --artifact-dir build/diary-runs
467
+ agent-diary diary-notion push --input .diary-notion-<id>.json --no-artifacts
468
+
469
+ agent-diary diary-notion ops
470
+ agent-diary diary-notion ops --stale-days 14
471
+ agent-diary diary-notion ops --json
472
+
473
+ agent-diary diary-notion review
474
+ agent-diary diary-notion review --apply
475
+
476
+ agent-diary notion push --input .diary-notion-<id>.json
477
+ ```
478
+
479
+ Search and maintenance commands:
480
+
481
+ ```bash
482
+ agent-diary search "keyword"
483
+ agent-diary filter --project my-app
484
+ agent-diary trace src/main.py
485
+ agent-diary stats
486
+ agent-diary weekly
487
+ agent-diary audit
488
+ agent-diary audit --verify
489
+ agent-diary config
490
+ agent-diary config --set lang=en
491
+ agent-diary migrate
492
+ agent-diary reindex
493
+ agent-diary delete --last
494
+ ```
495
+
496
+ Extension commands:
497
+
498
+ ```bash
499
+ agent-diary config --add-exporter slack
500
+ agent-diary config --add-exporter discord
501
+ agent-diary config --add-exporter obsidian
502
+ agent-diary config --add-exporter github
503
+ agent-diary dashboard
504
+ agent-diary dashboard --serve --port 8787
505
+ agent-diary team stats
506
+ agent-diary team weekly
507
+ agent-diary team monthly --month 2026-06
508
+ agent-diary team init --repo <url> --name <name>
509
+ agent-diary team add-member --name <name> --role member
510
+ ```
511
+
512
+ The legacy CLI remains supported.
513
+
514
+ ```bash
515
+ agent-diary write
516
+ agent-diary diary-notion ensure
517
+ ```
518
+
519
+ ## 5. Configuration
520
+
521
+ The config file is stored at the OS-specific user config path under `claude-diary/config.json`. If you configure exporters such as Notion, Slack, or Discord, API tokens, webhook URLs, and root page IDs are stored in this local config. CLI output masks long token and webhook values.
522
+
523
+ | Environment variable | Description | Default |
524
+ |----------------------|-------------|---------|
525
+ | `CLAUDE_DIARY_LANG` | Diary language, `ko` or `en` | `ko` |
526
+ | `CLAUDE_DIARY_DIR` | Automatic diary path | `~/working-diary` |
527
+ | `CLAUDE_DIARY_MANUAL_DIR` | Manual diary path | `~/working-diary/manual` |
528
+ | `CLAUDE_DIARY_TZ_OFFSET` | UTC offset | `9` |
529
+ | `CLAUDE_DIARY_NOTION_TOKEN` | Notion token, overrides config | - |
530
+ | `CLAUDE_DIARY_NOTION_ROOT_PAGE_ID` | Notion root page ID, overrides config | - |
531
+ | `CLAUDE_DIARY_SKIP` | `1`, `true`, or `yes` skips Claude Code Stop Hook auto diary | - |
532
+
533
+ If PowerShell output shows broken Korean or emoji characters, switch the current session output encoding to UTF-8.
534
+
535
+ ```powershell
536
+ [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
537
+ $OutputEncoding = [System.Text.UTF8Encoding]::new()
538
+ ```
539
+
540
+ ## 6. Features
541
+
542
+ - Automatic category inference
543
+ - Git branch, commit, and diff stat recording
544
+ - Secret scanning and masking
545
+ - Search index
546
+ - Notion work log: `agent-diary diary-notion init` -> `agent-diary diary-notion ensure`
547
+ - Notion operations report: `agent-diary diary-notion ops` for blocked/review/next action/stale/work days/today-plan candidates/parent status signals
548
+ - Review queue: `agent-diary diary-notion review`. Push always files as `Needs Review`; only `--apply` promotes a row to `Reviewed`
549
+ - Run artifacts: every push preserves `input.json`, `git-diff.patch`, `preview.md` and `manifest.json` locally, each sha256-stamped
550
+ - Automatic `(N차)` ordinals for sessions continuing the same `Task Group`, with no extra column
551
+ - A day's rows read in the order the work was done (`Date` ties broken by `Task Index`)
552
+ - Slack, Discord, Obsidian, GitHub exporters: `agent-diary config --add-exporter <name>`
553
+ - HTML dashboard: `agent-diary dashboard` or `agent-diary dashboard --serve --port 8787`
554
+ - Audit log and source checksum verification
555
+ - Team mode: `agent-diary team init --repo <url> --name <name>`
556
+
557
+ ## 7. Troubleshooting
558
+
559
+ | Symptom | Check |
560
+ |---------|-------|
561
+ | `/diary` or `/diary-notion` does not use the latest instructions | Run `agent-diary install --force` to refresh the hook and slash commands |
562
+ | `$diary` or `$diary-notion` does not use the latest instructions | Run `agent-diary install --force --codex-only`, then open a new Codex session |
563
+ | Notion push reports an auth error | Check the integration token, root page ID, and page sharing |
564
+ | Notion task hierarchy is not nested | Enable Sub-items once in the Notion `Entries` database UI |
565
+ | Re-push might duplicate rows | Default push skips the same `Session ID + Task Index`; use `--force` to rewrite |
566
+ | A `.codefleet/` directory appeared in my project | That is the push run record. Add `.codefleet/runs/` to `.gitignore`, or disable it with `--no-artifacts` (see [2-6](#2-6-what-a-push-leaves-on-disk-run-artifacts)) |
567
+ | I want to drop the `(N차)` suffix from titles | It counts prior sessions of the same `Task Group`. Leave `task_group` empty and no suffix is added |
568
+ | PowerShell text is garbled | Apply the UTF-8 output setting above |
569
+
570
+ ## 8. Development
571
+
572
+ ```bash
573
+ pip install -e ".[dev,notion]"
574
+ python -m pytest -q
575
+ python -m ruff check .
576
+ ```
577
+
578
+ ## 9. Roadmap
579
+
580
+ This README focuses on currently usable functionality. Detailed design and planning artifacts live under `docs/`.
581
+
582
+ | Area | Status |
583
+ |------|--------|
584
+ | Available | Claude Code Stop Hook, Codex skills, Markdown diaries, Notion task row push, schema v8 / view ensure, `ops` operations report, `review` queue, push run artifacts |
585
+ | In progress | Notion schema reduction ([#12](https://github.com/solzip/agent-diary/issues/12)), dry-run ordinals ([#10](https://github.com/solzip/agent-diary/issues/10)), `Schema Version` string fix ([#11](https://github.com/solzip/agent-diary/issues/11)) |
586
+ | Next | Windows install/output experience, Notion sub-item guidance |
587
+ | Under review | SQLite search index, Cursor/Windsurf/VS Code integration |
588
+
589
+ ## 10. Documentation
590
+
591
+ - [Notion hierarchical design](docs/02-design/features/diary-notion-hierarchical.design.md)
592
+ - [Notion views design](docs/02-design/features/diary-notion-views.design.md)
593
+ - [Distribution plan](docs/plans/phase-d-distribution.md)
594
+ - [Contributing](CONTRIBUTING.md)
595
+ - [Security](SECURITY.md)
596
+
597
+ ## 11. License
598
+
599
+ MIT
@@ -0,0 +1,59 @@
1
+ agent_diary-4.3.0.dist-info/licenses/LICENSE,sha256=xclxQM7YFwH9jPGp9lLk6JWElmvDh4wnhNHo9g2BUPc,1063
2
+ claude_diary/__init__.py,sha256=8rKyPUqNvK2p-G1BK45tRgWoM3kkG3zgUgNRqvYUf3w,113
3
+ claude_diary/__main__.py,sha256=YyHpMHoZBIRT_nigGTHG3znkkpEYabKEYb20KQhyWso,120
4
+ claude_diary/config.py,sha256=1-KgU1b0r_IpH589q3P9qEnJjFclzJ5lp3787Yb97-E,3314
5
+ claude_diary/core.py,sha256=MEdSPT70ovU6asgWbP96b8I2Qn13_TiHkeEBE6OMbsg,8583
6
+ claude_diary/dashboard.py,sha256=gHHsUk9GL-GpCCxv5aUV7zmRrYecnf0ytlnDex8aeeY,11773
7
+ claude_diary/formatter.py,sha256=A4dEW3XcQ-epuqEGFHZ95sNF2dYzgwGtolo6a211ev0,23371
8
+ claude_diary/hook.py,sha256=jZ8nDaMHRJXPNBUnZhYqMAVy8f2oUHbo0ywRSPzi0RQ,2333
9
+ claude_diary/i18n.py,sha256=0E5V7EyV18gQJ_q57etP_x57KLpHNgNwJW7wLpecGzI,8015
10
+ claude_diary/indexer.py,sha256=IE-aWDwODvJvqeEuze2GETqxNa1cvJqh2AWQFaH1NgI,4518
11
+ claude_diary/log.py,sha256=6iCclI2kZFp22sXrnd4DnOpg_SjGeThDeF9WXXnWWVQ,1316
12
+ claude_diary/team.py,sha256=JR_Pixv3O9oeSJ_nhgpnY4FXXwPSTh5jIyqj5Ls-HFM,11582
13
+ claude_diary/types.py,sha256=T-J3EHnVDvutbTpuMfy7fp-j4CZB6_WqFV6K-JwQrOU,1821
14
+ claude_diary/writer.py,sha256=eCfcj_FF0oxDGIKAJAEnSAk9qXSRgHAh7hr5JWLXWCc,1438
15
+ claude_diary/cli/__init__.py,sha256=5Fntr9HAybAxQ5eTMrevQI3RghvJEHKw5zuR4PAi4As,10341
16
+ claude_diary/cli/config.py,sha256=Oq0mrJrVhVhBEe80-sy_mqGnDon_PkSPVdJFbdH2Tlw,6920
17
+ claude_diary/cli/maintenance.py,sha256=A1lFBDu-dIMZct03Ixx0M0MjjpYYJF__ZLUPvbssTsk,4898
18
+ claude_diary/cli/notion_common.py,sha256=YOopM78u9iwMSVqDXCLzU7uV2I90jAVv-2EByyh8BlI,926
19
+ claude_diary/cli/notion_ensure.py,sha256=qhU0Yx84ttabWNG29wvdOvWwKMuwbzpNiYpto-83sLA,7734
20
+ claude_diary/cli/notion_init.py,sha256=VY2F2r2CX36JA7bWk-1rzRmpz4039aUwfJzuxV7eqOU,4748
21
+ claude_diary/cli/notion_ops.py,sha256=wYgP5n3d9F-y0uvi9EPOO4nawd0v6F7DzI-4ajXCyRo,18977
22
+ claude_diary/cli/notion_review.py,sha256=OlTcY68jhDHVf05GwjFt0tnP9pKogWi1ulpjv9cMdUw,5247
23
+ claude_diary/cli/search.py,sha256=5lCOVno8K0Gh2mBe5tESIaThaYHYg5yB0q7d01SudVk,5201
24
+ claude_diary/cli/setup.py,sha256=ebF9ZYzFhn3nnRgnIZTaQMrqL42EBNHaEbzlC86vBR8,35863
25
+ claude_diary/cli/stats.py,sha256=TRPh3vQkV2XY1jeSLvSunISZ7xgeNVULBolPyZREBM8,7218
26
+ claude_diary/cli/team.py,sha256=MH20DprUDOA3J1uUBFts-Z3CenLdJyvKWH09N378TtI,2355
27
+ claude_diary/cli/write.py,sha256=mXaDbycII0XpVE0b1JRvZ2cUQ_FasZ8n2L-fUhhYt18,11556
28
+ claude_diary/cli/notion_push/__init__.py,sha256=nnHkTWNNYD_LzmGW44vI5BLVnlkdCzIJWh4h9moq9ps,14245
29
+ claude_diary/cli/notion_push/artifacts.py,sha256=zWgZytKtXcQqJSoNG_7gzGlKGnASQdvVGFr5mp-rbY8,5069
30
+ claude_diary/cli/notion_push/ordinals.py,sha256=uJdHVmdWQPti2sQizJ-JcL2tQHpPa2udEiXpScTotlk,2699
31
+ claude_diary/cli/notion_push/preview.py,sha256=he5YTYL3glXgB9LL_ZWU5o4ACjHo-VRUWO7mOKk7d9E,2277
32
+ claude_diary/cli/notion_push/properties.py,sha256=jrz5ocXglp2sacftxxd1QkEIX5ujh3WZcyRBRHWBt3Q,7740
33
+ claude_diary/cli/notion_push/relations.py,sha256=zCPARj2vqdULnyjbD-kDTqyN-sDuuhrTE-017eVJfUU,4711
34
+ claude_diary/cli/notion_push/tasks.py,sha256=RPxrl1ScAAai_rjAh33LQ1y_2bKr-6S5R-8_5oHrJzM,2280
35
+ claude_diary/cli/notion_push/validate.py,sha256=YN8g_cpfaDyfe0xaB8x1-94EIXzRX0HM1kHrUXmdB2o,4122
36
+ claude_diary/exporters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ claude_diary/exporters/base.py,sha256=xH5xEQH5TNnpvgT-KuhISob3_822SWgaAdYssPkUPXg,848
38
+ claude_diary/exporters/discord.py,sha256=mRLdxMm8k6EIdrcW_RUBRlnjgfvoVur_RvMchQVDy_4,2391
39
+ claude_diary/exporters/github.py,sha256=pAmYsIu0yJGBRnVdrgetGom1CMWnwG2osedyM8DyBcg,3497
40
+ claude_diary/exporters/loader.py,sha256=h2r0ou4OBeq1bo2S0z3RmdykD9Hb7B5dipWEj0imWd8,4670
41
+ claude_diary/exporters/notion.py,sha256=d5Qry4pigCLBf5x7KU_uQwn82C6eNUGYv7BBwogYv44,2941
42
+ claude_diary/exporters/notion_hierarchical.py,sha256=anNl9fXhC-qfAinxK1iNMPu-Bu6NRPcMTOrenKpL4PU,25453
43
+ claude_diary/exporters/notion_views.py,sha256=gRxYk_4bOTQkd7g-UrKk-QCx1KTR5XF4X1j5Yp3Y6Rg,35403
44
+ claude_diary/exporters/obsidian.py,sha256=n_PIXo7UgkK86vMgL5AYH-ages2T9SK91qvnh9nUZNk,2654
45
+ claude_diary/exporters/slack.py,sha256=GTPXnZDJCojH983heXw4dsckNYWmoc5NZ02euUarQTg,2052
46
+ claude_diary/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
+ claude_diary/lib/audit.py,sha256=sBAo9tazhV6TxPd9n8jIyp_-618tuFl2Afk_Yj7Dwsw,4084
48
+ claude_diary/lib/categorizer.py,sha256=CbKa4e8We5UXC_S839qnn7HXODWOECToBxWkwZB2wTg,2573
49
+ claude_diary/lib/git_info.py,sha256=zOUo34lRX_6w07EI6AZsCqKpwUXDQ7oniITLO-J2Fmg,6865
50
+ claude_diary/lib/notion_cache.py,sha256=2ub3no2o5bmy_uSiRU1vW3YdGWGHaiIoI4rXDLa_WLg,3379
51
+ claude_diary/lib/parser.py,sha256=5p4Obf9OCZGDobayo5FtYKRR7o52sXA7vGPWblcudb8,7317
52
+ claude_diary/lib/secret_scanner.py,sha256=drnd5yAO8EU96HAZ_BzcwmSjKme4Pu13Ko4p2iKb0Ik,2653
53
+ claude_diary/lib/stats.py,sha256=EGOTKnzGPgbtA2YLlcTueqeSvV5V24fsklMh5zDO9X0,2373
54
+ claude_diary/lib/team_security.py,sha256=KRodld-pv-MKKWWMD54qzPt65iP6LOPKsqHjxYIkzgk,6469
55
+ agent_diary-4.3.0.dist-info/METADATA,sha256=1_hDRAn3uVDW7f7pqz-Y1-RQ_fR0KV0M2rPgiH5RVMs,21620
56
+ agent_diary-4.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
57
+ agent_diary-4.3.0.dist-info/entry_points.txt,sha256=MuNKe2va2zO8fxedKB7mjOqhIqJhc7zxNzElNoxonl4,129
58
+ agent_diary-4.3.0.dist-info/top_level.txt,sha256=FsxP7c_maEh590-3vFr0mUPUpRaL-_1jV2y6Vj6IUa0,13
59
+ agent_diary-4.3.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ agent-diary = claude_diary.cli:main
3
+ claude-diary = claude_diary.cli:main
4
+ working-diary = claude_diary.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 solzip
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.