@nyxa/nyx-agent 0.4.1 → 0.5.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 +52 -9
- package/dist/cli.js +11 -16
- package/dist/commands/init.js +87 -466
- package/dist/commands/run.js +16 -3
- package/dist/config/loadConfig.js +16 -3
- package/dist/config/schema.js +27 -146
- package/dist/runtime/gitLifecycle.js +19 -57
- package/dist/runtime/harness.js +26 -0
- package/dist/runtime/paths.js +0 -12
- package/dist/runtime/prompts.js +103 -0
- package/dist/runtime/runPhase.js +85 -254
- package/dist/runtime/runPipeline.js +395 -0
- package/dist/runtime/schemas.js +52 -0
- package/dist/runtime/scm.js +76 -0
- package/dist/runtime/validateResult.js +1 -3
- package/dist/runtime/workItems.js +42 -118
- package/package.json +2 -5
- package/dist/runtime/buildPrompt.js +0 -54
- package/dist/runtime/effectiveConfig.js +0 -14
- package/dist/runtime/renderTemplate.js +0 -28
- package/dist/runtime/runWorkflow.js +0 -680
- package/dist/runtime/validateWorkItem.js +0 -212
- package/dist/runtime/workItemAnnotations.js +0 -39
- package/docs/nyxagent-v0-spec.md +0 -742
- package/templates/default/prompts/closure.md +0 -30
- package/templates/default/prompts/execution.md +0 -11
- package/templates/default/prompts/finalize.md +0 -7
- package/templates/default/prompts/global-review.md +0 -24
- package/templates/default/prompts/global-revision.md +0 -9
- package/templates/default/prompts/pull-request.md +0 -23
- package/templates/default/prompts/repair-result.md +0 -29
- package/templates/default/prompts/review.md +0 -18
- package/templates/default/prompts/revision.md +0 -7
- package/templates/default/prompts/selection.md +0 -46
- package/templates/default/schemas/closure.schema.json +0 -35
- package/templates/default/schemas/global-review.schema.json +0 -60
- package/templates/default/schemas/pull-request.schema.json +0 -44
- package/templates/default/schemas/review.schema.json +0 -60
- package/templates/default/schemas/selection.schema.json +0 -135
package/README.md
CHANGED
|
@@ -1,16 +1,59 @@
|
|
|
1
1
|
# NyxAgent
|
|
2
2
|
|
|
3
|
-
NyxAgent is a small TypeScript CLI that runs coding-agent
|
|
4
|
-
|
|
3
|
+
NyxAgent is a small TypeScript CLI that runs a fixed coding-agent pipeline, one
|
|
4
|
+
GitHub issue at a time, each phase with fresh context.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Pipeline
|
|
7
|
+
|
|
8
|
+
For every run NyxAgent:
|
|
9
|
+
|
|
10
|
+
1. **Selects** open GitHub issues to work on (read-only).
|
|
11
|
+
2. For each selected issue, in an isolated git **worktree**:
|
|
12
|
+
- **implements** it (the agent — the only customizable prompt),
|
|
13
|
+
- optionally **reviews** and **revises** it (bounded loop),
|
|
14
|
+
- **commits** the change (the engine, deterministically).
|
|
15
|
+
3. Optionally runs a **global review** across the whole run.
|
|
16
|
+
4. **Pushes** the run branch and **opens one pull request** (the engine).
|
|
17
|
+
|
|
18
|
+
The agent only implements, reviews, and revises. Every git/gh side effect —
|
|
19
|
+
commit, push, pull request — is performed by the engine, so closing the loop
|
|
20
|
+
never depends on the model. Issues are closed by GitHub when the PR merges
|
|
21
|
+
(`Closes #n` in the PR body); the human merges the PR.
|
|
22
|
+
|
|
23
|
+
The workflow shape is fixed (not configurable). Only `.nyxagent/prompts/execution.md`
|
|
24
|
+
is editable.
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
7
27
|
|
|
8
28
|
```bash
|
|
9
|
-
nyxagent init
|
|
10
|
-
nyxagent
|
|
11
|
-
nyxagent run
|
|
12
|
-
nyxagent update
|
|
29
|
+
nyxagent init # create .nyxagent/config.json (interactive)
|
|
30
|
+
nyxagent run # run the pipeline
|
|
31
|
+
nyxagent run --harness claude # override the configured harness for one run
|
|
32
|
+
nyxagent update # self-update to the latest published version
|
|
13
33
|
```
|
|
14
34
|
|
|
15
|
-
|
|
16
|
-
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
`nyxagent init` writes `.nyxagent/config.json`:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"harness": "codex",
|
|
42
|
+
"model": "gpt-5.5",
|
|
43
|
+
"reasoning_effort": "medium",
|
|
44
|
+
"review": "each",
|
|
45
|
+
"tracker": { "type": "github", "repo": "owner/repo" },
|
|
46
|
+
"base_branch": "main",
|
|
47
|
+
"max_iterations": 5
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `harness`: `codex` or `claude` (override per run with `--harness`).
|
|
52
|
+
- `review`: `each` (per task), `all` (global only), `both`, or `none`.
|
|
53
|
+
- `base_branch`: optional; defaults to the current branch at run time.
|
|
54
|
+
|
|
55
|
+
## Requirements
|
|
56
|
+
|
|
57
|
+
- A git repository with a GitHub remote.
|
|
58
|
+
- The `gh` CLI authenticated for the configured repository.
|
|
59
|
+
- The selected harness CLI (`codex` or `claude`) on `PATH`.
|
package/dist/cli.js
CHANGED
|
@@ -10,32 +10,27 @@ const packageJson = require("../package.json");
|
|
|
10
10
|
const program = new Command();
|
|
11
11
|
program
|
|
12
12
|
.name("nyxagent")
|
|
13
|
-
.description("Run coding-agent
|
|
13
|
+
.description("Run a fixed coding-agent pipeline with fresh context per phase.")
|
|
14
14
|
.version(packageJson.version);
|
|
15
15
|
program
|
|
16
16
|
.command("init")
|
|
17
|
-
.description("Create a .nyxagent project configuration")
|
|
18
|
-
.option("--
|
|
19
|
-
.option("--harness <preset>", "harness preset: codex, claude, or custom")
|
|
17
|
+
.description("Create a .nyxagent/config.json project configuration")
|
|
18
|
+
.option("--harness <name>", "default harness: codex or claude")
|
|
20
19
|
.option("--model <name>", "model name")
|
|
21
|
-
.option("--reasoning-
|
|
20
|
+
.option("--reasoning-effort <level>", "reasoning effort (default: medium)")
|
|
21
|
+
.option("--review <mode>", "review strategy: each, all, both, or none")
|
|
22
|
+
.option("--repo <owner/repo>", "GitHub repository")
|
|
23
|
+
.option("--base-branch <branch>", "base branch (default: current branch)")
|
|
22
24
|
.option("--max-iterations <count>", "maximum work items per run")
|
|
23
|
-
.option("--
|
|
24
|
-
.option("--work-items-path <path>", "local markdown work item directory")
|
|
25
|
-
.option("--work-items-repository <owner/repo>", "GitHub work item repository")
|
|
26
|
-
.option("--implementation-skill <name>", "implementation skill to reference in the execution prompt")
|
|
27
|
-
.option("--review", "include a review phase (alias for --review-mode each)")
|
|
28
|
-
.option("--no-review", "skip the review phase (alias for --review-mode none)")
|
|
29
|
-
.option("--review-mode <mode>", "review strategy: each, all, both, or none")
|
|
30
|
-
.option("--pull-request", "close the PRD with a pull request (GitHub work items)")
|
|
31
|
-
.option("--no-pull-request", "skip the pull request finalization phase")
|
|
25
|
+
.option("--force", "overwrite an existing config")
|
|
32
26
|
.action(async (options) => {
|
|
33
27
|
await initCommand(options);
|
|
34
28
|
});
|
|
35
29
|
program
|
|
36
30
|
.command("run")
|
|
37
|
-
.description("Run the
|
|
38
|
-
.option("--config <path>", "config path
|
|
31
|
+
.description("Run the NyxAgent pipeline")
|
|
32
|
+
.option("--config <path>", "config path (default: .nyxagent/config.json)")
|
|
33
|
+
.option("--harness <name>", "override the configured harness: codex or claude")
|
|
39
34
|
.action(async (options) => {
|
|
40
35
|
await runCommand(options);
|
|
41
36
|
});
|