@mestreyoda/fabrica 0.2.14 → 0.2.15
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/CHANGELOG.md +18 -6
- package/README.md +19 -3
- package/defaults/fabrica/prompts/architect.md +10 -0
- package/defaults/fabrica/prompts/developer.md +14 -3
- package/defaults/fabrica/prompts/reviewer.md +18 -0
- package/defaults/fabrica/prompts/tester.md +27 -9
- package/dist/index.js +2253 -1089
- package/genesis/scripts/scaffold-project.sh +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.2.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
- Added
|
|
7
|
-
-
|
|
8
|
-
-
|
|
3
|
+
## 0.2.15 - 2026-04-03
|
|
4
|
+
|
|
5
|
+
- Hardened Telegram DM intake around durable `pending_classify` / `classifying` recovery, newer-attempt ownership, and explicit late-classify reconciliation.
|
|
6
|
+
- Added runtime-aware DM claiming via `before_dispatch` plus short-lived message/conversation guards so Telegram prompts stay inside Fabrica instead of leaking to the generic OpenClaw agent.
|
|
7
|
+
- Fixed greenfield scaffold canonical repo path handling so `metadata.repo_path` / `scaffold_plan.repo_local` survive all the way into `scaffold-project.sh` and published genesis assets.
|
|
8
|
+
- Tightened bootstrap and register fail-closed behavior for unsupported stacks and missing materialized repositories, preventing half-registered validation projects.
|
|
9
|
+
- Reset and revalidated the temporary Telegram validation harness, including a reusable runner path and regression coverage for read/wait flows.
|
|
10
|
+
- Extended regression coverage for Telegram bootstrap recovery, scaffold path ownership, classify-step typing, and end-to-end hot-path stability.
|
|
11
|
+
|
|
12
|
+
## 0.2.14 - 2026-04-02
|
|
13
|
+
|
|
14
|
+
- Added a stack-aware environment gate so developer and tester pickup only start after project environments are provisioned and marked ready.
|
|
15
|
+
- Hardened Python stack bootstrap around durable environment state, retry scheduling, and stale provisioning recovery without `sudo`.
|
|
16
|
+
- Reworked worker recovery so observable activity without a canonical result enters bounded completion recovery instead of immediately corrupting dispatch health.
|
|
17
|
+
- Made heartbeat distinguish accepted-but-idle dispatches, inconclusive completion, terminal sessions, and true dead sessions with cycle-aware ownership checks.
|
|
18
|
+
- Added explicit timeline events for reviewer outcomes and worker recovery exhaustion, with cycle-aware dedupe and corrected destination-state messaging.
|
|
19
|
+
- Preserved reviewer notification routing through plugin notification config instead of bypassing runtime settings.
|
|
20
|
+
- Extended regression coverage for environment provisioning, gateway session transcript activity, heartbeat recovery, reviewer notifications, and end-to-end hot-path orchestration.
|
|
9
21
|
|
|
10
22
|
## 0.2.13 - 2026-03-31
|
|
11
23
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
> Autonomous software engineering pipeline for OpenClaw.
|
|
7
7
|
|
|
8
|
-
Fabrica turns a natural-language project description into a fully executed engineering workflow: intake, specification, issue decomposition, development, code review, testing, and merge
|
|
8
|
+
Fabrica turns a natural-language project description into a fully executed engineering workflow: intake, specification, issue decomposition, development, code review, testing, and merge. It orchestrates AI agents as specialized workers (developers, reviewers, testers) through a deterministic finite state machine, with repair-oriented recovery when runtime signals or stack environments are incomplete.
|
|
9
9
|
|
|
10
10
|
## How it works
|
|
11
11
|
|
|
@@ -34,7 +34,7 @@ Fabrica turns a natural-language project description into a fully executed engin
|
|
|
34
34
|
done
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The heartbeat ticks every 60 seconds. On each tick, Fabrica alternates between a **repair** pass (fixes stale states) and a **triage** pass (advances work that is ready to move). No human intervention is required after the initial project description.
|
|
37
|
+
The heartbeat ticks every 60 seconds. On each tick, Fabrica alternates between a **repair** pass (fixes stale states, retries incomplete completion signals, and reconciles broken runtime ownership) and a **triage** pass (advances work that is ready to move). No human intervention is required after the initial project description.
|
|
38
38
|
|
|
39
39
|
## Features
|
|
40
40
|
|
|
@@ -43,9 +43,12 @@ The heartbeat ticks every 60 seconds. On each tick, Fabrica alternates between a
|
|
|
43
43
|
- **Pluggable AI workers** — each role (developer, reviewer, tester, architect) maps to a configurable model and level
|
|
44
44
|
- **Polling-first GitHub integration** — uses `gh` CLI for all GitHub operations; no webhook infrastructure or GitHub App required
|
|
45
45
|
- **Telegram bootstrap** (optional) — describe a new project via DM; Fabrica asks clarifying questions and provisions the repo automatically
|
|
46
|
+
- **Stack-aware environment gate** — developer and tester dispatch only start after the project stack environment is provisioned and marked ready
|
|
47
|
+
- **Lifecycle-driven worker completion** — reviewer, developer, tester, and architect completion resolve from agent lifecycle plus canonical result lines, not from fragile tool availability assumptions
|
|
48
|
+
- **Detailed event timeline** — project topics receive explicit worker start, completion, review, rejection, and recovery events with cycle-aware dedupe
|
|
46
49
|
- **Programmatic genesis** — trigger the full pipeline from a CLI script without Telegram
|
|
47
50
|
- **Observability built-in** — audit log, metrics subcommand, heartbeat health checks, and OpenTelemetry tracing
|
|
48
|
-
- **Safe-by-default** — conflict detection, mutex-guarded heartbeat, session validation, and label integrity guards
|
|
51
|
+
- **Safe-by-default** — conflict detection, mutex-guarded heartbeat, stack bootstrap retries, session validation, completion recovery, and label integrity guards
|
|
49
52
|
|
|
50
53
|
## Requirements
|
|
51
54
|
|
|
@@ -54,6 +57,7 @@ The heartbeat ticks every 60 seconds. On each tick, Fabrica alternates between a
|
|
|
54
57
|
- Node.js 20+ (for local development or programmatic genesis)
|
|
55
58
|
- `gh` CLI authenticated to GitHub (required for issue and PR operations)
|
|
56
59
|
- A GitHub organization or personal account where repositories will be created
|
|
60
|
+
- For Python stacks, Fabrica provisions `uv` and project-local environments itself without `sudo`
|
|
57
61
|
- (Optional) Telegram bot token and group chat IDs for DM bootstrap and notifications
|
|
58
62
|
|
|
59
63
|
## Installation
|
|
@@ -117,6 +121,13 @@ Use `openclaw fabrica setup --agent <id>` if you already have an agent. GitHub,
|
|
|
117
121
|
Telegram, and webhook behavior are separate operational concerns, not
|
|
118
122
|
installation dependencies.
|
|
119
123
|
|
|
124
|
+
**Environment provisioning note**:
|
|
125
|
+
|
|
126
|
+
Developer and tester pickup now pass through a stack environment gate. For
|
|
127
|
+
supported stacks such as `python-cli`, Fabrica provisions the required toolchain
|
|
128
|
+
and project-local environment before dispatching workers, instead of discovering
|
|
129
|
+
missing dependencies inside a live worker run.
|
|
130
|
+
|
|
120
131
|
**4. Restart the gateway**:
|
|
121
132
|
|
|
122
133
|
```bash
|
|
@@ -244,6 +255,11 @@ Telegram enables DM-based project bootstrap, per-project forum topics, and a sep
|
|
|
244
255
|
|
|
245
256
|
With Telegram enabled, send a project idea to the bot in a DM. Fabrica will ask clarifying questions, provision the GitHub repo, create a dedicated forum topic for the project, and keep ops-only notifications on the separate `opsChatId` route.
|
|
246
257
|
|
|
258
|
+
Project topics are event-driven timelines. Fabrica emits explicit messages for
|
|
259
|
+
worker start, worker completion, review queueing, reviewer reject/approve, and
|
|
260
|
+
operational recovery events, with cycle-aware dedupe so late deliveries from an
|
|
261
|
+
older dispatch do not masquerade as current work.
|
|
262
|
+
|
|
247
263
|
## Programmatic genesis
|
|
248
264
|
|
|
249
265
|
In addition to Telegram DM bootstrap, the full pipeline can be triggered from a CLI script — no Telegram or running agent session required:
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Architect Worker Instructions
|
|
2
2
|
|
|
3
|
+
## Execution Contract
|
|
4
|
+
|
|
5
|
+
You must execute the task directly in the worktree assigned to this task.
|
|
6
|
+
Do not leave the assigned worktree execution path.
|
|
7
|
+
Do not delegate implementation, testing, review, or planning to another coding agent.
|
|
8
|
+
Do not use nested coding agents.
|
|
9
|
+
Do not use planning or meta-skills such as brainstorming, writing-plans, or coding-agent.
|
|
10
|
+
Do not spawn, supervise, or instruct another agent to do the work for you.
|
|
11
|
+
If you cannot proceed directly in the assigned worktree, end with your role's canonical blocked result line.
|
|
12
|
+
|
|
3
13
|
You research design/architecture questions and produce detailed, development-ready findings.
|
|
4
14
|
|
|
5
15
|
## Your Job
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# DEVELOPER Worker Instructions
|
|
2
2
|
|
|
3
|
+
## Execution Contract
|
|
4
|
+
|
|
5
|
+
You must execute the task directly in the worktree assigned to this task.
|
|
6
|
+
Do not leave the assigned worktree execution path.
|
|
7
|
+
Do not delegate implementation, testing, review, or planning to another coding agent.
|
|
8
|
+
Do not use nested coding agents.
|
|
9
|
+
Do not use planning or meta-skills such as brainstorming, writing-plans, or coding-agent.
|
|
10
|
+
Do not spawn, supervise, or instruct another agent to do the work for you.
|
|
11
|
+
If you cannot proceed directly in the assigned worktree, end with your role's canonical blocked result line.
|
|
12
|
+
|
|
3
13
|
## Context You Receive
|
|
4
14
|
|
|
5
15
|
When you start work, you're given:
|
|
@@ -12,9 +22,9 @@ Read the comments carefully — they often contain clarifications, decisions, or
|
|
|
12
22
|
|
|
13
23
|
## Workflow
|
|
14
24
|
|
|
15
|
-
### 1.
|
|
25
|
+
### 1. Use the assigned worktree
|
|
16
26
|
|
|
17
|
-
**NEVER work in the main checkout.**
|
|
27
|
+
**NEVER work in the main checkout.** Use the assigned git worktree for this task. If it does not already exist, create it as a sibling to the repo:
|
|
18
28
|
|
|
19
29
|
```bash
|
|
20
30
|
# Example: repo is at ~/git/myproject
|
|
@@ -26,7 +36,8 @@ git worktree add "$WORKTREE" -b "$BRANCH"
|
|
|
26
36
|
cd "$WORKTREE"
|
|
27
37
|
```
|
|
28
38
|
|
|
29
|
-
The `.worktrees/` directory sits NEXT TO the repo folder (not inside it). This keeps the main checkout clean for the orchestrator and other workers. If
|
|
39
|
+
The `.worktrees/` directory sits NEXT TO the repo folder (not inside it). This keeps the main checkout clean for the orchestrator and other workers. If the assigned worktree already exists from a previous task on the same branch, verify it's clean and reuse it.
|
|
40
|
+
Once you are in the assigned worktree, stay there for the rest of the task and do not switch back to the main checkout.
|
|
30
41
|
|
|
31
42
|
### 2. Implement the changes
|
|
32
43
|
|
|
@@ -32,6 +32,24 @@ Your review comment MUST include a checklist showing which items you verified an
|
|
|
32
32
|
|
|
33
33
|
# REVIEWER Worker Instructions
|
|
34
34
|
|
|
35
|
+
## Execution Contract
|
|
36
|
+
|
|
37
|
+
You must execute the review directly in the worktree assigned to this task.
|
|
38
|
+
Do not leave the assigned worktree execution path.
|
|
39
|
+
Do not delegate review work to another coding agent.
|
|
40
|
+
Do not use nested coding agents.
|
|
41
|
+
Do not use planning or meta-skills such as brainstorming, writing-plans, or coding-agent.
|
|
42
|
+
Do not spawn, supervise, or instruct another agent to do the work for you.
|
|
43
|
+
Keep review verdict semantics pure: emit `Review result: APPROVE` or `Review result: REJECT` only for a real review verdict.
|
|
44
|
+
|
|
45
|
+
## Task Completion
|
|
46
|
+
|
|
47
|
+
When you finish an actual review verdict, end your response with exactly one decision line in plain text:
|
|
48
|
+
- `Review result: APPROVE`
|
|
49
|
+
- `Review result: REJECT`
|
|
50
|
+
|
|
51
|
+
The orchestrator reads that line directly from your response and advances the review stage automatically.
|
|
52
|
+
|
|
35
53
|
You are a code reviewer. Your job is to review the PR diff for quality, correctness, security, and style.
|
|
36
54
|
|
|
37
55
|
## Context You Receive
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
You test the code changes for the issue by running QA on the correct branch.
|
|
4
4
|
|
|
5
|
+
## Execution Contract
|
|
6
|
+
|
|
7
|
+
You must execute the task directly in the worktree assigned to this task.
|
|
8
|
+
Do not leave the assigned worktree execution path.
|
|
9
|
+
Do not delegate implementation, testing, review, or planning to another coding agent.
|
|
10
|
+
Do not use nested coding agents.
|
|
11
|
+
Do not use planning or meta-skills such as brainstorming, writing-plans, or coding-agent.
|
|
12
|
+
Do not spawn, supervise, or instruct another agent to do the work for you.
|
|
13
|
+
If you cannot proceed directly in the assigned worktree, end with your role's canonical blocked result line.
|
|
14
|
+
|
|
5
15
|
## Context You Receive
|
|
6
16
|
|
|
7
17
|
- **Issue:** the original task description, acceptance criteria, and discussion
|
|
@@ -11,27 +21,35 @@ You test the code changes for the issue by running QA on the correct branch.
|
|
|
11
21
|
|
|
12
22
|
## Your Job
|
|
13
23
|
|
|
14
|
-
### 1.
|
|
24
|
+
### 1. Open the PR branch in its dedicated worktree
|
|
15
25
|
|
|
16
|
-
The PR may NOT be merged yet when you are dispatched. You MUST test the PR branch, not main.
|
|
26
|
+
The PR may NOT be merged yet when you are dispatched. You MUST test the PR branch in its dedicated worktree, not the main checkout.
|
|
27
|
+
Do not use the main checkout while an open PR branch exists.
|
|
17
28
|
|
|
18
29
|
```bash
|
|
19
30
|
REPO_ROOT="<repo path from task message>"
|
|
20
|
-
|
|
21
|
-
git fetch origin
|
|
31
|
+
git -C "$REPO_ROOT" fetch origin
|
|
22
32
|
|
|
23
33
|
# Find the PR for this issue by branch naming convention
|
|
24
34
|
ISSUE_NUM=<issue number from task message>
|
|
25
|
-
REMOTE_URL="$(git remote get-url origin)"
|
|
35
|
+
REMOTE_URL="$(git -C "$REPO_ROOT" remote get-url origin)"
|
|
26
36
|
PR_BRANCH=$(gh pr list --repo "$REMOTE_URL" --state open --json headRefName --jq "[.[] | select(.headRefName | test(\"/(${ISSUE_NUM})-\"))][0].headRefName" 2>/dev/null)
|
|
27
37
|
|
|
28
38
|
if [[ -n "$PR_BRANCH" && "$PR_BRANCH" != "null" ]]; then
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
WORKTREE="${REPO_ROOT}.worktrees/${PR_BRANCH}"
|
|
40
|
+
if [[ -d "$WORKTREE" ]]; then
|
|
41
|
+
# Open PR exists with matching branch — reuse the dedicated worktree
|
|
42
|
+
cd "$WORKTREE"
|
|
43
|
+
else
|
|
44
|
+
# Open PR exists with matching branch — create the dedicated worktree
|
|
45
|
+
git -C "$REPO_ROOT" worktree add "$WORKTREE" "origin/$PR_BRANCH"
|
|
46
|
+
cd "$WORKTREE"
|
|
47
|
+
fi
|
|
48
|
+
echo "Testing PR branch in dedicated worktree: $WORKTREE"
|
|
32
49
|
else
|
|
33
50
|
# No open PR for this issue — test on main (post-merge scenario)
|
|
34
|
-
|
|
51
|
+
cd "$REPO_ROOT"
|
|
52
|
+
git -C "$REPO_ROOT" checkout main && git -C "$REPO_ROOT" pull origin main
|
|
35
53
|
echo "Testing main branch (PR already merged)"
|
|
36
54
|
fi
|
|
37
55
|
```
|