Spec-driven research workflow: a dashboard, Claude Code subagents, and a refresh/cache pipeline for reproducible compute + LaTeX reports.
Project description
specthis
A spec-driven research workflow: a dashboard, Claude Code subagents, and a refresh/cache pipeline for projects that produce reproducible compute artefacts (typically JSON) and assemble them into a LaTeX (or similar) report.
Status: early scaffold. The CLI shell and the agent / spec templates work. The dashboard renderer, lock manager, S3 cache, and refresh orchestrator are stubs awaiting porting from the reference implementation. See Roadmap.
What it is
A small package that gives a research project:
- A spec format. Each
compute-*.md/report-*.mdfile inspecs/declares the path of a script that produces a JSON artefact (compute) or a LaTeX figure / table (report), plus aStatus:line that pins whether the script satisfies the contract. - A dashboard.
specs/specs.htmlrenders the directory as a browsable view of entries, their statuses, the produced artefacts, and the cross-references between compute outputs and report inputs. - A content-hash lock.
specs/_lock.jsonrecords the hash of each entry's spec + script content at the moment it was certifiedscript ready. The refresh orchestrator refuses to rerun an entry whose spec or script has drifted from the certified hash without an explicit re-audit. - Three Claude Code subagents. Drop-in agents for the three
operations a human or LLM does daily on a spec directory:
spec-auditor— read-only consistency check (operation 1).spec-implementer— author a missing script for ascript TBDentry (operation 3).experiment-runner— kick off a long-running script in the background, monitor its log for milestones / errors, report completion.
- (Optional) An S3 compute cache. Push the
results/<entry>/directory to S3 keyed by the spec'sinputs_certifiedhash, so collaborators can pull instead of re-running.
Install
pip install specthis # core: CLI + agent templates
pip install "specthis[s3]" # adds the S3 cache backend
Scaffold a project
In any project directory:
specthis install # writes the three agents into .claude/agents/
specthis init # creates specs/ with README.md + AGENTS.md templates
After init, edit specs/README.md and add your first
compute-<name>.md / report-<name>.md pair.
CLI
specthis install Copy agent templates into <cwd>/.claude/agents/
specthis init Create specs/ skeleton (README.md + AGENTS.md)
specthis audit Run the consistency audit (stub — port pending)
specthis refresh Rerun stale entries respecting the lock (stub — port pending)
specthis serve Start a local dev server for specs.html (stub — port pending)
specthis lock Manage the content-hash lock file (stub — port pending)
The spec format in one paragraph
Every spec file under specs/ carries YAML frontmatter
(name, kind, depends_on) and one of two body shapes:
kind: compute— a## Scriptprose section describing how the script is laid out, plus one or more### entry-nameblocks each carryingScript:,Output:(a JSON path), andStatus:.kind: report— same shape, but per-entry fields areExport script:,Export outputs:(LaTeX paths), andStatus:, plus frontmatterhost_doc:andsection_label:that route the artefacts into a section of a top-level.texdocument.
Status: is script TBD (the script does not satisfy the contract)
or script ready (it does, and a smoke-test passed). The
scripts ran vs outputs exist on disk axis is observed by the
auditor and the dashboard — it is not part of the spec.
See src/specthis/templates/specs/README.md for the full convention.
Roadmap
The reference implementation (a ~7000 LOC private codebase) is being ported into this package one module at a time. Order:
- agent templates + spec format docs — done (this scaffold).
specthis install/specthis init— done.specthis audit— port the index-based auditor.specthis serve— port the HTML dashboard renderer +_index.json/_routing.jsonexporter.specthis lock— port the content-hash lock manager.specthis refresh— port the Makefile-driven refresh orchestrator.specthis cache— port the S3 backend.
Each module ships with a config-driven surface (paths configurable
via specthis.toml), no hard-coded assumptions about the host
project's layout beyond the defaults documented in the spec format.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specthis-0.0.1.tar.gz.
File metadata
- Download URL: specthis-0.0.1.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b32418be7c34fff5d94c6d65afcca0bb45980c9c7e4e7eb632c9899e2594c7
|
|
| MD5 |
1a6399581f1c88a6ed3eeac2d8a1e444
|
|
| BLAKE2b-256 |
d3f5ec72592cf9ae60f2a9c81d9b99872a2176b8573a0d1f54ae490b83d721c6
|
File details
Details for the file specthis-0.0.1-py3-none-any.whl.
File metadata
- Download URL: specthis-0.0.1-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16ff885b726513c4a16d8d2cd9e02eaac278d5776bfdf1b4f678ed8c70d4dec9
|
|
| MD5 |
34cbeb773acec38361c64ec787ed0007
|
|
| BLAKE2b-256 |
3ec9c82363ba3ed25d32f3bd7482764dbe1b3079e76e085244d3515c1752ad46
|