crewyard 0.0.0-stage → 0.1.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +303 -2
  3. package/bin/crew.js +44 -0
  4. package/package.json +43 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rafael Fragoso
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,3 +1,304 @@
1
- # Temporary Holding Version
1
+ <!-- Crewyard README · Keep installation instructions consistent with docs/installation.md. -->
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <div align="center">
4
+
5
+ <h1>crewyard</h1>
6
+
7
+ <p><strong>Ship together. Merge safely.</strong></p>
8
+
9
+ <p>
10
+ The local-first coordination engine for independent AI coding agents.<br />
11
+ One workflow for planning, parallel execution, review, and integration.
12
+ </p>
13
+
14
+ <p>
15
+ <a href="#quick-start"><strong>Get started</strong></a>
16
+ &nbsp;&nbsp;·&nbsp;&nbsp;
17
+ <a href="#how-it-works">How it works</a>
18
+ &nbsp;&nbsp;·&nbsp;&nbsp;
19
+ <a href="docs/architecture/overview.md">Architecture</a>
20
+ &nbsp;&nbsp;·&nbsp;&nbsp;
21
+ <a href="#documentation">Documentation</a>
22
+ </p>
23
+
24
+ <p>
25
+ <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-18181B?style=flat-square&logo=typescript&logoColor=white" />
26
+ <img alt="Bun" src="https://img.shields.io/badge/Bun-18181B?style=flat-square&logo=bun&logoColor=white" />
27
+ <img alt="MCP" src="https://img.shields.io/badge/MCP-18181B?style=flat-square" />
28
+ <img alt="Local first" src="https://img.shields.io/badge/Local--first-18181B?style=flat-square" />
29
+ <a href="https://www.npmjs.com/package/crewyard"><img alt="npm" src="https://img.shields.io/npm/v/crewyard?style=flat-square&color=18181B&label=npm" /></a>
30
+ <a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/License-MIT-18181B?style=flat-square" /></a>
31
+ <a href="https://github.com/orafaelfragoso/crewyard/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/orafaelfragoso/crewyard/actions/workflows/ci.yml/badge.svg" /></a>
32
+ </p>
33
+
34
+ <sub>In development toward v1.0 · MIT licensed · No hosted backend required</sub>
35
+
36
+ </div>
37
+
38
+ <br />
39
+
40
+ > [!NOTE]
41
+ > **Pre-1.0 software.** Crewyard is being developed toward v1.0, and commands and configuration may still change between minor versions. Run `crew <command> --help` to see what your installed version supports, and check the [changelog](CHANGELOG.md) before upgrading.
42
+
43
+ ## Coding agents are good at writing code. Coordinating them is the hard part.
44
+
45
+ Running multiple independent agents on one repository creates a new set of engineering problems: duplicated work, conflicting edits, stale context, overflowing PR queues, repeated reviews, and merges that invalidate work already in flight.
46
+
47
+ **Crewyard is the coordination layer between your agents and your repository.** It gives independent agents a shared, durable workflow—without forcing them to use the same model, provider, or chat session.
48
+
49
+ | Without coordination | With Crewyard |
50
+ | :--- | :--- |
51
+ | Agents pick up overlapping tasks | Atomic claims, leases, and scope reservations |
52
+ | Parallel work collides in one checkout | Isolated Git worktrees per task |
53
+ | Context drifts as branches change | Versioned repository indexing and context packs |
54
+ | Reviews repeat or become stale | Evidence-aware incremental review |
55
+ | PRs accumulate and merges conflict | Serialized integration and GitHub-aware queueing |
56
+ | Crashes lose orchestration state | Durable events, reconciliation, and recovery |
57
+
58
+ ## One workflow. From goal to merge.
59
+
60
+ ```mermaid
61
+ flowchart LR
62
+ A["01 · Plan"] --> B["02 · Schedule"]
63
+ B --> C["03 · Execute"]
64
+ C --> D["04 · Review"]
65
+ D --> E["05 · Integrate"]
66
+ E --> F["06 · Reconcile"]
67
+ F -. "Unblock dependent work" .-> B
68
+
69
+ classDef default fill:#18181b,color:#fafafa,stroke:#52525b,stroke-width:1px;
70
+ classDef finish fill:#134e4a,color:#f0fdfa,stroke:#2dd4bf,stroke-width:1px;
71
+ class F finish;
72
+ ```
73
+
74
+ 1. **Plan with dependencies.** Turn a goal into a validated task graph and approve the plan before execution.
75
+ 2. **Schedule safely.** Dispatch ready tasks subject to concurrency limits, dependencies, and reservations.
76
+ 3. **Run independently.** Assign work to Codex, Claude Code, OpenCode, or another compatible process in isolated worktrees.
77
+ 4. **Review with evidence.** Collect structured handoffs, tests, and review findings associated with the work being proposed.
78
+ 5. **Integrate deliberately.** Coordinate pull requests and validation without bypassing repository protections.
79
+ 6. **Recover and continue.** Persist events, reconcile remote state, re-index the base, and unblock downstream tasks.
80
+
81
+ ## Built for real engineering workflows
82
+
83
+ <table>
84
+ <tr>
85
+ <td width="50%" valign="top">
86
+
87
+ ### Multi-agent, multi-provider
88
+
89
+ Use independent coding agents and account profiles without tying the workflow to one LLM provider.
90
+
91
+ **Adapters:** Codex · Claude Code · OpenCode · Ollama · Generic process
92
+
93
+ </td>
94
+ <td width="50%" valign="top">
95
+
96
+ ### Parallel work, without collisions
97
+
98
+ Atomic task claims, fenced leases, dependency-aware scheduling, and dedicated Git worktrees are designed to keep work isolated and accountable.
99
+
100
+ </td>
101
+ </tr>
102
+ <tr>
103
+ <td valign="top">
104
+
105
+ ### Repository-aware context
106
+
107
+ Build versioned indexes and retrieve code context with symbol, reference, path, and commit provenance.
108
+
109
+ </td>
110
+ <td valign="top">
111
+
112
+ ### Review-to-merge orchestration
113
+
114
+ Track review evidence, integration readiness, GitHub checks, queue state, and merge outcomes across the full task lifecycle.
115
+
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <td valign="top">
120
+
121
+ ### Local by design
122
+
123
+ Keep orchestration state in a local SQLite database. No Crewyard-hosted backend is required; configured providers and GitHub may still use network services.
124
+
125
+ </td>
126
+ <td valign="top">
127
+
128
+ ### Multiple ways to interact
129
+
130
+ Operate through a CLI, MCP tools, portable Agent Skills, a background service, or a terminal dashboard—all backed by the same application services.
131
+
132
+ </td>
133
+ </tr>
134
+ </table>
135
+
136
+ ## Installation
137
+
138
+ Crewyard targets **Linux (x64, arm64)**, **macOS (Apple Silicon, Intel)**, and **Windows (x64)**. You need Git 2.38+, at least one compatible coding-agent CLI, and the authenticated [GitHub CLI](https://cli.github.com/) for GitHub integration.
139
+
140
+ ### Install with npm
141
+
142
+ ```bash
143
+ npm install --global crewyard
144
+ crew version
145
+ ```
146
+
147
+ npm installs a prebuilt binary for your platform; Node.js 22+ is only needed for the small launcher. Standalone binaries that need neither Node.js nor Bun are attached to every [GitHub release](https://github.com/orafaelfragoso/crewyard/releases).
148
+
149
+ ### Install from source
150
+
151
+ Requires [Bun 1.4.4+](https://bun.sh/).
152
+
153
+ ```bash
154
+ git clone https://github.com/orafaelfragoso/crewyard.git
155
+ cd crewyard
156
+ bun install --frozen-lockfile
157
+ bun run crew doctor
158
+ ```
159
+
160
+ In a source checkout, run `bun run crew` from the repository root wherever this README uses `crew`.
161
+
162
+ See [installation and upgrades](docs/installation.md) for supported platforms, direct binary installs, checksums, backups, and removal.
163
+
164
+ ## Quick start
165
+
166
+ ### 1. Initialize your repository
167
+
168
+ ```bash
169
+ crew doctor
170
+ crew init --repo /path/to/your/project
171
+ ```
172
+
173
+ Crewyard creates repository configuration at `.crewyard/config.yaml` and manages coordination state locally.
174
+
175
+ ### 2. Connect your agents
176
+
177
+ ```bash
178
+ crew account add --provider codex --name personal
179
+ crew agent create --name engineer --provider codex --account personal
180
+ crew install --target codex,claude,opencode --dry-run
181
+ crew install --target codex,claude,opencode
182
+ ```
183
+
184
+ The installer registers `crew mcp` and adds portable Agent Skills to supported agent hosts. Inspect the dry-run output before allowing changes to host configuration.
185
+
186
+ ### 3. Plan and supervise a goal
187
+
188
+ Review the plan before approving it, and watch the first runs before leaving the service unattended:
189
+
190
+ ```bash
191
+ crew goal create --title "Add JWT authentication" --description-file goal.md
192
+ crew goal plan GOAL-1 --agent architect
193
+ crew goal approve GOAL-1
194
+ crew service start
195
+ crew dashboard
196
+ ```
197
+
198
+ Create an agent with `--role architect` before using `--agent architect`. `GOAL-1` is illustrative; use the ID returned by the create command.
199
+
200
+ The background service is required for continuous dispatch and reconciliation; the MCP server alone does not keep autonomous work running after the host exits.
201
+
202
+ <p><a href="docs/installation.md"><strong>Installation guide →</strong></a> &nbsp;·&nbsp; <a href="docs/reference/cli.md"><strong>CLI reference →</strong></a></p>
203
+
204
+ ## How it works
205
+
206
+ Crewyard is a local orchestration system, not an LLM gateway. It coordinates tools you already use while maintaining its own authoritative task and integration state.
207
+
208
+ ```mermaid
209
+ flowchart TB
210
+ DEV["Developer / automation"] --> CLI["CLI & terminal dashboard"]
211
+ AG["Codex · Claude Code · OpenCode · Other"] --> MCP["MCP server & Agent Skills"]
212
+
213
+ CLI --> APP["Shared application services"]
214
+ MCP --> APP
215
+
216
+ APP --> PLAN["Task graph & scheduler"]
217
+ APP --> CTX["Versioned index & context"]
218
+ APP --> REV["Review & integration"]
219
+ APP --> EVT["Events & observability"]
220
+
221
+ PLAN --> WORK["Isolated Git worktrees"]
222
+ REV <--> GH["GitHub & CI"]
223
+ PLAN --> DB[("Local SQLite")]
224
+ CTX --> DB
225
+ REV --> DB
226
+ EVT --> DB
227
+
228
+ classDef default fill:#18181b,color:#fafafa,stroke:#52525b,stroke-width:1px;
229
+ classDef store fill:#134e4a,color:#f0fdfa,stroke:#2dd4bf;
230
+ class DB store;
231
+ ```
232
+
233
+ **The architecture is deliberately provider-agnostic.** The CLI and MCP server are thin interfaces over shared application services. SQLite WAL provides durable coordination; external GitHub and process side effects are reconciled rather than treated as a single database transaction.
234
+
235
+ For an engineering-level explanation, see the [architecture overview](docs/architecture/overview.md), [indexing model](docs/architecture/indexing.md), and [task/lease design](docs/architecture/tasks-and-leases.md).
236
+
237
+ ## Interfaces
238
+
239
+ | Interface | Designed for | Reference |
240
+ | :--- | :--- | :--- |
241
+ | **CLI** (`crew`) | Humans, scripts, and command-capable agents | [CLI reference](docs/reference/cli.md) |
242
+ | **MCP** (`crew mcp`) | Agent hosts that support Model Context Protocol | [MCP reference](docs/reference/mcp.md) |
243
+ | **Agent Skills** | Portable instructions for planning, execution, review, integration, recovery, and context | [Skills guide](docs/skills.md) |
244
+ | **Local service** (`crew service`) | Continuous dispatch, reconciliation, and integration | [Architecture](docs/architecture/overview.md) |
245
+ | **Terminal dashboard** (`crew dashboard`) | Operational visibility into active work and events | [CLI reference](docs/reference/cli.md) |
246
+
247
+ ## Safety is an architectural boundary
248
+
249
+ Autonomous agents should not be able to bypass coordination simply by asking for it.
250
+
251
+ - **Fenced task leases** prevent stale workers from submitting work as the current owner.
252
+ - **Scoped worktrees** separate parallel tasks and protect developer checkouts.
253
+ - **Approval and policy gates** control high-impact transitions.
254
+ - **GitHub branch protections** remain authoritative during integration.
255
+ - **Idempotent outbox operations** support retries and recovery after interruption.
256
+ - **Local credential handling** keeps secrets out of repository configuration and orchestration event logs.
257
+
258
+ Security properties depend on configuration and implementation maturity. Read the [security model](docs/policies/security-model.md) and [default policies](docs/policies/default-policies.md) before enabling unattended workflows.
259
+
260
+ ## Documentation
261
+
262
+ | Start here | Learn more |
263
+ | :--- | :--- |
264
+ | [Installation](docs/installation.md) | Supported setups, local data, upgrades, and backups |
265
+ | [CLI reference](docs/reference/cli.md) | Commands, options, and machine-readable output |
266
+ | [MCP host setup](docs/mcp-hosts.md) | Connecting existing coding-agent tools |
267
+ | [Agent Skills](docs/skills.md) | Reusable workflows for compatible agents |
268
+ | [Architecture](docs/architecture/overview.md) | Services, storage, scheduling, and system boundaries |
269
+ | [Security model](docs/policies/security-model.md) | Trust boundaries, permissions, and operational safety |
270
+ | [Recovery runbooks](docs/incident-recovery/runbooks.md) | Failures, restarts, and reconciliation |
271
+
272
+ ## Development
273
+
274
+ The codebase is a Bun/TypeScript monorepo with packages for scheduling, providers, indexing, reviews, integration, storage, and telemetry.
275
+
276
+ ```bash
277
+ bun install --frozen-lockfile
278
+ bun run typecheck
279
+ bun run lint
280
+ bun test
281
+ bun run build:binaries # platform binaries, manifest and checksums
282
+ bun run build:npm # npm tarballs, after binaries have been built
283
+ ```
284
+
285
+ See [AGENTS.md](AGENTS.md) for code conventions, the [architecture documentation](docs/architecture/overview.md) for package boundaries, and the [release process](docs/releasing.md) for distribution.
286
+
287
+ ## Contributing
288
+
289
+ Contributions are welcome. Read the [contributing guide](CONTRIBUTING.md) and the [code of conduct](CODE_OF_CONDUCT.md), and use [GitHub Issues](https://github.com/orafaelfragoso/crewyard/issues) for bug reports and feature requests. Report vulnerabilities privately as described in the [security policy](SECURITY.md).
290
+
291
+ ## Project status & licensing
292
+
293
+ Crewyard is **under active development toward v1.0**. Releases are cut automatically from `main` with [release-please](https://github.com/googleapis/release-please); every release is listed in the [changelog](CHANGELOG.md) and on the [releases page](https://github.com/orafaelfragoso/crewyard/releases). See the [release process](docs/releasing.md) for how npm packages and platform binaries are built and published.
294
+
295
+ Licensed under the [MIT License](LICENSE). Copyright © 2026 Rafael Fragoso.
296
+
297
+ ---
298
+
299
+ <div align="center">
300
+ <p><strong>More agents. Less coordination overhead.</strong></p>
301
+ <sub>Built for developers who want autonomous work to reach a safe, reviewable merge.</sub>
302
+ <br /><br />
303
+ <a href="#quick-start">Get started</a> · <a href="docs/architecture/overview.md">Explore the architecture</a> · <a href="https://github.com/orafaelfragoso/crewyard/issues">Issues</a>
304
+ </div>
package/bin/crew.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawn } = require('node:child_process');
5
+ const manifest = require('../package.json');
6
+
7
+ const SCOPE = '@crewyard/cli-';
8
+ const platform = `${process.platform}-${process.arch}`;
9
+ const executable = process.platform === 'win32' ? 'crew.exe' : 'crew';
10
+
11
+ function resolveBinary() {
12
+ try {
13
+ return require.resolve(`${SCOPE}${platform}/bin/${executable}`);
14
+ } catch {
15
+ const supported = Object.keys(manifest.optionalDependencies || {})
16
+ .map((name) => name.slice(SCOPE.length))
17
+ .join(', ');
18
+ process.stderr.write(
19
+ `crew: no prebuilt binary is installed for ${platform}.\n` +
20
+ `Supported platforms: ${supported}.\n` +
21
+ 'If yours is listed, reinstall without --omit=optional or --no-optional.\n',
22
+ );
23
+ process.exit(1);
24
+ }
25
+ }
26
+
27
+ const child = spawn(resolveBinary(), process.argv.slice(2), { stdio: 'inherit' });
28
+
29
+ for (const signal of ['SIGINT', 'SIGQUIT']) process.on(signal, () => {});
30
+ for (const signal of ['SIGTERM', 'SIGHUP']) process.on(signal, () => child.kill(signal));
31
+
32
+ child.on('error', (error) => {
33
+ process.stderr.write(`crew: failed to start ${platform} binary: ${error.message}\n`);
34
+ process.exit(1);
35
+ });
36
+
37
+ child.on('exit', (code, signal) => {
38
+ if (signal) {
39
+ process.removeAllListeners(signal);
40
+ process.kill(process.pid, signal);
41
+ return;
42
+ }
43
+ process.exit(code ?? 1);
44
+ });
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "crewyard",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Local-first coordination engine for independent AI coding agents.",
5
+ "keywords": [
6
+ "ai",
7
+ "agents",
8
+ "coding-agents",
9
+ "mcp",
10
+ "orchestration",
11
+ "git",
12
+ "worktrees",
13
+ "merge-queue",
14
+ "cli"
15
+ ],
16
+ "license": "MIT",
17
+ "author": "Rafael Fragoso",
18
+ "homepage": "https://github.com/orafaelfragoso/crewyard#readme",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/orafaelfragoso/crewyard.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/orafaelfragoso/crewyard/issues"
25
+ },
26
+ "bin": {
27
+ "crew": "bin/crew.js"
28
+ },
29
+ "files": [
30
+ "bin"
31
+ ],
32
+ "engines": {
33
+ "node": ">=22"
34
+ },
35
+ "optionalDependencies": {
36
+ "@crewyard/cli-linux-x64": "0.1.1",
37
+ "@crewyard/cli-linux-arm64": "0.1.1",
38
+ "@crewyard/cli-darwin-arm64": "0.1.1",
39
+ "@crewyard/cli-darwin-x64": "0.1.1",
40
+ "@crewyard/cli-win32-x64": "0.1.1"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ }
45
+ }