Skip to content

Commit 64f584d

Browse files
authored
Merge branch 'main' into issue-ext
2 parents fa9c0d2 + 752683d commit 64f584d

File tree

73 files changed

+9198
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+9198
-421
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727
run: uvx ruff check src/
2828

2929
pytest:
30-
runs-on: ubuntu-latest
30+
runs-on: ${{ matrix.os }}
3131
strategy:
3232
matrix:
33+
os: [ubuntu-latest, windows-latest]
3334
python-version: ["3.11", "3.12", "3.13"]
3435
steps:
3536
- name: Checkout
@@ -46,5 +47,9 @@ jobs:
4647
- name: Install dependencies
4748
run: uv sync --extra test
4849

50+
# On windows-latest, bash tests auto-skip unless Git-for-Windows
51+
# bash (MSYS2/MINGW) is detected. The WSL launcher is rejected
52+
# because it cannot handle native Windows paths in test fixtures.
53+
# See tests/conftest.py::_has_working_bash() for details.
4954
- name: Run tests
5055
run: uv run pytest

AGENTS.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Each AI agent is a self-contained **integration subpackage** under `src/specify_
1717
```
1818
src/specify_cli/integrations/
1919
├── __init__.py # INTEGRATION_REGISTRY + _register_builtins()
20-
├── base.py # IntegrationBase, MarkdownIntegration, TomlIntegration, SkillsIntegration
20+
├── base.py # IntegrationBase, MarkdownIntegration, TomlIntegration, YamlIntegration, SkillsIntegration
2121
├── manifest.py # IntegrationManifest (file tracking)
2222
├── claude/ # Example: SkillsIntegration subclass
2323
│ ├── __init__.py # ClaudeIntegration class
@@ -48,6 +48,7 @@ The registry is the **single source of truth for Python integration metadata**.
4848
|---|---|
4949
| Standard markdown commands (`.md`) | `MarkdownIntegration` |
5050
| TOML-format commands (`.toml`) | `TomlIntegration` |
51+
| YAML recipe files (`.yaml`) | `YamlIntegration` |
5152
| Skill directories (`speckit-<name>/SKILL.md`) | `SkillsIntegration` |
5253
| Fully custom output (companion files, settings merge, etc.) | `IntegrationBase` directly |
5354

@@ -343,16 +344,82 @@ Command content with {SCRIPT} and {{args}} placeholders.
343344
"""
344345
```
345346

347+
### YAML Format
348+
349+
Used by: Goose
350+
351+
```yaml
352+
version: 1.0.0
353+
title: "Command Title"
354+
description: "Command description"
355+
author:
356+
contact: spec-kit
357+
extensions:
358+
- type: builtin
359+
name: developer
360+
activities:
361+
- Spec-Driven Development
362+
prompt: |
363+
Command content with {SCRIPT} and {{args}} placeholders.
364+
```
365+
346366
## Argument Patterns
347367
348368
Different agents use different argument placeholders. The placeholder used in command files is always taken from `registrar_config["args"]` for each integration — check there first when in doubt:
349369

350370
- **Markdown/prompt-based**: `$ARGUMENTS` (default for most markdown agents)
351371
- **TOML-based**: `{{args}}` (e.g., Gemini)
372+
- **YAML-based**: `{{args}}` (e.g., Goose)
352373
- **Custom**: some agents override the default (e.g., Forge uses `{{parameters}}`)
353374
- **Script placeholders**: `{SCRIPT}` (replaced with actual script path)
354375
- **Agent placeholders**: `__AGENT__` (replaced with agent name)
355376

377+
## Special Processing Requirements
378+
379+
Some agents require custom processing beyond the standard template transformations:
380+
381+
### Copilot Integration
382+
383+
GitHub Copilot has unique requirements:
384+
- Commands use `.agent.md` extension (not `.md`)
385+
- Each command gets a companion `.prompt.md` file in `.github/prompts/`
386+
- Installs `.vscode/settings.json` with prompt file recommendations
387+
- Context file lives at `.github/copilot-instructions.md`
388+
389+
Implementation: Extends `IntegrationBase` with custom `setup()` method that:
390+
1. Processes templates with `process_template()`
391+
2. Generates companion `.prompt.md` files
392+
3. Merges VS Code settings
393+
394+
### Forge Integration
395+
396+
Forge has special frontmatter and argument requirements:
397+
- Uses `{{parameters}}` instead of `$ARGUMENTS`
398+
- Strips `handoffs` frontmatter key (Forge-specific collaboration feature)
399+
- Injects `name` field into frontmatter when missing
400+
401+
Implementation: Extends `MarkdownIntegration` with custom `setup()` method that:
402+
1. Inherits standard template processing from `MarkdownIntegration`
403+
2. Adds extra `$ARGUMENTS` → `{{parameters}}` replacement after template processing
404+
3. Applies Forge-specific transformations via `_apply_forge_transformations()`
405+
4. Strips `handoffs` frontmatter key
406+
5. Injects missing `name` fields
407+
6. Ensures the shared `update-agent-context.*` scripts include a `forge` case that maps context updates to `AGENTS.md` and lists `forge` in their usage/help text
408+
409+
### Goose Integration
410+
411+
Goose is a YAML-format agent using Block's recipe system:
412+
- Uses `.goose/recipes/` directory for YAML recipe files
413+
- Uses `{{args}}` argument placeholder
414+
- Produces YAML with `prompt: |` block scalar for command content
415+
416+
Implementation: Extends `YamlIntegration` (parallel to `TomlIntegration`):
417+
1. Processes templates through the standard placeholder pipeline
418+
2. Extracts title and description from frontmatter
419+
3. Renders output as Goose recipe YAML (version, title, description, author, extensions, activities, prompt)
420+
4. Uses `yaml.safe_dump()` for header fields to ensure proper escaping
421+
5. Context updates map to `AGENTS.md` (shared with opencode/codex/pi/forge)
422+
356423
## Common Pitfalls
357424

358425
1. **Using shorthand keys for CLI-based integrations**: For CLI-based integrations (`requires_cli: True`), the `key` must match the executable name (e.g., `"cursor-agent"` not `"cursor"`). `shutil.which(key)` is used for CLI tool checks — mismatches require special-case mappings. IDE-based integrations (`requires_cli: False`) are not subject to this constraint.

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,43 @@
22

33
<!-- insert new changelog below this comment -->
44

5+
## [0.7.1] - 2026-04-15
6+
7+
### Changed
8+
9+
- ci: add windows-latest to test matrix (#2233)
10+
- docs: remove deprecated --skip-tls references from local-development guide (#2231)
11+
- fix: allow Claude to chain skills for hook execution (#2227)
12+
- docs: merge TESTING.md into CONTRIBUTING.md, remove TESTING.md (#2228)
13+
- Add agent-assign extension to community catalog (#2030)
14+
- fix: unofficial PyPI warning (#1982) and legacy extension command name auto-correction (#2017) (#2027)
15+
- feat: register architect-preview in community catalog (#2214)
16+
- chore: deprecate --ai flag in favor of --integration on specify init (#2218)
17+
- chore: release 0.7.0, begin 0.7.1.dev0 development (#2217)
18+
19+
## [0.7.0] - 2026-04-14
20+
21+
### Changed
22+
23+
- Add workflow engine with catalog system (#2158)
24+
- docs(catalog): add claude-ask-questions to community preset catalog (#2191)
25+
- Add SFSpeckit — Salesforce SDD Extension (#2208)
26+
- feat(scripts): optional single-segment branch prefix for gitflow (#2202)
27+
- chore: release 0.6.2, begin 0.6.3.dev0 development (#2205)
28+
- Add Worktrees extension to community catalog (#2207)
29+
- feat: Update catalog.community.json for preset-fiction-book-writing (#2199)
30+
31+
## [0.6.2] - 2026-04-13
32+
33+
### Changed
34+
35+
- feat: Register "What-if Analysis" community extension (#2182)
36+
- feat: add GitHub Issues Integration to community catalog (#2188)
37+
- feat(agents): add Goose AI agent support (#2015)
38+
- Update ralph extension to v1.0.1 in community catalog (#2192)
39+
- fix: skip docs deployment workflow on forks (#2171)
40+
- chore: release 0.6.1, begin 0.6.2.dev0 development (#2162)
41+
542
## [0.6.1] - 2026-04-10
643

744
### Changed

CONTRIBUTING.md

Lines changed: 84 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ On [GitHub Codespaces](https://github.com/features/codespaces) it's even simpler
4444
1. Push to your fork and submit a pull request
4545
1. Wait for your pull request to be reviewed and merged.
4646

47-
For the detailed test workflow, command-selection prompt, and PR reporting template, see [`TESTING.md`](./TESTING.md).
48-
Activate the project virtual environment (see the Setup block in [`TESTING.md`](./TESTING.md)), then install the CLI from your working tree (`uv pip install -e .` after `uv sync --extra test`) or otherwise ensure the shell uses the local `specify` binary before running the manual slash-command tests described below.
47+
Activate the project virtual environment (see [Testing setup](#testing-setup) below), then install the CLI from your working tree (`uv pip install -e .` after `uv sync --extra test`) or otherwise ensure the shell uses the local `specify` binary before running the manual slash-command tests described below.
4948

5049
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
5150

@@ -69,34 +68,99 @@ When working on spec-kit:
6968

7069
For the smoothest review experience, validate changes in this order:
7170

72-
1. **Run focused automated checks first** — use the quick verification commands in [`TESTING.md`](./TESTING.md) to catch packaging, scaffolding, and configuration regressions early.
73-
2. **Run manual workflow tests second** — if your change affects slash commands or the developer workflow, follow [`TESTING.md`](./TESTING.md) to choose the right commands, run them in an agent, and capture results for your PR.
74-
3. **Use local release packages when debugging packaged output** — if you need to inspect the exact files CI-style packaging produces, generate local release packages as described below.
71+
1. **Run focused automated checks first** — use the quick verification commands [below](#automated-checks) to catch scaffolding and configuration regressions early.
72+
2. **Run manual workflow tests second** — if your change affects slash commands or the developer workflow, follow the [manual testing](#manual-testing) section to choose the right commands, run them in an agent, and capture results for your PR.
7573

76-
### Testing template and command changes locally
74+
### Automated checks
7775

78-
Running `uv run specify init` pulls released packages, which won’t include your local changes.
79-
To test your templates, commands, and other changes locally, follow these steps:
76+
#### Agent configuration and wiring consistency
8077

81-
1. **Create release packages**
78+
```bash
79+
uv run python -m pytest tests/test_agent_config_consistency.py -q
80+
```
8281

83-
Run the following command to generate the local packages:
82+
Run this when you change agent metadata, context update scripts, or integration wiring.
8483

85-
```bash
86-
./.github/workflows/scripts/create-release-packages.sh v1.0.0
87-
```
84+
### Manual testing
8885

89-
2. **Copy the relevant package to your test project**
86+
#### Testing setup
9087

91-
```bash
92-
cp -r .genreleases/sdd-copilot-package-sh/. <path-to-test-project>/
93-
```
88+
```bash
89+
# Install the project and test dependencies from your local branch
90+
cd <spec-kit-repo>
91+
uv sync --extra test
92+
source .venv/bin/activate # On Windows (CMD): .venv\Scripts\activate | (PowerShell): .venv\Scripts\Activate.ps1
93+
uv pip install -e .
94+
# Ensure the `specify` binary in this environment points at your working tree so the agent runs the branch you're testing.
9495

95-
3. **Open and test the agent**
96+
# Initialize a test project using your local changes
97+
uv run specify init <temp-dir>/speckit-test --ai <agent> --offline
98+
cd <temp-dir>/speckit-test
9699

97-
Navigate to your test project folder and open the agent to verify your implementation.
100+
# Open in your agent
101+
```
98102

99-
If you only need to validate generated file structure and content before doing manual agent testing, start with the focused automated checks in [`TESTING.md`](./TESTING.md). Keep this section for the cases where you need to inspect the exact packaged output locally.
103+
#### Manual testing process
104+
105+
Any change that affects a slash command's behavior requires manually testing that command through an AI agent and submitting results with the PR.
106+
107+
1. **Identify affected commands** — use the [prompt below](#determining-which-tests-to-run) to have your agent analyze your changed files and determine which commands need testing.
108+
2. **Set up a test project** — scaffold from your local branch (see [Testing setup](#testing-setup)).
109+
3. **Run each affected command** — invoke it in your agent, verify it completes successfully, and confirm it produces the expected output (files created, scripts executed, artifacts populated).
110+
4. **Run prerequisites first** — commands that depend on earlier commands (e.g., `/speckit.tasks` requires `/speckit.plan` which requires `/speckit.specify`) must be run in order.
111+
5. **Report results** — paste the [reporting template](#reporting-results) into your PR with pass/fail for each command tested.
112+
113+
#### Reporting results
114+
115+
Paste this into your PR:
116+
117+
~~~markdown
118+
## Manual test results
119+
120+
**Agent**: [e.g., GitHub Copilot in VS Code] | **OS/Shell**: [e.g., macOS/zsh]
121+
122+
| Command tested | Notes |
123+
|----------------|-------|
124+
| `/speckit.command` | |
125+
~~~
126+
127+
#### Determining which tests to run
128+
129+
Copy this prompt into your agent. Include the agent's response (selected tests plus a brief explanation of the mapping) in your PR.
130+
131+
~~~text
132+
Read CONTRIBUTING.md, then run `git diff --name-only main` to get my changed files.
133+
For each changed file, determine which slash commands it affects by reading
134+
the command templates in templates/commands/ to understand what each command
135+
invokes. Use these mapping rules:
136+
137+
- templates/commands/X.md → the command it defines
138+
- scripts/bash/Y.sh or scripts/powershell/Y.ps1 → every command that invokes that script (grep templates/commands/ for the script name). Also check transitive dependencies: if the changed script is sourced by other scripts (e.g., common.sh is sourced by create-new-feature.sh, check-prerequisites.sh, setup-plan.sh, update-agent-context.sh), then every command invoking those downstream scripts is also affected
139+
- templates/Z-template.md → every command that consumes that template during execution
140+
- src/specify_cli/*.py → CLI commands (`specify init`, `specify check`, `specify extension *`, `specify preset *`); test the affected CLI command and, for init/scaffolding changes, at minimum test /speckit.specify
141+
- extensions/X/commands/* → the extension command it defines
142+
- extensions/X/scripts/* → every extension command that invokes that script
143+
- extensions/X/extension.yml or config-template.yml → every command in that extension. Also check if the manifest defines hooks (look for `hooks:` entries like `before_specify`, `after_implement`, etc.) — if so, the core commands those hooks attach to are also affected
144+
- presets/*/* → test preset scaffolding via `specify init` with the preset
145+
- pyproject.toml → packaging/bundling; test `specify init` and verify bundled assets
146+
147+
Include prerequisite tests (e.g., T5 requires T3 requires T1).
148+
149+
Output in this format:
150+
151+
### Test selection reasoning
152+
153+
| Changed file | Affects | Test | Why |
154+
|---|---|---|---|
155+
| (path) | (command) | T# | (reason) |
156+
157+
### Required tests
158+
159+
Number each test sequentially (T1, T2, ...). List prerequisite tests first.
160+
161+
- T1: /speckit.command — (reason)
162+
- T2: /speckit.command — (reason)
163+
~~~
100164

101165
## AI contributions in Spec Kit
102166

DEVELOPMENT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ Spec Kit is a toolkit for spec-driven development. At its core, it is a coordina
1111
| [spec-driven.md](spec-driven.md) | End-to-end explanation of the Spec-Driven Development workflow supported by Spec Kit. |
1212
| [RELEASE-PROCESS.md](.github/workflows/RELEASE-PROCESS.md) | Release workflow, versioning rules, and changelog generation process. |
1313
| [docs/index.md](docs/index.md) | Entry point to the `docs/` documentation set. |
14-
| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution process, review expectations, and required development practices. |
15-
| [TESTING.md](TESTING.md) | Validation strategy and testing procedures. |
14+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution process, review expectations, testing, and required development practices. |
1615

1716
**Main repository components:**
1817

0 commit comments

Comments
 (0)