Skip to content

Commit 55df263

Browse files
chore(release): 1.0.0 [skip ci]
# 1.0.0 (2025-06-01) ### Features * publish knowhub ([deab489](deab489))
1 parent deab489 commit 55df263

File tree

6 files changed

+217
-1
lines changed

6 files changed

+217
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
description: General project rules that applies to all file types. Should be most general
3+
globs: **/*
4+
---
5+
- Naming Conventions: Follow clear and consistent naming conventions.
6+
- Performance Optimization: Optimize code for performance.
7+
- Key Conventions: Adhere to project-specific key conventions.
8+
- Error Handling and Validation: implement comprehensive error handling and validation.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
description: Applies general TypeScript best practices and style guidelines to all TypeScript files in the project.
3+
globs: **/*.ts
4+
---
5+
- You are an expert in TypeScript.
6+
- TypeScript Usage: Follow TypeScript best practices for type safety and code maintainability.
7+
- Syntax and Formatting: Adhere to consistent coding style and formatting guidelines for TypeScript.

.github/copilot-instructions.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Instructions
2+
3+
During your interaction with the user, if you find anything reusable in this project (e.g. version of a library, model name), especially about a fix to a mistake you made or a correction you received, you should take note in the `Lessons` section in the `.github/copilot-instructions.md` file so you will not make the same mistake again.
4+
5+
You should also use the `.github/copilot-instructions.md` file's "scratchpad" section as a Scratchpad to organize your thoughts. Especially when you receive a new task, you should first review the content of the Scratchpad, clear old different task if necessary, first explain the task, and plan the steps you need to take to complete the task. You can use todo markers to indicate the progress, e.g.
6+
[X] Task 1
7+
[ ] Task 2
8+
9+
Also update the progress of the task in the Scratchpad when you finish a subtask.
10+
Especially when you finished a milestone, it will help to improve your depth of task accomplishment to use the Scratchpad to reflect and plan.
11+
The goal is to help you maintain a big picture as well as the progress of the task. Always refer to the Scratchpad when you plan the next step.
12+
13+
# Tools
14+
15+
Note all the tools are in python. So in the case you need to do batch processing, you can always consult the python files and write your own script.
16+
17+
## Screenshot Verification
18+
19+
The screenshot verification workflow allows you to capture screenshots of web pages and verify their appearance using LLMs. The following tools are available:
20+
21+
1. Screenshot Capture:
22+
```bash
23+
venv/bin/python tools/screenshot_utils.py URL [--output OUTPUT] [--width WIDTH] [--height HEIGHT]
24+
```
25+
26+
2. LLM Verification with Images:
27+
```bash
28+
venv/bin/python tools/llm_api.py --prompt "Your verification question" --provider {openai|anthropic} --image path/to/screenshot.png
29+
```
30+
31+
Example workflow:
32+
```python
33+
from screenshot_utils import take_screenshot_sync
34+
from llm_api import query_llm
35+
36+
# Take a screenshot
37+
38+
screenshot_path = take_screenshot_sync('https://example.com', 'screenshot.png')
39+
40+
# Verify with LLM
41+
42+
response = query_llm(
43+
"What is the background color and title of this webpage?",
44+
provider="openai", # or "anthropic"
45+
image_path=screenshot_path
46+
)
47+
print(response)
48+
```
49+
50+
## LLM
51+
52+
You always have an LLM at your side to help you with the task. For simple tasks, you could invoke the LLM by running the following command:
53+
```
54+
venv/bin/python ./tools/llm_api.py --prompt "What is the capital of France?" --provider "anthropic"
55+
```
56+
57+
The LLM API supports multiple providers:
58+
- OpenAI (default, model: gpt-4o)
59+
- Azure OpenAI (model: configured via AZURE_OPENAI_MODEL_DEPLOYMENT in .env file, defaults to gpt-4o-ms)
60+
- DeepSeek (model: deepseek-chat)
61+
- Anthropic (model: claude-3-sonnet-20240229)
62+
- Gemini (model: gemini-pro)
63+
- Local LLM (model: Qwen/Qwen2.5-32B-Instruct-AWQ)
64+
65+
But usually it's a better idea to check the content of the file and use the APIs in the `tools/llm_api.py` file to invoke the LLM if needed.
66+
67+
## Web browser
68+
69+
You could use the `tools/web_scraper.py` file to scrape the web.
70+
```
71+
venv/bin/python ./tools/web_scraper.py --max-concurrent 3 URL1 URL2 URL3
72+
```
73+
This will output the content of the web pages.
74+
75+
## Search engine
76+
77+
You could use the `tools/search_engine.py` file to search the web.
78+
```
79+
venv/bin/python ./tools/search_engine.py "your search keywords"
80+
```
81+
This will output the search results in the following format:
82+
```
83+
URL: https://example.com
84+
Title: This is the title of the search result
85+
Snippet: This is a snippet of the search result
86+
```
87+
If needed, you can further use the `web_scraper.py` file to scrape the web page content.
88+
89+
# Lessons
90+
91+
## User Specified Lessons
92+
93+
- You have a python venv in ./venv. Use it.
94+
- Include info useful for debugging in the program output.
95+
- Read the file before you try to edit it.
96+
- Due to Cursor's limit, when you use `git` and `gh` and need to submit a multiline commit message, first write the message in a file, and then use `git commit -F <filename>` or similar command to commit. And then remove the file. Include "[Cursor] " in the commit message and PR title.
97+
98+
## Cursor learned
99+
100+
- For search results, ensure proper handling of different character encodings (UTF-8) for international queries
101+
- Add debug information to stderr while keeping the main output clean in stdout for better pipeline integration
102+
- When using seaborn styles in matplotlib, use 'seaborn-v0_8' instead of 'seaborn' as the style name due to recent seaborn version changes
103+
- Use 'gpt-4o' as the model name for OpenAI's GPT-4 with vision capabilities
104+
105+
# Scratchpad

