Skip to content

Commit 49eefd1

Browse files
authored
docs: describe the current agent contract and trim repeated guidance (#88)
* docs: describe the current agent contract and trim repeated guidance * docs: scope the structured-output claim to leaf commands
1 parent 3edf63f commit 49eefd1

3 files changed

Lines changed: 26 additions & 54 deletions

File tree

‎AGENTS.md‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,10 @@
1010

1111
## Commands
1212

13-
Primary:
14-
15-
- `pnpm exec vp run verify`
16-
17-
Focused:
18-
19-
- `pnpm exec vp run check`
20-
- `pnpm exec vp run build`
21-
- `pnpm exec vp run test`
22-
- `pnpm exec vp run coverage`
23-
- `pnpm exec vp run check:dead-code`
24-
- `pnpm exec vp run skills:lint`
25-
- `pnpm exec vp run smoke:pack`: writes the report to `.artifacts/smoke-packed-install.json`
26-
- `pnpm exec vp run build:sea` then `pnpm exec vp run verify:sea`
13+
- `pnpm exec vp run verify`: the gate; pre-push and CI run it
14+
- Focused checks are the `scripts` in [package.json](package.json); run them as `pnpm exec vp run <script>`
15+
- `smoke:pack` writes its report to `.artifacts/smoke-packed-install.json`
16+
- `verify:sea` needs `build:sea` first
2717

2818
Runtime proofs:
2919

@@ -54,7 +44,7 @@ touches, and search `node_modules/effect/src` for anything it does not cover.
5444
## Testing
5545

5646
- Prefer in-process tests unless the process boundary is the behavior under test.
57-
- Add command-path coverage when the `@effect/cli` boundary changes.
47+
- Add command-path coverage when the `effect/unstable/cli` command boundary changes.
5848
- Prove command-surface changes with the built binary.
5949
- Finish in-scope edits, guardrails, and fixes without pausing; ask before publishing, credential-bearing release or SEA builds, and live writes against shared accounts.
6050

‎README.md‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,29 +212,25 @@ for status interpretation and missing-file checks.
212212

213213
## Crash Reporting and Diagnostics
214214

215-
Official releases enable privacy-safe crash reporting by default for unexpected CLI failures. It
216-
does not collect usage analytics, command results, or original error data. Manage the persisted
217-
preference with:
215+
Official releases send privacy-safe crash reports for unexpected CLI failures by default. There is
216+
no usage analytics. Manage the persisted preference with:
218217

219218
```bash
220219
putio telemetry disable
221220
putio telemetry status
222221
putio telemetry enable
223222
```
224223

225-
The preference lives in the normal private CLI config and applies to interactive, CI, agent, and
226-
other non-interactive runs. `DO_NOT_TRACK` does not override it. Missing config keeps reporting
227-
enabled; unreadable or invalid config fails closed for that process.
224+
The preference lives in the private CLI config and applies to interactive, CI, and agent runs alike;
225+
`DO_NOT_TRACK` does not override it. Missing config keeps reporting enabled; unreadable or invalid
226+
config disables it for that process. The `crashReporting` object in `describe` shows the effective
227+
state, flush deadline, and captured-field allowlist.
228228

229-
The `crashReporting` object in `describe` shows the effective enabled state or disabled reason,
230-
flush deadline, preference commands, and captured-field allowlist.
231-
232-
At most one synthetic event is sent per process: a random event ID and timestamp, one of three
233-
fixed failure categories, fixed runtime labels, and the package release. It never contains the
234-
original error, credentials, config, command arguments, request data, paths, or identifiers.
235-
[Architecture](./docs/ARCHITECTURE.md#crash-reporting-policy) lists the exact payload, process
236-
boundary, provider ownership, retention, and removal policy. Use the private contact in
237-
[Security](./SECURITY.md) for sensitive reports or deletion requests.
229+
A process sends at most one synthetic event: a random ID, timestamp, one of three fixed failure
230+
categories, fixed runtime labels, and the package release. It never contains the original error,
231+
credentials, config, command arguments, request data, paths, or identifiers.
232+
[Architecture](./docs/ARCHITECTURE.md#crash-reporting-policy) has the full policy. Use the private
233+
contact in [Security](./SECURITY.md) for sensitive reports or deletion requests.
238234

239235
## Docs
240236

‎docs/ARCHITECTURE.md‎

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# CLI Architecture
22

3-
This repository is being refactored toward an agent-first, deeply Effect-native CLI.
3+
The CLI is agent-first and Effect-native.
44

5-
## North Star
5+
## Principles
66

77
- Thin Effect CLI command adapters from `effect/unstable/cli`
88
- Explicit services and layers for runtime, output, config, state, SDK access, and workflows
@@ -119,25 +119,11 @@ Sensitive reports and deletion requests go to the private security contact.
119119

120120
## Agent-First Contract
121121

122-
- Every command should have structured output.
123-
- Mutating commands should grow raw JSON payload input and dry-run support.
124-
- Read commands should grow field-selection and pagination controls.
125-
- Machine-readable introspection should describe command purpose and capabilities without relying on prose docs.
126-
- Structured renderers should redact sensitive values and mark prompt-injection-like API text as untrusted data.
127-
- Repo docs should explain the architecture and guardrails in formats agents can consume quickly.
128-
129-
## Current Phase
130-
131-
The current CLI contract already includes:
132-
133-
- schema-backed `describe` metadata for command purpose, capabilities, flags, and raw JSON payload shapes
134-
- neutral automation metadata in `describe` for supported output, dry-run, raw JSON input, field-selection, streaming, and safety features
135-
- raw `--json` input and `--dry-run` on mutating commands
136-
- named auth profiles with env/default-profile selection and legacy single-token fallback
137-
- `--fields` on agent-relevant read commands
138-
- cursor-backed `--page-all` on `files list`, `files search`, `search`, and `transfers list`
139-
- shared hardening for field selectors and identifier-like inputs before API calls
140-
- structured output redaction plus `_meta.agentSafety.untrustedTextPaths` annotations for prompt-injection-like API text
141-
- a versioned consumer skill library in `skills/putio-cli` with surface guides for discovery, auth/device approval, reads, writes, guardrails, and OpenAI/Codex picker metadata
142-
143-
Next architectural work can keep extracting deeper services and workflows without losing the agent-first CLI surface.
122+
- Schema-backed `describe` metadata covers command purpose, capabilities, flags, raw JSON payload shapes, and neutral `automation` metadata for output, dry-run, raw JSON input, field selection, streaming, and safety features, so agents do not depend on prose docs.
123+
- Every leaf command catalogued by `describe` has structured output; the root and group commands such as `putio auth` print plain help text.
124+
- Mutating commands accept raw `--json` input and `--dry-run`.
125+
- Agent-relevant read commands accept `--fields`; `files list`, `files search`, `search`, and `transfers list` also accept cursor-backed `--page-all`.
126+
- Field selectors and identifier-like inputs are hardened before API calls.
127+
- Named auth profiles support env and default-profile selection, with the legacy single-token config as fallback.
128+
- Structured renderers redact sensitive values and mark prompt-injection-like API text in `_meta.agentSafety.untrustedTextPaths`.
129+
- [`skills/putio-cli`](../skills/putio-cli/SKILL.md) is the versioned consumer skill, with references for discovery, auth and device approval, reads, writes, and guardrails, plus OpenAI/Codex picker metadata.

0 commit comments

Comments
 (0)