Skip to content

[plan] Create spec-kit execute agentic workflow #5769

Description

@github-actions

Objective

Create an agentic workflow (.github/workflows/spec-kit-execute.md) that automates the spec-kit implementation process, reading specifications from .specify/specs/ and executing pending work.

Context

The workflow should mimic the spec-kit /speckit.implement command but run as an automated GitHub Actions workflow. It needs to:

  • Detect pending specifications that haven't been implemented
  • Execute the task breakdown systematically
  • Handle dependencies and parallel execution
  • Report progress and errors

Implementation Steps

  1. Create workflow file .github/workflows/spec-kit-execute.md:

    ---
    name: Spec-Kit Execute
    description: Execute pending spec-kit specifications
    
    on:
      schedule:
        - cron: '0 */6 * * *'  # Every 6 hours
      workflow_dispatch:
    
    engine: copilot
    
    tools:
      github:
        mode: remote
        toolsets: [default]
    ---
    
    # Execute Spec-Kit Specifications
    
    Your task is to find and execute pending specifications in the `.specify/specs/` directory.
    
    ## Process
    
    1. Check `.specify/specs/` for feature directories
    2. For each feature directory:
       - Check if `spec.md` exists
       - Check if `plan.md` exists
       - Check if `tasks.md` exists
       - Check if implementation is complete (look for completion markers)
    3. For features with complete spec/plan/tasks but incomplete implementation:
       - Read the constitution from `.specify/memory/constitution.md`
       - Read the specification from `spec.md`
       - Read the implementation plan from `plan.md`
       - Read the task breakdown from `tasks.md`
       - Execute tasks in order, respecting dependencies
       - Mark parallel tasks with [P] for concurrent execution where possible
       - Create implementation files according to the plan
       - Run tests and validation after each user story
    4. Report on what was implemented
    5. Create a pull request with the implementation
    
    ## Guidelines
    
    - Follow the constitution principles strictly
    - Respect task dependencies and ordering
    - Test incrementally after each user story
    - Handle errors gracefully and report issues
    - Create clear commit messages for each logical unit of work
  2. Compile the workflow:

    make recompile
  3. Test the workflow:

    • Create a test specification in .specify/specs/001-test-feature/
    • Run the workflow manually via workflow_dispatch
    • Verify it detects and processes the specification

Files to Create/Modify

  • Create: .github/workflows/spec-kit-execute.md
  • Create: .github/workflows/spec-kit-execute.lock.yml (via make recompile)

Acceptance Criteria

  • Workflow file exists and compiles successfully
  • Workflow can be triggered manually via workflow_dispatch
  • Workflow correctly detects pending specifications
  • Workflow reads constitution, spec, plan, and tasks
  • Workflow executes tasks in correct order
  • Workflow creates pull requests for implementations
  • Error handling reports issues clearly

References

AI generated by Plan Command for #5761

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions