Skip to content

Commit dfa2155

Browse files
javimoschSuperCLI Dev
andauthored
docs: fix documentation inconsistencies and improve developer guidance (#196)
- Add lint and typecheck commands to CONTRIBUTING.md Quick Development Commands table (AGENTS.md emphasizes these as pre-commit checks but they were missing) - Fix confusing troubleshooting entries in README.md about JSON output (flowchart suggested adding --json flag when JSON is already default) - Update docs/AGENTS_FRIENDLY_TOOLS.md to replace bdg references with supercli (file was copied from another project and not adapted for supercli context) Co-authored-by: SuperCLI Dev <dev@supercli.dev>
1 parent 58f6429 commit dfa2155

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ npm test
4848
|------|---------|
4949
| Run all tests | `npm test` |
5050
| Run specific test file | `npx jest path/to/test.js` |
51+
| Lint code | `npm run lint` |
52+
| Typecheck | `npm run typecheck` |
5153
| Build Zig binary | `cd supercli-zig-cli && zig build` |
5254
| Generate plugin catalog | `node scripts/generate-catalog.js` |
5355

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Both versions co-exist and share plugin storage at `~/.supercli/plugins/plugins.
359359
|---------|-------------|-----|
360360
| `command not found: supercli` | Not installed | Run `npx supercli` (no install needed) or `npm install -g superacli` |
361361
| Plugin not found | Not in registry | Run `supercli plugins explore --name <query>` to find it |
362-
| Output is not JSON | Add `--json` flag | JSON is default, but if you need to force it, add `--json` |
362+
| Output is not JSON | Tool may not support JSON output | Use `supercli inspect <ns> <res> <act>` to check if the command supports JSON |
363363
| MCP server not connecting | Server not running | Ensure the MCP server process is active and accessible |
364364
| Zig binary not found | Wrong platform binary | Use `npx supercli` (Node.js) as fallback — both share plugin state |
365365

@@ -369,7 +369,7 @@ Both versions co-exist and share plugin storage at `~/.supercli/plugins/plugins.
369369
Problem?
370370
├─ "command not found" → Run `npx supercli` (zero-install) or `npm install -g superacli`
371371
├─ "plugin not found" → `supercli plugins explore --name <query>` to search registry
372-
├─ Output not JSON → Add `--json` flag (JSON is default, this forces it)
372+
├─ Output not JSON → Verify tool supports JSON; use `supercli inspect` to check adapter config
373373
├─ MCP not connecting → Check server process is running + `SUPERCLI_SERVER` env is set
374374
├─ Zig binary missing → Use `npx supercli` (Node.js fallback, shares plugin state)
375375
└─ Arguments rejected → `supercli inspect <ns> <res> <act>` to see expected schema

docs/AGENTS_FRIENDLY_TOOLS.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ An agent-friendly tool is one designed for programmatic consumption where **info
109109
**Example:**
110110
```bash
111111
# Default (human & agent readable)
112-
$ bdg network requests
112+
$ sc network requests
113113
ID: req_123
114114
URL: https://api.example.com/data
115115
Status: 200
116116
Duration: 145ms
117117

118118
# JSON mode (pure machine readable)
119-
$ bdg network requests --json
119+
$ sc network requests --json
120120
{"id":"req_123","url":"https://api.example.com/data","status":200,"duration_ms":145}
121121
```
122122

@@ -138,7 +138,7 @@ $ bdg network requests --json
138138

139139
**Example:**
140140
```bash
141-
$ bdg performance trace --duration 30s
141+
$ sc performance trace --duration 30s
142142
[stderr] Capturing trace... 15s elapsed
143143
[stderr] Capturing trace... 30s complete
144144
[stdout] {"trace_file": "/tmp/trace.json", "size_mb": 45.2}
@@ -237,7 +237,7 @@ Agents need **semantic error signals** to make decisions, not friendly messages.
237237
"recoverable": false,
238238
"retry_after": null,
239239
"suggestions": [
240-
"List recent requests: bdg network requests --recent",
240+
"List recent requests: sc network requests --recent",
241241
"Check request ID format: should be req_*"
242242
]
243243
}
@@ -256,7 +256,7 @@ Agents need **semantic error signals** to make decisions, not friendly messages.
256256
**Anti-Pattern:**
257257
```bash
258258
# Tool retries internally (bad)
259-
$ bdg network requests
259+
$ sc network requests
260260
Connecting... failed
261261
Retrying in 2s...
262262
Retrying in 4s...
@@ -266,7 +266,7 @@ Error: Connection failed after 3 attempts
266266
**Correct Pattern:**
267267
```bash
268268
# Tool reports error clearly (good)
269-
$ bdg network requests --json
269+
$ sc network requests --json
270270
{"error": {"code": 105, "type": "connection_timeout", "recoverable": true, "retry_after": 2}}
271271
$ echo $?
272272
105
@@ -281,21 +281,21 @@ $ echo $?
281281
### Do One Thing Well
282282

283283
**Each command has a specific, well-defined purpose:**
284-
- `bdg network requests` → List network requests
285-
- `bdg network failed` → List failed requests only
286-
- `bdg console errors` → List console errors
284+
- `sc network requests` → List network requests
285+
- `sc network failed` → List failed requests only
286+
- `sc console errors` → List console errors
287287

288288
**Not:**
289-
- `bdg diagnose-everything` → Analyzes network, console, performance in one command
289+
- `sc diagnose-everything` → Analyzes network, console, performance in one command
290290

291291
### Composability Through Pipes
292292

293293
**Design for composition:**
294294
```bash
295295
# Find slow requests, get details, extract URLs
296-
bdg network slow --threshold 1000ms --json | \
296+
sc network slow --threshold 1000ms --json | \
297297
jq -r '.[] | .id' | \
298-
xargs -I {} bdg network timing {} --json | \
298+
xargs -I {} sc network timing {} --json | \
299299
jq -r '.url'
300300
```
301301

@@ -325,7 +325,7 @@ Agents don't read documentation - they query capabilities.
325325

326326
**Help as Data:**
327327
```bash
328-
$ bdg --help-json
328+
$ sc --help-json
329329
{
330330
"version": "1.2.0",
331331
"commands": {
@@ -352,7 +352,7 @@ $ bdg --help-json
352352

353353
For complex tools, provide JSON schemas:
354354
```bash
355-
$ bdg network requests --schema
355+
$ sc network requests --schema
356356
{
357357
"$schema": "http://json-schema.org/draft-07/schema#",
358358
"type": "object",
@@ -427,16 +427,16 @@ req_042 | PUT /update | 503 | 2341ms
427427
### CLI Advantages (Observed in Practice)
428428

429429
**Context Efficiency:**
430-
- **CLI**: Command structure is the schema (`bdg network requests --failed`)
430+
- **CLI**: Command structure is the schema (`sc network requests --failed`)
431431
- **MCP**: Protocol overhead + server definitions + request/response wrapping
432432
- **Observation**: Simpler commands can be more token-efficient in practice
433433

434434
**Debuggability:**
435-
- **CLI**: `$ bdg network requests` fails → see exact error message
435+
- **CLI**: `$ sc network requests` fails → see exact error message
436436
- **MCP**: Errors wrap in protocol layers, may require additional debugging steps
437437

438438
**Composability:**
439-
- **CLI**: `bdg network requests | jq | grep | sort`
439+
- **CLI**: `sc network requests | jq | grep | sort`
440440
- **MCP**: Responses don't naturally compose with Unix tools
441441
- **Strength**: Unix pipeline patterns for filtering and transformation
442442

@@ -461,11 +461,11 @@ req_042 | PUT /update | 503 | 2341ms
461461
- Complex authentication flows
462462
- Real-time bidirectional communication
463463

464-
### Design Decision for bdg
464+
### Design Decision for supercli
465465

466-
**For this project (Chrome DevTools telemetry):** CLI is the chosen approach because:
467-
- DevTools operations are atomic queries (list requests, get console logs)
468-
- No stateful multi-turn workflows needed
466+
**For supercli:** CLI is the chosen approach because:
467+
- Tool operations are atomic queries (list resources, get details)
468+
- No stateful multi-turn workflows needed for most use cases
469469
- Target users already work in terminal environments
470470
- Unix composability is a natural fit for data filtering/analysis
471471

@@ -550,4 +550,4 @@ Agent-friendly tools are not a separate category from good CLI tools - they are
550550

551551
**The Core Insight:** Design for deterministic, composable operations with structured output. This serves both agents (who need parseable data) and humans (who benefit from predictability).
552552

553-
**For bdg:** Every design decision should ask: "Does this help an agent make decisions?" If yes, implement it. If no, remove it.
553+
**For supercli:** Every design decision should ask: "Does this help an agent make decisions?" If yes, implement it. If no, remove it.

0 commit comments

Comments
 (0)