@valescoagency/runway 0.14.2 → 0.15.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/README.md +8 -1
- package/dist/config.js +22 -0
- package/dist/dashboard/projector.js +90 -0
- package/dist/dashboard/server.js +51 -2
- package/dist/dashboard/storage.js +129 -0
- package/dist/dashboard/views.js +77 -1
- package/dist/github.js +350 -0
- package/dist/orchestrator.js +44 -0
- package/dist/prompts.js +99 -0
- package/dist/shepherd.js +707 -0
- package/package.json +1 -1
- package/prompts/shepherd-ci-fix.md +47 -0
- package/prompts/shepherd-rebase.md +40 -0
- package/prompts/shepherd-review-fix.md +40 -0
- package/prompts/shepherd-review-respond.md +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valescoagency/runway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Linear-driven orchestrator + scaffolder for coding agents on Sandcastle. `runway init` scaffolds a target repo (sandcastle + varlock + 1Password); `runway run` drains a Linear queue against it; `runway doctor`, `runway upgrade`, `runway upgrade-repo` round out the lifecycle.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
You are an autonomous coding agent. The PR for `{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}` is open but a required CI check is failing.
|
|
2
|
+
|
|
3
|
+
Your only job is to make `{{CHECK_NAME}}` pass on the next CI run, then push. You are NOT extending the feature, addressing review feedback, or touching unrelated files.
|
|
4
|
+
|
|
5
|
+
# Issue context
|
|
6
|
+
|
|
7
|
+
**{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}**
|
|
8
|
+
|
|
9
|
+
{{ISSUE_DESCRIPTION}}
|
|
10
|
+
|
|
11
|
+
# CI failure
|
|
12
|
+
|
|
13
|
+
Required check `{{CHECK_NAME}}` failed on branch `{{BRANCH}}`. Trailing log:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
{{LOG_TAIL}}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
# What to do
|
|
20
|
+
|
|
21
|
+
1. Read the log tail above to understand which test, lint rule, type error, or build step failed.
|
|
22
|
+
2. Locate the root cause in the code on `{{BRANCH}}` — not by adding new features, but by fixing what's broken.
|
|
23
|
+
3. Apply the smallest change that makes `{{CHECK_NAME}}` pass:
|
|
24
|
+
- If a test is failing because of a real bug, fix the bug — don't delete the test or `.skip` it.
|
|
25
|
+
- If a test is failing because of a wrong assertion (the test was wrong, not the code), fix the assertion.
|
|
26
|
+
- If lint/format is failing, run the formatter and commit the result.
|
|
27
|
+
- If a type error fires, fix the type at the call site, not by adding `any` or `@ts-expect-error`.
|
|
28
|
+
4. Run the failing check locally to confirm it now passes: figure out the command from `{{CHECK_NAME}}` (e.g., `pnpm test`, `pnpm typecheck`, `pnpm lint`).
|
|
29
|
+
5. Commit with a focused message (`fix({{ISSUE_IDENTIFIER}}): make {{CHECK_NAME}} pass` is fine).
|
|
30
|
+
6. Push with **`git push origin {{BRANCH}}`** — a normal push, NOT `--force` or `--force-with-lease`. You are appending a commit, not rewriting history.
|
|
31
|
+
|
|
32
|
+
# When to give up (BLOCKED)
|
|
33
|
+
|
|
34
|
+
Give up and report `IMPL: BLOCKED — <reason>` when:
|
|
35
|
+
|
|
36
|
+
- The CI failure exposes a real design problem that needs human judgment (e.g., the failing test reveals an inconsistency in the issue spec).
|
|
37
|
+
- Fixing the failure would require changes outside the scope of `{{ISSUE_IDENTIFIER}}` (e.g., the test failure is caused by a dependency upgrade that needs a separate ticket).
|
|
38
|
+
- The failure can't be reproduced locally and the log tail doesn't give enough information to diagnose.
|
|
39
|
+
|
|
40
|
+
The HITL escalation reason should name `{{CHECK_NAME}}` and the specific failure mode.
|
|
41
|
+
|
|
42
|
+
# When you're done
|
|
43
|
+
|
|
44
|
+
- `{{CHECK_NAME}}` passes locally
|
|
45
|
+
- The commit is focused (no unrelated changes)
|
|
46
|
+
- `git push origin {{BRANCH}}` succeeded
|
|
47
|
+
- Report `IMPL: DONE`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
You are an autonomous coding agent. The PR for `{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}` is open but **not mergeable**.
|
|
2
|
+
|
|
3
|
+
Your only job is to bring the branch `{{BRANCH}}` up to date with `origin/{{BASE_BRANCH}}` so the PR is mergeable again. You are NOT extending the feature, addressing review feedback, or touching unrelated files.
|
|
4
|
+
|
|
5
|
+
# Situation
|
|
6
|
+
|
|
7
|
+
- Branch: `{{BRANCH}}`
|
|
8
|
+
- Target base: `origin/{{BASE_BRANCH}}`
|
|
9
|
+
- GitHub `mergeable_state`: `{{MERGEABLE_STATE}}`
|
|
10
|
+
- {{CONFLICT_FILES_BLOCK}}
|
|
11
|
+
|
|
12
|
+
# What to do
|
|
13
|
+
|
|
14
|
+
1. `git fetch origin {{BASE_BRANCH}}`
|
|
15
|
+
2. `git checkout {{BRANCH}}` (you should already be on this branch — verify with `git status` first)
|
|
16
|
+
3. `git rebase origin/{{BASE_BRANCH}}`
|
|
17
|
+
4. If the rebase hits conflicts:
|
|
18
|
+
- Resolve them so the original intent of THIS branch's commits is preserved (favor the branch's intent over base when they conflict on the branch's own additions; favor base when base added something unrelated)
|
|
19
|
+
- `git add` the resolved files
|
|
20
|
+
- `git rebase --continue`
|
|
21
|
+
- Repeat until the rebase completes or you genuinely cannot resolve a conflict (see the "When to give up" section)
|
|
22
|
+
5. Run tests to confirm the rebased branch still passes: `!`pnpm test 2>&1 | tail -40``
|
|
23
|
+
6. Push with **`git push --force-with-lease origin {{BRANCH}}`** — this is mandatory. **Do NOT use plain `git push --force`**; if `--force-with-lease` fails because the remote moved, that's a signal to abort and report BLOCKED, not to escalate to `--force`.
|
|
24
|
+
|
|
25
|
+
# When to give up (BLOCKED)
|
|
26
|
+
|
|
27
|
+
Give up and report `IMPL: BLOCKED — <reason>` when:
|
|
28
|
+
|
|
29
|
+
- A conflict requires understanding the issue's intent in a way you don't have context for (e.g., two divergent features touched the same lines and you can't tell which to keep).
|
|
30
|
+
- Tests start failing after rebase and the fix requires re-implementing logic, not just resolving a merge marker.
|
|
31
|
+
- `--force-with-lease` is rejected because the remote branch moved while you were working — abort the rebase (`git rebase --abort`), don't fight the race.
|
|
32
|
+
|
|
33
|
+
The HITL escalation message must list the conflicted files: `IMPL: BLOCKED — Mergeability: conflict in <file1>, <file2> required human resolution`.
|
|
34
|
+
|
|
35
|
+
# When you're done
|
|
36
|
+
|
|
37
|
+
- Branch is rebased onto `origin/{{BASE_BRANCH}}`
|
|
38
|
+
- All tests still pass
|
|
39
|
+
- `git push --force-with-lease` succeeded
|
|
40
|
+
- Report `IMPL: DONE`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
You are an autonomous coding agent. The PR for `{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}` received a `REVIEW: CHANGES-REQUESTED` verdict from the adversarial PR-review agent.
|
|
2
|
+
|
|
3
|
+
Your only job is to address the one-line fix the reviewer asked for and push the result. You are NOT extending the feature, taking unrelated cleanup, or rewriting history.
|
|
4
|
+
|
|
5
|
+
# Issue context
|
|
6
|
+
|
|
7
|
+
**{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}**
|
|
8
|
+
|
|
9
|
+
{{ISSUE_DESCRIPTION}}
|
|
10
|
+
|
|
11
|
+
# Reviewer feedback
|
|
12
|
+
|
|
13
|
+
The adversarial PR-reviewer agent posted:
|
|
14
|
+
|
|
15
|
+
> {{FIX_REQUEST}}
|
|
16
|
+
|
|
17
|
+
# What to do
|
|
18
|
+
|
|
19
|
+
1. Read the fix-request above and identify the exact change it's asking for.
|
|
20
|
+
2. Apply that change on the branch `{{BRANCH}}` — nothing more, nothing less.
|
|
21
|
+
3. Run the tests so you don't introduce a CI failure: `!`pnpm test 2>&1 | tail -40``.
|
|
22
|
+
4. Commit with a focused message (e.g., `fix({{ISSUE_IDENTIFIER}}): address reviewer feedback — <one-line summary>`).
|
|
23
|
+
5. Push with **`git push origin {{BRANCH}}`** — a normal push, NOT `--force` or `--force-with-lease`. You are appending a commit; the next review pass will see the new state.
|
|
24
|
+
|
|
25
|
+
# When to give up (BLOCKED)
|
|
26
|
+
|
|
27
|
+
Give up and report `IMPL: BLOCKED — <reason>` when:
|
|
28
|
+
|
|
29
|
+
- The reviewer's request is ambiguous and you can't tell which change to make.
|
|
30
|
+
- Implementing the request would require expanding scope beyond `{{ISSUE_IDENTIFIER}}`.
|
|
31
|
+
- The request is in tension with the original Linear issue body and you can't pick a side without human input.
|
|
32
|
+
|
|
33
|
+
The HITL escalation reason should quote the reviewer's `CHANGES-REQUESTED` line and explain what's blocking you.
|
|
34
|
+
|
|
35
|
+
# When you're done
|
|
36
|
+
|
|
37
|
+
- The reviewer's requested change is applied
|
|
38
|
+
- Tests still pass
|
|
39
|
+
- `git push origin {{BRANCH}}` succeeded
|
|
40
|
+
- Report `IMPL: DONE`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
You are an autonomous coding agent. A human reviewer posted a comment on the PR for `{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}`. Decide whether the comment is actionable; if it is, apply the fix and push; if it's not, signal `IMPL: BLOCKED` so a human picks it up.
|
|
2
|
+
|
|
3
|
+
# Issue context
|
|
4
|
+
|
|
5
|
+
**{{ISSUE_IDENTIFIER}} — {{ISSUE_TITLE}}**
|
|
6
|
+
|
|
7
|
+
{{ISSUE_DESCRIPTION}}
|
|
8
|
+
|
|
9
|
+
# Reviewer comment ({{COMMENT_AUTHOR}}, {{COMMENT_SOURCE}})
|
|
10
|
+
|
|
11
|
+
> {{COMMENT_BODY}}
|
|
12
|
+
|
|
13
|
+
# Decision tree
|
|
14
|
+
|
|
15
|
+
1. **If the comment is non-actionable** — e.g., "LGTM", "nice", a question with no clear ask, casual context — respond `IMPL: DONE` with no commit. Don't push anything; the loop will move on. Do NOT fabricate a change just because a comment exists.
|
|
16
|
+
|
|
17
|
+
2. **If the comment requests a concrete code change** — apply it on `{{BRANCH}}`, run tests (`!`pnpm test 2>&1 | tail -40``), commit with a focused message (`fix({{ISSUE_IDENTIFIER}}): respond to reviewer — <one-line summary>`), push with `git push origin {{BRANCH}}` (normal push — NOT `--force` or `--force-with-lease`). Report `IMPL: DONE`.
|
|
18
|
+
|
|
19
|
+
3. **If the comment is ambiguous, asks for a decision, or requires expanding scope** — report `IMPL: BLOCKED — <reason>` quoting the comment and explaining what's blocking you. The shepherd will escalate to HITL.
|
|
20
|
+
|
|
21
|
+
# Important boundaries
|
|
22
|
+
|
|
23
|
+
- This is the reviewer's first ask on this comment. Don't try to read the whole PR thread; respond only to the comment block above.
|
|
24
|
+
- Don't expand the scope of `{{ISSUE_IDENTIFIER}}` to address tangential observations. If the reviewer notes "by the way, the upstream library also has a bug" — that's a separate issue, not your job here.
|
|
25
|
+
- Don't push speculative refactors. Smallest reasonable change.
|
|
26
|
+
|
|
27
|
+
# When you're done
|
|
28
|
+
|
|
29
|
+
- For non-actionable comments: `IMPL: DONE` with no commit.
|
|
30
|
+
- For actionable comments: change applied, tests pass, push succeeded, `IMPL: DONE`.
|
|
31
|
+
- For ambiguous comments: `IMPL: BLOCKED — <reason>`.
|