agentweaver 0.1.9 → 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 (101) hide show
  1. package/README.md +226 -200
  2. package/dist/artifacts.js +101 -56
  3. package/dist/errors.js +7 -0
  4. package/dist/executors/{codex-local-executor.js → codex-executor.js} +4 -4
  5. package/dist/executors/configs/{codex-local-config.js → codex-config.js} +1 -1
  6. package/dist/executors/configs/jira-fetch-config.js +2 -0
  7. package/dist/executors/configs/telegram-notifier-config.js +3 -0
  8. package/dist/executors/fetch-gitlab-diff-executor.js +1 -1
  9. package/dist/executors/fetch-gitlab-review-executor.js +1 -1
  10. package/dist/executors/git-commit-executor.js +25 -0
  11. package/dist/executors/telegram-notifier-executor.js +54 -0
  12. package/dist/flow-state.js +46 -1
  13. package/dist/gitlab.js +13 -8
  14. package/dist/index.js +507 -520
  15. package/dist/interactive-ui.js +495 -87
  16. package/dist/jira.js +52 -5
  17. package/dist/pipeline/auto-flow.js +6 -6
  18. package/dist/pipeline/context.js +1 -0
  19. package/dist/pipeline/declarative-flows.js +7 -4
  20. package/dist/pipeline/flow-catalog.js +60 -23
  21. package/dist/pipeline/flow-model-settings.js +77 -0
  22. package/dist/pipeline/flow-specs/auto-common.json +446 -0
  23. package/dist/pipeline/flow-specs/auto-golang.json +563 -0
  24. package/dist/pipeline/flow-specs/{bug-analyze.json → bugz/bug-analyze.json} +43 -25
  25. package/dist/pipeline/flow-specs/{bug-fix.json → bugz/bug-fix.json} +5 -4
  26. package/dist/pipeline/flow-specs/git-commit.json +196 -0
  27. package/dist/pipeline/flow-specs/{gitlab-diff-review.json → gitlab/gitlab-diff-review.json} +20 -50
  28. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +165 -0
  29. package/dist/pipeline/flow-specs/{mr-description.json → gitlab/mr-description.json} +17 -10
  30. package/dist/pipeline/flow-specs/{run-go-linter-loop.json → go/run-go-linter-loop.json} +40 -14
  31. package/dist/pipeline/flow-specs/{run-go-tests-loop.json → go/run-go-tests-loop.json} +40 -14
  32. package/dist/pipeline/flow-specs/implement.json +5 -4
  33. package/dist/pipeline/flow-specs/plan.json +40 -148
  34. package/dist/pipeline/flow-specs/{review-fix.json → review/review-fix.json} +73 -13
  35. package/dist/pipeline/flow-specs/review/review-loop.json +280 -0
  36. package/dist/pipeline/flow-specs/review/review-project.json +87 -0
  37. package/dist/pipeline/flow-specs/review/review.json +126 -0
  38. package/dist/pipeline/flow-specs/task-describe.json +191 -11
  39. package/dist/pipeline/launch-profile-config.js +38 -0
  40. package/dist/pipeline/node-registry.js +75 -45
  41. package/dist/pipeline/nodes/build-failure-summary-node.js +16 -29
  42. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +36 -0
  43. package/dist/pipeline/nodes/codex-prompt-node.js +41 -0
  44. package/dist/pipeline/nodes/commit-message-form-node.js +79 -0
  45. package/dist/pipeline/nodes/git-commit-form-node.js +138 -0
  46. package/dist/pipeline/nodes/git-commit-node.js +28 -0
  47. package/dist/pipeline/nodes/git-status-node.js +221 -0
  48. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +10 -6
  49. package/dist/pipeline/nodes/jira-context-node.js +10 -0
  50. package/dist/pipeline/nodes/llm-prompt-node.js +62 -0
  51. package/dist/pipeline/nodes/plan-codex-node.js +1 -1
  52. package/dist/pipeline/nodes/read-file-node.js +11 -0
  53. package/dist/pipeline/nodes/review-findings-form-node.js +18 -14
  54. package/dist/pipeline/nodes/select-files-form-node.js +72 -0
  55. package/dist/pipeline/nodes/telegram-notifier-node.js +28 -0
  56. package/dist/pipeline/nodes/user-input-node.js +29 -8
  57. package/dist/pipeline/nodes/write-selection-file-node.js +46 -0
  58. package/dist/pipeline/prompt-registry.js +2 -4
  59. package/dist/pipeline/prompt-runtime.js +13 -3
  60. package/dist/pipeline/registry.js +6 -8
  61. package/dist/pipeline/spec-compiler.js +5 -0
  62. package/dist/pipeline/spec-loader.js +18 -7
  63. package/dist/pipeline/spec-types.js +7 -3
  64. package/dist/pipeline/spec-validator.js +4 -0
  65. package/dist/pipeline/types.js +1 -0
  66. package/dist/pipeline/value-resolver.js +40 -38
  67. package/dist/prompts.js +104 -110
  68. package/dist/runtime/agentweaver-home.js +8 -0
  69. package/dist/runtime/command-resolution.js +0 -38
  70. package/dist/runtime/env-loader.js +43 -0
  71. package/dist/runtime/process-runner.js +45 -1
  72. package/dist/structured-artifact-schema-registry.js +53 -0
  73. package/dist/structured-artifact-schemas.json +0 -20
  74. package/dist/structured-artifacts.js +3 -43
  75. package/dist/user-input.js +30 -2
  76. package/package.json +2 -6
  77. package/Dockerfile.codex +0 -56
  78. package/dist/executors/claude-executor.js +0 -46
  79. package/dist/executors/codex-docker-executor.js +0 -27
  80. package/dist/executors/configs/claude-config.js +0 -12
  81. package/dist/executors/configs/codex-docker-config.js +0 -10
  82. package/dist/executors/configs/verify-build-config.js +0 -7
  83. package/dist/executors/verify-build-executor.js +0 -123
  84. package/dist/pipeline/flow-specs/auto.json +0 -979
  85. package/dist/pipeline/flow-specs/gitlab-review.json +0 -317
  86. package/dist/pipeline/flow-specs/plan-opencode.json +0 -603
  87. package/dist/pipeline/flow-specs/preflight.json +0 -206
  88. package/dist/pipeline/flow-specs/review-project.json +0 -243
  89. package/dist/pipeline/flow-specs/review.json +0 -312
  90. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  91. package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
  92. package/dist/pipeline/flows/preflight-flow.js +0 -19
  93. package/dist/pipeline/nodes/claude-prompt-node.js +0 -54
  94. package/dist/pipeline/nodes/codex-docker-prompt-node.js +0 -32
  95. package/dist/pipeline/nodes/codex-local-prompt-node.js +0 -32
  96. package/dist/pipeline/nodes/review-claude-node.js +0 -38
  97. package/dist/pipeline/nodes/review-reply-codex-node.js +0 -40
  98. package/dist/pipeline/nodes/verify-build-node.js +0 -15
  99. package/dist/runtime/docker-runtime.js +0 -51
  100. package/docker-compose.yml +0 -445
  101. package/verify_build.sh +0 -105
package/README.md CHANGED
@@ -1,66 +1,100 @@
1
1
  # AgentWeaver
2
2
 
3
- `AgentWeaver` is a TypeScript/Node.js CLI for engineering workflows around Jira, GitLab review artifacts, Codex, and Claude.
3
+ `AgentWeaver` is a TypeScript/Node.js CLI for harness engineering around coding agents.
4
4
 
5
- It orchestrates a flow like:
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
+
7
+ Typical usage looks like:
6
8
 
7
9
  `plan -> implement -> run-go-linter-loop -> run-go-tests-loop -> review -> review-fix`
8
10
 
9
- The package is designed to run as an npm CLI and includes an interactive terminal UI built on `neo-blessed`.
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.
10
12
 
11
13
  ## What It Does
12
14
 
13
- - Fetches a Jira issue by key or browse URL
14
- - Fetches GitLab merge request review comments into reusable markdown and JSON artifacts
15
- - Fetches GitLab merge request diffs into reusable markdown and JSON artifacts and can run Claude-based diff review directly from MR
16
- - Generates workflow artifacts such as design, implementation plan, QA plan, bug analysis, reviews, and summaries
17
- - Machine-readable JSON artifacts are stored under `.agentweaver/scopes/<scope-key>/.artifacts/` and act as the source of truth between workflow steps; Markdown artifacts remain for human inspection
18
- - Workflow artifacts are isolated by scope; for Jira-driven flows the scope key defaults to the Jira task key, otherwise it defaults to `<git-branch>--<worktree-hash>`
19
- - Runs workflow stages like `bug-analyze`, `bug-fix`, `gitlab-diff-review`, `mr-description`, `plan`, `task-describe`, `implement`, `review`, `review-fix`, `run-go-tests-loop`, `run-go-linter-loop`, and `auto`
20
- - Persists compact `auto` pipeline state on disk so runs can resume without storing large agent outputs
21
- - Uses Docker runtime services for isolated Codex execution and build verification
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
21
+
22
+ ## Harness Engineering Focus
23
+
24
+ AgentWeaver is not positioned as a thin wrapper around one agent call. It is meant for harness engineering:
25
+
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
22
30
 
23
- ## Architecture
31
+ In practice, this means you can treat an agent workflow like an engineered system: versioned, inspectable, repeatable, and debuggable.
24
32
 
25
- The CLI now uses an executor + node + declarative flow architecture.
33
+ ## Core Concepts
26
34
 
27
- - `src/index.ts` remains the CLI entrypoint and high-level orchestration layer
28
- - `src/executors/` contains first-class executors for external actions such as Jira fetch, GitLab review fetch, local Codex, Docker-based build verification, Claude, Claude summaries, and process execution
29
- - `src/pipeline/nodes/` contains reusable runtime nodes built on top of executors
30
- - `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`
31
- - project-local flow may additionally be placed in `.agentweaver/.flows/*.json`; they are discovered at runtime from the current workspace
32
- - `src/runtime/` contains shared runtime services such as command resolution, Docker runtime environment setup, and subprocess execution
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`
33
41
 
34
- This keeps command handlers focused on choosing a flow and providing parameters instead of assembling prompts and subprocess wiring inline.
42
+ ## Declarative Workflow Model
43
+
44
+ The center of the system is the declarative flow spec:
45
+
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
52
+
53
+ This keeps workflow design in JSON while keeping implementation details in typed runtime code.
35
54
 
36
55
  ## Repository Layout
37
56
 
38
- - `src/`main TypeScript sources
39
- - `src/index.ts`CLI entrypoint and workflow orchestration
40
- - `src/pipeline/flow-specs/` — declarative JSON specs for workflow stages
41
- - `.agentweaver/.flows/` — optional project-local declarative flow specs loaded from the current repository
42
- - `src/pipeline/nodes/` — reusable pipeline nodes executed by the declarative runner
43
- - `src/interactive-ui.ts`interactive TUI built with `neo-blessed`
44
- - `src/markdown.ts` — markdown-to-terminal renderer for the TUI
45
- - `src/executors/`executor modules for concrete execution families
46
- - `src/executors/configs/`default executor configs kept as plain data
47
- - `src/runtime/` — shared runtime services used by executors
48
- - `docker-compose.yml` — runtime services for Codex and build verification
49
- - `Dockerfile.codex` — container image for Codex runtime
50
- - `verify_build.sh` — aggregated verification entrypoint used by `verify-build`
51
- - `run_go_tests.py` isolated Go test verification entrypoint
52
- - `run_go_linter.py` — isolated Go generate + lint verification entrypoint
53
- - `run_go_coverage.sh` — isolated Go coverage verification entrypoint
54
- - `package.json` — npm package metadata and scripts
55
- - `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`.
56
90
 
57
91
  ## Requirements
58
92
 
59
93
  - Node.js `>= 18.19.0`
60
94
  - npm
61
- - Docker with `docker compose` or `docker-compose`
62
- - `codex` CLI for `bug-analyze`, `bug-fix`, `mr-description`, `plan`, and other Codex-driven steps
63
- - `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
64
98
 
