elliottower/reproducible-science/tree/main/packages/repro/mod
repro
재현 가능한 연구 세션을 위한 Claude Code function hook 플러그인입니다. 동결된 PREREG.md 계획의 편집을 거부하고, 뒤에 .results/ 원장이 없는 원고나 분석 실행을 경고하며, 인용을 위한 다운로드 소스 URL을 기록하고 prereg·결과·인용 상태를 실시간 상태 행으로 보여 줍니다.
이 mod 소개
repro는 연구 세션이 기록을 지키도록 하는 reproducible-science 플러그인과 함께 배포되는 Claude Code mod입니다. Edit/Write 호출을 가로채 PREREG.md 파일을 동결 다이제스트로 만들고 편집을 거부합니다. .results/ 원장 없이 .tex/.Rmd/.qmd/.typ 원고나 분석 실행을 처음 편집한 사실을 기록하고, 다운로드한 PDF를 citations fetch용 url: 항목으로 기록하도록 모델에 요청합니다. 시스템 프롬프트에 seal/claim/freeze 게이트를 주입하고, 프롬프트 위에 prereg 동결, 원장 실행/봉인/클레임, 인용 확인을 요약한 어두운 상태 행을 표시합니다. '1 plan edited after freeze' 또는 '16 runs, nothing sealed' 같은 짧은 경고도 냅니다. 슬래시 명령에는 /repro-status(name, pick, list, auto로 프로젝트를 선택), /repro-verify, /repro-hide /repro-show가 있습니다. 이 mod는 set_project MCP-style 도구를 등록하고, 건드린 파일 경로에서 작업 프로젝트를 감지합니다. '/plugin marketplace add elliottower/reproducible-science'와 '/plugin install repro@reproducible-science'로 설치하며, PATH에 results, prereg, citations 명령이 있어야 합니다. 개발에는 'claude plugin validate'와 'claude plugin test'를 사용합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add elliottower/reproducible-science claude plugin install repro
원문 / README
repro
A Claude Code mod for research sessions. The reproducible-science plugin's hooks speak when a
number enters a manuscript unbound or a frozen plan changes, and they speak only in a project
that already keeps a ledger or a plan. This closes the other half: it works in a project that
keeps neither yet, and it can refuse.
It is a plugin of function hooks. That API is early access and changes between Claude Code
releases, so this ships beside the reproducible-science plugin and not inside it: a build
that cannot load it still loads the plugin.
What it does
| | |
|---|---|
| Refuses an edit to a frozen plan | An Edit or Write to a PREREG.md carrying a freeze digest is denied, with the instruction to record the change with prereg log. |
| Notes a manuscript with no ledger | The first edit to a .tex, .Rmd, .qmd or .typ with no .results/ ledger above it goes through, and the model is told no number in the file is bound to a run. |
| Notes an analysis with no ledger | The same, once per project, when a command runs an analysis. |
| Notes a downloaded source | After curl or wget saves a PDF, the model is told the address to record as url: in the claims file, so citations fetch can retrieve the same bytes for a reader. |
| Puts the gates in the system prompt | Seal before a run, claim before a number, freeze before a confirmatory analysis, with the state of the project's records as of the last turn. |
| Shows the state | One dim row above the prompt, refreshed at the end of each turn, with one field per tool. |
| Warns | The pinned line under the prompt appears only when something is wrong, a few words per problem. |
| /repro-status | The same readout on demand, with the sealed files hashed. Instant, and no model turn. |
| /repro-verify | Checks every pinned quotation of the working project against its source, which takes minutes on a large project, and keeps the count for the readout. |
| /repro-hide, /repro-show | Hides the readout above the prompt, and shows it again. A warning still appears while it is hidden. |
The status row
study · prereg: 1/1 frozen · results: 3 runs, 2 sealed, 4 claims · citations: 120/120 found
prereg is frozen plans over all plans, or none drafted. results counts the ledger's runs, seals and claims.
citations is the last full check by /repro-verify, and before one has run it is the count
pinned: citations: 120 pinned, not verified. Checking quotations takes minutes on a large
project, so the row never runs it. A check that does not finish in a minute marks its own field
not read (timed out) and leaves the others standing.
The warnings, each on the pinned line as repro: ...:
| | |
|---|---|
| 1 plan edited after freeze | a frozen PREREG.md no longer matches its digest |
| ledger truncated, edited, corrupt | the chain does not verify |
| ledger rewritten after timestamp | a timestamp proof contradicts the chain |
| 2 sealed files changed | after /repro-status, which hashes the sealed files |
| 16 runs, nothing sealed | runs are recorded and no input was sealed |
| 3 runs, no plan frozen | runs are recorded and no plan is frozen |
The working project
A session started in one folder often edits files in another, so the project is read off the
paths the tools touch: the nearest directory above a touched file that holds a .results/
ledger, a claims/ directory, a PREREG.md or a paper/ directory.
/repro-status the working project's state
/repro-status <part of a name> set the working project, among the folders beside the session's
/repro-status pick choose one from a list
/repro-status list print them
/repro-status auto go back to following the files
The model can set it too, through the set_project tool the mod registers.
Install
/plugin marketplace add elliottower/reproducible-science
/plugin install repro@reproducible-science
It needs the results, prereg and citations commands on PATH.
Develop
claude plugin validate packages/repro/mod
claude plugin test packages/repro/mod
The tests stand in for the engine and need no network. They do not run in this repository's CI, which has no Claude Code.
