devdaily-ai 0.5.0 → 0.6.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,203 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.6.1] - 2026-02-15
9
+
10
+ ### Fixed
11
+
12
+ - **Slack webhook formatting** — Standup messages sent to Slack via `--send` / `--slack` now correctly render bold, italic, and other formatting. Previously, raw Markdown syntax (e.g. `**bold**`) was sent directly into Slack's `mrkdwn` blocks, which don't support double-asterisk bold. The notification pipeline now converts Markdown → Slack mrkdwn format using the existing `formatOutput()` formatter before sending, so `**text**` becomes `*text*`, `*italic*` becomes `_italic_`, headers become bold lines, and links use Slack's `<url|text>` syntax.
13
+
14
+ ## [0.5.0] - 2025-07-13
15
+
16
+ ### Added
17
+
18
+ - **Persistent Work Journal** — Local work memory stored in `~/.config/devdaily/journal/` that tracks your work across sessions, days, and projects.
19
+ - `src/core/work-journal.ts` — Full storage layer with index, search, merge, cross-project aggregation, pruning, and stats.
20
+ - `src/core/snapshot-builder.ts` — Captures rich repo state (branches, commits, PRs, tickets, diffs, categories) into `WorkSnapshot` objects.
21
+
22
+ - **`devdaily snapshot`** (`snap`, `save`) — Manually capture a work snapshot with notes and tags.
23
+ - `--light` mode for fast captures (no PRs/tickets).
24
+ - `--list [days]` to browse recent snapshots.
25
+ - `--stats` to see journal storage usage.
26
+ - `--prune <days>` to clean up old entries.
27
+
28
+ - **`devdaily context`** (`ctx`, `resume`) — Recover what you were working on after a context switch.
29
+ - Date range filtering (`--from`, `--to`, `--date`, `--days`).
30
+ - `--all-projects` for cross-project context.
31
+ - `--ai` for AI-powered "where did I leave off?" summaries.
32
+ - `--branches` for detailed active branch status.
33
+
34
+ - **`devdaily recall`** (`search`, `find`) — Search your work history by keyword, file, tag, or date range.
35
+ - Fuzzy matching across commit messages, branch names, notes, and tags.
36
+ - `--file <path>` to find when a specific file was changed.
37
+ - `--ai` for AI-powered search result summaries.
38
+ - `--json` output for scripting.
39
+
40
+ - **Automatic Side-Effect Snapshots** — Zero-friction snapshot capture.
41
+ - `src/core/auto-snapshot.ts` — Silent, non-blocking snapshot module.
42
+ - `sideEffectSnapshot()` runs at the end of `standup`, `pr`, and `week` commands.
43
+ - `fireAndForgetSnapshot()` for fully async background captures.
44
+ - Tagged with source (`auto:standup`, `auto:pr`, `auto:week`, etc.).
45
+ - Respects `journal.autoSnapshot` config flag.
46
+ - `--no-journal` flag on `standup` and `pr`, `--no-auto-snapshot` on `week` to skip.
47
+
48
+ - **Git Hooks for Auto-Capture** — Opt-in `post-commit` and `post-checkout` hooks.
49
+ - `devdaily init --git-hooks` — Interactive hook installer.
50
+ - `devdaily init --remove-hooks` — Clean removal of devdaily hooks.
51
+ - POSIX-compatible (`#!/bin/sh`), background-executed, safe with existing hooks.
52
+ - Appends to existing hooks rather than overwriting.
53
+ - `generatePostCommitHook()` and `generatePostCheckoutHook()` in `auto-snapshot.ts`.
54
+
55
+ - **`journal` Config Section** — New configuration block for snapshot automation.
56
+ - `autoSnapshot` (default: `true`) — Enable/disable side-effect snapshots globally.
57
+ - `gitHooks` (default: `false`) — Track whether git hooks are installed.
58
+ - `hooks.postCommit` / `hooks.postCheckout` — Per-hook enable/disable.
59
+ - `quiet` (default: `true`) — Suppress snapshot side-effect messages.
60
+
61
+ - **Enhanced `devdaily week`** — Major improvements to weekly summaries.
62
+ - `--from` / `--to` for custom date ranges.
63
+ - `--weeks-ago <n>` for relative week selection.
64
+ - `--all-projects` for cross-project summaries from journal data.
65
+ - `--save` to persist the AI summary to the journal.
66
+ - `--json` for machine-readable stats output.
67
+ - Journal enrichment — weekly summaries incorporate snapshot history.
68
+
69
+ - **Comprehensive Test Suite** — 654 tests across 12 test files.
70
+ - `tests/auto-snapshot.test.ts` — 74 tests covering side-effect snapshots, hook generation, hook install/remove, config integration, edge cases, and round-trip cycles.
71
+ - `tests/work-journal.test.ts` — 123 tests covering persistent storage, search, cross-project aggregation, merge logic, pruning, and stats.
72
+
73
+ - **Production-Grade README** — Complete rewrite with full command reference, config documentation, architecture overview, testing guide, FAQ, and troubleshooting.
74
+
75
+ ### Changed
76
+
77
+ - **`devdaily init`** — Added `📸 Git hooks for automatic snapshots` as an interactive setup option, `--git-hooks` and `--remove-hooks` flags, and `dd context` in quick-start hints.
78
+ - **`devdaily standup`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-journal`).
79
+ - **`devdaily pr`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-journal`).
80
+ - **`devdaily week`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-auto-snapshot`).
81
+ - **Config schema** — Added `JournalSchema` with `autoSnapshot`, `gitHooks`, `hooks`, `autoPromptDays`, and `quiet` fields. Exported `Journal` type.
82
+ - **README** — Rewritten from scratch to production-grade standard. Updated project structure, feature table, command reference, config examples, roadmap (marked completed items), and added sections for auto-snapshots, privacy, and testing.
83
+
84
+ ### Technical
85
+
86
+ - New modules: `src/core/auto-snapshot.ts`, `src/core/snapshot-builder.ts`, `src/core/work-journal.ts`.
87
+ - New commands: `src/commands/snapshot.ts`, `src/commands/context.ts`, `src/commands/recall.ts`.
88
+ - New test file: `tests/auto-snapshot.test.ts` (74 tests).
89
+ - Total test count: 580 → 654 (12 test files).
90
+ - Build output: 348 KB (ESM), clean TypeScript compilation with zero errors.
91
+
92
+ ## [0.4.1] - 2026-02-14
93
+
94
+ ### Fixed
95
+
96
+ - **Jira ADF Description Crash** — `ticket.description.trim is not a function` when using Jira Cloud API v3. Jira returns `description` as an Atlassian Document Format (ADF) object, not a plain string. Added `extractAdfText()` recursive parser to convert ADF trees to plain text.
97
+ - **Defensive Description Handling** — Added `typeof` guards before calling string methods on `ticket.description` in `formatForPrompt()`, `formatTicketForContext()`, and `formatTicketContext()` to prevent crashes from any non-string description values.
98
+ - **Silent PM Fetch Failures** — `fetchTickets()` had a bare `catch {}` that returned `[]` on any error, making PM integration failures invisible. Now logs diagnostic info when `--debug` flag is active.
99
+
100
+ ### Added
101
+
102
+ - **PM Integration Test Suite** — End-to-end test scripts for GitHub Issues and Linear integrations:
103
+ - `scripts/setup-test-repo.sh` — Creates a disposable GitHub repo with issues, source files, and initial commit
104
+ - `scripts/setup-test-commits.sh` — Creates branches, commits, and PRs referencing both GitHub and Linear ticket IDs
105
+ - `scripts/create-linear-issues.py` — Creates matching Linear issues via GraphQL API
106
+ - **PM Integration Test Report** — Comprehensive test report at `docs/reports/PM_INTEGRATION_TEST_REPORT.md` documenting test matrix, results, bugs found, and fixes applied across GitHub Issues, Linear, and Jira
107
+ - **Debug Logging for Ticket Fetching** — `--debug` flag now surfaces `[fetchTickets]` messages showing PM client configuration status, fetch progress, and errors
108
+ - **`debug` option in `StandupContextOptions`** — Passed through from both `standup` and `week` commands to enable ticket fetch diagnostics
109
+
110
+ ### Changed
111
+
112
+ - Updated `docs/TESTING.md` with PM integration testing section, setup instructions, verification checklist, and troubleshooting guide
113
+
114
+ ## [0.3.0] - 2026-02-14
115
+
116
+ ### Added
117
+
118
+ - **Context Analyzer** - Smart work context extraction from git activity
119
+ - Branch → Ticket correlation (JIRA-123, #123, LINEAR-123 patterns)
120
+ - Work categorization (frontend, backend, infra, docs, tests, config)
121
+ - Time-based work session tracking
122
+ - **Enhanced Standup Context** - `--context` flag shows detailed work analysis
123
+ - **JSON Schema for IDE** - Autocomplete support in `.devdaily.json` config files
124
+ - **PR Config Defaults** - Set default reviewers, assignees, and labels in config
125
+ - **Standup Scheduling** - Configure standup schedule and grouping options
126
+
127
+ ### Changed
128
+
129
+ - Config now includes `$schema` reference for IDE autocomplete
130
+ - Standup generation uses work categories and ticket context for better AI summaries
131
+ - Expanded PR and standup config options (defaultReviewers, defaultLabels, groupBy, etc.)
132
+
133
+ ### Technical
134
+
135
+ - New `src/core/context-analyzer.ts` for rich context extraction
136
+ - Added `schemas/devdaily.schema.json` for config validation
137
+ - Updated config schema with more standup/PR options
138
+
139
+ ## [0.2.0] - 2026-02-13
140
+
141
+ ### Added
142
+
143
+ - **PR Template Support** - Auto-detect and parse `.github/PULL_REQUEST_TEMPLATE.md`
144
+ - **AI Template Filling** - Copilot fills template sections based on commit analysis
145
+ - **PR Preview** - Terminal markdown rendering with `--preview` flag
146
+ - **Interactive PR Mode** - Select labels, reviewers, assignees with `--interactive`
147
+ - **Slack Notifications** - Send standups to Slack via webhooks with `--slack`
148
+ - **Discord Notifications** - Send standups to Discord via webhooks with `--discord`
149
+ - **Config Management** - New `devdaily config` command for managing settings
150
+ - **Init Wizard** - Interactive setup with `devdaily init` command
151
+ - **Notifications Setup** - `devdaily init --notifications` for webhook configuration
152
+ - **Doctor Command** - `devdaily doctor` to diagnose and fix setup issues
153
+ - **Dashboard Command** - `devdaily dash` for quick status overview (stub)
154
+ - **Project Management Integration** - Jira, Linear, Notion support (stub)
155
+ - **Secrets Management** - Secure storage for API keys and webhooks
156
+ - **Custom UI System** - Enhanced terminal UI with colors, ASCII art, and help rendering
157
+
158
+ ### Changed
159
+
160
+ - Upgraded to new GitHub Copilot CLI (`copilot -p --silent`)
161
+ - Improved PR description generation with template awareness
162
+ - Better error handling and user feedback
163
+ - Enhanced standup formatting for notification channels
164
+
165
+ ### Fixed
166
+
167
+ - TypeScript strict mode compliance
168
+ - Unused variable warnings in doctor and github modules
169
+
170
+ ## [0.1.0] - 2026-02-12
171
+
172
+ ### Added
173
+
174
+ - Initial release of DevDaily AI
175
+ - `standup` command - Generate daily standup notes from git commits
176
+ - `pr` command - Generate PR descriptions with interactive preview
177
+ - `week` command - Generate weekly work summaries
178
+ - `context` command - Recover work context (stub)
179
+ - Commitlint integration for smart PR title generation
180
+ - Interactive PR workflow (preview, create, draft)
181
+ - Auto-copy to clipboard for all outputs
182
+ - Multiple output formats (markdown, slack, plain)
183
+ - Professional terminal UI (chalk, boxen, ora)
184
+ - Comprehensive test suite (9 tests)
185
+ - GitHub Actions CI/CD
186
+ - Husky pre-commit hooks
187
+ - ESLint + Prettier formatting
188
+ - TypeScript strict mode
189
+
190
+ ### Features
191
+
192
+ - GitHub Copilot CLI integration for AI-powered summaries
193
+ - Conventional commit parsing
194
+ - Issue number extraction from commits
195
+ - PR type categorization (feature, bugfix, breaking)
196
+ - Support for custom date ranges
197
+ - No emoji output (professional terminal style)
198
+
199
+ [0.5.0]: https://github.com/hempun10/devdaily/releases/tag/v0.5.0
200
+ [0.4.1]: https://github.com/hempun10/devdaily/releases/tag/v0.4.1
201
+ [0.3.0]: https://github.com/hempun10/devdaily/releases/tag/v0.3.0
202
+ [0.2.0]: https://github.com/hempun10/devdaily/releases/tag/v0.2.0
203
+ [0.1.0]: https://github.com/hempun10/devdaily/releases/tag/v0.1.0
@@ -0,0 +1,264 @@
1
+ # Contributing to DevDaily
2
+
3
+ Thank you for your interest in contributing to DevDaily! This guide will help you get started.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Code of Conduct](#code-of-conduct)
8
+ - [Getting Started](#getting-started)
9
+ - [Development Workflow](#development-workflow)
10
+ - [Coding Standards](#coding-standards)
11
+ - [Commit Convention](#commit-convention)
12
+ - [Pull Request Process](#pull-request-process)
13
+ - [Testing](#testing)
14
+ - [Project Structure](#project-structure)
15
+ - [Reporting Issues](#reporting-issues)
16
+
17
+ ## Code of Conduct
18
+
19
+ This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior by opening an issue.
20
+
21
+ ## Getting Started
22
+
23
+ ### Prerequisites
24
+
25
+ - [Node.js](https://nodejs.org) >= 18.0.0
26
+ - [Git](https://git-scm.com)
27
+ - [GitHub CLI](https://cli.github.com) (`gh`) — for testing PR creation features
28
+ - [GitHub Copilot CLI](https://github.com/github/gh-copilot) — for testing AI generation features
29
+
30
+ ### Setup
31
+
32
+ ```bash
33
+ # Fork the repository on GitHub, then:
34
+ git clone https://github.com/<your-username>/devdaily.git
35
+ cd devdaily
36
+ npm install
37
+
38
+ # Verify everything works
39
+ npm run typecheck
40
+ npm run lint
41
+ npm test
42
+ npm run build
43
+ ```
44
+
45
+ ### Running locally
46
+
47
+ ```bash
48
+ # Watch mode — rebuilds on file changes
49
+ npm run dev
50
+
51
+ # Link the CLI globally for manual testing
52
+ npm link
53
+
54
+ # Now you can test commands in any git repo
55
+ devdaily standup --days 1 --no-copy
56
+ devdaily pr --debug
57
+ ```
58
+
59
+ ## Development Workflow
60
+
61
+ 1. **Create a branch** from `main`:
62
+
63
+ ```bash
64
+ git checkout -b feat/your-feature-name
65
+ ```
66
+
67
+ 2. **Make your changes** — write code, add tests, update docs.
68
+
69
+ 3. **Run the quality checks:**
70
+
71
+ ```bash
72
+ npm run typecheck # TypeScript compilation
73
+ npm run lint # ESLint
74
+ npm run format # Prettier formatting
75
+ npm test # Vitest test suite
76
+ npm run build # Production build
77
+ ```
78
+
79
+ 4. **Commit your changes** following the [commit convention](#commit-convention).
80
+
81
+ 5. **Push and open a pull request** against `main`.
82
+
83
+ ## Coding Standards
84
+
85
+ ### TypeScript
86
+
87
+ - **Strict mode** is enabled — no `any` types unless absolutely necessary (use `unknown` and narrow).
88
+ - All new functions should have JSDoc comments describing their purpose.
89
+ - Prefer `async/await` over raw promises.
90
+ - Use `readonly` for properties and parameters that should not be mutated.
91
+
92
+ ### Style
93
+
94
+ These are enforced by ESLint and Prettier (run automatically on commit via Husky):
95
+
96
+ - 2-space indentation
97
+ - Single quotes
98
+ - Semicolons required
99
+ - Trailing commas (`es5` style)
100
+ - 100-character line width
101
+ - LF line endings
102
+
103
+ ```bash
104
+ # Auto-fix formatting
105
+ npm run lint:fix
106
+ npm run format
107
+ ```
108
+
109
+ ### File organization
110
+
111
+ - **One export per file** when possible — makes imports clear.
112
+ - **Co-locate tests** in the `tests/` directory, matching the source file name (e.g., `src/core/notifications.ts` → `tests/notifications.test.ts`).
113
+ - **Keep commands thin** — commands in `src/commands/` should orchestrate, not contain business logic. Business logic goes in `src/core/`.
114
+
115
+ ## Commit Convention
116
+
117
+ We use [Conventional Commits](https://www.conventionalcommits.org/). This is enforced by commitlint on every commit.
118
+
119
+ ### Format
120
+
121
+ ```
122
+ <type>(<optional scope>): <description>
123
+
124
+ [optional body]
125
+
126
+ [optional footer(s)]
127
+ ```
128
+
129
+ ### Types
130
+
131
+ | Type | Description |
132
+ | ---------- | ------------------------------------------------------- |
133
+ | `feat` | A new feature |
134
+ | `fix` | A bug fix |
135
+ | `docs` | Documentation only changes |
136
+ | `style` | Formatting, missing semicolons, etc. (no logic) |
137
+ | `refactor` | Code change that neither fixes a bug nor adds a feature |
138
+ | `perf` | Performance improvement |
139
+ | `test` | Adding or updating tests |
140
+ | `build` | Changes to build system or dependencies |
141
+ | `ci` | Changes to CI configuration |
142
+ | `chore` | Other changes that don't modify src or tests |
143
+ | `revert` | Reverts a previous commit |
144
+
145
+ ### Examples
146
+
147
+ ```bash
148
+ feat: add JSON output format for standup command
149
+ fix(pr): handle repos with no default branch configured
150
+ docs: update installation instructions for Linux
151
+ test: add webhook notification integration tests
152
+ refactor(journal): extract snapshot serialization logic
153
+ ```
154
+
155
+ ### Rules
156
+
157
+ - Use lowercase for the description (no `Fix Bug` — use `fix bug`).
158
+ - Do not end the subject line with a period.
159
+ - Use the imperative mood ("add feature" not "added feature").
160
+
161
+ ## Pull Request Process
162
+
163
+ 1. **Fill out the PR template** — describe what changed and why.
164
+ 2. **Keep PRs focused** — one feature or fix per PR. Large PRs are harder to review.
165
+ 3. **Add tests** for new features and bug fixes.
166
+ 4. **Update documentation** if your change affects user-facing behavior (README, help text, etc.).
167
+ 5. **Make sure CI passes** — the PR must pass typecheck, lint, format check, tests, and build.
168
+ 6. **Respond to review feedback** — we aim to review PRs within a few days.
169
+
170
+ ### PR title format
171
+
172
+ Use the same [conventional commit format](#format) for PR titles:
173
+
174
+ ```
175
+ feat: add Slack thread support for notifications
176
+ fix: clipboard copy failing on plain format
177
+ ```
178
+
179
+ ## Testing
180
+
181
+ We use [Vitest](https://vitest.dev/) for testing.
182
+
183
+ ```bash
184
+ npm test # Run all tests
185
+ npx vitest run tests/notifications.test.ts # Run a specific file
186
+ npm run test:watch # Watch mode
187
+ npm run test:coverage # With coverage report
188
+ ```
189
+
190
+ ### Writing tests
191
+
192
+ - Place test files in `tests/` with a `.test.ts` suffix.
193
+ - Mock external dependencies (git, Copilot CLI, APIs) — tests should not require network access.
194
+ - Use `describe`/`it` blocks with clear, descriptive names.
195
+ - Test both the happy path and error/edge cases.
196
+
197
+ ### Test structure example
198
+
199
+ ```typescript
200
+ import { describe, it, expect, vi } from 'vitest';
201
+
202
+ describe('formatOutput', () => {
203
+ describe('plain format', () => {
204
+ it('strips markdown headers', () => {
205
+ // arrange
206
+ const input = '## Completed\n\n- Task A';
207
+ // act
208
+ const result = formatOutput(input, 'plain');
209
+ // assert
210
+ expect(result.text).not.toContain('##');
211
+ expect(result.text).toContain('Completed:');
212
+ });
213
+ });
214
+ });
215
+ ```
216
+
217
+ ## Project Structure
218
+
219
+ ```
220
+ src/
221
+ ├── commands/ # CLI command handlers (thin orchestration layer)
222
+ ├── core/ # Business logic (git analysis, AI, journal, notifications)
223
+ ├── config/ # Configuration loading, schema (Zod), secrets management
224
+ ├── ui/ # Terminal UI rendering (colors, ASCII art, help screens)
225
+ ├── utils/ # Shared utilities (clipboard, date helpers, formatting)
226
+ ├── types/ # TypeScript type definitions
227
+ └── index.ts # CLI entry point (Commander.js setup)
228
+
229
+ tests/ # Vitest test suites (mirrors src/ structure)
230
+ schemas/ # JSON Schema for .devdaily.json IDE autocomplete
231
+ examples/ # Example command outputs for documentation
232
+ ```
233
+
234
+ ## Reporting Issues
235
+
236
+ ### Bug reports
237
+
238
+ When filing a bug report, please include:
239
+
240
+ 1. **DevDaily version** (`devdaily --version`)
241
+ 2. **Node.js version** (`node --version`)
242
+ 3. **Operating system**
243
+ 4. **Steps to reproduce** — what commands you ran
244
+ 5. **Expected vs. actual behavior**
245
+ 6. **Debug output** — run the failing command with `--debug` and include the output
246
+
247
+ ### Feature requests
248
+
249
+ We welcome feature ideas! Please:
250
+
251
+ - Check existing issues to avoid duplicates.
252
+ - Describe the problem your feature would solve.
253
+ - Suggest a possible approach if you have one.
254
+ - Label with `enhancement`.
255
+
256
+ ---
257
+
258
+ ## Need Help?
259
+
260
+ - Browse [existing issues](https://github.com/hempun10/devdaily/issues)
261
+ - Read the [README](README.md) for usage documentation
262
+ - Run `devdaily doctor` to diagnose setup problems
263
+
264
+ Thank you for contributing!
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 DevDaily AI
3
+ Copyright (c) 2025 Hem Pun
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal