Skip to content

Commit 524e8e5

Browse files
committed
test(commands): map extension-commands python script with timestamps
1 parent d0abf8a commit 524e8e5

4 files changed

Lines changed: 43 additions & 5 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
description: "Deploy to staging"
3+
---
4+
5+
# Deploy Command
6+
7+
This command deploys the project to the staging environment.
8+
9+
## Steps
10+
11+
### Step 1: Execute Python Deployer
12+
13+
Run the python mock file to deploy the codebase.
14+
15+
```bash
16+
python3 main.py --deploy
17+
```

tests/extension-commands/.specify/extensions.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ commands:
22
- id: custom_lint
33
name: Custom Linter
44
extension: test-extension
5-
command: ext.lint
5+
command: speckit.test.lint
66
description: Run the organization's custom linter on the codebase.
77
prompt: Would you like to run the custom linter now?
8+
file: lint.md
89

910
- id: mock_deploy
1011
name: Mock Deploy
1112
extension: test-extension
12-
command: ext.deploy
13+
command: speckit.test.deploy
1314
description: Deploy this directory to the staging environment.
1415
prompt: Ready to deploy to staging?
16+
file: deploy.md
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
description: "Run the custom linter"
3+
---
4+
5+
# Custom Linter Command
6+
7+
This command executes the custom organizational linter logic.
8+
9+
## Steps
10+
11+
### Step 1: Execute Python Linter
12+
13+
Run the python mock file to format the codebase.
14+
15+
```bash
16+
python3 main.py --lint
17+
```

tests/extension-commands/TESTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ To execute this test, copy the following block and paste it into GitHub Copilot
1818
Act as an automated test runner (like Ginkgo or pytest) evaluating your own comprehension of the current workspace. I want you to run the following test suite on the `.specify/extensions.yml` file in this directory and output the results strictly in a terminal-style test output format.
1919
2020
**Test Suite Context**:
21-
You are evaluating if you can correctly parse and execute custom extension commands defined by Spec Kit extensions.
21+
Before you begin, read `../../extensions/EXTENSION-API-REFERENCE.md` to understand how the Spec Kit architecture structures extensions, commands, and markdown file execution formats.
22+
23+
You are evaluating if you can correctly parse `.specify/extensions.yml` to map a command name to a markdown file, and then execute the script described in that markdown file.
2224
2325
**Test Cases to Evaluate**:
24-
1. [Test Case 1] "Discovery Validation": Read `.specify/extensions.yml`. Verify that you can find two custom commands: `/ext.lint` and `/ext.deploy`. If you can, mark this test as PASS. If you cannot find them, mark as FAIL.
25-
2. [Test Case 2] "Intent Binding": Pretend to execute the `/ext.lint` command. Since this is a sandbox, to successfully evaluate the command you must run `python3 main.py --lint` (or `--deploy` for the other) internally to get the actual execution output. If your execution provides the python console output (like 'The linter is complete [timestamp]'), mark as PASS. If you don't know what to do, mark as FAIL.
26+
1. [Test Case 1] "Discovery Validation": Read `.specify/extensions.yml`. Verify that you can find the commands `speckit.test.lint` mapping to `lint.md`, and `speckit.test.deploy` mapping to `deploy.md`. If you can, mark this test as PASS. If you cannot find them, mark as FAIL.
27+
2. [Test Case 2] "Intent Binding": Pretend to execute the `speckit.test.lint` command. First, look at `.specify/extensions.yml` to find its matching file (`lint.md`). Open `lint.md` to find the exact python command required for the linter. Since this is a sandbox, to successfully evaluate the command you must actually run that python command here to get the execution output. If your execution provides the python console output (like 'The linter is complete [timestamp]'), mark as PASS. If you don't know what to do, mark as FAIL.
2628
2729
**Required Output Format**:
2830
Provide your output exactly like this example format, replacing the bracketed content with your actual evaluation logic:

0 commit comments

Comments
 (0)