-
Notifications
You must be signed in to change notification settings - Fork 0
docs: replace fabricated command output with real output, add a guard #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -138,16 +138,15 @@ vajra query claim.json 'entropy($.claims[*].status)' --format json | |||||||||
| ``` | ||||||||||
|
|
||||||||||
| ```json | ||||||||||
| { | ||||||||||
| "function": "entropy", | ||||||||||
| "path": "$.claims[*].status", | ||||||||||
| "result": { | ||||||||||
| "shannon_entropy": 1.22, | ||||||||||
| "normalized_entropy": 0.77, | ||||||||||
| "cardinality": 3, | ||||||||||
| "support": ["adjudicated", "pending", "denied"] | ||||||||||
| } | ||||||||||
| } | ||||||||||
| 1.584962500721156 | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| `query` emits the bare result, not an envelope. An analysis function returns a number; a path expression returns the selected value or array. That makes it directly composable: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| if (( $(echo "$(vajra query data.json 'entropy($[*].author)') < 3" | bc -l) )); then | ||||||||||
| echo "contributor diversity below threshold" | ||||||||||
| fi | ||||||||||
|
Comment on lines
+146
to
+149
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Request JSON output before passing the result to Line 147 uses the default Proposed fix-if (( $(echo "$(vajra query data.json 'entropy($[*].author)') < 3" | bc -l) )); then
+if (( $(echo "$(vajra query data.json 'entropy($[*].author)' --format json) < 3" | bc -l) )); then📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Remove the obsolete
meta.truncatedguidance.The updated output no longer contains
meta, but the following paragraph still directs users tometa.truncated. Update or remove that truncation claim to match the new schema.🤖 Prompt for AI Agents