@purpleraven/hits 0.2.0 → 0.2.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/AGENTS.md +75 -75
- package/README.md +163 -163
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -19,137 +19,137 @@ If pre-flight checks fail, fix the errors before proceeding.
|
|
|
19
19
|
|
|
20
20
|
## AI Session Handover Protocol
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
When an AI session is replaced due to token limits, project-specific handover activates automatically.
|
|
23
|
+
All data is centrally stored at `~/.hits/data/` and isolated by project path.
|
|
24
24
|
|
|
25
|
-
###
|
|
25
|
+
### On Session Start
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
# HTTP API (HITS
|
|
28
|
+
# HTTP API (when HITS server is running)
|
|
29
29
|
curl -s "http://localhost:8765/api/handover?project_path=$(pwd)" | python -m json.tool
|
|
30
30
|
|
|
31
|
-
#
|
|
32
|
-
# hits_get_handover →
|
|
31
|
+
# Or via MCP tool (when HITS MCP is configured):
|
|
32
|
+
# hits_get_handover → Retrieve previous session's work, decisions, and unfinished items
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### On Session End (MUST record)
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
curl -X POST http://localhost:8765/api/work-log \
|
|
39
39
|
-H "Content-Type: application/json" \
|
|
40
40
|
-d '{
|
|
41
|
-
"performed_by": "<
|
|
42
|
-
"request_text": "
|
|
43
|
-
"context": "
|
|
41
|
+
"performed_by": "<AI_tool_name>",
|
|
42
|
+
"request_text": "<work summary>",
|
|
43
|
+
"context": "<details, decisions>",
|
|
44
44
|
"source": "ai_session",
|
|
45
|
-
"tags": ["
|
|
46
|
-
"project_path": "
|
|
45
|
+
"tags": ["<tag>"],
|
|
46
|
+
"project_path": "<project_absolute_path>",
|
|
47
47
|
"result_data": {
|
|
48
|
-
"files_modified": ["
|
|
49
|
-
"commands_run": ["
|
|
48
|
+
"files_modified": ["<modified_file>"],
|
|
49
|
+
"commands_run": ["<executed_command>"]
|
|
50
50
|
}
|
|
51
51
|
}'
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### performed_by
|
|
54
|
+
### performed_by Values
|
|
55
55
|
|
|
56
|
-
| AI
|
|
57
|
-
|
|
56
|
+
| AI Tool | performed_by Value |
|
|
57
|
+
|---------|-------------------|
|
|
58
58
|
| OpenCode | `"opencode"` |
|
|
59
59
|
| Claude Code | `"claude"` |
|
|
60
60
|
| Cursor | `"cursor"` |
|
|
61
61
|
| GitHub Copilot | `"copilot"` |
|
|
62
|
-
|
|
|
62
|
+
| Manual | `"manual"` or username |
|
|
63
63
|
|
|
64
|
-
### project_path
|
|
64
|
+
### project_path Rules
|
|
65
65
|
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
66
|
+
- **Always use absolute paths**: `"/home/user/source/my-project"` (O), `"./my-project"` (X)
|
|
67
|
+
- **Auto-detection**: Use the directory containing `.git` from CWD as the project path
|
|
68
|
+
- **Project isolation**: Different `project_path` values have completely independent handover contexts
|
|
69
69
|
|
|
70
|
-
### MCP
|
|
70
|
+
### MCP Tools (Recommended)
|
|
71
71
|
|
|
72
|
-
HITS MCP
|
|
72
|
+
When the HITS MCP server is configured, use direct tool calls instead of HTTP API:
|
|
73
73
|
|
|
74
74
|
```
|
|
75
|
-
hits_record_work →
|
|
76
|
-
hits_get_handover →
|
|
77
|
-
hits_search_works →
|
|
78
|
-
hits_list_projects →
|
|
79
|
-
hits_get_recent →
|
|
75
|
+
hits_record_work → Record work entry (auto-detects project_path)
|
|
76
|
+
hits_get_handover → Query handover summary
|
|
77
|
+
hits_search_works → Search past work
|
|
78
|
+
hits_list_projects → List projects
|
|
79
|
+
hits_get_recent → Get recent work
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
###
|
|
82
|
+
### When to Record
|
|
83
83
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
84
|
+
- At the end of a long work session with the user
|
|
85
|
+
- After completing a major feature implementation
|
|
86
|
+
- After fixing a bug
|
|
87
|
+
- When the user explicitly requests to end the session
|
|
88
|
+
- **On token limit warning** (record immediately!)
|
|
89
89
|
|
|
90
|
-
###
|
|
90
|
+
### Data Store
|
|
91
91
|
|
|
92
|
-
|
|
|
93
|
-
|
|
94
|
-
| `~/.hits/data/work_logs/` |
|
|
95
|
-
| `~/.hits/data/trees/` |
|
|
96
|
-
| `~/.hits/data/workflows/` |
|
|
97
|
-
| `~/.hits/.auth/` |
|
|
98
|
-
| `HITS_DATA_PATH`
|
|
92
|
+
| Location | Description |
|
|
93
|
+
|----------|-------------|
|
|
94
|
+
| `~/.hits/data/work_logs/` | Work logs (JSON) |
|
|
95
|
+
| `~/.hits/data/trees/` | Knowledge trees |
|
|
96
|
+
| `~/.hits/data/workflows/` | Workflows |
|
|
97
|
+
| `~/.hits/.auth/` | Auth data (permissions 600/700) |
|
|
98
|
+
| `HITS_DATA_PATH` env var | Override storage path |
|
|
99
99
|
|
|
100
100
|
## API Endpoints
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### Authentication
|
|
103
103
|
|
|
104
104
|
| Method | Path | Description |
|
|
105
105
|
|--------|------|-------------|
|
|
106
|
-
| GET | `/api/auth/status` |
|
|
107
|
-
| POST | `/api/auth/register` |
|
|
108
|
-
| POST | `/api/auth/login` |
|
|
109
|
-
| POST | `/api/auth/logout` |
|
|
110
|
-
| POST | `/api/auth/refresh` |
|
|
111
|
-
| GET | `/api/auth/me` |
|
|
112
|
-
| PUT | `/api/auth/password` |
|
|
106
|
+
| GET | `/api/auth/status` | Auth status (initialized, logged in) |
|
|
107
|
+
| POST | `/api/auth/register` | Register user (first user = admin) |
|
|
108
|
+
| POST | `/api/auth/login` | Login (sets HttpOnly cookies) |
|
|
109
|
+
| POST | `/api/auth/logout` | Logout |
|
|
110
|
+
| POST | `/api/auth/refresh` | Refresh access token |
|
|
111
|
+
| GET | `/api/auth/me` | Current user info |
|
|
112
|
+
| PUT | `/api/auth/password` | Change password |
|
|
113
113
|
|
|
114
|
-
###
|
|
114
|
+
### Work Logs
|
|
115
115
|
|
|
116
116
|
| Method | Path | Description |
|
|
117
117
|
|--------|------|-------------|
|
|
118
|
-
| GET | `/api/health` |
|
|
119
|
-
| POST | `/api/work-log` |
|
|
120
|
-
| GET | `/api/work-logs` |
|
|
121
|
-
| GET | `/api/work-logs/search?q
|
|
122
|
-
| GET | `/api/work-log/{id}` |
|
|
123
|
-
| PUT | `/api/work-log/{id}` |
|
|
124
|
-
| DELETE | `/api/work-log/{id}` |
|
|
118
|
+
| GET | `/api/health` | Server health check |
|
|
119
|
+
| POST | `/api/work-log` | Create work log |
|
|
120
|
+
| GET | `/api/work-logs` | List work logs (supports `project_path` filter) |
|
|
121
|
+
| GET | `/api/work-logs/search?q=keyword` | Search work logs (supports `project_path` filter) |
|
|
122
|
+
| GET | `/api/work-log/{id}` | Get single entry |
|
|
123
|
+
| PUT | `/api/work-log/{id}` | Update entry |
|
|
124
|
+
| DELETE | `/api/work-log/{id}` | Delete entry |
|
|
125
125
|
|
|
126
|
-
###
|
|
126
|
+
### Handover
|
|
127
127
|
|
|
128
128
|
| Method | Path | Description |
|
|
129
129
|
|--------|------|-------------|
|
|
130
|
-
| GET | `/api/handover?project_path=...` |
|
|
131
|
-
| GET | `/api/handover/projects` |
|
|
132
|
-
| GET | `/api/handover/project-stats?project_path=...` |
|
|
130
|
+
| GET | `/api/handover?project_path=...` | Project handover summary |
|
|
131
|
+
| GET | `/api/handover/projects` | List projects |
|
|
132
|
+
| GET | `/api/handover/project-stats?project_path=...` | Project stats |
|
|
133
133
|
|
|
134
|
-
###
|
|
134
|
+
### Knowledge Categories
|
|
135
135
|
|
|
136
136
|
| Method | Path | Description |
|
|
137
137
|
|--------|------|-------------|
|
|
138
|
-
| GET | `/api/knowledge/categories` |
|
|
139
|
-
| POST | `/api/knowledge/category` |
|
|
140
|
-
| PUT | `/api/knowledge/category/{name}` |
|
|
141
|
-
| DELETE | `/api/knowledge/category/{name}` |
|
|
142
|
-
| POST | `/api/knowledge/category/{name}/nodes` |
|
|
143
|
-
| PUT | `/api/knowledge/category/{name}/nodes/{idx}` |
|
|
144
|
-
| DELETE | `/api/knowledge/category/{name}/nodes/{idx}` |
|
|
138
|
+
| GET | `/api/knowledge/categories` | List categories |
|
|
139
|
+
| POST | `/api/knowledge/category` | Create category |
|
|
140
|
+
| PUT | `/api/knowledge/category/{name}` | Update category |
|
|
141
|
+
| DELETE | `/api/knowledge/category/{name}` | Delete category |
|
|
142
|
+
| POST | `/api/knowledge/category/{name}/nodes` | Add node |
|
|
143
|
+
| PUT | `/api/knowledge/category/{name}/nodes/{idx}` | Update node |
|
|
144
|
+
| DELETE | `/api/knowledge/category/{name}/nodes/{idx}` | Delete node |
|
|
145
145
|
|
|
146
|
-
###
|
|
146
|
+
### Knowledge Tree (Node-based)
|
|
147
147
|
|
|
148
148
|
| Method | Path | Description |
|
|
149
149
|
|--------|------|-------------|
|
|
150
|
-
| POST | `/api/node` |
|
|
151
|
-
| PUT | `/api/node/{id}` |
|
|
152
|
-
| DELETE | `/api/node/{id}` |
|
|
150
|
+
| POST | `/api/node` | Create knowledge node |
|
|
151
|
+
| PUT | `/api/node/{id}` | Update knowledge node |
|
|
152
|
+
| DELETE | `/api/node/{id}` | Delete knowledge node |
|
|
153
153
|
|
|
154
154
|
## Development Workflow
|
|
155
155
|
|
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
# HITS - Hybrid Intel Trace System
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Replicate your predecessor's brain as perfectly as possible, using the least amount of AI.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
HITS
|
|
7
|
+
HITS is a hybrid knowledge management system designed to preserve organizational core knowledge and decision-making context. It automates project-specific handover when switching between AI tool sessions (Claude, OpenCode, Cursor, etc.).
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Core Values
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- **AI
|
|
16
|
-
-
|
|
17
|
-
-
|
|
11
|
+
- **Token Optimization**: Semantic compression and on-demand analysis to reduce AI costs
|
|
12
|
+
- **Context Preservation**: Store decision-making processes in a Why-How-What hierarchy
|
|
13
|
+
- **Failure Experience**: Record failed approaches alongside successes as Negative Paths
|
|
14
|
+
- **Security Hardened**: Argon2id hashing, JWT HttpOnly cookies, CSP, Rate Limiting
|
|
15
|
+
- **AI Session Handover**: Automatically transfer project context when AI sessions rotate due to token limits
|
|
16
|
+
- **Centralized Storage**: All AI tool work logs are consolidated at `~/.hits/data/`
|
|
17
|
+
- **Project Isolation**: Completely independent context management based on project path
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Tech Stack
|
|
20
20
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
21
|
+
| Area | Technology |
|
|
22
|
+
|------|-----------|
|
|
23
|
+
| **Backend** | Python 3.10+, FastAPI, Pydantic v2 |
|
|
24
|
+
| **Frontend** | Svelte 5, Vite, TypeScript |
|
|
25
|
+
| **Authentication** | Argon2id (passwords), JWT HS256 (HttpOnly cookies) |
|
|
26
|
+
| **Storage** | File-based (`~/.hits/data/`), Redis (optional) |
|
|
27
|
+
| **Security** | CSP, CORS, Rate Limiting, Secure Headers |
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Installation
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### Requirements
|
|
32
32
|
|
|
33
|
-
- Python 3.10
|
|
34
|
-
- Node.js 18+ (
|
|
35
|
-
- Redis (
|
|
33
|
+
- Python 3.10 or later
|
|
34
|
+
- Node.js 18+ (for frontend build)
|
|
35
|
+
- Redis (optional — falls back to file storage)
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Quick Start
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
cd hits
|
|
41
|
-
./run.sh #
|
|
41
|
+
./run.sh # Auto-install + start server
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
####
|
|
44
|
+
#### Development Mode
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
./run.sh --dev # Vite HMR + FastAPI
|
|
47
|
+
./run.sh --dev # Vite HMR + FastAPI backend
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
####
|
|
50
|
+
#### Manual Installation
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
# Python
|
|
53
|
+
# Python environment
|
|
54
54
|
python3 -m venv venv
|
|
55
55
|
source venv/bin/activate
|
|
56
56
|
pip install -r requirements.txt
|
|
57
57
|
|
|
58
|
-
#
|
|
58
|
+
# Frontend build
|
|
59
59
|
cd hits_web
|
|
60
60
|
npm install
|
|
61
61
|
npm run build
|
|
62
62
|
cd ..
|
|
63
63
|
|
|
64
|
-
#
|
|
64
|
+
# Start server
|
|
65
65
|
python -m hits_core.main --port 8765
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## Security
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### Authentication System
|
|
71
71
|
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
| **JWT
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
72
|
+
| Feature | Implementation |
|
|
73
|
+
|---------|---------------|
|
|
74
|
+
| **Password Hashing** | Argon2id (memory=64MB, iterations=3, parallelism=1) |
|
|
75
|
+
| **Minimum Password Length** | 8 characters |
|
|
76
|
+
| **JWT Tokens** | HttpOnly + Secure + SameSite=Lax cookies |
|
|
77
|
+
| **Access Token** | 15-minute expiry |
|
|
78
|
+
| **Refresh Token** | 7-day expiry, sent only to `/api/auth/refresh` |
|
|
79
|
+
| **First User** | Automatically assigned admin role |
|
|
80
|
+
| **Subsequent Users** | Can only be created by admin |
|
|
81
81
|
|
|
82
|
-
###
|
|
82
|
+
### Security Headers
|
|
83
83
|
|
|
84
84
|
```
|
|
85
85
|
Content-Security-Policy: default-src 'self'; script-src 'self'; ...
|
|
@@ -92,65 +92,65 @@ Permissions-Policy: camera=(), microphone=(), geolocation=()
|
|
|
92
92
|
|
|
93
93
|
### Rate Limiting
|
|
94
94
|
|
|
95
|
-
-
|
|
96
|
-
- 429 Too Many Requests
|
|
95
|
+
- Login endpoint: 10 requests/minute (per IP)
|
|
96
|
+
- Responds with 429 Too Many Requests when exceeded
|
|
97
97
|
|
|
98
|
-
###
|
|
98
|
+
### Data Protection
|
|
99
99
|
|
|
100
|
-
|
|
|
101
|
-
|
|
102
|
-
| `~/.hits/.auth/users.json` | 600 |
|
|
103
|
-
| `~/.hits/.pepper` | 600 | HMAC
|
|
104
|
-
| `~/.hits/.jwt_secret` | 600 | JWT
|
|
105
|
-
| `~/.hits/.auth/` | 700 |
|
|
100
|
+
| Item | Permissions | Description |
|
|
101
|
+
|------|-------------|-------------|
|
|
102
|
+
| `~/.hits/.auth/users.json` | 600 | User data (owner only) |
|
|
103
|
+
| `~/.hits/.pepper` | 600 | HMAC pepper (owner only) |
|
|
104
|
+
| `~/.hits/.jwt_secret` | 600 | JWT signing key (owner only) |
|
|
105
|
+
| `~/.hits/.auth/` | 700 | Auth directory (owner only) |
|
|
106
106
|
|
|
107
|
-
##
|
|
107
|
+
## Web UI
|
|
108
108
|
|
|
109
|
-
###
|
|
109
|
+
### Layout
|
|
110
110
|
|
|
111
111
|
```
|
|
112
112
|
┌─────────────┬───────────────────────────────────┐
|
|
113
|
-
│
|
|
113
|
+
│ Sidebar │ Header (tabs + user menu) │
|
|
114
114
|
│ ├───────────────────────────────────┤
|
|
115
|
-
│ 📂
|
|
116
|
-
│ ────────── │
|
|
115
|
+
│ 📂 Projects│ │
|
|
116
|
+
│ ────────── │ Main content area │
|
|
117
117
|
│ /project-a │ │
|
|
118
|
-
│ /project-b │ 📋
|
|
118
|
+
│ /project-b │ 📋 Knowledge | 📝 Timeline | 🔄 Handover │
|
|
119
119
|
│ /project-c │ │
|
|
120
120
|
│ │ │
|
|
121
121
|
└─────────────┴───────────────────────────────────┘
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
###
|
|
124
|
+
### Features
|
|
125
125
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
126
|
+
- **Knowledge Tree**: Manage Why-How-What nodes by category (full CRUD)
|
|
127
|
+
- **Timeline**: Project work logs, grouped by date, with search
|
|
128
|
+
- **Handover**: Auto-generated handover summary when a project is selected
|
|
129
|
+
- **Project Switching**: Instant context switch via sidebar
|
|
130
|
+
- **User Management**: Password change, logout
|
|
131
131
|
|
|
132
|
-
## AI
|
|
132
|
+
## AI Session Handover
|
|
133
133
|
|
|
134
|
-
###
|
|
134
|
+
### How It Works
|
|
135
135
|
|
|
136
136
|
```
|
|
137
|
-
[OpenCode
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
137
|
+
[OpenCode Session] [Claude Session]
|
|
138
|
+
│ │
|
|
139
|
+
Perform work Session start
|
|
140
|
+
│ │
|
|
141
|
+
Record work ──────────────────────→ Query handover
|
|
142
|
+
POST /api/work-log GET /api/handover
|
|
143
|
+
project_path: /my-project project_path: /my-project
|
|
144
|
+
│ │
|
|
145
|
+
└──→ ~/.hits/data/ ←──┘ │
|
|
146
|
+
(centralized) Understand previous context
|
|
147
|
+
│
|
|
148
|
+
Continue work seamlessly
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
### MCP
|
|
151
|
+
### MCP Configuration
|
|
152
152
|
|
|
153
|
-
OpenCode
|
|
153
|
+
Add to your OpenCode or Claude MCP settings:
|
|
154
154
|
|
|
155
155
|
```json
|
|
156
156
|
{
|
|
@@ -162,76 +162,76 @@ OpenCode 또는 Claude의 MCP 설정에 추가:
|
|
|
162
162
|
}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
MCP
|
|
166
|
-
- `hits_record_work`:
|
|
167
|
-
- `hits_get_handover`:
|
|
168
|
-
- `hits_search_works`:
|
|
169
|
-
- `hits_list_projects`:
|
|
170
|
-
- `hits_get_recent`:
|
|
165
|
+
MCP Tools:
|
|
166
|
+
- `hits_record_work`: Record work entry
|
|
167
|
+
- `hits_get_handover`: Get handover summary
|
|
168
|
+
- `hits_search_works`: Search past work
|
|
169
|
+
- `hits_list_projects`: List projects
|
|
170
|
+
- `hits_get_recent`: Get recent work
|
|
171
171
|
|
|
172
|
-
## API
|
|
172
|
+
## API Endpoints
|
|
173
173
|
|
|
174
|
-
###
|
|
174
|
+
### Authentication
|
|
175
175
|
|
|
176
176
|
| Method | Path | Description |
|
|
177
177
|
|--------|------|-------------|
|
|
178
|
-
| GET | `/api/auth/status` |
|
|
179
|
-
| POST | `/api/auth/register` |
|
|
180
|
-
| POST | `/api/auth/login` |
|
|
181
|
-
| POST | `/api/auth/logout` |
|
|
182
|
-
| POST | `/api/auth/refresh` |
|
|
183
|
-
| GET | `/api/auth/me` |
|
|
184
|
-
| PUT | `/api/auth/password` |
|
|
178
|
+
| GET | `/api/auth/status` | Check auth status |
|
|
179
|
+
| POST | `/api/auth/register` | Register user |
|
|
180
|
+
| POST | `/api/auth/login` | Login (sets HttpOnly cookies) |
|
|
181
|
+
| POST | `/api/auth/logout` | Logout |
|
|
182
|
+
| POST | `/api/auth/refresh` | Refresh access token |
|
|
183
|
+
| GET | `/api/auth/me` | Get current user info |
|
|
184
|
+
| PUT | `/api/auth/password` | Change password |
|
|
185
185
|
|
|
186
|
-
###
|
|
186
|
+
### Work Logs
|
|
187
187
|
|
|
188
188
|
| Method | Path | Description |
|
|
189
189
|
|--------|------|-------------|
|
|
190
|
-
| POST | `/api/work-log` |
|
|
191
|
-
| GET | `/api/work-logs` |
|
|
192
|
-
| GET | `/api/work-logs/search?q=...` |
|
|
193
|
-
| GET | `/api/work-log/{id}` |
|
|
194
|
-
| PUT | `/api/work-log/{id}` |
|
|
195
|
-
| DELETE | `/api/work-log/{id}` |
|
|
190
|
+
| POST | `/api/work-log` | Create work log |
|
|
191
|
+
| GET | `/api/work-logs` | List work logs (supports `project_path` filter) |
|
|
192
|
+
| GET | `/api/work-logs/search?q=...` | Search work logs |
|
|
193
|
+
| GET | `/api/work-log/{id}` | Get single entry |
|
|
194
|
+
| PUT | `/api/work-log/{id}` | Update entry |
|
|
195
|
+
| DELETE | `/api/work-log/{id}` | Delete entry |
|
|
196
196
|
|
|
197
|
-
###
|
|
197
|
+
### Handover
|
|
198
198
|
|
|
199
199
|
| Method | Path | Description |
|
|
200
200
|
|--------|------|-------------|
|
|
201
|
-
| GET | `/api/handover?project_path=...` |
|
|
202
|
-
| GET | `/api/handover/projects` |
|
|
203
|
-
| GET | `/api/handover/project-stats?project_path=...` |
|
|
201
|
+
| GET | `/api/handover?project_path=...` | Get project handover summary |
|
|
202
|
+
| GET | `/api/handover/projects` | List projects |
|
|
203
|
+
| GET | `/api/handover/project-stats?project_path=...` | Get project stats |
|
|
204
204
|
|
|
205
|
-
###
|
|
205
|
+
### Knowledge Categories
|
|
206
206
|
|
|
207
207
|
| Method | Path | Description |
|
|
208
208
|
|--------|------|-------------|
|
|
209
|
-
| GET | `/api/knowledge/categories` |
|
|
210
|
-
| POST | `/api/knowledge/category` |
|
|
211
|
-
| PUT | `/api/knowledge/category/{name}` |
|
|
212
|
-
| DELETE | `/api/knowledge/category/{name}` |
|
|
213
|
-
| POST | `/api/knowledge/category/{name}/nodes` |
|
|
214
|
-
| PUT | `/api/knowledge/category/{name}/nodes/{idx}` |
|
|
215
|
-
| DELETE | `/api/knowledge/category/{name}/nodes/{idx}` |
|
|
216
|
-
|
|
217
|
-
### performed_by
|
|
218
|
-
|
|
219
|
-
| AI
|
|
220
|
-
|
|
209
|
+
| GET | `/api/knowledge/categories` | List categories |
|
|
210
|
+
| POST | `/api/knowledge/category` | Create category |
|
|
211
|
+
| PUT | `/api/knowledge/category/{name}` | Update category |
|
|
212
|
+
| DELETE | `/api/knowledge/category/{name}` | Delete category |
|
|
213
|
+
| POST | `/api/knowledge/category/{name}/nodes` | Add node |
|
|
214
|
+
| PUT | `/api/knowledge/category/{name}/nodes/{idx}` | Update node |
|
|
215
|
+
| DELETE | `/api/knowledge/category/{name}/nodes/{idx}` | Delete node |
|
|
216
|
+
|
|
217
|
+
### performed_by Values
|
|
218
|
+
|
|
219
|
+
| AI Tool | Value |
|
|
220
|
+
|---------|-------|
|
|
221
221
|
| OpenCode | `opencode` |
|
|
222
222
|
| Claude Code | `claude` |
|
|
223
223
|
| Cursor | `cursor` |
|
|
224
|
-
|
|
|
224
|
+
| Manual | `manual` |
|
|
225
225
|
|
|
226
|
-
##
|
|
226
|
+
## Architecture
|
|
227
227
|
|
|
228
228
|
```
|
|
229
229
|
┌──────────────────────────────────────────────────────────┐
|
|
230
230
|
│ hits_web (Svelte 5 + Vite) │
|
|
231
|
-
│ Material Dark
|
|
231
|
+
│ Material Dark theme · TypeScript │
|
|
232
232
|
│ ┌──────────┬──────────┬──────────────────────────┐ │
|
|
233
233
|
│ │ Sidebar │ Knowledge│ HandoverPanel │ │
|
|
234
|
-
│ │ Projects │ Tree │
|
|
234
|
+
│ │ Projects │ Tree │ Handover summary view │ │
|
|
235
235
|
│ │ Filter │ Timeline │ │ │
|
|
236
236
|
│ └──────────┴──────────┴──────────────────────────┘ │
|
|
237
237
|
│ ↕ API Client (fetch + HttpOnly cookies) │
|
|
@@ -257,57 +257,57 @@ MCP 툴:
|
|
|
257
257
|
└──────────────────────────────────────────────────────────┘
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
##
|
|
260
|
+
## Knowledge Tree Structure
|
|
261
261
|
|
|
262
|
-
### Why-How-What
|
|
262
|
+
### Why-How-What Hierarchy
|
|
263
263
|
|
|
264
264
|
```
|
|
265
|
-
├── WHY (
|
|
266
|
-
│ ├── "
|
|
267
|
-
│ └── "
|
|
265
|
+
├── WHY (Intent/Purpose)
|
|
266
|
+
│ ├── "Why was this system built?"
|
|
267
|
+
│ └── "What is the business goal?"
|
|
268
268
|
│
|
|
269
|
-
├── HOW (
|
|
270
|
-
│ ├── "
|
|
271
|
-
│ └── "
|
|
269
|
+
├── HOW (Logic/Method)
|
|
270
|
+
│ ├── "How was it implemented?"
|
|
271
|
+
│ └── "What decisions were made?"
|
|
272
272
|
│
|
|
273
|
-
└── WHAT (
|
|
274
|
-
├── "
|
|
275
|
-
└── "
|
|
273
|
+
└── WHAT (Execution/Tasks)
|
|
274
|
+
├── "What specifically does it do?"
|
|
275
|
+
└── "Actionable tasks"
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
-
##
|
|
278
|
+
## Development
|
|
279
279
|
|
|
280
|
-
###
|
|
280
|
+
### Development Mode
|
|
281
281
|
|
|
282
282
|
```bash
|
|
283
283
|
./run.sh --dev # Vite HMR + FastAPI
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
###
|
|
286
|
+
### Testing
|
|
287
287
|
|
|
288
288
|
```bash
|
|
289
|
-
./run.sh --test # pytest
|
|
289
|
+
./run.sh --test # Run pytest
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
###
|
|
292
|
+
### Frontend Development
|
|
293
293
|
|
|
294
294
|
```bash
|
|
295
295
|
cd hits_web
|
|
296
|
-
npm install #
|
|
297
|
-
npm run dev # Vite
|
|
298
|
-
npm run build #
|
|
296
|
+
npm install # Install dependencies
|
|
297
|
+
npm run dev # Vite dev server (http://localhost:5173)
|
|
298
|
+
npm run build # Production build
|
|
299
299
|
```
|
|
300
300
|
|
|
301
|
-
##
|
|
301
|
+
## License
|
|
302
302
|
|
|
303
|
-
|
|
|
304
|
-
|
|
305
|
-
| `hits_core` | Apache 2.0 | ✅
|
|
306
|
-
| `hits_web` | Apache 2.0 | ✅
|
|
303
|
+
| Package | License | Commercial Use |
|
|
304
|
+
|---------|---------|---------------|
|
|
305
|
+
| `hits_core` | Apache 2.0 | ✅ Free |
|
|
306
|
+
| `hits_web` | Apache 2.0 | ✅ Free |
|
|
307
307
|
|
|
308
|
-
##
|
|
308
|
+
## Troubleshooting
|
|
309
309
|
|
|
310
|
-
### Node.js
|
|
310
|
+
### Node.js Not Found
|
|
311
311
|
|
|
312
312
|
```bash
|
|
313
313
|
# Ubuntu/Debian
|
|
@@ -315,22 +315,22 @@ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
|
|
315
315
|
sudo apt install -y nodejs
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
-
### Redis
|
|
318
|
+
### Redis Connection Failed
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
HITS works fine without Redis. It automatically falls back to file-based storage.
|
|
321
321
|
|
|
322
|
-
###
|
|
322
|
+
### Where Is Data Stored?
|
|
323
323
|
|
|
324
324
|
```
|
|
325
325
|
~/.hits/
|
|
326
|
-
├── data/ ←
|
|
327
|
-
│ ├── work_logs/ ← AI
|
|
328
|
-
│ ├── trees/ ←
|
|
329
|
-
│ └── workflows/ ←
|
|
330
|
-
├── .auth/ ←
|
|
331
|
-
│ └── users.json ←
|
|
332
|
-
├── .pepper ← HMAC
|
|
333
|
-
└── .jwt_secret ← JWT
|
|
334
|
-
|
|
335
|
-
|
|
326
|
+
├── data/ ← Default location for all data
|
|
327
|
+
│ ├── work_logs/ ← AI session work logs
|
|
328
|
+
│ ├── trees/ ← Knowledge trees
|
|
329
|
+
│ └── workflows/ ← Workflows
|
|
330
|
+
├── .auth/ ← Authentication data
|
|
331
|
+
│ └── users.json ← User info (permissions 600)
|
|
332
|
+
├── .pepper ← HMAC pepper (permissions 600)
|
|
333
|
+
└── .jwt_secret ← JWT signing key (permissions 600)
|
|
334
|
+
|
|
335
|
+
Override with HITS_DATA_PATH environment variable
|
|
336
336
|
```
|