knowns 0.2.1 → 0.3.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 CHANGED
@@ -5,6 +5,103 @@ 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.3.1] - 2025-12-30
9
+
10
+ ### Fixed
11
+ - **Kanban Drag-Drop**: Fixed cards not being droppable into empty columns
12
+ - Implemented custom multi-strategy collision detection algorithm
13
+ - Strategy 1: Pointer position detection (most intuitive for users)
14
+ - Strategy 2: Rectangle intersection for overlapping elements
15
+ - Strategy 3: Extended bounds with 150px buffer for near-column detection
16
+ - Strategy 4: Closest corners fallback for edge cases
17
+ - Dragging is now much smoother and easier
18
+
19
+ ### Changed
20
+ - **MCP Integration Docs**: Updated `docs/mcp-integration.md` with complete tool reference
21
+ - Added all 15 MCP tools with parameters
22
+ - Added time tracking and board tools
23
+ - Added troubleshooting section for `--verbose` and `--info` flags
24
+ - Added resources section with links to official docs
25
+
26
+ ## [0.3.0] - 2025-12-29
27
+
28
+ ### Added
29
+ - **CLI Shorthand Commands**: New concise syntax for common operations
30
+ - `knowns task <id>` - Shorthand for `knowns task view <id>`
31
+ - `knowns doc <path>` - Shorthand for `knowns doc view <path>`
32
+ - Reduces typing while maintaining full command compatibility
33
+
34
+ - **New UI Components** (shadcn/ui):
35
+ - Badge, Card, Checkbox, Label, Progress, Select components
36
+ - Data Table with sorting, filtering, and pagination
37
+ - Dropdown Menu for context actions
38
+ - Kanban board components (Column, Card, Board)
39
+ - Sonner for toast notifications
40
+ - Table component for data display
41
+
42
+ - **New React Contexts**:
43
+ - `ConfigContext` - Global configuration state management
44
+ - `TimeTrackerContext` - Time tracking state across components
45
+ - `UIPreferencesContext` - User UI preferences persistence
46
+
47
+ - **Server Architecture**:
48
+ - `src/server/middleware/` - Request processing middleware
49
+ - `src/server/routes/` - Modular route handlers
50
+ - `src/server/utils/` - Server utility functions
51
+ - `src/server/types.ts` - TypeScript type definitions
52
+
53
+ - **Documentation**:
54
+ - `docs/developer-guide.md` - Developer setup and contribution guide
55
+ - `docs/user-guide.md` - End-user documentation
56
+
57
+ - **Utilities**:
58
+ - `src/ui/utils/colors.ts` - Color utility functions for UI
59
+ - `src/ui/utils/markdown-sections.ts` - Markdown section parsing
60
+
61
+ ### Changed
62
+ - **UI Architecture**: Migrated to Atomic Design pattern
63
+ - `atoms/` - Basic UI building blocks (buttons, inputs, icons)
64
+ - `molecules/` - Composed components (form fields, cards)
65
+ - `organisms/` - Complex UI sections (forms, lists, modals)
66
+ - `templates/` - Page layout templates
67
+ - Improved component reusability and maintainability
68
+
69
+ - **Server Refactoring**: Modularized monolithic server
70
+ - Split 567-line `server/index.ts` into focused modules
71
+ - Cleaner separation of concerns
72
+ - Easier testing and maintenance
73
+
74
+ - **Page Components**: Simplified and optimized
75
+ - `TasksPage` - Reduced from 700+ to ~300 lines
76
+ - `DocsPage` - Streamlined document management
77
+ - `KanbanPage` - Enhanced board functionality
78
+ - `ConfigPage` - Improved settings interface
79
+
80
+ - **API Client**: Enhanced `src/ui/api/client.ts`
81
+ - Better error handling
82
+ - Type-safe API calls
83
+ - Improved response parsing
84
+
85
+ - **Guidelines**: Updated AI agent guidelines
86
+ - Clearer reference format documentation
87
+ - Better examples for input vs output formats
88
+ - Improved workflow instructions
89
+
90
+ ### Removed
91
+ - **Legacy Components**: Cleaned up old monolithic components
92
+ - `ActivityFeed.tsx`, `AppSidebar.tsx`, `AssigneeDropdown.tsx`
93
+ - `Avatar.tsx`, `Board.tsx`, `Column.tsx`
94
+ - `MarkdownRenderer.tsx`, `NotificationBell.tsx`
95
+ - `SearchBox.tsx`, `SearchCommandDialog.tsx`
96
+ - `TaskCard.tsx`, `TaskCreateForm.tsx`, `TaskDetailModal.tsx`
97
+ - `TaskHistoryPanel.tsx`, `TimeTracker.tsx`, `VersionDiffViewer.tsx`
98
+ - Functionality preserved in new Atomic Design components
99
+
100
+ ### Fixed
101
+ - **Dialog/Sheet Components**: Fixed accessibility and styling issues
102
+ - **Mention Refs**: Improved reference parsing reliability
103
+ - **Server Notifications**: Better WebSocket notification handling
104
+
8
105
  ## [0.2.1] - 2025-12-28
