simplify diagnostics instructions
Show example commands with placeholder values. Claude fills in the actual values from the session in one shot — no multi-step build process. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,38 +1,26 @@
|
||||
# Diagnostics (end-of-update instructions)
|
||||
# Diagnostics (Optional)
|
||||
|
||||
Follow these steps **after all other update steps are complete**.
|
||||
After the update is complete, offer to send anonymous diagnostics.
|
||||
|
||||
## 1. Build event data
|
||||
|
||||
Estimate `error_count` from the conversation (how many errors/retries occurred).
|
||||
|
||||
```json
|
||||
{
|
||||
"version_age_days": 45,
|
||||
"update_method": "merge",
|
||||
"conflict_files": ["package.json"],
|
||||
"breaking_changes_found": false,
|
||||
"breaking_changes_skills_run": [],
|
||||
"error_count": 0
|
||||
}
|
||||
```
|
||||
- `version_age_days`: estimate from the backup tag or commit date how many days old the previous version was
|
||||
- `update_method`: "merge" or "rebase"
|
||||
- `conflict_files`: filenames with merge conflicts (the script gates these against upstream)
|
||||
- `breaking_changes_found`: whether breaking changes were detected
|
||||
- `breaking_changes_skills_run`: which skills had to be re-run to fix breaking changes
|
||||
|
||||
## 2. Dry run
|
||||
## 1. Check opt-out
|
||||
|
||||
```bash
|
||||
npx tsx scripts/send-diagnostics.ts --event update_complete --success --data '<json>' --dry-run
|
||||
npx tsx scripts/send-diagnostics.ts --event update_complete --success --data '{}' --dry-run
|
||||
```
|
||||
|
||||
Use `--failure` instead of `--success` if the update failed.
|
||||
If no output, the user opted out permanently — stop here.
|
||||
|
||||
If the dry-run produces no output, the user has opted out permanently — skip the rest.
|
||||
## 2. Prepare event
|
||||
|
||||
## 3. Show the user and ask
|
||||
Run `--dry-run` to get the final payload:
|
||||
|
||||
```bash
|
||||
npx tsx scripts/send-diagnostics.ts --event update_complete --success --data '{"version_age_days":45,"update_method":"merge","conflict_files":[],"breaking_changes_found":false,"breaking_changes_skills_run":[],"error_count":0}' --dry-run
|
||||
```
|
||||
|
||||
Use `--failure` instead of `--success` if the update failed. Fill in the values based on what actually happened during the session.
|
||||
|
||||
## 3. Ask the user
|
||||
|
||||
> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:"
|
||||
>
|
||||
@@ -44,16 +32,6 @@ Use AskUserQuestion.
|
||||
|
||||
## 4. Handle response
|
||||
|
||||
- **Yes**: Run without `--dry-run`:
|
||||
```bash
|
||||
npx tsx scripts/send-diagnostics.ts --event update_complete --success --data '<json>'
|
||||
```
|
||||
Confirm: "Diagnostics sent."
|
||||
|
||||
- **No**: Do nothing. User will be asked again next time.
|
||||
|
||||
- **Never ask again**: Run:
|
||||
```bash
|
||||
npx tsx -e "import { setNeverAsk } from './scripts/send-diagnostics.ts'; setNeverAsk();"
|
||||
```
|
||||
Confirm: "Got it — you won't be asked again."
|
||||
- **Yes**: Run the command again without `--dry-run`. Confirm: "Diagnostics sent."
|
||||
- **No**: Do nothing.
|
||||
- **Never ask again**: Run `npx tsx -e "import { setNeverAsk } from './scripts/send-diagnostics.ts'; setNeverAsk();"` — confirm: "Got it — you won't be asked again."
|
||||
|
||||
Reference in New Issue
Block a user