automata-cli 0.1.0-feature-033-orphan-pull-requests.280 → 0.1.0-feature-better-plugin.285
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
CHANGED
|
@@ -129,7 +129,7 @@ See [docs/execute-prompt.md](docs/execute-prompt.md) for full details.
|
|
|
129
129
|
|
|
130
130
|
## `automata do-work`
|
|
131
131
|
|
|
132
|
-
One tick of the autonomous loop: answer the open issues whose newest message from an authorized account the agent has not answered
|
|
132
|
+
One tick of the autonomous loop: answer the open issues whose newest message from an authorized account the agent has not answered. Reference: [docs/do-work.md](docs/do-work.md). Process, trust model and setup: [the wiki](docs/wiki/Home.md).
|
|
133
133
|
|
|
134
134
|
---
|
|
135
135
|
|
|
@@ -158,7 +158,30 @@ Already cloned without `--recurse-submodules`? Fetch the vendored agent plugins
|
|
|
158
158
|
git submodule update --init --recursive
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
`vendor/agent-plugins-base` is registered in `.claude/settings.json` as a project-scope Claude Code marketplace,
|
|
161
|
+
`vendor/agent-plugins-base` is registered in `.claude/settings.json` as a project-scope Claude Code marketplace, so its skills load for anyone working in this repository with no further setup.
|
|
162
|
+
|
|
163
|
+
#### Importing the plugin at user scope
|
|
164
|
+
|
|
165
|
+
The devcontainer does this for you on creation. Run it by hand to make the skills available in **every** project rather than just this one, or to reach Codex — which keeps marketplaces in `~/.codex/config.toml` and has no project-scoped equivalent, so it needs this step even inside this repository.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# from the repository root
|
|
169
|
+
PLUGIN_ROOT="$(pwd)/vendor/agent-plugins-base"
|
|
170
|
+
|
|
171
|
+
# Claude Code
|
|
172
|
+
claude plugin marketplace add "$PLUGIN_ROOT" --scope user
|
|
173
|
+
claude plugin install github-alk@agent-plugins-base --scope user --yes
|
|
174
|
+
|
|
175
|
+
# Codex
|
|
176
|
+
codex plugin marketplace add "$PLUGIN_ROOT"
|
|
177
|
+
codex plugin add github-alk@agent-plugins-base
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Both clients need an **absolute** path here. Verify with `claude plugin list` (expect `Scope: user`, enabled) and `codex plugin list`.
|
|
181
|
+
|
|
182
|
+
To remove them again: `claude plugin uninstall github-alk@agent-plugins-base` and `codex plugin remove github-alk@agent-plugins-base`.
|
|
183
|
+
|
|
184
|
+
Full reference, including how the two scopes interact: [docs/plugins.md](docs/plugins.md).
|
|
162
185
|
|
|
163
186
|
### Scripts
|
|
164
187
|
|
|
@@ -172,7 +195,7 @@ git submodule update --init --recursive
|
|
|
172
195
|
| `npm run audit:prod` | Audit the dependencies that ship — also runs via `prepublishOnly`, so an advisory blocks publishing |
|
|
173
196
|
| `npm run audit:all` | Audit the whole tree, dev toolchain included (advisory only) |
|
|
174
197
|
|
|
175
|
-
Agent plugins are vendored as a submodule and registered with Claude Code — see [docs/plugins.md](docs/plugins.md).
|
|
198
|
+
Agent plugins are vendored as a submodule and registered with both Claude Code and Codex — see [docs/plugins.md](docs/plugins.md).
|
|
176
199
|
|
|
177
200
|
### Maintenance
|
|
178
201
|
|
|
@@ -3,14 +3,13 @@ import {
|
|
|
3
3
|
DEFAULT_CHECK_ISSUE_PROMPT,
|
|
4
4
|
DEFAULT_DO_WORK,
|
|
5
5
|
DEFAULT_DO_WORK_ISSUE_DISCUSS_PROMPT,
|
|
6
|
-
DEFAULT_DO_WORK_PR_ORPHAN_PROMPT,
|
|
7
6
|
DEFAULT_DO_WORK_PR_WORK_PROMPT,
|
|
8
7
|
DEFAULT_FIX_COMMENTS_PROMPT,
|
|
9
8
|
DEFAULT_SONAR_PROMPT,
|
|
10
9
|
readConfig,
|
|
11
10
|
readRawConfig,
|
|
12
11
|
writeConfig
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LTCVLM4I.js";
|
|
14
13
|
|
|
15
14
|
// src/config/ConfigWizard.tsx
|
|
16
15
|
import { useState } from "react";
|
|
@@ -42,8 +41,7 @@ var PROMPTS_MENU_OPTIONS = [
|
|
|
42
41
|
"Fix-Comments",
|
|
43
42
|
"Check-Issue",
|
|
44
43
|
"Do Work \u2014 Discuss",
|
|
45
|
-
"Do Work \u2014 PR"
|
|
46
|
-
"Do Work \u2014 Orphan PR"
|
|
44
|
+
"Do Work \u2014 PR"
|
|
47
45
|
];
|
|
48
46
|
function parseAllowedUsers(value) {
|
|
49
47
|
return value.split(",").map((user) => user.trim()).filter((user) => user.length > 0);
|
|
@@ -123,8 +121,7 @@ var PROMPT_SCREEN_BY_OPTION = {
|
|
|
123
121
|
"Fix-Comments": "fix-comments-prompt",
|
|
124
122
|
"Check-Issue": "check-issue-prompt",
|
|
125
123
|
"Do Work \u2014 Discuss": "do-work-discuss-prompt",
|
|
126
|
-
"Do Work \u2014 PR": "do-work-pr-prompt"
|
|
127
|
-
"Do Work \u2014 Orphan PR": "do-work-pr-orphan-prompt"
|
|
124
|
+
"Do Work \u2014 PR": "do-work-pr-prompt"
|
|
128
125
|
};
|
|
129
126
|
function ConfigWizard() {
|
|
130
127
|
const existing = readConfig();
|
|
@@ -170,9 +167,6 @@ function ConfigWizard() {
|
|
|
170
167
|
const [doWorkPrPrompt, setDoWorkPrPrompt] = useState(
|
|
171
168
|
existing.doWork?.prompts?.prWork ?? DEFAULT_DO_WORK_PR_WORK_PROMPT
|
|
172
169
|
);
|
|
173
|
-
const [doWorkPrOrphanPrompt, setDoWorkPrOrphanPrompt] = useState(
|
|
174
|
-
existing.doWork?.prompts?.prOrphan ?? DEFAULT_DO_WORK_PR_ORPHAN_PROMPT
|
|
175
|
-
);
|
|
176
170
|
const [pendingRemote, setPendingRemote] = useState(existing.remoteType ?? "gh");
|
|
177
171
|
const [pendingTechnique, setPendingTechnique] = useState(
|
|
178
172
|
existing.issueDiscoveryTechnique ?? "label"
|
|
@@ -368,17 +362,6 @@ function ConfigWizard() {
|
|
|
368
362
|
setScreen("prompts-menu");
|
|
369
363
|
},
|
|
370
364
|
onBack: () => setScreen("prompts-menu")
|
|
371
|
-
},
|
|
372
|
-
"do-work-pr-orphan-prompt": {
|
|
373
|
-
setValue: setDoWorkPrOrphanPrompt,
|
|
374
|
-
onSubmit: () => {
|
|
375
|
-
savePrompt("do-work-pr-orphan.md", doWorkPrOrphanPrompt, (value, current) => ({
|
|
376
|
-
...current,
|
|
377
|
-
doWork: { ...current.doWork, prompts: { ...current.doWork?.prompts, prOrphan: value } }
|
|
378
|
-
}));
|
|
379
|
-
setScreen("prompts-menu");
|
|
380
|
-
},
|
|
381
|
-
onBack: () => setScreen("prompts-menu")
|
|
382
365
|
}
|
|
383
366
|
};
|
|
384
367
|
const menus = {
|
|
@@ -544,12 +527,6 @@ function ConfigWizard() {
|
|
|
544
527
|
label: "Pull request turn instructions:",
|
|
545
528
|
value: doWorkPrPrompt,
|
|
546
529
|
hint: `Type prompt \xB7 Enter to save \xB7 ${BACK}`
|
|
547
|
-
},
|
|
548
|
-
"do-work-pr-orphan-prompt": {
|
|
549
|
-
title: "Prompts \u2014 Do Work \u2014 Orphan PR",
|
|
550
|
-
label: "Instructions for a pull request with no linked issue:",
|
|
551
|
-
value: doWorkPrOrphanPrompt,
|
|
552
|
-
hint: `Type prompt \xB7 Enter to save \xB7 ${BACK}`
|
|
553
530
|
}
|
|
554
531
|
};
|
|
555
532
|
const menuViews = {
|
|
@@ -16,7 +16,6 @@ var DEFAULT_DO_WORK = {
|
|
|
16
16
|
};
|
|
17
17
|
var DEFAULT_DO_WORK_ISSUE_DISCUSS_PROMPT = "You are the agent named in the context below, working on a GitHub issue together with the people allowed to instruct you. Answer the messages marked NEW; the earlier messages are context only.\n\nDo not modify, create or delete any file, and do not create a branch or a pull request, UNLESS a message marked NEW explicitly asks you to implement the work. If it does: create a branch off the base branch named below, implement the change following the project's existing conventions, run the tests and the linter, and open a pull request whose body contains `Closes #<issue number>`.\n\nOtherwise do not touch the code at all: reply on the issue with the specification, the plan, or the open questions you need answered. Keep the reply short and concrete.\n\nEither way, always post a reply on the issue before you finish \u2014 including when you implemented and opened a pull request. Silence is indistinguishable from a crash, and the run will be reported as having produced no answer.";
|
|
18
18
|
var DEFAULT_DO_WORK_PR_WORK_PROMPT = "You are the agent named in the context below, working on the pull request for a GitHub issue together with the people allowed to instruct you. Work on the branch named below, which is already checked out and up to date.\n\nAddress every message marked NEW and every unresolved review thread listed. Follow the project's existing conventions, run the tests and the linter, then commit and push to that branch. Do not merge the pull request and do not push to the base branch.\n\nReply on the pull request with a short summary of what you changed, or reply in the review thread when your answer belongs to a specific comment. Always post a reply \u2014 silence looks like a crash.";
|
|
19
|
-
var DEFAULT_DO_WORK_PR_ORPHAN_PROMPT = "You are the agent named in the context below, working on a pull request that is not linked to any issue \u2014 a dependency bump, or another change opened without one \u2014 together with the people allowed to instruct you. Work on the branch named below, which is already checked out and up to date.\n\nAddress every message marked NEW and every unresolved review thread listed. Typical work here is finding out why the checks are failing, bringing the branch up to date with the base branch, and fixing whatever the change needs in order to be mergeable. Follow the project's existing conventions, run the tests and the linter, then commit and push to that branch.\n\nDo not merge the pull request, do not close it, and do not push to the base branch. If you conclude that it should be merged or closed, say so in your reply and leave the decision to the humans.\n\nReply on the pull request with a short summary of what you did and what you recommend, or reply in the review thread when your answer belongs to a specific comment. Always post a reply \u2014 silence looks like a crash.";
|
|
20
19
|
var CONFIG_DIR = ".automata";
|
|
21
20
|
var CONFIG_FILE = "config.json";
|
|
22
21
|
function configPath() {
|
|
@@ -82,9 +81,6 @@ function readConfig() {
|
|
|
82
81
|
if (config.doWork?.prompts?.prWork) {
|
|
83
82
|
config.doWork.prompts.prWork = resolvePromptRef(config.doWork.prompts.prWork, dir);
|
|
84
83
|
}
|
|
85
|
-
if (config.doWork?.prompts?.prOrphan) {
|
|
86
|
-
config.doWork.prompts.prOrphan = resolvePromptRef(config.doWork.prompts.prOrphan, dir);
|
|
87
|
-
}
|
|
88
84
|
return config;
|
|
89
85
|
}
|
|
90
86
|
function writeConfig(config) {
|
|
@@ -101,7 +97,6 @@ export {
|
|
|
101
97
|
DEFAULT_DO_WORK,
|
|
102
98
|
DEFAULT_DO_WORK_ISSUE_DISCUSS_PROMPT,
|
|
103
99
|
DEFAULT_DO_WORK_PR_WORK_PROMPT,
|
|
104
|
-
DEFAULT_DO_WORK_PR_ORPHAN_PROMPT,
|
|
105
100
|
readRawConfig,
|
|
106
101
|
readConfig,
|
|
107
102
|
writeConfig
|