llmsbrieftxt 1.8.2__tar.gz → 1.9.0__tar.gz
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.
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/claude-cli-qa.yml +21 -34
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/claude-doc-review.yml +4 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/claude.yml +4 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/PKG-INFO +1 -1
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/docs/USER_JOURNEYS.md +68 -68
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/pyproject.toml +1 -1
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/ISSUE_TEMPLATE/question.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/copilot-instructions.md +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/ci.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/pr-title-check.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.github/workflows/release.yml +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/.gitignore +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/CLAUDE.md +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/CONTRIBUTING.md +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/LICENSE +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/PRODUCTION_CLEANUP_PLAN.md +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/README.md +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/__init__.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/cli.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/constants.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/crawler.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/doc_loader.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/extractor.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/main.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/schema.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/summarizer.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/url_filters.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/llmsbrieftxt/url_utils.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/pytest.ini +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/scripts/bump_version.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/__init__.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/conftest.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/fixtures/__init__.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/integration/__init__.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/integration/test_doc_loader_integration.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/__init__.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/test_cli.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/test_doc_loader.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/test_extractor.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/test_robustness.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/tests/unit/test_summarizer.py +0 -0
- {llmsbrieftxt-1.8.2 → llmsbrieftxt-1.9.0}/uv.lock +0 -0
|
@@ -60,30 +60,7 @@ jobs:
|
|
|
60
60
|
run: |
|
|
61
61
|
uv sync --all-groups
|
|
62
62
|
|
|
63
|
-
# Cache Ollama models (most important - saves bandwidth and time)
|
|
64
|
-
- name: Cache Ollama models
|
|
65
|
-
id: cache-ollama-models
|
|
66
|
-
uses: actions/cache@v4
|
|
67
|
-
with:
|
|
68
|
-
path: ~/.ollama
|
|
69
|
-
key: ollama-models-${{ runner.os }}-${{ env.OLLAMA_MODEL }}-v1
|
|
70
|
-
restore-keys: |
|
|
71
|
-
ollama-models-${{ runner.os }}-
|
|
72
|
-
|
|
73
|
-
# Cache Ollama binary installation
|
|
74
|
-
- name: Cache Ollama binary
|
|
75
|
-
id: cache-ollama-binary
|
|
76
|
-
uses: actions/cache@v4
|
|
77
|
-
with:
|
|
78
|
-
path: |
|
|
79
|
-
/usr/local/bin/ollama
|
|
80
|
-
/usr/share/ollama
|
|
81
|
-
key: ollama-binary-${{ runner.os }}-v1
|
|
82
|
-
restore-keys: |
|
|
83
|
-
ollama-binary-${{ runner.os }}-
|
|
84
|
-
|
|
85
63
|
- name: Install Ollama
|
|
86
|
-
if: steps.cache-ollama-binary.outputs.cache-hit != 'true'
|
|
87
64
|
run: |
|
|
88
65
|
echo "Installing Ollama for local LLM testing..."
|
|
89
66
|
curl -fsSL https://ollama.com/install.sh | sh
|
|
@@ -104,7 +81,6 @@ jobs:
|
|
|
104
81
|
echo "✓ Ollama service is running"
|
|
105
82
|
|
|
106
83
|
- name: Pull Ollama model
|
|
107
|
-
if: steps.cache-ollama-models.outputs.cache-hit != 'true'
|
|
108
84
|
run: |
|
|
109
85
|
echo "Pulling ${{ env.OLLAMA_MODEL }} model for testing..."
|
|
110
86
|
ollama pull ${{ env.OLLAMA_MODEL }}
|
|
@@ -133,15 +109,15 @@ jobs:
|
|
|
133
109
|
|
|
134
110
|
case "$SCOPE" in
|
|
135
111
|
quick)
|
|
136
|
-
echo "max_urls=
|
|
112
|
+
echo "max_urls=2" >> $GITHUB_OUTPUT
|
|
137
113
|
echo "depth=1" >> $GITHUB_OUTPUT
|
|
138
114
|
;;
|
|
139
115
|
thorough)
|
|
140
|
-
echo "max_urls=
|
|
141
|
-
echo "depth=
|
|
116
|
+
echo "max_urls=5" >> $GITHUB_OUTPUT
|
|
117
|
+
echo "depth=1" >> $GITHUB_OUTPUT
|
|
142
118
|
;;
|
|
143
119
|
*)
|
|
144
|
-
echo "max_urls=
|
|
120
|
+
echo "max_urls=3" >> $GITHUB_OUTPUT
|
|
145
121
|
echo "depth=1" >> $GITHUB_OUTPUT
|
|
146
122
|
;;
|
|
147
123
|
esac
|
|
@@ -163,13 +139,16 @@ jobs:
|
|
|
163
139
|
# Enable progress tracking for PR events only
|
|
164
140
|
track_progress: ${{ github.event_name == 'pull_request' }}
|
|
165
141
|
|
|
142
|
+
# Show full output in workflow logs for debugging
|
|
143
|
+
show_full_output: true
|
|
144
|
+
|
|
166
145
|
prompt: |
|
|
167
146
|
You are the QA coordinator orchestrating comprehensive CLI tests for llmsbrieftxt.
|
|
168
147
|
|
|
169
148
|
**Test Environment (Ready)**:
|
|
170
149
|
- Python 3.11 with uv package manager
|
|
171
150
|
- Ollama service running at http://localhost:11434
|
|
172
|
-
- Model: ${{ env.OLLAMA_MODEL }} (fast,
|
|
151
|
+
- Model: ${{ env.OLLAMA_MODEL }} (fast, lightweight)
|
|
173
152
|
- CLI: Use `uv run llmtxt` to invoke the CLI
|
|
174
153
|
|
|
175
154
|
**Environment Variables for Ollama**:
|
|
@@ -185,9 +164,9 @@ jobs:
|
|
|
185
164
|
|
|
186
165
|
**Workflow**:
|
|
187
166
|
1. Read docs/USER_JOURNEYS.md to understand test scenarios
|
|
188
|
-
2.
|
|
189
|
-
3. Each sub-agent executes ONE test scenario and reports pass/fail with evidence
|
|
190
|
-
4. Collect results from all sub-agents
|
|
167
|
+
2. **IMPORTANT - Create ALL sub-agents IN PARALLEL**. Do not wait for one to complete before creating the next. Use the Task tool to create all sub-agents in a single message.
|
|
168
|
+
3. Each sub-agent executes ONE test scenario in isolation and reports pass/fail with evidence
|
|
169
|
+
4. Collect results from all sub-agents (they will complete asynchronously)
|
|
191
170
|
5. Create aggregated summary with:
|
|
192
171
|
- Total tests: count
|
|
193
172
|
- Passed: count + list
|
|
@@ -211,9 +190,9 @@ jobs:
|
|
|
211
190
|
- TS-011: Ollama Not Running (ALWAYS include)
|
|
212
191
|
- TS-012: Invalid Model (thorough scope only)
|
|
213
192
|
|
|
214
|
-
For each test scenario,
|
|
193
|
+
For each test scenario, create a subagent with clear test task:
|
|
215
194
|
```
|
|
216
|
-
|
|
195
|
+
Create a subagent from .claude/agents/qa-agent.md (haiku model configured):
|
|
217
196
|
|
|
218
197
|
Prompt template (customize for each test):
|
|
219
198
|
"Execute test scenario [TEST-ID] from docs/USER_JOURNEYS.md.
|
|
@@ -221,7 +200,15 @@ jobs:
|
|
|
221
200
|
Test: [Test Name]
|
|
222
201
|
Priority: [Priority Level]
|
|
223
202
|
|
|
203
|
+
**IMPORTANT - Directory Isolation**:
|
|
204
|
+
Since multiple tests run in parallel, use unique directories to avoid conflicts:
|
|
205
|
+
- Cache directory: /tmp/llmtxt-cache-[TEST-ID] (e.g., /tmp/llmtxt-cache-ts001)
|
|
206
|
+
- Output directory: /tmp/llmtxt-output-[TEST-ID] (e.g., /tmp/llmtxt-output-ts001)
|
|
207
|
+
- Use --cache-dir and --output flags in all CLI commands to specify these paths
|
|
208
|
+
- This prevents parallel tests from interfering with each other
|
|
209
|
+
|
|
224
210
|
Read the detailed test steps and expected results from docs/USER_JOURNEYS.md.
|
|
211
|
+
Adapt the commands to use the isolated directories listed above.
|
|
225
212
|
Execute all verification commands.
|
|
226
213
|
Report:
|
|
227
214
|
- Test Status: PASS or FAIL
|
|
@@ -85,6 +85,10 @@ jobs:
|
|
|
85
85
|
# Enable progress tracking
|
|
86
86
|
track_progress: true
|
|
87
87
|
|
|
88
|
+
# Optional: Show full output in workflow logs for debugging
|
|
89
|
+
# Rerun in debug mode or enable `show_full_output: true` in your workflow file for full output.
|
|
90
|
+
# show_full_output: false
|
|
91
|
+
|
|
88
92
|
prompt: |
|
|
89
93
|
You are reviewing documentation accuracy for a pull request.
|
|
90
94
|
|
|
@@ -48,3 +48,7 @@ jobs:
|
|
|
48
48
|
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
49
49
|
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
50
50
|
|
|
51
|
+
# Optional: Show full output in workflow logs for debugging
|
|
52
|
+
# Rerun in debug mode or enable `show_full_output: true` in your workflow file for full output.
|
|
53
|
+
# show_full_output: false
|
|
54
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llmsbrieftxt
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Generate llms-brief.txt files from documentation websites using AI
|
|
5
5
|
Project-URL: Homepage, https://github.com/stevennevins/llmsbrief
|
|
6
6
|
Project-URL: Repository, https://github.com/stevennevins/llmsbrief
|
|
@@ -13,7 +13,7 @@ This document provides test scenarios for validating `llmtxt` CLI behavior acros
|
|
|
13
13
|
export OPENAI_API_KEY="ollama-dummy-key"
|
|
14
14
|
```
|
|
15
15
|
- Clean test environment with fresh cache
|
|
16
|
-
- Test URLs should be stable documentation sites (
|
|
16
|
+
- Test URLs should be stable documentation sites (example.com is recommended - simple, 1-2 pages, fast)
|
|
17
17
|
- **Why Ollama**: Zero API costs, same code paths as production, fast local execution
|
|
18
18
|
|
|
19
19
|
## Test Scenario 1: Fresh Install - Default Behavior
|
|
@@ -34,13 +34,13 @@ This document provides test scenarios for validating `llmtxt` CLI behavior acros
|
|
|
34
34
|
- `llmtxt` command is available in PATH
|
|
35
35
|
|
|
36
36
|
**Test Steps**:
|
|
37
|
-
1. Run: `llmtxt https://
|
|
37
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --max-urls 2 --depth 1`
|
|
38
38
|
2. Observe console output for progress indicators
|
|
39
39
|
3. Wait for completion
|
|
40
40
|
|
|
41
41
|
**Expected Results**:
|
|
42
42
|
- ✅ Command exits with status code 0
|
|
43
|
-
- ✅ Output file created at `~/.claude/docs/
|
|
43
|
+
- ✅ Output file created at `~/.claude/docs/example.com.txt`
|
|
44
44
|
- ✅ Cache directory created at `.llmsbrieftxt_cache/`
|
|
45
45
|
- ✅ Cache file `summaries.json` contains entries for processed URLs
|
|
46
46
|
- ✅ Output file contains structured entries with "Title:", "Keywords:", "Summary:" format
|
|
@@ -53,22 +53,22 @@ This document provides test scenarios for validating `llmtxt` CLI behavior acros
|
|
|
53
53
|
echo $? # Should be 0
|
|
54
54
|
|
|
55
55
|
# Verify output exists and has content
|
|
56
|
-
test -f ~/.claude/docs/
|
|
57
|
-
wc -l ~/.claude/docs/
|
|
56
|
+
test -f ~/.claude/docs/example.com.txt && echo "PASS" || echo "FAIL"
|
|
57
|
+
wc -l ~/.claude/docs/example.com.txt # Should have 8+ lines (4 lines per entry × ~2 entries)
|
|
58
58
|
|
|
59
59
|
# Verify cache exists
|
|
60
60
|
test -f .llmsbrieftxt_cache/summaries.json && echo "PASS" || echo "FAIL"
|
|
61
|
-
cat .llmsbrieftxt_cache/summaries.json | jq 'length' # Should show
|
|
61
|
+
cat .llmsbrieftxt_cache/summaries.json | jq 'length' # Should show 1-2 cached entries
|
|
62
62
|
|
|
63
63
|
# Verify output structure
|
|
64
|
-
grep -c "^Title:" ~/.claude/docs/
|
|
65
|
-
grep -c "^Keywords:" ~/.claude/docs/
|
|
66
|
-
grep -c "^Summary:" ~/.claude/docs/
|
|
64
|
+
grep -c "^Title:" ~/.claude/docs/example.com.txt # Should be 1-2 (number of URLs processed)
|
|
65
|
+
grep -c "^Keywords:" ~/.claude/docs/example.com.txt # Should match Title count
|
|
66
|
+
grep -c "^Summary:" ~/.claude/docs/example.com.txt # Should match Title count
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
**Cleanup**:
|
|
70
70
|
```bash
|
|
71
|
-
rm -rf ~/.claude/docs/
|
|
71
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
72
72
|
rm -rf .llmsbrieftxt_cache/
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -85,7 +85,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
85
85
|
- `llmtxt` command is available
|
|
86
86
|
|
|
87
87
|
**Test Steps**:
|
|
88
|
-
1. Run: `llmtxt https://
|
|
88
|
+
1. Run: `llmtxt https://example.com --show-urls --depth 1`
|
|
89
89
|
2. Observe console output
|
|
90
90
|
3. Check that command completes quickly (< 10 seconds)
|
|
91
91
|
|
|
@@ -104,13 +104,13 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
104
104
|
echo $? # Should be 0
|
|
105
105
|
|
|
106
106
|
# Verify NO output file created
|
|
107
|
-
test ! -f ~/.claude/docs/
|
|
107
|
+
test ! -f ~/.claude/docs/example.com.txt && echo "PASS" || echo "FAIL"
|
|
108
108
|
|
|
109
109
|
# Capture and verify output format
|
|
110
|
-
llmtxt https://
|
|
110
|
+
llmtxt https://example.com --show-urls --depth 1 2>&1 | tee output.txt
|
|
111
111
|
grep -q "Found [0-9]* URLs" output.txt && echo "PASS" || echo "FAIL"
|
|
112
112
|
grep -q "Estimated cost:" output.txt && echo "PASS" || echo "FAIL"
|
|
113
|
-
grep -q "https://
|
|
113
|
+
grep -q "https://example.com" output.txt && echo "PASS" || echo "FAIL"
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
**Cleanup**:
|
|
@@ -131,13 +131,13 @@ rm -f output.txt
|
|
|
131
131
|
- Clean cache state
|
|
132
132
|
|
|
133
133
|
**Test Steps**:
|
|
134
|
-
1. Run: `llmtxt https://
|
|
134
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --depth 1 --max-urls 2`
|
|
135
135
|
2. Wait for completion
|
|
136
136
|
3. Verify constraints were respected
|
|
137
137
|
|
|
138
138
|
**Expected Results**:
|
|
139
139
|
- ✅ Command exits with status code 0
|
|
140
|
-
- ✅ Output file created at `~/.claude/docs/
|
|
140
|
+
- ✅ Output file created at `~/.claude/docs/example.com.txt`
|
|
141
141
|
- ✅ Number of entries ≤ 8 (respects max-urls)
|
|
142
142
|
- ✅ URLs are at most 1 link away from starting URL (respects depth)
|
|
143
143
|
- ✅ Console shows processing status with correct counts
|
|
@@ -145,12 +145,12 @@ rm -f output.txt
|
|
|
145
145
|
**Verification Commands**:
|
|
146
146
|
```bash
|
|
147
147
|
# Count entries in output
|
|
148
|
-
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/
|
|
148
|
+
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/example.com.txt)
|
|
149
149
|
test $ENTRY_COUNT -le 8 && echo "PASS: max-urls respected" || echo "FAIL: too many entries"
|
|
150
150
|
|
|
151
151
|
# Verify depth constraint (URLs should not be deeply nested)
|
|
152
152
|
# This is harder to verify programmatically, so inspect manually
|
|
153
|
-
cat ~/.claude/docs/
|
|
153
|
+
cat ~/.claude/docs/example.com.txt | grep "^Title:"
|
|
154
154
|
|
|
155
155
|
# Check cache has correct number of entries
|
|
156
156
|
CACHE_COUNT=$(cat .llmsbrieftxt_cache/summaries.json | jq 'length')
|
|
@@ -159,7 +159,7 @@ test $CACHE_COUNT -le 8 && echo "PASS" || echo "FAIL"
|
|
|
159
159
|
|
|
160
160
|
**Cleanup**:
|
|
161
161
|
```bash
|
|
162
|
-
rm -rf ~/.claude/docs/
|
|
162
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
163
163
|
rm -rf .llmsbrieftxt_cache/
|
|
164
164
|
```
|
|
165
165
|
|
|
@@ -172,12 +172,12 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
172
172
|
**State**: Existing cache from previous run
|
|
173
173
|
|
|
174
174
|
**Preconditions**:
|
|
175
|
-
- Run initial generation: `llmtxt https://
|
|
175
|
+
- Run initial generation: `llmtxt https://example.com --model gemma3:270m --max-urls 2 --depth 1`
|
|
176
176
|
- Cache exists at `.llmsbrieftxt_cache/summaries.json`
|
|
177
177
|
- Note the cache entry count (should be ~10)
|
|
178
178
|
|
|
179
179
|
**Test Steps**:
|
|
180
|
-
1. Run: `llmtxt https://
|
|
180
|
+
1. Run: `llmtxt https://example.com --use-cache-only --output /tmp/cached-output.txt`
|
|
181
181
|
2. Observe completion time (should be very fast, < 5 seconds)
|
|
182
182
|
3. Verify output was generated from cache only
|
|
183
183
|
|
|
@@ -195,7 +195,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
195
195
|
test -f /tmp/cached-output.txt && echo "PASS" || echo "FAIL"
|
|
196
196
|
|
|
197
197
|
# Compare entry count
|
|
198
|
-
ORIGINAL_COUNT=$(grep -c "^Title:" ~/.claude/docs/
|
|
198
|
+
ORIGINAL_COUNT=$(grep -c "^Title:" ~/.claude/docs/example.com.txt)
|
|
199
199
|
CACHED_COUNT=$(grep -c "^Title:" /tmp/cached-output.txt)
|
|
200
200
|
test $ORIGINAL_COUNT -eq $CACHED_COUNT && echo "PASS: same entry count" || echo "FAIL"
|
|
201
201
|
|
|
@@ -222,13 +222,13 @@ rm -f /tmp/cached-output.txt
|
|
|
222
222
|
- Note cache modification time
|
|
223
223
|
|
|
224
224
|
**Test Steps**:
|
|
225
|
-
1. Run: `llmtxt https://
|
|
225
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --force-refresh --max-urls 2 --depth 1`
|
|
226
226
|
2. Wait for completion
|
|
227
227
|
3. Verify cache was updated
|
|
228
228
|
|
|
229
229
|
**Expected Results**:
|
|
230
230
|
- ✅ Command exits with status code 0
|
|
231
|
-
- ✅ Output file created/updated at `~/.claude/docs/
|
|
231
|
+
- ✅ Output file created/updated at `~/.claude/docs/example.com.txt`
|
|
232
232
|
- ✅ Console shows "Cached: 0 | New: X" (all new summaries)
|
|
233
233
|
- ✅ Cache file timestamp is updated
|
|
234
234
|
- ✅ Cache file contents are replaced with fresh data
|
|
@@ -245,7 +245,7 @@ cat .llmsbrieftxt_cache/summaries.json | jq '.[].timestamp' 2>/dev/null
|
|
|
245
245
|
|
|
246
246
|
**Cleanup**:
|
|
247
247
|
```bash
|
|
248
|
-
rm -rf ~/.claude/docs/
|
|
248
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
249
249
|
rm -rf .llmsbrieftxt_cache/
|
|
250
250
|
```
|
|
251
251
|
|
|
@@ -262,7 +262,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
262
262
|
- Create test directory: `mkdir -p /tmp/test-llmtxt/{output,cache}`
|
|
263
263
|
|
|
264
264
|
**Test Steps**:
|
|
265
|
-
1. Run: `llmtxt https://
|
|
265
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --output /tmp/test-llmtxt/output/custom.txt --cache-dir /tmp/test-llmtxt/cache --max-urls 2 --depth 1`
|
|
266
266
|
2. Verify custom paths are used
|
|
267
267
|
3. Verify default paths are NOT used
|
|
268
268
|
|
|
@@ -277,7 +277,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
277
277
|
```bash
|
|
278
278
|
# Verify custom output location
|
|
279
279
|
test -f /tmp/test-llmtxt/output/custom.txt && echo "PASS: custom output" || echo "FAIL"
|
|
280
|
-
test ! -f ~/.claude/docs/
|
|
280
|
+
test ! -f ~/.claude/docs/example.com.txt && echo "PASS: no default output" || echo "FAIL"
|
|
281
281
|
|
|
282
282
|
# Verify custom cache location
|
|
283
283
|
test -f /tmp/test-llmtxt/cache/summaries.json && echo "PASS: custom cache" || echo "FAIL"
|
|
@@ -302,8 +302,8 @@ rm -rf /tmp/test-llmtxt/
|
|
|
302
302
|
|
|
303
303
|
**Preconditions**:
|
|
304
304
|
- Ollama environment configured
|
|
305
|
-
- Run: `llmtxt https://
|
|
306
|
-
- Output file exists at `~/.claude/docs/
|
|
305
|
+
- Run: `llmtxt https://example.com --model gemma3:270m --max-urls 3 --depth 2`
|
|
306
|
+
- Output file exists at `~/.claude/docs/example.com.txt`
|
|
307
307
|
|
|
308
308
|
**Test Steps**:
|
|
309
309
|
1. Search for known terms in output file
|
|
@@ -320,7 +320,7 @@ rm -rf /tmp/test-llmtxt/
|
|
|
320
320
|
|
|
321
321
|
**Verification Commands**:
|
|
322
322
|
```bash
|
|
323
|
-
FILE=~/.claude/docs/
|
|
323
|
+
FILE=~/.claude/docs/example.com.txt
|
|
324
324
|
|
|
325
325
|
# Test structured field searches
|
|
326
326
|
grep "^Title:" $FILE | head -3
|
|
@@ -344,7 +344,7 @@ grep "^Title:.*https://" $FILE && echo "PASS: URLs in titles" || echo "FAIL"
|
|
|
344
344
|
|
|
345
345
|
**Cleanup**:
|
|
346
346
|
```bash
|
|
347
|
-
rm -rf ~/.claude/docs/
|
|
347
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
348
348
|
rm -rf .llmsbrieftxt_cache/
|
|
349
349
|
```
|
|
350
350
|
|
|
@@ -361,7 +361,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
361
361
|
- Use a site known to have some broken links OR manually test with non-existent URLs
|
|
362
362
|
|
|
363
363
|
**Test Steps**:
|
|
364
|
-
1. Run: `llmtxt https://
|
|
364
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --max-urls 3 --depth 2`
|
|
365
365
|
(Note: some URLs may fail during crawl or extraction)
|
|
366
366
|
2. Wait for completion
|
|
367
367
|
3. Check for failed_urls.txt file
|
|
@@ -377,7 +377,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
377
377
|
**Verification Commands**:
|
|
378
378
|
```bash
|
|
379
379
|
# Verify output was generated despite failures
|
|
380
|
-
test -f ~/.claude/docs/
|
|
380
|
+
test -f ~/.claude/docs/example.com.txt && echo "PASS: output created" || echo "FAIL"
|
|
381
381
|
|
|
382
382
|
# Check for failed URLs file (may or may not exist)
|
|
383
383
|
if [ -f ~/.claude/docs/failed_urls.txt ]; then
|
|
@@ -390,7 +390,7 @@ else
|
|
|
390
390
|
fi
|
|
391
391
|
|
|
392
392
|
# Verify successful URLs are in output
|
|
393
|
-
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/
|
|
393
|
+
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/example.com.txt)
|
|
394
394
|
test $ENTRY_COUNT -gt 0 && echo "PASS: at least some URLs succeeded" || echo "FAIL: no entries"
|
|
395
395
|
|
|
396
396
|
# Verify successful URLs are cached
|
|
@@ -400,7 +400,7 @@ test $CACHE_COUNT -gt 0 && echo "PASS: successful URLs cached" || echo "FAIL"
|
|
|
400
400
|
|
|
401
401
|
**Cleanup**:
|
|
402
402
|
```bash
|
|
403
|
-
rm -rf ~/.claude/docs/
|
|
403
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
404
404
|
rm -rf ~/.claude/docs/failed_urls.txt
|
|
405
405
|
rm -rf .llmsbrieftxt_cache/
|
|
406
406
|
```
|
|
@@ -419,40 +419,40 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
419
419
|
- Verify model available: `ollama list | grep phi3`
|
|
420
420
|
|
|
421
421
|
**Test Steps**:
|
|
422
|
-
1. Run: `llmtxt https://
|
|
422
|
+
1. Run: `llmtxt https://example.com --model phi3:mini --max-urls 2 --depth 1`
|
|
423
423
|
2. Verify generation completes successfully
|
|
424
|
-
3. Compare output quality with
|
|
424
|
+
3. Compare output quality with gemma2:2b (optional)
|
|
425
425
|
|
|
426
426
|
**Expected Results**:
|
|
427
427
|
- ✅ Command exits with status code 0
|
|
428
|
-
- ✅ Output file created at `~/.claude/docs/
|
|
428
|
+
- ✅ Output file created at `~/.claude/docs/example.com.txt`
|
|
429
429
|
- ✅ Summaries are generated with phi3 model
|
|
430
430
|
- ✅ No API costs incurred
|
|
431
431
|
- ✅ Cache is populated
|
|
432
432
|
- ✅ Output has correct format (Title, Keywords, Summary)
|
|
433
|
-
- ✅ Quality may be
|
|
433
|
+
- ✅ Quality may be different from default gemma3:270m
|
|
434
434
|
|
|
435
435
|
**Verification Commands**:
|
|
436
436
|
```bash
|
|
437
437
|
# Verify output exists
|
|
438
|
-
test -f ~/.claude/docs/
|
|
438
|
+
test -f ~/.claude/docs/example.com.txt && echo "PASS: output created" || echo "FAIL"
|
|
439
439
|
|
|
440
440
|
# Verify structure
|
|
441
|
-
grep -q "^Title:" ~/.claude/docs/
|
|
442
|
-
grep -q "^Keywords:" ~/.claude/docs/
|
|
443
|
-
grep -q "^Summary:" ~/.claude/docs/
|
|
441
|
+
grep -q "^Title:" ~/.claude/docs/example.com.txt && echo "PASS: has titles" || echo "FAIL"
|
|
442
|
+
grep -q "^Keywords:" ~/.claude/docs/example.com.txt && echo "PASS: has keywords" || echo "FAIL"
|
|
443
|
+
grep -q "^Summary:" ~/.claude/docs/example.com.txt && echo "PASS: has summaries" || echo "FAIL"
|
|
444
444
|
|
|
445
445
|
# Count entries
|
|
446
|
-
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/
|
|
446
|
+
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/example.com.txt)
|
|
447
447
|
test $ENTRY_COUNT -gt 0 && echo "PASS: $ENTRY_COUNT entries" || echo "FAIL"
|
|
448
448
|
|
|
449
449
|
# Compare summary quality (manual inspection)
|
|
450
|
-
head -30 ~/.claude/docs/
|
|
450
|
+
head -30 ~/.claude/docs/example.com.txt
|
|
451
451
|
```
|
|
452
452
|
|
|
453
453
|
**Cleanup**:
|
|
454
454
|
```bash
|
|
455
|
-
rm -rf ~/.claude/docs/
|
|
455
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
456
456
|
rm -rf .llmsbrieftxt_cache/
|
|
457
457
|
```
|
|
458
458
|
|
|
@@ -469,10 +469,10 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
469
469
|
- Test with a site that has clear depth structure
|
|
470
470
|
|
|
471
471
|
**Test Steps**:
|
|
472
|
-
1. Run with depth 1: `llmtxt https://
|
|
473
|
-
2. Run with depth 2: `llmtxt https://
|
|
472
|
+
1. Run with depth 1: `llmtxt https://example.com --depth 1 --show-urls`
|
|
473
|
+
2. Run with depth 2: `llmtxt https://example.com --depth 2 --show-urls`
|
|
474
474
|
3. Compare URL counts - depth 2 should discover more URLs
|
|
475
|
-
4. Generate with depth 1: `llmtxt https://
|
|
475
|
+
4. Generate with depth 1: `llmtxt https://example.com --model gemma3:270m --depth 1 --max-urls 2`
|
|
476
476
|
5. Verify only shallow URLs are processed
|
|
477
477
|
|
|
478
478
|
**Expected Results**:
|
|
@@ -486,8 +486,8 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
486
486
|
**Verification Commands**:
|
|
487
487
|
```bash
|
|
488
488
|
# Preview and capture URL counts
|
|
489
|
-
DEPTH1_COUNT=$(llmtxt https://
|
|
490
|
-
DEPTH2_COUNT=$(llmtxt https://
|
|
489
|
+
DEPTH1_COUNT=$(llmtxt https://example.com --depth 1 --show-urls 2>&1 | grep "Found" | grep -oP '\d+')
|
|
490
|
+
DEPTH2_COUNT=$(llmtxt https://example.com --depth 2 --show-urls 2>&1 | grep "Found" | grep -oP '\d+')
|
|
491
491
|
|
|
492
492
|
echo "Depth 1 URLs: $DEPTH1_COUNT"
|
|
493
493
|
echo "Depth 2 URLs: $DEPTH2_COUNT"
|
|
@@ -496,15 +496,15 @@ echo "Depth 2 URLs: $DEPTH2_COUNT"
|
|
|
496
496
|
test $DEPTH2_COUNT -gt $DEPTH1_COUNT && echo "PASS: depth increases URL count" || echo "FAIL"
|
|
497
497
|
|
|
498
498
|
# Actually generate with depth 1
|
|
499
|
-
llmtxt https://
|
|
499
|
+
llmtxt https://example.com --model gemma2:2b --depth 1 --max-urls 2
|
|
500
500
|
|
|
501
501
|
# Verify output
|
|
502
|
-
test -f ~/.claude/docs/
|
|
502
|
+
test -f ~/.claude/docs/example.com.txt && echo "PASS" || echo "FAIL"
|
|
503
503
|
```
|
|
504
504
|
|
|
505
505
|
**Cleanup**:
|
|
506
506
|
```bash
|
|
507
|
-
rm -rf ~/.claude/docs/
|
|
507
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
508
508
|
rm -rf .llmsbrieftxt_cache/
|
|
509
509
|
```
|
|
510
510
|
|
|
@@ -518,12 +518,12 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
518
518
|
|
|
519
519
|
**Preconditions**:
|
|
520
520
|
- Ollama environment configured
|
|
521
|
-
- First run completed: `llmtxt https://
|
|
521
|
+
- First run completed: `llmtxt https://example.com --model gemma3:270m --max-urls 2 --depth 1`
|
|
522
522
|
- Cache exists with ~10 entries
|
|
523
523
|
- Note cache creation time
|
|
524
524
|
|
|
525
525
|
**Test Steps**:
|
|
526
|
-
1. Run again with higher max-urls: `llmtxt https://
|
|
526
|
+
1. Run again with higher max-urls: `llmtxt https://example.com --model gemma3:270m --max-urls 3 --depth 1`
|
|
527
527
|
2. Observe that cached entries are reused
|
|
528
528
|
3. Verify only new URLs are processed
|
|
529
529
|
|
|
@@ -540,7 +540,7 @@ rm -rf .llmsbrieftxt_cache/
|
|
|
540
540
|
# Check cache size increased
|
|
541
541
|
INITIAL_CACHE=$(cat .llmsbrieftxt_cache/summaries.json | jq 'length')
|
|
542
542
|
# Run with more URLs
|
|
543
|
-
llmtxt https://
|
|
543
|
+
llmtxt https://example.com --model gemma2:2b --max-urls 3 --depth 1 2>&1 | tee output.log
|
|
544
544
|
FINAL_CACHE=$(cat .llmsbrieftxt_cache/summaries.json | jq 'length')
|
|
545
545
|
|
|
546
546
|
echo "Initial cache: $INITIAL_CACHE"
|
|
@@ -551,13 +551,13 @@ test $FINAL_CACHE -gt $INITIAL_CACHE && echo "PASS: cache grew" || echo "FAIL"
|
|
|
551
551
|
grep -q "Cached:" output.log && echo "PASS: cache reuse reported" || echo "FAIL"
|
|
552
552
|
|
|
553
553
|
# Verify output has more entries
|
|
554
|
-
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/
|
|
555
|
-
test $ENTRY_COUNT -ge
|
|
554
|
+
ENTRY_COUNT=$(grep -c "^Title:" ~/.claude/docs/example.com.txt)
|
|
555
|
+
test $ENTRY_COUNT -ge 1 && echo "PASS: has at least 1 entry" || echo "FAIL"
|
|
556
556
|
```
|
|
557
557
|
|
|
558
558
|
**Cleanup**:
|
|
559
559
|
```bash
|
|
560
|
-
rm -rf ~/.claude/docs/
|
|
560
|
+
rm -rf ~/.claude/docs/example.com.txt
|
|
561
561
|
rm -rf .llmsbrieftxt_cache/
|
|
562
562
|
rm -f output.log
|
|
563
563
|
```
|
|
@@ -576,7 +576,7 @@ rm -f output.log
|
|
|
576
576
|
- Environment variables still set (but service unavailable)
|
|
577
577
|
|
|
578
578
|
**Test Steps**:
|
|
579
|
-
1. Run: `llmtxt https://
|
|
579
|
+
1. Run: `llmtxt https://example.com --model gemma3:270m --max-urls 2`
|
|
580
580
|
2. Observe error message about connection failure
|
|
581
581
|
|
|
582
582
|
**Expected Results**:
|
|
@@ -593,14 +593,14 @@ pkill ollama 2>/dev/null || true
|
|
|
593
593
|
sleep 2
|
|
594
594
|
|
|
595
595
|
# Run and capture exit code
|
|
596
|
-
llmtxt https://
|
|
596
|
+
llmtxt https://example.com --model gemma2:2b --max-urls 2 2>&1 | tee error.log
|
|
597
597
|
EXIT_CODE=$?
|
|
598
598
|
|
|
599
599
|
test $EXIT_CODE -ne 0 && echo "PASS: non-zero exit" || echo "FAIL: should have failed"
|
|
600
600
|
grep -qi "connection\|refused\|timeout\|11434" error.log && echo "PASS: connection error" || echo "FAIL"
|
|
601
601
|
|
|
602
602
|
# Verify no output
|
|
603
|
-
test ! -f ~/.claude/docs/
|
|
603
|
+
test ! -f ~/.claude/docs/example.com.txt && echo "PASS: no output" || echo "FAIL"
|
|
604
604
|
```
|
|
605
605
|
|
|
606
606
|
**Cleanup**:
|
|
@@ -624,7 +624,7 @@ sleep 2
|
|
|
624
624
|
- Model NOT pulled: `nonexistent-model-xyz`
|
|
625
625
|
|
|
626
626
|
**Test Steps**:
|
|
627
|
-
1. Run with non-existent model: `llmtxt https://
|
|
627
|
+
1. Run with non-existent model: `llmtxt https://example.com --model nonexistent-model-xyz --max-urls 2 --depth 1`
|
|
628
628
|
2. Observe error about model not found
|
|
629
629
|
|
|
630
630
|
**Expected Results**:
|
|
@@ -636,7 +636,7 @@ sleep 2
|
|
|
636
636
|
**Verification Commands**:
|
|
637
637
|
```bash
|
|
638
638
|
# Run with invalid model
|
|
639
|
-
llmtxt https://
|
|
639
|
+
llmtxt https://example.com --model nonexistent-model-xyz --max-urls 2 2>&1 | tee error.log
|
|
640
640
|
EXIT_CODE=$?
|
|
641
641
|
|
|
642
642
|
test $EXIT_CODE -ne 0 && echo "PASS: non-zero exit" || echo "FAIL: should have failed"
|
|
@@ -649,7 +649,7 @@ grep -qi "model\|not found\|available" error.log && echo "PASS: model error" ||
|
|
|
649
649
|
**Cleanup**:
|
|
650
650
|
```bash
|
|
651
651
|
rm -f error.log
|
|
652
|
-
rm -rf ~/.claude/docs/
|
|
652
|
+
rm -rf ~/.claude/docs/example.com.txt 2>/dev/null
|
|
653
653
|
rm -rf .llmsbrieftxt_cache/ 2>/dev/null
|
|
654
654
|
```
|
|
655
655
|
|
|
@@ -687,8 +687,8 @@ Run all scenarios above and mark results:
|
|
|
687
687
|
5. Run integration tests (TS-008, TS-012) if those environments available
|
|
688
688
|
|
|
689
689
|
**Test Environment**:
|
|
690
|
-
- Use
|
|
691
|
-
- Use `--max-urls
|
|
690
|
+
- Use example.com as the standard test URL (1-2 pages, stable, fast)
|
|
691
|
+
- Use `--max-urls 2 --depth 1` for faster test cycles
|
|
692
692
|
- Always clean up between tests to ensure isolated state
|
|
693
693
|
- Keep Ollama running in background: `ollama serve > /dev/null 2>&1 &`
|
|
694
694
|
- Monitor Ollama logs if needed: `tail -f ~/.ollama/logs/server.log`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|