threadlines 0.1.5 → 0.1.6
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 +20 -0
- package/dist/commands/check.js +16 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Threadline CLI - AI-powered linter based on your natural language documentation.
|
|
4
4
|
|
|
5
|
+
## Why Threadline?
|
|
6
|
+
|
|
7
|
+
Getting teams to follow consistent quality standards is **hard**. Really hard.
|
|
8
|
+
|
|
9
|
+
- **Documentation** → Nobody reads it. Or it's outdated before you finish writing it.
|
|
10
|
+
- **Linting** → Catches syntax errors, but misses nuanced stuff.
|
|
11
|
+
- **AI Code Reviewers** → Powerful, but you can't trust them. Did they actually check what you care about? Can you customize them with your team's specific rules?
|
|
12
|
+
|
|
13
|
+
**Threadline solves this** by running **separate, parallel, highly focused AI-powered reviews** - each focused on a single, specific concern. Your coding standards live in your repository as markdown files, version-controlled and always in sync with your codebase. Each threadline gets its own dedicated AI check, ensuring focused attention on what matters to your team.
|
|
14
|
+
|
|
15
|
+
### What Makes Threadline Different?
|
|
16
|
+
|
|
17
|
+
- **🎯 Focused Reviews** - Instead of one AI trying to check everything, Threadline runs multiple specialized AI reviewers in parallel. Each threadline focuses on one thing and does it well.
|
|
18
|
+
|
|
19
|
+
- **📝 Documentation That Lives With Your Code** - Your coding standards live in your repo, in a `/threadlines` folder. They're version-controlled, reviewable, and always in sync with your codebase.
|
|
20
|
+
|
|
21
|
+
- **🔍 Fully Auditable** - Every AI review decision is logged and traceable. You can see exactly what was checked, why it passed or failed, and have confidence in the results.
|
|
22
|
+
|
|
23
|
+
- **⚡ Fast & Parallel** - Multiple threadlines run simultaneously, so you get comprehensive feedback in seconds, not minutes.
|
|
24
|
+
|
|
5
25
|
## Installation
|
|
6
26
|
|
|
7
27
|
```bash
|
package/dist/commands/check.js
CHANGED
|
@@ -77,6 +77,17 @@ async function checkCommand(options) {
|
|
|
77
77
|
console.log(chalk_1.default.yellow('⚠️ No changes detected. Make some code changes and try again.'));
|
|
78
78
|
process.exit(0);
|
|
79
79
|
}
|
|
80
|
+
// Check for zero diff (files changed but no actual code changes)
|
|
81
|
+
if (!gitDiff.diff || gitDiff.diff.trim() === '') {
|
|
82
|
+
console.log(chalk_1.default.blue('ℹ️ No code changes detected. Diff contains zero lines added or removed.'));
|
|
83
|
+
console.log(chalk_1.default.gray(` ${gitDiff.changedFiles.length} file(s) changed but no content modifications detected.`));
|
|
84
|
+
console.log('');
|
|
85
|
+
console.log(chalk_1.default.bold('Results:\n'));
|
|
86
|
+
console.log(chalk_1.default.gray(`${threadlines.length} threadlines checked`));
|
|
87
|
+
console.log(chalk_1.default.gray(` ${threadlines.length} not relevant`));
|
|
88
|
+
console.log('');
|
|
89
|
+
process.exit(0);
|
|
90
|
+
}
|
|
80
91
|
console.log(chalk_1.default.green(`✓ Found ${gitDiff.changedFiles.length} changed file(s)\n`));
|
|
81
92
|
// 3. Read context files for each threadline
|
|
82
93
|
const threadlinesWithContext = threadlines.map(threadline => {
|
|
@@ -121,7 +132,11 @@ async function checkCommand(options) {
|
|
|
121
132
|
}
|
|
122
133
|
}
|
|
123
134
|
function displayResults(response) {
|
|
124
|
-
const { results, metadata } = response;
|
|
135
|
+
const { results, metadata, message } = response;
|
|
136
|
+
// Display informational message if present (e.g., zero diffs)
|
|
137
|
+
if (message) {
|
|
138
|
+
console.log('\n' + chalk_1.default.blue('ℹ️ ' + message));
|
|
139
|
+
}
|
|
125
140
|
console.log('\n' + chalk_1.default.bold('Results:\n'));
|
|
126
141
|
console.log(chalk_1.default.gray(`${metadata.totalThreadlines} threadlines checked`));
|
|
127
142
|
const notRelevant = results.filter((r) => r.status === 'not_relevant').length;
|