agentweaver 0.1.10 → 0.1.11

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.
Files changed (106) hide show
  1. package/README.md +218 -224
  2. package/dist/artifacts.js +100 -55
  3. package/dist/executors/{codex-local-executor.js → codex-executor.js} +4 -4
  4. package/dist/executors/configs/{codex-local-config.js → codex-config.js} +1 -1
  5. package/dist/executors/configs/jira-fetch-config.js +2 -0
  6. package/dist/executors/configs/telegram-notifier-config.js +3 -0
  7. package/dist/executors/fetch-gitlab-diff-executor.js +1 -1
  8. package/dist/executors/fetch-gitlab-review-executor.js +1 -1
  9. package/dist/executors/git-commit-executor.js +25 -0
  10. package/dist/executors/telegram-notifier-executor.js +54 -0
  11. package/dist/flow-state.js +46 -1
  12. package/dist/gitlab.js +13 -8
  13. package/dist/index.js +469 -514
  14. package/dist/interactive-ui.js +144 -43
  15. package/dist/jira.js +52 -5
  16. package/dist/pipeline/auto-flow.js +6 -6
  17. package/dist/pipeline/context.js +1 -0
  18. package/dist/pipeline/flow-catalog.js +34 -4
  19. package/dist/pipeline/flow-model-settings.js +77 -0
  20. package/dist/pipeline/flow-specs/auto-common.json +446 -0
  21. package/dist/pipeline/flow-specs/auto-golang.json +563 -0
  22. package/dist/pipeline/flow-specs/{bug-analyze.json → bugz/bug-analyze.json} +43 -25
  23. package/dist/pipeline/flow-specs/{bug-fix.json → bugz/bug-fix.json} +5 -4
  24. package/dist/pipeline/flow-specs/git-commit.json +196 -0
  25. package/dist/pipeline/flow-specs/{gitlab-diff-review.json → gitlab/gitlab-diff-review.json} +20 -50
  26. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +165 -0
  27. package/dist/pipeline/flow-specs/{mr-description.json → gitlab/mr-description.json} +17 -10
  28. package/dist/pipeline/flow-specs/{run-go-linter-loop.json → go/run-go-linter-loop.json} +40 -14
  29. package/dist/pipeline/flow-specs/{run-go-tests-loop.json → go/run-go-tests-loop.json} +40 -14
  30. package/dist/pipeline/flow-specs/implement.json +5 -4
  31. package/dist/pipeline/flow-specs/plan.json +40 -148
  32. package/dist/pipeline/flow-specs/{review-fix.json → review/review-fix.json} +73 -13
  33. package/dist/pipeline/flow-specs/review/review-loop.json +280 -0
  34. package/dist/pipeline/flow-specs/review/review-project.json +87 -0
  35. package/dist/pipeline/flow-specs/review/review.json +126 -0
  36. package/dist/pipeline/flow-specs/task-describe.json +191 -11
  37. package/dist/pipeline/launch-profile-config.js +38 -0
  38. package/dist/pipeline/node-registry.js +75 -45
  39. package/dist/pipeline/nodes/build-failure-summary-node.js +16 -29
  40. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +36 -0
  41. package/dist/pipeline/nodes/codex-prompt-node.js +41 -0
  42. package/dist/pipeline/nodes/commit-message-form-node.js +79 -0
  43. package/dist/pipeline/nodes/git-commit-form-node.js +138 -0
  44. package/dist/pipeline/nodes/git-commit-node.js +28 -0
  45. package/dist/pipeline/nodes/git-status-node.js +221 -0
  46. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +10 -6
  47. package/dist/pipeline/nodes/jira-context-node.js +10 -0
  48. package/dist/pipeline/nodes/llm-prompt-node.js +62 -0
  49. package/dist/pipeline/nodes/plan-codex-node.js +1 -1
  50. package/dist/pipeline/nodes/read-file-node.js +11 -0
  51. package/dist/pipeline/nodes/review-findings-form-node.js +18 -14
  52. package/dist/pipeline/nodes/select-files-form-node.js +72 -0
  53. package/dist/pipeline/nodes/telegram-notifier-node.js +28 -0
  54. package/dist/pipeline/nodes/user-input-node.js +29 -8
  55. package/dist/pipeline/nodes/write-selection-file-node.js +46 -0
  56. package/dist/pipeline/prompt-registry.js +2 -4
  57. package/dist/pipeline/prompt-runtime.js +13 -3
  58. package/dist/pipeline/registry.js +6 -8
  59. package/dist/pipeline/spec-compiler.js +5 -0
  60. package/dist/pipeline/spec-types.js +7 -3
  61. package/dist/pipeline/spec-validator.js +4 -0
  62. package/dist/pipeline/types.js +1 -0
  63. package/dist/pipeline/value-resolver.js +40 -38
  64. package/dist/prompts.js +104 -110
  65. package/dist/runtime/agentweaver-home.js +8 -0
  66. package/dist/runtime/command-resolution.js +0 -38
  67. package/dist/runtime/env-loader.js +43 -0
  68. package/dist/structured-artifact-schema-registry.js +53 -0
  69. package/dist/structured-artifact-schemas.json +0 -20
  70. package/dist/structured-artifacts.js +3 -43
  71. package/dist/user-input.js +30 -2
  72. package/package.json +2 -6
  73. package/Dockerfile.codex +0 -56
  74. package/dist/executors/claude-executor.js +0 -46
  75. package/dist/executors/codex-docker-executor.js +0 -27
  76. package/dist/executors/configs/claude-config.js +0 -12
  77. package/dist/executors/configs/codex-docker-config.js +0 -10
  78. package/dist/executors/configs/verify-build-config.js +0 -7
  79. package/dist/executors/verify-build-executor.js +0 -123
  80. package/dist/pipeline/flow-specs/auto.json +0 -979
  81. package/dist/pipeline/flow-specs/gitlab-review.json +0 -317
  82. package/dist/pipeline/flow-specs/opencode/auto-opencode.json +0 -1365
  83. package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +0 -382
  84. package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +0 -56
  85. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +0 -308
  86. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +0 -437
  87. package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +0 -117
  88. package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +0 -321
  89. package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +0 -321
  90. package/dist/pipeline/flow-specs/opencode/implement-opencode.json +0 -64
  91. package/dist/pipeline/flow-specs/opencode/plan-opencode.json +0 -603
  92. package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +0 -209
  93. package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +0 -452
  94. package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +0 -148
  95. package/dist/pipeline/flow-specs/review-project.json +0 -243
  96. package/dist/pipeline/flow-specs/review.json +0 -312
  97. package/dist/pipeline/flows/preflight-flow.js +0 -19
  98. package/dist/pipeline/nodes/claude-prompt-node.js +0 -54
  99. package/dist/pipeline/nodes/codex-docker-prompt-node.js +0 -32
  100. package/dist/pipeline/nodes/codex-local-prompt-node.js +0 -32
  101. package/dist/pipeline/nodes/review-claude-node.js +0 -38
  102. package/dist/pipeline/nodes/review-reply-codex-node.js +0 -40
  103. package/dist/pipeline/nodes/verify-build-node.js +0 -15
  104. package/dist/runtime/docker-runtime.js +0 -51
  105. package/docker-compose.yml +0 -445
  106. package/verify_build.sh +0 -105
