FE-705: Agent CLI capabilities and workflow documentation#132
FE-705: Agent CLI capabilities and workflow documentation#132lunelson wants to merge 41 commits into
Conversation
…e planning, for low-conflict
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Refactors the Reconciles surrounding design/archive docs (e.g., Reviewed by Cursor Bugbot for commit 1bcd5a7. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it. |
memory/PLAN.md and docs/archive/PLAN_HISTORY.md changes from this branch will land as a planning-only PR off main after Lu's #132 + #133 stack merges, per the planning-pr convention (known merge conflicts on planning docs + frontier-definitions migration triggers separate-PR recommendation). This keeps PR #134 code-only and conflict-free with Lu's stack. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code reviewFound 2 issues:
brunch/scripts/agent-probes/probe-runner.ts Lines 182 to 207 in 1bcd5a7
brunch/src/server/capability-registry.ts Lines 134 to 142 in 1bcd5a7 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
augment review |
🤖 Augment PR SummarySummary: This PR adds agent-facing CLI capability substrate and probe harness for the FE-705 frontier, plus reconciles surrounding design/planning docs and Code changes:
Documentation changes:
Technical Notes: The JSONL capability adapter drives the real Brunch interview flow through Brunch-owned contracts; the probe runner exercises this surface only through a JSONL client, maintaining the import boundary that probe code must not import DB/product handlers directly. 🤖 Was this summary useful? React with 👍 or 👎 |
| throw new CapabilityDispatchError(`Specification ${chat.specification_id} not found`, 'handler_failed'); | ||
| } | ||
|
|
||
| const currentPhase = state.workflow.phases.grounding.status === 'closed' ? 'design' : 'grounding'; |
There was a problem hiding this comment.
This currentPhase fallback only considers grounding vs design, but the workflow has four phases (grounding, design, requirements, criteria). If grounding is closed and the spec is in requirements or criteria, the idle-no-frontier phase will still report design. Consider reusing the existing getCurrentWorkflowPhase from src/shared/phase-close.ts or iterating workflowPhaseOrder to find the first unclosed phase.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| simulatedUserEvents, | ||
| turnBudget, | ||
| }: ProcessBackedProbeOptions): Promise<ProbeRunResult> { | ||
| const workspaceCwd = mkdtempSync(join(tmpdir(), 'brunch-probe-workspace-')); |
There was a problem hiding this comment.
The temp workspace directory created by mkdtempSync is never cleaned up in runProcessBackedProbe. The finally block only calls spawned.endStdin() but never removes workspaceCwd. Tests manually rmSync the returned result.workspaceCwd, but production callers like packaged-smoke.ts do not, leaking a /tmp/brunch-probe-workspace-* directory on every probe run.
Severity: medium
Other Locations
scripts/agent-probes/packaged-smoke.ts:36
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| if (!turn) { | ||
| throw new CapabilityDispatchError(`Turn ${input.turnId} not found`, 'handler_failed'); | ||
| } | ||
| if (turn.chat_id !== chat.id || turn.specification_id !== chat.specification_id) { |
There was a problem hiding this comment.
turn.chat_id may be null for pre-multi-chat turns (the column is nullable per the schema). When turn.chat_id is null, the condition turn.chat_id !== chat.id is always true (since null !== number), causing the guard to reject legitimate turns that belong to the spec but were created before chat association was backfilled. Consider also checking turn.specification_id === chat.specification_id as a sufficient ownership proof when chat_id is null.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Summary
Adds the FE-705 agent-facing CLI capability substrate and probe harness, then reconciles the surrounding design/planning docs and
ln-*skill workflow so the branch is reviewable as one implementation + methodology update.What changed
scripts/agent-probes/with process-backed probe runner coverage, fixture-candidate validation, packaged smoke helpers, and model-backed LLM user policy seams.memory/PLAN.mdand addedmemory/SPEC_RESTRUCTURE.mdto reduce planning conflicts and clarify the new frontier/sequencing model.d3k,ln-diagnose, andln-prototype; refinedln-build,ln-scope,ln-review,ln-sync, andplanning-pr; added the pre-release change posture toAGENTS.md.docs/design/ln-skills/so skill design notes are separate from executable skills and product specs.Validation
npm run fixpasses with the existing unrelated unused-variable warnings in interview-view tests.