Skip to content

docs: delivery plan for workbench phases 2–5 - #44

Merged
noodlemind merged 3 commits into
feat/workbench-phase1-corefrom
feat/workbench-phases-2-5-plan
Aug 7, 2026
Merged

docs: delivery plan for workbench phases 2–5#44
noodlemind merged 3 commits into
feat/workbench-phase1-corefrom
feat/workbench-phases-2-5-plan

Conversation

@noodlemind

@noodlemind noodlemind commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Stacked on #43 (feat/workbench-phase1-core) — review that one first; this branch contains Phase 1 plus one document.

What

docs/architecture/harness-cli-workbench-delivery.md — the how-we-build companion to the workbench contract, covering the four remaining releases.

Per release (2 knowledge operator, 3 governed execution, 4a durable runs, 4b TUI, 5 resources/plugins): goal, concrete scope, draft acceptance criteria, verification checks, and the risks worth budgeting for. Plus a sequencing graph showing what actually blocks what — Phase 3 doesn't depend on Phase 2; 4b depends on 4a and reads better after 3.

Two things it carries that only exist because Phase 1 happened

  • A debt table assigning every Phase 1 deferral to the release that inherits it — the resultOf expansion that reverses the AC3 lane-scope amendment (Phase 2), the ~20 legacy writeEvent call sites and the events.jsonl retention contract (Phase 4a), the redaction residuals that start mattering once untrusted output flows (Phase 3). Nothing deferred gets quietly lost.
  • The settled TUI design direction recorded with Phase 4b — Session Ledger, the flow-document form landed on after the Pi/Amp/Codex/Gemini/Cursor/Grok research round — so that work starts from the agreed design instead of relitigating it.

It also writes the cross-model review pass into the standard execution recipe, since that's the step that caught Phase 1's systemic redaction gap.

Why one document instead of four plan files

prompt-library-contracts.test.mjs asserts at most one dated plan under docs/plans/ — plans are transient one-per-open-PR artifacts, deleted after merge. Each phase's dated plan gets cut from this document when its own PR opens. The contract test's architecture-doc listing is updated for the new file; suite green.

Summary by CodeRabbit

  • Documentation

    • Added a delivery plan for Workbench phases covering knowledge operations, governed execution, durable runs, TUI support, and resources/plugins.
    • Documented the TUI command palette, including search, command selection, value pickers, availability, and side-effect indicators.
  • Tests

    • Updated architecture documentation checks to include the new delivery plan.

Records scope, acceptance criteria, verification, and risks for the
knowledge operator, governed execution, durable runs, TUI, and plugin
releases, carries every phase 1 deferral to the phase that inherits it,
and keeps the settled TUI design direction with the work it belongs to.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added a TUI command palette specification, a durable delivery plan for Workbench Phases 2–5, and a contract-test update that requires the new architecture document.

Changes

Harness CLI Workbench documentation

Layer / File(s) Summary
Command surface and palette contract
docs/architecture/harness-cli-workbench.md
The TUI specification defines registry discovery, argv resolution, ranking, pickers, dependent options, side-effect and availability indicators, keyboard entry points, and composer sigils.
Multi-phase delivery plan
docs/architecture/harness-cli-workbench-delivery.md
The delivery plan defines dependencies, deferred debt, command-surface decisions, Phases 2–5, acceptance criteria, verification, risks, and execution workflow.
Execution workflow and documentation contract
docs/architecture/harness-cli-workbench-delivery.md, packages/harness/test/prompt-library-contracts.test.mjs
The execution workflow covers worktrees, reviews, verification, evidence checks, and documentation promotion. The contract test expects the new delivery plan document.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a delivery plan for Workbench Phases 2–5.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/workbench-phases-2-5-plan

Comment @coderabbitai help to get the list of available commands.

…rammar

Settles the TUI command surface against ground truth read from eight
installed agent CLIs (pi, Claude Code, Codex, Cursor, Grok, Amp, Warp,
Gemini) — binaries, bundles, settings schemas and shell completions.

The CLI grammar does not change. An earlier proposal to collapse 91
command-specific flags into subcommands and a config store is rejected:
it paid a full migration cost to serve one of three audiences. Models
read a tool description per call; shell users have --help and completion;
only the TUI lacked a discovery affordance, and an index supplies it.

Contract additions:
- palette is a flat searchable index over commands, verbs and skills
- no "--" is ever typed in the TUI; noun+verb resolves to argv internally
  and the resolved command is echoed into the ledger
- ":" namespaces (skill:consolidate), whitespace separates
- sigils are /, @, !, !!; entry on / and Ctrl-P, never Ctrl-K
- side-effect class shown per row

Phase 2 picks up the registry metadata that feeds it: enumerate ~18
prose-only verbs, tag all 98 options verb/prompt/cli-only, add surfaces
and userInvocable. Standalone value ahead of any TUI — richer help, and
it closes a strict-validation gap where an option declared on a parent
validates against a verb that cannot accept it.

