TUI first-run onboarding (crates/tui/src/tui/onboarding/*, App::initial_onboarding_state, tui/ui.rs key handling) |
Marker-based Welcome -> Language -> ApiKey -> TrustDirectory -> Tips, writes .onboarded, locale settings, API key, and workspace trust. |
Partial / reusable |
Reuse language picker, localization patterns, key masking/validation, trust writer, and modal/event plumbing. Replace the product spine and persistence with SetupState; welcome and tips copy are stale because they center API key/trust, not constitution. |
| Existing-user trust/API-key gates |
Returning users can be dropped into API-key or workspace-trust gates even after .onboarded. |
Reusable support behavior |
Derive inherited state from existing config/trust facts. Keep noninteractive/headless from hanging; unresolved readiness becomes needs_action or deferred, not a blocking fresh install. |
codewhale setup / codewhale-tui setup (main.rs::run_setup) |
Scaffolds MCP, skills, tools, plugins; has --status and --clean; prints DeepSeek Setup; no constitution state. |
Partial / stale for this lane |
Keep as legacy utility/scaffold surface. /setup wizard shell (#3404) should be constitution-first and state-backed; tools/MCP/plugins are SetupStep::ToolsMcp optional/deferred for v0.8.67. Rename/copy polish belongs with #3412. |
setup --status and doctor setup guidance |
Reports API key source, model, MCP/skills/tools/plugins, sandbox, .env, and legacy state. |
Partial / reusable |
Reuse as #3411 reporting substrate, but add setup-state summary and secret-redacted setup report. Current copy mentions codewhale setup --migrate, but no SetupArgs flag exists on this branch; treat that as stale/conflicting copy. |
/provider, provider picker, /model surfaces |
Switch/view provider/model and can show existing route state. Full configured-provider route manager work belongs to #3830. |
Reusable support card |
#3405 should read the effective route and write only SetupStep::ProviderModel (verified, needs_action, deferred, safe result). Do not pull the full provider manager into the wizard. |
/config and config audit/runtime controls |
Can inspect and persist approval/sandbox/shell/default-mode settings. |
Reusable authority surface |
#3406 runtime posture card reads effective config and writes SetupStep::TrustSandbox plus runtime_posture_source. Constitution autonomy remains guidance only and never mutates these controls. |
/mcp, /skills, tools/plugins setup |
Existing commands and docs are useful, but tooling setup is explicitly outside v0.8.67 except status rows. |
Reusable / deferred |
Show compact “available later” status if needed; record SetupStep::ToolsMcp as optional or deferred. Do not block ready on MCP/tools/plugins. |
Hotbar setup (/hotbar, tui/hotbar/setup.rs) and feature-intro nudge |
Real UI exists and post-onboarding copy currently points users to Hotbar/Fleet. |
Superseded for v0.8.67 first-run |
Hotbar opt-in setup is v0.8.68. Do not include it in the v0.8.67 wizard except as deferred SetupStep::Hotbar. First-run summary should point to /constitution, not Hotbar/Fleet as the main next step. |
Fleet setup (/fleet setup, fleet views) |
Real loadout UI exists, unrelated to constitution-first setup. |
Deferred / unrelated |
Keep out of this lane except avoiding contradictory copy in final report/docs. |
remote_setup/* and docs/rfcs/REMOTE_SETUP_DESIGN.md |
Generate-only cloud/chat deploy bundle; RFC now points toward local/Tailscale-first remote lanes. |
Superseded for v0.8.67 / deferred to v0.8.69+ |
Do not wire into constitution setup. Track as SetupStep::RemoteRuntime optional/deferred only if surfaced in a status report. |
Repo-local constitution (.codewhale/constitution.json) and project-context renderer |
Existing repo constitution is a separate local-law layer and already has prompt-rendering precedent. |
Reusable pattern |
Mirror its separate system-block pattern for user-global constitution. User-global $CODEWHALE_HOME/constitution.json is not repo-local .codewhale/constitution.json. |
Expert base-prompt override ($CODEWHALE_HOME/prompts/constitution.md + CODEWHALE_ALLOW_BASE_PROMPT_OVERRIDE=1) |
Documented advanced escape hatch for replacing the base prompt segment. |
Reusable advanced path |
/constitution should detect/report it as ConstitutionChoice::ExpertOverride / ConstitutionSource::ExpertOverride, not guide normal users into it. |
WHALE.md docs/discovery |
Docs still describe deprecated reading below AGENTS.md. |
Stale / pending removal |
#3798 owns removal and docs cleanup. v0.8.67 setup copy should not recommend WHALE.md. |
Legacy .deepseek paths and trust markers |
Still supported for migration/fallback, including onboarding marker and trust marker checks. |
Reusable migration fallback with hazards |
Preserve for inherited-state derivation and compatibility; do not create new .deepseek state from v0.8.67 setup. Audit/doc stale references under #3412/#3798. |
Scope update (2026-06-29)
v0.8.67 is the setup wizard plus user-global constitution lane. The release should make CodeWhale feel coherent on first launch and after update, with
/constitutionas the main personalization surface.Future setup surfaces have moved out of this lane:
Product north star
Starting CodeWhale should feel like starting a serious workbench, not editing a pile of config files. The first-run happy path should get a new user to one verified prompt with:
/constitution,For users updating to v0.8.67, the same release introduces a localized constitution checkpoint. Choosing the bundled/default constitution is a valid completion path; customization is encouraged but not forced.
Key design decisions
.codewhale/constitution.jsonalready exists and can evolve later; most ordinary repo guidance belongs inAGENTS.md.$CODEWHALE_HOMEand renders it into prose for the model.$CODEWHALE_HOME/prompts/constitution.mdplusCODEWHALE_ALLOW_BASE_PROMPT_OVERRIDE=1remains an expert escape hatch, not the normal setup output.WHALE.md: v0.8.67 should stop treatingWHALE.mdas an active instruction/context surface. Track cleanup in v0.8.67 Setup: remove deprecated WHALE.md discovery and docs surface #3798.First-run spine
/constitutionas the primary reopen/edit surface.Setup surface audit (2026-06-30 live)
This matrix is the #3403 closeout map against
claude/v0.8.67-constitution-setup-174rj9/ PR #3861 after the foundation commits. The implementation rule for the rest of v0.8.67 is: all first-run, update-checkpoint,/setup,/constitution, doctor, and docs surfaces read/writeSetupStatefromcrates/config/src/setup_state.rsand render user-global constitution prose throughUserConstitution::render_block()fromcrates/config/src/user_constitution.rs. Do not create a second readiness model in the TUI.Existing setup/onboarding surfaces
crates/tui/src/tui/onboarding/*,App::initial_onboarding_state,tui/ui.rskey handling)Welcome -> Language -> ApiKey -> TrustDirectory -> Tips, writes.onboarded, locale settings, API key, and workspace trust.SetupState; welcome and tips copy are stale because they center API key/trust, not constitution..onboarded.needs_actionordeferred, not a blocking fresh install.codewhale setup/codewhale-tui setup(main.rs::run_setup)--statusand--clean; printsDeepSeek Setup; no constitution state./setupwizard shell (#3404) should be constitution-first and state-backed; tools/MCP/plugins areSetupStep::ToolsMcpoptional/deferred for v0.8.67. Rename/copy polish belongs with #3412.setup --statusanddoctorsetup guidance.env, and legacy state.codewhale setup --migrate, but noSetupArgsflag exists on this branch; treat that as stale/conflicting copy./provider, provider picker,/modelsurfacesSetupStep::ProviderModel(verified,needs_action,deferred, saferesult). Do not pull the full provider manager into the wizard./configand config audit/runtime controlsSetupStep::TrustSandboxplusruntime_posture_source. Constitution autonomy remains guidance only and never mutates these controls./mcp,/skills, tools/plugins setupSetupStep::ToolsMcpasoptionalordeferred. Do not block ready on MCP/tools/plugins./hotbar,tui/hotbar/setup.rs) and feature-intro nudgeSetupStep::Hotbar. First-run summary should point to/constitution, not Hotbar/Fleet as the main next step./fleet setup, fleet views)remote_setup/*anddocs/rfcs/REMOTE_SETUP_DESIGN.mdSetupStep::RemoteRuntimeoptional/deferred only if surfaced in a status report..codewhale/constitution.json) and project-context renderer$CODEWHALE_HOME/constitution.jsonis not repo-local.codewhale/constitution.json.$CODEWHALE_HOME/prompts/constitution.md+CODEWHALE_ALLOW_BASE_PROMPT_OVERRIDE=1)/constitutionshould detect/report it asConstitutionChoice::ExpertOverride/ConstitutionSource::ExpertOverride, not guide normal users into it.WHALE.mddocs/discoveryAGENTS.md.WHALE.md..deepseekpaths and trust markers.deepseekstate from v0.8.67 setup. Audit/doc stale references under #3412/#3798.Step/state ownership for v0.8.67
SetupState::load(),SetupState::derive_inherited(InheritedConfigFacts),inheritedsteps[Language],constitution_languageLanguageverified. Update checkpoint can inherit language but should still localize the checkpoint UI or use tested fallback copy.steps[ProviderModel].status/result/versionverifiedis ideal;needs_actionstill reaches ready with an actionable summary;deferredis allowed where the user chooses bundled/default constitution and proceeds.steps[TrustSandbox],runtime_posture_sourceconstitution_choice,constitution_source,constitution_validity,constitution_preview_hash,constitution_preview_version,steps[Constitution]bundled, guided custom, expert override, or deferred) satisfies first-run; empty/unreadable custom files become reportable validity, not silent success.constitution_checkpoint_completed_for,constitution_choice,constitution_language0.8.67is the checkpoint version match. Choosing bundled/default is a valid completion. Noninteractive/headless defers and proceeds with bundled law.steps[*], derivedfirst_run_ready(),update_ready(version), redacted setup report/constitutionas the primary personalization surface.steps[ToolsMcp],steps[Hotbar],steps[RemoteRuntime]Dependency order now
persistence,setup_state, anduser_constitutionare the shared vocabulary.UserConstitution::render_block()as a separate system block after the byte-stable base/tool-catalog head, mirroring repo-constitution block assembly./setupentry point #3404/v0.8.67 Setup: require a localized constitution checkpoint after update #3794 wizard/checkpoint shell onSetupState; it may start compact, but it must not write a second marker-only setup model./constitutionas the reopen/edit/report surface for the same state and structured file.Current contradictions / follow-up hooks
crates/tui/src/tui/onboarding/welcome.rsnow centers constitution-first setup: language, provider readiness, CodeWhale constitution, bundled/default completion, and/constitutionreturn path.App::feature_intro_content()now centers setup readiness and/constitution; Hotbar/Fleet remain visible only as optional later surfaces (4235b665e).run_setupandrun_setup_statusnow use CodeWhale Setup/Status headers (78e6aff1a).codewhale setup --migrate; it now tells users to start CodeWhale once to trigger safe migration where available, then reruncodewhale doctor(78e6aff1a).WHALE.mdas ignored/deprecated migration input, not a read instruction surface; remainingWHALE.mdmentions are migration warnings, tests, or unrelated CodeWhale naming.Child issues
/setupentry point #3404 Implement the setup wizard shell, navigation, resume, and/setupentry pointWHALE.mddiscovery and docs surface/constitutionthe primary constitution management surface/constitutionand user-global constitution in the docs mapDefinition of done
/setupand/constitutionwithout losing current config or sessions.CODEWHALE_HOME.Non-goals for v0.8.67
/config,/provider, and related commands.prompts/constitution.md; setup UI and generated user constitution can be localized, while the bundled global floor remains the canonical source..codewhale/constitution.json.Safe fallback
needs-actionprovider status and an actionable next step.checkpoint_deferredrather than blocking work.