9
106
 
10
107
  ### Fixed
@@ -247,6 +344,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
247
344
  - CLAUDE.md with complete guidelines for AI agents
248
345
  - Example workflows and patterns
249
346
 
347
+ [0.3.1]: https://github.com/knowns-dev/knowns/compare/v0.3.0...v0.3.1
348
+ [0.3.0]: https://github.com/knowns-dev/knowns/compare/v0.2.1...v0.3.0
349
+ [0.2.1]: https://github.com/knowns-dev/knowns/compare/v0.2.0...v0.2.1
250
350
  [0.2.0]: https://github.com/knowns-dev/knowns/compare/v0.1.8...v0.2.0
251
351
  [0.1.8]: https://github.com/knowns-dev/knowns/compare/v0.1.7...v0.1.8
252
352
  [0.1.7]: https://github.com/knowns-dev/knowns/compare/v0.1.6...v0.1.7
package/CLAUDE.md CHANGED
@@ -28,10 +28,10 @@ When starting a new session or working on an unfamiliar project:
28
28
  knowns doc list --plain
29
29
 
30
30
  # 2. Read essential project docs (prioritize these)
31
- knowns doc view "README" --plain # Project overview
32
- knowns doc view "ARCHITECTURE" --plain # System design
33
- knowns doc view "CONVENTIONS" --plain # Coding standards
34
- knowns doc view "API" --plain # API specifications
31
+ knowns doc "README" --plain # Project overview
32
+ knowns doc "ARCHITECTURE" --plain # System design
33
+ knowns doc "CONVENTIONS" --plain # Coding standards
34
+ knowns doc "API" --plain # API specifications
35
35
 
36
36
  # 3. Review current task backlog
37
37
  knowns task list --plain
@@ -42,17 +42,17 @@ knowns task list --status in-progress --plain
42
42
 
43
43
  ```bash
44
44
  # 1. View the task details
45
- knowns task view <id> --plain
45
+ knowns task <id> --plain
46
46
 
47
47
  # 2. Follow ALL refs in the task (see Reference System section)
48
- # @.knowns/tasks/task-44 - ... → knowns task view 44 --plain
49
- # @.knowns/docs/patterns/module.md → knowns doc view "patterns/module" --plain
48
+ # @.knowns/tasks/task-44 - ... → knowns task 44 --plain
49
+ # @.knowns/docs/patterns/module.md → knowns doc "patterns/module" --plain
50
50
 
51
51
  # 3. Search for additional related documentation
52
52
  knowns search "<keywords from task>" --type doc --plain
53
53
 
54
54
  # 4. Read ALL related docs before planning
55
- knowns doc view "<related-doc>" --plain
55
+ knowns doc "<related-doc>" --plain
56
56
 
57
57
  # 5. Check for similar completed tasks (learn from history)
58
58
  knowns search "<keywords>" --type task --status done --plain
@@ -90,10 +90,15 @@ Tasks and docs can contain **references** to other tasks/docs. AI agents MUST un
90
90
 
91
91
  ### Reference Formats
92
92
 
93
- | Type | User Input | System Output | CLI Command |
94
- |------|------------|---------------|-------------|
95
- | **Task ref** | `@task-<id>` | `@.knowns/tasks/task-<id> - <title>.md` | `knowns task view <id> --plain` |
96
- | **Doc ref** | `@doc/<path>` | `@.knowns/docs/<path>.md` | `knowns doc view "<path>" --plain` |
93
+ | Type | When Writing (Input) | When Reading (Output) | CLI Command |
94
+ |------|---------------------|----------------------|-------------|
95
+ | **Task ref** | `@task-<id>` | `@.knowns/tasks/task-<id> - <title>.md` | `knowns task <id> --plain` |
96
+ | **Doc ref** | `@doc/<path>` | `@.knowns/docs/<path>.md` | `knowns doc <path> --plain` |
97
+
98
+ > **CRITICAL for AI Agents**:
99
+ > - When **WRITING** refs (in descriptions, plans, notes): Use `@task-<id>` and `@doc/<path>`
100
+ > - When **READING** output from `--plain`: You'll see `@.knowns/tasks/...` and `@.knowns/docs/...`
101
+ > - **NEVER write** the output format (`@.knowns/...`) - always use input format (`@task-<id>`, `@doc/<path>`)
97
102
 
98
103
  ### How to Follow Refs
99
104
 
@@ -105,16 +110,16 @@ When you read a task and see refs in system output format, follow them:
105
110
  # @.knowns/docs/patterns/module.md
106
111
 
107
112
  # Follow task ref (extract ID from task-<id>)
108
- knowns task view 44 --plain
113
+ knowns task 44 --plain
109
114
 
110
115
  # Follow doc ref (extract path, remove .md)
111
- knowns doc view "patterns/module" --plain
116
+ knowns doc "patterns/module" --plain
112
117
  ```
