Skip to content

refactor: remove goop-discuss and goop-quick commands, keep the discuss phase - #288

Open
hffmnnj wants to merge 5 commits into
feat/repo-dead-code-pruningfrom
feat/command-surface-cleanup
Open

refactor: remove goop-discuss and goop-quick commands, keep the discuss phase#288
hffmnnj wants to merge 5 commits into
feat/repo-dead-code-pruningfrom
feat/command-surface-cleanup

Conversation

@hffmnnj

@hffmnnj hffmnnj commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Stacked on #287.

Two slash commands go away. The discuss phase does not.

That distinction is the whole point of this change, so it is worth stating plainly: /goop-discuss and /goop-quick are deleted as commands, while discuss remains a fully legal phase in the state machine, the DB schema, and phase enforcement. Discovery is entered by describing what you want rather than by typing a command name.

Commands removed

commands/goop-discuss.md and commands/goop-quick.md are deleted, leaving exactly seven command files. Every inventory assertion was updated to match: EXPECTED_COMMAND_FILES 9 → 7, the slashcommand registry, and a resolver prompt-file count that the initial search missed and the suite caught.

Phase preserved

WORKFLOW_PHASES still reads ["idle", "discuss", "plan", "execute", "accept"]. VALID_TRANSITIONS still carries idle → discuss, discuss → plan | idle, and plan → discuss. The discuss enforcement block in phase-context.ts is untouched, and no migration rewrites the phase value.

semantic-invariants.test.ts asserts five phases and diffs empty against the branch base — it was never edited, because five was still the right answer.

Intent classifier

goop_infer_intent still recognizes discovery and small-fix intent. What changed is that those intents no longer map to commands that do not exist: both now map to "" in COMMAND_MAP, the same shape create-workflow, transition, and chat already used.

That exposed a rendering bug — a commandless intent with autoRun produced a line reading Running automatically``, empty backticks and all. formatResult now branches on whether a command string exists, so command-backed intents keep their existing output byte-for-byte and commandless ones read "Routing automatically (no command needed)".

Deciding what discovery auto-run should mean now that no command backs it is design work for a later change, not this one.

Reference sweep

Nineteen files carried prose telling users to run the removed commands: runtime hint strings in the status and setup tools, the idle guidance in phase-context.ts, five command docs, eight reference documents, and the planner agent.

Where a doc said "run /goop-discuss", it now describes stating your goal in prose. Where it said "run /goop-quick", the option is removed rather than replaced, since quick mode is being retired.

This also swept prose deferred from #287: the ### Validators section in references/enforcement-system.md documenting deleted functions, the Factory-pattern example in references/architecture-design.md, and the validation-contract gate references in the planner agent, renamed to "Requirements-Completeness Gate (MH15)" consistently across all three sites.

The self-edit carve-out in references/dispatch-patterns.md was removed rather than reworded. It described a quick-mode exception that was never code-enforced — orchestrator-enforcement.ts denies every recognized orchestrator implementation write with no such exception. That was confirmed against the hook, not assumed.

Verification

typecheck   clean
tests       2507 pass, 0 fail, 7898 expect() calls, 123 files
lint        7 errors, 17 warnings — byte-identical to main's pre-existing baseline
commands/   7 files

The suite goes 2509 → 2507. Both removed tests come from real-prompts.test.ts generating one it() per command file; 9 files became 7. No test file was added or removed, and no test body was deleted.

All five commits were checked out individually and run: b31d7de at 2509/0, the remaining four at 2507/0. The PR history contains no red commit.

The acceptance check for stale references returns zero hits across commands/, references/, and agents/, and zero non-comment hits in src/. The thirteen surviving matches are all comments — historical byte-delta entries in the prompt-audit log, and explanatory notes on the deliberate empty command mapping and its negative assertions.

Not in scope

The quick task mode still exists in TASK_MODES and mode detection. Only the command was removed here; the mode is retired later, when mode and depth are absorbed into the effort dial.

hffmnnj added 5 commits August 3, 2026 17:54
…ommands

The goop-discuss and goop-quick slash commands are being removed (next
commit), but the underlying discovery and small-fix intents must keep
working: the discuss *phase* survives, and the classifier still needs to
recognize both intents.