.windsurfrules

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Instructions
2+
3+
During you interaction with the user, if you find anything reusable in this project (e.g. version of a library, model name), especially about a fix to a mistake you made or a correction you received, you should take note in the `Lessons` section in the `scratchpad.md` file so you will not make the same mistake again.
4+
5+
You should also use the `scratchpad.md` file as a scratchpad to organize your thoughts. Especially when you receive a new task, you should first review the content of the scratchpad, clear old different task if necessary, first explain the task, and plan the steps you need to take to complete the task. You can use todo markers to indicate the progress, e.g.
6+
[X] Task 1
7+
[ ] Task 2
8+
Also update the progress of the task in the Scratchpad when you finish a subtask.
9+
Especially when you finished a milestone, it will help to improve your depth of task accomplishment to use the scratchpad to reflect and plan.
10+
The goal is to help you maintain a big picture as well as the progress of the task. Always refer to the Scratchpad when you plan the next step.
11+
12+
# Tools
13+
14+
Note all the tools are in python. So in the case you need to do batch processing, you can always consult the python files and write your own script.
15+
16+
## Screenshot Verification
17+
18+
The screenshot verification workflow allows you to capture screenshots of web pages and verify their appearance using LLMs. The following tools are available:
19+
20+
1. Screenshot Capture:
21+
```bash
22+
venv/bin/python tools/screenshot_utils.py URL [--output OUTPUT] [--width WIDTH] [--height HEIGHT]
23+
```
24+
25+
2. LLM Verification with Images:
26+
```bash
27+
venv/bin/python tools/llm_api.py --prompt "Your verification question" --provider {openai|anthropic} --image path/to/screenshot.png
28+
```
29+
30+
Example workflow:
31+
```python
32+
from screenshot_utils import take_screenshot_sync
33+
from llm_api import query_llm
34+
35+
# Take a screenshot
36+
37+
screenshot_path = take_screenshot_sync('https://example.com', 'screenshot.png')
38+
39+
# Verify with LLM
40+
41+
response = query_llm(
42+
"What is the background color and title of this webpage?",
43+
provider="openai", # or "anthropic"
44+
image_path=screenshot_path
45+
)
46+
print(response)
47+
```
48+
49+
## LLM
50+
51+
You always have an LLM at your side to help you with the task. For simple tasks, you could invoke the LLM by running the following command:
52+
```
53+
venv/bin/python ./tools/llm_api.py --prompt "What is the capital of France?"
54+
```
55+
56+
But usually it's a better idea to check the content of the file and use the APIs in the `tools/llm_api.py` file to invoke the LLM if needed.
57+
58+
## Web browser
59+
60+
You could use the `tools/web_scraper.py` file to scrape the web.
61+
```
62+
venv/bin/python ./tools/web_scraper.py --max-concurrent 3 URL1 URL2 URL3
63+
```
64+
This will output the content of the web pages.
65+
66+
## Search engine
67+
68+
You could use the `tools/search_engine.py` file to search the web.
69+
```
70+
venv/bin/python ./tools/search_engine.py "your search keywords"
71+
```
72+
This will output the search results in the following format:
73+
```
74+
URL: https://example.com
75+
Title: This is the title of the search result
76+
Snippet: This is a snippet of the search result
77+
```
78+
79+
# Lessons
80+
81+
## User Specified Lessons
82+
83+
- You have a python venv in ./venv.
84+
- Include info useful for debugging in the program output.
85+
- Read the file before you try to edit it.
86+
- Use LLM to perform flexible text understanding tasks. First test on a few files. After success, make it parallel.
87+
88+
## Windsurf learned
89+
90+
Consult the `scratchpad.md` file for lessons.

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 1.0.0 (2025-06-01)
2+
3+
4+
### Features
5+
6+
* publish knowhub ([deab489](https://github.com/yujiosaka/knowhub/commit/deab489cdac8e2e963d298b3f1e958a5d3fa2a60))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "knowhub",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "Synchronize AI coding–agent knowledge files (rules, templates, guidelines) across your project.",
55
"type": "module",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)