113
118
 
114
119
  ### Parsing Rules
115
120
 
116
- 1. **Task refs**: `@.knowns/tasks/task-<id> - ...` → extract `<id>` → `knowns task view <id> --plain`
117
- 2. **Doc refs**: `@.knowns/docs/<path>.md` → extract `<path>` → `knowns doc view "<path>" --plain`
121
+ 1. **Task refs**: `@.knowns/tasks/task-<id> - ...` → extract `<id>` → `knowns task <id> --plain`
122
+ 2. **Doc refs**: `@.knowns/docs/<path>.md` → extract `<path>` → `knowns doc "<path>" --plain`
118
123
 
119
124
  ### Recursive Following
120
125
 
@@ -140,20 +145,20 @@ Task 42
140
145
 
141
146
  ```bash
142
147
  # 1. Read the task
143
- $ knowns task view 42 --plain
148
+ $ knowns task 42 --plain
144
149
 
145
150
  # Output contains:
146
151
  # @.knowns/tasks/task-44 - CLI Task Create Command.md
147
152
  # @.knowns/docs/README.md
148
153
 
149
154
  # 2. Follow task ref
150
- $ knowns task view 44 --plain
155
+ $ knowns task 44 --plain
151
156
 
152
157
  # 3. Follow doc ref
153
- $ knowns doc view "README" --plain
158
+ $ knowns doc "README" --plain
154
159
 
155
160
  # 4. If README contains more refs, follow them too
156
- # @.knowns/docs/patterns/module.md → knowns doc view "patterns/module" --plain
161
+ # @.knowns/docs/patterns/module.md → knowns doc "patterns/module" --plain
157
162
 
158
163
  # Now you have complete context
159
164
  ```
@@ -172,7 +177,12 @@ knowns init [name]
172
177
  knowns task create "Title" -d "Description" --ac "Criterion 1" --ac "Criterion 2"
173
178
 
174
179
  # View task (ALWAYS use --plain for AI)
175
- knowns task view <id> --plain
180
+ knowns task <id> --plain # Shorthand
181
+ knowns task view <id> --plain # Full command
182
+
183
+ # View doc (ALWAYS use --plain for AI)
184
+ knowns doc <path> --plain # Shorthand
185
+ knowns doc view "<path>" --plain # Full command
176
186
 
177
187
  # List tasks
178
188
  knowns task list --plain
@@ -202,9 +212,9 @@ $ knowns doc list --plain
202
212
  # DOC: email-templates.md
203
213
 
204
214
  # 0b. Read essential project docs
205
- $ knowns doc view "README" --plain
206
- $ knowns doc view "ARCHITECTURE" --plain
207
- $ knowns doc view "CONVENTIONS" --plain
215
+ $ knowns doc "README" --plain
216
+ $ knowns doc "ARCHITECTURE" --plain
217
+ $ knowns doc "CONVENTIONS" --plain
208
218
 
209
219
  # Now the agent understands project context and conventions
210
220
 
@@ -222,8 +232,8 @@ $ knowns task create "Add password reset flow" \
222
232
 
223
233
  # Output: Created task AUTH-042
224
234
 
