Skip to content

feat: Add lingma support#2348

Open
WhiteGive-Boy wants to merge 7 commits intogithub:mainfrom
WhiteGive-Boy:add-lingma-support
Open

feat: Add lingma support#2348
WhiteGive-Boy wants to merge 7 commits intogithub:mainfrom
WhiteGive-Boy:add-lingma-support

Conversation

@WhiteGive-Boy
Copy link
Copy Markdown

Summary

Add built-in integration support for Lingma (通义灵码 by Alibaba) IDE.

Changes

New Integration: Lingma IDE

  • Integration class: LingmaIntegration (src/specify_cli/integrations/lingma/__init__.py)
    • Extends SkillsIntegration with .lingma/skills/speckit-<name>/SKILL.md layout
    • IDE-based (requires_cli: False), no CLI tool check required
    • Context file: .lingma/rules/specify-rules.md
  • Registry: Added import and _register() call in src/specify_cli/integrations/__init__.py
  • Catalog: Added lingma entry in integrations/catalog.json
  • Tests: Added tests/integrations/test_integration_lingma.py (26 tests, all passing)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new built-in Lingma (通义灵码) integration to Spec Kit so specify init / specify integration install can scaffold Lingma’s skills-based file layout and context rules.

Changes:

  • Introduces LingmaIntegration as a SkillsIntegration using .lingma/skills/speckit-<name>/SKILL.md plus .lingma/rules/specify-rules.md.
  • Registers the new integration in the built-in integration registry and catalog.
  • Adds a skills integration test suite entry for lingma.
Show a summary per file
File Description
src/specify_cli/integrations/lingma/__init__.py Implements the new Lingma integration (skills layout + context file + options).
src/specify_cli/integrations/__init__.py Registers LingmaIntegration in the built-in integration registry.
integrations/catalog.json Adds lingma to the built-in integration catalog metadata.
docs/reference/integrations.md Documents Lingma in the supported integrations table.
tests/integrations/test_integration_lingma.py Adds inherited skills integration tests for the new integration key/layout.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Comment thread src/specify_cli/integrations/lingma/__init__.py
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

src/specify_cli/integrations/lingma/init.py:29

  • LingmaIntegration doesn’t override options(), so it inherits the default []. This will fail SkillsIntegrationTests.test_options_include_skills_flag in the new test suite and also causes --integration-options="--skills" to be rejected by strict option validation. Add an @classmethod options() that declares the --skills flag (defaulting to True if that’s the intended behavior).
class LingmaIntegration(SkillsIntegration):
    """Integration for Lingma IDE."""

    key = "lingma"
    config = {
        "name": "Lingma",
        "folder": ".lingma/",
        "commands_subdir": "skills",
        "install_url": None,
        "requires_cli": False,
    }
    registrar_config = {
        "dir": ".lingma/skills",
        "format": "markdown",
        "args": "$ARGUMENTS",
        "extension": "/SKILL.md",
    }
    context_file = ".lingma/rules/specify-rules.md"
  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Comment thread src/specify_cli/integrations/lingma/__init__.py
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 27, 2026

Please address Copilot feedback

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

src/specify_cli/integrations/lingma/init.py:41

  • There’s trailing whitespace at the end of the file (spaces on an otherwise blank line). This can trip linters and creates noisy diffs; please remove the trailing spaces and ensure the file ends with a single newline.
        ]
        
  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment thread src/specify_cli/integrations/lingma/__init__.py
Comment thread integrations/catalog.json
Comment thread docs/reference/integrations.md
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 28, 2026

Please address Copilot feedback. If not applicable, please explain why

- Add blank line after __future__ import (PEP 8)
- Remove trailing whitespace at end of lingma/__init__.py
- Bump integrations/catalog.json updated_at timestamp
- Add Lingma to supported agent list in README.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 3

Comment thread README.md
```

The CLI will check if you have Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, Pi, Forge, Goose, or Mistral Vibe installed. If you do not, or you prefer to get the templates without checking for the right tools, use `--ignore-agent-tools` with your command:
The CLI will check if you have Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, Pi, Forge, Goose, Lingma, or Mistral Vibe installed. If you do not, or you prefer to get the templates without checking for the right tools, use `--ignore-agent-tools` with your command:
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

This sentence says the CLI checks whether “Lingma” is installed, but specify init/specify check only run tool detection for integrations where requires_cli is true (IDE-based agents like Lingma are explicitly skipped). Update this text to exclude Lingma or clarify that only CLI-based agents are checked unless --ignore-agent-tools is used.

Suggested change
The CLI will check if you have Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, Pi, Forge, Goose, Lingma, or Mistral Vibe installed. If you do not, or you prefer to get the templates without checking for the right tools, use `--ignore-agent-tools` with your command:
The CLI will check for supported CLI-based agents/tools such as Claude Code, Gemini CLI, Cursor CLI, Qwen CLI, opencode, Codex CLI, Qoder CLI, Tabnine CLI, Kiro CLI, Pi, Forge, Goose, or Mistral Vibe. If you do not have one of the required CLI tools installed, or you prefer to get the templates without checking for agent tools, use `--ignore-agent-tools` with your command:

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +41
@classmethod
def options(cls) -> list[IntegrationOption]:
return [
IntegrationOption(
"--skills",
is_flag=True,
default=True,
help="Install as agent skills",
),
]
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

LingmaIntegration subclasses SkillsIntegration, which always installs skills and doesn’t branch on a skills option. As written, --skills is a no-op and default=True is also not applied by _parse_integration_options() (defaults aren’t populated). Either remove this option (and adjust docs), or implement option parsing/default handling + conditional behavior so the flag actually changes something.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5
In the Specify CLI Lingma integration, explicit command support was deprecated
since v0.5.1; ``--skills`` defaults to ``True``.
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The module docstring says Lingma’s “explicit command support was deprecated since v0.5.1”, but this integration is being introduced in this PR and there’s no corresponding legacy Lingma command mode in the repo. Consider rewording to avoid implying a prior supported mode/version (e.g., state that Lingma is skills-only in spec-kit).

Suggested change
In the Specify CLI Lingma integration, explicit command support was deprecated
since v0.5.1; ``--skills`` defaults to ``True``.
In Specify CLI, the Lingma integration is skills-only, and ``--skills``
defaults to ``True``.

Copilot uses AI. Check for mistakes.
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 29, 2026

Please address Copilot feedback. If not applicable, please explain why. Please include positive and negative tests

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