@worca/app 0.1.0 → 1.0.0-rc.1
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/LICENSE +21 -0
- package/README.md +186 -364
- package/package.json +1 -2
- package/ui/public/app.js +4159 -964
- package/ui/public/diff-view.mjs +151 -0
- package/ui/public/index.html +366 -136
- package/ui/public/style.css +1114 -143
- package/ui/server.mjs +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sinisha Djukic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,140 +1,202 @@
|
|
|
1
|
-
# Worca
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
# Worca
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@worca/app)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](.nvmrc)
|
|
6
|
+
|
|
7
|
+
Worca is a **deterministic multi-agent pipeline** that drives Claude Code
|
|
8
|
+
(headless) through **Plan → Refine → Implement → Review** for a software task.
|
|
9
|
+
You point it at a project, describe the work, and a state machine runs the
|
|
10
|
+
agents of your chosen workflow in sequence — looping until the work clears
|
|
11
|
+
quality gates, pausing to ask *you* the questions that matter, and keeping
|
|
12
|
+
every run isolated in its own git worktree and branch.
|
|
13
|
+
|
|
14
|
+
It ships as a **web UI**, a **CLI**, and an installable **`/worca` skill** for
|
|
15
|
+
Claude Code — all running the same engine.
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
## How a run works
|
|
20
|
+
|
|
21
|
+
1. **Clarify** — instead of assuming, the planner turns hidden decisions into
|
|
22
|
+
multiple-choice questions (2–4 options plus free text). Your answers are
|
|
23
|
+
appended to the plan so reviewers see them.
|
|
24
|
+
2. **Plan** — the planner explores the codebase and writes an implementation
|
|
25
|
+
plan with concrete code snippets.
|
|
26
|
+
3. **Refine** — the refiner reviews and rewrites the plan (`-v2`, `-v3`, …)
|
|
27
|
+
until no critical/major issues remain.
|
|
28
|
+
4. **Implement** — the implementer follows the approved plan with no
|
|
29
|
+
deviation, using TDD (red-green-refactor).
|
|
30
|
+
5. **Review** — the code reviewer reviews the git diff and hands blocking
|
|
31
|
+
findings back to the implementer, looping Implement → Review until clean.
|
|
32
|
+
|
|
33
|
+
Loops gate to you past their cycle cap (default 3): approve another cycle or
|
|
34
|
+
continue with the open issues shown. Only `critical`/`major` findings block; a
|
|
35
|
+
finished run ends on its own branch, one click away from a PR.
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
Every finished run keeps its full record — the diff per file, per-step costs
|
|
40
|
+
and durations, the clarify Q&A, agent transcripts, and logs:
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
### Pipeline
|
|
47
|
+
|
|
48
|
+
- **Deterministic engine** — a state machine sequences the agents; agents do
|
|
49
|
+
the creative work, the engine does the control flow. Every step, verdict,
|
|
50
|
+
and artifact is recorded.
|
|
51
|
+
- **Pause & resume, even across restarts** — pause mid-run (or hit a cost
|
|
52
|
+
cap); resume later re-attaches the interrupted Claude sessions
|
|
53
|
+
(`claude --resume`), surviving server restarts. Worktrees and uncommitted
|
|
54
|
+
agent work are kept.
|
|
55
|
+
- **Isolated worktrees** — each run works on its own git worktree and feature
|
|
56
|
+
branch; your checkout is never touched, and parallel runs don't collide.
|
|
57
|
+
- **Live cockpit** — flow graph per run, streaming log with source/level/
|
|
58
|
+
step/cycle filters and search, per-run cost and elapsed time, compact and
|
|
59
|
+
detailed densities.
|
|
60
|
+
- **One-click PRs** — a finished run shows its diff (files, +/−) and opens a
|
|
61
|
+
pull request via `gh` from the History view.
|
|
62
|
+
- **Mock mode** — the entire pipeline runs offline with a deterministic mock
|
|
63
|
+
(no `claude`, no tokens) for demos, development, and CI.
|
|
64
|
+
|
|
65
|
+
### Agents
|
|
66
|
+
|
|
67
|
+
- **11 data-driven agents** — planner, plan refiner, plan reviewer,
|
|
68
|
+
implementer, code reviewer, clarify, decomposer (splits a plan into
|
|
69
|
+
vertical-slice tasks, one implementer each), manual-tests checklist, manual
|
|
70
|
+
web-UI testing (drives a browser via Playwright), workspace scanner, and
|
|
71
|
+
workspace reviewer. Each agent is a markdown prompt plus a metadata sidecar
|
|
72
|
+
— new agents drop in without engine changes.
|
|
73
|
+
- **AI-assisted agent creation** — describe a new agent in the UI and Worca
|
|
74
|
+
generates both its system prompt and metadata (or paste your own prompt and
|
|
75
|
+
let it infer just the wiring); edit, regenerate, and save.
|
|
76
|
+
- **Per-agent model & effort** — pick model and reasoning effort per agent,
|
|
77
|
+
per workflow, or per run, with a clear resolution order and "save as
|
|
78
|
+
workflow defaults".
|
|
79
|
+
|
|
80
|
+
### Workflow Composer
|
|
81
|
+
|
|
82
|
+
- **Compose your own pipeline** — drag agents onto a canvas to build
|
|
83
|
+
sequential steps, parallel groups, and feedback loops (an agent that emits
|
|
84
|
+
a verdict can loop back to an earlier step until it passes or hits its
|
|
85
|
+
cycle cap). Saved workflows appear in the New Pipeline picker; **Reset to
|
|
86
|
+
default** redraws the standard Plan → Refine → Implement → Review.
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
### Guardrails
|
|
91
|
+
|
|
92
|
+
- **Named policy sets, selected per run** — built-in **Permissive / Normal /
|
|
93
|
+
Strict** tiers plus your own sets. Normal protects credential files and
|
|
94
|
+
blocks publication commands; Strict adds environment scrub on agent spawn,
|
|
95
|
+
network-egress and cloud-CLI denies, and home-dir credential protection.
|
|
96
|
+
- **Enforced via Claude Code permissions** — policies compile to
|
|
97
|
+
`permissions.deny` rules on every agent spawn; repo settings can't undo
|
|
98
|
+
them. See [`docs/guardrails.md`](docs/guardrails.md) for the full model and
|
|
99
|
+
its honest limitations.
|
|
100
|
+
|
|
101
|
+
### Workspaces
|
|
102
|
+
|
|
103
|
+
- **Multi-project runs** — group related repos into a workspace; a scanner
|
|
104
|
+
maps how they interconnect (shared APIs, schemas, build deps) into an
|
|
105
|
+
editable description, and a workspace run fans the pipeline out across all
|
|
106
|
+
members — one branch and worktree per member, one cross-project review
|
|
107
|
+
verdict at the end.
|
|
108
|
+
|
|
109
|
+
### Plugins & chat
|
|
110
|
+
|
|
111
|
+
- **Plugin system with marketplaces** — plugins contribute task sources
|
|
112
|
+
(e.g. GitHub Issues), agents, skills, workflow templates, models, and chat
|
|
113
|
+
channels. Install from a marketplace with an explicit consent ceremony
|
|
114
|
+
(what's installed, which secrets are required, which setup commands run);
|
|
115
|
+
updates show a commit-level preview before you accept.
|
|
116
|
+
- **Drive runs from chat** — bundled two-way **Telegram**, **Slack**,
|
|
117
|
+
**Discord**, and **Microsoft Teams** channels: get notified on questions,
|
|
118
|
+
finishes, failures, and cost pauses, and answer back with commands —
|
|
119
|
+
`/status`, `/cost`, `/answer`, `/approve`, `/pause`, `/resume`, `/stop`,
|
|
120
|
+
and more — with allowlist-based authorization.
|
|
121
|
+
|
|
122
|
+
### Costs & budgets
|
|
123
|
+
|
|
124
|
+
- **Cost tracking everywhere** — per-run and per-step cost estimates, a
|
|
125
|
+
Statistics view with spend/time/outcome charts per day, week, or month, and
|
|
126
|
+
a spend indicator in the sidebar.
|
|
127
|
+
- **Hard limits** — a per-pipeline cost cap pauses a runaway run (resumable
|
|
128
|
+
with an explicit override); a total budget pauses everything and blocks new
|
|
129
|
+
runs until the weekly or monthly window resets.
|
|
130
|
+
|
|
131
|
+

|
|
132
|
+
|
|
133
|
+
### Models
|
|
134
|
+
|
|
135
|
+
- **Bring your own models** — register any model id (a proxy, a fine-tune, an
|
|
136
|
+
alternative provider), declare which effort levels it supports, and attach
|
|
137
|
+
per-model routing environment (e.g. `ANTHROPIC_BASE_URL`) that is merged
|
|
138
|
+
into that model's agent spawns. Share a model catalog as a plugin, with
|
|
139
|
+
secrets required at install time.
|
|
140
|
+
|
|
141
|
+
### Storage
|
|
142
|
+
|
|
143
|
+
- **Nothing in your repo** — run state lives in one SQLite database
|
|
144
|
+
(`~/.worca-cc/worca-cc.db`), plan/review markdown in a machine-wide store
|
|
145
|
+
keyed by repo identity (stable across worktrees). The **History** view
|
|
146
|
+
spans every project on the machine. See
|
|
147
|
+
[`docs/storage.md`](docs/storage.md).
|
|
148
|
+
|
|
149
|
+

|
|
54
150
|
|
|
55
151
|
## Install
|
|
56
152
|
|
|
57
153
|
```bash
|
|
58
|
-
npm install
|
|
154
|
+
npm install -g @worca/app
|
|
59
155
|
```
|
|
60
156
|
|
|
61
|
-
|
|
62
|
-
pick up the bundled `.nvmrc`) and the `claude` CLI on your `PATH` for real (non-mock) runs.
|
|
157
|
+
Requirements:
|
|
63
158
|
|
|
64
|
-
|
|
159
|
+
- **Node.js >= 22.13.0** (the built-in `node:sqlite` store)
|
|
160
|
+
- The **[Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI**
|
|
161
|
+
(`claude`) on your `PATH` — for real runs; mock mode needs nothing
|
|
65
162
|
|
|
66
163
|
## Quick start
|
|
67
164
|
|
|
68
|
-
### CLI
|
|
69
|
-
|
|
70
|
-
Run a pipeline against a project folder:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm run cli -- --project /path/to/your/project --prompt "Add a /search endpoint"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Or use a markdown brief as the prompt:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
npm run cli -- --project /path/to/your/project --file ./brief.md --title "Search feature"
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Useful flags: `--model <m>`,
|
|
83
|
-
`--permission-mode <m>`, `--yes`/`--non-interactive` (auto-answer clarify with the
|
|
84
|
-
first option and gates with "continue"). See `docs/ARCHITECTURE.md` §4.1 for the full
|
|
85
|
-
list.
|
|
86
|
-
|
|
87
165
|
### Web UI
|
|
88
166
|
|
|
89
167
|
```bash
|
|
90
|
-
|
|
168
|
+
worca --ui
|
|
91
169
|
```
|
|
92
170
|
|
|
93
|
-
|
|
171
|
+
Open the printed URL (default `http://localhost:4317`), add a project, and
|
|
172
|
+
click **New pipeline**: describe the task (or paste a markdown brief, or pull
|
|
173
|
+
a task from a plugin source like GitHub Issues), pick a workflow and
|
|
174
|
+
guardrails, and run. Answer clarify questions and loop gates as they come —
|
|
175
|
+
in the browser or from chat.
|
|
94
176
|
|
|
95
|
-
|
|
96
|
-
with optional extra files;
|
|
97
|
-
- watch a **steps tracker** (preflight / plan / refine #N / implement / review #N /
|
|
98
|
-
done);
|
|
99
|
-
- answer **clarify questions** (2–4 options + free text) and **loop gates** ("Don't have
|
|
100
|
-
another cycle and continue" / "I approve another cycle", with the open critical/major
|
|
101
|
-
issues shown);
|
|
102
|
-
- follow a **live streaming log**;
|
|
103
|
-
- **Pause** or **Stop** a run;
|
|
104
|
-
- browse **history** of past pipelines and read their saved markdown.
|
|
105
|
-
|
|
106
|
-
There's also an **"Install agents into this folder"** button that copies the agents +
|
|
107
|
-
skill into a target project so you can use `/worca` there.
|
|
177
|
+
### CLI
|
|
108
178
|
|
|
109
|
-
|
|
179
|
+
```bash
|
|
180
|
+
# run a pipeline against a project
|
|
181
|
+
worca --project /path/to/your/project --prompt "Add a /search endpoint"
|
|
110
182
|
|
|
111
|
-
|
|
183
|
+
# use a markdown brief as the prompt
|
|
184
|
+
worca --project /path/to/your/project --file ./brief.md --title "Search feature"
|
|
112
185
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
button.
|
|
116
|
-
- **CLI** — the first `Ctrl+C` pauses gracefully (a second stops, a third hard-exits).
|
|
117
|
-
Continue later with:
|
|
186
|
+
# pause with Ctrl+C, continue later (survives restarts)
|
|
187
|
+
worca resume <pipelineId>
|
|
118
188
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# or, with the bin on your PATH: worca resume <pipelineId>
|
|
189
|
+
# offline demo — full pipeline, no tokens
|
|
190
|
+
worca --project /path/to/your/project --prompt "demo task" --mock --yes
|
|
122
191
|
```
|
|
123
192
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
database — so resume **survives server restarts** (it rehydrates entirely from the DB).
|
|
127
|
-
On resume, interrupted steps **re-attach their Claude session** via
|
|
128
|
-
`claude --resume <session_id>`; if the session is gone, the step re-runs fresh and the
|
|
129
|
-
fallback is noted in the run's audit log.
|
|
130
|
-
|
|
131
|
-
### `/worca` skill (inside your own project)
|
|
193
|
+
Run `worca --help` for all subcommands (projects, plugins, marketplaces,
|
|
194
|
+
config, doctor) and flags.
|
|
132
195
|
|
|
133
|
-
|
|
196
|
+
### `/worca` skill (inside Claude Code)
|
|
134
197
|
|
|
135
198
|
```bash
|
|
136
|
-
|
|
137
|
-
# or: node scripts/install.mjs /path/to/your/project [--force]
|
|
199
|
+
worca --install /path/to/your/project
|
|
138
200
|
```
|
|
139
201
|
|
|
140
202
|
Then open Claude Code in that project and run:
|
|
@@ -143,261 +205,21 @@ Then open Claude Code in that project and run:
|
|
|
143
205
|
/worca Add a /search endpoint with pagination
|
|
144
206
|
```
|
|
145
207
|
|
|
146
|
-
The skill starts the same deterministic orchestrator
|
|
147
|
-
|
|
148
|
-
### Mock demo (offline, no tokens)
|
|
149
|
-
|
|
150
|
-
The whole pipeline can run **fully offline** without spawning `claude` — it produces
|
|
151
|
-
real artifact files using a deterministic mock:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
npm run smoke
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
This is equivalent to:
|
|
208
|
+
The skill starts the same deterministic orchestrator.
|
|
158
209
|
|
|
159
|
-
|
|
160
|
-
WORCA_MOCK=1 node src/cli/worca-cc.mjs --project sandbox --prompt "demo task" --mock --yes
|
|
161
|
-
```
|
|
210
|
+
## Documentation
|
|
162
211
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
## The agents
|
|
168
|
-
|
|
169
|
-
| Agent | File | Role |
|
|
170
|
-
| --- | --- | --- |
|
|
171
|
-
| Planner | `agents/worca-cc-planner.md` | Initial plan with code snippets; asks conceptual questions (2–4 options + free text) instead of assuming; appends Q&A to the plan. |
|
|
172
|
-
| Plan Refiner | `agents/worca-cc-plan-refiner.md` | Reviews + refines the plan (and its code snippets); writes `-vN`; emits a severity-tagged review per cycle. |
|
|
173
|
-
| Plan Review | `agents/worca-cc-plan-reviewer.md` | Reviews the plan (without rewriting it); writes review markdown + JSON; on blocking issues bounces back to the planner for a cold re-plan. |
|
|
174
|
-
| Implementer | `agents/worca-cc-implementer.md` | Follows the latest plan with no deviation; TDD red-green-refactor; also runs in "fix" mode against a review. |
|
|
175
|
-
| Code Reviewer | `agents/worca-cc-code-reviewer.md` | Reviews the git diff; writes review markdown + JSON; hands back to the implementer to fix. |
|
|
176
|
-
|
|
177
|
-
Worca CC now ships **7 runnable agents** and the agent system is **data-driven**:
|
|
178
|
-
each agent is a prompt (`agents/worca-cc-<role>.md`) plus a metadata sidecar
|
|
179
|
-
(`agents/<key>.meta.json`), so new agents drop in without engine edits. Beyond
|
|
180
|
-
the five above, it adds **Manual Tests Checklist** (drafts manual test cases) and
|
|
181
|
-
**Manual web UI testing** (runs them against the live web UI via Playwright and
|
|
182
|
-
emits a pass/fail verdict). To add your own, see
|
|
183
|
-
[`docs/ADDING-AGENTS.md`](docs/ADDING-AGENTS.md).
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## The phases and loops
|
|
188
|
-
|
|
189
|
-
- **Clarify** — planner asks one round of conceptual questions (up to four) before
|
|
190
|
-
planning; answers are persisted and appended to the plan.
|
|
191
|
-
- **Refine loop** — Refiner runs repeatedly. It stops when no `critical`/`major` issues
|
|
192
|
-
remain. Past the loop's **max cycles** (default 3) it asks you to **continue** or approve
|
|
193
|
-
**another** cycle, escalating indefinitely.
|
|
194
|
-
- **Review loop** — Reviewer -> Implementer(fix) -> Reviewer ... stops when no
|
|
195
|
-
`critical`/`major` issues remain. Past the loop's **max cycles** (default 3) it asks the
|
|
196
|
-
same continue/another gate.
|
|
197
|
-
|
|
198
|
-
Each feedback loop's max-cycle count is set per loop in the New Pipeline window's
|
|
199
|
-
**Pipeline configuration** (default 3), not via a CLI flag.
|
|
200
|
-
|
|
201
|
-
A run is "blocked" only by `critical` or `major` issues; `minor`/`suggestion` issues do
|
|
202
|
-
not hold up the loop.
|
|
203
|
-
|
|
204
|
-
## Pipeline Composer
|
|
205
|
-
|
|
206
|
-
The phases above are the **default** pipeline. The **Pipeline Composer** (a view
|
|
207
|
-
in the web UI) lets you compose your own: drag agents onto a canvas to build
|
|
208
|
-
**sequential steps**, **parallel groups** (a step with more than one agent runs
|
|
209
|
-
concurrently), and **feedback loops** (an agent that emits a verdict can loop
|
|
210
|
-
back to an earlier step until it passes or hits a cycle cap). Save a layout by
|
|
211
|
-
name and it becomes selectable from **New Pipeline**, where you also pick each
|
|
212
|
-
agent's model/effort and each loop's cycle count.
|
|
213
|
-
|
|
214
|
-
The engine is data-driven: it executes whatever workflow you select. The default
|
|
215
|
-
workflow reproduces exactly the `Plan → Refine → Implement → Review` behavior
|
|
216
|
-
described above, and **Reset to default** on the canvas redraws it. Workflow topology and
|
|
217
|
-
per-project model/effort/cycle choices are stored in the central SQLite database
|
|
218
|
-
(`~/.worca-cc/worca-cc.db`) — no longer in `~/.worca-cc/workflows/` or
|
|
219
|
-
`<projectDir>/.worca-cc/config.json`.
|
|
220
|
-
|
|
221
|
-
To add a new agent to the palette, see [`docs/ADDING-AGENTS.md`](docs/ADDING-AGENTS.md).
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Guardrails (per run)
|
|
226
|
-
|
|
227
|
-
Guardrails are **named sets**, selected **per pipeline run**. The **Guardrails**
|
|
228
|
-
view lists the built-ins — **Permissive**, **Normal**, **Strict** — alongside
|
|
229
|
-
your own sets ("Create guardrails" starts from any of them, or blank), with an
|
|
230
|
-
editor for the five policy fields (honor project settings, env scrub, env
|
|
231
|
-
allowlist, protected paths, deny rules). The New Pipeline form has a
|
|
232
|
-
**Guardrails** picker next to the workflow picker: the selected set is the
|
|
233
|
-
run's entire policy, applied uniformly to every agent the run spawns — and,
|
|
234
|
-
for a workspace run, uniformly to every member project.
|
|
235
|
-
|
|
236
|
-
**Guardrails apply per run; runs without a selection run unguarded
|
|
237
|
-
(Permissive).** The picker defaults to Permissive — no restrictions,
|
|
238
|
-
byte-identical to runs before guardrails existed — so protection is an
|
|
239
|
-
explicit per-run choice, not a persistent project property. (This is a
|
|
240
|
-
deliberate tradeoff of the per-run model: there is no per-project default to
|
|
241
|
-
fall back on, and one set applies to all workspace members. If you want a
|
|
242
|
-
stricter habitual posture, pick Normal/Strict — or your org set — when you
|
|
243
|
-
start the run.)
|
|
244
|
-
|
|
245
|
-
The built-in tiers:
|
|
246
|
-
|
|
247
|
-
- **Permissive** (default) — no restrictions; byte-identical behavior to a
|
|
248
|
-
run with no selection.
|
|
249
|
-
- **Normal** — protects credential files (`.env*`, `*.pem`, `*.key`, SSH keys,
|
|
250
|
-
cert stores) from agent Read/Edit and blocks publication commands
|
|
251
|
-
(`git push`, `npm/yarn/pnpm publish`). Never breaks a pipeline: commits,
|
|
252
|
-
installs, tests, and `curl localhost` all still work.
|
|
253
|
-
- **Strict** (wire id `secure`) — Normal plus: environment scrub on agent
|
|
254
|
-
spawn (the spawned `claude` gets a minimal env: base vars, the proxy/CA
|
|
255
|
-
connectivity vars, every `ANTHROPIC_*`/`CLAUDE_*` var, and the set's
|
|
256
|
-
allowlist — nothing else), network egress binaries denied (`curl`, `wget`,
|
|
257
|
-
`nc`, `ssh`, `scp`, `rsync`, ...), `gh`/`docker push` and cloud CLIs
|
|
258
|
-
(`aws`, `gcloud`, `az`) denied, `WebFetch`/`WebSearch` denied, and home-dir
|
|
259
|
-
credential stores (`~/.ssh`, `~/.aws`, `~/.config/gh`,
|
|
260
|
-
`~/.git-credentials`, ...) protected from the Read/Edit tools.
|
|
261
|
-
|
|
262
|
-
Built-ins resolve from worca's code at read time (never snapshotted), so
|
|
263
|
-
preset improvements ship with upgrades; your named sets resolve by reference
|
|
264
|
-
at read time too — editing a set applies to every future run that picks it,
|
|
265
|
-
and to paused runs on resume. Built-ins are undeletable; editing one offers
|
|
266
|
-
"Save as new set". A set pinned by a paused run cannot be deleted (the API
|
|
267
|
-
answers 409 with the pinning runs); finished runs record the set id in
|
|
268
|
-
History and `run.json` (`guardrails.guardrailsId` beside the compact
|
|
269
|
-
envScrub/deny/protected counts — an id, not a content snapshot, since sets
|
|
270
|
-
stay editable). Resume re-reads the set by id and enforces its latest
|
|
271
|
-
definition; a set missing at resume is a LOUD warn in the run log and the
|
|
272
|
-
run proceeds Permissive (fail-open).
|
|
273
|
-
|
|
274
|
-
How it's enforced: protected paths and deny rules become Claude Code
|
|
275
|
-
`permissions.deny` rules in a single `--settings` payload on every pipeline
|
|
276
|
-
spawn (deny rules merge across scopes and cannot be removed by lower scopes —
|
|
277
|
-
repo settings can't undo worca policy, plugin-granted tools remain subject to
|
|
278
|
-
it). Protected paths expand to `Read(p)` + `Edit(p)` denies (Edit covers
|
|
279
|
-
Write/NotebookEdit; a `Write(p)` rule is never consulted and only produces
|
|
280
|
-
CLI warnings, so it is not emitted). A workspace run enforces the run's ONE
|
|
281
|
-
selected set uniformly on every member — nothing is unioned across member
|
|
282
|
-
projects anymore — and the workspace scanner is not subject to guardrails at
|
|
283
|
-
all (a scan takes no guardrails selection and spawns permissive). Repo
|
|
284
|
-
`.claude/settings.json` `permissions` are honored: natively on
|
|
285
|
-
single-project runs (cwd is the project worktree — the toggle can only decide
|
|
286
|
-
whether they're *lifted*, it cannot un-load what the worktree loads itself);
|
|
287
|
-
on **detached workspace runs (the default)** each member's own `deny` rules
|
|
288
|
-
are lifted per-member into the merged `--settings` when the run's set honors
|
|
289
|
-
project settings (that honor flag is uniform across members now — it comes
|
|
290
|
-
from the selected set, not from each project; `allow`/`ask` rules are never
|
|
291
|
-
lifted — that would widen capability and bypass Claude Code's workspace-trust
|
|
292
|
-
gate; hooks and statusline still don't apply off-worktree and stay warned). A
|
|
293
|
-
paused run re-reads its selected set by id on resume, so it enforces the set's
|
|
294
|
-
latest definition.
|
|
295
|
-
|
|
296
|
-
Honest limitations:
|
|
297
|
-
- `Read` denial is the load-bearing secret guard; Claude Code does not consult
|
|
298
|
-
`Write(path)` rules (so worca emits `Read`+`Edit` only), and Bash denies are
|
|
299
|
-
prefix matches — `sh -c "curl …"`, `/usr/bin/curl`, and `git -c k=v push`
|
|
300
|
-
evade them (a leading `VAR=val` or a `timeout`/`nice` wrapper does *not*).
|
|
301
|
-
Env scrub is the real exfil control, but it is **not containment**: with
|
|
302
|
-
`HOME` retained, credential *files* stay readable to any subprocess an agent
|
|
303
|
-
spawns (`node -e` + `fetch`), so deny rules alone don't stop indirect reads —
|
|
304
|
-
for OS-level enforcement use Claude Code's sandbox (out of scope here).
|
|
305
|
-
- Env scrub failing a pipeline that needed an unlisted var fails visibly
|
|
306
|
-
(tool errors in the transcript) — add the var to the allowlist; there is no
|
|
307
|
-
silent fallback. Common cases: a corporate TLS-intercepting proxy already
|
|
308
|
-
survives (proxy/CA vars are kept), but **Bedrock/Vertex/Foundry auth needs
|
|
309
|
-
you to allowlist the cloud credential vars** (`AWS_*`,
|
|
310
|
-
`GOOGLE_APPLICATION_CREDENTIALS`, `AZURE_*`), and a run that needs
|
|
311
|
-
git-over-SSH or takes its git identity from the environment must allowlist
|
|
312
|
-
`SSH_AUTH_SOCK` / the relevant `GIT_*` names — neither is in the base
|
|
313
|
-
keep-list. Worca deliberately does **not** set the CLI's own
|
|
314
|
-
`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` marker: on current CLIs setting it forces
|
|
315
|
-
the child's permission mode back to `default`, overriding worca's
|
|
316
|
-
`--permission-mode acceptEdits` and breaking scrubbed pipeline runs.
|
|
317
|
-
- Not setting that marker is not the same as blocking it: if **your own shell**
|
|
318
|
-
exports `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`, it survives the scrub (the
|
|
319
|
-
`CLAUDE_*` keep-rule passes it through) and inflicts exactly the breakage
|
|
320
|
-
above on every spawned `claude` — unset it before launching worca, or expect
|
|
321
|
-
degraded runs.
|
|
322
|
-
- Strict denies `curl`, which the manual web-UI-testing agent uses to poll a
|
|
323
|
-
dev server — it falls back to the `browser_*` MCP tools (not denied), so that
|
|
324
|
-
flow degrades rather than breaks. `.env*` also matches `.env.example` /
|
|
325
|
-
`.env.sample`, which agents may legitimately edit; a deny list can't carve
|
|
326
|
-
per-file exceptions, so those become read-only under Normal/Strict too.
|
|
327
|
-
- Exempt from scrub/deny: UI-triggered utility agents outside pipeline runs
|
|
328
|
-
(overview generation, agent generation), the `graphify` graph-build
|
|
329
|
-
subprocess, **workspace scans**, and the `claude --help`/`--version`
|
|
330
|
-
capability probe. In-run title generation IS scrubbed.
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
## Artifact layout
|
|
335
|
-
|
|
336
|
-
Worca CC keeps **structured state** (projects, workspaces, workflows, per-project config,
|
|
337
|
-
run state + steps + audit events, clarify Q&A, review verdicts) in a single **SQLite
|
|
338
|
-
database**, and the agents' **markdown** outputs (+ any attachments) in a machine-wide
|
|
339
|
-
**external store**. Neither lives in your project's working tree, so nothing is ever
|
|
340
|
-
committed to your repo:
|
|
212
|
+
- [Guardrails](docs/guardrails.md) — policy model, enforcement, limitations
|
|
213
|
+
- [Storage](docs/storage.md) — where state lives, project keys, migration
|
|
214
|
+
- [Releasing](docs/RELEASING.md) — how `@worca/app` versions are published
|
|
215
|
+
- [Contributing](CONTRIBUTING.md) — developing Worca from source
|
|
341
216
|
|
|
342
|
-
|
|
343
|
-
<worcaHome>/ default ~/.worca-cc
|
|
344
|
-
settings.json { root } only — the bootstrap that locates the DB
|
|
345
|
-
worca-cc.db (+ -wal, -shm) ALL structured state (SQLite, WAL mode)
|
|
346
|
-
backup-<ts>/ legacy JSON archived on first upgrade (see below)
|
|
347
|
-
store/<projectKey>/
|
|
348
|
-
plans/ <DD-MM-YY>-<name>.md, -v2.md, ... (plan markdown + refinements)
|
|
349
|
-
reviews/ <DD-MM-YY>-<name>-impl-review.md (review markdown)
|
|
350
|
-
pipelines/ <DD-MM-YY>-<slug>-<id>/ (one folder per run)
|
|
351
|
-
prompt.md the prompt text (or copied markdown brief)
|
|
352
|
-
extras/ any optional extra files you attached
|
|
353
|
-
```
|
|
217
|
+
## Contributing
|
|
354
218
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
`workflows/*.json` — is now a **row in `worca-cc.db`** instead. Only the plan/review
|
|
359
|
-
**markdown**, `prompt.md`, and `extras/` remain on disk (their existence is indexed in the
|
|
360
|
-
database).
|
|
361
|
-
|
|
362
|
-
- **`<worcaHome>`** = `<base>/.worca-cc`, where `<base>` is `WORCA_HOME` if set, else
|
|
363
|
-
the persisted "Worca CC root folder" from Settings, else your OS home. By default this is
|
|
364
|
-
`~/.worca-cc`, so the DB is `~/.worca-cc/worca-cc.db` and the store is `~/.worca-cc/store/`.
|
|
365
|
-
- **`<projectKey>`** = `<repo-basename-slug>-<sha1(canonicalRoot)[:8]>`, derived from the
|
|
366
|
-
repository's identity (the parent of its shared `.git`). It is **stable across all git
|
|
367
|
-
worktrees of the same repo**, so every worktree shares one history.
|
|
368
|
-
|
|
369
|
-
**First-launch migration.** The first time you run this version, Worca CC imports any
|
|
370
|
-
pre-existing JSON state **found under `~/.worca-cc`** into `worca-cc.db` (in a single
|
|
371
|
-
transaction) and moves the consumed files into a timestamped `~/.worca-cc/backup-<ts>/`
|
|
372
|
-
directory (mirroring the old layout); this is one-way — the new version reads only the
|
|
373
|
-
database, so to roll back you stop Worca CC, restore the files from `backup-<ts>/`, and
|
|
374
|
-
downgrade. There is **no** migration from the pre-rebrand home directory that older,
|
|
375
|
-
differently-named releases used: this version only ever looks at `~/.worca-cc`, so if you
|
|
376
|
-
are upgrading you must move your old state there **by hand before the first launch** —
|
|
377
|
-
otherwise Worca CC simply starts up empty, with no warning. (Separately, any very old
|
|
378
|
-
`<projectDir>/ai-artifacts/` directories from before the external-store change are still
|
|
379
|
-
just left in place and ignored.)
|
|
380
|
-
|
|
381
|
-
Because state is machine-wide and keyed by repo identity, the web UI has an **"All
|
|
382
|
-
projects"** view (and `GET /api/history`) that lists runs across every project on the
|
|
383
|
-
machine — now backed by indexed SQL queries instead of a directory scan.
|
|
384
|
-
|
|
385
|
-
The exact table contracts are specified in `docs/ARCHITECTURE.md` §5.
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Project structure
|
|
219
|
+
Bug reports and PRs are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for
|
|
220
|
+
the from-source setup, the test suite, and the PR workflow. Development
|
|
221
|
+
happens on the `dev` branch.
|
|
390
222
|
|
|
391
|
-
|
|
392
|
-
src/core/ protocol, store, artifacts, preflight, claude-runner, phases, orchestrator
|
|
393
|
-
src/cli/ worca-cc.mjs (CLI entry)
|
|
394
|
-
scripts/ install.mjs (copy agents + skill into a target project)
|
|
395
|
-
agents/ agent prompts + .meta.json sidecars (data-driven set)
|
|
396
|
-
skills/ worca/SKILL.md (the /worca skill)
|
|
397
|
-
ui/ server.mjs + public/ (single-page web UI)
|
|
398
|
-
docs/ ARCHITECTURE.md (single source of truth)
|
|
399
|
-
```
|
|
223
|
+
## License
|
|
400
224
|
|
|
401
|
-
|
|
402
|
-
live in the machine-wide external store at `<worcaHome>/store/<projectKey>/` (default
|
|
403
|
-
`~/.worca-cc/store/...`). See [Artifact layout](#artifact-layout).
|
|
225
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worca/app",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "Worca — deterministic multi-agent pipeline that drives Claude Code (headless) through Plan -> Refine -> Implement -> Review, with a CLI, an installable /worca skill, and a web UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sinisha Djukic",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"start": "node --disable-warning=ExperimentalWarning ui/server.mjs",
|
|
44
44
|
"cli": "node --disable-warning=ExperimentalWarning src/cli/worca-cc.mjs",
|
|
45
45
|
"install:agents": "node scripts/install.mjs",
|
|
46
|
-
"build:presenter": "node scripts/build-presenter.mjs",
|
|
47
46
|
"smoke": "WORCA_MOCK=1 WORCA_HOME=.worca-cc-smoke node --disable-warning=ExperimentalWarning src/cli/worca-cc.mjs --project sandbox --prompt \"demo task\" --mock --yes",
|
|
48
47
|
"smoke:workspace": "WORCA_MOCK=1 WORCA_HOME=.worca-cc-smoke node --disable-warning=ExperimentalWarning scripts/smoke-workspace.mjs",
|
|
49
48
|
"smoke:plugin": "WORCA_MOCK=1 WORCA_HOME=.worca-cc-smoke node --disable-warning=ExperimentalWarning scripts/smoke-plugin.mjs",
|