specsmith 0.1.4.dev34__tar.gz → 0.1.4.dev35__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.
- {specsmith-0.1.4.dev34/src/specsmith.egg-info → specsmith-0.1.4.dev35}/PKG-INFO +1 -1
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/pyproject.toml +1 -1
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/importer.py +9 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/claude_code.py +6 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/warp.py +9 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/scaffolder.py +6 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/session.py +23 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/gitignore.j2 +3 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/context-budget.md.j2 +11 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35/src/specsmith.egg-info}/PKG-INFO +1 -1
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/LICENSE +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/README.md +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/setup.cfg +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/__init__.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/__main__.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/architect.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/auditor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/cli.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/commands/__init__.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/compressor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/config.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/credit_analyzer.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/credits.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/differ.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/doctor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/exporter.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/__init__.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/aider.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/base.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/copilot.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/cursor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/gemini.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/integrations/windsurf.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/ledger.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/plugins.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/releaser.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/requirements.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/agents.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/architecture.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/requirements.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/test-spec.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/workflow.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/editorconfig.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/gitattributes.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/drift-metrics.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/roles.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/rules.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/verification.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/workflow.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/ledger.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/pyproject.toml.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/python/cli.py.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/python/init.py.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/readme.md.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/exec.cmd.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/exec.sh.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/run.cmd.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/run.sh.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/setup.cmd.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/setup.sh.j2 +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/tools.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/updater.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/upgrader.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/validator.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs/__init__.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs/base.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs/bitbucket.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs/github.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs/gitlab.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/vcs_commands.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith.egg-info/SOURCES.txt +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith.egg-info/dependency_links.txt +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith.egg-info/entry_points.txt +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith.egg-info/requires.txt +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith.egg-info/top_level.txt +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_auditor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_cli.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_compressor.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_importer.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_integrations.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_scaffolder.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_smoke.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_tools.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_validator.py +0 -0
- {specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/tests/test_vcs.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "specsmith"
|
|
7
|
-
version = "0.1.4.
|
|
7
|
+
version = "0.1.4.dev35"
|
|
8
8
|
description = "Forge governed project scaffolds from the Agentic AI Development Workflow Specification."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -168,6 +168,7 @@ def detect_project(root: Path) -> DetectionResult:
|
|
|
168
168
|
".ruff_cache",
|
|
169
169
|
".mypy_cache",
|
|
170
170
|
".work",
|
|
171
|
+
".specsmith",
|
|
171
172
|
"build",
|
|
172
173
|
"dist",
|
|
173
174
|
"target",
|
|
@@ -1117,6 +1118,14 @@ def generate_overlay(
|
|
|
1117
1118
|
agents_path.write_text(hub, encoding="utf-8")
|
|
1118
1119
|
created.append(agents_path)
|
|
1119
1120
|
|
|
1121
|
+
# Initialize credit tracking with unlimited budget
|
|
1122
|
+
specsmith_dir = target / ".specsmith"
|
|
1123
|
+
if not specsmith_dir.exists():
|
|
1124
|
+
from specsmith.credits import CreditBudget, save_budget
|
|
1125
|
+
|
|
1126
|
+
save_budget(target, CreditBudget()) # unlimited by default
|
|
1127
|
+
created.append(target / ".specsmith" / "credit-budget.json")
|
|
1128
|
+
|
|
1120
1129
|
# --- CI config (merge: only create if no CI detected) ---
|
|
1121
1130
|
if not result.existing_ci and result.vcs_platform:
|
|
1122
1131
|
try:
|
|
@@ -78,4 +78,10 @@ When user says `sync`: run `specsmith sync --project-dir .`
|
|
|
78
78
|
When user says `pr`: run `specsmith pr --project-dir .`
|
|
79
79
|
When user says `audit`: run `specsmith audit --project-dir .`
|
|
80
80
|
When user says `session-end`: run `specsmith session-end --project-dir .`
|
|
81
|
+
|
|
82
|
+
## Credit Tracking
|
|
83
|
+
At session end, record token usage:
|
|
84
|
+
`specsmith credits record --model <model> --provider anthropic \
|
|
85
|
+
--tokens-in <N> --tokens-out <N> --task "<desc>"`
|
|
86
|
+
Check budget: `specsmith credits summary`
|
|
81
87
|
"""
|
|
@@ -84,10 +84,19 @@ When user says `session-end`: run `specsmith session-end --project-dir .`
|
|
|
84
84
|
## Verification
|
|
85
85
|
Before marking any task complete, run: {verify_line}
|
|
86
86
|
|
|
87
|
+
## Credit Tracking
|
|
88
|
+
After completing tasks, record token usage:
|
|
89
|
+
```
|
|
90
|
+
specsmith credits record --model <model> --provider <provider> \
|
|
91
|
+
--tokens-in <N> --tokens-out <N> --task "<desc>"
|
|
92
|
+
```
|
|
93
|
+
Check budget: `specsmith credits summary`
|
|
94
|
+
|
|
87
95
|
## Rules
|
|
88
96
|
- Proposals before changes (no exceptions)
|
|
89
97
|
- Verify before recording completion
|
|
90
98
|
- Use execution shims (`scripts/exec.cmd` / `scripts/exec.sh`) for external commands
|
|
91
99
|
- Keep AGENTS.md under 200 lines
|
|
92
100
|
- Record every session in the ledger
|
|
101
|
+
- Record credit usage at session end
|
|
93
102
|
"""
|
|
@@ -80,6 +80,12 @@ def scaffold_project(config: ProjectConfig, target: Path) -> list[Path]:
|
|
|
80
80
|
except ValueError:
|
|
81
81
|
pass # Unknown platform — skip silently
|
|
82
82
|
|
|
83
|
+
# Initialize credit tracking with unlimited budget
|
|
84
|
+
from specsmith.credits import CreditBudget, save_budget
|
|
85
|
+
|
|
86
|
+
save_budget(target, CreditBudget()) # unlimited by default
|
|
87
|
+
created.append(target / ".specsmith" / "credit-budget.json")
|
|
88
|
+
|
|
83
89
|
# Git init
|
|
84
90
|
if config.git_init:
|
|
85
91
|
subprocess.run( # noqa: S603
|
|
@@ -127,4 +127,27 @@ def run_session_end(root: Path) -> SessionReport:
|
|
|
127
127
|
SessionCheck(name="audit", status="warn", message="Could not run audit")
|
|
128
128
|
)
|
|
129
129
|
|
|
130
|
+
# Credit spend summary for this session
|
|
131
|
+
try:
|
|
132
|
+
from specsmith.credits import get_summary
|
|
133
|
+
|
|
134
|
+
cs = get_summary(root)
|
|
135
|
+
if cs.entry_count > 0:
|
|
136
|
+
report.checks.append(
|
|
137
|
+
SessionCheck(
|
|
138
|
+
name="credits",
|
|
139
|
+
status="ok",
|
|
140
|
+
message=(
|
|
141
|
+
f"Credits: ${cs.total_cost_usd:.4f} total, "
|
|
142
|
+
f"{cs.session_count} session(s)"
|
|
143
|
+
),
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
for alert in cs.alerts:
|
|
147
|
+
report.checks.append(
|
|
148
|
+
SessionCheck(name="credit-alert", status="warn", message=alert)
|
|
149
|
+
)
|
|
150
|
+
except Exception: # noqa: BLE001
|
|
151
|
+
pass # Credits not configured — skip silently
|
|
152
|
+
|
|
130
153
|
return report
|
|
@@ -48,3 +48,14 @@ If a cheaper check fails, fix that before running more expensive checks.
|
|
|
48
48
|
- **low** — docs-only, single-file edits, small scaffolds
|
|
49
49
|
- **medium** — multi-file implementation, routine refactors, standard test runs
|
|
50
50
|
- **high** — architecture changes, large builds, broad audits
|
|
51
|
+
|
|
52
|
+
## Credit tracking
|
|
53
|
+
|
|
54
|
+
This project tracks AI credit spend automatically. At the end of each session:
|
|
55
|
+
|
|
56
|
+
1. Record usage: `specsmith credits record --model <model> --provider <provider> --tokens-in <N> --tokens-out <N> --task "<description>"`
|
|
57
|
+
2. Check budget: `specsmith credits summary`
|
|
58
|
+
3. If budget alerts appear, review with: `specsmith credits analyze`
|
|
59
|
+
|
|
60
|
+
Budget configuration: `specsmith credits budget --cap <USD> --alert-pct 80`
|
|
61
|
+
Credit data stored in `.specsmith/credits.json` (gitignored).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/architecture.md.j2
RENAMED
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/requirements.md.j2
RENAMED
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/docs/test-spec.md.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/roles.md.j2
RENAMED
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/rules.md.j2
RENAMED
|
File without changes
|
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/governance/workflow.md.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{specsmith-0.1.4.dev34 → specsmith-0.1.4.dev35}/src/specsmith/templates/scripts/setup.cmd.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|