package/README.md CHANGED
@@ -2,81 +2,99 @@
2
2
 
3
3
  `AgentWeaver` is a TypeScript/Node.js CLI for harness engineering around coding agents.
4
4
 
5
- It brings Jira context, GitLab review artifacts, agent-driven steps via Codex and Claude, an interactive terminal UI, and fully automated workflows into one controlled execution harness.
5
+ It is built around declarative workflow specs. A flow describes phases and steps in JSON, runtime nodes implement behavior in TypeScript, and artifacts on disk make runs resumable, inspectable, and operationally manageable from the TUI.
6
6
 
7
- A typical flow looks like:
7
+ Typical usage looks like:
8
8
 
9
9
  `plan -> implement -> run-go-linter-loop -> run-go-tests-loop -> review -> review-fix`
10
10
 
11
- The point is not the specific chain above, but that `AgentWeaver` lets you design, run, and reuse agent harnesses:
11
+ The important part is not that exact chain. The point is that AgentWeaver lets you design, operate, and evolve durable agent harnesses instead of accumulating one-off prompts and shell glue.
12
12
 
13
- - with declarative flows and isolated executors
14
- - with artifacts that survive restarts and let runs resume from the right point
15
- - with a TUI for semi-automatic operation and visibility
16
- - with an `auto` mode for fully automated flows without manual handoff
13
+ ## What It Does
17
14
 
18
- The package runs as an npm CLI and includes a full-screen TUI built on `neo-blessed`.
15
+ - Fetches Jira issue context by issue key or browse URL
16
+ - Fetches GitLab merge request diff and review data into reusable artifacts
17
+ - Runs Codex-, OpenCode-, and process-backed stages through a common pipeline runtime
18
+ - Persists artifacts and compact flow execution state under the current project scope
19
+ - Supports both operator-driven work in a TUI and end-to-end automation flows
20
+ - Resumes interrupted declarative flows when required artifacts and launch profile still match
19
21
 
20
- ## What It Does
22
+ ## Harness Engineering Focus
23
+
24
+ AgentWeaver is not positioned as a thin wrapper around one agent call. It is meant for harness engineering:
21
25
 
22
- - Fetches a Jira issue by key or browse URL and turns it into working context for agent steps
23
- - Fetches GitLab review comments and diffs into reusable Markdown and JSON artifacts
24
- - Runs agent stages such as `plan`, `implement`, `review`, and `review-fix`, plus verification loops such as `run-go-tests-loop` and `run-go-linter-loop`
25
- - Stores machine-readable JSON artifacts under `.agentweaver/scopes/<scope-key>/.artifacts/` and uses them as the source of truth between steps
26
- - Isolates workflows by scope: for Jira-backed runs this is usually the issue key, otherwise it defaults to `<git-branch>--<worktree-hash>`
27
- - Persists compact `auto` pipeline state on disk so runs can resume without keeping full agent transcripts
28
- - Uses Docker runtime services for isolated Codex execution and build verification
26
+ - workflows are modeled explicitly as phases, steps, prompts, params, expectations, and artifacts
27
+ - execution logic is isolated into reusable nodes and executors instead of being embedded in ad-hoc scripts
28
+ - artifacts on disk are the contract between stages, which makes runs reviewable and restartable
29
+ - the same workflow model can be used in direct CLI mode, interactive TUI mode, and resumable automation flows
29
30
 
30
- In short, `AgentWeaver` is for cases where you do not want a one-off LLM script, but a durable engineering harness around agents.
31
+ In practice, this means you can treat an agent workflow like an engineered system: versioned, inspectable, repeatable, and debuggable.
31
32
 
32
- ## Why AgentWeaver
33
+ ## Core Concepts
33
34
 
34
- - Harness engineering instead of ad-hoc prompting. Flows, executors, prompts, and artifacts are separate layers rather than one mixed script.
35
- - Agent runtime instead of single-shot calls. You can build sequences where one agent plans, another implements, and the next verifies and fixes.
36
- - TUI instead of blind shell execution. The terminal UI gives you an operational view of flow state, activity, and artifacts.
37
- - Full automation instead of manual step switching. `auto` can run end-to-end flows that move through planning, implementation, verification, and review on their own.
35
+ - `flow spec`: declarative JSON under `src/pipeline/flow-specs/` or project-local `.agentweaver/.flows/`
36
+ - `node`: reusable runtime unit from `src/pipeline/nodes/`
37
+ - `executor`: integration layer for Jira, Codex, OpenCode, GitLab, shell/process execution, Telegram notifications, and related actions
38
+ - `scope`: isolated workspace key for artifacts and flow state; usually based on Jira task, otherwise derived from git context
39
+ - `artifact`: file produced or consumed by flows, used as the stable contract between stages
40
+ - `flow state`: compact persisted execution metadata used for resume/restart in long-running flows such as `auto-golang`
38
41
 
39
- ## Architecture
42
+ ## Declarative Workflow Model
40
43
 
41
- The CLI is built around an `executor + node + declarative flow` architecture that fits harness engineering well.
44
+ The center of the system is the declarative flow spec:
42
45
 
43
- - `src/index.ts` remains the CLI entrypoint and top-level orchestration layer
44
- - `src/executors/` contains first-class executors for external actions such as Jira, GitLab, local Codex, Docker-based build verification, Claude, and process execution
45
- - `src/pipeline/nodes/` contains reusable runtime nodes built on top of executors
46
- - `src/pipeline/flow-specs/` contains declarative JSON flow specs for `preflight`, `bug-analyze`, `bug-fix`, `gitlab-diff-review`, `gitlab-review`, `mr-description`, `plan`, `task-describe`, `implement`, `review`, `review-fix`, `run-go-tests-loop`, `run-go-linter-loop`, and `auto`
47
- - project-local flows can be added under `.agentweaver/.flows/*.json`; they are discovered from the current workspace at runtime
48
- - `src/runtime/` contains shared runtime services such as command resolution, Docker runtime setup, and subprocess execution
46
+ - phases define the workflow structure visible to operators
47
+ - steps define execution units inside each phase
48
+ - prompt bindings define how agent instructions are assembled
49
+ - params define node runtime inputs
50
+ - expectations define postconditions
51
+ - `after` actions update runtime state without introducing ad-hoc imperative glue
49
52
 
50
- This keeps command handlers focused on selecting flows and passing parameters instead of assembling prompts, subprocess wiring, and side effects inline.
53
+ This keeps workflow design in JSON while keeping implementation details in typed runtime code.
51
54
 
52
55
  ## Repository Layout
53
56
 
54
- - `src/`main TypeScript sources
55
- - `src/index.ts`CLI entrypoint and workflow orchestration
56
- - `src/pipeline/flow-specs/` — declarative JSON specs for workflow stages
57
- - `.agentweaver/.flows/` — optional project-local declarative flow specs loaded from the current repository
58
- - `src/pipeline/nodes/` — reusable pipeline nodes executed by the declarative runner
59
- - `src/interactive-ui.ts`interactive TUI built with `neo-blessed`
60
- - `src/markdown.ts` — markdown-to-terminal renderer for the TUI
61
- - `src/executors/`executor modules for concrete execution families
62
- - `src/executors/configs/`default executor configs kept as plain data
63
- - `src/runtime/` — shared runtime services used by executors
64
- - `docker-compose.yml` — runtime services for Codex and build verification
65
- - `Dockerfile.codex` — container image for Codex runtime
66
- - `verify_build.sh` — aggregated verification entrypoint used by `verify-build`
67
- - `run_go_tests.py` isolated Go test verification entrypoint
68
- - `run_go_linter.py` — isolated Go generate + lint verification entrypoint
69
- - `run_go_coverage.sh` — isolated Go coverage verification entrypoint
70
- - `package.json` — npm package metadata and scripts
71
- - `tsconfig.json` — TypeScript configuration
57
+ - `src/index.ts`CLI entrypoint, interactive mode bootstrap, and top-level orchestration
58
+ - `src/executors/`first-class executors
59
+ - `src/executors/configs/` — data-only default executor configs
60
+ - `src/pipeline/` — declarative flow loading, compilation, validation, runtime, and built-in flow specs
61
+ - `src/pipeline/nodes/` — reusable runtime nodes used by flow specs
62
+ - `src/runtime/`shared runtime services such as command resolution and subprocess execution
63
+ - `src/interactive-ui.ts` — full-screen interactive UI
64
+ - `src/markdown.ts`markdown rendering for terminal output
65
+ - `src/structured-artifact-schemas.json`schemas for machine-readable artifacts
66
+ - `tests/` — automated tests for pipeline behavior
67
+
68
+ ## Built-In Flows
69
+
70
+ User-invokable built-in commands currently map to these flow specs:
71
+
72
+ - `plan`
73
+ - `task-describe`
74
+ - `implement`
75
+ - `review`
76
+ - `review-fix`
77
+ - `review-loop`
78
+ - `bug-analyze`
79
+ - `bug-fix`
80
+ - `git-commit`
81
+ - `gitlab-diff-review`
82
+ - `gitlab-review`
83
+ - `mr-description`
84
+ - `run-go-tests-loop`
85
+ - `run-go-linter-loop`
86
+ - `auto-golang`
87
+ - `auto-common`
88
+
89
+ There are also built-in nested/helper flows that are loaded declaratively but are not direct top-level CLI commands, for example `review-project`.
72
90
 
73
91
  ## Requirements
74
92
 
75
93
  - Node.js `>= 18.19.0`
76
94
  - npm
77
- - Docker with `docker compose` or `docker-compose`
78
- - `codex` CLI for `bug-analyze`, `bug-fix`, `mr-description`, `plan`, and other Codex-driven steps
79
- - `claude` CLI for review and summary steps
95
+ - `codex` CLI for Codex-backed stages
96
+ - `opencode` CLI if you use OpenCode-backed stages
97
+ - access to Jira and/or GitLab when the selected flow needs them
80
98
 
81
99
  ## Installation
82
100
 
@@ -87,226 +105,226 @@ npm install
87
105
  npm run build
88
106
  ```
89
107
 
90
- Global install after publication:
108
+ Run from source:
109
+
110
+ ```bash
111
+ node dist/index.js --help
112
+ ```
113
+
114
+ Global install after publishing:
91
115
 
92
116
  ```bash
93
117
  npm install -g agentweaver
118
+ agentweaver --help
94
119
  ```
95
120
 
96
- One-off usage after publication:
121
+ One-off usage after publishing:
97
122
 
98
123
  ```bash
