knowns 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
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.1.3] - 2024-12-26
9
+
10
+ ### Fixed
11
+ - **Browser Command**: Fixed UI path detection when running from installed package
12
+ - Server now correctly finds pre-built UI files in `dist/ui`
13
+ - Works in both development mode (build on-the-fly) and production (serve pre-built)
14
+ - Fixed package root detection for bundled code
15
+ - **GitHub Actions**: Fixed release creation permissions error
16
+ - Updated permissions from `contents: read` to `contents: write`
17
+ - Switched from deprecated `actions/create-release@v1` to `softprops/action-gh-release@v1`
18
+ - Enhanced release notes with installation instructions
19
+
20
+ ### Added
21
+ - **Build Process**: UI files now built and included in npm package
22
+ - `dist/ui/index.html` - Main HTML file
23
+ - `dist/ui/main.js` - Minified React application (533KB)
24
+ - `dist/ui/main.css` - Compiled styles
25
+ - `dist/ui/index.css` - Additional styles
26
+ - Separate build scripts for CLI and UI (`build:cli`, `build:ui`, `build:copy-html`)
27
+ - Production vs development mode for browser server
28
+
29
+ ### Changed
30
+ - Browser command now serves pre-built UI instead of building on user's machine
31
+ - Improved error messages when UI files are not found
32
+ - Server logs now indicate whether using pre-built UI or development mode
33
+
8
34
  ## [0.1.2] - 2024-12-26
9
35
 
10
36
  ### Added
@@ -69,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
69
95
  - CLAUDE.md with complete guidelines for AI agents
70
96
  - Example workflows and patterns
71
97
 
98
+ [0.1.3]: https://github.com/knowns-dev/knowns/compare/v0.1.2...v0.1.3
72
99
  [0.1.2]: https://github.com/knowns-dev/knowns/compare/v0.1.1...v0.1.2
73
100
  [0.1.1]: https://github.com/knowns-dev/knowns/compare/v0.1.0...v0.1.1
74
101
  [0.1.0]: https://github.com/knowns-dev/knowns/releases/tag/v0.1.0
package/CLAUDE.md CHANGED
@@ -5,265 +5,341 @@
5
5
 
6
6
  **NEVER edit .md files directly. ALL operations MUST use CLI commands.**
7
7
 
8
- ---
9
-
10
- ## Project Structure
11
-
12
- ```
13
- .knowns/
14
- ├── tasks/ # Task files: task-<id> - <title>.md
15
- ├── docs/ # Documentation (supports nested folders)
16
- └── decisions/ # Architecture decision records
17
- ```
8
+ This ensures data integrity, maintains proper change history, and prevents file corruption.
18
9
 
19
10
  ---
20
11
 
21
- ## Task Management
22
-
23
- ### Task Lifecycle
12
+ ## Quick Start
24
13
 
25
- 1. **Create** → `knowns task create "Title" -d "Description" --ac "Criterion 1" --ac "Criterion 2"`
26
- 2. **Start** → `knowns task edit <id> -s "In Progress" -a @yourself`
27
- 3. **Work** → Check acceptance criteria as you complete them
28
- 4. **Complete** → Mark status as Done after all criteria met
14
+ ```bash
15
+ # Initialize project
16
+ knowns init [name]
29
17
 
30
- ### Critical Commands
18
+ # Create task with acceptance criteria
19
+ knowns task create "Title" -d "Description" --ac "Criterion 1" --ac "Criterion 2"
31
20
 
32
- ```bash
33
- # View task (always use --plain for AI)
21
+ # View task (ALWAYS use --plain for AI)
34
22
  knowns task view <id> --plain
35
23
 
36
24
  # List tasks
37
25
  knowns task list --plain
38
- knowns task list -s "In Progress" --plain
39
26
 
40
- # Search tasks/docs
27
+ # Search (tasks + docs)
41
28
  knowns search "query" --plain
42
- knowns search "query" --type task --plain
43
-
44
- # Edit task
45
- knowns task edit <id> -s "In Progress" -a @agent
46
- knowns task edit <id> -t "New Title"
47
- knowns task edit <id> -d "Description"
48
-
49
- # Acceptance criteria
50
- knowns task edit <id> --ac "New criterion"
51
- knowns task edit <id> --check-ac 1
52
- knowns task edit <id> --check-ac 1 --check-ac 2 --check-ac 3
53
- knowns task edit <id> --uncheck-ac 2
54
- knowns task edit <id> --remove-ac 3
55
-
56
- # Implementation
57
- knowns task edit <id> --plan $'1. Step one\n2. Step two'
58
- knowns task edit <id> --notes "Implementation summary"
59
- knowns task edit <id> --append-notes $'Additional note\nAnother line'
60
29
  ```
61
30
 
62
- ### Multi-line Input (Shell-specific)
31
+ ---
63
32
 
64
- **Bash/Zsh** - Use `$'...\n...'`:
65
- ```bash
66
- knowns task edit 42 --desc $'Line 1\nLine 2\n\nLine 3'
67
- knowns task edit 42 --plan $'1. First\n2. Second'
68
- knowns task edit 42 --notes $'Done A\nDoing B'
69
- ```
33
+ ## Task Workflow (CRITICAL - Follow Every Step!)
70
34
 
71
- **PowerShell** - Use backtick-n:
72
- ```powershell
73
- knowns task edit 42 --notes "Line1`nLine2"
35
+ ### Step 1: Take Task
36
+ ```bash
37
+ knowns task edit <id> -s in-progress -a @yourself
74
38
  ```
75
39
 
76
- **Portable** - Use printf:
40
+ ### Step 2: Start Time Tracking
77
41
  ```bash
78
- knowns task edit 42 --notes "$(printf 'Line1\nLine2')"
42
+ knowns time start <id>
79
43
  ```
80
44
 
81
- ---
82
-
83
- ## Task Workflow
84
-
85
- ### Step 1: Take Task
45
+ ### Step 3: Read Related Documentation
86
46
  ```bash
87
- knowns task edit <id> -s "In Progress" -a @yourself
47
+ # Search for related docs
48
+ knowns search "authentication" --type doc --plain
49
+
50
+ # View relevant documents
51
+ knowns doc view "API Guidelines" --plain
88
52
  ```
89
53
 
90
- ### Step 2: Create Plan
54
+ **CRITICAL**: ALWAYS read related documentation BEFORE planning!
55
+
56
+ ### Step 4: Create Implementation Plan
91
57
  ```bash
92
- knowns task edit <id> --plan $'1. Research\n2. Implement\n3. Test'
58
+ # Add plan with documentation references
59
+ knowns task edit <id> --plan $'1. Research patterns (see [security-patterns.md](./security-patterns.md))\n2. Design middleware\n3. Implement\n4. Add tests\n5. Update docs'
93
60
  ```
94
61
 
95
- **IMPORTANT**: Share plan with user and wait for approval before coding.
62
+ **CRITICAL**:
63
+ - Share plan with user and **WAIT for approval** before coding
64
+ - Include doc references using `[file.md](./path/file.md)` format
96
65
 
97
- ### Step 3: Implementation
98
- Write code, then check acceptance criteria:
66
+ ### Step 5: Implement
99
67
  ```bash
68
+ # Check acceptance criteria as you complete them
100
69
  knowns task edit <id> --check-ac 1 --check-ac 2 --check-ac 3
101
70
  ```
102
71
 
103
- ### Step 4: Add Notes (PR Description)
72
+ ### Step 6: Add Implementation Notes
104
73
  ```bash
105
- knowns task edit <id> --notes $'Implemented using X pattern\nUpdated tests\nReady for review'
74
+ # Add comprehensive notes (suitable for PR description)
75
+ knowns task edit <id> --notes $'## Summary\n\nImplemented JWT auth.\n\n## Changes\n- Added middleware\n- Added tests'
76
+
77
+ # OR append progressively
78
+ knowns task edit <id> --append-notes "✓ Implemented middleware"
79
+ knowns task edit <id> --append-notes "✓ Added tests"
106
80
  ```
107
81
 
108
- Or append progressively:
82
+ ### Step 7: Stop Time Tracking
109
83
  ```bash
110
- knowns task edit <id> --append-notes "Completed feature X"
111
- knowns task edit <id> --append-notes "Added tests"
84
+ knowns time stop
112
85
  ```
113
86
 
114
- ### Step 5: Complete
87
+ ### Step 8: Complete Task
115
88
  ```bash
116
- knowns task edit <id> -s Done
89
+ # Mark as done (only after ALL criteria are met)
90
+ knowns task edit <id> -s done
117
91
  ```
118
92
 
119
93
  ---
120
94
 
121
- ## Definition of Done
95
+ ## Essential Commands
122
96
 
123
- Task is Done ONLY when ALL items are complete:
97
+ ### Task Management
124
98
 
125
- **Via CLI:**
126
- 1. All acceptance criteria checked: `--check-ac <index>`
127
- 2. Implementation notes added: `--notes "..."`
128
- 3. Status set to Done: `-s Done`
99
+ ```bash
100
+ # Create task
101
+ knowns task create "Title" -d "Description" --ac "Criterion" -l "labels" --priority high
129
102
 
130
- **Via Code:**
131
- 4. Tests pass
132
- 5. Documentation updated
133
- 6. Code reviewed
134
- 7. No regressions
103
+ # Edit task
104
+ knowns task edit <id> -t "New title"
105
+ knowns task edit <id> -d "New description"
106
+ knowns task edit <id> -s in-progress
107
+ knowns task edit <id> --priority high
108
+ knowns task edit <id> -a @yourself
109
+
110
+ # Acceptance Criteria
111
+ knowns task edit <id> --ac "New criterion" # Add
112
+ knowns task edit <id> --check-ac 1 --check-ac 2 # Check
113
+ knowns task edit <id> --uncheck-ac 2 # Uncheck
114
+ knowns task edit <id> --remove-ac 3 # Remove
115
+
116
+ # Implementation Plan & Notes
117
+ knowns task edit <id> --plan $'1. Step\n2. Step'
118
+ knowns task edit <id> --notes "Implementation summary"
119
+ knowns task edit <id> --append-notes "Progress update"
135
120
 
136
- ---
121
+ # View & List
122
+ knowns task view <id> --plain # ALWAYS use --plain
123
+ knowns task list --plain
124
+ knowns task list --status in-progress --plain
125
+ knowns task list --assignee @yourself --plain
126
+ knowns task list --tree --plain # Tree hierarchy
127
+ ```
137
128
 
138
- ## Documentation Management
129
+ ### Time Tracking
130
+
131
+ ```bash
132
+ # Timer
133
+ knowns time start <id>
134
+ knowns time stop
135
+ knowns time pause
136
+ knowns time resume
137
+ knowns time status
138
+
139
+ # Manual entry
140
+ knowns time add <id> 2h -n "Note" -d "2025-12-25"
141
+
142
+ # Reports
143
+ knowns time report --from "2025-12-01" --to "2025-12-31"
144
+ knowns time report --by-label --csv > report.csv
145
+ ```
139
146
 
140
- ### Commands
147
+ ### Documentation
141
148
 
142
149
  ```bash
143
- # List all docs (includes nested folders)
150
+ # List & View
144
151
  knowns doc list --plain
152
+ knowns doc list --tag architecture --plain
153
+ knowns doc view "Doc Name" --plain
145
154
 
146
- # View document
147
- knowns doc view <name> --plain
148
- knowns doc view patterns/guards --plain
149
- knowns doc view patterns/guards.md --plain
150
-
151
- # Create document
152
- knowns doc create "Title" -d "Description" -t "tag1,tag2"
155
+ # Create
156
+ knowns doc create "Title" -d "Description" -t "tags"
153
157
 
154
158
  # Edit metadata
155
- knowns doc edit <name> -t "New Title" -d "New Description"
159
+ knowns doc edit "Doc Name" -t "New Title" --tags "new,tags"
156
160
  ```
157
161
 
158
- ### Document Links
162
+ ### Search
163
+
164
+ ```bash
165
+ # Search everything
166
+ knowns search "query" --plain
167
+
168
+ # Search specific type
169
+ knowns search "auth" --type task --plain
170
+ knowns search "patterns" --type doc --plain
159
171
 
160
- In `--plain` mode, markdown links are replaced with resolved paths:
161
- - `[guards.md](./patterns/guards.md)` `@.knowns/docs/patterns/guards.md`
172
+ # Filter
173
+ knowns search "bug" --status in-progress --priority high --plain
174
+ ```
162
175
 
163
176
  ---
164
177
 
165
178
  ## Task Structure
166
179
 
167
180
  ### Title
168
- Brief, clear summary of the task.
181
+ Clear summary (WHAT needs to be done).
182
+ - Good: "Add JWT authentication"
183
+ - Bad: "Do auth stuff"
169
184
 
170
185
  ### Description
171
- Explains WHY and WHAT (not HOW). Provides context.
186
+ Explains WHY and WHAT (not HOW). **Link related docs using `[file.md](./path/file.md)`**
187
+
188
+ ```
189
+ We need JWT authentication because sessions don't scale.
190
+
191
+ Related docs:
192
+ - [security-patterns.md](./security-patterns.md)
193
+ - [api-guidelines.md](./api-guidelines.md)
194
+ ```
172
195
 
173
196
  ### Acceptance Criteria
174
- **Outcome-oriented**, testable, user-focused criteria.
197
+ **Outcome-oriented**, testable criteria. NOT implementation details.
175
198
 
176
- Good:
177
- - "User can login with valid credentials"
178
- - "System processes 1000 requests/sec without errors"
199
+ - Good: "User can login and receive JWT token"
200
+ - Good: "Token expires after 15 minutes"
201
+ - Bad: "Add function handleLogin() in auth.ts"
179
202
 
180
- Bad:
181
- - "Add function handleLogin() in auth.ts" (implementation detail)
203
+ ### Implementation Plan
204
+ HOW to solve. Added AFTER taking task, BEFORE coding.
205
+
206
+ ```
207
+ 1. Research JWT libraries (see [security-patterns.md](./security-patterns.md))
208
+ 2. Design token structure
209
+ 3. Implement middleware
210
+ 4. Add tests
211
+ ```
212
+
213
+ ### Implementation Notes
214
+ Summary for PR. Added AFTER completion.
215
+
216
+ ```
217
+ ## Summary
218
+ Implemented JWT auth using jsonwebtoken.
182
219
 
183
- ### Implementation Plan (added during work)
184
- **HOW** to solve the task. Added AFTER taking the task, BEFORE coding.
220
+ ## Changes
221
+ - Added middleware in src/auth.ts
222
+ - Added tests with 100% coverage
185
223
 
186
- ### Implementation Notes (PR description)
187
- Summary of what was done, suitable for PR. Added AFTER completion.
224
+ ## Documentation
225
+ - Updated API.md
226
+ ```
227
+
228
+ ---
229
+
230
+ ## Definition of Done
231
+
232
+ A task is **Done** ONLY when **ALL** criteria are met:
233
+
234
+ ### Via CLI (Required)
235
+ 1. All acceptance criteria checked: `--check-ac <index>`
236
+ 2. Implementation notes added: `--notes "..."`
237
+ 3. Status set to done: `-s done`
238
+
239
+ ### Via Code (Required)
240
+ 4. Tests pass
241
+ 5. Documentation updated
242
+ 6. Code reviewed (linting, formatting)
243
+ 7. No regressions
188
244
 
189
245
  ---
190
246
 
191
247
  ## Common Mistakes
192
248
 
193
249
  | Wrong | Right |
194
- |-------|-------|
250
+ |---------|---------|
195
251
  | Edit .md files directly | Use `knowns task edit` |
196
252
  | Change `- [ ]` to `- [x]` in file | Use `--check-ac <index>` |
197
- | Add plan during creation | Add plan when starting work |
198
- | Mark Done without all criteria | Check ALL criteria first |
253
+ | Start coding without reading docs | Read docs FIRST, then plan |
254
+ | Plan without checking docs | Search and read docs before planning |
255
+ | Missing doc links in description/plan | Link docs using `[file.md](./path/file.md)` |
256
+ | Forget to use `--plain` flag | Always use `--plain` for AI |
257
+ | Forget to share plan before coding | Share plan, WAIT for approval |
258
+ | Mark done without all criteria checked | Check ALL criteria first |
259
+ | Write implementation details in AC | Write outcome-oriented criteria |
260
+ | Use `"In Progress"` or `"Done"` | Use `in-progress`, `done` |
199
261
 
200
262
  ---
201
263
 
202
- ## Search
264
+ ## Best Practices
265
+
266
+ ### Critical Rules
267
+ - **ALWAYS use `--plain` flag** for AI-readable output
268
+ - **Read documentation BEFORE planning**: `knowns search "keyword" --type doc --plain`
269
+ - **Link docs in tasks**: Use `[file.md](./path/file.md)` or `[mapper.md](./patterns/mapper.md)`
270
+ - **Share plan before coding**: Get approval first
271
+ - **Start time tracking**: `knowns time start <id>` before work
272
+ - **Stop time tracking**: `knowns time stop` after work
273
+ - **Check criteria as you go**: Don't wait until end
274
+ - **Add notes progressively**: Use `--append-notes`
275
+
276
+ ### Multi-line Input
277
+ - **Bash/Zsh**: `$'Line1\nLine2\nLine3'`
278
+ - **PowerShell**: `"Line1\`nLine2\`nLine3"`
279
+ - **Portable**: `"$(printf 'Line1\nLine2\nLine3')"`
280
+
281
+ ### Documentation Workflow
282
+ 1. Search: `knowns search "keyword" --type doc --plain`
283
+ 2. Read: `knowns doc view "Doc Name" --plain`
284
+ 3. Link in description: `[file.md](./path/file.md)`
285
+ 4. Link in plan: Reference specific sections
286
+ 5. Update after implementation
203
287
 
204
- ```bash
205
- # Search everything
206
- knowns search "auth" --plain
288
+ ---
207
289
 
208
- # Search tasks only
209
- knowns search "login" --type task --plain
290
+ ## Status & Priority Values
210
291
 
211
- # Search with filters
212
- knowns search "api" --status "In Progress" --plain
213
- knowns search "bug" --priority high --plain
214
- ```
292
+ **Status** (lowercase with hyphens):
293
+ - `todo` - Not started
294
+ - `in-progress` - Currently working
295
+ - `in-review` - In code review
296
+ - `done` - Completed
297
+ - `blocked` - Waiting on dependency
298
+
299
+ **Priority**:
300
+ - `low` - Can wait
301
+ - `medium` - Normal (default)
302
+ - `high` - Urgent, important
215
303
 
216
304
  ---
217
305
 
218
- ## Required Patterns
306
+ ## Quick Reference
219
307
 
220
- ### When Starting Task
221
308
  ```bash
222
- # Step 1: Assign and set in progress
223
- knowns task edit <id> -s "In Progress" -a @yourself
309
+ # Full workflow
310
+ knowns task create "Title" -d "Description" --ac "Criterion"
311
+ knowns task edit <id> -s in-progress -a @yourself
312
+ knowns time start <id>
313
+ knowns search "keyword" --type doc --plain
314
+ knowns doc view "Doc Name" --plain
315
+ knowns task edit <id> --plan $'1. Step (see [file.md](./file.md))\n2. Step'
316
+ # ... implement code ...
317
+ knowns task edit <id> --check-ac 1 --check-ac 2
318
+ knowns task edit <id> --append-notes "✓ Completed"
319
+ knowns time stop
320
+ knowns task edit <id> -s done
321
+
322
+ # View task
323
+ knowns task view <id> --plain
224
324
 
225
- # Step 2: Add implementation plan
226
- knowns task edit <id> --plan $'1. Research codebase\n2. Implement\n3. Test'
325
+ # List tasks
326
+ knowns task list --plain
327
+ knowns task list --status in-progress --assignee @yourself --plain
227
328
 
228
- # Step 3: Share plan with user, WAIT for approval
229
- # Step 4: Start coding only after approval
329
+ # Search
330
+ knowns search "query" --plain
331
+ knowns search "bug" --type task --status in-progress --plain
230
332
  ```
231
333
 
232
- ### When Completing Task
233
- ```bash
234
- # Step 1: Check all acceptance criteria
235
- knowns task edit <id> --check-ac 1 --check-ac 2 --check-ac 3
236
-
237
- # Step 2: Add implementation notes (PR description)
238
- knowns task edit <id> --notes $'Summary of changes\nTesting approach\nFollow-up needed'
239
-
240
- # Step 3: Mark as done
241
- knowns task edit <id> -s Done
242
- ```
334
+ ---
243
335
 
244
- ### Only Implement What's In Acceptance Criteria
245
- If you need to do more:
246
- 1. Update AC first: `knowns task edit <id> --ac "New requirement"`
247
- 2. Or create new task: `knowns task create "Additional feature"`
336
+ **Last Updated**: 2025-12-26
337
+ **Version**: 2.1.0
338
+ **Maintained By**: Knowns CLI Team
248
339
 
249
- ---
340
+ <!-- KNOWNS GUIDELINES END -->
250
341
 
251
- ## Tips
252
342
 
253
- - Always use `--plain` flag for AI-readable output
254
- - AC flags accept multiple values: `--check-ac 1 --check-ac 2`
255
- - Mixed operations work: `--check-ac 1 --uncheck-ac 2 --remove-ac 3`
256
- - Use `$'...\n...'` for multi-line input in Bash/Zsh
257
- - Related docs show as `@.knowns/docs/path/to/file.md` in plain mode
258
343
 
259
- ---
260
344
 
261
- ## Full Help
262
345
 
263
- ```bash
264
- knowns --help
265
- knowns task --help
266
- knowns doc --help
267
- knowns search --help
268
- ```
269
- <!-- KNOWNS GUIDELINES END -->
package/README.md CHANGED
@@ -71,9 +71,12 @@ bun install -g knowns
71
71
  ## Quick Start
72
72
 
73
73
  ```bash
74
- # 1. Initialize in your project
74
+ # 1. Initialize in your project (interactive wizard)
75
75
  knowns init
76
76
 
77
+ # Or with project name directly
78
+ knowns init "My Project"
79
+
77
80
  # 2. Create documentation for your patterns
78
81
  knowns doc create "Authentication Pattern" \
79
82
  -d "JWT-based auth with guards" \
@@ -204,6 +207,26 @@ knowns browser
204
207
  knowns browser -p 8080
205
208
  ```
206
209
 
210
+ ### Project Initialization
211
+
212
+ ```bash
213
+ # Interactive wizard (recommended)
214
+ knowns init
215
+
216
+ # 🚀 Knowns Project Setup Wizard
217
+ # ? Project name › my-project
218
+ # ? Default assignee (optional) › @claude
219
+ # ? Default priority for new tasks › Medium
220
+ # ? Default labels (comma-separated) › frontend, ui
221
+ # ? Time format › 24-hour
222
+
223
+ # Quick init with name
224
+ knowns init "My Project"
225
+
226
+ # Skip wizard, use defaults
227
+ knowns init --no-wizard
228
+ ```
229
+
207
230
  ### Agent Instructions
208
231
 
209
232
  ```bash
@@ -424,10 +447,23 @@ The browser UI provides:
424
447
  - **Kanban Board** - Drag & drop tasks across status columns
425
448
  - **Task Details** - Full task view with inline editing
426
449
  - **Document Browser** - Tree view with markdown preview
450
+ - **Configuration** - Full config.json editing (Form + JSON modes)
427
451
  - **Dark Mode** - System preference aware
428
- - **Search** - Global search across tasks and docs
452
+ - **Search** - Global search across tasks and docs (Cmd+K)
429
453
  - **Time Tracking** - Start/stop timers, view history
430
454
 
455
+ ### Configuration Page
456
+
457
+ Edit all project settings through the Web UI:
458
+
459
+ - **Project Name** - Change project display name
460
+ - **Default Assignee** - Set default for new tasks
461
+ - **Default Priority** - Low, Medium, High
462
+ - **Default Labels** - Comma-separated labels
463
+ - **Task Statuses** - Add/remove custom statuses with colors
464
+ - **Visible Columns** - Configure Kanban board columns
465
+ - **JSON Mode** - Direct config.json editing for advanced users
466
+
431
467
  ## MCP Server - AI Context Integration
432
468
 
433
469
  Knowns includes a Model Context Protocol server that lets AI (Claude Desktop) access your context automatically.