@aion0/forge 0.4.5 → 0.4.6

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/RELEASE_NOTES.md CHANGED
@@ -1,11 +1,12 @@
1
- # Forge v0.4.5
1
+ # Forge v0.4.6
2
2
 
3
3
  Released: 2026-03-21
4
4
 
5
- ## Changes since v0.4.4
5
+ ## Changes since v0.4.5
6
6
 
7
- ### Bug Fixes
8
- - fix: add drag-to-resize for left sidebars across all split-panel pages (#14)
7
+ ### Other
8
+ - improve help features
9
+ - imporve help features
9
10
 
10
11
 
11
- **Full Changelog**: https://github.com/aiwatching/forge/compare/v0.4.4...v0.4.5
12
+ **Full Changelog**: https://github.com/aiwatching/forge/compare/v0.4.5...v0.4.6
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## What Are Pipelines?
4
4
 
5
- Pipelines chain multiple tasks into a DAG (directed acyclic graph). Each step can depend on previous steps, pass outputs forward, and run in parallel.
5
+ Pipelines chain multiple tasks into a DAG (directed acyclic graph). Each step can depend on previous steps, pass outputs forward, and run in parallel. Pipelines are defined as YAML workflow files.
6
6
 
7
7
  ## YAML Workflow Format
8
8
 
@@ -10,9 +10,10 @@ Pipelines chain multiple tasks into a DAG (directed acyclic graph). Each step ca
10
10
  name: my-workflow
11
11
  description: "What this workflow does"
12
12
  input:
13
- feature: "Feature description"
13
+ feature: "Feature description" # required input fields
14
+ priority: "Priority level (optional)"
14
15
  vars:
15
- project: my-app
16
+ project: my-app # default variables
16
17
  nodes:
17
18
  design:
18
19
  project: "{{vars.project}}"
@@ -23,7 +24,10 @@ nodes:
23
24
  implement:
24
25
  project: "{{vars.project}}"
25
26
  depends_on: [design]
26
- prompt: "Implement: {{nodes.design.outputs.spec}}"
27
+ prompt: "Implement based on: {{nodes.design.outputs.spec}}"
28
+ outputs:
29
+ - name: diff
30
+ extract: git_diff
27
31
  review:
28
32
  project: "{{vars.project}}"
29
33
  depends_on: [implement]
@@ -32,30 +36,252 @@ nodes:
32
36
 
33
37
  ## Node Options
34
38
 
35
- | Field | Description |
36
- |-------|-------------|
37
- | `project` | Project name (supports `{{vars.xxx}}` templates) |
38
- | `prompt` | Claude Code prompt or shell command |
39
- | `mode` | `claude` (default) or `shell` |
40
- | `branch` | Auto-checkout branch before running |
41
- | `depends_on` | List of node IDs that must complete first |
42
- | `outputs` | Extract results: `result`, `git_diff`, or `stdout` |
43
- | `routes` | Conditional routing to next nodes |
39
+ | Field | Description | Default |
40
+ |-------|-------------|---------|
41
+ | `project` | Project name (supports templates) | required |
42
+ | `prompt` | Claude Code prompt or shell command | required |
43
+ | `mode` | `claude` (AI agent) or `shell` (raw command) | `claude` |
44
+ | `branch` | Auto-checkout branch before running (supports templates) | none |
45
+ | `depends_on` | List of node IDs that must complete first | `[]` |
46
+ | `outputs` | Extract results (see Output Extraction) | `[]` |
47
+ | `routes` | Conditional routing to next nodes (see Routing) | `[]` |
48
+ | `max_iterations` | Max loop iterations for routed nodes | `3` |
49
+
50
+ ## Node Modes
51
+
52
+ ### `claude` (default)
53
+ Runs the prompt via Claude Code (`claude -p`). The AI agent reads the codebase, makes changes, and returns a result.
54
+
55
+ ### `shell`
56
+ Runs the prompt as a raw shell command (`bash -c "..."`). Useful for git operations, CLI tools, API calls, etc.
57
+
58
+ ```yaml
59
+ nodes:
60
+ setup:
61
+ mode: shell
62
+ project: my-app
63
+ prompt: |
64
+ git checkout main && git pull && echo "READY"
65
+ outputs:
66
+ - name: info
67
+ extract: stdout
68
+ ```
69
+
70
+ **Shell escaping**: Template values in shell mode are automatically escaped (single quotes `'` → `'\''`) to prevent injection.
44
71
 
45
72
  ## Template Variables
46
73
 
47
- - `{{input.xxx}}` pipeline input values
48
- - `{{vars.xxx}}` — workflow variables
49
- - `{{nodes.xxx.outputs.yyy}}` — outputs from previous nodes
74
+ Templates use `{{...}}` syntax and are resolved before execution:
75
+
76
+ - `{{input.xxx}}` — pipeline input values provided at trigger time
77
+ - `{{vars.xxx}}` — workflow-level variables defined in YAML
78
+ - `{{nodes.<node_id>.outputs.<output_name>}}` — outputs from completed nodes
79
+
80
+ Node IDs can contain hyphens (e.g., `{{nodes.fetch-issue.outputs.data}}`).
81
+
82
+ ### Examples
83
+
84
+ ```yaml
85
+ prompt: "Fix issue #{{input.issue_id}} in {{input.project}}"
86
+ prompt: "Based on: {{nodes.design.outputs.spec}}"
87
+ prompt: |
88
+ REPO={{nodes.setup.outputs.repo}} && \
89
+ gh pr create --title "Fix #{{input.issue_id}}" -R "$REPO"
90
+ ```
91
+
92
+ ## Output Extraction
93
+
94
+ Each node can extract outputs for downstream nodes:
95
+
96
+ | Extract Type | Description |
97
+ |-------------|-------------|
98
+ | `result` | Claude's final response text |
99
+ | `stdout` | Shell command stdout (same as result for shell mode) |
100
+ | `git_diff` | Git diff of changes made during the task |
101
+
102
+ ```yaml
103
+ outputs:
104
+ - name: summary
105
+ extract: result
106
+ - name: changes
107
+ extract: git_diff
108
+ ```
109
+
110
+ ## Skip Convention (`__SKIP__`)
111
+
112
+ If a shell node outputs `__SKIP__` in its stdout and exits with code 0, the node is marked as `skipped` instead of `done`. All downstream dependent nodes are also skipped. The pipeline completes successfully (not failed).
113
+
114
+ ```yaml
115
+ nodes:
116
+ check:
117
+ mode: shell
118
+ project: my-app
119
+ prompt: |
120
+ if [ -z "{{input.issue_id}}" ]; then
121
+ echo "__SKIP__ No issue_id provided"
122
+ exit 0
123
+ fi
124
+ echo "Processing issue {{input.issue_id}}"
125
+ ```
126
+
127
+ Use this for optional steps that should gracefully skip when preconditions aren't met.
128
+
129
+ ## Conditional Routing
130
+
131
+ Nodes can route to different next steps based on output content:
132
+
133
+ ```yaml
134
+ nodes:
135
+ analyze:
136
+ project: my-app
137
+ prompt: "Analyze the issue. Reply SIMPLE or COMPLEX."
138
+ outputs:
139
+ - name: complexity
140
+ extract: result
141
+ routes:
142
+ - condition: "{{outputs.complexity contains 'SIMPLE'}}"
143
+ next: quick-fix
144
+ - condition: default
145
+ next: deep-fix
146
+ quick-fix:
147
+ depends_on: [analyze]
148
+ project: my-app
149
+ prompt: "Apply a quick fix"
150
+ deep-fix:
151
+ depends_on: [analyze]
152
+ project: my-app
153
+ prompt: "Do a thorough analysis and fix"
154
+ ```
155
+
156
+ ### Route Conditions
157
+
158
+ - `{{outputs.<name> contains '<keyword>'}}` — check if output contains a keyword
159
+ - `default` — fallback route (always matches)
160
+
161
+ ### Loops
162
+
163
+ If a route points back to the same node, it creates a loop (up to `max_iterations`):
164
+
165
+ ```yaml
166
+ nodes:
167
+ fix-and-test:
168
+ project: my-app
169
+ prompt: "Fix the failing test, then run tests."
170
+ max_iterations: 5
171
+ outputs:
172
+ - name: test_result
173
+ extract: result
174
+ routes:
175
+ - condition: "{{outputs.test_result contains 'PASS'}}"
176
+ next: done
177
+ - condition: default
178
+ next: fix-and-test # loop back to retry
179
+ done:
180
+ depends_on: [fix-and-test]
181
+ mode: shell
182
+ project: my-app
183
+ prompt: "echo 'All tests passing!'"
184
+ ```
185
+
186
+ ## Branch Auto-checkout
187
+
188
+ Nodes can auto-checkout a git branch before execution:
189
+
190
+ ```yaml
191
+ nodes:
192
+ work:
193
+ project: my-app
194
+ branch: "feature/{{input.feature_name}}"
195
+ prompt: "Implement the feature"
196
+ ```
197
+
198
+ ## Parallel Execution
199
+
200
+ Nodes without dependency relationships run in parallel:
201
+
202
+ ```yaml
203
+ nodes:
204
+ frontend:
205
+ project: my-app
206
+ prompt: "Build frontend component"
207
+ backend:
208
+ project: my-app
209
+ prompt: "Build API endpoint"
210
+ integration:
211
+ depends_on: [frontend, backend] # waits for both
212
+ project: my-app
213
+ prompt: "Integration test"
214
+ ```
215
+
216
+ `frontend` and `backend` run simultaneously; `integration` starts when both finish.
50
217
 
51
218
  ## Built-in Workflows
52
219
 
53
- ### issue-fix-and-review
54
- Complete issue resolution pipeline: fetch issue → fix code create PRreview code → notify.
220
+ ### issue-auto-fix
221
+ Complete issue resolution: fetch GitHub issue → fix code on new branchcreate PR.
222
+
223
+ **Input**: `issue_id`, `project`, `base_branch` (optional), `extra_context` (optional)
224
+
225
+ **Steps**: setup → fetch-issue → fix-code → push-and-pr → notify
226
+
227
+ **Prerequisites**: `gh` CLI installed and authenticated (`gh auth login`), project has GitHub remote.
228
+
229
+ ### pr-review
230
+ Review a pull request: fetch PR diff → AI review → report.
231
+
232
+ **Input**: `pr_number`, `project`
233
+
234
+ **Steps**: setup → fetch-pr → review → post-review
55
235
 
56
- Steps: setup fetch-issue → fix-code → push-and-pr → review → cleanup
236
+ ## Project Pipeline Bindings
57
237
 
58
- Input: `issue_id`, `project`, `base_branch` (optional), `extra_context` (optional)
238
+ Projects can bind workflows for easy access and scheduled execution.
239
+
240
+ ### Binding a Workflow to a Project
241
+
242
+ 1. Go to **Projects → select project → Pipelines tab**
243
+ 2. Click **+ Add** to attach a workflow
244
+ 3. Configure:
245
+ - **Enabled**: toggle on/off
246
+ - **Schedule**: Manual only, or periodic (15min to 24h intervals)
247
+ 4. Click **Run** to manually trigger
248
+
249
+ ### Scheduled Execution
250
+
251
+ When a schedule is set (e.g., "Every 30 min"):
252
+ - The scheduler checks all bindings every 60 seconds
253
+ - If the interval has elapsed since last run, the pipeline triggers automatically
254
+ - Running pipelines are not re-triggered (prevents overlap)
255
+ - `Last run` and `Next run` times are shown in the UI
256
+
257
+ Schedule options: Manual only, 15min, 30min, 1h, 2h, 6h, 12h, 24h.
258
+
259
+ ### API
260
+
261
+ ```bash
262
+ # List bindings + runs + workflows for a project
263
+ curl "http://localhost:3000/api/project-pipelines?project=/path/to/project"
264
+
265
+ # Add binding
266
+ curl -X POST http://localhost:3000/api/project-pipelines \
267
+ -H 'Content-Type: application/json' \
268
+ -d '{"action":"add","projectPath":"/path","projectName":"my-app","workflowName":"issue-auto-fix"}'
269
+
270
+ # Update binding (enable/disable, change config/schedule)
271
+ curl -X POST http://localhost:3000/api/project-pipelines \
272
+ -H 'Content-Type: application/json' \
273
+ -d '{"action":"update","projectPath":"/path","workflowName":"issue-auto-fix","config":{"interval":30}}'
274
+
275
+ # Trigger pipeline manually
276
+ curl -X POST http://localhost:3000/api/project-pipelines \
277
+ -H 'Content-Type: application/json' \
278
+ -d '{"action":"trigger","projectPath":"/path","projectName":"my-app","workflowName":"issue-auto-fix","input":{"issue_id":"42"}}'
279
+
280
+ # Remove binding
281
+ curl -X POST http://localhost:3000/api/project-pipelines \
282
+ -H 'Content-Type: application/json' \
283
+ -d '{"action":"remove","projectPath":"/path","workflowName":"issue-auto-fix"}'
284
+ ```
59
285
 
60
286
  ## CLI
61
287
 
@@ -66,7 +292,7 @@ forge run my-workflow # execute a workflow
66
292
 
67
293
  ## Import a Workflow
68
294
 
69
- 1. In Pipelines tab, click **Import**
295
+ 1. In **Pipelines** tab, click **Import**
70
296
  2. Paste YAML workflow content
71
297
  3. Click **Save Workflow**
72
298
 
@@ -79,10 +305,25 @@ To create a workflow via Help AI: ask "Create a pipeline that does X" — the AI
79
305
  ```bash
80
306
  curl -X POST http://localhost:3000/api/pipelines \
81
307
  -H 'Content-Type: application/json' \
82
- -d '{"action": "save-workflow", "yaml": "name: my-flow\nnodes:\n step1:\n project: my-project\n prompt: do something"}'
308
+ -d '{"action": "save-workflow", "yaml": "<yaml content>"}'
83
309
  ```
84
310
 
311
+ ## Pipeline Model
312
+
313
+ In **Settings → Pipeline Model**, you can select which Claude model runs pipeline tasks. Set to `default` to use the same model as regular tasks.
314
+
85
315
  ## Storage
86
316
 
87
317
  - Workflow YAML: `~/.forge/data/flows/`
88
318
  - Execution state: `~/.forge/data/pipelines/`
319
+ - Binding config & run history: SQLite database (`~/.forge/data/forge.db`)
320
+
321
+ ## Tips for Writing Workflows
322
+
323
+ 1. **Start with shell nodes** for setup (git checkout, environment checks)
324
+ 2. **Use `__SKIP__`** for optional steps with precondition checks
325
+ 3. **Extract outputs** to pass data between nodes
326
+ 4. **Use routes** for conditional logic (simple/complex paths, retry loops)
327
+ 5. **Keep prompts focused** — each node should do one thing well
328
+ 6. **Test manually first** before setting up schedules
329
+ 7. **Use `depends_on`** to control execution order; nodes without dependencies run in parallel
@@ -2,50 +2,50 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Automatically scan GitHub Issues, fix code, create PRs, and review — all hands-free.
5
+ Automatically scan GitHub Issues, fix code, create PRs — all hands-free. Uses the built-in `issue-auto-fix` pipeline workflow.
6
6
 
7
7
  ## Prerequisites
8
8
 
9
9
  - `gh` CLI installed and authenticated: `gh auth login`
10
10
  - Project has a GitHub remote
11
11
 
12
- ## Setup
12
+ ## Setup (via Project Pipeline Binding)
13
13
 
14
- 1. Go to **Projects → select project → Issues tab**
15
- 2. Enable **Issue Auto-fix**
16
- 3. Configure:
17
- - **Scan Interval**: minutes between scans (0 = manual only)
18
- - **Base Branch**: leave empty for auto-detect (main/master)
19
- - **Labels Filter**: comma-separated labels (empty = all issues)
20
- 4. Click **Scan Now** to test
14
+ 1. Go to **Projects → select project → Pipelines tab**
15
+ 2. Click **+ Add** and select `issue-auto-fix`
16
+ 3. Enable the binding
17
+ 4. Set a **Schedule** (e.g., Every 30 min) for automatic scanning, or leave as "Manual only"
18
+ 5. Click **Run** to manually trigger with an `issue_id`
21
19
 
22
20
  ## Flow
23
21
 
24
22
  ```
25
- Scan → Fetch Issue → Fix Code (new branch) → Push Create PR → Auto Review → Notify
23
+ Setup → Fetch Issue → Fix Code (new branch) → Push & Create PR → Notify
26
24
  ```
27
25
 
28
- 1. **Scan**: `gh issue list` finds open issues matching labels
29
- 2. **Fix**: Claude Code analyzes issue and fixes code on `fix/<id>-<description>` branch
30
- 3. **PR**: Pushes branch and creates Pull Request
31
- 4. **Review**: AI reviews the code changes in the same pipeline
32
- 5. **Notify**: Results sent via Telegram (if configured)
26
+ 1. **Setup**: Checks for clean working directory, detects repo and base branch
27
+ 2. **Fetch Issue**: `gh issue view` fetches issue data (skips if no issue_id)
28
+ 3. **Fix Code**: Claude analyzes issue and fixes code on `fix/<id>-<description>` branch
29
+ 4. **Push & PR**: Pushes branch and creates Pull Request via `gh pr create`
30
+ 5. **Notify**: Switches back to original branch, reports PR URL
33
31
 
34
- ## Manual Trigger
32
+ ## Input Fields
35
33
 
36
- Enter an issue number in "Manual Trigger" section and click "Fix Issue".
37
-
38
- ## Retry
39
-
40
- Failed fixes show a "Retry" button. Click to provide additional context (e.g. "rebase from main first") and re-run.
34
+ | Input | Description | Required |
35
+ |-------|-------------|----------|
36
+ | `issue_id` | GitHub issue number | Yes (skips if empty) |
37
+ | `project` | Project name | Yes |
38
+ | `base_branch` | Base branch for fix | No (auto-detect) |
39
+ | `extra_context` | Additional instructions | No |
41
40
 
42
41
  ## Safety
43
42
 
44
43
  - Checks for uncommitted changes before starting (aborts if dirty)
45
- - Always works on new branches (never modifies main)
44
+ - Always works on new branches (never modifies main/master)
45
+ - Cleans up old fix branches for the same issue
46
46
  - Switches back to original branch after completion
47
- - Existing PRs are updated, not duplicated
47
+ - Uses `--force-with-lease` for safe push
48
48
 
49
- ## Processed Issues
49
+ ## Legacy Issue Scanner
50
50
 
51
- History shows all processed issues with status (processing/done/failed), PR number, and pipeline ID. Click pipeline ID to view details.
51
+ The old issue scanner (`Projects Issues tab`) is still functional for existing configurations. It uses `issue_autofix_config` DB table for per-project scan settings. New projects should use the pipeline binding approach above.
@@ -0,0 +1,41 @@
1
+ You are a help assistant for **Forge** — a self-hosted Vibe Coding platform.
2
+
3
+ Your job is to answer user questions about Forge features, configuration, and troubleshooting.
4
+
5
+ ## How to answer
6
+
7
+ 1. Read the relevant documentation file(s) from this directory before answering
8
+ 2. Base your answers on the documentation content, not assumptions
9
+ 3. If the answer isn't in the docs, say so honestly
10
+ 4. Give concise, actionable answers with code examples when helpful
11
+ 5. When generating files (YAML workflows, configs, scripts, etc.), **always save the file directly** to the appropriate directory rather than printing it. For pipeline workflows, save to `~/.forge/data/flows/<name>.yaml`. Tell the user the file path so they can find it. The terminal does not support copy/paste.
12
+
13
+ ## Available documentation
14
+
15
+ | File | Topic |
16
+ |------|-------|
17
+ | `00-overview.md` | Installation, startup, data paths, architecture |
18
+ | `01-settings.md` | All settings fields and configuration |
19
+ | `02-telegram.md` | Telegram bot setup and commands |
20
+ | `03-tunnel.md` | Remote access via Cloudflare tunnel |
21
+ | `04-tasks.md` | Background task system |
22
+ | `05-pipelines.md` | Pipeline/workflow engine — YAML format, nodes, templates, routing, scheduling, project bindings |
23
+ | `06-skills.md` | Skills marketplace and installation |
24
+ | `07-projects.md` | Project management |
25
+ | `08-rules.md` | CLAUDE.md templates and rule injection |
26
+ | `09-issue-autofix.md` | GitHub issue auto-fix pipeline |
27
+ | `10-troubleshooting.md` | Common issues and solutions |
28
+
29
+ ## Matching questions to docs
30
+
31
+ - Pipeline/workflow/DAG/YAML → `05-pipelines.md`
32
+ - Issue/PR/auto-fix → `09-issue-autofix.md` + `05-pipelines.md`
33
+ - Telegram/notification → `02-telegram.md`
34
+ - Tunnel/remote/cloudflare → `03-tunnel.md`
35
+ - Task/background/queue → `04-tasks.md`
36
+ - Settings/config → `01-settings.md`
37
+ - Install/start/update → `00-overview.md`
38
+ - Error/bug/crash → `10-troubleshooting.md`
39
+ - Skill/marketplace → `06-skills.md`
40
+ - Project/favorite → `07-projects.md`
41
+ - Rules/CLAUDE.md/template → `08-rules.md`
package/next-env.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="next" />
2
2
  /// <reference types="next/image-types/global" />
3
- import "./.next/dev/types/routes.d.ts";
3
+ import "./.next/types/routes.d.ts";
4
4
 
5
5
  // NOTE: This file should not be edited
6
6
  // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aion0/forge",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Unified AI workflow platform — multi-model task orchestration, persistent sessions, web terminal, remote access",
5
5
  "type": "module",
6
6
  "scripts": {