99
124
  npx agentweaver --help
100
125
  ```
101
126
 
102
- ## Environment
127
+ ## Environment Loading
103
128
 
104
- Required:
129
+ AgentWeaver loads environment variables from two optional `.env` files:
105
130
 
106
- - `JIRA_API_KEY` — Jira API token used to fetch issue JSON
131
+ 1. `~/.agentweaver/.env`
132
+ 2. `<project>/.agentweaver/.env`
133
+
134
+ Priority is:
135
+
136
+ 1. shell environment
137
+ 2. project-local `.agentweaver/.env`
138
+ 3. global `~/.agentweaver/.env`
139
+
140
+ The directory `~/.agentweaver` is created automatically on startup. Missing `.env` files are allowed.
141
+
142
+ `AGENTWEAVER_HOME` is only used to override the package installation/home directory used by the CLI. It is not the same thing as `~/.agentweaver`.
143
+
144
+ ## Environment Variables
145
+
146
+ Required for Jira-backed flows:
147
+
148
+ - `JIRA_API_KEY` — Jira API token
107
149
 
108
150
  Common optional variables:
109
151
 
110
- - `JIRA_BASE_URL` — required when you pass only an issue key like `DEMO-123`
111
- - `GITLAB_TOKEN` — personal access token for `gitlab-review` and `gitlab-diff-review`
112
- - `AGENTWEAVER_HOME` — path to the AgentWeaver installation directory
113
- - `DOCKER_COMPOSE_BIN` — override compose command, for example `docker compose`
152
+ - `JIRA_USERNAME` — required for Jira Cloud Basic auth
153
+ - `JIRA_AUTH_MODE` — `auto`, `basic`, or `bearer`
154
+ - `JIRA_BASE_URL` — required when passing only an issue key such as `DEMO-123`
155
+ - `GITLAB_TOKEN` — token for GitLab review-related flows
156
+ - `AGENTWEAVER_HOME` — override package home/installation directory
114
157
  - `CODEX_BIN` — override `codex` executable path
115
- - `CLAUDE_BIN` — override `claude` executable path
116
- - `CODEX_MODEL` — fallback model for Codex executors when the flow spec does not set `params.model`
117
- - `CLAUDE_MODEL` — fallback Claude model when the flow spec does not set `params.model`
158
+ - `CODEX_MODEL` — fallback model for Codex-backed executors
159
+ - `OPENCODE_BIN` — override `opencode` executable path
160
+ - `OPENCODE_MODEL` — fallback model for OpenCode-backed executors
118
161
 
119
- Example `.env`:
162
+ Example:
120
163
 
121
164
  ```bash
122
165
  JIRA_API_KEY=your-jira-api-token
166
+ JIRA_USERNAME=your.name@company.com
167
+ JIRA_AUTH_MODE=auto
123
168
  JIRA_BASE_URL=https://jira.example.com
169
+ GITLAB_TOKEN=your-gitlab-token
124
170
  AGENTWEAVER_HOME=/absolute/path/to/AgentWeaver
125
171
  CODEX_BIN=codex
126
- CLAUDE_BIN=claude
127
172
  CODEX_MODEL=gpt-5.4
