Skip to content

feat(dev): add integration scaffolder#2685

Draft
PascalThuet wants to merge 1 commit into
github:mainfrom
PascalThuet:codex/integration-scaffold
Draft

feat(dev): add integration scaffolder#2685
PascalThuet wants to merge 1 commit into
github:mainfrom
PascalThuet:codex/integration-scaffold

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

Closes #2683.

Summary

  • add specify dev integration scaffold <key> for built-in integration boilerplate
  • generate a minimal integration package plus matching test skeleton for markdown, toml, yaml, and skills layouts
  • document the local contributor workflow

Testing

  • uv run --extra test pytest tests/integrations/test_integration_scaffold.py -v
  • uv run --extra test pytest tests/integrations/test_integration_scaffold.py tests/integrations/test_registry.py -v
  • uvx ruff check src/specify_cli/integration_scaffold.py src/specify_cli/__init__.py tests/integrations/test_integration_scaffold.py
  • git diff --check

Copilot AI review requested due to automatic review settings May 23, 2026 09:36
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a developer-facing integration scaffolding feature to generate built-in integration packages plus a matching test skeleton, exposed via a new specify dev integration scaffold CLI command and documented for contributors.

Changes:

  • Introduces scaffold_integration() and templates for multiple integration types (markdown/toml/yaml/skills).
  • Adds specify dev integration scaffold Typer command to generate scaffold files and print next steps.
  • Adds integration tests validating generated file contents and error cases; updates local development docs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/integrations/test_integration_scaffold.py New integration tests covering CLI scaffold behavior, templates, and validation errors.
src/specify_cli/integration_scaffold.py New scaffold implementation: templates, content generation, filesystem writes, and result metadata.
src/specify_cli/init.py Adds new dev integration scaffold CLI command wiring around scaffold_integration().
docs/local-development.md Documents how to run the new scaffold command and renumbers subsequent sections.

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

Comment on lines +90 to +96
def _integration_content(
*,
key: str,
package_name: str,
class_name: str,
integration_type: str,
) -> str:
Comment on lines +170 to +173
integrations_root = project_root / "src" / "specify_cli" / "integrations"
tests_root = project_root / "tests" / "integrations"
if not integrations_root.is_dir() or not tests_root.is_dir():
raise ValueError("Run this command from the Spec Kit repository root.")
Comment on lines +206 to +210
next_steps = (
f"Register {class_name} in src/specify_cli/integrations/__init__.py.",
"Review config metadata, install_url, requires_cli, context_file, and multi_install_safe.",
f"Run pytest tests/integrations/test_integration_{package_name}.py -v.",
)
Comment on lines +1302 to +1306
integration_type: str = typer.Option(
"markdown",
"--type",
help="Scaffold type: markdown, toml, yaml, or skills",
),
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.

[Feature]: Add integration scaffolder for contributors

2 participants