speculate-cli 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- speculate_cli-0.0.4/.copier-answers.yml +9 -0
- speculate_cli-0.0.4/.gitignore +183 -0
- speculate_cli-0.0.4/Makefile +32 -0
- speculate_cli-0.0.4/PKG-INFO +44 -0
- speculate_cli-0.0.4/README.md +18 -0
- speculate_cli-0.0.4/devtools/lint.py +53 -0
- speculate_cli-0.0.4/docs/specs/active/.empty +0 -0
- speculate_cli-0.0.4/docs/specs/active/impl-2025-12-02-speculate-cli.md +440 -0
- speculate_cli-0.0.4/docs/specs/active/plan-2025-12-02-speculate-cli.md +1244 -0
- speculate_cli-0.0.4/docs/specs/active/valid-2025-12-02-speculate-cli.md +319 -0
- speculate_cli-0.0.4/docs/specs/development.md +138 -0
- speculate_cli-0.0.4/docs/specs/done/.empty +0 -0
- speculate_cli-0.0.4/docs/specs/future/.empty +0 -0
- speculate_cli-0.0.4/docs/specs/paused/.empty +0 -0
- speculate_cli-0.0.4/installation.md +27 -0
- speculate_cli-0.0.4/publishing.md +71 -0
- speculate_cli-0.0.4/pyproject.toml +188 -0
- speculate_cli-0.0.4/src/speculate/__init__.py +1 -0
- speculate_cli-0.0.4/src/speculate/cli/__init__.py +1 -0
- speculate_cli-0.0.4/src/speculate/cli/cli_commands.py +443 -0
- speculate_cli-0.0.4/src/speculate/cli/cli_main.py +150 -0
- speculate_cli-0.0.4/src/speculate/cli/cli_ui.py +76 -0
- speculate_cli-0.0.4/src/speculate/py.typed +0 -0
- speculate_cli-0.0.4/tests/test_cli_commands.py +208 -0
- speculate_cli-0.0.4/tests/test_cli_helpers.py +117 -0
- speculate_cli-0.0.4/tests/test_integration.py +362 -0
- speculate_cli-0.0.4/uv.lock +888 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier. Do not edit manually.
|
|
2
|
+
_commit: v0.2.19
|
|
3
|
+
_src_path: gh:jlevy/simple-modern-uv
|
|
4
|
+
package_author_email: joshua@cal.berkeley.edu
|
|
5
|
+
package_author_name: Joshua Levy
|
|
6
|
+
package_description: Structured agent specs, shortcuts, and doc workflows
|
|
7
|
+
package_github_org: jlevy
|
|
8
|
+
package_module: speculate
|
|
9
|
+
package_name: speculate-cli
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Generated by Makefile
|
|
2
|
+
CLAUDE.md
|
|
3
|
+
AGENTS.md
|
|
4
|
+
|
|
5
|
+
# Additions to standard GitHub .gitignore:
|
|
6
|
+
*.bak
|
|
7
|
+
*.orig
|
|
8
|
+
tmp/
|
|
9
|
+
trash/
|
|
10
|
+
attic/
|
|
11
|
+
.kash/
|
|
12
|
+
|
|
13
|
+
# Byte-compiled / optimized / DLL files
|
|
14
|
+
__pycache__/
|
|
15
|
+
*.py[cod]
|
|
16
|
+
*$py.class
|
|
17
|
+
|
|
18
|
+
# C extensions
|
|
19
|
+
*.so
|
|
20
|
+
|
|
21
|
+
# Distribution / packaging
|
|
22
|
+
.Python
|
|
23
|
+
build/
|
|
24
|
+
develop-eggs/
|
|
25
|
+
dist/
|
|
26
|
+
downloads/
|
|
27
|
+
eggs/
|
|
28
|
+
.eggs/
|
|
29
|
+
lib/
|
|
30
|
+
lib64/
|
|
31
|
+
parts/
|
|
32
|
+
sdist/
|
|
33
|
+
var/
|
|
34
|
+
wheels/
|
|
35
|
+
share/python-wheels/
|
|
36
|
+
*.egg-info/
|
|
37
|
+
.installed.cfg
|
|
38
|
+
*.egg
|
|
39
|
+
MANIFEST
|
|
40
|
+
|
|
41
|
+
# PyInstaller
|
|
42
|
+
# Usually these files are written by a python script from a template
|
|
43
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
44
|
+
*.manifest
|
|
45
|
+
*.spec
|
|
46
|
+
|
|
47
|
+
# Installer logs
|
|
48
|
+
pip-log.txt
|
|
49
|
+
pip-delete-this-directory.txt
|
|
50
|
+
|
|
51
|
+
# Unit test / coverage reports
|
|
52
|
+
htmlcov/
|
|
53
|
+
.tox/
|
|
54
|
+
.nox/
|
|
55
|
+
.coverage
|
|
56
|
+
.coverage.*
|
|
57
|
+
.cache
|
|
58
|
+
nosetests.xml
|
|
59
|
+
coverage.xml
|
|
60
|
+
*.cover
|
|
61
|
+
*.py,cover
|
|
62
|
+
.hypothesis/
|
|
63
|
+
.pytest_cache/
|
|
64
|
+
cover/
|
|
65
|
+
|
|
66
|
+
# Translations
|
|
67
|
+
*.mo
|
|
68
|
+
*.pot
|
|
69
|
+
|
|
70
|
+
# Django stuff:
|
|
71
|
+
*.log
|
|
72
|
+
local_settings.py
|
|
73
|
+
db.sqlite3
|
|
74
|
+
db.sqlite3-journal
|
|
75
|
+
|
|
76
|
+
# Flask stuff:
|
|
77
|
+
instance/
|
|
78
|
+
.webassets-cache
|
|
79
|
+
|
|
80
|
+
# Scrapy stuff:
|
|
81
|
+
.scrapy
|
|
82
|
+
|
|
83
|
+
# Sphinx documentation
|
|
84
|
+
docs/_build/
|
|
85
|
+
|
|
86
|
+
# PyBuilder
|
|
87
|
+
.pybuilder/
|
|
88
|
+
target/
|
|
89
|
+
|
|
90
|
+
# Jupyter Notebook
|
|
91
|
+
.ipynb_checkpoints
|
|
92
|
+
|
|
93
|
+
# IPython
|
|
94
|
+
profile_default/
|
|
95
|
+
ipython_config.py
|
|
96
|
+
|
|
97
|
+
# pyenv
|
|
98
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
99
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
100
|
+
# .python-version
|
|
101
|
+
|
|
102
|
+
# pipenv
|
|
103
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
104
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
105
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
106
|
+
# install all needed dependencies.
|
|
107
|
+
#Pipfile.lock
|
|
108
|
+
|
|
109
|
+
# UV
|
|
110
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
111
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
112
|
+
# commonly ignored for libraries.
|
|
113
|
+
#uv.lock
|
|
114
|
+
|
|
115
|
+
# poetry
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
117
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
118
|
+
# commonly ignored for libraries.
|
|
119
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
120
|
+
#poetry.lock
|
|
121
|
+
|
|
122
|
+
# pdm
|
|
123
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
124
|
+
#pdm.lock
|
|
125
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
126
|
+
# in version control.
|
|
127
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
128
|
+
.pdm.toml
|
|
129
|
+
.pdm-python
|
|
130
|
+
.pdm-build/
|
|
131
|
+
|
|
132
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
133
|
+
__pypackages__/
|
|
134
|
+
|
|
135
|
+
# Celery stuff
|
|
136
|
+
celerybeat-schedule
|
|
137
|
+
celerybeat.pid
|
|
138
|
+
|
|
139
|
+
# SageMath parsed files
|
|
140
|
+
*.sage.py
|
|
141
|
+
|
|
142
|
+
# Environments
|
|
143
|
+
.env
|
|
144
|
+
.venv
|
|
145
|
+
env/
|
|
146
|
+
venv/
|
|
147
|
+
ENV/
|
|
148
|
+
env.bak/
|
|
149
|
+
venv.bak/
|
|
150
|
+
|
|
151
|
+
# Spyder project settings
|
|
152
|
+
.spyderproject
|
|
153
|
+
.spyproject
|
|
154
|
+
|
|
155
|
+
# Rope project settings
|
|
156
|
+
.ropeproject
|
|
157
|
+
|
|
158
|
+
# mkdocs documentation
|
|
159
|
+
/site
|
|
160
|
+
|
|
161
|
+
# mypy
|
|
162
|
+
.mypy_cache/
|
|
163
|
+
.dmypy.json
|
|
164
|
+
dmypy.json
|
|
165
|
+
|
|
166
|
+
# Pyre type checker
|
|
167
|
+
.pyre/
|
|
168
|
+
|
|
169
|
+
# pytype static type analyzer
|
|
170
|
+
.pytype/
|
|
171
|
+
|
|
172
|
+
# Cython debug symbols
|
|
173
|
+
cython_debug/
|
|
174
|
+
|
|
175
|
+
# PyCharm
|
|
176
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
177
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
178
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
179
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
180
|
+
#.idea/
|
|
181
|
+
|
|
182
|
+
# PyPI configuration file
|
|
183
|
+
.pypirc
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Makefile for easy development workflows.
|
|
2
|
+
# See development.md for docs.
|
|
3
|
+
# Note GitHub Actions call uv directly, not this Makefile.
|
|
4
|
+
|
|
5
|
+
.DEFAULT_GOAL := default
|
|
6
|
+
|
|
7
|
+
.PHONY: default install lint test upgrade build clean
|
|
8
|
+
|
|
9
|
+
default: install lint test
|
|
10
|
+
|
|
11
|
+
install:
|
|
12
|
+
uv sync --all-extras
|
|
13
|
+
|
|
14
|
+
lint:
|
|
15
|
+
uv run python devtools/lint.py
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
uv run pytest
|
|
19
|
+
|
|
20
|
+
upgrade:
|
|
21
|
+
uv sync --upgrade --all-extras --dev
|
|
22
|
+
|
|
23
|
+
build:
|
|
24
|
+
uv build
|
|
25
|
+
|
|
26
|
+
clean:
|
|
27
|
+
-rm -rf dist/
|
|
28
|
+
-rm -rf *.egg-info/
|
|
29
|
+
-rm -rf .pytest_cache/
|
|
30
|
+
-rm -rf .mypy_cache/
|
|
31
|
+
-rm -rf .venv/
|
|
32
|
+
-find . -type d -name "__pycache__" -exec rm -rf {} +
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: speculate-cli
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: Structured agent specs, shortcuts, and doc workflows
|
|
5
|
+
Project-URL: Repository, https://github.com/jlevy/speculate-cli
|
|
6
|
+
Author-email: Joshua Levy <joshua@cal.berkeley.edu>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: <4.0,>=3.11
|
|
19
|
+
Requires-Dist: clideps>=0.1.8
|
|
20
|
+
Requires-Dist: copier>=9.4.0
|
|
21
|
+
Requires-Dist: prettyfmt>=0.4.1
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: rich>=14.0.0
|
|
24
|
+
Requires-Dist: strif>=3.0.1
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# speculate-cli
|
|
28
|
+
|
|
29
|
+
This is the Python-based CLI for the Speculate project structure.
|
|
30
|
+
|
|
31
|
+
* * *
|
|
32
|
+
|
|
33
|
+
## Project Docs
|
|
34
|
+
|
|
35
|
+
For how to install uv and Python, see [installation.md](installation.md).
|
|
36
|
+
|
|
37
|
+
For development workflows, see [development.md](docs/development.md).
|
|
38
|
+
|
|
39
|
+
For instructions on publishing to PyPI, see [publishing.md](publishing.md).
|
|
40
|
+
|
|
41
|
+
* * *
|
|
42
|
+
|
|
43
|
+
*This project was built from
|
|
44
|
+
[simple-modern-uv](https://github.com/jlevy/simple-modern-uv).*
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# speculate-cli
|
|
2
|
+
|
|
3
|
+
This is the Python-based CLI for the Speculate project structure.
|
|
4
|
+
|
|
5
|
+
* * *
|
|
6
|
+
|
|
7
|
+
## Project Docs
|
|
8
|
+
|
|
9
|
+
For how to install uv and Python, see [installation.md](installation.md).
|
|
10
|
+
|
|
11
|
+
For development workflows, see [development.md](docs/development.md).
|
|
12
|
+
|
|
13
|
+
For instructions on publishing to PyPI, see [publishing.md](publishing.md).
|
|
14
|
+
|
|
15
|
+
* * *
|
|
16
|
+
|
|
17
|
+
*This project was built from
|
|
18
|
+
[simple-modern-uv](https://github.com/jlevy/simple-modern-uv).*
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
|
|
3
|
+
from funlog import log_calls
|
|
4
|
+
from rich import get_console, reconfigure
|
|
5
|
+
from rich import print as rprint
|
|
6
|
+
|
|
7
|
+
# Update as needed.
|
|
8
|
+
SRC_PATHS = ["src", "tests", "devtools"]
|
|
9
|
+
DOC_PATHS = ["README.md"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
reconfigure(emoji=not get_console().options.legacy_windows) # No emojis on legacy windows.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main():
|
|
16
|
+
rprint()
|
|
17
|
+
|
|
18
|
+
errcount = 0
|
|
19
|
+
errcount += run(["codespell", "--write-changes", *SRC_PATHS, *DOC_PATHS])
|
|
20
|
+
errcount += run(["ruff", "check", "--fix", *SRC_PATHS])
|
|
21
|
+
errcount += run(["ruff", "format", *SRC_PATHS])
|
|
22
|
+
errcount += run(["basedpyright", "--stats", *SRC_PATHS])
|
|
23
|
+
|
|
24
|
+
rprint()
|
|
25
|
+
|
|
26
|
+
if errcount != 0:
|
|
27
|
+
rprint(f"[bold red]:x: Lint failed with {errcount} errors.[/bold red]")
|
|
28
|
+
else:
|
|
29
|
+
rprint("[bold green]:white_check_mark: Lint passed![/bold green]")
|
|
30
|
+
rprint()
|
|
31
|
+
|
|
32
|
+
return errcount
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@log_calls(level="warning", show_timing_only=True)
|
|
36
|
+
def run(cmd: list[str]) -> int:
|
|
37
|
+
rprint()
|
|
38
|
+
rprint(f"[bold green]>> {' '.join(cmd)}[/bold green]")
|
|
39
|
+
errcount = 0
|
|
40
|
+
try:
|
|
41
|
+
subprocess.run(cmd, text=True, check=True)
|
|
42
|
+
except KeyboardInterrupt:
|
|
43
|
+
rprint("[yellow]Keyboard interrupt - Cancelled[/yellow]")
|
|
44
|
+
errcount = 1
|
|
45
|
+
except subprocess.CalledProcessError as e:
|
|
46
|
+
rprint(f"[bold red]Error: {e}[/bold red]")
|
|
47
|
+
errcount = 1
|
|
48
|
+
|
|
49
|
+
return errcount
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if __name__ == "__main__":
|
|
53
|
+
exit(main())
|
|
File without changes
|