Docs

Explore

The explore workflow helps you turn a vague idea into a concrete spec through a Socratic conversation. Instead of jumping straight to code, it asks focused clarifying questions, reads your codebase for context, and iterates until it has enough signal to write a detailed specification document.

Permission profile: issues-write — the agent can read your codebase, create issues, and post comments. It cannot push code or open PRs.

Pipeline

Context phase_0 Read context clone + explore Socratic questioning reply-gated loop (max 8) Synthesize spec write document Publish create issue user replies in thread

How the conversation works

The socratic phase uses a reply-gated loop — a new kind of interactive gate where the workflow pauses after each iteration and waits for any free-form reply in the same thread (not just an explicit "approve" command). When you reply, your answer is appended to a Q&A transcript and the next iteration runs with full context of everything discussed so far.

  1. The agent reads the context document it wrote during the clone phase
  2. It asks 1-3 focused clarifying questions
  3. The workflow pauses — your reply (in the same Slack thread or GitHub issue) resumes it
  4. The agent reads your answer + all prior Q&A, then either asks follow-up questions or declares READY
  5. When ready (or after 8 iterations), it moves to synthesis

You can say "we're done" or "just write it up" at any point to skip ahead to the spec draft.

Phases

1. Read context

Clones the target repository, explores the codebase, and writes a detailed context document at .lastlight/explore-{runId}/explore-context.md. This document captures architecture, key code excerpts, relevant patterns, and what's unclear — it's the reference for all subsequent phases so they don't have to re-explore the codebase from scratch.

2. Socratic questioning

An interactive loop (max 8 iterations) that asks clarifying questions grounded in the codebase. The agent reads the context doc and Q&A history, references specific code when helpful ("I see FooService handles this today — should the new feature extend it or replace it?"), and appends any new discoveries to the context doc.

3. Synthesize spec

Reads the accumulated context doc and Q&A transcript, then writes a structured specification to explore-spec.md. Includes problem statement, users, goals, non-goals, proposed design (referencing actual code paths), key files to modify, acceptance criteria, and open questions.

4. Publish

Publishes the spec as a new GitHub issue in the target repo. The issue link is posted back to the originating Slack thread or GitHub issue.

Triggers

  • Slack (natural language): "let's explore adding webhooks to cliftonc/lastlight" — the classifier detects EXPLORE intent and extracts the repo
  • Slack (explicit): explore cliftonc/repo or explore cliftonc/repo#42
  • GitHub comment: @last-light let's spec this out on an issue (classifier detects EXPLORE intent)
The explore workflow always requires a repo — the agent needs to clone it for code-grounded questions. If you don't mention a repo in your message, Last Light will ask you to include one.

State management

The Q&A transcript is stored in the workflow run's scratch column and survives harness restarts. Each explore session gets an isolated workspace directory (.lastlight/explore-{runId}) so concurrent sessions never overlap.