npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@closedloop-ai/cli

v0.3.33

Published

ClosedLoop AI on the command line, for people and AI coding agents.

Readme

ClosedLoop AI CLI

closedloop: ClosedLoop AI on the command line, for people and for AI coding agents (Claude Code, Codex, Cursor).

Requires Node.js 22.12 or newer.

npm install -g @closedloop-ai/cli
closedloop login
closedloop --help

The command is closedloop, with cl as a short form. Both use the same minified bundle; the source repository stays private.

npm run build writes the CLI as one minified file, dist/closedloop.js, with its one library (commander) inside; the package installs one program file and its licence notice (dist/THIRD_PARTY_NOTICES.txt).

Updates

  • Every call sends the CLI's version (X-ClosedLoop-CLI-Version), and the API answers with the newest version and the oldest one it still serves (X-ClosedLoop-CLI-Latest, X-ClosedLoop-CLI-Minimum).
  • In a terminal, a newer version prints one line on stderr after the answer, at most once a day per version. It stays quiet for JSON output, in CI, and with NO_UPDATE_NOTIFIER=1 or CLOSEDLOOP_NO_UPDATE_NOTIFIER=1. An agent reads cli from closedloop whoami --json or closedloop status (version, latest_version, update_available); for an agent (JSON), closedloop status also lists the install command as its first next action while a newer version is out; a person at a terminal gets only the notice. closedloop whoami in words shows a CLI: line with the version. Nothing updates itself.
  • A copy older than the minimum is refused with the error upgrade_required, which names the version to update to.

The npm package is @closedloop-ai/cli; users of the earlier cl CLI can update with the same install command.

For AI coding agents

In every new session, run closedloop --help --all first and read all of it into your context: it is about 1,700 words, written to fit, and every later answer uses its words and its order of the work. Never cut it with head, grep, jq or a pager. It prints the help context: what ClosedLoop AI does, the rules for an agent, the words the CLI uses (product structure, product, area, feature, insight, customer, competitor, goal, scope, key result, indicator, target, baseline, period, goal number, goal states, visibility, segment, metric, source, history import, workspace, credits, usage event), the work in order (each step with what it needs first and its command, from the same model of the steps as closedloop status), how a goal is built (write it with its scope, choose the metric that measures it, add the key result with a target, activate it; the scope is not what measures it), how to show an answer (the one layout every command's answer has in a terminal, its marks ✓ ○ ! ↻ ‖ + ? and what each means, and an example; an agent shows results to its user in that layout), then the line "End of the ClosedLoop AI context (6 parts).": without it you read only part. It is built into the CLI, so it works offline and matches the installed version. As JSON it is { summary, about, rules, words: [{term, definition}], work: [{step, title, optional, needs, command}], goal_setup: { steps, notes }, answer_layout: { rules, marks: [{symbol, means}], example }, end, next_actions }. -h --all and either order work; with a command named (logout --all --help), that command's own help is shown. closedloop --help starts with a short version of it, about ten lines ending with that first step; in the JSON help it is the first field, start_here.

The CLI points to the full context at three moments: the first lines of closedloop --help, the answer after a sign-in (its last next action), and one notice on the first command on a computer and again after each update of the CLI version (a notices entry, or one line on stderr in a terminal; none for login, for help and the version, or when the CI variable is set). The computer remembers the version it was shown for in context-notice.json in the config folder. When the CLI cannot read or save that file, the command still answers, and a notice says so.

Each command's own help also says where it belongs in the work. In a terminal, closedloop <command> --help ends with Needs first: (the steps to do first, or "nothing"), After this: (the commands that usually come next) and Examples:. Its JSON help has the same as needs ([{step, title}], the step ids of closedloop status), after and examples. The needs come from the same model of the steps, and every command named there is one this CLI version has. Where the API already knows what holds the work back (records sent with closedloop ingest that wait, a segment or metric preview in a workspace with no source yet), the answer's next_actions start with the API's; an older API sends none, and the answer keeps only the CLI's own.

Then run closedloop status --if-due, and closedloop next for what to do now. When no status ran in the last 4 hours for the signed-in account and the workspace open in the app, it prints the status (what is running, each step's state, the next actions with problems first, due: true); otherwise it answers {"due": false, ...}, having read only which workspace is open. Show your user any problem or open step and ask them before running a command that changes their workspace. closedloop next gives only what to do now. Between sessions, the first command more than 4 hours after the last status (or the sign-in; for a sign-in saved by an older CLI without its time, the first command) carries one notices entry (in a terminal, one line on stderr) saying to run closedloop status; none when the CI variable is set. When the CLI cannot read or save that reminder, the command still answers, and a notice says so.

Commands

  • closedloop login [email] (also closedloop signup): sign in, or create an account on the Free plan, in one command.
    • Give your email once: closedloop login [email protected] (--email [email protected] works too). As soon as the CLI finds your account, it saves the email and the account's region, so the next closedloop login needs no email. An email with no account (a typo) is never saved. Without an email and with none saved, a person at a terminal is asked for it, and an agent is refused with missing_email and the command to run.
    • The CLI looks the email up in both regions (US and EU), says Signing in as <email> (<region>), and picks the sign-in for you. An account with a password, or whose workspace signs in with SSO, signs in through the browser in its home region. An account with neither (such as one made with closedloop signup) gets a code by email. An email with no account signs up with an emailed code. As JSON, each answer carries the email and region.
    • If an emailed code is refused because the account signs in with SSO (sso_required) or a password (password_sign_in), a person goes on to the browser sign-in in the same run, and an agent is told to run closedloop login <email> --browser.
    • In a terminal, closedloop login asks for the code. Before creating a new account it asks for the data region: United States (US, the default) or European Union (EU). Existing accounts keep their region and are not asked to choose another one.
    • --region us|eu explicitly selects where a new account's data should live. With --region, or with CLOSEDLOOP_API_URL set, the CLI skips the lookup and uses that API (--browser still signs in through the browser). For an agent creating an account, two runs: closedloop signup --email [email protected] --region eu sends the code; closedloop login --email [email protected] --region eu --code BCDFG-HJKLM finishes. Use us for the United States. Without a region, an agent creating a new account is refused with region_required before an email code is requested; existing accounts can still sign in without the flag. Add --totp <code> (or --backup-code <code>) when the account uses two-factor authentication.
    • closedloop login <email> --browser (--sso still works): sign in through your browser, whatever sign-in the account uses. It prints a link and a short code; open the link, sign in to the app, type the code and approve. The link names your email, so the app goes straight to your sign-in. Add --region eu or --region us to choose the initial sign-in region. An existing account automatically completes sign-in in its home region, even when the command started elsewhere, and the saved region follows it. In a terminal it also copies the code to your clipboard and opens the link when you press Enter, then waits; an agent runs the printed command again after you approve (it names the email and any --region, which is how the second run finds the saved request).
    • Whoever approves in the browser is who signs in. If the browser is signed in as another account than the email you gave, the CLI signs in as the account that approved, files the session under that account, and says so (as JSON: different_account: true and the requested_email).
    • An email whose account is in the other region (US or EU) signs in there, and the session stays with that region.
    • --region never moves an existing account. A saved sign-in and closedloop whoami show the account's actual region. If a connection fails after browser approval in another region, repeat the same printed command: the CLI retains that pending sign-in and its original expiry. A rejected or expired request starts again with a fresh link and code.
    • A new account gets its own Free workspace unless the email was invited to one. One network can create three such accounts a day.
    • A new account is asked for its company website right after the code (in a terminal), or takes --website <url> (an agent passes it with --code). ClosedLoop AI researches the company from it before it analyses anything you send in; without it, imports run but nothing becomes insights. A website that cannot be saved does not undo the sign-in: the result names it and says to run closedloop company --website <url>. --website follows the same rule as closedloop company --website: when it changes a website whose products came from the company research, nothing is changed at sign-in, and the result's next actions are the closedloop company --website <url> --products replace|keep --confirmed-by-user commands to ask about first; when it cannot be told whether the change asks that, nothing is changed and the next action says to try again.
    • Then its email domains: the domains of your colleagues' work addresses, which tell ClosedLoop AI who is a colleague and who is a customer. In a terminal it suggests them (from the website and your own address, never a personal one such as gmail.com) and you confirm or correct them, or type none and confirm that your company has none. An agent gets a next action that needs its user: the question to ask (ask) and the command to run with their answer. Nothing in a new workspace is analysed until a person has confirmed them.
    • Every sign-in then asks, once each, what is still open of the workspace name and your role (from the shared steps; nothing when they cannot be read). In a terminal: Workspace name [Jane's Team]: , where Enter keeps the name (a name another workspace has is asked again), but only of someone who may change the workspace's settings (an owner or admin) and only while the name is not confirmed; and which teams you work in, where Enter skips the question and records that it was asked, as the app does. Neither is asked when it was already answered, in the app or here. Closing a prompt (Ctrl-C, or the end of the input) leaves that step unanswered and asks nothing more: the sign-in still answers, with the step as a next action. An agent gets each as a next action that needs its user: closedloop workspace --name <name> --confirmed-by-user and closedloop role <role,...> --confirmed-by-user, each with its question.
    • Last, a sign-in asks once whether your AI agents may report ClosedLoop AI problems to the ClosedLoop AI team on their own: Let your AI agents report ClosedLoop AI problems to the ClosedLoop AI team on their own? It adds one line to ~/.claude/CLAUDE.md. [Y/n] . Agents act only on their user's own instructions, so a yes adds one line, in your words, to the instructions every project shares of each AI agent set up on this computer: ~/.claude/CLAUDE.md for Claude Code ($CLAUDE_CONFIG_DIR/CLAUDE.md when set) and ~/.codex/AGENTS.md for Codex ($CODEX_HOME/AGENTS.md when set; AGENTS.override.md when there is one). Yes is the default: Enter, y or yes adds the line; n or no adds nothing; anything else is asked again, three times at most, and then left for next time. A file that cannot be written is named, with the line to add by hand, and the yes is still kept. Either answer is kept in general.json, so it is asked once; it is not asked when neither agent is set up here or the line is already there. An agent signing in gets it as an optional next action that needs its user: closedloop agent-reports on --confirmed-by-user, with the question and, for a no, closedloop agent-reports off --confirmed-by-user, which keeps that answer. Someone signed in before this question is asked it by closedloop status, the same way.
    • Signing in makes the account the active one (see Accounts). The config folder holds general.json (the active account, and the email and region last signed in with) and one file per account in accounts/ (its session, its sign-in in progress, its working goal), each named by a hash of the email with the email inside. Tokens are stored as local JSON, not in an OS keychain; passwords are not saved. Unix directories use mode 0700 and files 0600; Windows uses the account's local application-data folder and its inherited access permissions.
    • The API checks the session on every call. The CLI renews it once it is past half its life (30 days unless the API sets another), so it stays signed in while you use it. If the API refuses it, the CLI renews it and tries again, but only when it has not tried to renew in that call yet; otherwise it asks you to sign in again.
  • closedloop whoami: who you are signed in as, your workspace (role and plan), the other workspaces you belong to, the region, when and how this computer signed in (an email code, or Google, Microsoft, Okta or SAML SSO, or a password, in the browser), and when the sign-in ends if the CLI is not used.
  • closedloop status: what runs in the background (the company research, each history import, and the analysis of each source's records, the records you sent included) and the steps, as ClosedLoop AI has them for your workspace (one request). Each process is listed under "In the background", one line each in ClosedLoop AI's own words, the same as the app's ("Researching acme.example since 14:02. It usually takes a few minutes.", "Importing Gong history: day 12 of 90, about 20 min left."), with clock times in your computer's time zone, Details: with the command that shows more, and In the app: with a link to it in the app where the terminal cannot show it (a failed import is started again from the app); --watch keeps checking while one waits, runs or tries again, not while one is stalled or waits on a person. "Nothing" means nothing runs; when ClosedLoop AI could not read what runs in the background, "What is running could not be read right now" stands in its place and --watch stops; when it could read them but not what is being analysed, "What is being analysed could not be read right now" follows them and --watch keeps checking. The CLI reads the steps the app shares (GET /api/cli/steps?model=2), so a step done in either place is done in both; a step ClosedLoop AI keeps to the app is left out. Onboarding: workspace name, company website, company research, email domains, product structure, a source of customer conversations, history import, the optional CRM and roadmap tool (each connected, or with its reminders stopped for the workspace), usage events (only when your product analytics tools send them) and team, your role, and an AI tool (done: you are signed in with the CLI); then your own goal, which the CLI requires of each person: a goal, its key result and its activation. A goal a teammate shared with the team counts ("using Jane's shared goal"; while it is open, "waiting for Jane to activate it", with no command); the goal you work on (goals use) does not. Each step is done (✓), open (○; dim for an optional onboarding step, orange otherwise), a problem (!, red, with what is wrong under it, such as a connection that stopped syncing or a history import that failed) or unknown (?, when its part could not be read, or a required step is missing from the answer; never counted as done). A step whose reminders are stopped reads as in the app, "Reminders off — Jane Doe, 21 Nov" (for the whole workspace: who stopped them and when) or "Reminders off for you", and gives no next action; a step you cannot act on reads "waiting for an owner or admin" and gives no command. The summary names the problems first ("1 problem and 3 steps left before your data is fully analysed."); once the workspace's steps are done but yours are not, it says so ("Your workspace is set up; your goal is next."), and only with everything done "Onboarding is complete.". The summary ends with the analysis line in ClosedLoop AI's words, the same as the app's ("Ready for analysis.", "Not ready for analysis: waiting for confirmed email domains and the company research."); from an API without that line it says only, while your data is not analysed, what it waits for (confirmed email domains, the company research, a confirmed product structure). At the top of the onboarding steps, a line says they work best in the listed order, though any of them can be done at any time; and the products your company research suggested that nobody confirmed are listed by name under "Products waiting for confirmation", for everyone, with how to confirm them (closedloop products confirm) or reject one (closedloop products reject <name>) for an owner or admin. While a replace answer to a website change waits for the research of the new website, "Products from your company research" says, in ClosedLoop AI's words, that they are retired once it finds products, whether or not any wait for confirmation. A step whose reminders are off has the paused mark (‖), whether ClosedLoop AI reads it open or done. The next actions are those of every open step and every problem, in the order closedloop next gives them: problems first, then required, recommended and optional actions, each in step order; an open step whose reminders you can stop adds its closedloop remind <step> --off --confirmed-by-user action, which needs its user, with the question to ask; for someone who may do the product step, products waiting add closedloop products reject <name> (and closedloop products confirm when no step asks for it already). As JSON: steps (step, part, title, optional, state: done, open, problem or unknown, detail (for a step whose reminders are off, the "Reminders off" line), scope: workspace or person, can_act, done_by: doing or decision for a done step (done by doing it, or by a decision: not used, or reminders off for you), null otherwise, blocks_analysis: whether the analysis waits for the step, reminders: {off, scope, decided_by_name, decided_at} or null for a step whose reminders cannot be stopped, can_stop_reminders, about: what the step is, why it matters and where its result shows, in ClosedLoop AI's words, {what, why, where, link} with link {label, app_path, app_url, command} or null, as the API sends it (null for a step the app does not show, absent from an older API; only in JSON, the terminal does not print it)), analysis ({ready, missing, message}, message absent from an older API, or null when the API does not say), product_drafts ([{id, name, description}], or null), processes (each {kind, id, subject, state, reason, progress, started_at, updated_at, finished_at, next_try_at, estimate, details, message} exactly as the API sends it, or null when ClosedLoop AI could not read them), unread (the parts of the processes ClosedLoop AI could not read, such as ["analysis"] for what is being analysed, as the API names them; absent from an older API), website_change ({asks_products, replaces_products, replaces_note} as the API sends it, the last two absent from an older API; null when the API sent null or no such field), cli (version, latest_version, update_available), summary and next_actions. Against an API from before the shared steps, the CLI shows the steps it gives. An action whose command, subcommand or option this CLI version does not have is left out: update the CLI to see it. When the steps cannot be read the status fails (status_unavailable), and against an API too old to give them it says so (status_unsupported). While no answer is saved to whether your AI agents may report ClosedLoop AI problems on their own (the sign-in question, see closedloop login), the status asks it once: in a terminal after the status (Enter or yes adds the line), and for an agent as an optional next action that needs its user (with --if-due too). No insights here: see closedloop insights.
    • --if-due runs it only when no status ran in the last 4 hours for this account and the workspace open in the app; otherwise it prints nothing (as JSON: due, last_checked_at, next_due_at). Each status is remembered beside the saved sign-in, per account and workspace; a saved time later than now counts as none.
    • --watch checks every 30 seconds while a process in the background waits to start, runs or tries again, or while what is being analysed could not be read, for up to 2 hours; it stops at once when what runs could not be read.
  • closedloop next: only what to do now, from the same steps in one request: the next actions of the steps that are a problem or open and whose earlier steps are done (the history waits for a source, a key result for its goal, and activating a draft until each of your goals has a key result), problems first, then required, recommended and optional actions. Its summary says how many (3 things to do now.; stopping a step's reminders, offered beside its own action, is another way to finish that step, not one more thing to do), or Nothing to do now: onboarding is complete., or, when every step left waits for someone else, Nothing for you to do now: 1 step left waits for someone else.; when a step could not be checked it says so instead of calling anything complete. It takes no options.
  • closedloop remind <step> --off: stops a step's reminders, as "Stop reminders" in the app; closedloop remind <step> --on turns them on again ("Remind again"). The scope follows the step and the answer says it: crm, roadmap, usage_events and team are for the whole workspace, and only someone who may do the step can change them (anyone else gets may_not_stop_reminders); ai_tool is only for you. Everyone then sees who stopped them and when ("Reminders off — Jane Doe, 21 Nov"). A required step's reminders cannot be stopped (not_a_reminder, in the API's words). It is always the user's decision: in a terminal the CLI asks the question and saves only when you type yes; anyone else adds --confirmed-by-user, which an agent does only after its user agreed. Without it nothing is saved and the answer carries a next action that needs its user, with the question. A step your workspace does not have (such as usage_events with no usage source) is refused (unknown_step) before anything is asked. When the change may have been saved but the steps could not be read after it, it says so (setup_unavailable); running it again is harmless, and its next action needs the user again. Against an API from before the reminders it says so (remind_unsupported). The step is always read first, with --confirmed-by-user too, so a step your workspace does not have never reaches the API. As in the app, --off is only for a step still to do: a done step is refused (step_done), and so is one whose reminders are already off (reminders_already_off, with --on as the next action). As JSON: status (reminders_off, reminders_on or not_saved), change (off or on), step, title, state, detail, scope, reminders, reminders_line and next_actions.
  • closedloop feedback "<what happened>": tells the ClosedLoop AI team that something is missing, broken or confusing in ClosedLoop AI, one problem per report (a report naming several is split into one insight per problem), also when you found a way around it. --trying says what you, or your user, were trying to do, --sent what you sent (in words, not the data), --expected what you expected, --workaround how you got around it (it becomes the insight's workaround, word for word), --kind one of missing, broken, confusing or other (left out: broken with --error, other without), --command and --error the command and error code it is about, and --agent the AI agent sending it. The report reaches only the ClosedLoop AI team, with your name and workspace from your sign-in (which it already holds), so an agent sends it without asking first; write what you did and saw, never customer names, emails or quotes. An agent is asked, in the short help and the rules, to report before it answers its user when ClosedLoop AI cannot do what its user asked or it could do it only by working around ClosedLoop AI (often quietly: counting, grouping or comparing results by hand because no command does it, or using a broader rule or search because none selects exactly what it needed), and for an agent (not a person at a terminal) an error that says ClosedLoop AI itself failed (internal_error, unknown_command, a *_unsupported code) carries an optional next action with this command, the command name and error code filled in; the agent then tells its user in one line. When the report cannot be sent the command says so (feedback_not_sent) and nothing is kept. As JSON: status (sent), report_id and next_actions.
  • closedloop agent-reports: whether your AI agents report ClosedLoop AI problems to the ClosedLoop AI team on their own, which is this one line in their own instructions on this computer: When ClosedLoop AI gets in your way or you have to work around it, report it to the ClosedLoop AI team with `closedloop feedback` (or the MCP tool `send_closedloop_feedback`) yourself; you don't need to ask me first. Alone it shows, for Claude Code and Codex, the file and whether it has the line. on adds it to each one set up here that lacks it (after a blank line, in the file's own line ends, creating the file in the agent's folder when there is none); off removes every copy of it (and the blank line on put before it, when only blank lines follow) and leaves the rest of the file as it was, each line with its own line end. Codex reads AGENTS.override.md in place of AGENTS.md when there is one, so the line goes there. A symlinked file stays a symlink: its target changes. Files are changed byte for byte, so any single-byte or UTF-8 text comes back unchanged; a UTF-16 file, or a folder or other special file where the file should be, is left alone and named, with the line to add or remove by hand. It is the user's decision: in a terminal the CLI shows the line and changes it only when you type yes; anyone else adds --confirmed-by-user, which an agent does only after its user said so, and without it nothing changes (not_saved, with the question as a next action). When the files already match (unchanged), the user's answer is still kept, so the question is not asked again; an agent's alone, without --confirmed-by-user, is not. on with neither agent set up here is refused (no_agent_instructions), with the line to add by hand; a file that cannot be written is named with the line to add or remove yourself, and the user's answer is still kept. As JSON: reports (on or off), answer (the saved answer, or null), line, files (agent, path, installed, has_line), after a change status (saved, unchanged or not_saved) and changes, and next_actions.
  • closedloop workspace: the workspace open in the app, its name and your role there. --name <name> renames it through the same writer as the app: only someone who may change the workspace's settings (an owner or admin) can (owner_or_admin_required; someone no longer in the workspace gets not_a_member), a name another workspace has is refused (invalid_name, in the API's words), and giving the current name confirms it, which is what the workspace name step waits for. The name is the user's to choose: in a terminal the CLI asks and saves only when you type yes; anyone else adds --confirmed-by-user, which an agent does only after its user chose the name. Without it nothing is saved (not_saved) and the next action, with the name quoted for the shell, says what to ask.
  • closedloop company: your company website and how far the research of it has got (waiting to start, in progress, trying again, failed, done), and its email domains. From an API that describes the research as a process, its line is ClosedLoop AI's own sentence with its clock time in your computer's time zone (a new website being researched reads as running, though the research step stays done), and the summary, what it means for your data and the next actions follow it: --watch while it waits, runs or tries again, setting the website when it waits on something only you can change or failed for good; as JSON it is research.process, exactly as the API sends it. Once the research is done, the analysis line follows it in ClosedLoop AI's words, the same as closedloop status ("Ready for analysis.", "Not ready for analysis: waiting for confirmed email domains."; from an older API "Ready for analysis." or "Not ready for analysis yet."). As JSON, analysis ({ready, missing, message}) and website_change ({asks_products, replaces_products, replaces_note}) are the API's, as it sends them (null when it could not read them, absent from an older API). Every source still imports first, but nothing from any source, the feedback portal included, is analysed into insights until all three are done: confirmed email domains, the company research and a confirmed product structure.
    • --website <url> sets it, with the same checks as the app (the site must be readable), then reads the company again, so the research shows as it now stands (the saved answer when that read fails). Setting it needs the right to change the workspace's settings (an owner or admin).
    • Changing the website researches the new one. When your products came from the company research (and nobody in your workspace made one), the CLI asks what happens to them, as the app does: replace (the products the research made are retired only once the research of the new website finds products, which come as suggestions to confirm) or keep (no product is added or removed). Before asking, it says what replacing retires, in ClosedLoop AI's words: how many products, and how many insights and needs are filed under them, in the question and in the reason of both answers an agent is given, and before the yes of --products replace in a terminal (it is not read with --confirmed-by-user, nor for --products keep confirmed in a terminal; when it cannot be read the question is asked as before). As JSON a not_saved answer carries those counts as retires ({confirmed, suggested, insights, needs, message}, or null when they were not read). A website change held back at sign-in (closedloop login --website) says the same in its two answers. While a replace answer waits for the research of the new website, closedloop company says so after the research line. In a terminal you type the answer; anyone else adds --products replace|keep --confirmed-by-user, which an agent does only after its user chose. Without them nothing is saved and the answer (status: not_saved) carries both commands, each needing its user, with the question. The same site written another way (www., a trailing slash) is no change and asks nothing. While the research of the current website is still running, the API refuses the change (research_running, in its words); wait for it with closedloop company --watch. As JSON, the answer carries products_answer (replace, keep, or null when nobody was asked). Someone who may not change the workspace settings is refused before being asked anything (team_settings_manager_required). When ClosedLoop AI cannot say whether the change asks about the products (the steps could not be read, or the API sent no answer), nothing is saved (website_change_unavailable) and the next action is to try again; an API from before the question saves the website as it did.
    • --domains acme.example,acme.example.org confirms your colleagues' email domains and --no-domains confirms your company has none (every colleague then counts as a customer, so results are wrong). Only a person confirms them: in a terminal the CLI asks you to type yes; anyone else adds --confirmed-by-user, which an agent does only after its user said yes. Without it nothing is saved and the result's next action says what to ask (ask). A personal email domain (gmail.com and the like) is refused. Needs the right to change the workspace's settings.
    • As JSON, a workspace whose domains still wait carries a next action that needs its user, with the question to ask (ask).
    • --watch checks every 30 seconds until the research is done or fails, for up to an hour.
    • The research reads your website to learn your company, its products and its market; it is the basis for the suggested product structure and for analysing your insights, and usually takes a few minutes. Once it is done, closedloop company says what it learned (its description of your company and the other parts it covers: products and features, use cases, target persona, integrations, pricing) and, while products it suggested wait to be confirmed, how many and how to confirm them. As JSON the summary is research.summary and the count products_suggested (null when it could not be read).
    • --research shows everything the research found, the whole research text (as JSON, the profile with research.text).
  • closedloop products: your product structure, the products, areas (parts of a product) and features (parts of the product that exist, never planned work) your insights are filed against, with insight counts and each one's id, then the products your company research suggested and has not had confirmed, each with its id. As JSON it is the API's answer, whose structure can be edited and saved. With no product confirmed or suggested, adding your own comes first (recommended: your data is analysed once at least one product is confirmed), then closedloop company for the products the company research suggests when it is done.
    • products confirm [id...] adds the suggested products to the structure: all of them, or the ones whose ids you give. products save --file <structure.json> (or --file - for standard input) saves a structure of your own, either the whole closedloop products --json answer or only its structure. Keep each id from that answer: it says which product, area or feature an entry is (two can share a name), and a new one has none. Products, areas and features left out are archived, never deleted. --check only checks.
    • Both check the structure first and list every change. In a terminal the CLI asks you to type yes; anyone else adds --confirmed-by-user to confirm (--yes works too) and --yes to save, which an agent does only after its user agreed. Without it nothing is saved and the result's next action says what to ask (ask). Saving needs an owner or admin; the next nightly recalculation then re-places the insights, charged in credits.
    • products reject <name> rejects one suggested product your company does not make: it is retired, and the research never suggests that name again. Give its name (in quotes when it has spaces; case does not matter) or its id. A name no suggestion has is refused (unknown_product), and so is one two suggestions share (ambiguous_product, with their ids: reject one by its id). It is the user's decision: in a terminal you type yes; anyone else adds --confirmed-by-user, which an agent does only after its user agreed, and without it nothing is saved and the answer's next action carries the question. Rejecting needs an owner or admin (owner_or_admin_required). Against an API from before rejecting it says so (reject_unsupported). As JSON: status (rejected, not_saved or nothing_suggested), rejected ({id, name}) and next_actions.
  • closedloop behavior: your product usage events, the events your product analytics tools send, and where each sits in your product structure; usage counts for each product, area and feature follow these places. Lists each tool with its events, how many are not placed, and its id. As JSON it is the API's sources.
    • behavior events [--unplaced] [--source <id>] [--search <text>] [--page <n>]: each event with its labels, its places as paths (product → area → feature) and who put each there (the tool's own grouping, your team, or ClosedLoop AI), the places your team set aside with when, and the event's id; 50 to a page. Two events on a page with the same name show every raw label and their tool, so they can be told apart. As JSON each event carries its id and each place its paths.
    • behavior events place <id> <product, area or feature id> moves the event there: it is counted there only, its places from the tool are set aside and its other places end. behavior events place <id> --unplaced marks it not placed. behavior events place <id> --automatic gives it back to automatic placement, which takes either change back: your team's places for it end at once, the places from its tool your team set aside are taken back, and the tool's grouping and ClosedLoop AI place it again at their next run (until then it counts only where it is still placed). The event's id is its id line in the list (id in JSON, never one of its labels' event_id); the place's id comes from closedloop products; a name never picks either. A change made here is your team's and needs the right to manage team settings; the CLI is the one place to make it. In a terminal the CLI shows the change and asks you to type yes; anyone else adds --yes, which an agent does only after its user agreed. Without it nothing is saved and the result's next action says what to ask (ask).
  • closedloop competitors: the competitors ClosedLoop AI watches for in your insights, the same list as Settings, Company, Competitors in the app: each with its website, whether it is a direct competitor, how many times customers mentioned it, where it came from (AI research, mentioned by customers, or manual) and its id. Insights that name one count as competitor mentions, shown in the app on features, customer profiles and the weekly brief. As JSON it is the API's competitors and can_change.
    • competitors add <name> [--website <url>] [--description <text>] adds one as a direct competitor (adding one that was removed restores it); competitors edit <id> [--name <name>] [--website <url>] [--description <text>] changes only what you give (an empty value clears the website or description); competitors remove <id> marks it as not a competitor and takes it off the list, keeping the customer mentions behind it. Both take the competitor's id from the list: two competitors can share a name, so a name never picks one.
    • A removal asks you to type yes in a terminal; anyone else adds --yes, which an agent does only after its user agreed. Without it nothing is removed and the result's next action says what to ask (ask). Adding, editing and removing need the right to change the workspace's settings (an owner or admin).
  • closedloop role <role,...>: which teams you work in (product, engineering, leadership, marketing, sales, customer_success, other; separated by commas or spaces), saved through the same writer as the app, so your role step is done in both. Giving it again changes the answer. Another word is refused (invalid_role) before anything is sent. The role is your answer: in a terminal the CLI asks and saves only when you type yes; anyone else adds --confirmed-by-user, which an agent does only after its user answered. Without it nothing is saved (not_saved) and the next action says what to ask. closedloop role alone shows the answer saved, in the app or here.
  • closedloop team: who is in your workspace and who is invited: the members with their role, the pending invitations (when each expires, and whether its email was sent) and the expired ones. Only an owner or admin can see it or invite; removing members and changing roles are done in the app.
    • team invite <email>... [--role member|admin] [--message <text>] invites each address: each gets an email with a link to join that is valid for 7 days, and inviting an address again sends a new link. Making someone an admin needs the right to grant integration access. In a terminal the CLI asks you to type yes; anyone else adds --confirmed-by-user, which an agent does only after its user agreed. Without it nothing is sent and the result's next action says what to ask (ask).
    • team cancel <email> cancels an invitation, pending or expired: its link stops working.
  • closedloop ingest [text]: sends your own data in (feedback, notes, survey answers, transcripts) for the pipeline to turn into insights.
    • One record from the words given, from --stdin, or from a text file; --title, --from, --email (ties the insight to their company when it matches a CRM contact), --customer, --date, --url, --id (a record with an id already sent is skipped) and --tag describe it.
    • Many records from --file with a CSV (a header row; a content column, and any of title, reporter_name, reporter_email, customer, date, url, id, tags with tags separated by ;), a JSON object or list, or JSON Lines. Sent in batches of 100 records or 4 MB.
    • --wait follows up to 100 records until they are processed and says how many insights they made.
    • ingest list shows the latest records, their state (waiting, processing, done with N insights, failed) and their ids; ingest status <id> one record.
    • Records that wait say what for: the company profile, the email domains, or the product structure while no product is confirmed ("They are analysed once at least one product of your product structure is confirmed."); as JSON waiting_for is company_profile, email_domains or product_structure, and when the API sends no next action for it, closedloop products is the next one.
    • The data arrives through the workspace's CLI source, created on the first send; it shows in integrations list, where it can be paused, resumed or disconnected, and insights search --source cli finds what it produced. Sending needs the right to manage integrations.
  • closedloop insights search [words]: searches insights as the Insights page does (every field, or one with --in title|quote|reporter|account), with --source, --category, --severity, --last week|month|3months, --customer <email>, --account <domain>, --sort newest|oldest|severity|relevance, --limit and --page. Each insight shows its id. While you work on a goal (goals use) it reads only that goal's insights; --goal <goal id> reads another goal's once and --all reads every insight.
  • closedloop insights show <id>: one insight in full, by the id the search shows (summary, quote and its source-language original, who, where, feature and product area); --transcript adds the conversation. As JSON the insight's own summary is insight_summary, since summary is the answer's.
  • closedloop insights category <id> <category>: changes an insight's category, ClosedLoop AI's label for it (a workspace owner or admin); the quote, the summary and everything the customer said stay as they are.
  • closedloop goals: your own goals: what you want to achieve, scoped to the insights it is about (all insights, the Billing area, sales calls bearing on new sales) and measured by its key results (a saved metric with a period and a target). The scope changes no metric's value. Each goal also has a goal number (metric in the goals file) that you type in and keep up to date with goals set; ClosedLoop AI does not measure it, and it stands in only until the goal has a key result.
    • goals list shows yours as a tree (each sub-goal under its parent) with their state (draft, active, closed, archived), each led by its first key result (its target and newest value; for a closed goal the one it ended with) or, for a goal without one, the number typed when it was created with its current value and progress, and how many insights each matches, and each goal's id; --team adds the ones teammates share, --archived the ones you deleted, --state draft,active only those states. goals show <goal id> gives one with its parent, its recorded values and, for a draft, what it still needs to be activated. Every goal command takes the goal's id from the list.
    • goals use <goal id> picks the goal you work on (--clear drops it). goals context [goal] shows the deal blockers in its scope when it bears on new sales and the churn risks when it bears on retention, the newest of each and how many there are.
    • goals fields lists what a goal can be scoped by in this workspace (product, area, feature, category, severity, outcome, source, country, account owner, company size, deal stage, lifecycle stage) with the values in use, by readable name (New Sales, not new_sales), and how many insights each matches; --field <name> lists every value of one. Under the list it says how a scope matches (values of one field match any of them, every field must match, products, areas and features are one choice, a scope takes only values a field lists, a goal whose scope names no business outcome reads only the insights bearing on the outcomes its key results bear on, the scope changes no metric's value and is locked once the goal is active), and a CRM field with no values says it reads the customers in a connected CRM. As JSON these are rules and each field's needs (crm or null).
    • goals create --file goals.json (or --stdin) creates one goal, a list, or { "goals": [...] }, each as a draft; goals example prints a file to copy with three kinds of scope (all insights, one product area, a business outcome from one source), and key_result_example: the commands that give one of them its key result (a segment of its insights, a metric counting it, the key result with a monthly target, then activating). A scope takes only the values goals fields lists. Every goal is checked against the workspace and nothing is saved unless all pass; the answer names each problem and the allowed values. A goal with a key used before replaces that goal (a field left out takes its default), as far as its state allows: an active goal keeps its title, scope, parent and what its number counts, and a new target needs a reason. --parent <goal id> makes each goal a sub-goal of another (or give parent in the file). The answer shows each saved goal's id. --dry-run checks and counts without saving, and shows each goal's three newest matching insights.
    • goals activate <goal> [--reason] activates one of your drafts once it has a key result with a target (and every metric its target); its metrics' first period starts that day and their baselines are measured then. goals close <goal> [--reason] [--yes] closes an active goal: it is finished, keeps its results and history, and cannot be opened again; its sub-goals keep their own state.
    • goals set <goal id> <value> [--at <date>] records the goal number as you measured it (ClosedLoop AI does not measure it); earlier values stay as its history, and a second value for the same moment replaces the first (push still works).
    • goals delete <goal id> archives one of your drafts or active goals: its values, metrics and history stay, and it leaves your list (--yes skips the question). A closed goal stays as it is.
    • goals metrics list <goal> shows a goal's metrics: each a saved metric (metrics list) at the version it was added with, as a key result or as an indicator of one key result, with its target, the baseline measured when the target was set, its newest value, every finished period with the value measured the night after it ended and whether it met the target, and its id (--ended adds archived ones); an indicator names its key result by the key result's id. goals metrics add <goal> --metric <metric id> --period week|month|quarter|days [--days <n>] [--target <target>] adds one as a key result (--role indicator --key-result <goal-metric id> for an indicator, --reason, --dry-run); a target is one line: >=1400, <=0.3, between 40 and 60, a change from the baseline +500 or +10%, or for a share +5pts. goals metrics target <goal> <goal-metric> --target <target> --reason <text> [--period ...] sets a new target and measures a new baseline (a draft's baselines are measured when it is activated, and until then its metrics show their current value as a preview); goals metrics archive <goal> <goal-metric> stops one (a key result takes its indicators) and keeps its history. <goal-metric> is the goal metric's id from goals metrics list. goals show lists the metrics too. The old name goals kpis still works.
    • goals measure <goal> measures a goal's metrics now instead of waiting for the night; goals history <goal> lists every change to the goal, its metrics and its values, with who made it, through what and why.
  • closedloop fields: the named fields segments and metrics are written in (customer.country, deal.value, insight.area, a CRM field by its label such as customer.crm["Property Type"]). fields list [--entity customer|deal|person|insight|context|conversation|usage] shows every field that holds values, one line each: its key, type and label, by the kind of record it describes, with the field's id under it when that differs from the key (a field no record has a value of is left out; the JSON answer carries each field's guide, built every night: its meaning, a preview of this workspace's values, the operators it takes and one example condition); fields search <words> finds fields by key, label or description, empty ones included. When two fields fit a request, ask the user which one they mean (the answer's next actions say so); fields show <key> (or the field's id) gives one in full, read from this workspace's records at that moment: every value with how many records have it, the range of numbers or dates, how many records have none, and the fields it is often confused with (for example deal.value and deal.annual_value). Email and phone fields show only a pattern.
  • closedloop segments: who is in scope, as a rule over named fields ({"of":"customer","where":{"and":[...]}}; has and subtotal for a customer's deals, people, insights or conversations). A date takes within_last (days) or within_period (week, month, quarter or year so far). Changes over time read the customer history: {"moved":"customer.stage","into":"churned","within_period":"month"} (optionally "from") for customers who moved into a value, and {"change":{"field":"customer.arr","within_last":90,"start":{"op":">","value":0}},"op":">","value":0} for a number's value at the window's end minus its value at the start. A rule includes another saved segment of the same kind by its name, {"segment":"Groups"} (or its id): define Groups once and use it in every rule about groups; inside has it takes a segment of that kind ({"has":"deal","where":{"segment":"Big deals"}}). Saving keeps the version the included segment had then, so a number measured with it keeps its meaning; save the rule again to use a newer version. The rule is given with --rule as a JSON file, inline JSON, or - for standard input.
    • segments preview --rule <rule> counts without saving: how many match, how many are left after each condition, a few examples, the insights in scope, and warnings (a value no record has, with the closest ones; a source that is late). For a field often confused with another it also gives the count with the other field, and a next action that needs the user carries the question which one is meant (ask), showing both. Nothing is guessed: a rule that would take too long stops and says so.
    • segments define <name> --rule <rule> [--description <text>] saves it as version 1; a segment in use is never changed in place, and other rules include it by its name. segments list shows your segments with each rule in words, the segments it includes (and when one has a newer version), the segments that include it, and each segment's id.
  • closedloop metrics: one calculation over one segment, or a formula over saved metrics, measured every night as one number.
    • metrics preview --segment <segment id|rule> --calc <calc> measures it now (a saved segment by its id from segments list, or the rule itself as a JSON file, inline JSON or -): --calc count, or JSON such as {"fn":"sum","field":"customer.open_pipeline"} or a share {"fn":"ratio","numerator":{...},"denominator":{...}} (totals over the whole segment, then divided). It says how many members have no value for the field, when a source it reads is late, and for a field often confused with another the value with the other field (and a next action with the question which one is meant, ask).
    • metrics define <name> --segment ... --calc ... [--description <text>] saves it (a rule given inline is saved as a segment of its own, named after the metric, with a number when a segment already has that name; the metric's later inline rules are new versions of it); metrics list shows each with its calculation, its latest measured value, or why it is late (stale, with when the source was last updated), and its id; metrics value <metric id> --as-of <day> [--metric-version <n>] gives its value on a past day: the number measured that night, else computed now from the CRM history and the dated records (labelled rebuilt, not stored), else why there is none; a goal measures a saved metric with goals metrics add --metric, and keeps the version it was added with. metrics history <metric id> [--days <n>] [--every day|week] [--metric-version <n>] shows it day by day over the last 30 days (or the days given), oldest first: the value measured that night, else worked out from the history (labelled), else why there is none, and the change from the first value to the last; it asks nothing before the day the history starts, and when the API stops answering (the per-person limit, a busy workspace, a value too slow to work out) it still shows every stored day and says how many were not fetched. metrics delete <metric id> [--reason <text>] [--yes] deletes one: it comes off each of your goals that measures it (a key result takes its indicators) and its history stays; it is refused, with nothing changed, when a teammate's goal measures it, when it is an active goal's only key result, or when a formula uses it.
    • metrics preview --formula <formula> and metrics define <name> --formula <formula> combine saved metrics with + - * / and brackets, with no segment, each metric by its id from metrics list, alone or in square brackets: "<id> / <id>", "[<id>] * 12" or "(<id> - <id>@90d) / <id>@90d" (@90d: its value 90 days earlier). A metric's name or a list number is refused. metrics list shows a saved formula with its metrics' names. The preview shows each input's value and how it was obtained. Saving pins each metric at its current version; the formula is measured every night after the metrics it uses, and has no value (with the reason) when one of them has none or a division is by 0. The same formula as JSON ({"fn":"formula","op":"divide","args":[{"metric":"<id>"},{"metric":"<id>","days_ago":90}]}) works through --calc without --segment.
    • metrics leads <metric> [--indicator <metric>] [--candidates <key>...] [--wait] says whether another metric's history moves before this one's: with --indicator, the check of that pair in plain words; without it, the metrics that led this one and every candidate checked. ClosedLoop AI runs the checks in the background; --wait waits until they are done.
    • With --json every answer is the API's, with the rule and calculation that scoped it, and its next actions.
  • closedloop integrations list: every integration, in three groups: needing attention (with the reason), connected (with the last sync), and available to connect (with how, and the plan it needs), each with its id. --connected or --available shows one side only. As JSON each carries integration_id (and its slug, as data).
  • closedloop integrations show <id>: one integration's status, and what connecting it asks for. Every integrations command takes the integration's id from the list.
  • closedloop integrations connect <id>: connects it the way it connects.
    • With an API key, it asks for the key without showing it, plus any settings (site, region). An agent pipes the key in with --stdin (a secret on a second line) and passes settings as --field key=value; a key is never accepted as an argument.
    • In the browser (OAuth), it opens the app's connect page and waits until the connection shows; an agent gets the link and runs the command again to check.
    • Asana, Attio, Discord, Front, Granola, Pipedrive, Plaud, Read.ai, Stripe, Zendesk and Microsoft Teams connect in the browser without signing in to the app. The CLI opens a one-time link (valid for up to 10 minutes) that names the workspace; Continue there sends your browser back to the CLI on this computer, which finishes the connect, so a link someone forwards connects nothing. The command waits up to 15 minutes for the connection: in a terminal it shows the link and opens it when you press Enter; otherwise (an agent, a pipe) it opens the browser itself and prints one answer at the end, so an agent runs it with a long timeout or in the background. Asana needs --field asana_workspace_gid=<id> and Zendesk --field zendesk_subdomain=<subdomain> (a terminal asks for them).
    • When the browser cannot come back to this computer, it gives the app's connect page instead (status: browser_needed, exit 0), with a reason: remote_browser (over SSH, in a Codespace, dev container, Gitpod, Cloud Shell, a container or Kubernetes), no_local_listener (the CLI could not listen on 127.0.0.1) or browser_not_opened (the browser could not be opened). --in-app asks for the app's connect page directly, for example when the confirm page's next step does not load. Settings given with --field are not used there; the app asks for them.
    • Integrations set up only in the app get a link to it. Wherever the CLI sends you to the app it says how to sign in there: with your email address, since an account made in the CLI has no password: choose "Email me a code" and the app emails you a sign-in code.
    • --reconnect connects again, for example with a new key.
    • While your data is not analysed yet, the answer says what the new data waits for (waiting_for): company_profile, or product_structure when only a confirmed product is missing ("Its data is analysed once at least one product of your product structure is confirmed.", with closedloop products as the next action).
  • closedloop integrations pause <id> / resume <id>: stop syncing without disconnecting, and start again.
  • closedloop integrations limit <id>: the most credits a day a source of conversations or feedback (Gong, Intercom, Slack and the like) may use, what it used today, and whether today's limit has paused its analysis. --set <credits> sets the limit (a whole number, e.g. --set 1000000); once a day reaches it, ClosedLoop AI stops analysing that source until 00:00 UTC, and new data waits. --remove removes it and lifts a pause at once. Changing it needs the right to manage integrations; an integration with several connections is limited in the app. As JSON: daily_credit_limit (null for none), spent_today, resets_at, paused, paused_until.
  • closedloop integrations disconnect <id>: stops syncing after confirmation (--yes for agents); what was already imported stays.
  • closedloop backfills: the workspace's history imports, running ones first: source, window, state (queued, importing, analysing, done, failed, cancelled, or stalled when nothing moved for 30 minutes), progress in days or records while importing, and for a running import an estimate of when it finishes, from the pace so far, each with its id. A backfill is done only once its records are imported, analysed and turned into insights; until then it is analysing. backfills show <id> [--watch] gives one in detail: how many records it imported and how many were new, how many are analysed (Analysed: 101 of 102), the insights still to go, when each stage finished, and what it cost (Credits: 2,647,708 (as of 2 h ago)); --watch follows it every 30 seconds until it is done. The credits are the charges for the records the import brought in, worked out by ClosedLoop AI every 2 hours in working hours while the import is up to a month old and once a month after that, so a billing correction shows up; the list adds them once known, and before the first calculation show says Credits: not worked out yet. For a source whose records are not counted this way, progress covers importing; insights appear as the records are analysed, and no credits are shown.
  • closedloop usage: credits used this period, against the limit on the Free plan (when it resets, and when this pace reaches it) or with the cost so far on Pay as you go. The numbers are the Plan & billing page's.
    • usage history [--months 12]: credits per month, newest first.
    • usage by-source [--month 2026-10]: a month's credits per integration or feature, largest first.
    • usage export [--month 2026-10] [--output file] [--force]: saves the month's usage per day and integration as a CSV, never over an existing file unless --force.
  • closedloop plan: your plan and what it includes; plan upgrade opens Plan & billing (payment happens in the browser), or gives an agent the link.
  • closedloop --help --all: the full help context (see For AI coding agents), with what the words mean as ClosedLoop AI defines them. It replaces closedloop glossary, which is gone: closedloop glossary now answers unknown_command.
  • closedloop logout: forgets the active account's sign-in on this computer (--as <email> names another one; --all forgets every account). It also cancels sign-ins still in progress for accounts that are not signed in. Your other sessions, the web app included, stay signed in.

Discovery tests and builds

The discovery records follow a goal through opportunities and customer problems (called hypotheses in the existing goal commands), candidate solutions, assumptions and tests. Each solution, assumption and test has its own stable id. An assumption is something that must be true for a solution to work; a test is a specific research activity with a protocol and recorded evidence. A delivery is the engineering work that produces a prototype, a technical spike or a production change.

Every level can be written by its goal owner, using a JSON object from --file (or --file - for standard input):

closedloop opportunities create --goal <goal> --file opportunity.json
closedloop hypotheses create --goal <goal> --opportunity <opportunity> --file problem.json
closedloop solutions create --hypothesis <hypothesis> --file solution.json
closedloop assumptions create --solution <solution> --file assumption.json
closedloop tests create --assumption <assumption> --file test.json

The files describe, respectively, {name, definition}, {problem}, {description}, {statement, kind} and {title, protocol}. An assumption's kind is desirability, usability, feasibility or viability. Parent ids can also be written in the files as goal_id, opportunity_id, hypothesis_id, solution_id or assumption_id; a flag and a file that name different parents are refused instead of silently picking one. Existing goals, metrics and segments keep their existing authoring commands.

hypotheses evidence <id> --file evidence.json links an existing product insight to an authored customer problem: { "insight_id": "<insight>", "stance": "for" }, or "against" for evidence against it. The insight id comes from insights search; build handoffs then include its actual customer evidence.

A research-test file can look like this:

{
  "title": "Unassisted export mapping",
  "protocol": {
    "method": "rese