@pepps233/mendr 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jay Yu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/Pepps233/mendr/main/assets/mendr_pipeline.png" alt="mendr autonomous pull request review workflow banner" width="80%">
3
+ </p>
4
+
5
+ # mendr
6
+
7
+ [![Release](https://img.shields.io/badge/release-v0.1.0-blue)](package.json)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
+ [![Language: TypeScript](https://img.shields.io/badge/language-TypeScript-3178c6.svg)](tsconfig.json)
10
+ [![CI](https://github.com/Pepps233/mendr/actions/workflows/ci.yml/badge.svg)](https://github.com/Pepps233/mendr/actions/workflows/ci.yml)
11
+
12
+ **mendr** orchestrates your installed Codex or Claude Code CLIs as short-lived workers, running through their local CLIs on your existing subscriptions, so there are no API keys to collect or manage. Point it at a GitHub pull request, choose `claude` or `codex`, and it scans the PR for scoped issues; when it finds a problem, it launches a fix agent, commits and pushes the fix, then reviews the PR again, repeating until the PR is clean or the configured round cap is reached.
13
+
14
+ **mendr** is built on principles from the [Loop Engineering paper](https://drive.google.com/file/d/1qzKI4DKnyHRpXK1J3ATPqwaqLc0iNu-M/view): repeated discovery, handoff, verification, persistence, and scheduling. In practice, that means it:
15
+
16
+ - Treats the main loop as deterministic TypeScript orchestration, not another long-running LLM session.
17
+ - Launches a fresh one-shot review or fix agent for each step.
18
+ - Automates the review, fix, and validate cycle instead of leaving you to manually reprompt agents.
19
+ - Carries context through `report.md`.
20
+ - Writes review state to disk so `mendr ls` and `mendr view <id>` can inspect in-flight work.
21
+ - Posts one final PR summary comment instead of scattering review noise across the PR.
22
+
23
+ Every review and fix step starts a new agent process to isolate reviewer from fixer.
24
+ Claude Code sessions run through `claude -p` with JSON output and repository access through `--add-dir`.
25
+ By default, Claude Code uses `claude-opus-4-8` with `high` effort.
26
+ Codex sessions run through `codex exec` with `--sandbox workspace-write`, `-C <repo>`, and final-message capture.
27
+ By default, Codex uses `gpt-5.5` with `xhigh` effort.
28
+
29
+ The orchestrator never uses `--continue`, `--resume`, or a reused agent process.
30
+ This keeps each step isolated and releases memory when the child process exits.
31
+ Continuity comes from `report.md`, which is embedded in every subsequent review and fix prompt.
32
+
33
+ ## CLI
34
+
35
+ ```sh
36
+ mendr <agent> <pr> [--rounds <n>] [--model <model>] [--effort <effort>]
37
+ mendr ls
38
+ mendr view <id>
39
+ mendr stop <id>
40
+ mendr kill <id>
41
+ ```
42
+
43
+ ![mendr](https://raw.githubusercontent.com/Pepps233/mendr/main/assets/mendr.gif)
44
+
45
+ `agent` must be `claude` or `codex`.
46
+ `pr` may be a pull request number or a pull request URL.
47
+ `--rounds` and `-r` set the maximum review and fix iterations, with a default of `3`.
48
+ `--model` and `-m` override the agent model for that review.
49
+ `--effort` and `-e` override the agent effort for that review.
50
+ Codex accepts `low`, `medium`, `high`, or `xhigh`.
51
+ Claude Code accepts `low`, `medium`, `high`, `xhigh`, or `max`.
52
+ Set `MENDR_CODEX_MODEL`, `MENDR_CODEX_EFFORT`, `MENDR_CLAUDE_MODEL`, or `MENDR_CLAUDE_EFFORT` to change unattended defaults.
53
+
54
+ ## Example
55
+
56
+ ```sh
57
+ mendr codex 42
58
+ mendr ls
59
+ mendr view swift-otter-3f9a
60
+ ```
61
+
62
+ After the daemon starts, the original terminal can close.
63
+ The review continues in the background, and `view` follows the file-backed status stream.
64
+
65
+ ## Requirements
66
+
67
+ - Node.js `20` or newer.
68
+ - Git.
69
+ - GitHub CLI `gh`, installed and authenticated.
70
+ - One or both agent CLIs, depending on usage:
71
+ - `claude` for Claude Code.
72
+ - `codex` for Codex.
73
+
74
+ **mendr** shells out to installed Codex or Claude Code CLIs and uses your existing subscriptions and local authentication.
75
+ It does not require API keys, collect credentials, or manage model provider secrets.
76
+
77
+ ## Installation
78
+
79
+ ```sh
80
+ npm install -g @pepps233/mendr
81
+ ```
82
+
83
+ After installation, run:
84
+
85
+ ```sh
86
+ mendr --help
87
+ ```
88
+
89
+ ## Report Format
90
+
91
+ The final pull request comment is generated from `report.md`.
92
+ The report starts with exactly one Mendr summary heading and groups resolved and unresolved issues under dedicated sections.
93
+ Each issue block includes a hidden fingerprint comment so same-title issues remain distinct.
94
+
95
+ ```md
96
+ ## Summary by Mendr
97
+
98
+ ### Resolved Issues
99
+
100
+ #### <issue found by review agent>
101
+ <!-- mendr-issue-fingerprint: <encoded issue fingerprint> -->
102
+ **Commit:** <commit sha>
103
+ <two sentences on how it was fixed>
104
+
105
+ ### Unresolved Issues
106
+
107
+ #### <issue requiring follow-up>
108
+ <!-- mendr-issue-fingerprint: <encoded issue fingerprint> -->
109
+ <why Mendr could not safely record a fix>
110
+
111
+ ### Round Cap
112
+
113
+ Reached after <round count> rounds with <open issue count> open issues:
114
+ - <open issue found by review agent>
115
+ ```
116
+
117
+ When the round cap is reached or a fix fails, the report records that state instead of claiming success.
118
+
119
+ ## Development
120
+
121
+ Clone the repository and install dependencies:
122
+
123
+ ```sh
124
+ npm ci
125
+ ```
126
+
127
+ Run the local checks:
128
+
129
+ ```sh
130
+ npm run typecheck
131
+ npm test
132
+ npm run build
133
+ ```
134
+
135
+ ## Contributing
136
+
137
+ Contributions are welcome, and changes should keep the orchestration model deterministic and testable.
138
+ Before opening a pull request:
139
+
140
+ 1. Create a focused branch.
141
+ 2. Add or update tests for behavior changes.
142
+ 3. Run `npm run typecheck`, `npm test`, and `npm run build`.
143
+ 4. Follow `.github/pull_request_template.md`.
144
+ 5. Include clear reasoning for CLI, daemon, agent-driver, state, or report-format changes.
145
+
146
+ Do not commit generated build output unless a maintainer explicitly asks for it.
147
+ Do not edit generated files manually.
148
+
149
+ ## License
150
+
151
+ **mendr** is released under the MIT License.
152
+ See [LICENSE](LICENSE) for details.