devdaily-ai 0.4.0 → 0.6.0
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 +197 -0
- package/CONTRIBUTING.md +264 -0
- package/LICENSE +1 -1
- package/README.md +364 -476
- package/dist/index.js +7554 -3004
- package/dist/index.js.map +1 -1
- package/package.json +10 -5
- package/README.md.bak +0 -595
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
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.5.0] - 2025-07-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Persistent Work Journal** — Local work memory stored in `~/.config/devdaily/journal/` that tracks your work across sessions, days, and projects.
|
|
13
|
+
- `src/core/work-journal.ts` — Full storage layer with index, search, merge, cross-project aggregation, pruning, and stats.
|
|
14
|
+
- `src/core/snapshot-builder.ts` — Captures rich repo state (branches, commits, PRs, tickets, diffs, categories) into `WorkSnapshot` objects.
|
|
15
|
+
|
|
16
|
+
- **`devdaily snapshot`** (`snap`, `save`) — Manually capture a work snapshot with notes and tags.
|
|
17
|
+
- `--light` mode for fast captures (no PRs/tickets).
|
|
18
|
+
- `--list [days]` to browse recent snapshots.
|
|
19
|
+
- `--stats` to see journal storage usage.
|
|
20
|
+
- `--prune <days>` to clean up old entries.
|
|
21
|
+
|
|
22
|
+
- **`devdaily context`** (`ctx`, `resume`) — Recover what you were working on after a context switch.
|
|
23
|
+
- Date range filtering (`--from`, `--to`, `--date`, `--days`).
|
|
24
|
+
- `--all-projects` for cross-project context.
|
|
25
|
+
- `--ai` for AI-powered "where did I leave off?" summaries.
|
|
26
|
+
- `--branches` for detailed active branch status.
|
|
27
|
+
|
|
28
|
+
- **`devdaily recall`** (`search`, `find`) — Search your work history by keyword, file, tag, or date range.
|
|
29
|
+
- Fuzzy matching across commit messages, branch names, notes, and tags.
|
|
30
|
+
- `--file <path>` to find when a specific file was changed.
|
|
31
|
+
- `--ai` for AI-powered search result summaries.
|
|
32
|
+
- `--json` output for scripting.
|
|
33
|
+
|
|
34
|
+
- **Automatic Side-Effect Snapshots** — Zero-friction snapshot capture.
|
|
35
|
+
- `src/core/auto-snapshot.ts` — Silent, non-blocking snapshot module.
|
|
36
|
+
- `sideEffectSnapshot()` runs at the end of `standup`, `pr`, and `week` commands.
|
|
37
|
+
- `fireAndForgetSnapshot()` for fully async background captures.
|
|
38
|
+
- Tagged with source (`auto:standup`, `auto:pr`, `auto:week`, etc.).
|
|
39
|
+
- Respects `journal.autoSnapshot` config flag.
|
|
40
|
+
- `--no-journal` flag on `standup` and `pr`, `--no-auto-snapshot` on `week` to skip.
|
|
41
|
+
|
|
42
|
+
- **Git Hooks for Auto-Capture** — Opt-in `post-commit` and `post-checkout` hooks.
|
|
43
|
+
- `devdaily init --git-hooks` — Interactive hook installer.
|
|
44
|
+
- `devdaily init --remove-hooks` — Clean removal of devdaily hooks.
|
|
45
|
+
- POSIX-compatible (`#!/bin/sh`), background-executed, safe with existing hooks.
|
|
46
|
+
- Appends to existing hooks rather than overwriting.
|
|
47
|
+
- `generatePostCommitHook()` and `generatePostCheckoutHook()` in `auto-snapshot.ts`.
|
|
48
|
+
|
|
49
|
+
- **`journal` Config Section** — New configuration block for snapshot automation.
|
|
50
|
+
- `autoSnapshot` (default: `true`) — Enable/disable side-effect snapshots globally.
|
|
51
|
+
- `gitHooks` (default: `false`) — Track whether git hooks are installed.
|
|
52
|
+
- `hooks.postCommit` / `hooks.postCheckout` — Per-hook enable/disable.
|
|
53
|
+
- `quiet` (default: `true`) — Suppress snapshot side-effect messages.
|
|
54
|
+
|
|
55
|
+
- **Enhanced `devdaily week`** — Major improvements to weekly summaries.
|
|
56
|
+
- `--from` / `--to` for custom date ranges.
|
|
57
|
+
- `--weeks-ago <n>` for relative week selection.
|
|
58
|
+
- `--all-projects` for cross-project summaries from journal data.
|
|
59
|
+
- `--save` to persist the AI summary to the journal.
|
|
60
|
+
- `--json` for machine-readable stats output.
|
|
61
|
+
- Journal enrichment — weekly summaries incorporate snapshot history.
|
|
62
|
+
|
|
63
|
+
- **Comprehensive Test Suite** — 654 tests across 12 test files.
|
|
64
|
+
- `tests/auto-snapshot.test.ts` — 74 tests covering side-effect snapshots, hook generation, hook install/remove, config integration, edge cases, and round-trip cycles.
|
|
65
|
+
- `tests/work-journal.test.ts` — 123 tests covering persistent storage, search, cross-project aggregation, merge logic, pruning, and stats.
|
|
66
|
+
|
|
67
|
+
- **Production-Grade README** — Complete rewrite with full command reference, config documentation, architecture overview, testing guide, FAQ, and troubleshooting.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- **`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.
|
|
72
|
+
- **`devdaily standup`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-journal`).
|
|
73
|
+
- **`devdaily pr`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-journal`).
|
|
74
|
+
- **`devdaily week`** — Now auto-saves a light snapshot to the journal after generating (disable with `--no-auto-snapshot`).
|
|
75
|
+
- **Config schema** — Added `JournalSchema` with `autoSnapshot`, `gitHooks`, `hooks`, `autoPromptDays`, and `quiet` fields. Exported `Journal` type.
|
|
76
|
+
- **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.
|
|
77
|
+
|
|
78
|
+
### Technical
|
|
79
|
+
|
|
80
|
+
- New modules: `src/core/auto-snapshot.ts`, `src/core/snapshot-builder.ts`, `src/core/work-journal.ts`.
|
|
81
|
+
- New commands: `src/commands/snapshot.ts`, `src/commands/context.ts`, `src/commands/recall.ts`.
|
|
82
|
+
- New test file: `tests/auto-snapshot.test.ts` (74 tests).
|
|
83
|
+
- Total test count: 580 → 654 (12 test files).
|
|
84
|
+
- Build output: 348 KB (ESM), clean TypeScript compilation with zero errors.
|
|
85
|
+
|
|
86
|
+
## [0.4.1] - 2026-02-14
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- **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.
|
|
91
|
+
- **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.
|
|
92
|
+
- **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.
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- **PM Integration Test Suite** — End-to-end test scripts for GitHub Issues and Linear integrations:
|
|
97
|
+
- `scripts/setup-test-repo.sh` — Creates a disposable GitHub repo with issues, source files, and initial commit
|
|
98
|
+
- `scripts/setup-test-commits.sh` — Creates branches, commits, and PRs referencing both GitHub and Linear ticket IDs
|
|
99
|
+
- `scripts/create-linear-issues.py` — Creates matching Linear issues via GraphQL API
|
|
100
|
+
- **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
|
|
101
|
+
- **Debug Logging for Ticket Fetching** — `--debug` flag now surfaces `[fetchTickets]` messages showing PM client configuration status, fetch progress, and errors
|
|
102
|
+
- **`debug` option in `StandupContextOptions`** — Passed through from both `standup` and `week` commands to enable ticket fetch diagnostics
|
|
103
|
+
|
|
104
|
+
### Changed
|
|
105
|
+
|
|
106
|
+
- Updated `docs/TESTING.md` with PM integration testing section, setup instructions, verification checklist, and troubleshooting guide
|
|
107
|
+
|
|
108
|
+
## [0.3.0] - 2026-02-14
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- **Context Analyzer** - Smart work context extraction from git activity
|
|
113
|
+
- Branch → Ticket correlation (JIRA-123, #123, LINEAR-123 patterns)
|
|
114
|
+
- Work categorization (frontend, backend, infra, docs, tests, config)
|
|
115
|
+
- Time-based work session tracking
|
|
116
|
+
- **Enhanced Standup Context** - `--context` flag shows detailed work analysis
|
|
117
|
+
- **JSON Schema for IDE** - Autocomplete support in `.devdaily.json` config files
|
|
118
|
+
- **PR Config Defaults** - Set default reviewers, assignees, and labels in config
|
|
119
|
+
- **Standup Scheduling** - Configure standup schedule and grouping options
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
- Config now includes `$schema` reference for IDE autocomplete
|
|
124
|
+
- Standup generation uses work categories and ticket context for better AI summaries
|
|
125
|
+
- Expanded PR and standup config options (defaultReviewers, defaultLabels, groupBy, etc.)
|
|
126
|
+
|
|
127
|
+
### Technical
|
|
128
|
+
|
|
129
|
+
- New `src/core/context-analyzer.ts` for rich context extraction
|
|
130
|
+
- Added `schemas/devdaily.schema.json` for config validation
|
|
131
|
+
- Updated config schema with more standup/PR options
|
|
132
|
+
|
|
133
|
+
## [0.2.0] - 2026-02-13
|
|
134
|
+
|
|
135
|
+
### Added
|
|
136
|
+
|
|
137
|
+
- **PR Template Support** - Auto-detect and parse `.github/PULL_REQUEST_TEMPLATE.md`
|
|
138
|
+
- **AI Template Filling** - Copilot fills template sections based on commit analysis
|
|
139
|
+
- **PR Preview** - Terminal markdown rendering with `--preview` flag
|
|
140
|
+
- **Interactive PR Mode** - Select labels, reviewers, assignees with `--interactive`
|
|
141
|
+
- **Slack Notifications** - Send standups to Slack via webhooks with `--slack`
|
|
142
|
+
- **Discord Notifications** - Send standups to Discord via webhooks with `--discord`
|
|
143
|
+
- **Config Management** - New `devdaily config` command for managing settings
|
|
144
|
+
- **Init Wizard** - Interactive setup with `devdaily init` command
|
|
145
|
+
- **Notifications Setup** - `devdaily init --notifications` for webhook configuration
|
|
146
|
+
- **Doctor Command** - `devdaily doctor` to diagnose and fix setup issues
|
|
147
|
+
- **Dashboard Command** - `devdaily dash` for quick status overview (stub)
|
|
148
|
+
- **Project Management Integration** - Jira, Linear, Notion support (stub)
|
|
149
|
+
- **Secrets Management** - Secure storage for API keys and webhooks
|
|
150
|
+
- **Custom UI System** - Enhanced terminal UI with colors, ASCII art, and help rendering
|
|
151
|
+
|
|
152
|
+
### Changed
|
|
153
|
+
|
|
154
|
+
- Upgraded to new GitHub Copilot CLI (`copilot -p --silent`)
|
|
155
|
+
- Improved PR description generation with template awareness
|
|
156
|
+
- Better error handling and user feedback
|
|
157
|
+
- Enhanced standup formatting for notification channels
|
|
158
|
+
|
|
159
|
+
### Fixed
|
|
160
|
+
|
|
161
|
+
- TypeScript strict mode compliance
|
|
162
|
+
- Unused variable warnings in doctor and github modules
|
|
163
|
+
|
|
164
|
+
## [0.1.0] - 2026-02-12
|
|
165
|
+
|
|
166
|
+
### Added
|
|
167
|
+
|
|
168
|
+
- Initial release of DevDaily AI
|
|
169
|
+
- `standup` command - Generate daily standup notes from git commits
|
|
170
|
+
- `pr` command - Generate PR descriptions with interactive preview
|
|
171
|
+
- `week` command - Generate weekly work summaries
|
|
172
|
+
- `context` command - Recover work context (stub)
|
|
173
|
+
- Commitlint integration for smart PR title generation
|
|
174
|
+
- Interactive PR workflow (preview, create, draft)
|
|
175
|
+
- Auto-copy to clipboard for all outputs
|
|
176
|
+
- Multiple output formats (markdown, slack, plain)
|
|
177
|
+
- Professional terminal UI (chalk, boxen, ora)
|
|
178
|
+
- Comprehensive test suite (9 tests)
|
|
179
|
+
- GitHub Actions CI/CD
|
|
180
|
+
- Husky pre-commit hooks
|
|
181
|
+
- ESLint + Prettier formatting
|
|
182
|
+
- TypeScript strict mode
|
|
183
|
+
|
|
184
|
+
### Features
|
|
185
|
+
|
|
186
|
+
- GitHub Copilot CLI integration for AI-powered summaries
|
|
187
|
+
- Conventional commit parsing
|
|
188
|
+
- Issue number extraction from commits
|
|
189
|
+
- PR type categorization (feature, bugfix, breaking)
|
|
190
|
+
- Support for custom date ranges
|
|
191
|
+
- No emoji output (professional terminal style)
|
|
192
|
+
|
|
193
|
+
[0.5.0]: https://github.com/hempun10/devdaily/releases/tag/v0.5.0
|
|
194
|
+
[0.4.1]: https://github.com/hempun10/devdaily/releases/tag/v0.4.1
|
|
195
|
+
[0.3.0]: https://github.com/hempun10/devdaily/releases/tag/v0.3.0
|
|
196
|
+
[0.2.0]: https://github.com/hempun10/devdaily/releases/tag/v0.2.0
|
|
197
|
+
[0.1.0]: https://github.com/hempun10/devdaily/releases/tag/v0.1.0
|
package/CONTRIBUTING.md
ADDED
|
@@ -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!
|