knowns 0.5.0 → 0.7.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/CLAUDE.md CHANGED
@@ -1,5 +1,3 @@
1
- /Users/howznguyen/Workspaces/Knowns/knowns/src/templates/knowns-guidelines-cli.md
2
-
3
1
  <!-- KNOWNS GUIDELINES START -->
4
2
  # Knowns CLI Guidelines
5
3
 
@@ -561,6 +559,26 @@ knowns doc edit "Doc Name" -c "New content" # Replace content
561
559
  knowns doc edit "Doc Name" -a "Appended content" # Append to content
562
560
  ```
563
561
 
562
+ #### Doc Organization
563
+
564
+ | Doc Type | Location | Example |
565
+ |----------|----------|---------|
566
+ | **Important/Core docs** | Root `.knowns/docs/` | `README.md`, `ARCHITECTURE.md`, `CONVENTIONS.md` |
567
+ | **Guides** | `.knowns/docs/guides/` | `guides/getting-started.md` |
568
+ | **Patterns** | `.knowns/docs/patterns/` | `patterns/controller.md` |
569
+ | **API docs** | `.knowns/docs/api/` | `api/endpoints.md` |
570
+ | **Other categorized docs** | `.knowns/docs/<category>/` | `security/auth-patterns.md` |
571
+
572
+ ```bash
573
+ # Important docs - at root (no -f flag)
574
+ knowns doc create "README" -d "Project overview" -t "core"
575
+ knowns doc create "ARCHITECTURE" -d "System design" -t "core"
576
+
577
+ # Categorized docs - use -f for folder
578
+ knowns doc create "Getting Started" -d "Setup guide" -t "guide" -f "guides"
579
+ knowns doc create "Controller Pattern" -d "MVC pattern" -t "pattern" -f "patterns"
580
+ ```
581
+
564
582
  ### Search
565
583
 
566
584
  ```bash
@@ -746,6 +764,83 @@ Use **lowercase with hyphens**:
746
764
  | See `@.knowns/docs/...` but don't read | Use `knowns doc "<path>" --plain` |
747
765
  | See `@.knowns/tasks/task-X` but don't check | Use `knowns task X --plain` for context |
748
766
  | Follow only first-level refs | Recursively follow nested refs until complete |
767
+ | Use `--plain` with `task create` | `--plain` is only for view/list commands |
768
+ | Use `--plain` with `task edit` | `--plain` is only for view/list commands |
769
+ | Use `--plain` with `doc create` | `--plain` is only for view/list commands |
770
+ | Use `--plain` with `doc edit` | `--plain` is only for view/list commands |
771
+
772
+ ---
773
+
774
+ ## The `--plain` Flag (AI Agents)
775
+
776
+ > **⚠️ CRITICAL FOR AI AGENTS**: The `--plain` flag is ONLY supported by **view/list/search** commands. Using it with create/edit commands will cause errors!
777
+
778
+ ### ✅ Commands that support `--plain`
779
+
780
+ These are **read-only** commands - use `--plain` to get clean output:
781
+
782
+ ```bash
783
+ # Task viewing/listing
784
+ knowns task <id> --plain
785
+ knowns task view <id> --plain
786
+ knowns task list --plain
787
+ knowns task list --status in-progress --plain
788
+
789
+ # Doc viewing/listing
790
+ knowns doc <path> --plain
791
+ knowns doc view "<path>" --plain
792
+ knowns doc list --plain
793
+ knowns doc list --tag <tag> --plain
794
+
795
+ # Search
796
+ knowns search "<query>" --plain
797
+ knowns search "<query>" --type task --plain
798
+ knowns search "<query>" --type doc --plain
799
+
800
+ # Config
801
+ knowns config get <key> --plain
802
+ ```
803
+
804
+ ### ❌ Commands that do NOT support `--plain`
805
+
806
+ These are **write** commands - NEVER use `--plain`:
807
+
808
+ ```bash
809
+ # Task create/edit - NO --plain!
810
+ knowns task create "Title" -d "Description" # ✅ Correct
811
+ knowns task create "Title" --plain # ❌ ERROR!
812
+ knowns task edit <id> -s done # ✅ Correct
813
+ knowns task edit <id> -s done --plain # ❌ ERROR!
814
+
815
+ # Doc create/edit - NO --plain!
816
+ knowns doc create "Title" -d "Description" # ✅ Correct
817
+ knowns doc create "Title" --plain # ❌ ERROR!
818
+ knowns doc edit "name" -c "content" # ✅ Correct
819
+ knowns doc edit "name" -c "content" --plain # ❌ ERROR!
820
+
821
+ # Time tracking - NO --plain!
822
+ knowns time start <id> # ✅ Correct
823
+ knowns time stop # ✅ Correct
824
+ knowns time add <id> 2h # ✅ Correct
825
+ ```
826
+
827
+ ### Quick Reference Table
828
+
829
+ | Command Type | Example | `--plain` Support |
830
+ |-------------|---------|-------------------|
831
+ | `task <id>` | `knowns task 42 --plain` | ✅ Yes |
832
+ | `task list` | `knowns task list --plain` | ✅ Yes |
833
+ | `task create` | `knowns task create "Title"` | ❌ No |
834
+ | `task edit` | `knowns task edit 42 -s done` | ❌ No |
835
+ | `doc <path>` | `knowns doc "README" --plain` | ✅ Yes |
836
+ | `doc list` | `knowns doc list --plain` | ✅ Yes |
837
+ | `doc create` | `knowns doc create "Title"` | ❌ No |
838
+ | `doc edit` | `knowns doc edit "name" -c "..."` | ❌ No |
839
+ | `search` | `knowns search "query" --plain` | ✅ Yes |
840
+ | `time start/stop` | `knowns time start 42` | ❌ No |
841
+ | `time add` | `knowns time add 42 2h` | ❌ No |
842
+ | `config get` | `knowns config get key --plain` | ✅ Yes |
843
+ | `config set` | `knowns config set key value` | ❌ No |
749
844
 
750
845
  ---
751
846
 
@@ -902,11 +997,3 @@ knowns doc edit "doc-name" -a "Appended content"
902
997
  <!-- KNOWNS GUIDELINES END -->
903
998
 
904
999
 
905
-
906
-
907
-
908
-
909
-
910
-
911
-
912
-