128
- CLAUDE_MODEL=opus
129
- GOPRIVATE=gitlab.example.org/*
130
- GONOSUMDB=gitlab.example.org/*
131
- GONOPROXY=gitlab.example.org/*
132
- GIT_ALLOW_PROTOCOL=file:https:ssh
173
+ OPENCODE_BIN=opencode
174
+ OPENCODE_MODEL=minimax-coding-plan/MiniMax-M2.7
133
175
  ```
134
176
 
135
- ## Usage
177
+ ## TUI-First Operations
136
178
 
137
- Primary usage modes:
179
+ The full-screen TUI is not a cosmetic wrapper. It is the operator console for the harness:
138
180
 
139
- - direct execution of individual stages for controlled agent work
140
- - interactive TUI mode for selecting flows and observing progress
141
- - fully automated `auto` mode for end-to-end pipelines
181
+ - browse built-in and project-local workflows
182
+ - launch flows in the current scope
183
+ - inspect progress by phase and step
184
+ - follow activity, prompts, summaries, and statuses
185
+ - operate resumable flows without losing the execution model
142
186
 
143
- Direct CLI usage:
187
+ The CLI remains important for direct execution and automation, but the TUI is where the harness becomes an operational system rather than a set of commands.
144
188
 
145
- ```bash
146
- agentweaver plan DEMO-3288
147
- agentweaver plan
148
- agentweaver bug-analyze DEMO-3288
149
- agentweaver bug-fix DEMO-3288
150
- agentweaver gitlab-diff-review
151
- agentweaver gitlab-review
152
- agentweaver mr-description DEMO-3288
153
- agentweaver task-describe DEMO-3288
154
- agentweaver implement DEMO-3288
155
- agentweaver review
156
- agentweaver review DEMO-3288
157
- agentweaver review --scope release-prep
158
- agentweaver run-go-tests-loop DEMO-3288
159
- agentweaver run-go-tests-loop
160
- agentweaver run-go-linter-loop DEMO-3288
161
- agentweaver auto DEMO-3288
162
- ```
189
+ ## CLI Usage
163
190
 
164
- From source checkout:
191
+ Interactive mode:
165
192
 
166
193
  ```bash
167
- node dist/index.js plan DEMO-3288
168
- node dist/index.js plan
169
- node dist/index.js bug-analyze DEMO-3288
170
- node dist/index.js bug-fix DEMO-3288
171
- node dist/index.js gitlab-diff-review
172
- node dist/index.js gitlab-review
173
- node dist/index.js mr-description DEMO-3288
174
- node dist/index.js task-describe DEMO-3288
175
- node dist/index.js review
176
- node dist/index.js auto DEMO-3288
194
+ agentweaver
195
+ agentweaver DEMO-1234
196
+ agentweaver --force DEMO-1234
177
197
  ```
178
198
 
179
- Interactive mode:
199
+ Direct flow execution:
180
200
 
181
201
  ```bash
182
- agentweaver DEMO-3288
183
- agentweaver
202
+ agentweaver plan DEMO-1234
203
+ agentweaver task-describe DEMO-1234
204
+ agentweaver implement DEMO-1234
205
+ agentweaver review DEMO-1234
206
+ agentweaver review-fix DEMO-1234
207
+ agentweaver review-loop DEMO-1234
208
+ agentweaver bug-analyze DEMO-1234
209
+ agentweaver bug-fix DEMO-1234
210
+ agentweaver git-commit DEMO-1234
211
+ agentweaver gitlab-diff-review
212
+ agentweaver gitlab-review
213
+ agentweaver mr-description DEMO-1234
214
+ agentweaver run-go-tests-loop DEMO-1234
215
+ agentweaver run-go-linter-loop DEMO-1234
216
+ agentweaver auto-golang DEMO-1234
217
+ agentweaver auto-common DEMO-1234
184
218
  ```
185
219
 
186
- When you run from a working project directory, set `AGENTWEAVER_HOME` to the AgentWeaver installation:
220
+ From a source checkout:
187
221
 
188
222
  ```bash
189
- AGENTWEAVER_HOME=/absolute/path/to/AgentWeaver agentweaver DEMO-3288
223
+ node dist/index.js plan DEMO-1234
224
+ node dist/index.js implement DEMO-1234
225
+ node dist/index.js review DEMO-1234
226
+ node dist/index.js auto-golang DEMO-1234
227
+ node dist/index.js auto-common DEMO-1234
190
228
  ```
191
229
 
192
230
  Useful commands:
193
231
 
194
232
  ```bash
195
233
  agentweaver --help
196
- agentweaver auto --help-phases
197
- agentweaver auto-status DEMO-3288
198
- agentweaver auto-reset DEMO-3288
234
+ agentweaver --version
235
+ agentweaver auto-golang --help-phases
236
+ agentweaver auto-common --help-phases
237
+ agentweaver auto-golang --from <phase> DEMO-1234
238
+ agentweaver auto-status DEMO-1234
239
+ agentweaver auto-reset DEMO-1234
199
240
  ```
200
241
 
201
242
  Notes:
202
243
 
203
- - `--verbose` streams child process `stdout/stderr` in direct CLI mode
204
- - task-only commands such as `plan` and `auto` ask for a Jira task via interactive `user-input` when it is omitted
205
- - scope-flexible commands such as `gitlab-diff-review`, `gitlab-review`, `review`, `review-fix`, `run-go-tests-loop`, and `run-go-linter-loop` use the current git branch by default when a Jira task is omitted
206
- - `gitlab-review` and `gitlab-diff-review` ask for a GitLab merge request URL via interactive `user-input`
207
- - `--scope <name>` lets you override the default workflow scope name
208
- - the interactive `Activity` pane intentionally shows structured events, prompts, summaries, and short statuses instead of raw Codex/Claude logs by default
244
+ - `--dry` fetches required context but prints launch commands instead of running Codex/OpenCode steps
245
+ - `--verbose` streams child process stdout/stderr in direct CLI mode
246
+ - `--prompt <text>` appends extra instructions to the prompt
247
+ - `--scope <name>` is supported by scope-flexible flows such as `implement`, `review`, `review-fix`, `review-loop`, `run-go-tests-loop`, `run-go-linter-loop`, `gitlab-review`, and `gitlab-diff-review`
248
+ - `--md-lang <en|ru>` currently applies to `plan`
249
+ - `--force` only affects interactive mode and forces regeneration of task summary in Jira-backed flows
250
+ - Jira-backed flows ask for Jira input interactively when it is omitted
251
+ - `task-describe` can also work from manual task description input without Jira
252
+ - `gitlab-review` and `gitlab-diff-review` ask for a GitLab merge request URL interactively
253
+ - `auto-status` and `auto-reset` currently operate on persisted state for `auto-golang`
209
254
 
210
- For fully automated flows, the main entrypoint looks like:
255
+ ## `auto-golang` and `auto-common`
211
256
 
212
- ```bash
213
- agentweaver auto DEMO-3288
214
- agentweaver auto-status DEMO-3288
215
- agentweaver auto-reset DEMO-3288
216
- ```
257
+ `auto-golang` is the main resumable end-to-end automation flow. It stores persisted execution state and supports:
217
258
 
218
- This lets you run an agent pipeline as a reproducible process rather than a loose set of manual steps.
259
+ - phase listing via `--help-phases`
260
+ - restart from a specific phase via `--from <phase>`
261
+ - status inspection via `auto-status`
262
+ - reset via `auto-reset`
263
+ - resume validation against saved launch profile and required artifacts
219
264
 
220
- ## Interactive TUI
265
+ `auto-common` is a separate built-in automation flow with its own phase list, but it does not currently have dedicated `auto-status` or `auto-reset` commands.
221
266
 
222
- Interactive mode opens a full-screen TUI that works as an operator console for the agent harness:
267
+ ## Launch Profiles and Resume
223
268
 
224
- - flow list
225
- - current progress for the selected flow
226
- - activity log
227
- - task summary pane
228
- - keyboard navigation between panes
269
+ Interactive flow runs can ask for an LLM launch profile: executor plus model. That selection is persisted with resumable flow state.
229
270
 
230
- Current navigation:
271
+ Resume is allowed only when:
231
272
 
232
- - `Enter` run selected flow
233
- - `Tab` / `Shift+Tab` switch panes
234
- - `PgUp` / `PgDn` / `Home` / `End` scroll focused panes
235
- - `h` help overlay
236
- - `q` or `Ctrl+C` — exit
273
+ - the flow state exists for the current scope
274
+ - the saved launch profile matches the requested one
275
+ - required artifacts from completed steps are still present and valid
276
+ - Jira-backed flows still have the Jira context they need
237
277
 
238
- Flow discovery and highlighting:
278
+ If those checks fail, the runtime requires a restart instead of resuming.
239
279
 
240
- - built-in flows are loaded from `src/pipeline/flow-specs/`
241
- - project-local flows are loaded from `.agentweaver/.flows/*.json`
242
- - project-local flows are shown in a different color in the `Flows` pane
243
- - when a project-local flow is selected, the description pane also shows its source file path
244
- - if a local flow conflicts with a built-in flow id or uses unknown `node` / `executor` / `prompt` / `schema` types, interactive startup fails fast with a validation error
280
+ ## Artifacts and Scope
245
281
 
246
- Activity pane behavior:
282
+ Artifacts and flow state are stored under the current project scope. In practice:
247
283
 
248
- - each external launch is separated with a framed block that shows the current `node`, `executor`, and `model` when available
249
- - prompts and summaries are rendered as plain text for readability
250
- - live raw Codex/Claude output is not shown there in normal mode
284
+ - Jira-backed runs usually use the Jira issue key as scope
285
+ - non-Jira runs can fall back to a git-derived scope
286
+ - `--scope <name>` lets you override the default for supported commands
251
287
 
252
- ## Docker Runtime
288
+ The runtime uses artifacts as the contract between stages, including markdown outputs and structured JSON files validated against schemas.
253
289
 
254
- Docker is used as an isolated execution environment for Codex-related runtime scenarios that still require container orchestration.
255
-
256
- Main services:
257
-
258
- - `codex` — interactive Codex container
259
- - `codex-exec` — non-interactive `codex exec`
260
- - `verify-build` — project verification script inside container
261
- - `run-go-tests` — isolated `run_go_tests.py` execution inside container
262
- - `run-go-linter` — isolated `run_go_linter.py` execution inside container
263
- - `run-go-coverage` — isolated `run_go_coverage.sh` execution inside container
264
- - `codex-login` — interactive login container
265
- - `dockerd` — internal Docker daemon for testcontainers/build flows
266
-
267
- Typical login flow:
268
-
269
- ```bash
270
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm codex-login
271
- ```
290
+ ## Interactive TUI
272
291
 
273
- Interactive Codex container:
292
+ Running without a command opens the full-screen TUI. It acts as the operator console for the harness: browsing flows, launching them in scope, following activity, and reviewing summaries.
274
293
 
275
- ```bash
276
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm codex
277
- ```
294
+ Current navigation:
278
295
 
279
- Non-interactive Codex run:
296
+ - `Up` / `Down` — move in the flow tree
297
+ - `Left` / `Right` — collapse or expand folders
298
+ - `Enter` — toggle folder or run selected flow
299
+ - `Tab` / `Shift+Tab` — switch panes
300
+ - `PgUp` / `PgDn` / `Home` / `End` — scroll focused pane
301
+ - `h` — open help
302
+ - `q` or `Ctrl+C` — exit
280
303
 
281
- ```bash
282
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm \
283
- -e CODEX_PROMPT="Review the project and fix failing tests" \
284
- codex-exec
285
- ```
304
+ Flow discovery behavior:
286
305
 
287
- Build verification:
306
+ - built-in flows are loaded from `src/pipeline/flow-specs/`
307
+ - project-local flows are loaded from `.agentweaver/.flows/`
308
+ - both built-in and project-local flow specs are validated at load time
309
+ - duplicate flow ids fail fast
310
+ - project-local flows are shown separately in the UI
288
311
 
289
- ```bash
290
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm verify-build
291
- ```
312
+ ## Project-Local Flows
292
313
 
293
- Tests only:
314
+ You can add project-specific flow specs under:
294
315
 
295
316
  ```bash
296
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-tests
317
+ .agentweaver/.flows/**/*.json
297
318
  ```
298
319
 
299
- Linter only:
300
-
301
- ```bash
302
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-linter
303
- ```
320
+ Project-local flows:
304
321
 
305
- Coverage only:
322
+ - are discovered recursively
323
+ - get their flow id from the relative path without `.json`
324
+ - share the same validator and runtime as built-in flows
325
+ - cannot conflict with an existing built-in or other discovered flow id
306
326
 
307
- ```bash
308
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-coverage
309
- ```
327
+ Nested `flow-run` steps can reference built-in or project-local specs by file name, as long as the name resolves unambiguously.
310
328
 
311
329
  ## Development
312
330
 
@@ -335,37 +353,13 @@ Run from source in dev mode:
335
353
  npm run dev -- --help
336
354
  ```
