knowns 0.3.0 → 0.4.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 CHANGED
@@ -1,337 +1,73 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ All notable changes to Knowns will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.3.0] - 2025-12-29
8
+ ## [0.4.0] - 2025-12-31
9
9
 
10
10
  ### Added
11
- - **CLI Shorthand Commands**: New concise syntax for common operations
12
- - `knowns task <id>` - Shorthand for `knowns task view <id>`
13
- - `knowns doc <path>` - Shorthand for `knowns doc view <path>`
14
- - Reduces typing while maintaining full command compatibility
15
-
16
- - **New UI Components** (shadcn/ui):
17
- - Badge, Card, Checkbox, Label, Progress, Select components
18
- - Data Table with sorting, filtering, and pagination
19
- - Dropdown Menu for context actions
20
- - Kanban board components (Column, Card, Board)
21
- - Sonner for toast notifications
22
- - Table component for data display
23
-
24
- - **New React Contexts**:
25
- - `ConfigContext` - Global configuration state management
26
- - `TimeTrackerContext` - Time tracking state across components
27
- - `UIPreferencesContext` - User UI preferences persistence
28
-
29
- - **Server Architecture**:
30
- - `src/server/middleware/` - Request processing middleware
31
- - `src/server/routes/` - Modular route handlers
32
- - `src/server/utils/` - Server utility functions
33
- - `src/server/types.ts` - TypeScript type definitions
34
11
 
35
- - **Documentation**:
36
- - `docs/developer-guide.md` - Developer setup and contribution guide
37
- - `docs/user-guide.md` - End-user documentation
38
-
39
- - **Utilities**:
40
- - `src/ui/utils/colors.ts` - Color utility functions for UI
41
- - `src/ui/utils/markdown-sections.ts` - Markdown section parsing
12
+ - **Template System**: 2x2 matrix of guidelines (type × variant)
13
+ - Types: `cli` (CLI commands) and `mcp` (MCP tools)
14
+ - Variants: `general` (full ~15KB) and `gemini` (compact ~3KB)
15
+ - **`--gemini` flag**: Use compact Gemini variant for smaller context windows
16
+ - `knowns agents sync --gemini`
17
+ - `knowns agents --update-instructions --gemini`
18
+ - **Doc list path filter**: Filter docs by folder
19
+ - `knowns doc list "guides/" --plain`
20
+ - `knowns doc list "patterns/" --plain`
21
+ - **Doc list tree format**: Token-efficient tree view with `--plain`
42
22
 
43
23
  ### Changed
44
- - **UI Architecture**: Migrated to Atomic Design pattern
45
- - `atoms/` - Basic UI building blocks (buttons, inputs, icons)
46
- - `molecules/` - Composed components (form fields, cards)
47
- - `organisms/` - Complex UI sections (forms, lists, modals)
48
- - `templates/` - Page layout templates
49
- - Improved component reusability and maintainability
50
-
51
- - **Server Refactoring**: Modularized monolithic server
52
- - Split 567-line `server/index.ts` into focused modules
53
- - Cleaner separation of concerns
54
- - Easier testing and maintenance
55
-
56
- - **Page Components**: Simplified and optimized
57
- - `TasksPage` - Reduced from 700+ to ~300 lines
58
- - `DocsPage` - Streamlined document management
59
- - `KanbanPage` - Enhanced board functionality
60
- - `ConfigPage` - Improved settings interface
61
24
 
62
- - **API Client**: Enhanced `src/ui/api/client.ts`
63
- - Better error handling
64
- - Type-safe API calls
65
- - Improved response parsing
66
-
67
- - **Guidelines**: Updated AI agent guidelines
68
- - Clearer reference format documentation
69
- - Better examples for input vs output formats
70
- - Improved workflow instructions
71
-
72
- ### Removed
73
- - **Legacy Components**: Cleaned up old monolithic components
74
- - `ActivityFeed.tsx`, `AppSidebar.tsx`, `AssigneeDropdown.tsx`
75
- - `Avatar.tsx`, `Board.tsx`, `Column.tsx`
76
- - `MarkdownRenderer.tsx`, `NotificationBell.tsx`
77
- - `SearchBox.tsx`, `SearchCommandDialog.tsx`
78
- - `TaskCard.tsx`, `TaskCreateForm.tsx`, `TaskDetailModal.tsx`
79
- - `TaskHistoryPanel.tsx`, `TimeTracker.tsx`, `VersionDiffViewer.tsx`
80
- - Functionality preserved in new Atomic Design components
81
-
82
- ### Fixed
83
- - **Dialog/Sheet Components**: Fixed accessibility and styling issues
84
- - **Mention Refs**: Improved reference parsing reliability
85
- - **Server Notifications**: Better WebSocket notification handling
86
-
87
- ## [0.2.1] - 2025-12-28
25
+ - Restructured templates folder: `src/templates/{cli,mcp}/{general,gemini}.md`
26
+ - Interactive `knowns agents` now prompts for type and variant
27
+ - `knowns agents sync` supports `--type`, `--gemini`, `--all` options
88
28
 
89
29
  ### Fixed
90
- - **Web UI Static Files**: Fixed `NotFoundError` when running `knowns browser` from global install
91
- - Bun creates symlinks in `~/.bun/bin/` which broke path resolution for UI files
92
- - Added `realpathSync` to resolve symlinks before computing paths
93
- - Changed Express `sendFile` to use `root` option for reliable file serving
94
30
 
95
- ## [0.2.0] - 2025-12-27
31
+ - **`--plain` flag not working**: Fixed Commander.js option inheritance for nested commands
32
+ - Added `.enablePositionalOptions()` and `.passThroughOptions()` to parent commands
33
+ - Affects: `knowns task list --plain`, `knowns doc list --plain`, `knowns agents sync --gemini`
96
34
 
97
- ### Added
98
- - **Project Documentation**: Comprehensive project docs for contributors and users
99
- - `PHILOSOPHY.md` - 10 core principles guiding Knowns design
100
- - `ARCHITECTURE.md` - Technical overview, diagrams, data flow, sync logic
101
- - `CONTRIBUTING.md` - Contribution guidelines aligned with philosophy
102
- - `docs/` folder with detailed guides:
103
- - `commands.md` - Full CLI command reference
104
- - `workflow.md` - Task lifecycle guide
105
- - `reference-system.md` - How `@doc/` and `@task-` linking works
106
- - `web-ui.md` - Kanban board and document browser guide
107
- - `mcp-integration.md` - Claude Desktop MCP setup
108
- - `configuration.md` - Project structure and options
109
- - `ai-workflow.md` - Guide for AI agents
110
-
111
- - **README Improvements**:
112
- - Added TL;DR section for quick understanding
113
- - Added comparison table vs Notion/Jira/Obsidian
114
- - Added "How it works" 3-step explanation
115
- - Added Roadmap section with Self-Hosted Team Sync (planned)
116
- - New badges: Node version, TypeScript, Platform, GitHub stars, PRs welcome
117
- - Links to Philosophy, Architecture, and Contributing docs
118
-
119
- - **Node.js Engine Requirement**: Added `engines.node >= 18.0.0` to package.json
120
-
121
- ### Changed
122
- - **README Restructure**: Optimized for first impressions
123
- - Moved detailed docs to `./docs/` folder
124
- - Shortened main README from ~300 to ~175 lines
125
- - Documentation table links to detailed guides
126
- - **Tagline**: Updated to "CLI-first knowledge layer that gives AI persistent memory of your project"
127
- - **Version Display**: Now reads directly from package.json (works with both npm and bun)
128
-
129
- ### Fixed
130
- - **UI Version Display**: Fixed version showing "dev" or old version when built with bun
131
- - Vite config now reads version directly from package.json instead of `npm_package_version`
132
- - **Doc Mention Regex**: Fixed badge not rendering for `@doc/path` without `.md` extension
133
- - Changed regex from `/@doc\/([^\s]+\.md)/g` to `/@docs?\/([^\s)]+)/g`
134
- - Added `normalizeDocPath()` to automatically add `.md` extension
135
-
136
- ## [0.1.8] - 2025-12-27
137
-
138
- ### Added
139
- - **Node.js Runtime Support**: Browser command now works with both Bun and Node.js
140
- - Migrated server from `Bun.serve()` to Express + ws
141
- - Added `express`, `ws`, and `cors` dependencies
142
- - WebSocket real-time sync works on both runtimes
143
- - **Bun Compatibility Layer**: New `src/utils/bun-compat.ts` utility providing cross-runtime support
144
- - `file()` - Bun.file() compatible wrapper for reading files
145
- - `write()` - Bun.write() compatible wrapper for writing files
146
- - `bunSpawn()` - Bun.spawn() compatible wrapper for process spawning
147
- - CLI commands now work with both Bun and Node.js runtimes
148
- - **Build Scripts**: Added `scripts/build-cli.js` using esbuild for Node.js-compatible builds
149
- - CLI can now be built with `node scripts/build-cli.js` (no Bun required)
150
- - Uses ESM format with `createRequire` shim for CommonJS compatibility
151
- - Builds both main CLI and MCP server
152
- - Properly strips old shebangs and adds Node.js-compatible shebang
153
- - **CI/CD**: Updated GitHub Actions workflows to use only Node.js and npm
154
- - Removed Bun dependency from CI/CD pipelines
155
- - Both `ci.yml` and `publish.yml` now use `npm ci`, `npm test`, `npm run build`
156
- - Added npm cache for faster builds
157
- - **Testing**: Migrated from `bun test` to `vitest`
158
- - Added `vitest.config.ts` with path aliases support
159
- - All 76 tests passing with vitest
35
+ ## [0.3.1] - 2025-12-31
160
36
 
161
37
  ### Fixed
162
- - **File Deletion**: Fixed improper file deletion that was clearing files instead of deleting them
163
- - Changed from `Bun.write(path, "")` to proper `unlink()` in `file-store.ts` and `version-store.ts`
164
- - Tasks and version history are now properly deleted when archived or removed
165
- - **Browser Command**: Fixed browser opening on non-Bun runtimes with proper `spawn()` fallback
166
- - **Server Path Detection**: Fixed `import.meta.dir` undefined error when running with Node.js
167
- - Now uses `fileURLToPath(import.meta.url)` as fallback for Node.js compatibility
168
- - Added Windows path separator support
169
- - **Windows Build**: Fixed shebang syntax error when running built CLI on Windows
170
- - Build script now strips BOM and old shebangs before adding Node.js shebang
171
- - Added `.npmrc` with `legacy-peer-deps=true` for React 19 compatibility
172
- - **Web UI Doc Update**: Fixed "path must be string" error when updating docs
173
- - Express 5 wildcard `{*path}` returns array, now properly joined to string
174
-
175
- ### Changed
176
- - **Server Architecture**: Complete rewrite of `src/server/index.ts`
177
- - Replaced `Bun.serve()` with Express HTTP server
178
- - Replaced Bun WebSocket API with `ws` library
179
- - All 15 API routes migrated to Express router pattern
180
- - Static file serving now uses `express.static()`
181
- - Refactored file operations across multiple modules to use the new compatibility layer:
182
- - `src/commands/task.ts` - Archive/unarchive operations
183
- - `src/commands/time.ts` - Time tracking data persistence
184
- - `src/storage/file-store.ts` - Task and project storage
185
- - `src/storage/version-store.ts` - Version history storage
186
- - Simplified `src/utils/bun-compat.ts` - removed `serve()` function (now using Express)
187
38
 
188
- ## [0.1.7] - 2025-12-27
39
+ - Clear error message when server port is already in use
189
40
 
190
- ### Fixed
191
- - **Web UI**: Fixed layout breaking with long parent task titles in dropdowns and displays
192
- - Truncated long titles in parent task selection dropdowns (TasksPage and TaskCreateForm)
193
- - Changed parent task display from button to div with proper accessibility attributes in TaskDetailModal
194
- - Added `w-full` constraint to prevent buttons from expanding to 1200px width
195
- - Implemented proper text truncation with `truncate`, `flex-1`, `min-w-0`, and `overflow-hidden` classes
196
- - Added title attributes to show full text on hover for truncated titles
197
-
198
- ## [0.1.6] - 2025-12-27
41
+ ## [0.3.0] - 2025-12-29
199
42
 
200
43
  ### Added
201
- - **Real-time Sync**: CLI/AI changes now sync to Web UI in real-time via WebSocket
202
- - When AI or CLI modifies tasks/docs, Web UI updates automatically without refresh
203
- - Added `/api/notify` endpoint for CLI to notify server of changes
204
- - Tasks and docs pages listen for WebSocket updates
205
- - **Custom Server Port**: Server port is now saved to config when using `-p` option
206
- - Example: `knowns browser -p 7000` saves port 7000 to config
207
- - Notify functions automatically use the saved port for real-time sync
208
- - **Doc CLI**: Added `--folder` option to `doc create` command for creating docs in nested folders
209
- - Example: `knowns doc create "Guide" -f guides`
210
- - **Doc CLI**: Added `--content` and `--append` options to `doc edit` command
211
- - `-c, --content <text>` - Replace document content
212
- - `-a, --append <text>` - Append to existing content
213
- - **Web UI**: MDEditor now supports full-height mode for better editing experience
214
- - **Web UI**: Create document modal is now larger (90vh) with full editor support
215
- - **Documentation**: Added comprehensive CLI guide at `guides/knowns-cli-guide.md`
216
-
217
- ### Changed
218
- - **Web UI**: Improved markdown editor layout with flex-based height management
219
- - **Web UI**: Editor properly fills available space when editing docs
220
- - **Reference System**: Doc mention regex now matches both `@doc/` and `@docs/` patterns
221
-
222
- ### Fixed
223
- - **Web UI**: Fixed Assignee dropdown not working inside modal (Portal container fix)
224
- - **Web UI**: Fixed editor scroll issues in full-height mode
225
- - **Web UI**: Fixed create modal form fields not properly sized
226
44
 
227
- ## [0.1.5] - 2024-12-26
228
-
229
- ### Fixed
230
- - **Kanban Board**: Fixed an issue where columns with many tasks were not scrollable. The entire board area is now vertically scrollable.
231
-
232
- ### Added
233
- - **Build Process**: The UI now dynamically displays the version from `package.json`.
234
- - The version is injected at build time, so it's always up-to-date.
45
+ - Atomic Design UI refactoring (atoms, molecules, organisms, templates)
46
+ - CLI enhancements for AI agents
47
+ - File-based content options (`--content-file`, `--append-file`)
48
+ - Text manipulation commands (`doc search-in`, `doc replace`, `doc replace-section`)
49
+ - Validate & repair commands for tasks and docs
50
+ - `knowns agents sync` command
235
51
 
236
52
  ### Changed
237
- - The UI build process now uses a separate script (`scripts/build-ui.js`) for more robust version injection.
238
53
 
239
- ## [0.1.3] - 2024-12-26
54
+ - UI components reorganized following Atomic Design principles
55
+ - Improved shadcn/ui integration
240
56
 
241
- ### Fixed
242
- - **Browser Command**: Fixed UI path detection when running from installed package
243
- - Server now correctly finds pre-built UI files in `dist/ui`
244
- - Works in both development mode (build on-the-fly) and production (serve pre-built)
245
- - Fixed package root detection for bundled code
246
- - **GitHub Actions**: Fixed release creation permissions error
247
- - Updated permissions from `contents: read` to `contents: write`
248
- - Switched from deprecated `actions/create-release@v1` to `softprops/action-gh-release@v1`
249
- - Enhanced release notes with installation instructions
57
+ ## [0.2.0] - 2025-12-28
250
58
 
251
59
  ### Added
252
- - **Build Process**: UI files now built and included in npm package
253
- - `dist/ui/index.html` - Main HTML file
254
- - `dist/ui/main.js` - Minified React application (533KB)
255
- - `dist/ui/main.css` - Compiled styles
256
- - `dist/ui/index.css` - Additional styles
257
- - Separate build scripts for CLI and UI (`build:cli`, `build:ui`, `build:copy-html`)
258
- - Production vs development mode for browser server
259
60
 
260
- ### Changed
261
- - Browser command now serves pre-built UI instead of building on user's machine
262
- - Improved error messages when UI files are not found
263
- - Server logs now indicate whether using pre-built UI or development mode
61
+ - Comprehensive documentation
62
+ - Improved README with quick start guide
264
63
 
265
- ## [0.1.2] - 2024-12-26
266
-
267
- ### Added
268
- - New `src/constants/knowns-guidelines.ts` file containing system prompt as TypeScript constant
269
- - Auto-sync of Knowns guidelines to AI instruction files during `knowns init`
270
- - Third step in "Next steps" output: "Update AI instructions: knowns agents --update-instructions"
271
-
272
- ### Changed
273
- - Refactored `agents` command to use bundled constant instead of reading from CLAUDE.md
274
- - CLAUDE.md is now a target file (not source) - gets updated like other AI instruction files
275
- - Exported `updateInstructionFile()` and `INSTRUCTION_FILES` from agents.ts for reusability
276
- - System prompt now bundled into binary, eliminating file I/O during sync
277
-
278
- ### Improved
279
- - Faster agent instruction updates (no file reads required)
280
- - More reliable init process - new projects get AI instructions automatically
281
- - Simplified architecture: single source of truth for guidelines in codebase
282
-
283
- ## [0.1.1] - 2024-12-26
64
+ ## [0.1.8] - 2025-12-27
284
65
 
285
66
  ### Added
286
- - GitHub Actions CI workflow for automated testing and linting
287
- - GitHub Actions publish workflow for automated npm publishing
288
- - Comprehensive badges in README (npm version, downloads, CI status, license, bundle size)
289
- - Publishing guide documentation (.github/PUBLISHING.md)
290
- - CHANGELOG.md to track version history
291
67
 
292
- ### Changed
293
- - Updated repository URLs from placeholder to knowns-dev/knowns
294
- - Enhanced README with more professional badges and links
68
+ - Bun compatibility layer
69
+ - Full Node.js support for server, build, and tests
295
70
 
296
71
  ### Fixed
297
- - Repository and homepage URLs in package.json now point to correct GitHub organization
298
-
299
- ## [0.1.0] - 2024-12-26
300
-
301
- ### Added
302
- - Initial release of Knowns CLI
303
- - Task management with acceptance criteria
304
- - Documentation management with nested folder support
305
- - Context linking between tasks and documentation
306
- - Time tracking built into tasks
307
- - Search functionality across tasks and docs
308
- - Web UI with Kanban board and document browser
309
- - MCP (Model Context Protocol) server for AI integration
310
- - Agent instruction sync (Claude, Gemini, Copilot)
311
- - `--plain` flag for AI-readable output
312
- - Multi-line input support for descriptions, plans, and notes
313
- - Task workflow with plan, implementation notes, and status tracking
314
- - Commands:
315
- - `knowns init` - Initialize project
316
- - `knowns task` - Task management commands
317
- - `knowns doc` - Documentation commands
318
- - `knowns search` - Global search
319
- - `knowns browser` - Web UI
320
- - `knowns agents` - Agent instruction sync
321
- - `knowns time` - Time tracking
322
- - `knowns mcp` - MCP server
323
-
324
- ### Documentation
325
- - Comprehensive README with usage examples
326
- - CLAUDE.md with complete guidelines for AI agents
327
- - Example workflows and patterns
328
72
 
329
- [0.2.0]: https://github.com/knowns-dev/knowns/compare/v0.1.8...v0.2.0
330
- [0.1.8]: https://github.com/knowns-dev/knowns/compare/v0.1.7...v0.1.8
331
- [0.1.7]: https://github.com/knowns-dev/knowns/compare/v0.1.6...v0.1.7
332
- [0.1.6]: https://github.com/knowns-dev/knowns/compare/v0.1.5...v0.1.6
333
- [0.1.5]: https://github.com/knowns-dev/knowns/compare/v0.1.3...v0.1.5
334
- [0.1.3]: https://github.com/knowns-dev/knowns/compare/v0.1.2...v0.1.3
335
- [0.1.2]: https://github.com/knowns-dev/knowns/compare/v0.1.1...v0.1.2
336
- [0.1.1]: https://github.com/knowns-dev/knowns/compare/v0.1.0...v0.1.1
337
- [0.1.0]: https://github.com/knowns-dev/knowns/releases/tag/v0.1.0
73
+ - File deletion issues