|
| 1 | +--- |
| 2 | +description: "Validate the lifecycle of an extension from the catalog." |
| 3 | +--- |
| 4 | + |
| 5 | +# Extension Self-Test: `$ARGUMENTS` |
| 6 | + |
| 7 | +This command drives a self-test simulating the developer experience with the `$ARGUMENTS` extension. |
| 8 | + |
| 9 | +## Goal |
| 10 | + |
| 11 | +Validate the end-to-end lifecycle (discovery, installation, registration) for the extension: `$ARGUMENTS`. |
| 12 | +If `$ARGUMENTS` is empty, you must tell the user to provide an extension name, for example: `/speckit.selftest linear`. |
| 13 | + |
| 14 | +## Steps |
| 15 | + |
| 16 | +### Step 1: Catalog Discovery Validation |
| 17 | + |
| 18 | +Check if the extension exists in the Spec Kit catalog. |
| 19 | +Execute this command and verify that `$ARGUMENTS` appears in the results. If the command fails or returns no results, fail the test. |
| 20 | + |
| 21 | +```bash |
| 22 | +specify extension search $ARGUMENTS |
| 23 | +``` |
| 24 | + |
| 25 | +### Step 2: Simulate Installation |
| 26 | + |
| 27 | +Simulate adding the extension to the current workspace configuration. |
| 28 | + |
| 29 | +```bash |
| 30 | +specify extension add $ARGUMENTS |
| 31 | +``` |
| 32 | + |
| 33 | +### Step 3: Registration Verification |
| 34 | + |
| 35 | +Once the `add` command completes, verify the installation by checking the project configuration. |
| 36 | +Use terminal tools (like `cat`) to verify that the following file contains an enabled record for `$ARGUMENTS`. |
| 37 | + |
| 38 | +```bash |
| 39 | +cat .specify/extensions.yml |
| 40 | +``` |
| 41 | + |
| 42 | +### Step 4: Verification Report |
| 43 | + |
| 44 | +Analyze the standard output of the three steps. |
| 45 | +Generate a terminal-style test output format detailing the results of discovery, installation, and registration. Return this directly to the user. |
| 46 | + |
| 47 | +Example output format: |
| 48 | +```text |
| 49 | +============================= test session starts ============================== |
| 50 | +collected 3 items |
| 51 | +
|
| 52 | +test_selftest_discovery.py::test_catalog_search [PASS/FAIL] |
| 53 | + Details: [Provide execution result of specify extension search] |
| 54 | +
|
| 55 | +test_selftest_installation.py::test_extension_add [PASS/FAIL] |
| 56 | + Details: [Provide execution result of specify extension add] |
| 57 | +
|
| 58 | +test_selftest_registration.py::test_config_verification [PASS/FAIL] |
| 59 | + Details: [Provide execution result of reading .specify/extensions.yml] |
| 60 | +
|
| 61 | +============================== [X] passed in ... ============================== |
| 62 | +``` |
0 commit comments