Skip to content

feat(prd-intake): operator PRD checkboxes become loop work (the value lane #355 asks for) #370

Description

@linhdmn

Problem

The self-build loop ships loop plumbing because its deterministic lane is empty (#355), and there is no path at all from what the operator writes in docs/PRD.md to implemented work. Today a human PRD edit either (a) blocks the loop ([prd-fresh] … operator mid-edit, skipping iteration, internal/loopdriver/run.go:232) or (b) is ignored: the only PRD→work parser (pipeline.ParseBacklogItems) is reachable only from devagent task --pick, which the loop never calls (internal/loopdriver/dispatch.go:474 passes --prompt).

Requested change

A PRD intake step: an operator-authored open checkbox in docs/PRD.md becomes a queue row the next iteration claims.

  • internal/prdintake: parse - [ ] … items (heading context + indented sub-bullets as acceptance criteria), skipping fenced code blocks and struck/completed lines; deterministic id PRD-<sha8> so re-runs dedupe against the existing queue store.
  • Goal text must satisfy the dispatch contract (Goal: prefix, ≤120 words, internal/loopdriver/dispatch.go:450); the section body rides along as the queue task-PRD sidecar so the worker reads the real spec, not just the bullet.
  • devagent prd-intake [--dry-run] [--json] [--max N] [--issues] prints what it queued.
  • Loop wiring: intake runs at iteration head (after the PRD-currency gate, before claimQueueTask), SELFBUILD_PRD_INTAKE=0 disables.
  • Dispatch rider tells the worker to tick the source checkbox to - [x] in the same PR, so a shipped item never re-enters the lane.

Acceptance

  • A new - [ ] bullet committed to docs/PRD.md is enqueued and claimed by the next devagent loop iteration; running intake twice enqueues once.
  • - [x], struck, and code-fence examples are never queued.
  • Unit tests for the parser (context, nesting, fences, idempotent ids) and the ingest dedupe.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions