Skip to content

Headless Developer Pipeline: AI-assisted end-to-end lifecycle #32

@TheSethRose

Description

@TheSethRose

Summary

Implement a headless AI-assisted developer pipeline that handles the full task lifecycle through GitHub, from context ingestion to merge and cleanup.

Current behavior

  • Worker scripts exist for task grooming and execution in skills/task-manager/scripts (backlog-groomer.js, recurring-worker.js, review-worker.js).
  • Cron setup exists in docs/CRON-SETUP.md with worker orchestration patterns.
  • GitHub integration is available for issue sync and repo metadata in src/lib/github.ts and project sync routes.

Target behavior

  • A single, end-to-end workflow that can:
    • Ingest task context from the issue and comments.
    • Create and link a feature branch tied to the issue.
    • Execute autonomous changes with staged commits and conventional messages.
    • Open a pull request with an AI-generated summary and testing notes.
    • Track CI checks and report status updates.
    • Merge on approval and clean up branches.

Subtasks (all included in this issue)

  1. Context ingestion
    • Fetch issue title/body/comments and map into a structured task brief.
    • Store brief in work_notes for auditability.
  2. Isolated workspace
    • Create a feature branch per issue with a deterministic naming scheme.
    • Record branch name on the task or issue to prevent duplication.
  3. Autonomous development
    • Run edits in the project repo only (honor local_path/workspace_path).
    • Stage and commit with conventional commit messages.
    • Add progress notes via add-work-note.js.
  4. Automated submission
    • Create a PR via gh CLI with summary, scope, and test steps.
    • Link the PR back to the issue.
  5. CI/CD validation
    • Poll GitHub checks via gh or API until success or failure.
    • Post status updates to work_notes.
  6. Lifecycle resolution
    • Merge PR on approval and passing checks.
    • Close issue and delete branch.

Scope

  • Pipeline controller script or service, aligned with existing worker scripts.
  • Integration with gh CLI for branch/PR actions.
  • Safe retry and idempotency markers in work_notes.
  • Security guardrails: only act within the linked repo and branch.

Acceptance criteria

  • A single command can execute the full lifecycle for one issue.
  • Each stage records status in work_notes for traceability.
  • Branch creation, PR creation, CI monitoring, and merge are all automated with guardrails.
  • Re-running the pipeline does not duplicate PRs or branches.

Open questions

  • Preferred location for pipeline controller (scripts/ vs. skills/task-manager/scripts/)?
  • Required CI pass list or allowlist for merge?

References

  • skills/task-manager/scripts/recurring-worker.js
  • skills/task-manager/scripts/backlog-groomer.js
  • skills/task-manager/scripts/review-worker.js
  • docs/CRON-SETUP.md
  • development/worker-workflow.md
  • src/lib/github.ts
  • src/app/api/projects/[id]/sync/route.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions