Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 7, 2025

Initializes .specify/ with templates and directory structure for spec-driven development workflow. Scripts already existed and were executable; this adds the missing template files they reference. Additionally creates a spec-kit command dispatcher system to help users navigate the workflow.

Changes

  • Templates created (spec-template.md, plan-template.md, tasks-template.md)

    • Adapted from spec-kit with gh-aw specifics: Go 1.25, cmd/gh-aw/, pkg/ structure, co-located *_test.go files
    • Scripts in .specify/scripts/bash/ already reference these paths ($REPO_ROOT/.specify/templates/)
  • Directory structure

    • .specify/templates/ - Houses the three template files
  • Spec-kit dispatcher system (NEW)

    • .github/agents/speckit-dispatcher.agent.md - Custom agent for routing spec-kit commands
    • .github/workflows/speckit-dispatcher.md - Agentic workflow responding to /speckit command
    • Analyzes user intent and repository state to guide users to appropriate commands
    • Supports all spec-kit commands: specify, plan, tasks, implement, clarify, analyze, checklist, constitution, taskstoissues

Template adaptations

plan-template.md: Go 1.25, Cobra CLI, gh-aw constitution checks (test-driven, console formatting, workflow compilation)

tasks-template.md: Go test conventions noted (*_test.go co-located with source, not separate tests/ dir)

Constitution and bash scripts were already in place and functional.

Spec-kit dispatcher usage

Users can now type /speckit <request> on any issue or PR comment:

  • /speckit I want to add user authentication → Guides to /speckit.specify with example
  • /speckit what's next? → Analyzes current state and suggests next command
  • /speckit help → Shows overview of available commands

The dispatcher checks repository state, understands user intent, and provides specific guidance with command examples.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Set up spec-kit directory structure and templates</issue_title>
<issue_description>## Objective

Initialize the .specify/ directory structure with all necessary templates, scripts, and configuration files to enable Spec-Driven Development in this repository.

Context

Spec-kit uses a specific directory structure under .specify/ that contains:

  • Project constitution and memory
  • Bash scripts for workflow automation
  • Templates for specifications, plans, and tasks
  • Agent context files

Reference: spec-kit templates

Implementation Steps

  1. Create .specify/ directory structure:

    .specify/
    ├── memory/
    │   └── constitution.md
    ├── scripts/
    │   ├── check-prerequisites.sh
    │   ├── common.sh
    │   ├── create-new-feature.sh
    │   ├── setup-plan.sh
    │   └── update-agent-context.sh
    ├── specs/
    │   └── .gitkeep
    └── templates/
        ├── plan-template.md
        ├── spec-template.md
        └── tasks-template.md
    
  2. Adapt scripts from spec-kit bash scripts:

    • Download and adapt check-prerequisites.sh for gh-aw environment
    • Download and adapt common.sh with gh-aw specific paths
    • Download and adapt create-new-feature.sh for feature branch management
    • Download and adapt setup-plan.sh for plan initialization
    • Download and adapt update-agent-context.sh for agent instructions
  3. Create template files:

    • spec-template.md - Feature specification template
    • plan-template.md - Technical implementation plan template
    • tasks-template.md - Task breakdown template
  4. Create initial constitution:

    • Create .specify/memory/constitution.md with gh-aw project principles
    • Include references to existing AGENTS.md and CONTRIBUTING.md
    • Define governance for technical decisions in gh-aw context
  5. Make scripts executable:

    chmod +x .specify/scripts/*.sh

Files to Create/Modify

  • Create: .specify/memory/constitution.md
  • Create: .specify/scripts/check-prerequisites.sh
  • Create: .specify/scripts/common.sh
  • Create: .specify/scripts/create-new-feature.sh
  • Create: .specify/scripts/setup-plan.sh
  • Create: .specify/scripts/update-agent-context.sh
  • Create: .specify/templates/spec-template.md
  • Create: .specify/templates/plan-template.md
  • Create: .specify/templates/tasks-template.md
  • Create: .specify/specs/.gitkeep

Acceptance Criteria

  • .specify/ directory exists with proper structure
  • All scripts are executable and adapted for gh-aw
  • Templates match spec-kit format but reference gh-aw specifics
  • Constitution reflects gh-aw project principles
  • Scripts reference correct paths and tools in gh-aw context

References

AI generated by Plan Command for #5761

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 7, 2025 15:14
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Create .specify/templates/ directory
- Add spec-template.md from spec-kit (adapted for gh-aw)
- Add plan-template.md from spec-kit (adapted for gh-aw)
- Add tasks-template.md from spec-kit (adapted for gh-aw)
- Create .specify/specs/ directory with .gitkeep
- All scripts already in place and executable
- Constitution already exists and properly configured

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Update plan-template.md to use Go 1.25 (current version)
- Update tasks-template.md to clarify Go test conventions (*_test.go)
- Address code review feedback

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up spec-kit directory structure and templates Add spec-kit templates and directory structure Dec 7, 2025
Copilot AI requested a review from mnkiefer December 7, 2025 15:26
@pelikhan
Copy link
Contributor

pelikhan commented Dec 7, 2025

@copilot create a copilot custom agent (.agent.md) that is prompted to dispatch work to the known spec kit commands in the repo (plan, ...).

Create an agentic workflow that imports that agent and responds to the "/speckit" command on issues/issue comments

- Create speckit-dispatcher.agent.md for spec-kit command routing
- Create speckit-dispatcher.md workflow responding to /speckit command
- Agent understands user intent and dispatches to appropriate commands
- Workflow provides guidance on spec-driven development workflow
- Supports all spec-kit commands: specify, plan, tasks, implement, etc.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 7, 2025

@copilot create a copilot custom agent (.agent.md) that is prompted to dispatch work to the known spec kit commands in the repo (plan, ...).

Create an agentic workflow that imports that agent and re...

Created the spec-kit dispatcher system in commit 0199cce:

Custom Agent: .github/agents/speckit-dispatcher.agent.md

  • Routes user requests to appropriate spec-kit commands (specify, plan, tasks, implement, clarify, analyze, checklist, constitution, taskstoissues)
  • Provides workflow guidance and context-aware recommendations

Agentic Workflow: .github/workflows/speckit-dispatcher.md

  • Responds to /speckit command on issues and issue comments
  • Analyzes current repository state and user intent
  • Provides specific command guidance with examples

Usage Examples:

  • /speckit I want to add user authentication → Guides to /speckit.specify with example
  • /speckit what's next? → Checks current state, suggests next command
  • /speckit help → Shows workflow overview and available commands

The workflow is compiled and ready to use!

Copilot AI and others added 2 commits December 7, 2025 18:49
- Use find with -exec for safer file reading
- Handle cases where no spec files exist
- Address code review feedback on bash command robustness

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Spec-kit uses root specs/ directory, not .specify/specs/
- Remove .specify/specs/.gitkeep that was incorrectly created
- The scripts and workflows correctly reference specs/ at repo root

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add spec-kit templates and directory structure Add spec-kit templates, directory structure, and dispatcher workflow Dec 7, 2025
Copilot AI requested a review from pelikhan December 7, 2025 18:54
@pelikhan pelikhan marked this pull request as ready for review December 7, 2025 19:03
@pelikhan pelikhan merged commit 6ea6eb0 into main Dec 7, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/setup-spec-kit-directory branch December 7, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Set up spec-kit directory structure and templates

3 participants