225
- # 2. Take the task and start timer
226
- $ knowns task edit AUTH-042 -s in-progress -a @me
235
+ # 2. Take the task and start timer (uses defaultAssignee or @me fallback)
236
+ $ knowns task edit AUTH-042 -s in-progress -a $(knowns config get defaultAssignee --plain || echo "@me")
227
237
  $ knowns time start AUTH-042
228
238
 
229
239
  # Output: Timer started for AUTH-042
@@ -236,12 +246,12 @@ $ knowns search "password security" --type doc --plain
236
246
  # DOC: email-templates.md (score: 0.78)
237
247
 
238
248
  # 4. Read the documentation
239
- $ knowns doc view "security-patterns" --plain
249
+ $ knowns doc "security-patterns" --plain
240
250
 
241
251
  # 5. Create implementation plan (SHARE WITH USER, WAIT FOR APPROVAL)
242
- $ knowns task edit AUTH-042 --plan $'1. Review security patterns (see [security-patterns.md](./docs/security-patterns.md))
252
+ $ knowns task edit AUTH-042 --plan $'1. Review security patterns (see @doc/security-patterns)
243
253
  2. Design token generation with 1-hour expiry
244
- 3. Create email template (see [email-templates.md](./docs/email-templates.md))
254
+ 3. Create email template (see @doc/email-templates)
245
255
  4. Implement /forgot-password endpoint
246
256
  5. Implement /reset-password endpoint
247
257
  6. Add unit tests
@@ -296,17 +306,24 @@ $ knowns task edit AUTH-042 -s done
296
306
  ### Step 1: Take Task
297
307
 
298
308
  ```bash
299
- knowns task edit <id> -s in-progress -a @me
309
+ # Assign using defaultAssignee from config (falls back to @me if not set)
310
+ knowns task edit <id> -s in-progress -a $(knowns config get defaultAssignee --plain || echo "@me")
300
311
  ```
301
312
 
302
- > **Note**: `@me` is a special keyword that assigns the task to yourself. You can also use specific usernames like `@harry` or `@john`.
313
+ > **Note**: The `defaultAssignee` is configured in `.knowns/config.json` during `knowns init`. If not set, `@me` is used as fallback. To update: `knowns config set defaultAssignee "@username"`
303
314
 
304
- ### Step 2: Start Time Tracking
315
+ ### Step 2: Start Time Tracking (REQUIRED)
305
316
 
306
317
  ```bash
307
318
  knowns time start <id>
308
319
  ```
309
320
 
321
+ > **CRITICAL**: Time tracking is MANDATORY. Always start timer when taking a task and stop when done. This data is essential for:
322
+ > - Accurate project estimation
323
+ > - Identifying bottlenecks
324
+ > - Resource planning
325
+ > - Sprint retrospectives
326
+
310
327
  ### Step 3: Read Related Documentation
311
328
 
312
329
  > **FOR AI AGENTS**: This step is MANDATORY, not optional. You must understand the codebase before planning.
@@ -316,8 +333,8 @@ knowns time start <id>
316
333
  knowns search "authentication" --type doc --plain
317
334
 
318
335
  # View relevant documents
319
- knowns doc view "API Guidelines" --plain
320
- knowns doc view "Security Patterns" --plain
336
+ knowns doc "API Guidelines" --plain
337
+ knowns doc "Security Patterns" --plain
321
338
 
322
339
  # Also check for similar completed tasks
323
340
  knowns search "auth" --type task --status done --plain
@@ -328,7 +345,7 @@ knowns search "auth" --type task --status done --plain
328
345
  ### Step 4: Create Implementation Plan
329
346
 
330
347
  ```bash
331
- knowns task edit <id> --plan $'1. Research patterns (see [security-patterns.md](./security-patterns.md))
348
+ knowns task edit <id> --plan $'1. Research patterns (see @doc/security-patterns)
332
349
  2. Design middleware
333
350
  3. Implement
334
351
  4. Add tests
@@ -337,16 +354,48 @@ knowns task edit <id> --plan $'1. Research patterns (see [security-patterns.md](
337
354
 
338
355
  > **CRITICAL**:
339
356
  > - Share plan with user and **WAIT for approval** before coding
340
- > - Include doc references using `[file.md](./path/file.md)` format
357
+ > - Include doc references using `@doc/<path>` format
341
358
 
342
359
  ### Step 5: Implement
343
360
 
344
361
  ```bash
345
- # Check acceptance criteria as you complete them
346
- knowns task edit <id> --check-ac 1 --check-ac 2 --check-ac 3
362
+ # Work through implementation plan step by step
363
+ # IMPORTANT: Only check AC AFTER completing the work, not before
364
+
365
+ # After completing work for AC #1:
366
+ knowns task edit <id> --check-ac 1
367
+ knowns task edit <id> --append-notes "✓ Completed: <brief description>"
368
+
369
+ # After completing work for AC #2:
370
+ knowns task edit <id> --check-ac 2
371
+ knowns task edit <id> --append-notes "✓ Completed: <brief description>"
347
372
  ```
348
373
 
349
- ### Step 6: Add Implementation Notes
374
+ > **CRITICAL**: Never check an AC before the work is actually done. ACs represent completed outcomes, not intentions.
375
+
376
+ ### Step 6: Handle Dynamic Requests (During Implementation)
377
+
378
+ If the user adds new requirements during implementation:
379
+
380
+ ```bash
381
+ # Add new acceptance criteria
382
+ knowns task edit <id> --ac "New requirement from user"
383
+
384
+ # Update implementation plan to include new steps
385
+ knowns task edit <id> --plan $'1. Original step 1
386
+ 2. Original step 2
387
+ 3. NEW: Handle user request for X
388
+ 4. Continue with remaining work'
389
+
390
+ # Append note about scope change
391
+ knowns task edit <id> --append-notes "⚠️ Scope updated: Added requirement for X per user request"
392
+
393
+ # Continue with Step 5 (Implement) for new requirements
394
+ ```
395
+
396
+ > **Note**: Always document scope changes. This helps track why a task took longer than expected.
397
+
398
+ ### Step 7: Add Implementation Notes
350
399
 
351
400
  ```bash
352
401
  # Add comprehensive notes (suitable for PR description)
@@ -363,18 +412,77 @@ knowns task edit <id> --append-notes "✓ Implemented middleware"
363
412
  knowns task edit <id> --append-notes "✓ Added tests"
364
413
  ```
365
414
 
366
- ### Step 7: Stop Time Tracking
415
+ ### Step 8: Stop Time Tracking (REQUIRED)
367
416
 
368
417
  ```bash
369
418
  knowns time stop
370
419
  ```
371
420
 
372
- ### Step 8: Complete Task
421
+ > **CRITICAL**: Never forget to stop the timer. If you forget, use manual entry: `knowns time add <id> <duration> -n "Forgot to stop timer"`
422
+
423
+ ### Step 9: Complete Task
373
424
 
374
425
  ```bash
375
426
  knowns task edit <id> -s done