Map discuss/quick to an empty command string (the same shape as
create-workflow/transition/chat) instead of pointing at commands that no
longer exist. The orchestrator will act on discovery intent via prompt
inference in a later wave; until then the intent is preserved without a
backing command.

Requirement A2 (preserve the phase). Five-phase invariant unedited.
Delete commands/goop-discuss.md and commands/goop-quick.md. The discuss
*phase* survives in the state machine (WORKFLOW_PHASES, VALID_TRANSITIONS,
phase-context discuss block, five-phase invariant) — only the two slash
commands are retired.

Update every site that counts or enumerates commands so the registry no
longer offers them:
- slashcommand KEPT_COMMANDS: 9 -> 7
- real-prompts EXPECTED_COMMAND_FILES: 9 -> 7
- resolver pointer test: 24 -> 22 prompt files (15 agents + 7 commands)
- prompt-audit: commands 9 -> 7 files, 26318 -> 19259 bytes,
  totalAbsoluteHits 308 -> 288 (-20 from the two deleted docs)

Requirement A1 (remove commands). The orchestrator will infer discovery
intent via prompt inference in a later wave; prose mentions of
/goop-discuss across remaining command/reference/agent docs and tool UX
strings are deferred to the prose sweep.
The /goop-discuss slash command was removed but runtime UX strings in
goop-status, goop-setup, and the idle phase-enforcement MUST-DO still
told users to run it. Reword each to describe stating the goal in prose
and letting the orchestrator route it. The status formatter now renders
the Command field without backticks when it is not a slash command, so
the idle guidance reads naturally.

Also fixes goop_infer_intent's formatResult: when autoRun is true on a
commandless intent (discuss/quick now map to the empty string),
autoRunText previously rendered an empty pair of backticks. It now
renders a sensible 'Routing automatically' line. Command-backed intents
are unchanged.
The /goop-discuss and /goop-quick slash commands were removed but the
remaining seven command docs still told users to run them. Reworded
every mention so discovery entry is described as stating the goal in
prose (which the orchestrator routes into the interview), and quick-
mode pointers are dropped rather than given a invented replacement.

goop-help loses the two retired table rows and gains a short 'Starting
a workflow' note; goop-status's suggested-commands table points idle
and accepted states at prose entry; goop-setup's banner and next-step
describe the goal in prose; goop-plan drops the /goop-discuss
alternative and renamed its 'Validation-contract gate' heading to
'Contract gate' to disambiguate from the deleted validation-contract
module; goop-accept's next-step describes the next milestone in prose.

prompt-audit commands.bytes constant updated 19,259 -> 19,455 (+196);
no absolute-language keywords changed, so totalAbsoluteHits stays 288.
…ract prose

The /goop-discuss and /goop-quick slash commands and the validation-
contract code module were all removed, but references and one agent
still pointed at them.

Reference sweep: phase-gates.md drops /goop-quick from the discovery
bypass row; core-protocol.md rewords the boot-sequence discovery entry
and drops the deleted-file self-edit clause from the quick Task Mode
row (the quick mode itself survives in TASK_MODES/mode-detection);
dispatch-patterns.md removes the Quick-mode self-edit carve-out that
cross-referenced the deleted commands/goop-quick.md and was never
code-enforced (orchestrator-enforcement blocks impl writes uncondi-
tionally); discovery-interview.md and dogfooding.md reword discovery
entry to prose; enforcement-system.md removes the deleted-code
Validators subsection (validateWriteOperation/validatePhaseTransition)
and the /goop-discuss command-processor row; architecture-design.md
swaps the validation-contract-gate Factory example for the live tool
factories.

agents/goop-planner.md renames 'Validation-Contract Gate (MH15)' to
'Requirements-Completeness Gate (MH15)' to disambiguate from the
deleted code module, with its two cross-references updated.

prompt-audit constants updated: agents.bytes 83,373 -> 83,405,
references.bytes 164,111 -> 163,423; totalAbsoluteHits stays 288 and
agents.boldSpans stays 137 (no absolute keywords or bold spans moved).
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