01Run it
Replace the <placeholders> with your own values, or use the builder below.
p202 goal reevaluate <id>02What you get
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 goal reevaluateSet flags below; the command updates as you type.
04Flags
5 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --afterstring | Continue after this click id (the previous answer's next_after) |
| --applybool | Apply the re-evaluation (without it: preview only) |
| --limitstring | Clicks per call (default 100, at most 1000) |
| --subject-typestring | Subjects to re-evaluate (default: click for a campaign goal, install for a registration or account goal): click, installclickinstall |
| --versionstring | The version to re-evaluate under (default: the current one) |
05How it works
Without --apply, shows per subject (a click, or an Android install with --subject-type install) the outcomes that would be retired and written, and what happens to their conversions (superseded by the new row, or deleted when the version no longer reaches the goal). Goals that wait on this one (their definition's after, directly or through another) are re-decided with it: listed in goals, each row names its goal_id. With --apply, does it, one subject per transaction. At most --limit subjects per call; pass the answer's next_after as --after to continue.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands goal reevaluate --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
- This command writes. Add
--stagedto record it as a proposal a person applies withp202 change apply.
{
"path": "p202 goal reevaluate",
"use": "reevaluate <id>",
"short": "Re-evaluate past clicks or installs under a goal version (preview; --apply to apply)",
"long": "Without --apply, shows per subject (a click, or an Android install with --subject-type\ninstall) the outcomes that would be retired and written, and what happens to their\nconversions (superseded by the new row, or deleted when the version no longer reaches\nthe goal). Goals that wait on this one (their definition's after, directly or through\nanother) are re-decided with it: listed in goals, each row names its goal_id.\nWith --apply, does it, one subject per transaction. At most --limit subjects per call;\npass the answer's next_after as --after to continue.",
"runnable": true,
"flags": [
{
"name": "after",
"type": "string",
"default": "",
"usage": "Continue after this click id (the previous answer's next_after)",
"required": false
},
{
"name": "apply",
"type": "bool",
"default": "false",
"usage": "Apply the re-evaluation (without it: preview only)",
"required": false
},
{
"name": "limit",
"type": "string",
"default": "",
"usage": "Clicks per call (default 100, at most 1000)",
"required": false
},
{
"name": "subject-type",
"type": "string",
"default": "",
"usage": "Subjects to re-evaluate (default: click for a campaign goal, install for a registration or account goal): click, install",
"allowed_values": [
"click",
"install"
],
"required": false
},
{
"name": "version",
"type": "string",
"default": "",
"usage": "The version to re-evaluate under (default: the current one)",
"required": false
}
]
}