376
427
  ```
377
428
 
429
+ ### Step 10: Handle Post-Completion Changes (If Applicable)
430
+
431
+ If the user requests changes or updates AFTER task is marked done:
432
+
433
+ ```bash
434
+ # 1. Reopen task - set back to in-progress
435
+ knowns task edit <id> -s in-progress
436
+
437
+ # 2. Restart time tracking (REQUIRED)
438
+ knowns time start <id>
439
+
440
+ # 3. Add new AC for the changes requested
441
+ knowns task edit <id> --ac "Post-completion fix: <description>"
442
+
443
+ # 4. Document the reopen reason
444
+ knowns task edit <id> --append-notes "🔄 Reopened: User requested changes - <reason>"
445
+
446
+ # 5. Follow Step 5-9 again (Implement → Notes → Stop Timer → Done)
447
+ ```
448
+
449
+ > **CRITICAL**: Treat post-completion changes as a mini-workflow. Always:
450
+ > - Reopen task (in-progress)
451
+ > - Start timer again
452
+ > - Add AC for traceability
453
+ > - Document why it was reopened
454
+ > - Follow the same completion process
455
+
456
+ ### Step 11: Knowledge Extraction (Post-Completion)
457
+
458
+ After completing a task, extract reusable knowledge to docs:
459
+
460
+ ```bash
461
+ # Search if similar pattern already documented
462
+ knowns search "<pattern/concept>" --type doc --plain
463
+
464
+ # If new knowledge, create a doc for future reference
465
+ knowns doc create "Pattern: <Name>" \
466
+ -d "Reusable pattern discovered during task implementation" \
467
+ -t "pattern,<domain>" \
468
+ -f "patterns"
469
+
470
+ # Or append to existing doc
471
+ knowns doc edit "<existing-doc>" -a "## New Section\n\nLearned from task <id>: ..."
472
+
473
+ # Reference the source task
474
+ knowns doc edit "<doc-name>" -a "\n\n> Source: @task-<id>"
475
+ ```
476
+
477
+ **When to extract knowledge:**
478
+ - New patterns/conventions discovered
479
+ - Common error solutions
480
+ - Reusable code snippets or approaches
481
+ - Integration patterns with external services
482
+ - Performance optimization techniques
483
+
484
+ > **CRITICAL**: Only extract **generalizable** knowledge. Task-specific details belong in implementation notes, not docs.
485
+
378
486
  ---
379
487
 
380
488
  ## Essential Commands
@@ -390,7 +498,7 @@ knowns task edit <id> -t "New title"
390
498
  knowns task edit <id> -d "New description"
391
499
  knowns task edit <id> -s in-progress
392
500
  knowns task edit <id> --priority high
393
- knowns task edit <id> -a @me
501
+ knowns task edit <id> -a <assignee> # $(knowns config get defaultAssignee --plain || echo "@me")
394
502
 
395
503
  # Acceptance Criteria
396
504
  knowns task edit <id> --ac "New criterion" # Add
@@ -404,10 +512,11 @@ knowns task edit <id> --notes "Implementation summary"
404
512
  knowns task edit <id> --append-notes "Progress update"
405
513
 
406
514
  # View & List
407
- knowns task view <id> --plain # ALWAYS use --plain
515
+ knowns task <id> --plain # Shorthand (ALWAYS use --plain)
516
+ knowns task view <id> --plain # Full command
408
517
  knowns task list --plain
409
518
  knowns task list --status in-progress --plain
410
- knowns task list --assignee @me --plain
519
+ knowns task list --assignee <assignee> --plain # $(knowns config get defaultAssignee --plain || echo "@me")
411
520
  knowns task list --tree --plain # Tree hierarchy
412
521
  ```
413
522
 
@@ -435,7 +544,8 @@ knowns time report --by-label --csv > report.csv
435
544
  # List & View
436
545
  knowns doc list --plain
437
546
  knowns doc list --tag architecture --plain
438
- knowns doc view "Doc Name" --plain
547
+ knowns doc <path> --plain # Shorthand (ALWAYS use --plain)
548
+ knowns doc view "<path>" --plain # Full command
439
549
 
440
550
  # Create (with optional folder)
441
551
  knowns doc create "Title" -d "Description" -t "tags"
@@ -479,14 +589,12 @@ Clear summary (WHAT needs to be done).
479
589
 
480
590
  ### Description
481
591
 
482
- Explains WHY and WHAT (not HOW). **Link related docs using `[file.md](./path/file.md)`**
592
+ Explains WHY and WHAT (not HOW). **Link related docs using `@doc/<path>`**
483
593
 
484
594
  ```markdown
485
595
  We need JWT authentication because sessions don't scale for our microservices architecture.
486
596
 
487
- Related docs:
488
- - [security-patterns.md](./docs/security-patterns.md)
489
- - [api-guidelines.md](./docs/api-guidelines.md)
597
+ Related docs: @doc/security-patterns, @doc/api-guidelines
490
598
  ```
491
599
 
492
600
  ### Acceptance Criteria
@@ -504,7 +612,7 @@ Related docs:
504
612
  HOW to solve. Added AFTER taking task, BEFORE coding.
505
613
 