65
99
  ## Installation
66
100
 
@@ -71,210 +105,226 @@ npm install
71
105
  npm run build
72
106
  ```
73
107
 
74
- Global install after publication:
108
+ Run from source:
109
+
110
+ ```bash
111
+ node dist/index.js --help
112
+ ```
113
+
114
+ Global install after publishing:
75
115
 
76
116
  ```bash
77
117
  npm install -g agentweaver
118
+ agentweaver --help
78
119
  ```
79
120
 
80
- One-off usage after publication:
121
+ One-off usage after publishing:
81
122
 
82
123
  ```bash
83
124
  npx agentweaver --help
84
125
  ```
85
126
 
86
- ## Environment
127
+ ## Environment Loading
128
+
129
+ AgentWeaver loads environment variables from two optional `.env` files:
130
+
131
+ 1. `~/.agentweaver/.env`
132
+ 2. `<project>/.agentweaver/.env`
133
+
134
+ Priority is:
87
135
 
88
- Required:
136
+ 1. shell environment
137
+ 2. project-local `.agentweaver/.env`
138
+ 3. global `~/.agentweaver/.env`
89
139
 
90
- - `JIRA_API_KEY` Jira API token used to fetch issue JSON
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
91
149
 
92
150
  Common optional variables:
93
151
 
94
- - `JIRA_BASE_URL` — required when you pass only an issue key like `DEMO-123`
95
- - `GITLAB_TOKEN` — personal access token for `gitlab-review` and `gitlab-diff-review`
96
- - `AGENTWEAVER_HOME` — path to the AgentWeaver installation directory
97
- - `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
98
157
  - `CODEX_BIN` — override `codex` executable path
99
- - `CLAUDE_BIN` — override `claude` executable path
100
- - `CODEX_MODEL` — fallback model for Codex executors when the flow spec does not set `params.model`
101
- - `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
102
161
 
103
- Example `.env`:
162
+ Example:
104
163
 
105
164
  ```bash
106
165
  JIRA_API_KEY=your-jira-api-token
166
+ JIRA_USERNAME=your.name@company.com
167
+ JIRA_AUTH_MODE=auto
107
168
  JIRA_BASE_URL=https://jira.example.com
169
+ GITLAB_TOKEN=your-gitlab-token
108
170
  AGENTWEAVER_HOME=/absolute/path/to/AgentWeaver
109
171
  CODEX_BIN=codex
110
- CLAUDE_BIN=claude
111
172
  CODEX_MODEL=gpt-5.4
