You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,17 @@ On [GitHub Codespaces](https://github.com/features/codespaces) it's even simpler
36
36
> If your pull request introduces a large change that materially impacts the work of the CLI or the rest of the repository (e.g., you're introducing new templates, arguments, or otherwise major changes), make sure that it was **discussed and agreed upon** by the project maintainers. Pull requests with large changes that did not have a prior conversation and agreement will be closed.
37
37
38
38
1. Fork and clone the repository
39
-
1. Configure and install the dependencies: `uv sync`
39
+
1. Configure and install the dependencies: `uv sync --extra test`
40
40
1. Make sure the CLI works on your machine: `uv run specify --help`
41
41
1. Create a new branch: `git checkout -b my-branch-name`
42
42
1. Make your change, add tests, and make sure everything still works
43
43
1. Test the CLI functionality with a sample project if relevant
44
44
1. Push to your fork and submit a pull request
45
45
1. Wait for your pull request to be reviewed and merged.
46
46
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.
49
+
47
50
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
48
51
49
52
- Follow the project's coding conventions.
@@ -62,6 +65,14 @@ When working on spec-kit:
62
65
3. Test script functionality in the `scripts/` directory
63
66
4. Ensure memory files (`memory/constitution.md`) are updated if major process changes are made
64
67
68
+
### Recommended validation flow
69
+
70
+
For the smoothest review experience, validate changes in this order:
71
+
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.
75
+
65
76
### Testing template and command changes locally
66
77
67
78
Running `uv run specify init` pulls released packages, which won’t include your local changes.
@@ -85,6 +96,8 @@ To test your templates, commands, and other changes locally, follow these steps:
85
96
86
97
Navigate to your test project folder and open the agent to verify your implementation.
87
98
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.
Copy file name to clipboardExpand all lines: TESTING.md
+60-6Lines changed: 60 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,59 @@
1
-
# Manual Testing Guide
1
+
# Testing Guide
2
+
3
+
This document is the detailed testing companion to [`CONTRIBUTING.md`](./CONTRIBUTING.md).
4
+
5
+
Use it for three things:
6
+
7
+
1. running quick automated checks before manual testing,
8
+
2. manually testing affected slash commands through an AI agent, and
9
+
3. capturing the results in a PR-friendly format.
2
10
3
11
Any change that affects a slash command's behavior requires manually testing that command through an AI agent and submitting results with the PR.
4
12
5
-
## Process
13
+
## Recommended order
14
+
15
+
1.**Sync your environment** — install the project and test dependencies.
16
+
2.**Run focused automated checks** — especially for packaging, scaffolding, agent config, and generated-file changes.
17
+
3.**Run manual agent tests** — for any affected slash commands.
18
+
4.**Paste results into your PR** — include both command-selection reasoning and manual test results.
19
+
20
+
## Quick automated checks
21
+
22
+
Run these before manual testing when your change affects packaging, scaffolding, templates, release artifacts, or agent wiring.
23
+
24
+
### Environment setup
25
+
26
+
```bash
27
+
cd<spec-kit-repo>
28
+
uv sync --extra test
29
+
source .venv/bin/activate # On Windows (CMD): .venv\Scripts\activate | (PowerShell): .venv\Scripts\Activate.ps1
30
+
```
31
+
32
+
### Generated package structure and content
33
+
34
+
```bash
35
+
uv run python -m pytest tests/test_core_pack_scaffold.py -q
36
+
```
37
+
38
+
This validates the generated files that CI-style packaging depends on, including directory layout, file names, frontmatter/TOML validity, placeholder replacement, `.specify/` path rewrites, and parity with `create-release-packages.sh`.
39
+
40
+
### Agent configuration and release wiring consistency
41
+
42
+
```bash
43
+
uv run python -m pytest tests/test_agent_config_consistency.py -q
44
+
```
45
+
46
+
Run this when you change agent metadata, release scripts, context update scripts, or artifact naming.
Inspect `.genreleases/sdd-copilot-package-sh/` and the matching ZIP in `.genreleases/` when you want to review the exact packaged output for one agent/script combination.
55
+
56
+
## Manual testing process
6
57
7
58
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.
8
59
2.**Set up a test project** — scaffold from your local branch (see [Setup](#setup)).
@@ -13,19 +64,22 @@ Any change that affects a slash command's behavior requires manually testing tha
13
64
## Setup
14
65
15
66
```bash
16
-
# Install the CLI from your local branch
67
+
# Install the project and test dependencies from your local branch
17
68
cd<spec-kit-repo>
18
-
uv venv .venv
19
-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
69
+
uv sync --extra test
70
+
source .venv/bin/activate # On Windows (CMD): .venv\Scripts\activate | (PowerShell): .venv\Scripts\Activate.ps1
20
71
uv pip install -e .
72
+
# Ensure the `specify` binary in this environment points at your working tree so the agent runs the branch you're testing.
21
73
22
74
# Initialize a test project using your local changes
uv run specify init /tmp/speckit-test --ai <agent> --offline
24
76
cd /tmp/speckit-test
25
77
26
78
# Open in your agent
27
79
```
28
80
81
+
If you are testing the packaged output rather than the live source tree, create a local release package first as described in [`CONTRIBUTING.md`](./CONTRIBUTING.md).
0 commit comments