506
614
  ```markdown
507
- 1. Research JWT libraries (see [security-patterns.md](./docs/security-patterns.md))
615
+ 1. Research JWT libraries (see @doc/security-patterns)
508
616
  2. Design token structure (access + refresh tokens)
509
617
  3. Implement auth middleware
510
618
  4. Add unit tests (aim for 90%+ coverage)
@@ -544,7 +652,7 @@ Implemented JWT auth using jsonwebtoken library.
544
652
  | `Error: No active timer` | Calling `time stop` without active timer | Start timer first: `knowns time start <id>` |
545
653
  | `Error: Timer already running` | Starting timer when one is active | Stop current: `knowns time stop` |
546
654
  | `Error: Invalid status` | Wrong status format | Use lowercase with hyphens: `in-progress`, not `In Progress` |
547
- | `Error: AC index out of range` | Checking non-existent criterion | View task first: `knowns task view <id> --plain` |
655
+ | `Error: AC index out of range` | Checking non-existent criterion | View task first: `knowns task <id> --plain` |
548
656
  | `Error: Document not found` | Wrong document name | Run `knowns doc list --plain` to find correct name |
549
657
  | `Error: Not initialized` | Running commands without init | Run `knowns init` first |
550
658
 
@@ -558,7 +666,7 @@ knowns --version
558
666
  knowns status
559
667
 
560
668
  # View raw task data (for debugging)
561
- knowns task view <id> --json
669
+ knowns task <id> --json
562
670
 
563
671
  # Check timer status
564
672
  knowns time status
@@ -572,10 +680,11 @@ A task is **Done** ONLY when **ALL** criteria are met:
572
680
 
573
681
  ### Via CLI (Required)
574
682
 
575
- - [ ] All acceptance criteria checked: `--check-ac <index>`
683
+ - [ ] All acceptance criteria checked: `--check-ac <index>` (only after work is actually done)
576
684
  - [ ] Implementation notes added: `--notes "..."`
577
- - [ ] Timer stopped: `knowns time stop`
685
+ - [ ] ⏱️ Timer stopped: `knowns time stop` (MANDATORY - do not skip!)
578
686
  - [ ] Status set to done: `-s done`
687
+ - [ ] Knowledge extracted to docs (if applicable)
579
688
 
580
689
  ### Via Code (Required)
581
690
 
@@ -616,21 +725,24 @@ Use **lowercase with hyphens**:
616
725
  |-------|-------|
617
726
  | Edit .md files directly | Use `knowns task edit` |
618
727
  | Change `- [ ]` to `- [x]` in file | Use `--check-ac <index>` |
728
+ | Check AC before completing work | Only check AC AFTER work is actually done |
729
+ | Skip time tracking | ALWAYS use `time start` and `time stop` |
619
730
  | Start coding without reading docs | Read ALL related docs FIRST |
620
731
  | Skip `knowns doc list` on new project | Always list docs when starting |
621
732
  | Assume you know the conventions | Read CONVENTIONS/ARCHITECTURE docs |
622
733
  | Plan without checking docs | Read docs before planning |
623
734
  | Ignore similar completed tasks | Search done tasks for patterns |
624
- | Missing doc links in description/plan | Link docs using `[file.md](./path)` |
735
+ | Missing doc links in description/plan | Link docs using `@doc/<path>` |
736
+ | Write refs as `@.knowns/docs/...` or `@.knowns/tasks/...` | Use input format: `@doc/<path>`, `@task-<id>` |
625
737
  | Forget `--plain` flag | Always use `--plain` for AI |
626
738
  | Code before plan approval | Share plan, WAIT for approval |
627
739
  | Mark done without all criteria | Check ALL criteria first |
628
740
  | Write implementation steps in AC | Write outcome-oriented criteria |
629
741
  | Use `"In Progress"` or `"Done"` | Use `in-progress`, `done` |
630
- | Use `@yourself` | Use `@me` or specific username |
742
+ | Use `@yourself` or unknown assignee | Use `$(knowns config get defaultAssignee --plain \|\| echo "@me")` |
631
743
  | Ignore refs in task description | Follow ALL refs (`@.knowns/...`) before planning |
632
- | See `@.knowns/docs/...` but don't read | Use `knowns doc view "<path>" --plain` |
633
- | See `@.knowns/tasks/task-X` but don't check | Use `knowns task view X --plain` for context |
744
+ | See `@.knowns/docs/...` but don't read | Use `knowns doc "<path>" --plain` |
745
+ | See `@.knowns/tasks/task-X` but don't check | Use `knowns task X --plain` for context |
634
746
  | Follow only first-level refs | Recursively follow nested refs until complete |
635
747
 
636
748
  ---
@@ -688,27 +800,28 @@ EOF
688
800
  - [ ] ALL refs in task followed (`@.knowns/...`)
689
801
  - [ ] Nested refs recursively followed until complete context gathered
690
802
  - [ ] Related docs searched: `knowns search "keyword" --type doc --plain`
691
- - [ ] ALL relevant docs read: `knowns doc view "Doc Name" --plain`
803
+ - [ ] ALL relevant docs read: `knowns doc "Doc Name" --plain`
692
804
  - [ ] Similar done tasks reviewed for patterns
693
- - [ ] Task assigned to self: `-a @me`
805
+ - [ ] Task assigned to self: `-a $(knowns config get defaultAssignee --plain || echo "@me")`
694
806
  - [ ] Status set to in-progress: `-s in-progress`
695
807
  - [ ] Timer started: `knowns time start <id>`
696
808
 
697
809
  ### During Work
698
810
 
699
811
  - [ ] Implementation plan created and approved
700
- - [ ] Doc links included in plan: `[file.md](./path/file.md)`
812
+ - [ ] Doc links included in plan: `@doc/<path>`
701
813
  - [ ] Criteria checked as completed: `--check-ac <index>`
702
814
  - [ ] Progress notes appended: `--append-notes "✓ ..."`
703
815
 
704
816
  ### After Work
705
817
 
706
- - [ ] All acceptance criteria checked
818
+ - [ ] All acceptance criteria checked (only after work is done)
707
819
  - [ ] Implementation notes added: `--notes "..."`
708
820
  - [ ] Timer stopped: `knowns time stop`
709
821
  - [ ] Tests passing
710
822
  - [ ] Documentation updated
711
823
  - [ ] Status set to done: `-s done`
824
+ - [ ] Knowledge extracted to docs (if applicable): patterns, solutions, conventions
712
825
 
713
826
  ---
714
827
 
@@ -717,28 +830,32 @@ EOF
717
830
  ```bash