337
355
 
338
- Representative smoke checks during development:
356
+ Recommended smoke checks:
339
357
 
340
358
  ```bash
341
359
  node dist/index.js --help
342
- node dist/index.js auto --help-phases
343
- node dist/index.js plan --dry DEMO-123
344
- node dist/index.js implement --dry DEMO-123
345
- node dist/index.js review --dry DEMO-123
346
- ```
347
-
348
- ## Publishing
349
-
350
- The package is prepared for npm publication and currently includes:
351
-
352
- - npm bin entry: `agentweaver`
353
- - `prepublishOnly` build/typecheck
354
- - tarball filtering through `files`
355
- - public publish config
356
-
357
- Publish flow:
358
-
359
- ```bash
360
- npm login
361
- npm publish
360
+ node dist/index.js auto-golang --help-phases
361
+ node dist/index.js auto-common --help-phases
362
+ node dist/index.js plan --dry DEMO-1234
363
+ node dist/index.js implement --dry DEMO-1234
364
+ node dist/index.js review --dry DEMO-1234
362
365
  ```
363
-
364
- If you want a public package, verify the package name and license before publishing.
365
-
366
- ## Security Notes
367
-
368
- - the Codex container does not receive host `docker.sock`
369
- - Docker access for tests goes through isolated `dockerd`
370
- - secure Git protocols only: `ssh` and `https`
371
- - `dockerd` runs privileged because DinD requires it; this is still safer than exposing host Docker directly