Skip to content

Add support for multiple slash command identifiers#8943

Merged
pelikhan merged 5 commits into
mainfrom
copilot/add-multiple-slash-commands
Jan 4, 2026
Merged

Add support for multiple slash command identifiers#8943
pelikhan merged 5 commits into
mainfrom
copilot/add-multiple-slash-commands

Conversation

Copilot AI commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Add Multiple Slash Command Support ✅

Summary

Successfully implemented full support for multiple identifiers in the on.slash_command.name field. Workflows can now be triggered by multiple slash command names, and the matched command is available as needs.activation.outputs.slash_command.

Completed Work

  • Update JSON schema to allow array of command names in slash_command.name
  • Modify extractCommandConfig() to handle both single string and array of strings
  • Update command matching logic to check against all provided command names
  • Add slash_command output to activation job containing the matched command
  • Update speckit.dispatcher workflow to use all speckit commands (except execute)
  • Fix compilation errors and build successfully
  • Fix all test failures
  • Recompile all workflows
  • Test with example workflow
  • Remove legacy GH_AW_COMMAND support

Key Changes

1. Schema Updates

  • slash_command.name and deprecated command.name now accept string or array of strings
  • Example: name: ["cmd.add", "cmd.remove"]

2. Command Matching

  • JavaScript check_command_position.cjs checks all commands with OR logic
  • Outputs the matched command identifier
  • Removed legacy support for GH_AW_COMMAND (compiler always generates GH_AW_COMMANDS)

3. Activation Output

  • New slash_command output contains the matched command identifier
  • Available as needs.activation.outputs.slash_command in workflow content

4. Speckit Dispatcher Update

  • Now supports 10 commands: speckit, speckit.specify, speckit.clarify, speckit.plan, speckit.tasks, speckit.implement, speckit.analyze, speckit.checklist, speckit.constitution, speckit.taskstoissues
  • Workflow content references /${{ needs.activation.outputs.slash_command }}

Example Usage

---
name: Multi-Command Handler
on:
  slash_command:
    name: ["cmd.add", "cmd.remove", "cmd.list"]
---

# Handler

Command used: /${{ needs.activation.outputs.slash_command }}

Testing

  • ✅ All unit tests pass
  • ✅ Speckit-dispatcher compiles with multiple commands
  • ✅ Test workflow compiles successfully
  • ✅ Commands correctly passed as JSON array
  • ✅ Matched command output works correctly
Original prompt

Add support for multiple identifier in the on.slash_command.name field:

on:
slash_command:
name: ["cmd.add", "cmd.remove"]

Additionally, the parsed slash command identifier should be available as the needs.activation.outputs.slash_command value

Update the speckit.dispatcher agentic workflow to support all the spec kit commands (aside from execute)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Changeset

  • Type: patch
  • Description: Added support for multiple identifiers in on.slash_command.name, exposed the matched command as needs.activation.outputs.slash_command, and updated speckit.dispatcher to support additional speckit commands.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 3 commits January 4, 2026 23:17
- Update JSON schema to allow array of command names in slash_command.name field
- Change Command field from string to []string in WorkflowData
- Update extractCommandConfig to handle string or array of command names
- Modify check_command_position.cjs to check multiple commands and output matched command
- Add slash_command output to activation job containing the matched command name
- Update all references to data.Command throughout the codebase
- Update speckit-dispatcher workflow to support all speckit commands except execute

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…tion

- Fix Command field assignment from empty string to nil
- Update buildEventAwareCommandCondition to accept []string instead of string
- Support checking multiple commands with OR logic
- Build succeeds and speckit-dispatcher compiles correctly with all commands

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Update test structs to use []string for Command field
- Fix command comparisons in tests to check array length and values
- All unit tests now pass
- Recompiled all workflows successfully

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for multiple identifiers in slash command Add support for multiple slash command identifiers Jan 4, 2026
Copilot AI requested a review from pelikhan January 4, 2026 23:33
const command = process.env.GH_AW_COMMAND;
const commandsJSON = process.env.GH_AW_COMMANDS;
// Legacy support for single command
const legacyCommand = process.env.GH_AW_COMMAND;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove legacy support, the compiler always generates GH_AW_COMMANDS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed legacy GH_AW_COMMAND support in commit b7be9e9. The script now only uses GH_AW_COMMANDS which the compiler always generates.

The compiler always generates GH_AW_COMMANDS, so legacy support for GH_AW_COMMAND is no longer needed.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan January 4, 2026 23:45
@pelikhan pelikhan added the smoke label Jan 4, 2026
@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS.

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot Playwright reports failed. Our correspondents are investigating the incident...

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@pelikhan pelikhan marked this pull request as ready for review January 4, 2026 23:47
@pelikhan pelikhan merged commit a3e2ab5 into main Jan 4, 2026
35 of 38 checks passed
@pelikhan pelikhan deleted the copilot/add-multiple-slash-commands branch January 4, 2026 23:48
@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results

✅ File Writing: Created test file successfully
✅ Bash Tool: Verified file content
❌ Safe Input gh Tool: safeinputs-gh tool not available

Status: FAIL (missing safeinputs-gh tool)

AI generated by Smoke Copilot Safe Inputs

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results for Copilot Engine

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP Testing (list PRs)
  • ✅ File Writing Testing (agent directory)
  • ✅ Bash Tool Testing (cat verification)
  • ✅ GitHub MCP Default Toolset Testing (get_me correctly unavailable)
  • ✅ Cache Memory Testing (persistent cache write/read)
  • ✅ Web Fetch Testing (api.github.com)
  • ✅ Available Tools (all tools accessible)

Overall Status: ✅ PASS

cc @pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Latest merged PRs:

  • Add support for multiple slash command identifiers
  • Review and verify Copilot Go log parser token counting implementation
    Results: OpenAI curl blocked ✅ | GitHub MCP PR list ✅ | File write/read ✅ | example.com blocked ✅
    Network: SANDBOXED
    Overall: PASS

AI generated by Smoke Codex Firewall

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

✅ Smoke Test Results (Copilot Engine - No Firewall)

All tests passed successfully:

AI generated by Smoke Copilot No Firewall

github-actions Bot added a commit that referenced this pull request Jan 4, 2026
…puts

Updated documentation to reflect two new features merged on 2026-01-04:

1. Multiple slash command identifiers (#8943):
   - Documented array syntax for slash_command.name
   - Added needs.activation.outputs.slash_command output variable
   - Provided examples for command aliases and grouped handlers

2. Go language support in safe-inputs (#8941):
   - Added go: as fourth scripting option
   - Documented Go-specific syntax and standard library
   - Provided calculation and API call examples

🤖 Generated with [gh-aw](https://github.com/githubnext/gh-aw)

Co-Authored-By: Daily Documentation Updater <noreply@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants