Skip to content

Add Command Code integration to spec-kit - #4019

Merged
mnriem merged 2 commits into
github:mainfrom
Angelthebestone:feat/command-code-integration
Aug 10, 2026
Merged

Add Command Code integration to spec-kit#4019
mnriem merged 2 commits into
github:mainfrom
Angelthebestone:feat/command-code-integration

Conversation

@Angelthebestone

Copy link
Copy Markdown
Contributor

Summary

Adds Command Code as a first-class built-in integration so Spec Kit can be installed into Command Code with:

specify init my-project --integration command-code

Command Code discovers agent skills from .commandcode/skills/<name>/SKILL.md (project) or ~/.commandcode/skills/ (personal), which matches the speckit-<name>/SKILL.md layout Spec Kit's SkillsIntegration base class generates. Skills are invoked in chat as $speckit-<command> (dollar-prefix chat invocation, like Codex/ZCode).

Changes

  • New integration class CommandCodeIntegration (src/specify_cli/integrations/command_code/__init__.py), a SkillsIntegration subclass:
    • Installs skills into .commandcode/skills/
    • requires_cli: True (CLI is cmdc/command-code on PATH; supports -p/--output-format json dispatch)
    • Declared multi-install safe (static, isolated .commandcode/ agent root), so it can coexist with Claude Code, Codex, etc.
  • Registry: registered in _register_builtins() (import + _register()) and added to integrations/catalog.json.
  • Invocation style: added command-code to DOLLAR_SKILLS_AGENTS so specify init next-steps and hook references render $speckit-*.
  • Tests: tests/integrations/test_integration_command_code.py reuses the SkillsIntegrationTests mixin (setup/teardown, file inventory, frontmatter, uninstall round-trip, multi-install) plus a $speckit-* next-steps invocation test; command-code added to ALL_INTEGRATION_KEYS in test_registry.py.
  • Docs: README note and docs/reference/integrations.md (supported-agents table + multi-install-safe table).

Verification

  • pytest tests/integrations/test_integration_command_code.py31 passed
  • pytest tests/integrations/test_registry.py664 passed (includes multi-install-safe contracts)
  • Full tests/integrations suite — all files green (only pre-existing skips/warnings)
  • Manual smoke test:
specify init smoke-test-proj --integration command-code --script sh

Produced .commandcode/skills/speckit-{analyze,checklist,clarify,constitution,converge,implement,plan,specify,tasks,taskstoissues}/SKILL.md and next-steps showing $speckit-constitution, $speckit-specify, etc. (no /speckit.constitution).

Adds `command-code` as a built-in skills-based integration so Spec Kit can
be installed into Command Code. Command Code loads agent skills from
`.commandcode/skills/speckit-<name>/SKILL.md` and invokes them in chat as
`$speckit-<command>`.

- New `CommandCodeIntegration` (SkillsIntegration) writing to
  `.commandcode/skills/`; declared multi-install safe (static, isolated
  agent root).
- Register in `_register_builtins()` and the integration catalog.
- Add `command-code` to `DOLLAR_SKILLS_AGENTS` so next-steps guidance
  renders `$speckit-*` invocations.
- Tests: reuse `SkillsIntegrationTests` mixin plus a dollar-invocation
  next-steps test; registry completeness updated.
- Docs: README and docs/reference/integrations.md (supported agents +
  multi-install-safe table).

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Assisted-by: Command Code (autonomous)
Copilot AI balanced review requested due to automatic review settings August 8, 2026 09:25
@Angelthebestone
Angelthebestone requested a review from mnriem as a code owner August 8, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (6)

tests/integrations/test_integration_command_code.py:47

  • These assertions expect an invocation Command Code does not use. Installed skills are invoked from its slash menu, so this should verify /speckit-constitution and reject the dollar form.
        assert result.exit_code == 0
        assert "$speckit-constitution" in result.output
        assert "/speckit.constitution" not in result.output

src/specify_cli/_invocation_style.py:15

  • Command Code exposes installed skills as slash commands (/speckit-<name>), not dollar commands. Classifying it here makes init guidance, extension hook references, and inherited CLI dispatch emit an invocation the agent will not recognize. Move it to the slash-skills set instead.
DOLLAR_SKILLS_AGENTS: frozenset[str] = frozenset({"codex", "zcode", "command-code"})

src/specify_cli/integrations/command_code/init.py:5

  • This documents the wrong invocation syntax. Command Code lists installed skills in its slash menu and invokes this skill as /speckit-<name>, so the module documentation should not advertise a dollar prefix.
(project) or ``~/.commandcode/skills/`` (personal). Skills are invoked in chat
with ``$speckit-<name>``.

tests/integrations/test_integration_command_code.py:14

  • The test description codifies the same incorrect dollar-prefix behavior. Command Code uses slash invocations for installed skills, unlike Codex/ZCode.

This issue also appears on line 45 of the same file.

    """Command Code renders $speckit-* chat invocations (like Codex/ZCode)."""

docs/reference/integrations.md:17

  • The supported-agents table advertises the wrong invocation syntax. Command Code exposes installed skills as slash commands, so this entry should show /speckit-<command>.
| [Command Code](https://commandcode.ai/docs)                                          | `command-code`   | Skills-based integration; installs skills into `.commandcode/skills/` and invokes them as `$speckit-<command>` |

README.md:93

  • Command Code skills use /speckit-<command>, not the Codex-style dollar prefix. Also, every following quickstart example uses the generic slash-dot form, so this sentence needs to tell Command Code and Codex users how to translate those examples rather than sending them to unrecognized commands.
Launch your coding agent in the project directory. Most agents expose spec-kit as `/speckit.*` slash commands; Codex CLI and Command Code in skills mode use `$speckit-*` instead; GitHub Copilot CLI uses `/agents` to select the agent or address it directly in a prompt.
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@mnriem mnriem left a comment

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.

Please address test & lint errors

The runtime AGENT_CONFIG now includes command-code, but the GitHub issue
templates and the consistency test's expected key list were not updated,
failing test_issue_template_agent_lists_match_runtime_integrations.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Assisted-by: Command Code (autonomous)
Copilot AI review requested due to automatic review settings August 10, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (1)

tests/integrations/test_integration_command_code.py:14

  • The new test only exercises init next-step rendering. Adding this integration to DOLLAR_SKILLS_AGENTS also controls SkillsIntegration.build_command_invocation() and the $speckit-git-commit guidance injected into generated skills, while the existing regression test at tests/integrations/test_base.py:221 still parametrizes only codex and zcode. Please include command-code there (or add equivalent assertions here) so those runtime/generated-file paths are covered.
class TestCommandCodeInvocation:
    """Command Code renders $speckit-* chat invocations (like Codex/ZCode)."""
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@mnriem
mnriem merged commit 6aa9431 into github:main Aug 10, 2026
14 checks passed
@mnriem

mnriem commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

3 participants