Fabriq
Features

Working with the Agent During a Feature

Guide the agent, inject context, review proposals, and intervene when needed.

The agent is working — but it's not a black box. Fabriq gives you several ways to stay in control, provide guidance, and intervene when things go off track.

Before the feature starts: inject context

An agent is only as good as its context. Before creating a feature — or early in the Analysis stage — you can inject project knowledge to improve the agent's output.

What you can inject:

  • runtime-context.md — project structure, architecture decisions, coding conventions, relevant docs
  • Cognitive envelope — extracted knowledge from CDR scans (behaviors, rules, patterns)

How to inject:

  1. From the Agent panel in the Workbench, click Inject Context
  2. Select the context sources to include
  3. Fabriq sends them to the agent via ACP

When to re-inject:

  • After major context changes (new architecture decisions, updated specs)
  • If the agent seems confused or makes incorrect assumptions
  • When starting a complex feature that spans multiple areas

Full guide: Injecting Context

During implementation: the confirm/reject loop

As the agent writes code, every action surfaces as a confirmation prompt. This is your primary interaction point.

Reading a confirmation prompt

Action:    Write file
Target:    repos/my-app/src/components/SearchBar.tsx
Lines:     +120 lines (new file)

┌─ Preview ──────────────────────────────────────────┐
│  export function SearchBar() {                     │
│    const [query, setQuery] = useState('');         │
│    ...                                             │
│  }                                                 │
└────────────────────────────────────────────────────┘

[Approve] [Reject] [Skip]

When to approve

  • The file looks correct and follows your project's patterns
  • The line count matches expectations
  • The change is in the right dimension (feature worktree)

When to reject

  • Wrong approach — the agent should try a different solution
  • Wrong file targeted — the change belongs elsewhere
  • Unnecessary scope — the agent is modifying files it shouldn't

When you reject, optionally leave a message:

"Use the existing debounce utility instead of writing a new one."

The agent receives this and adjusts its approach.

When to skip

  • You want to see more of the agent's work before deciding
  • You need to check something before approving
  • The action isn't urgent — approve it in batch at review time

Intervening mid-work

Sometimes the agent needs active guidance.

SituationWhat to do
Agent is going in the wrong directionWrite a message in the Workbench chat: "Actually, let's use a different approach — try this instead..."
Agent asks a questionRespond directly. The agent pauses and waits for your input.
Agent gets stuck (looping, making the same mistake)Intervene with clear direction. If needed, reject its recent work and point it at the right approach.
You want to pause the featureClose the Workbench — the agent stops automatically. Reopen when you're ready to continue.
You want to cancel entirelyFeature Settings → Cancel Feature. The worktree is cleaned up (you can recover from git if needed).

Reading the activity log

The activity log is your real-time window into what the agent is doing:

✓ Created worktree from main                    ← Just finished
✓ Read project structure (48 files)             ← Done
✓ Found existing Button component               ← Agent discovery
⏳ Writing src/components/SearchBar.tsx          ← In progress
! Confirm: Write 65 lines to SearchBar.tsx?     ← Waiting on you
  • ✓ — completed actions
  • ⏳ — current action with progress indicator
  • ! — awaiting your confirmation
  • ✗ — action failed (agent will retry or adjust)

The changes panel

As files are created and modified, they appear in the Changes panel:

┌─ Changes ─────────────────────────────────────────┐
│  + src/components/SearchBar.tsx          (new)    │
│  ± src/pages/Products.tsx               (+12)    │
│  ± src/styles/search.css                 (new)    │
└────────────────────────────────────────────────────┘

This gives you a running summary of what's been touched so far. Use it to:

  • Spot unexpected changes early
  • Track scope creep ("the agent has modified 15 files for a 'small change'")
  • Know what to focus on during review

Pro tips

  • Review incrementally: Don't wait until the end. Check confirmation prompts as they appear — catching issues early saves the agent from building on a wrong foundation.
  • Be specific in rejections: "Use the existing debounce utility in src/utils/debounce.ts" is more useful than "This approach is wrong."
  • Inject context early: The most common reason for agent mistakes is missing context. Set it up before the feature starts.
  • The agent remembers your feedback across the feature: A rejection in the first hour shapes the agent's behavior for the rest of the feature.

Next steps

Edit on GitHub

Last updated on

On this page