Phase 4b gains bidirectional assertions so the index cannot drift from
dispatch — the failure mode every surveyed tool has already shipped.
@noodlemind

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/harness-cli-workbench-delivery.md`:
- Line 128: Replace the local ~/.gstack/projects/*/designs/harness-tui-*
reference in the “Design direction (settled)” section with a stable
repository-tracked reference. Move or copy the referenced mock and research into
the repository if needed, then link to that tracked location so contributors can
review and preserve it.

In `@docs/architecture/harness-cli-workbench.md`:
- Around line 429-450: Separate the no-flag restriction in
docs/architecture/harness-cli-workbench.md (lines 429-450) so it applies only to
palette selection and palette-generated argv; explicitly state that ! and !! use
the registry’s policy-gated bash execution path and may contain shell flags.
Update AC6 in docs/architecture/harness-cli-workbench-delivery.md (lines
132-140) to test only palette input and generated argv, excluding governed
shell-composer payloads.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9c55d02-ec24-4d06-b6a7-c3431ecfc4d1

📥 Commits

Reviewing files that changed from the base of the PR and between 2987e90 and 99dd08c.

📒 Files selected for processing (3)
  • docs/architecture/harness-cli-workbench-delivery.md
  • docs/architecture/harness-cli-workbench.md
  • packages/harness/test/prompt-library-contracts.test.mjs


**Goal.** `harness tui` performs the same search, lifecycle, and execution operations as the CLI, through one kernel and one behavior path.

**Design direction (settled).** Session Ledger — the flow-document form: a scrolling transcript in the terminal's main buffer (scrollback preserved; alt-screen a config, not a default), persistent chrome limited to a two-hairline editor and one dim status line, block meaning carried by faint background tints rather than boxes, near-monochrome with the harness v0.1 palette doing the semantic work, views dissolved into commands that print blocks, markdown plans rendered inline, ephemeral overlays for the command palette and run tree, editor border reflecting gate state, consequence context in the hint row, and an exit ritual that prints the closing tally and resume command into scrollback. Reference mock and research: the design session under `~/.gstack/projects/*/designs/harness-tui-*`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Move the design reference into a tracked location.

The ~/.gstack/projects/*/designs/harness-tui-* path is local to one machine. Other contributors cannot review or preserve the referenced mock and research. Store the material in the repository, or replace this path with a stable repository reference.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/harness-cli-workbench-delivery.md` at line 128, Replace the
local ~/.gstack/projects/*/designs/harness-tui-* reference in the “Design
direction (settled)” section with a stable repository-tracked reference. Move or
copy the referenced mock and research into the repository if needed, then link
to that tracked location so contributors can review and preserve it.

Comment on lines +429 to +450
**No `--` is ever typed in the TUI.** The index contains options so a capability can be *found*; it must never require one to be *written*. The palette presents **noun + verb**, and the registry maps the verb onto the argv the CLI already accepts:

```text
index structural → harness index --structural
index status → harness index --status
learnings why → harness learnings --why <id>
knowledge promote → harness knowledge promote --branch <key>
```

The left column is the TUI's entire vocabulary. The resolved argv is echoed into the ledger after the run, so the surface stays auditable and the shell form is learned by observation rather than by being typed.

Contract:

- **One flat namespace.** Commands, their verbs, and skills are sibling entries — reaching a capability never requires knowing its parent. `structural` resolves without the user knowing it lives under `index`.
- **Skills are namespaced with `:`.** `/consolidate` is the deterministic command; `/skill:consolidate` is the workflow that calls it. The command owns the bare name; the qualified form is the escape hatch.
- **Ranking is word-boundary weighted**, not substring. Exact match preselects; declared aliases outrank prefix matches.
- **Values come from pickers.** A verb needing a value opens a chooser populated from live state (branch keys, learning ids, plan paths) — never a typed flag.
- **Dependent options are refinements, not entries.** An option valid only alongside another (`--since` requires `--structural`) attaches to its parent verb and is offered after selection, never listed independently.
- **Every row carries its side-effect class** — `read`, `mutate`, `execute` — so the consequence of a command is visible before it runs. This is possible because the registry already declares it per command.
- **Availability is explained, not hidden.** A command that cannot currently run stays listed and greyed, carrying its reason (`no plan under docs/plans/`).
- **Entry points:** `/` at line start, plus a configurable chord defaulting to `Ctrl-P` (`Cmd-K` aliased on macOS). `Ctrl-K` is reserved for readline's kill-to-line-end.
- **Composer sigils:** `!` runs a shell command and puts its output in context, `!!` runs it privately, `@` completes file paths. No other sigil dispatches.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Separate palette argv input from shell-composer input.

The documents prohibit -- in all accepted TUI input, but ! and !! accept shell commands that can contain flags. This makes Phase 4b AC6 impossible to satisfy and can incorrectly reject valid shell commands.

  • docs/architecture/harness-cli-workbench.md#L429-L450: Limit the no-flag rule to palette selection and palette-generated argv. State that ! and !! resolve through the registry’s policy-gated bash execution path.
  • docs/architecture/harness-cli-workbench-delivery.md#L132-L140: Change AC6 to test palette input and generated argv only. Exclude governed shell-composer payloads from this restriction.
📍 Affects 2 files
  • docs/architecture/harness-cli-workbench.md#L429-L450 (this comment)
  • docs/architecture/harness-cli-workbench-delivery.md#L132-L140
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/harness-cli-workbench.md` around lines 429 - 450, Separate
the no-flag restriction in docs/architecture/harness-cli-workbench.md (lines
429-450) so it applies only to palette selection and palette-generated argv;
explicitly state that ! and !! use the registry’s policy-gated bash execution
path and may contain shell flags. Update AC6 in
docs/architecture/harness-cli-workbench-delivery.md (lines 132-140) to test only
palette input and generated argv, excluding governed shell-composer payloads.

@noodlemind
noodlemind merged commit 99dd08c into feat/workbench-phase1-core Aug 7, 2026
1 of 2 checks passed
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