cofounder-crew 0.1.1 → 0.1.3
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/README.md +21 -13
- package/dist/src/git.js +10 -1
- package/dist/src/git.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Cofounder Crew gives a project a small file-based team runtime: named members, r
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
cd my-project
|
|
9
|
-
npm create cofounder@latest
|
|
9
|
+
npm create cofounder@latest -- --template worktree --setup-codex --yes
|
|
10
10
|
codex
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -20,7 +20,13 @@ Create a team skeleton:
|
|
|
20
20
|
npm create cofounder@latest
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
This does not install a persistent `cofounder` shell command. For one-off runtime commands, use:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx -y --package cofounder-crew -- cofounder team
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
In a Git project with at least one commit, use isolated Git worktrees for implementation tasks and install the Codex MCP entry:
|
|
24
30
|
|
|
25
31
|
```bash
|
|
26
32
|
npm create cofounder@latest -- --template worktree --setup-codex --yes
|
|
@@ -68,21 +74,21 @@ The important part is that everything is plain files. You can inspect prompts, s
|
|
|
68
74
|
## Core Commands
|
|
69
75
|
|
|
70
76
|
```bash
|
|
71
|
-
cofounder team
|
|
72
|
-
cofounder run backend "inspect this repo"
|
|
73
|
-
cofounder delegate backend "add focused tests for the parser"
|
|
74
|
-
cofounder status <task_id>
|
|
75
|
-
cofounder logs <task_id>
|
|
76
|
-
cofounder watch <task_id>
|
|
77
|
-
cofounder cancel <task_id>
|
|
78
|
-
cofounder interrupt <task_id> "revise the approach and continue"
|
|
77
|
+
npx -y --package cofounder-crew -- cofounder team
|
|
78
|
+
npx -y --package cofounder-crew -- cofounder run backend "inspect this repo"
|
|
79
|
+
npx -y --package cofounder-crew -- cofounder delegate backend "add focused tests for the parser"
|
|
80
|
+
npx -y --package cofounder-crew -- cofounder status <task_id>
|
|
81
|
+
npx -y --package cofounder-crew -- cofounder logs <task_id>
|
|
82
|
+
npx -y --package cofounder-crew -- cofounder watch <task_id>
|
|
83
|
+
npx -y --package cofounder-crew -- cofounder cancel <task_id>
|
|
84
|
+
npx -y --package cofounder-crew -- cofounder interrupt <task_id> "revise the approach and continue"
|
|
79
85
|
```
|
|
80
86
|
|
|
81
87
|
For isolated worktree tasks:
|
|
82
88
|
|
|
83
89
|
```bash
|
|
84
|
-
cofounder diff <task_id>
|
|
85
|
-
cofounder apply <task_id>
|
|
90
|
+
npx -y --package cofounder-crew -- cofounder diff <task_id>
|
|
91
|
+
npx -y --package cofounder-crew -- cofounder apply <task_id>
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
`diff` prints the generated patch. `apply` validates it with `git apply --check`, applies it to the main working tree, and stores the patch under `.cofounder/runs/<task_id>/apply.patch`.
|
|
@@ -92,7 +98,7 @@ cofounder apply <task_id>
|
|
|
92
98
|
Install the MCP entry:
|
|
93
99
|
|
|
94
100
|
```bash
|
|
95
|
-
cofounder setup codex --install
|
|
101
|
+
npx -y --package cofounder-crew -- cofounder setup codex --install
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
Equivalent command:
|
|
@@ -155,6 +161,8 @@ mode = "worktree"
|
|
|
155
161
|
|
|
156
162
|
Worktrees are created from `HEAD`; uncommitted main-tree changes are not copied. This keeps delegated edits inspectable before applying them.
|
|
157
163
|
|
|
164
|
+
Worktree mode requires a Git repository with at least one commit. For scratch directories, use the default template or switch the member setting back to `mode = "direct"`.
|
|
165
|
+
|
|
158
166
|
## Interruption
|
|
159
167
|
|
|
160
168
|
Codex `exec` does not expose confirmed live mid-turn input. Cofounder Crew therefore uses cancel-and-resume:
|
package/dist/src/git.js
CHANGED
|
@@ -4,6 +4,15 @@ import path from "node:path";
|
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import { CofounderError } from "./errors.js";
|
|
6
6
|
const execFileAsync = promisify(execFile);
|
|
7
|
+
const WORKTREE_PREREQUISITE_ERROR = `worktree write mode requires a Git repository with at least one commit.
|
|
8
|
+
Worktrees are created from HEAD, so commit the baseline you want delegated agents to see.
|
|
9
|
+
|
|
10
|
+
For a scratch test:
|
|
11
|
+
git init
|
|
12
|
+
git add .
|
|
13
|
+
git commit -m "chore: initial commit"
|
|
14
|
+
|
|
15
|
+
Or use direct mode by setting mode = "direct" under [write] in the member settings file.`;
|
|
7
16
|
export async function readGitSnapshot(cwd) {
|
|
8
17
|
try {
|
|
9
18
|
const { stdout } = await execFileAsync("git", ["status", "--porcelain=v1", "-z"], {
|
|
@@ -29,7 +38,7 @@ export async function createGitWorktree(projectRoot, worktreePath) {
|
|
|
29
38
|
});
|
|
30
39
|
}
|
|
31
40
|
catch {
|
|
32
|
-
throw new CofounderError(
|
|
41
|
+
throw new CofounderError(WORKTREE_PREREQUISITE_ERROR);
|
|
33
42
|
}
|
|
34
43
|
await mkdir(path.dirname(worktreePath), { recursive: true });
|
|
35
44
|
try {
|
package/dist/src/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,M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