Skip to content

docs(onboarding): user guide, onboarding plan, and actionable first-run errors (OB0) - #128

Merged
lg2m merged 7 commits into
mainfrom
feat/eng-875-onboarding-ux
Sep 22, 2026
Merged

lg2m merged 7 commits into
mainfrom
feat/eng-875-onboarding-ux

Conversation

@lg2m

@lg2m lg2m commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

OB0: onboarding UX — audit, plan, user guide, actionable first-run errors

Spec: docs/plans/onboarding-ux.md#ob0 Linear: ENG-875 (parent), continues ENG-859 (#119)

This is the design-and-docs PR for the onboarding effort, plus the small error-text fixes that were cheap enough to ship with it. Everything larger is a planned slice with its own Linear issue.

What changes for users

Documentation. A user guide under docs/guide/ (11 pages) — install, quickstart, configuration reference covering every key in Document, PolicyPatch, and tui.ron, providers and credentials, permissions and trust, the TUI, headless (ask/run/serve, exit codes, JSONL), MCP servers, CLI reference, troubleshooting (every startup message a new user can hit, with its fix), FAQ. The README is rewritten to lead with install and first run and link into the guide. CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, three issue templates (bug/feature/docs) with a config routing questions to Discussions, and a PR template.

Error text, before → after, all verified on a fresh-clone simulation (empty XDG_CONFIG_HOME, no credentials):

Situation Before After
clone with .qq/config.ron, first run error: project configuration trust is required error: project configuration needs your trust before it is used:
/repo/.qq/config.ron
Review the file, then run qq trust in this directory to accept it. Sensitive sections (providers, MCP servers, grants, model) load only after that.
qq trust trusted /repo/.qq/config.ron trusted /repo/.qq/config.ron
declares: model, policy.allow_tools, policy.allow_shell_prefixes
model set, no key (openai/anthropic/google) error: environment variable OPENAI_API_KEY is not set error: no credential for provider openai: run qq auth login openaior set the environment variableOPENAI_API_KEY``
qq auth login opnai stored opnai/default in keyring (dead credential) error: "opnai" is not a built-in provider; qq auth loginaccepts openai, anthropic, google, xai, openai-codex. For a gateway or MCP bearer useqq auth set NAME …
exit TUI / end qq run qq run --session ID "<prompt>" only also qq --session ID
bare qq in a pipe interactive mode requires a terminal …; use qq ask ""orqq run "" in a pipe

Design

  • Research: docs/design/onboarding-audit-2026-09-22.md — how Codex, OpenCode, Pi, and fx (.source/) handle install, first launch, auth, model defaults, config, trust, help, docs; QQ's current paths traced; findings O01–O20; positions taken (never exit when the TUI could ask; every error names its next command; stay explicit about the model; user docs in-tree; trust shown before granted; install wraps the existing archives).
  • Plan: docs/plans/onboarding-ux.md with slices OB0–OB11 and acceptance for each; ledger docs/plans/progress/onboarding-ux.md; indexes and the priority table updated (OB1–OB2 then OB6 at priority 1).
  • ConfigError::TrustRequired keeps its fields; Display is a helper over pending. PendingTrust gains sections: Vec<&'static str> computed by Document::sensitive_sections() (same predicate as has_sensitive_operations, itemised).
  • AuthError::ProviderCredentialMissing { provider, environment_variable } is produced only by resolve_provider_credential (the built-in path, which knows both remedies); an explicit Env(...) keeps EnvironmentMissing. RequestCredentialError mapping updated for xai.
  • qq auth login validates the provider before the store opens; LOGIN_PROVIDERS is a const whose members a test checks against built_in_endpoint.

How verified

  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo test --workspace (all green; qq bin 174 passed).
  • New tests: trust_required_names_every_pending_file_and_the_command_that_accepts_it (qq-config; also pins sections root-first), a_built_in_provider_without_any_credential_names_both_remedies (qq-auth), auth_login_rejects_a_provider_it_cannot_bind_and_lists_the_accepted_ones and every_login_provider_has_a_built_in_endpoint (qq); the_resume_hint_names_the_session… extended.
  • Fresh-clone simulation script in the PR description above; every quoted string is real output.
  • Every relative link in the new docs resolves (checked by script).

Measurements

None: error paths and documentation only.

Compatibility

PROTOCOL / DESCRIPTOR / store schema unchanged. PendingTrust::new is crate-private; the public sections() accessor is additive. AuthError gains a variant (non-exhaustive matches elsewhere are unaffected; the one exhaustive mapping in xai.rs is updated).

Follow-ups

OB1–OB11 as filed: ENG-860, ENG-876–ENG-884, ENG-861. The guide already documents the intended behaviour of OB2/OB3/OB9 as "planned" where a reader would otherwise be confused.

…required

TrustRequired printed only "project configuration trust is required";
a new user cloning a repository with .qq/config.ron had no path and no
command. The message now lists every pending file and says to review it
and run `qq trust`. PendingTrust carries the sensitive sections each file
declares so `qq trust` can show what it admits (onboarding-ux OB0, O01).
…tial is missing

resolve_provider_credential fell through to the raw environment error
(`environment variable OPENAI_API_KEY is not set`), which never mentioned
`qq auth login`. A built-in provider with neither a stored credential nor
its variable now fails with ProviderCredentialMissing naming the provider,
the login command, and the variable. Explicit Env(...) references keep the
plain message (OB0, O03 plan-time half).
…s, name both resume paths

- `qq trust` prints the sensitive sections of each file it trusts.
- `qq auth login` refuses a provider outside the built-in set before the
  keyring opens, listing the accepted ids and pointing at `qq auth set`;
  a typo used to store a dead credential silently.
- The resume hint shows `qq --session ID` as well as `qq run --session`.
- Bare `qq` without a terminal points at `qq ask` / `qq run`.
(OB0: O05, O07, O08, O12)
Eleven task-oriented pages under docs/guide/: index, install, quickstart,
configuration reference (every Document, policy, and tui.ron key),
providers and credentials, permissions and trust, the TUI, headless,
MCP servers, CLI reference, troubleshooting (every startup message a new
user can hit and its fix), FAQ. The README shrinks to what QQ is, install,
first run, and links (OB0).
Research compares the first-run, auth, config, trust, help, and docs
surfaces of Codex, OpenCode, Pi, and fx with QQ's (findings O01–O20) and
records the positions the plan builds on. The plan sequences OB0–OB11:
guide and error text (this PR), TUI without model or credential, request-
time credential errors, doctor, init, install paths, in-TUI trust prompt,
first-session guidance, MCP credential degradation, docs-truth CI, wiki
mirror. Indexes and the priority table updated.
@lg2m
lg2m merged commit ae31ed6 into main Sep 22, 2026
4 checks passed
@lg2m
lg2m deleted the feat/eng-875-onboarding-ux branch September 22, 2026 17:12
lg2m added a commit that referenced this pull request Sep 22, 2026
…rotocol 27

Protocol 26 was claimed by #120 (turn recovery, ADR-0040) while #122 was open, so the effort pin moves to protocol 27. v26/ goldens are #120's; v27/ is regenerated from them plus command_set_session_effort and receipt_session_effort_set. Harbor trace fixtures bump 26 -> 27. Store schema stays 34 (main is on 33). MAX_TURN_RETRIES kept.

Also picks up #126-#128 (RR6, RR7, onboarding); no overlap.

Verified on the identical tree as a rebase: cargo test --workspace, fmt --check, clippy -D warnings all green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant