Feature plan: Step 1 · Step 2 · Step 3 · Step 4

Stage 1 - Shared configuration contract

  • Changes:

    • Added PrivateConfigSchema with configuration definitions, template defaults, environment keys, effective-value sources, legacy fallbacks, redaction, and additional-value handling.

    • Made PrivateConfig take its recognized environment variables from that schema.

    • Added focused schema tests and registered them with the test runner.

  • Verification:

    • php -l src/ForumRewrite/Support/PrivateConfigSchema.php

    • php -l src/ForumRewrite/Support/PrivateConfig.php

    • php -l tests/PrivateConfigSchemaTest.php

    • ./v3 test PrivateConfigSchemaTest PrivateConfigCommandTest LlmProviderConfigTest — 14 passed.

  • Notes:

    • No database, deployment, or TUI verification is applicable to this internal configuration-contract stage.

Stage 2 - Private-config schema migration

  • Changes:

    • Replaced private-config's duplicated defaults, legacy resolution, effective-value/source rendering, redaction, and known-key handling with the shared schema.

    • Preserved existing generated-file format, permissions, atomic replacement path, and legacy values as additional file values.

    • Added command coverage for environment override precedence without secret disclosure.

  • Verification:

    • php -l scripts/write_private_config.php

    • php -l src/ForumRewrite/Support/PrivateConfigSchema.php

    • php -l tests/PrivateConfigCommandTest.php

    • ./v3 test PrivateConfigSchemaTest PrivateConfigCommandTest LlmProviderConfigTest — 15 passed.

  • Notes:

    • No database, deployment, or TUI verification is applicable to this command-contract migration stage.

Stage 3 - TUI entry boundary

  • Changes:

    • Added ./v3 tui and a terminal launcher that validates whiptail plus interactive stdin/stdout/stderr before opening any UI.

    • Added clear ./v3 status and ./v3 private-config view fallbacks for missing dependencies or non-interactive use.

    • Added command tests for help, non-interactive execution, and unavailable whiptail.

  • Verification:

    • bash -n scripts/terminal_operator_ui.sh

    • bash -n v3

    • php -l tests/TerminalOperatorUiCommandTest.php

    • ./v3 test TerminalOperatorUiCommandTest StatusCommandTest PrivateConfigCommandTest — 12 passed.

    • Direct pseudo-terminal check rendered the whiptail dialog; the harness could not send its close key, so the isolated no-op dialog was terminated.

  • Notes:

    • The entry path starts no operational command before its terminal/dependency checks pass. Dashboard interaction and launcher cancellation coverage follow in later stages.

Stage 4 - Read-only dashboard

  • Changes:

    • Replaced the entry placeholder with a whiptail dashboard for canonical operator status, redacted effective private configuration, and the web-only feature-flags handoff.

    • Added explicit read-only context for environment overrides and site flags.

    • Added a pseudo-terminal dashboard test using a fake whiptail to inspect delegated output without running operational work.

  • Verification:

    • bash -n scripts/terminal_operator_ui.sh

    • php -l tests/TerminalOperatorUiDashboardTest.php

    • ./v3 test TerminalOperatorUiCommandTest TerminalOperatorUiDashboardTest PrivateConfigCommandTest StatusCommandTest — 13 passed.

  • Notes:

    • The dashboard delegates status/configuration rendering to existing commands. Feature-flag editing remains exclusively on /tools/feature-flags/; no database, deployment, or write-path verification applies.

Stage 5 - Bounded command launcher

  • Changes:

    • Added a read-only command catalog for ./v3 status, ./v3 task-queue status, and ./v3 fast-score status.

    • Added selected-command review before delegation and return-to-dashboard behavior after output.

    • Extended the pseudo-terminal test to exercise the catalog, review dialog, delegated output, and dashboard return.

  • Verification:

    • bash -n scripts/terminal_operator_ui.sh

    • php -l tests/TerminalOperatorUiDashboardTest.php

    • ./v3 test TerminalOperatorUiCommandTest TerminalOperatorUiDashboardTest PrivateConfigCommandTest StatusCommandTest — 13 passed.

  • Notes:

    • The catalog is a fixed read-only allowlist: it accepts no operator-supplied arguments and omits all destructive, enqueue, and configuration-write commands.

Stage 6 - Release verification and documentation

  • Changes:

    • Documented ./v3 tui entry requirements, read-only dashboard/launcher boundary, feature-flags handoff, fallback commands, and deferred editor/destructive workflows in the CLI reference.

  • Verification:

    • bash -n v3 && bash -n scripts/terminal_operator_ui.sh

    • php -l passed for the touched configuration, command, and TUI test files.

    • ./v3 test PrivateConfigSchemaTest PrivateConfigCommandTest LlmProviderConfigTest TerminalOperatorUiCommandTest TerminalOperatorUiDashboardTest StatusCommandTest — 23 passed.

    • ./v3 tui --help printed the documented entry and fallback commands.

    • V3_TUI_WHIPTAIL=missing-whiptail ./v3 tui exited without work and printed the documented fallback.

    • ./v3 test — 852 passed; 2 failed: LocalAppSmokeTest::testFeatureFlagsPageShowsLockedBadgeWithReasonForNonMutableFlags and WriteApiSmokeTest::testTaskQueueProcessesQueuedAgentReplyOnce. Both reproduce in isolation and concern surfaces outside this feature's changed files.

  • Notes:

    • No database migration or deployment is required. The fake-whiptail pseudo-terminal test exercises dashboard rendering, command review, cancellation-safe menu exits, and delegated read-only output without invoking operational work.