automata-cli 0.3.0-develop.55 → 0.3.0-develop.59
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 +16 -0
- package/dist/index.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,22 @@ When no version is given, the latest semver tag on `master` is detected and the
|
|
|
83
83
|
|
|
84
84
|
---
|
|
85
85
|
|
|
86
|
+
## `automata implement-next`
|
|
87
|
+
|
|
88
|
+
Find the next open GitHub issue matching the configured filter, claim it, and invoke Claude Code to implement it.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
automata implement-next # find, claim, and implement
|
|
92
|
+
automata implement-next --query-only # print the issue and exit
|
|
93
|
+
automata implement-next --yolo # skip Claude permission prompts
|
|
94
|
+
automata implement-next --json # JSON output
|
|
95
|
+
automata implement-next --no-claude # claim without launching Claude
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
See [docs/implement-next.md](docs/implement-next.md) for full details.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
86
102
|
## Development
|
|
87
103
|
|
|
88
104
|
### Prerequisites
|
package/dist/index.js
CHANGED
|
@@ -903,10 +903,6 @@ function listIssues(technique, value) {
|
|
|
903
903
|
"list",
|
|
904
904
|
"--state",
|
|
905
905
|
"open",
|
|
906
|
-
"--sort",
|
|
907
|
-
"created",
|
|
908
|
-
"--order",
|
|
909
|
-
"asc",
|
|
910
906
|
"--limit",
|
|
911
907
|
"1",
|
|
912
908
|
"--json",
|
|
@@ -950,12 +946,13 @@ function resolveCommand(name) {
|
|
|
950
946
|
}
|
|
951
947
|
return name;
|
|
952
948
|
}
|
|
953
|
-
function invokeClaudeCode(issue, systemPrompt) {
|
|
949
|
+
function invokeClaudeCode(issue, systemPrompt, yolo) {
|
|
954
950
|
const prompt = systemPrompt ? `${systemPrompt}
|
|
955
951
|
|
|
956
952
|
${issue.body}` : issue.body;
|
|
957
953
|
const claudeBin = resolveCommand("claude");
|
|
958
|
-
const
|
|
954
|
+
const args = yolo ? ["--dangerously-skip-permissions", "-p", prompt] : ["-p", prompt];
|
|
955
|
+
const result = spawnSync4(claudeBin, args, { encoding: "utf8", stdio: "inherit" });
|
|
959
956
|
if (result.error) {
|
|
960
957
|
const err = result.error;
|
|
961
958
|
if (err.code === "ENOENT") {
|
|
@@ -972,11 +969,11 @@ ${issue.body}` : issue.body;
|
|
|
972
969
|
process.exit(result.status ?? 1);
|
|
973
970
|
}
|
|
974
971
|
}
|
|
975
|
-
var
|
|
972
|
+
var implementNextCommand = new Command3("implement-next").description("Find the next open GitHub issue matching the configured filter, claim it, and invoke Claude Code").option("--json", "Output issue details as JSON").option("--no-claude", "Skip Claude Code invocation after claiming the issue").option("--query-only", "Print issue content and exit without claiming or invoking Claude").option("--yolo", "Launch Claude Code with --dangerously-skip-permissions").action((options) => {
|
|
976
973
|
const config = readConfig();
|
|
977
974
|
if (config.remoteType !== "gh") {
|
|
978
975
|
process.stderr.write(
|
|
979
|
-
"Error:
|
|
976
|
+
"Error: implement-next is not supported in Azure DevOps mode. Work item discovery is not available in azdo-cli. See docs/azdo-gap.md for details.\n"
|
|
980
977
|
);
|
|
981
978
|
process.exit(1);
|
|
982
979
|
}
|
|
@@ -1014,6 +1011,9 @@ URL: ${issue.url}
|
|
|
1014
1011
|
${issue.body}
|
|
1015
1012
|
`);
|
|
1016
1013
|
}
|
|
1014
|
+
if (options.queryOnly) {
|
|
1015
|
+
process.exit(0);
|
|
1016
|
+
}
|
|
1017
1017
|
try {
|
|
1018
1018
|
postComment(issue.number, "working");
|
|
1019
1019
|
} catch (err) {
|
|
@@ -1022,7 +1022,7 @@ ${issue.body}
|
|
|
1022
1022
|
process.exit(1);
|
|
1023
1023
|
}
|
|
1024
1024
|
if (options.claude !== false) {
|
|
1025
|
-
invokeClaudeCode(issue, config.claudeSystemPrompt);
|
|
1025
|
+
invokeClaudeCode(issue, config.claudeSystemPrompt, options.yolo ?? false);
|
|
1026
1026
|
}
|
|
1027
1027
|
});
|
|
1028
1028
|
|
|
@@ -1031,7 +1031,7 @@ var program = new Command4();
|
|
|
1031
1031
|
program.name("automata").description("Automata CLI tool").version(version, "-v, --version");
|
|
1032
1032
|
program.addCommand(configCommand);
|
|
1033
1033
|
program.addCommand(gitCommand);
|
|
1034
|
-
program.addCommand(
|
|
1034
|
+
program.addCommand(implementNextCommand);
|
|
1035
1035
|
program.showHelpAfterError();
|
|
1036
1036
|
program.parse();
|
|
1037
1037
|
if (process.argv.length <= 2) {
|