718
831
  # === AGENT INITIALIZATION (Once per session) ===
719
832
  knowns doc list --plain
720
- knowns doc view "README" --plain
721
- knowns doc view "ARCHITECTURE" --plain
722
- knowns doc view "CONVENTIONS" --plain
833
+ knowns doc "README" --plain
834
+ knowns doc "ARCHITECTURE" --plain
835
+ knowns doc "CONVENTIONS" --plain
723
836
 
724
837
  # === FULL WORKFLOW ===
725
838
  knowns task create "Title" -d "Description" --ac "Criterion"
726
- knowns task edit <id> -s in-progress -a @me
727
- knowns time start <id>
839
+ knowns task edit <id> -s in-progress -a $(knowns config get defaultAssignee --plain || echo "@me")
840
+ knowns time start <id> # ⏱️ REQUIRED: Start timer
728
841
  knowns search "keyword" --type doc --plain
729
- knowns doc view "Doc Name" --plain
842
+ knowns doc "Doc Name" --plain
730
843
  knowns search "keyword" --type task --status done --plain # Learn from history
731
- knowns task edit <id> --plan $'1. Step (see [file.md](./file.md))\n2. Step'
844
+ knowns task edit <id> --plan $'1. Step (see @doc/file)\n2. Step'
732
845
  # ... wait for approval, then implement ...
733
- knowns task edit <id> --check-ac 1 --check-ac 2
734
- knowns task edit <id> --append-notes "✓ Completed feature"
735
- knowns time stop
846
+ # Only check AC AFTER completing the work:
847
+ knowns task edit <id> --check-ac 1
848
+ knowns task edit <id> --append-notes "✓ Completed: feature X"
849
+ knowns task edit <id> --check-ac 2
850
+ knowns task edit <id> --append-notes "✓ Completed: feature Y"
851
+ knowns time stop # ⏱️ REQUIRED: Stop timer
736
852
  knowns task edit <id> -s done
853
+ # Optional: Extract knowledge to docs if generalizable patterns found
737
854
 
738
855
  # === VIEW & SEARCH ===
739
- knowns task view <id> --plain
856
+ knowns task <id> --plain # Shorthand for view
740
857
  knowns task list --plain
741
- knowns task list --status in-progress --assignee @me --plain
858
+ knowns task list --status in-progress --assignee $(knowns config get defaultAssignee --plain || echo "@me") --plain
742
859
  knowns search "query" --plain
743
860
  knowns search "bug" --type task --status in-progress --plain
744
861
 
@@ -750,7 +867,7 @@ knowns time report --from "2025-12-01" --to "2025-12-31"
750
867
 
751
868
  # === DOCUMENTATION ===
752
869
  knowns doc list --plain
753
- knowns doc view "path/doc-name" --plain
870
+ knowns doc "path/doc-name" --plain # Shorthand for view
754
871
  knowns doc create "Title" -d "Description" -t "tags" -f "folder"
755
872
  knowns doc edit "doc-name" -c "New content"
756
873
  knowns doc edit "doc-name" -a "Appended content"
@@ -774,3 +891,8 @@ knowns doc edit "doc-name" -a "Appended content"
774
891
 
775
892
 
776
893
 
894
+
895
+
896
+
897
+
898
+