knowns 0.1.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 +269 -0
- package/LICENSE +21 -0
- package/README.md +535 -0
- package/dist/index.js +22947 -0
- package/dist/mcp/server.js +27175 -0
- package/dist/ui/main.css +21 -0
- package/dist/ui/main.js +45529 -0
- package/package.json +66 -0
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<!-- KNOWNS GUIDELINES START -->
|
|
2
|
+
# Knowns CLI Guidelines
|
|
3
|
+
|
|
4
|
+
## Core Principle
|
|
5
|
+
|
|
6
|
+
**NEVER edit .md files directly. ALL operations MUST use CLI commands.**
|
|
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
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Task Management
|
|
22
|
+
|
|
23
|
+
### Task Lifecycle
|
|
24
|
+
|
|
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
|
|
29
|
+
|
|
30
|
+
### Critical Commands
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# View task (always use --plain for AI)
|
|
34
|
+
knowns task view <id> --plain
|
|
35
|
+
|
|
36
|
+
# List tasks
|
|
37
|
+
knowns task list --plain
|
|
38
|
+
knowns task list -s "In Progress" --plain
|
|
39
|
+
|
|
40
|
+
# Search tasks/docs
|
|
41
|
+
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
|
+
```
|
|
61
|
+
|
|
62
|
+
### Multi-line Input (Shell-specific)
|
|
63
|
+
|
|
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
|
+
```
|
|
70
|
+
|
|
71
|
+
**PowerShell** - Use backtick-n:
|
|
72
|
+
```powershell
|
|
73
|
+
knowns task edit 42 --notes "Line1`nLine2"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Portable** - Use printf:
|
|
77
|
+
```bash
|
|
78
|
+
knowns task edit 42 --notes "$(printf 'Line1\nLine2')"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Task Workflow
|
|
84
|
+
|
|
85
|
+
### Step 1: Take Task
|
|
86
|
+
```bash
|
|
87
|
+
knowns task edit <id> -s "In Progress" -a @yourself
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 2: Create Plan
|
|
91
|
+
```bash
|
|
92
|
+
knowns task edit <id> --plan $'1. Research\n2. Implement\n3. Test'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**IMPORTANT**: Share plan with user and wait for approval before coding.
|
|
96
|
+
|
|
97
|
+
### Step 3: Implementation
|
|
98
|
+
Write code, then check acceptance criteria:
|
|
99
|
+
```bash
|
|
100
|
+
knowns task edit <id> --check-ac 1 --check-ac 2 --check-ac 3
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Step 4: Add Notes (PR Description)
|
|
104
|
+
```bash
|
|
105
|
+
knowns task edit <id> --notes $'Implemented using X pattern\nUpdated tests\nReady for review'
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Or append progressively:
|
|
109
|
+
```bash
|
|
110
|
+
knowns task edit <id> --append-notes "Completed feature X"
|
|
111
|
+
knowns task edit <id> --append-notes "Added tests"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 5: Complete
|
|
115
|
+
```bash
|
|
116
|
+
knowns task edit <id> -s Done
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Definition of Done
|
|
122
|
+
|
|
123
|
+
Task is Done ONLY when ALL items are complete:
|
|
124
|
+
|
|
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`
|
|
129
|
+
|
|
130
|
+
**Via Code:**
|
|
131
|
+
4. Tests pass
|
|
132
|
+
5. Documentation updated
|
|
133
|
+
6. Code reviewed
|
|
134
|
+
7. No regressions
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Documentation Management
|
|
139
|
+
|
|
140
|
+
### Commands
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# List all docs (includes nested folders)
|
|
144
|
+
knowns doc list --plain
|
|
145
|
+
|
|
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"
|
|
153
|
+
|
|
154
|
+
# Edit metadata
|
|
155
|
+
knowns doc edit <name> -t "New Title" -d "New Description"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Document Links
|
|
159
|
+
|
|
160
|
+
In `--plain` mode, markdown links are replaced with resolved paths:
|
|
161
|
+
- `[guards.md](./patterns/guards.md)` → `@.knowns/docs/patterns/guards.md`
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Task Structure
|
|
166
|
+
|
|
167
|
+
### Title
|
|
168
|
+
Brief, clear summary of the task.
|
|
169
|
+
|
|
170
|
+
### Description
|
|
171
|
+
Explains WHY and WHAT (not HOW). Provides context.
|
|
172
|
+
|
|
173
|
+
### Acceptance Criteria
|
|
174
|
+
**Outcome-oriented**, testable, user-focused criteria.
|
|
175
|
+
|
|
176
|
+
Good:
|
|
177
|
+
- "User can login with valid credentials"
|
|
178
|
+
- "System processes 1000 requests/sec without errors"
|
|
179
|
+
|
|
180
|
+
Bad:
|
|
181
|
+
- "Add function handleLogin() in auth.ts" (implementation detail)
|
|
182
|
+
|
|
183
|
+
### Implementation Plan (added during work)
|
|
184
|
+
**HOW** to solve the task. Added AFTER taking the task, BEFORE coding.
|
|
185
|
+
|
|
186
|
+
### Implementation Notes (PR description)
|
|
187
|
+
Summary of what was done, suitable for PR. Added AFTER completion.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Common Mistakes
|
|
192
|
+
|
|
193
|
+
| Wrong | Right |
|
|
194
|
+
|-------|-------|
|
|
195
|
+
| Edit .md files directly | Use `knowns task edit` |
|
|
196
|
+
| 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 |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Search
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Search everything
|
|
206
|
+
knowns search "auth" --plain
|
|
207
|
+
|
|
208
|
+
# Search tasks only
|
|
209
|
+
knowns search "login" --type task --plain
|
|
210
|
+
|
|
211
|
+
# Search with filters
|
|
212
|
+
knowns search "api" --status "In Progress" --plain
|
|
213
|
+
knowns search "bug" --priority high --plain
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Required Patterns
|
|
219
|
+
|
|
220
|
+
### When Starting Task
|
|
221
|
+
```bash
|
|
222
|
+
# Step 1: Assign and set in progress
|
|
223
|
+
knowns task edit <id> -s "In Progress" -a @yourself
|
|
224
|
+
|
|
225
|
+
# Step 2: Add implementation plan
|
|
226
|
+
knowns task edit <id> --plan $'1. Research codebase\n2. Implement\n3. Test'
|
|
227
|
+
|
|
228
|
+
# Step 3: Share plan with user, WAIT for approval
|
|
229
|
+
# Step 4: Start coding only after approval
|
|
230
|
+
```
|
|
231
|
+
|
|
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
|
+
```
|
|
243
|
+
|
|
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"`
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Tips
|
|
252
|
+
|
|
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
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Full Help
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
knowns --help
|
|
265
|
+
knowns task --help
|
|
266
|
+
knowns doc --help
|
|
267
|
+
knowns search --help
|
|
268
|
+
```
|
|
269
|
+
<!-- KNOWNS GUIDELINES END -->
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Knowns Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|