hyntx 2.6.0 → 2.7.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/README.md +63 -15
- package/dist/api/index.js +1 -1
- package/dist/{chunk-TGFHVZHY.js → chunk-UDPUTBEU.js} +18 -0
- package/dist/cli.js +18 -0
- package/dist/index.js +1 -1
- package/package.json +27 -19
package/README.md
CHANGED
|
@@ -119,6 +119,15 @@ hyntx --from 2025-01-15 --to 2025-01-22 --project backend-api
|
|
|
119
119
|
|
|
120
120
|
# Generate markdown report for yesterday
|
|
121
121
|
hyntx --date yesterday --output yesterday-analysis.md
|
|
122
|
+
|
|
123
|
+
# Deep analysis with individual mode for critical project
|
|
124
|
+
hyntx -m individual --project production-api --date today
|
|
125
|
+
|
|
126
|
+
# Fast batch analysis across date range
|
|
127
|
+
hyntx --from 2025-01-15 --to 2025-01-20 --analysis-mode batch -o report.md
|
|
128
|
+
|
|
129
|
+
# Watch mode with individual analysis (slower but detailed)
|
|
130
|
+
hyntx --watch -m individual --project critical-app
|
|
122
131
|
```
|
|
123
132
|
|
|
124
133
|
## Configuration
|
|
@@ -151,16 +160,25 @@ hyntx --analysis-mode individual # Use individual mode
|
|
|
151
160
|
hyntx -m individual # Short form
|
|
152
161
|
```
|
|
153
162
|
|
|
154
|
-
#### Mode Comparison
|
|
163
|
+
#### Quick Mode Comparison
|
|
164
|
+
|
|
165
|
+
| Mode | Speed/Prompt | Use Case | Accuracy | When to Use |
|
|
166
|
+
| ---------- | ------------ | -------------------------- | -------- | ----------------------------------------- |
|
|
167
|
+
| Batch | ~300-400ms | Daily analysis, monitoring | Good | Quick feedback, large datasets |
|
|
168
|
+
| Individual | ~1-1.5s | Deep analysis, learning | Better | Quality-focused reviews, critical prompts |
|
|
155
169
|
|
|
156
|
-
|
|
157
|
-
| ---------- | ------------ | -------------- | -------- |
|
|
158
|
-
| Batch | ~300-400ms | Daily analysis | Good |
|
|
159
|
-
| Individual | ~1-1.5s | Deep analysis | Better |
|
|
170
|
+
**Speedup**: Batch mode is 3-4x faster than individual mode.
|
|
160
171
|
|
|
161
|
-
**Recommendation**: Use batch mode for daily analysis
|
|
172
|
+
**Recommendation**: Use batch mode (default) for daily analysis to get fast feedback. Switch to individual mode when:
|
|
162
173
|
|
|
163
|
-
|
|
174
|
+
- You need detailed, nuanced feedback on each prompt
|
|
175
|
+
- You're learning prompt engineering patterns
|
|
176
|
+
- Analyzing high-stakes or complex prompts
|
|
177
|
+
- Conducting quality audits or teaching sessions
|
|
178
|
+
|
|
179
|
+
**Performance Note**: Numbers based on `llama3.2` on CPU. Actual speed varies by hardware, model size, and prompt complexity.
|
|
180
|
+
|
|
181
|
+
**Detailed Guide**: See [Analysis Modes Documentation](./docs/ANALYSIS_MODES.md) for comprehensive comparison, examples, and decision guidelines.
|
|
164
182
|
|
|
165
183
|
### Rules Configuration
|
|
166
184
|
|
|
@@ -410,11 +428,33 @@ Hyntx can run as a [Model Context Protocol (MCP)](https://modelcontextprotocol.i
|
|
|
410
428
|
|
|
411
429
|
### Quick Setup
|
|
412
430
|
|
|
413
|
-
Add hyntx to your Claude Code MCP configuration:
|
|
431
|
+
Add hyntx to your Claude Code MCP configuration. You have two options:
|
|
432
|
+
|
|
433
|
+
#### Option 1: User-scoped (Recommended)
|
|
434
|
+
|
|
435
|
+
Configuration visible only to you, stored in `~/.claude.json`:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
# Add using Claude Code CLI
|
|
439
|
+
claude mcp add hyntx
|
|
440
|
+
|
|
441
|
+
# Or manually edit ~/.claude.json
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
```json
|
|
445
|
+
{
|
|
446
|
+
"mcpServers": {
|
|
447
|
+
"hyntx": {
|
|
448
|
+
"command": "hyntx",
|
|
449
|
+
"args": ["--mcp-server"]
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
```
|
|
414
454
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
455
|
+
#### Option 2: Project-scoped
|
|
456
|
+
|
|
457
|
+
Configuration shared with your team via Git, stored in `.mcp.json` at your project root:
|
|
418
458
|
|
|
419
459
|
```json
|
|
420
460
|
{
|
|
@@ -427,7 +467,7 @@ Add hyntx to your Claude Code MCP configuration:
|
|
|
427
467
|
}
|
|
428
468
|
```
|
|
429
469
|
|
|
430
|
-
After
|
|
470
|
+
After adding the configuration, restart your Claude Code session. The hyntx tools will be available in your conversations.
|
|
431
471
|
|
|
432
472
|
### Prerequisites
|
|
433
473
|
|
|
@@ -603,12 +643,20 @@ Use check-context to verify: "Update the component to handle errors"
|
|
|
603
643
|
#### "Tools not appearing in Claude Code"
|
|
604
644
|
|
|
605
645
|
1. Restart Claude Code completely after config changes
|
|
606
|
-
2. Verify the config file
|
|
646
|
+
2. Verify the config file exists and is in the correct location:
|
|
647
|
+
- User-scoped: `~/.claude.json`
|
|
648
|
+
- Project-scoped: `.mcp.json` (in project root)
|
|
607
649
|
3. Check JSON syntax in the config file:
|
|
608
650
|
|
|
609
651
|
```bash
|
|
610
|
-
#
|
|
611
|
-
cat
|
|
652
|
+
# Verify user-scoped config
|
|
653
|
+
cat ~/.claude.json | jq .
|
|
654
|
+
|
|
655
|
+
# Or verify project-scoped config
|
|
656
|
+
cat .mcp.json | jq .
|
|
657
|
+
|
|
658
|
+
# Or use Claude Code CLI to list MCP servers
|
|
659
|
+
claude mcp list
|
|
612
660
|
```
|
|
613
661
|
|
|
614
662
|
#### "Slow responses"
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BATCH_STRATEGIES, CACHE_ANALYSIS_DIR, CACHE_DEFAULTS, CACHE_META_FILE, CLAUDE_PROJECTS_DIR, ENV_DEFAULTS, EXIT_CODES, HYNTX_CACHE_DIR, HYNTX_HISTORY_DIR, LAST_RUN_FILE, PROVIDER_LIMITS, analyzePrompts, claudeProjectsExist, cleanupExpiredEntries, clearCache, compareResults, createProvider, ensureHistoryDir, extractProjectName, generateCacheKey, getAllProviders, getAvailableProvider, getCachedResult, getDateOneMonthAgo, getDateOneWeekAgo, getEnvConfig, getHistoryDir, groupByDay, hashSystemPrompt, isFirstRun, listAvailableDates, loadAnalysisResult, loadProjectConfig, loadProjectConfigForCwd, mergeConfigs, parseDate, parseServices, readLogs, sanitize, sanitizePrompts, saveAnalysisResult, setCachedResult, validateSystemPrompt } from '../chunk-
|
|
1
|
+
export { BATCH_STRATEGIES, CACHE_ANALYSIS_DIR, CACHE_DEFAULTS, CACHE_META_FILE, CLAUDE_PROJECTS_DIR, ENV_DEFAULTS, EXIT_CODES, HYNTX_CACHE_DIR, HYNTX_HISTORY_DIR, LAST_RUN_FILE, PROVIDER_LIMITS, analyzePrompts, claudeProjectsExist, cleanupExpiredEntries, clearCache, compareResults, createProvider, ensureHistoryDir, extractProjectName, generateCacheKey, getAllProviders, getAvailableProvider, getCachedResult, getDateOneMonthAgo, getDateOneWeekAgo, getEnvConfig, getHistoryDir, groupByDay, hashSystemPrompt, isFirstRun, listAvailableDates, loadAnalysisResult, loadProjectConfig, loadProjectConfigForCwd, mergeConfigs, parseDate, parseServices, readLogs, sanitize, sanitizePrompts, saveAnalysisResult, setCachedResult, validateSystemPrompt } from '../chunk-UDPUTBEU.js';
|
|
@@ -2159,6 +2159,17 @@ function convertMinimalToAnalysisResult(minimal, date, taxonomy, prompts) {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
|
|
2161
2161
|
// src/providers/base.ts
|
|
2162
|
+
var PLACEHOLDER_PATTERNS = [
|
|
2163
|
+
"kebab-case-id",
|
|
2164
|
+
"Original problematic prompt",
|
|
2165
|
+
"Improved version addressing the issue",
|
|
2166
|
+
"<PLACEHOLDER_EXAMPLE>",
|
|
2167
|
+
"Human-Readable Issue Name"
|
|
2168
|
+
];
|
|
2169
|
+
function containsPlaceholders(response) {
|
|
2170
|
+
const lower = response.toLowerCase();
|
|
2171
|
+
return PLACEHOLDER_PATTERNS.some((p) => lower.includes(p.toLowerCase()));
|
|
2172
|
+
}
|
|
2162
2173
|
function buildUserPrompt(prompts, date, context) {
|
|
2163
2174
|
if (prompts.length === 0) {
|
|
2164
2175
|
throw new Error("Cannot build prompt from empty array");
|
|
@@ -2290,6 +2301,11 @@ function parseResponse(response, date, taxonomy = ISSUE_TAXONOMY, prompts) {
|
|
|
2290
2301
|
);
|
|
2291
2302
|
}
|
|
2292
2303
|
}
|
|
2304
|
+
if (containsPlaceholders(response)) {
|
|
2305
|
+
throw new Error(
|
|
2306
|
+
"Response contains placeholder text - model did not provide real analysis"
|
|
2307
|
+
);
|
|
2308
|
+
}
|
|
2293
2309
|
if (isValidMinimalResponse(parsed)) {
|
|
2294
2310
|
const minimal = extractMinimalResult(parsed);
|
|
2295
2311
|
return convertMinimalToAnalysisResult(minimal, date, taxonomy, prompts);
|
|
@@ -2324,6 +2340,8 @@ function parseResponse(response, date, taxonomy = ISSUE_TAXONOMY, prompts) {
|
|
|
2324
2340
|
patterns: normalizedPatterns,
|
|
2325
2341
|
stats: {
|
|
2326
2342
|
...parsed.stats,
|
|
2343
|
+
// Override totalPrompts with actual count if prompts provided
|
|
2344
|
+
totalPrompts: prompts?.length ?? parsed.stats.totalPrompts,
|
|
2327
2345
|
overallScore: normalizeScore(parsed.stats.overallScore)
|
|
2328
2346
|
},
|
|
2329
2347
|
topSuggestion: parsed.topSuggestion
|
package/dist/cli.js
CHANGED
|
@@ -4687,6 +4687,17 @@ function convertMinimalToAnalysisResult(minimal, date, taxonomy, prompts3) {
|
|
|
4687
4687
|
}
|
|
4688
4688
|
|
|
4689
4689
|
// src/providers/base.ts
|
|
4690
|
+
var PLACEHOLDER_PATTERNS = [
|
|
4691
|
+
"kebab-case-id",
|
|
4692
|
+
"Original problematic prompt",
|
|
4693
|
+
"Improved version addressing the issue",
|
|
4694
|
+
"<PLACEHOLDER_EXAMPLE>",
|
|
4695
|
+
"Human-Readable Issue Name"
|
|
4696
|
+
];
|
|
4697
|
+
function containsPlaceholders(response) {
|
|
4698
|
+
const lower = response.toLowerCase();
|
|
4699
|
+
return PLACEHOLDER_PATTERNS.some((p) => lower.includes(p.toLowerCase()));
|
|
4700
|
+
}
|
|
4690
4701
|
function buildUserPrompt(prompts3, date, context) {
|
|
4691
4702
|
if (prompts3.length === 0) {
|
|
4692
4703
|
throw new Error("Cannot build prompt from empty array");
|
|
@@ -4818,6 +4829,11 @@ function parseResponse(response, date, taxonomy = ISSUE_TAXONOMY, prompts3) {
|
|
|
4818
4829
|
);
|
|
4819
4830
|
}
|
|
4820
4831
|
}
|
|
4832
|
+
if (containsPlaceholders(response)) {
|
|
4833
|
+
throw new Error(
|
|
4834
|
+
"Response contains placeholder text - model did not provide real analysis"
|
|
4835
|
+
);
|
|
4836
|
+
}
|
|
4821
4837
|
if (isValidMinimalResponse(parsed)) {
|
|
4822
4838
|
const minimal = extractMinimalResult(parsed);
|
|
4823
4839
|
return convertMinimalToAnalysisResult(minimal, date, taxonomy, prompts3);
|
|
@@ -4852,6 +4868,8 @@ function parseResponse(response, date, taxonomy = ISSUE_TAXONOMY, prompts3) {
|
|
|
4852
4868
|
patterns: normalizedPatterns,
|
|
4853
4869
|
stats: {
|
|
4854
4870
|
...parsed.stats,
|
|
4871
|
+
// Override totalPrompts with actual count if prompts provided
|
|
4872
|
+
totalPrompts: prompts3?.length ?? parsed.stats.totalPrompts,
|
|
4855
4873
|
overallScore: normalizeScore(parsed.stats.overallScore)
|
|
4856
4874
|
},
|
|
4857
4875
|
topSuggestion: parsed.topSuggestion
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BATCH_STRATEGIES, CACHE_ANALYSIS_DIR, CACHE_DEFAULTS, CACHE_META_FILE, CLAUDE_PROJECTS_DIR, ENV_DEFAULTS, EXIT_CODES, HYNTX_CACHE_DIR, HYNTX_HISTORY_DIR, LAST_RUN_FILE, PROVIDER_LIMITS, analyzePrompts, claudeProjectsExist, cleanupExpiredEntries, clearCache, compareResults, createProvider, ensureHistoryDir, extractProjectName, generateCacheKey, getAllProviders, getAvailableProvider, getCachedResult, getDateOneMonthAgo, getDateOneWeekAgo, getEnvConfig, getHistoryDir, groupByDay, hashSystemPrompt, isFirstRun, listAvailableDates, loadAnalysisResult, loadProjectConfig, loadProjectConfigForCwd, mergeConfigs, parseDate, parseServices, readLogs, sanitize, sanitizePrompts, saveAnalysisResult, setCachedResult, validateSystemPrompt } from './chunk-
|
|
1
|
+
export { BATCH_STRATEGIES, CACHE_ANALYSIS_DIR, CACHE_DEFAULTS, CACHE_META_FILE, CLAUDE_PROJECTS_DIR, ENV_DEFAULTS, EXIT_CODES, HYNTX_CACHE_DIR, HYNTX_HISTORY_DIR, LAST_RUN_FILE, PROVIDER_LIMITS, analyzePrompts, claudeProjectsExist, cleanupExpiredEntries, clearCache, compareResults, createProvider, ensureHistoryDir, extractProjectName, generateCacheKey, getAllProviders, getAvailableProvider, getCachedResult, getDateOneMonthAgo, getDateOneWeekAgo, getEnvConfig, getHistoryDir, groupByDay, hashSystemPrompt, isFirstRun, listAvailableDates, loadAnalysisResult, loadProjectConfig, loadProjectConfigForCwd, mergeConfigs, parseDate, parseServices, readLogs, sanitize, sanitizePrompts, saveAnalysisResult, setCachedResult, validateSystemPrompt } from './chunk-UDPUTBEU.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyntx",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "CLI that analyzes Claude Code prompts and generates improvement suggestions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@9.15.4",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"url": "https://github.com/jmlweb/hyntx"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@commitlint/cli": "^20.
|
|
50
|
-
"@commitlint/config-conventional": "^20.
|
|
51
|
-
"@eslint/js": "^9.
|
|
52
|
-
"@jmlweb/commitlint-config": "^
|
|
53
|
-
"@jmlweb/eslint-config-base": "^2.0.
|
|
54
|
-
"@jmlweb/prettier-config-base": "^1.0.
|
|
55
|
-
"@jmlweb/tsconfig-base": "^1.0.
|
|
56
|
-
"@jmlweb/tsup-config-base": "^1.1.
|
|
57
|
-
"@jmlweb/vitest-config": "^
|
|
49
|
+
"@commitlint/cli": "^20.3.0",
|
|
50
|
+
"@commitlint/config-conventional": "^20.3.0",
|
|
51
|
+
"@eslint/js": "^9.39.2",
|
|
52
|
+
"@jmlweb/commitlint-config": "^3.0.1",
|
|
53
|
+
"@jmlweb/eslint-config-base": "^2.0.8",
|
|
54
|
+
"@jmlweb/prettier-config-base": "^1.0.6",
|
|
55
|
+
"@jmlweb/tsconfig-base": "^1.0.5",
|
|
56
|
+
"@jmlweb/tsup-config-base": "^1.1.4",
|
|
57
|
+
"@jmlweb/vitest-config": "^2.0.0",
|
|
58
58
|
"@semantic-release/changelog": "^6.0.3",
|
|
59
|
-
"@semantic-release/exec": "^
|
|
59
|
+
"@semantic-release/exec": "^7.1.0",
|
|
60
60
|
"@semantic-release/git": "^10.0.1",
|
|
61
61
|
"@types/asciichart": "^1.5.8",
|
|
62
62
|
"@types/figlet": "^1.7.0",
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"@types/prompts": "^2.4.9",
|
|
65
65
|
"@vitest/coverage-v8": "^4.0.16",
|
|
66
66
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
67
|
-
"eslint": "^9.
|
|
68
|
-
"eslint-config-prettier": "^
|
|
67
|
+
"eslint": "^9.39.2",
|
|
68
|
+
"eslint-config-prettier": "^10.1.8",
|
|
69
69
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
70
70
|
"husky": "^9.1.7",
|
|
71
71
|
"lint-staged": "^16.2.7",
|
|
72
|
-
"prettier": "^3.4
|
|
72
|
+
"prettier": "^3.7.4",
|
|
73
73
|
"semantic-release": "^25.0.2",
|
|
74
|
-
"tsup": "^8.
|
|
75
|
-
"typescript": "^5.
|
|
76
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"tsup": "^8.5.1",
|
|
75
|
+
"typescript": "^5.9.3",
|
|
76
|
+
"typescript-eslint": "^8.51.0",
|
|
77
77
|
"vitest": "^4.0.16"
|
|
78
78
|
},
|
|
79
79
|
"bin": {
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@modelcontextprotocol/sdk": "^1.25.
|
|
115
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
116
116
|
"asciichart": "^1.5.25",
|
|
117
117
|
"boxen": "^8.0.1",
|
|
118
118
|
"chalk": "^5.6.2",
|
|
@@ -125,6 +125,14 @@
|
|
|
125
125
|
"ora": "^9.0.0",
|
|
126
126
|
"prompts": "^2.4.2",
|
|
127
127
|
"simple-statistics": "^7.8.8",
|
|
128
|
-
"zod": "^4.
|
|
128
|
+
"zod": "^4.3.4"
|
|
129
|
+
},
|
|
130
|
+
"pnpm": {
|
|
131
|
+
"overrides": {
|
|
132
|
+
"hono": ">=4.11.4",
|
|
133
|
+
"lodash": ">=4.17.23",
|
|
134
|
+
"lodash-es": ">=4.17.23",
|
|
135
|
+
"undici": ">=7.18.2"
|
|
136
|
+
}
|
|
129
137
|
}
|
|
130
138
|
}
|