112
- CLAUDE_MODEL=opus
113
- GOPRIVATE=gitlab.example.org/*
114
- GONOSUMDB=gitlab.example.org/*
115
- GONOPROXY=gitlab.example.org/*
116
- GIT_ALLOW_PROTOCOL=file:https:ssh
173
+ OPENCODE_BIN=opencode
174
+ OPENCODE_MODEL=minimax-coding-plan/MiniMax-M2.7
117
175
  ```
118
176
 
119
- ## Usage
177
+ ## TUI-First Operations
120
178
 
121
- Direct CLI usage:
179
+ The full-screen TUI is not a cosmetic wrapper. It is the operator console for the harness:
122
180
 
123
- ```bash
124
- agentweaver plan DEMO-3288
125
- agentweaver plan
126
- agentweaver bug-analyze DEMO-3288
127
- agentweaver bug-fix DEMO-3288
128
- agentweaver gitlab-diff-review
129
- agentweaver gitlab-review
130
- agentweaver mr-description DEMO-3288
131
- agentweaver task-describe DEMO-3288
132
- agentweaver implement DEMO-3288
133
- agentweaver review
134
- agentweaver review DEMO-3288
135
- agentweaver review --scope release-prep
136
- agentweaver run-go-tests-loop DEMO-3288
137
- agentweaver run-go-tests-loop
138
- agentweaver run-go-linter-loop DEMO-3288
139
- agentweaver auto DEMO-3288
140
- ```
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
141
186
 
142
- From source checkout:
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.
143
188
 
144
- ```bash
145
- node dist/index.js plan DEMO-3288
146
- node dist/index.js plan
147
- node dist/index.js bug-analyze DEMO-3288
148
- node dist/index.js bug-fix DEMO-3288
149
- node dist/index.js gitlab-diff-review
150
- node dist/index.js gitlab-review
151
- node dist/index.js mr-description DEMO-3288
152
- node dist/index.js task-describe DEMO-3288
153
- node dist/index.js review
154
- node dist/index.js auto DEMO-3288
155
- ```
189
+ ## CLI Usage
156
190
 
157
191
  Interactive mode:
158
192
 
159
193
  ```bash
160
- agentweaver DEMO-3288
161
194
  agentweaver
195
+ agentweaver DEMO-1234
196
+ agentweaver --force DEMO-1234
197
+ ```
198
+
199
+ Direct flow execution:
200
+
201
+ ```bash
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
162
218
  ```
163
219
 
164
- When you run from a working project directory, set `AGENTWEAVER_HOME` to the AgentWeaver installation:
220
+ From a source checkout:
165
221
 
166
222
  ```bash
167
- 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
168
228
  ```
169
229
 
170
230
  Useful commands:
171
231
 
172
232
  ```bash
173
233
  agentweaver --help
174
- agentweaver auto --help-phases
175
- agentweaver auto-status DEMO-3288
176
- 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
177
240
  ```
178
241
 
179
242
  Notes:
180
243
 
181
- - `--verbose` streams child process `stdout/stderr` in direct CLI mode
182
- - task-only commands such as `plan` and `auto` ask for Jira task via interactive `user-input` when it is omitted
183
- - 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 Jira task is omitted
184
- - `gitlab-review` and `gitlab-diff-review` ask for GitLab merge request URL via interactive `user-input`
185
- - `--scope <name>` lets you override the default project scope name
186
- - the interactive `Activity` pane is intentionally structured: it shows launch separators, prompts, summaries, and short status messages 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`
187
254
 
188
- ## Interactive TUI
189
-
190
- Interactive mode opens a full-screen terminal UI with:
255
+ ## `auto-golang` and `auto-common`
191
256
 
192
- - flow list
193
- - current flow progress
194
- - activity log
195
- - task summary pane
196
- - keyboard navigation between panes
257
+ `auto-golang` is the main resumable end-to-end automation flow. It stores persisted execution state and supports:
197
258
 
198
- Current navigation:
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
199
264
 
200
- - `Enter` run selected flow
201
- - `Tab` / `Shift+Tab` — switch panes
202
- - `PgUp` / `PgDn` / `Home` / `End` — scroll focused panes
203
- - `h` — help overlay
204
- - `q` or `Ctrl+C` — exit
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.
205
266
 
206
- Flow discovery and highlighting:
267
+ ## Launch Profiles and Resume
207
268
 
208
- - built-in flow are loaded from the packaged `src/pipeline/flow-specs/`
209
- - project-local flow are loaded from `.agentweaver/.flows/*.json`
210
- - project-local flow are shown in a different color in the `Flows` pane
211
- - when a project-local flow is selected, the description pane also shows its source file path
212
- - 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
269
+ Interactive flow runs can ask for an LLM launch profile: executor plus model. That selection is persisted with resumable flow state.
213
270
 
214
- Activity pane behavior:
271
+ Resume is allowed only when:
215
272
 
216
- - each external launch is separated with a framed block that shows the current `node`, `executor`, and `model` when available
217
- - prompts and summaries are rendered as plain text for readability
218
- - live raw Codex/Claude output is not shown there in normal mode
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
219
277
 
220
- ## Docker Runtime
278
+ If those checks fail, the runtime requires a restart instead of resuming.
221
279
 
222
- Docker is used as an isolated execution environment for Codex-related runtime scenarios that still require container orchestration.
280
+ ## Artifacts and Scope
223
281
 
224
- Main services:
282
+ Artifacts and flow state are stored under the current project scope. In practice:
225
283
 
226
- - `codex` interactive Codex container
227
- - `codex-exec` non-interactive `codex exec`
228
- - `verify-build` project verification script inside container
229
- - `run-go-tests` — isolated `run_go_tests.py` execution inside container
230
- - `run-go-linter` — isolated `run_go_linter.py` execution inside container
231
- - `run-go-coverage` — isolated `run_go_coverage.sh` execution inside container
232
- - `codex-login` — interactive login container
233
- - `dockerd` — internal Docker daemon for testcontainers/build flows
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
234
287
 
235
- Typical login flow:
288
+ The runtime uses artifacts as the contract between stages, including markdown outputs and structured JSON files validated against schemas.
236
289
 
237
- ```bash
238
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm codex-login
239
- ```
290
+ ## Interactive TUI
240
291
 
241
- 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.
242
293
 
243
- ```bash
244
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm codex
245
- ```
294
+ Current navigation:
246
295
 
247
- 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
248
303
 
249
- ```bash
250
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm \
251
- -e CODEX_PROMPT="Review the project and fix failing tests" \
252
- codex-exec
253
- ```
304
+ Flow discovery behavior:
254
305
 
255
- 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
256
311
 
257
- ```bash
258
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm verify-build
259
- ```
312
+ ## Project-Local Flows
260
313
 
261
- Tests only:
314
+ You can add project-specific flow specs under:
262
315
 
263
316
  ```bash
264
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-tests
317
+ .agentweaver/.flows/**/*.json
265
318
  ```
266
319
 
267
- Linter only:
268
-
269
- ```bash
270
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-linter
271
- ```
320
+ Project-local flows:
272
321
 
273
- 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
274
326
 
275
- ```bash
276
- PROJECT_DIR="$PWD" docker compose -f "$AGENTWEAVER_HOME/docker-compose.yml" run --rm run-go-coverage
277
- ```
327
+ Nested `flow-run` steps can reference built-in or project-local specs by file name, as long as the name resolves unambiguously.
278
328
 
279
329
  ## Development
280
330
 
@@ -303,37 +353,13 @@ Run from source in dev mode:
303
353
  npm run dev -- --help
304
354
  ```
305
355
 
306
- Representative smoke checks during development:
356
+ Recommended smoke checks:
307
357
 
308
358
  ```bash
309
359
  node dist/index.js --help
310
- node dist/index.js auto --help-phases
311
- node dist/index.js plan --dry DEMO-123
312
- node dist/index.js implement --dry DEMO-123
313
- node dist/index.js review --dry DEMO-123
314
- ```
315
-
316
- ## Publishing
317
-
318
- The package is prepared for npm publication and currently includes:
319
-
320
- - npm bin entry: `agentweaver`
321
- - `prepublishOnly` build/typecheck
322
- - tarball filtering through `files`
323
- - public publish config
324
-
325
- Publish flow:
326
-
327
- ```bash
328
- npm login
329
- 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
330
365
  ```
331
-
332
- If you want a public package, verify the package name and license before publishing.
333
-
334
- ## Security Notes
335
-
336
- - the Codex container does not receive host `docker.sock`
337
- - Docker access for tests goes through isolated `dockerd`
338
- - secure Git protocols only: `ssh` and `https`
339
- - `dockerd` runs privileged because DinD requires it; this is still safer than exposing host Docker directly