Skip to content

Project overview — "Generate spec" CTA seeds the first requirements turn from the stored create prompt #150

Description

@hevayo

Problem

Creating a project (ADR-0005) provisions a repo but generates nothing: CreateProject only provisions the OC project + repo + webhook — it never uses the prompt to start derivation (the contract's prompt wording oversells here). So on the overview, the Spec card in its not-generated state ("Start here") only opens an empty Spec view, and the build prompt the user typed at create time is thrown away — they'd have to re-type their idea into the agent chat to get anywhere.

Users

Developer/User (PRD persona) — just described what they want to build and expects the platform to turn it into a spec.

Experience walkthrough

  1. User creates a project with a prompt. The console saves the prompt to localStorage, keyed to the project.
  2. On the overview, the Spec card reads status. Because hasSpec: false, the card (in this state only) drops the whole-card navigation and shows a prominent Generate spec button.
  3. User clicks Generate spec → navigate to the Spec view and auto-send a room turn wrapping the stored prompt: "Generate a complete requirements specification (requirements/requirements.md) for this project based on: <prompt>." (Generic instruction if no stored prompt.)
  4. The agent joins the room and writes requirements/requirements.md live; the reactive spec list shows it appear, the chat panel narrates.
  5. Once requirements commit (hasSpec: true), the card returns to the normal spec-status states.

Scope

In:

  • Persist the create-project prompt to localStorage (keyed by project) on successful create.
  • Spec card: in the hasSpec === false state, plain card + a single Generate spec button (no whole-card click).
  • The button navigates to the Spec view and auto-sends a room turn seeded with the wrapped stored prompt (generic instruction as fallback).

Out (explicitly):

Contract changes

None. Composes POST /projects, GET /projects/{p}/status (hasSpec), the room-scoped agent turn (#86 ph4), + localStorage. No BE handshake. A future BE in-flight signal to guard duplicate generation is tracked in #151.

States to design

  • Spec card — hasSpec:false: plain card + Generate spec button.
  • Spec card — generated: unchanged whole-card states ("In collaboration" / "Awaiting your review" / "vN published" / "Derivation failed").
  • No stored prompt: CTA still fires with a generic instruction.
  • Spec view on arrival: the turn auto-starting → live writing.

Decisions

Resolved in grilling — see the decisions comment. Deferred re-trigger guard tracked in #151.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    consoleAEP Console (apps/console) workfeatureFeature issue: body = feature doc, decisions land as comments (console flow ADR-0001)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions