A small repository to try the specleft functionality
- Python 3.13+
pip
python3 -m venv .venv
source .venv/bin/activatepython -m pip install --upgrade pip
python -m pip install .python main.pyYou should see:
Hello from specleft-sandbox!
As part of init setup, there is an example features added in to .specleft/specs/example-feature.md
To see the status of the coverage:
specleft statusThere are no tests, which means there's no coverage on the define specs.
Feel free to add your own and/or delete the examples ones.
There are two workflows to get a better undersanding of SpecLeft's power.
Give a prompt to your agent to implement features (any you like).
Include in your prompt "follow specleft's SKILL.md" for implementation.
Follow these steps in your workflow
**Add more features**
# Create a new feature spec
specleft features add --id auth --title "Authentication"
# Add a scenario and generate a skeleton test file
specleft features add-scenario \
--feature auth \
--title "Successful logout" \
--step "Given a user has logged in" \
--step "When the user logs out" \
--step "Then the user session is ended" \
--step "And cannot send POST requests to the health endpoint successfully" \
--add-test skeleton
# Show traceability / coverage status
specleft statusThe above steps create a test skeleton - this is your scaffolding.
You can now implement the code and test logic.
Remove the skipped params from the tests
python -m pytestGet a visual of the coverage
specleft test report --open-browserdeactivate