# /goal: Building big features with dcode

## Executive summary

The video introduces `dcode`, an open-source, model-agnostic coding agent, and its new `/goal` command. This feature enables long-running, persistent tasks by wrapping the standard agent loop in a 'goal loop.' Instead of relying on single-shot requests for large features (like meaty PRs), `/goal` establishes visible acceptance criteria that guide the agent's work over hours. The demonstration shows how to use this mechanism to add native browser control to `dcode`, allowing the user to steer, amend requirements, and inspect progress using tools like LangSmith tracing.

## Key takeaways

- The /goal Command: The `/goal` command provides a long-running, persistent objective for agents tackling large tasks. It shifts alignment work upfront, making it visible and allowing mid-run tailoring of requirements (3:46).
- Goal Loop Mechanism: The goal loop wraps the agent's inner action loop. The outer loop continuously checks if actions satisfy the durable acceptance criteria; if not, the goal remains active until evidence satisfies all requirements (0:17).
- Steering and Amending Goals: Users can inspect the current state with `/goal show` or update/correct requirements mid-run using `/goal amend`, which interprets the message within the context of the active goal (3:46).

## Technical details

- dcode Agent Architecture: `dcode` is an open-source, model-agnostic coding agent designed for controlling development workflows. It uses a 'goal loop' to manage large features (0:17).
- Acceptance Criteria Management: Initial requests are converted into durable acceptance criteria. Users can manually edit these criteria using the `edit criteria` function, ensuring all requirements are visible and tracked (2:15).
- Debugging Workflows: LangSmith tracing (`/trace`) allows users to peek under the hood of the agent's execution, providing a detailed breakdown of inputs and work associated with the goal prompt for debugging (4:51).
- Feature Implementation: The demonstration successfully added native browser control to `dcode` using Python Playwright API, enabled via a specific browser flag (`/browser`) and completing all tests (7:01).

## Practical implications

- The `/goal` command significantly reduces human-in-the-loop overhead for substantial development tasks by maintaining persistent context and visible requirements.
- Because `dcode` is open source, users can modify the agent's harness itself to implement complex features like native browser control (7:01).
- Using a goal loop ensures that even if an initial solution fails or misses edge cases, the agent remains active until all defined acceptance criteria are met.

## Topics

Coding Agents, AI Development Workflow, LangChain, Open Source AI, Documentation, LangSmith, LangChain Academy

Source: https://www.youtube.com/watch?v=-s6rYWX8VaY
