ralphctl 0.4.2 → 0.4.3
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/README.md +13 -11
- package/dist/{add-CIM72NE3.mjs → add-MG26JWBP.mjs} +6 -6
- package/dist/{add-GX7P7XTT.mjs → add-ZZYL4BSF.mjs} +5 -4
- package/dist/chunk-2FT37OZX.mjs +1071 -0
- package/dist/{chunk-CTP2A436.mjs → chunk-D2HWXEHH.mjs} +9 -2
- package/dist/{chunk-JOQO4HMM.mjs → chunk-EGUFQNRB.mjs} +10 -10
- package/dist/{chunk-TKPTT2UG.mjs → chunk-LCY32RW4.mjs} +621 -990
- package/dist/{chunk-NUYQK5MN.mjs → chunk-LDSG7G2T.mjs} +1 -1
- package/dist/{chunk-7JLZQICD.mjs → chunk-MDE6KPJQ.mjs} +6 -6
- package/dist/{chunk-3QBEBKMZ.mjs → chunk-Q4AVHUZL.mjs} +7 -7
- package/dist/{chunk-YCDUVPRT.mjs → chunk-RQGD5WS6.mjs} +4 -72
- package/dist/{chunk-D2YGPLIV.mjs → chunk-TDBEEHTS.mjs} +213 -8
- package/dist/{chunk-GL7MKLLS.mjs → chunk-WOMGKKZY.mjs} +152 -179
- package/dist/{chunk-FKMKOWLA.mjs → chunk-WZTY77GY.mjs} +75 -1
- package/dist/cli.mjs +68 -19
- package/dist/{create-7WFSCMP4.mjs → create-PQK6KKRD.mjs} +5 -5
- package/dist/{handle-BBAZJ44Y.mjs → handle-SYVCFI6Y.mjs} +1 -1
- package/dist/{mount-ISHZM36X.mjs → mount-2ANLHHQE.mjs} +556 -318
- package/dist/{project-2IE7VWDB.mjs → project-JF47ZWMF.mjs} +2 -2
- package/dist/prompts/check-script-discover.md +69 -0
- package/dist/prompts/repo-onboard.md +111 -0
- package/dist/{resolver-EOE5WUMV.mjs → resolver-PG2DZEBX.mjs} +3 -3
- package/dist/{sprint-OGOFEJJH.mjs → sprint-54DOSIJK.mjs} +3 -3
- package/dist/{start-76JKJQIH.mjs → start-2SZTBKGF.mjs} +7 -5
- package/package.json +6 -6
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
removeProjectRepo,
|
|
12
12
|
resolveRepoPath,
|
|
13
13
|
updateProject
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-LDSG7G2T.mjs";
|
|
15
|
+
import "./chunk-D2HWXEHH.mjs";
|
|
16
16
|
import {
|
|
17
17
|
ProjectExistsError,
|
|
18
18
|
ProjectNotFoundError
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Check-Script Discovery Protocol
|
|
2
|
+
|
|
3
|
+
You are a build-system analyst. Inspect the repository at the path below and propose a single shell command that the
|
|
4
|
+
harness can run after every AI task to verify the working tree still passes the project's own quality gates (typecheck
|
|
5
|
+
/ lint / tests / build — whatever the project considers "green"). Static ecosystem detection has already returned
|
|
6
|
+
nothing useful, which usually means the project is polyglot, custom, or uses an uncommon build tool.
|
|
7
|
+
|
|
8
|
+
<harness-context>
|
|
9
|
+
This invocation is read-only — do not modify the working tree, do not create files, do not run network calls, do not
|
|
10
|
+
execute the candidate command. The harness owns execution; your only job is to read configuration files and produce a
|
|
11
|
+
recommendation. The user will see your suggestion as an editable default and can accept, modify, or discard it.
|
|
12
|
+
</harness-context>
|
|
13
|
+
|
|
14
|
+
<context>
|
|
15
|
+
|
|
16
|
+
**Repository path:** `{{REPO_PATH}}`
|
|
17
|
+
|
|
18
|
+
</context>
|
|
19
|
+
|
|
20
|
+
<constraints>
|
|
21
|
+
|
|
22
|
+
- Inspect only the files explicitly listed below — do not crawl the entire tree, do not open source files, do not read
|
|
23
|
+
vendored or generated directories
|
|
24
|
+
- Prefer commands that exit non-zero on failure and zero on success — that is the contract the harness relies on to
|
|
25
|
+
decide whether a task passes the post-task gate
|
|
26
|
+
- Combine multiple gates with `&&` so the first failure aborts the chain — example shape: `<install> && <typecheck> &&
|
|
27
|
+
<lint> && <test>` (substitute the project's actual tools)
|
|
28
|
+
- If you find a single canonical entry point — a `Makefile` target like `make check`, a `mise` task, or a top-level
|
|
29
|
+
script in `scripts/` — prefer that over reconstructing the chain by hand
|
|
30
|
+
- Never embed credentials, environment-specific paths, or commands that touch remote services
|
|
31
|
+
- Output exactly one `<check-script>` block, on its own line, containing the bare command (no markdown fences, no
|
|
32
|
+
surrounding prose)
|
|
33
|
+
- If the repo contains nothing actionable, emit `<check-script></check-script>` with empty content — the harness will
|
|
34
|
+
treat that as "no check script" and fall through to manual entry
|
|
35
|
+
|
|
36
|
+
</constraints>
|
|
37
|
+
|
|
38
|
+
<examples>
|
|
39
|
+
|
|
40
|
+
- Polyglot Node + Python:
|
|
41
|
+
`<check-script>pnpm install && pnpm typecheck && pnpm test && uv run pytest</check-script>`
|
|
42
|
+
- Makefile-driven:
|
|
43
|
+
`<check-script>make check</check-script>`
|
|
44
|
+
- mise tasks:
|
|
45
|
+
`<check-script>mise run ci</check-script>`
|
|
46
|
+
- Bare scripts directory:
|
|
47
|
+
`<check-script>./scripts/verify.sh</check-script>`
|
|
48
|
+
|
|
49
|
+
</examples>
|
|
50
|
+
|
|
51
|
+
## Files to Inspect
|
|
52
|
+
|
|
53
|
+
Read whichever of these exist; ignore the rest:
|
|
54
|
+
|
|
55
|
+
- `package.json` — `scripts` block (look for `test`, `typecheck`, `lint`, `check`, `ci`, `verify`)
|
|
56
|
+
- `pyproject.toml` — `[tool.poetry.scripts]`, `[tool.uv]`, `[tool.hatch]`, `[project.scripts]`
|
|
57
|
+
- `Makefile` — top-level targets (`check`, `test`, `ci`, `verify`, `all`)
|
|
58
|
+
- `mise.toml` / `.mise.toml` — `[tasks]` block
|
|
59
|
+
- `.tool-versions` — runtime hints only; combine with the above
|
|
60
|
+
- `.github/workflows/*.yml` — CI definitions are the most authoritative source of "what passes"
|
|
61
|
+
- `README.md` — explicit "running tests" / "development" sections, if present
|
|
62
|
+
- `flake.nix` — `apps`, `checks`, `devShells.default.shellHook`
|
|
63
|
+
- `WORKSPACE` / `BUILD` — Bazel target conventions (`bazel test //...`)
|
|
64
|
+
- `scripts/` — top-level entries only (do not recurse); look for `check`, `verify`, `ci`, `test`
|
|
65
|
+
|
|
66
|
+
## Output Contract
|
|
67
|
+
|
|
68
|
+
After your inspection, emit a single `<check-script>…</check-script>` element on its own line. Nothing else — no
|
|
69
|
+
preamble, no explanation, no markdown. The harness parses the first match with a strict regex.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Repository Onboarding Protocol
|
|
2
|
+
|
|
3
|
+
You are a senior engineer preparing a repository for agentic work. Your job is to produce a minimal, high-signal
|
|
4
|
+
project context file, written to `{{FILE_NAME}}` at the repo root, that captures the _non-inferable_ facts an
|
|
5
|
+
autonomous coding agent needs — custom tooling, non-standard commands, security constraints, and performance
|
|
6
|
+
boundaries — and to suggest a single shell check command the harness can run as a post-task gate. Empirical
|
|
7
|
+
evidence: large, prose-heavy context files _reduce_ agent success rate. Keep it small and surgical.
|
|
8
|
+
|
|
9
|
+
<harness-context>
|
|
10
|
+
This invocation is read-only — do not modify the working tree, do not create files, do not run network calls, do not
|
|
11
|
+
execute the candidate command. The harness owns execution. The user reviews your proposal before anything is written.
|
|
12
|
+
</harness-context>
|
|
13
|
+
|
|
14
|
+
<context>
|
|
15
|
+
|
|
16
|
+
**Repository path:** `{{REPO_PATH}}`
|
|
17
|
+
**Target file:** `{{FILE_NAME}}` — the harness will write the body you emit to this path.
|
|
18
|
+
**Mode:** `{{MODE}}` — one of `bootstrap` (no prior project context file), `adopt` (authored project context file
|
|
19
|
+
exists, do not clobber), `update` (prior harness-managed project context file exists; propose a prune + augment).
|
|
20
|
+
**Project type hint:** `{{PROJECT_TYPE}}`
|
|
21
|
+
**Static check-script suggestion (may be empty):** `{{CHECK_SCRIPT_SUGGESTION}}`
|
|
22
|
+
|
|
23
|
+
{{EXISTING_AGENTS_MD}}
|
|
24
|
+
|
|
25
|
+
</context>
|
|
26
|
+
|
|
27
|
+
<constraints>
|
|
28
|
+
|
|
29
|
+
- Inspect only configuration and metadata files — `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `Makefile`,
|
|
30
|
+
`mise.toml`, `.tool-versions`, `.github/workflows/*.yml`, `README.md`, top-level `scripts/` entries, `flake.nix`.
|
|
31
|
+
Do not crawl source trees, do not read vendored or generated directories.
|
|
32
|
+
- The proposed project context file MUST have exactly these H2 sections, in this order — omit none:
|
|
33
|
+
1. `## Project Overview` — one-paragraph description of what the repo is and who uses it.
|
|
34
|
+
2. `## Build & Run` — exact commands to install dependencies and run the project locally.
|
|
35
|
+
3. `## Testing` — exact commands to run unit / integration / end-to-end tests.
|
|
36
|
+
4. `## Architecture` — three to six bullets naming the top-level modules or layers, with a one-line role each.
|
|
37
|
+
5. `## Implementation Style` — conventions that can't be inferred from a file listing (naming, error handling,
|
|
38
|
+
logging, imports).
|
|
39
|
+
6. `## Security & Safety` — secrets / auth / network boundaries the agent must respect.
|
|
40
|
+
7. `## Performance Constraints` — hot paths, latency budgets, or memory limits the agent must honour.
|
|
41
|
+
- Security & Safety and Performance Constraints are mandatory — when the repo offers no clues, prefix the body with
|
|
42
|
+
`LOW-CONFIDENCE:` and state what _is_ known (e.g. "LOW-CONFIDENCE: no explicit budgets; default to O(n) on request
|
|
43
|
+
hot paths"). Never drop these sections.
|
|
44
|
+
- Implementation Style entries must reflect conventions demonstrably present in at least two files of the repository —
|
|
45
|
+
when you cannot cite at least two occurrences (mentally, not in the output), prefix the bullet with
|
|
46
|
+
`LOW-CONFIDENCE:`. Do not invent conventions.
|
|
47
|
+
- Do not embed tool-specific slash commands, hooks, subagent definitions, MCP server configurations, or IDE settings
|
|
48
|
+
in this file. Those belong in tool-specific directories (e.g. `.claude/`, `.cursor/`). This file is facts about the
|
|
49
|
+
repository only.
|
|
50
|
+
- Hard caps: exactly one H1, at most 7 H2 sections, no H4 or deeper headings, under 300 lines total. Prefer bullets
|
|
51
|
+
and short sentences — target a Flesch reading ease above 40.
|
|
52
|
+
- Use the em-dash `—` (not `-`) for explanatory clauses in prose. Ordinary hyphens in identifiers and compound words
|
|
53
|
+
are fine.
|
|
54
|
+
- Never embed credentials, user-specific paths, or commands that touch remote services.
|
|
55
|
+
- Do not hardcode package-manager commands outside the tooling context — every command you cite must actually resolve
|
|
56
|
+
in this repository (e.g. only write `pnpm lint` when `package.json` has a `lint` script).
|
|
57
|
+
- In `adopt` mode: treat the existing body as authoritative. Emit only the _additions_ you propose as new sections;
|
|
58
|
+
never rewrite or reorder the user's prose.
|
|
59
|
+
- In `update` mode: emit the full replacement body AND a short `<changes>` block listing the non-obvious
|
|
60
|
+
prunes/augments (`- removed stale command "npm run foo"`, `- added missing Security section`).
|
|
61
|
+
|
|
62
|
+
</constraints>
|
|
63
|
+
|
|
64
|
+
<examples>
|
|
65
|
+
|
|
66
|
+
- Minimal Node.js API:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
# Acme API
|
|
70
|
+
|
|
71
|
+
## Project Overview
|
|
72
|
+
Internal REST service for order ingestion — consumed by the dashboard and the worker fleet.
|
|
73
|
+
|
|
74
|
+
## Build & Run
|
|
75
|
+
- `pnpm install` then `pnpm dev` for local hot-reload on port 3000.
|
|
76
|
+
|
|
77
|
+
## Testing
|
|
78
|
+
- `pnpm test` — unit + integration (Vitest).
|
|
79
|
+
|
|
80
|
+
## Architecture
|
|
81
|
+
- `src/routes/` — HTTP surface, thin controllers.
|
|
82
|
+
- `src/services/` — business logic, pure where possible.
|
|
83
|
+
- `src/db/` — Drizzle schema and query builders.
|
|
84
|
+
|
|
85
|
+
## Implementation Style
|
|
86
|
+
- Result<T, Err> at service boundaries, never throw for expected failures.
|
|
87
|
+
- Zod-validated request bodies, no untyped inputs.
|
|
88
|
+
|
|
89
|
+
## Security & Safety
|
|
90
|
+
- All inbound requests are authenticated by upstream gateway; never trust the `X-User-Id` header directly.
|
|
91
|
+
- Do not log PII — scrub emails and phone numbers from error payloads.
|
|
92
|
+
|
|
93
|
+
## Performance Constraints
|
|
94
|
+
- LOW-CONFIDENCE: no explicit budgets documented; default to p95 under 100 ms for read endpoints.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</examples>
|
|
98
|
+
|
|
99
|
+
## Output Contract
|
|
100
|
+
|
|
101
|
+
After your inspection, emit exactly two elements on their own lines — nothing else (no preamble, no summary):
|
|
102
|
+
|
|
103
|
+
1. `<agents-md>…full project context file body…</agents-md>` — the proposed file, obeying every constraint above.
|
|
104
|
+
2. `<check-script>…single shell command…</check-script>` — one command the harness can run as a post-task gate.
|
|
105
|
+
Empty content (`<check-script></check-script>`) is allowed when no gate can be inferred.
|
|
106
|
+
|
|
107
|
+
In `update` mode, also emit a third element describing the delta:
|
|
108
|
+
|
|
109
|
+
3. `<changes>…bullet list…</changes>` — one bullet per non-obvious prune or addition.
|
|
110
|
+
|
|
111
|
+
No markdown fences around the elements. No commentary between them.
|
|
@@ -11,7 +11,7 @@ var dynamicResolvers = {
|
|
|
11
11
|
"--project": async () => {
|
|
12
12
|
const result = await wrapAsync(
|
|
13
13
|
async () => {
|
|
14
|
-
const { listProjects } = await import("./project-
|
|
14
|
+
const { listProjects } = await import("./project-JF47ZWMF.mjs");
|
|
15
15
|
return listProjects();
|
|
16
16
|
},
|
|
17
17
|
(err) => new IOError("Failed to load projects for completion", err instanceof Error ? err : void 0)
|
|
@@ -45,7 +45,7 @@ var configValueCompletions = {
|
|
|
45
45
|
async function getSprintCompletions() {
|
|
46
46
|
const result = await wrapAsync(
|
|
47
47
|
async () => {
|
|
48
|
-
const { listSprints } = await import("./sprint-
|
|
48
|
+
const { listSprints } = await import("./sprint-54DOSIJK.mjs");
|
|
49
49
|
return listSprints();
|
|
50
50
|
},
|
|
51
51
|
(err) => new IOError("Failed to load sprints for completion", err instanceof Error ? err : void 0)
|
|
@@ -133,7 +133,7 @@ async function resolveCompletions(program, ctx) {
|
|
|
133
133
|
function getCommandPath(cmd) {
|
|
134
134
|
const parts = [];
|
|
135
135
|
let current = cmd;
|
|
136
|
-
while (current
|
|
136
|
+
while (current.parent) {
|
|
137
137
|
parts.unshift(current.name());
|
|
138
138
|
current = current.parent;
|
|
139
139
|
}
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
logSprintBaselines,
|
|
12
12
|
resolveSprintId,
|
|
13
13
|
saveSprint
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-RQGD5WS6.mjs";
|
|
15
|
+
import "./chunk-WZTY77GY.mjs";
|
|
16
16
|
import "./chunk-IWXBJD2D.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-D2HWXEHH.mjs";
|
|
18
18
|
import {
|
|
19
19
|
NoCurrentSprintError,
|
|
20
20
|
SprintNotFoundError,
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
parseSprintStartArgs,
|
|
4
4
|
sprintStartCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-LCY32RW4.mjs";
|
|
6
|
+
import "./chunk-2FT37OZX.mjs";
|
|
7
|
+
import "./chunk-EGUFQNRB.mjs";
|
|
7
8
|
import "./chunk-CFUVE2BP.mjs";
|
|
8
9
|
import "./chunk-747KW2RW.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-LDSG7G2T.mjs";
|
|
11
|
+
import "./chunk-RQGD5WS6.mjs";
|
|
12
|
+
import "./chunk-WZTY77GY.mjs";
|
|
11
13
|
import "./chunk-IWXBJD2D.mjs";
|
|
12
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-D2HWXEHH.mjs";
|
|
13
15
|
import "./chunk-57UWLHRH.mjs";
|
|
14
16
|
export {
|
|
15
17
|
parseSprintStartArgs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ralphctl",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Agent harness for long-running AI coding tasks — orchestrates Claude Code & GitHub Copilot across repositories",
|
|
5
5
|
"homepage": "https://github.com/lukas-grigis/ralphctl",
|
|
6
6
|
"type": "module",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@types/node": "^25.6.0",
|
|
54
54
|
"@types/react": "^19.2.14",
|
|
55
55
|
"@types/tabtab": "^3.0.4",
|
|
56
|
-
"@vitest/coverage-v8": "^4.1.
|
|
57
|
-
"eslint": "^10.2.
|
|
56
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
57
|
+
"eslint": "^10.2.1",
|
|
58
58
|
"eslint-config-prettier": "^10.1.8",
|
|
59
59
|
"globals": "^17.5.0",
|
|
60
60
|
"husky": "^9.1.7",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"tsup": "^8.5.1",
|
|
65
65
|
"tsx": "^4.21.0",
|
|
66
66
|
"typescript": "^5.9.3",
|
|
67
|
-
"typescript-eslint": "^8.
|
|
68
|
-
"vitest": "^4.1.
|
|
67
|
+
"typescript-eslint": "^8.59.0",
|
|
68
|
+
"vitest": "^4.1.5"
|
|
69
69
|
},
|
|
70
70
|
"lint-staged": {
|
|
71
|
-
"*.ts": [
|
|
71
|
+
"*.{ts,tsx}": [
|
|
72
72
|
"eslint --cache --fix",
|
|
73
73
|
"prettier --write"
|
|
74
74
|
],
|