cofounder-crew 0.1.11 → 0.1.13
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 +198 -263
- package/dist/src/cli.js +949 -175
- package/dist/src/cli.js.map +1 -1
- package/dist/src/codex.d.ts +3 -1
- package/dist/src/codex.js +9 -6
- package/dist/src/codex.js.map +1 -1
- package/dist/src/codexConfig.d.ts +6 -2
- package/dist/src/codexConfig.js +98 -19
- package/dist/src/codexConfig.js.map +1 -1
- package/dist/src/init.js +5 -0
- package/dist/src/init.js.map +1 -1
- package/dist/src/manage.d.ts +64 -0
- package/dist/src/manage.js +355 -0
- package/dist/src/manage.js.map +1 -0
- package/dist/src/memberRuntime.d.ts +2 -0
- package/dist/src/memberRuntime.js +48 -6
- package/dist/src/memberRuntime.js.map +1 -1
- package/dist/src/runtime.js +9 -2
- package/dist/src/runtime.js.map +1 -1
- package/dist/src/setup.js +6 -3
- package/dist/src/setup.js.map +1 -1
- package/dist/src/skills.d.ts +22 -0
- package/dist/src/skills.js +283 -0
- package/dist/src/skills.js.map +1 -0
- package/dist/src/templates.d.ts +1 -0
- package/dist/src/templates.js +27 -4
- package/dist/src/templates.js.map +1 -1
- package/dist/src/types.d.ts +11 -1
- package/docs/README.md +15 -0
- package/docs/cli.md +137 -0
- package/docs/configuration.md +200 -0
- package/docs/development.md +19 -0
- package/docs/examples.md +79 -0
- package/docs/faq.md +89 -0
- package/docs/prompts/bootstrap-codex.md +78 -0
- package/docs/releasing.md +23 -0
- package/docs/runtime.md +96 -0
- package/docs/updating.md +93 -0
- package/package.json +3 -2
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
Cofounder Crew is configured with plain files in the project.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
.cofounder/
|
|
7
|
+
team.yaml
|
|
8
|
+
codex-instructions.md
|
|
9
|
+
project.md
|
|
10
|
+
members/<member>/prompt.md
|
|
11
|
+
members/<member>/settings.toml
|
|
12
|
+
members/<member>/home/
|
|
13
|
+
mcp/<server>.toml
|
|
14
|
+
skills/<skill>/SKILL.md
|
|
15
|
+
memory/project.md
|
|
16
|
+
memory/members/<member>.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## AGENTS.md
|
|
20
|
+
|
|
21
|
+
`AGENTS.md` is for the primary Codex session. It should tell Codex to act as the Cofounder/orchestrator and to use the Cofounder MCP tools.
|
|
22
|
+
|
|
23
|
+
If `AGENTS.md` already exists, Cofounder does not overwrite it. Add this bridge block manually:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Cofounder Crew
|
|
27
|
+
|
|
28
|
+
This project uses Cofounder Crew for local AI teamwork. You are the Cofounder/orchestrator for this project. Read .cofounder/codex-instructions.md, use the Cofounder MCP tools, and proactively delegate substantive work to the team member whose responsibilities best match the task. Do not perform specialist work yourself when a configured team member owns that responsibility; coordinate the work, monitor progress, and synthesize the final response.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Keep the bridge text stable unless you know why you are changing it. In automatic context mode, Cofounder removes this orchestrator block before building worker context, so delegated workers receive project rules without being told they are the primary orchestrator.
|
|
32
|
+
|
|
33
|
+
## Project Context
|
|
34
|
+
|
|
35
|
+
Worker project context supports two modes:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
project_context:
|
|
39
|
+
mode: auto
|
|
40
|
+
file: project.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`auto` derives worker-safe context from `AGENTS.md` and strips the Cofounder orchestrator block.
|
|
44
|
+
|
|
45
|
+
`manual` makes workers read `.cofounder/project.md` as the curated project context:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
project_context:
|
|
49
|
+
mode: manual
|
|
50
|
+
file: project.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Refresh the manual file with:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cofounder context sync
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Team Roster
|
|
60
|
+
|
|
61
|
+
The roster lives in `.cofounder/team.yaml`.
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
members:
|
|
65
|
+
backend:
|
|
66
|
+
title: Backend Engineer
|
|
67
|
+
runner: codex
|
|
68
|
+
prompt: members/backend/prompt.md
|
|
69
|
+
settings: members/backend/settings.toml
|
|
70
|
+
home: members/backend/home
|
|
71
|
+
responsibilities:
|
|
72
|
+
- inspect and modify code
|
|
73
|
+
- understand implementation boundaries
|
|
74
|
+
- write focused tests
|
|
75
|
+
can_call:
|
|
76
|
+
- reviewer
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`responsibilities` are how the orchestrator decides who should receive work. `can_call` controls which teammates a member may delegate to.
|
|
80
|
+
|
|
81
|
+
## Member Settings
|
|
82
|
+
|
|
83
|
+
Each member has a `settings.toml` file:
|
|
84
|
+
|
|
85
|
+
```toml
|
|
86
|
+
model = "gpt-5.5"
|
|
87
|
+
sandbox = "workspace-write"
|
|
88
|
+
approval = "never"
|
|
89
|
+
reasoning_effort = "high"
|
|
90
|
+
live_interrupt = false
|
|
91
|
+
|
|
92
|
+
[write]
|
|
93
|
+
mode = "worktree"
|
|
94
|
+
|
|
95
|
+
[mcp]
|
|
96
|
+
mode = "isolated"
|
|
97
|
+
from_main = []
|
|
98
|
+
team = ["cofounder"]
|
|
99
|
+
|
|
100
|
+
[skills]
|
|
101
|
+
mode = "isolated"
|
|
102
|
+
from_project = []
|
|
103
|
+
from_main = []
|
|
104
|
+
team = []
|
|
105
|
+
|
|
106
|
+
[memory]
|
|
107
|
+
project = true
|
|
108
|
+
member = true
|
|
109
|
+
max_snippets = 5
|
|
110
|
+
|
|
111
|
+
[runner.codex]
|
|
112
|
+
json = true
|
|
113
|
+
extra_args = []
|
|
114
|
+
use_member_home = false
|
|
115
|
+
include_project_doc = false
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Common settings:
|
|
119
|
+
|
|
120
|
+
| Setting | Purpose |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `model` | Codex model for this teammate. |
|
|
123
|
+
| `reasoning_effort` | Codex reasoning setting for this teammate. |
|
|
124
|
+
| `sandbox` | Codex sandbox mode. |
|
|
125
|
+
| `approval` | Codex approval policy. |
|
|
126
|
+
| `write.mode = "direct"` | Run in the main working tree. |
|
|
127
|
+
| `write.mode = "worktree"` | Run in `.cofounder/worktrees/<task_id>` and review before apply. |
|
|
128
|
+
| `include_project_doc = false` | Let Cofounder provide worker-safe project context instead of raw `AGENTS.md`. |
|
|
129
|
+
|
|
130
|
+
## MCP Scoping
|
|
131
|
+
|
|
132
|
+
MCP is scoped per member.
|
|
133
|
+
|
|
134
|
+
```toml
|
|
135
|
+
[mcp]
|
|
136
|
+
mode = "isolated"
|
|
137
|
+
from_main = ["github"]
|
|
138
|
+
team = ["pencil"]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`from_main` selects MCP servers from the primary Codex config. By default Cofounder reads `$CODEX_HOME/config.toml`, or `mcp.config_path` if you set it.
|
|
142
|
+
|
|
143
|
+
`team` selects project-owned MCP servers from `.cofounder/mcp/<server>.toml`.
|
|
144
|
+
|
|
145
|
+
Modes:
|
|
146
|
+
|
|
147
|
+
| Mode | Behavior |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `isolated` | Give the member only `from_main` and `team` servers. |
|
|
150
|
+
| `none` | Give the member no MCP servers. |
|
|
151
|
+
| `inherit` | Give the member the primary Codex MCP environment. Use sparingly. |
|
|
152
|
+
|
|
153
|
+
Example project-owned MCP server:
|
|
154
|
+
|
|
155
|
+
```toml
|
|
156
|
+
# .cofounder/mcp/pencil.toml
|
|
157
|
+
url = "https://example.com/mcp"
|
|
158
|
+
startup_timeout_sec = 20
|
|
159
|
+
tool_timeout_sec = 120
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Assign it:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
cofounder mcp add pencil --url https://example.com/mcp --assign designer
|
|
166
|
+
cofounder mcp assign github backend --source main
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Skill Scoping
|
|
170
|
+
|
|
171
|
+
Skills are not loaded by pasting paths into prompts. Codex discovers skills at process startup from skill folders, so Cofounder prepares the member runtime before launching Codex.
|
|
172
|
+
|
|
173
|
+
```toml
|
|
174
|
+
[skills]
|
|
175
|
+
mode = "isolated"
|
|
176
|
+
from_project = ["api-workflow"]
|
|
177
|
+
from_main = ["uncodixfy"]
|
|
178
|
+
team = ["design-review"]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Sources:
|
|
182
|
+
|
|
183
|
+
| Source | Location | Use it when |
|
|
184
|
+
| --- | --- | --- |
|
|
185
|
+
| `from_project` | `.agents/skills/<skill>/SKILL.md` | The skill is normal project surface and may also be visible to primary Codex. |
|
|
186
|
+
| `from_main` | Existing user/global Codex skill roots | The member should reuse a skill already installed for the main user. |
|
|
187
|
+
| `team` | `.cofounder/skills/<skill>/SKILL.md` | The skill should exist only for selected teammates. |
|
|
188
|
+
|
|
189
|
+
When `skills.mode = "isolated"`, Cofounder launches the member with a member-specific `HOME` and `CODEX_HOME`, links selected skills into that runtime home, and disables unselected project skills for that member.
|
|
190
|
+
|
|
191
|
+
## Memory
|
|
192
|
+
|
|
193
|
+
Memory is explicit local text:
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
.cofounder/memory/project.md
|
|
197
|
+
.cofounder/memory/members/<member>.md
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Keep durable project facts in project memory and role-specific notes in member memory.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
Local setup:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install
|
|
7
|
+
npm run check
|
|
8
|
+
npm test
|
|
9
|
+
npm run build
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Useful package commands:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm create cofounder@latest -- --yes
|
|
16
|
+
npx -y --package cofounder-crew -- cofounder start
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The root package publishes the runtime CLI and MCP server. The `packages/create-cofounder` package publishes the `npm create cofounder` initializer.
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
These examples are meant to be run from a project that already has Cofounder Crew initialized.
|
|
4
|
+
|
|
5
|
+
## Add A Designer With Pencil MCP
|
|
6
|
+
|
|
7
|
+
Use this when a specialist needs a tool that should not be exposed to the primary Codex session.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cofounder member add designer --title "Product Designer" --model gpt-5.5 --write-mode worktree
|
|
11
|
+
cofounder mcp add pencil --url https://example.com/mcp --assign designer
|
|
12
|
+
cofounder skill add design-review --scope team --assign designer
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then ask Codex:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Use the Cofounder team. Ask designer to inspect the product flow and propose UI fixes.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Reuse A Project Skill For One Member
|
|
22
|
+
|
|
23
|
+
Project skills live in `.agents/skills/`. They can be visible to the primary Codex session and selectively assigned to members.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cofounder skill add api-workflow --scope project --assign backend
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then ask Codex:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Ask backend to use the api-workflow skill while inspecting the API boundary.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Reuse A Main Codex Skill
|
|
36
|
+
|
|
37
|
+
Use this when a skill is already installed for your main Codex runtime and you want one member to inherit it.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
cofounder skill assign uncodixfy designer --scope main
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Give A Member One Main MCP Server
|
|
44
|
+
|
|
45
|
+
Use `--source main` when the MCP server already exists in the primary Codex config.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cofounder mcp assign github reviewer --source main
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The reviewer gets only the selected server when its MCP mode is `isolated`.
|
|
52
|
+
|
|
53
|
+
## Run A Worktree Task
|
|
54
|
+
|
|
55
|
+
Worktree mode requires a Git repo with at least one commit.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cofounder task delegate backend "implement the smallest safe version of this change"
|
|
59
|
+
cofounder task watch <task_id>
|
|
60
|
+
cofounder task diff <task_id>
|
|
61
|
+
cofounder task apply <task_id>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The daily path is still Codex chat:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
Delegate this implementation to backend in a worktree, then review the diff before applying it.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Switch To Manual Project Context
|
|
71
|
+
|
|
72
|
+
Automatic context derives worker instructions from `AGENTS.md`. Manual context uses `.cofounder/project.md`.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cofounder context mode manual
|
|
76
|
+
cofounder context sync
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Edit `.cofounder/project.md` when you want workers to see a curated project brief.
|
package/docs/faq.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# FAQ
|
|
2
|
+
|
|
3
|
+
## Does Cofounder replace Codex?
|
|
4
|
+
|
|
5
|
+
No. Codex remains the interface. Cofounder adds a local team runtime and MCP tools so Codex can delegate work to focused teammates.
|
|
6
|
+
|
|
7
|
+
## Should I commit `.cofounder/`?
|
|
8
|
+
|
|
9
|
+
Commit the team configuration that is part of the project:
|
|
10
|
+
|
|
11
|
+
- `.cofounder/team.yaml`
|
|
12
|
+
- member prompts and settings
|
|
13
|
+
- project-owned MCP definitions that do not contain secrets
|
|
14
|
+
- team-owned skills
|
|
15
|
+
- curated memory if your team wants it shared and it contains no secrets
|
|
16
|
+
|
|
17
|
+
Do not commit generated runtime state:
|
|
18
|
+
|
|
19
|
+
- `.cofounder/runs/`
|
|
20
|
+
- `.cofounder/worktrees/`
|
|
21
|
+
- `.cofounder/members/*/home/`
|
|
22
|
+
|
|
23
|
+
Cofounder creates `.cofounder/.gitignore` for those runtime folders.
|
|
24
|
+
|
|
25
|
+
## Can different members have different MCP servers?
|
|
26
|
+
|
|
27
|
+
Yes. In a member `settings.toml`:
|
|
28
|
+
|
|
29
|
+
```toml
|
|
30
|
+
[mcp]
|
|
31
|
+
mode = "isolated"
|
|
32
|
+
from_main = ["github"]
|
|
33
|
+
team = ["pencil"]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`from_main` selects existing MCP servers from the primary Codex config. `team` selects project-owned MCP servers from `.cofounder/mcp/`.
|
|
37
|
+
|
|
38
|
+
## Can different members have different skills?
|
|
39
|
+
|
|
40
|
+
Yes. In a member `settings.toml`:
|
|
41
|
+
|
|
42
|
+
```toml
|
|
43
|
+
[skills]
|
|
44
|
+
mode = "isolated"
|
|
45
|
+
from_project = ["api-workflow"]
|
|
46
|
+
from_main = ["uncodixfy"]
|
|
47
|
+
team = ["design-review"]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Project skills live in `.agents/skills/`. Team-only skills live in `.cofounder/skills/`. Main skills are selected from the existing user/global Codex skill roots.
|
|
51
|
+
|
|
52
|
+
## Why does Cofounder need an AGENTS.md bridge?
|
|
53
|
+
|
|
54
|
+
The primary Codex session needs to know it should act as the Cofounder/orchestrator. The bridge points Codex to `.cofounder/codex-instructions.md` and tells it to delegate proactively when a teammate owns the work.
|
|
55
|
+
|
|
56
|
+
In automatic context mode, Cofounder strips that orchestrator text before building worker context, so workers receive project rules without being told they are the orchestrator.
|
|
57
|
+
|
|
58
|
+
## Why does worktree mode require one commit?
|
|
59
|
+
|
|
60
|
+
Git worktrees are created from `HEAD`. A repo with no commits has no baseline for a delegated task to branch from.
|
|
61
|
+
|
|
62
|
+
## Does updating npm update everyone automatically?
|
|
63
|
+
|
|
64
|
+
The MCP entry usually runs:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx -y --package cofounder-crew -- cofounder serve mcp
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
That means new Codex sessions resolve the MCP runtime from npm unless your environment has a cache. The global CLI is updated separately:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cofounder self update
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Project-local pinning is optional. Add or update it with `cofounder pin` only when the repo should record a Cofounder package dependency.
|
|
77
|
+
|
|
78
|
+
Restart Codex after changing MCP configuration.
|
|
79
|
+
|
|
80
|
+
## Is live interrupt supported?
|
|
81
|
+
|
|
82
|
+
Cofounder supports cancel-resume steering. Codex subprocesses do not currently expose true live stdin steering through this runtime.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"live_interrupt": false,
|
|
87
|
+
"interrupt_mode": "cancel-resume"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Codex Bootstrap Prompt
|
|
2
|
+
|
|
3
|
+
Copy this into Codex from the project directory where you want Cofounder Crew installed.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Set up Cofounder Crew in this project and explain each meaningful action as you go.
|
|
7
|
+
|
|
8
|
+
Use https://github.com/eugeneyvt/cofounder-crew as the reference if you need more context. Work from the current project cwd. Do not commit, push, publish, or overwrite existing AGENTS.md or .cofounder files without asking.
|
|
9
|
+
|
|
10
|
+
Goal:
|
|
11
|
+
- make the global cofounder command available
|
|
12
|
+
- initialize or repair the project-local Cofounder setup
|
|
13
|
+
- install or repair the Codex MCP entry
|
|
14
|
+
- verify the setup
|
|
15
|
+
- tell me exactly how to start using the team from Codex
|
|
16
|
+
|
|
17
|
+
Process:
|
|
18
|
+
|
|
19
|
+
1. Inspect the current state first.
|
|
20
|
+
Check:
|
|
21
|
+
- current cwd
|
|
22
|
+
- node --version and npm --version
|
|
23
|
+
- codex --version
|
|
24
|
+
- whether command -v cofounder succeeds
|
|
25
|
+
- whether package.json exists
|
|
26
|
+
- whether package.json already contains cofounder-crew in dependencies or devDependencies
|
|
27
|
+
- whether .cofounder/team.yaml exists
|
|
28
|
+
- whether AGENTS.md exists
|
|
29
|
+
- whether AGENTS.md contains the Cofounder Crew bridge
|
|
30
|
+
- whether this is a Git repo
|
|
31
|
+
- whether Git HEAD exists
|
|
32
|
+
- whether Codex MCP server "cofounder" exists and points to:
|
|
33
|
+
npx -y --package cofounder-crew -- cofounder serve mcp
|
|
34
|
+
|
|
35
|
+
2. Install the global CLI when needed.
|
|
36
|
+
- If command -v cofounder fails, run:
|
|
37
|
+
npm install -g cofounder-crew@latest
|
|
38
|
+
- Do not add cofounder-crew to package.json unless I explicitly ask for project-local pinning.
|
|
39
|
+
- If global install fails or is not allowed, use the one-off npm runner:
|
|
40
|
+
npx -y --package cofounder-crew@latest -- cofounder <command>
|
|
41
|
+
and substitute that prefix for `cofounder` in the commands below.
|
|
42
|
+
|
|
43
|
+
3. Initialize or repair with the CLI.
|
|
44
|
+
- If .cofounder/team.yaml is missing, run:
|
|
45
|
+
cofounder start --setup-codex --yes
|
|
46
|
+
- If .cofounder/team.yaml already exists, do not re-run init. Run the safe updater instead:
|
|
47
|
+
cofounder update --yes
|
|
48
|
+
- Use --template worktree only if I explicitly asked for isolated worktrees or this repo clearly already uses that workflow. Worktree mode requires a Git repo with at least one commit.
|
|
49
|
+
|
|
50
|
+
4. Preserve user-owned files.
|
|
51
|
+
- Do not overwrite AGENTS.md.
|
|
52
|
+
- If AGENTS.md exists but the Cofounder bridge is missing, show me the exact bridge block and explain that I should add it for proactive delegation.
|
|
53
|
+
- Do not overwrite existing member prompts, member settings, memory files, or project-owned MCP files.
|
|
54
|
+
- Do not add root .gitignore entries automatically. Only report recommended ignore entries if they are missing.
|
|
55
|
+
|
|
56
|
+
5. Verify before claiming success.
|
|
57
|
+
Run:
|
|
58
|
+
- cofounder doctor
|
|
59
|
+
- codex mcp get cofounder, if Codex CLI is available
|
|
60
|
+
- npm ls -g cofounder-crew --depth=0, if global npm installs are available
|
|
61
|
+
- npm ls cofounder-crew --depth=0 only if the project is intentionally pinned
|
|
62
|
+
|
|
63
|
+
6. Final response format.
|
|
64
|
+
Tell me:
|
|
65
|
+
- whether Cofounder is available globally or via the one-off npm runner
|
|
66
|
+
- which files were created or changed
|
|
67
|
+
- whether AGENTS.md needs a manual bridge block
|
|
68
|
+
- whether I need to restart Codex
|
|
69
|
+
- the first message to send after restart:
|
|
70
|
+
Use the Cofounder team. Show me who is available.
|
|
71
|
+
- the 3 most useful follow-up commands:
|
|
72
|
+
cofounder add
|
|
73
|
+
cofounder doctor
|
|
74
|
+
cofounder team
|
|
75
|
+
|
|
76
|
+
Do not stop after printing commands unless a command would be unsafe. Actually perform the safe setup steps, then report the result.
|
|
77
|
+
If a verification step fails, do not say the setup is complete. Explain the failure and the next command or manual step needed.
|
|
78
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
Publishing runs through GitHub Actions and npm Trusted Publishing.
|
|
4
|
+
|
|
5
|
+
Trusted publisher setup is the same workflow for both npm packages:
|
|
6
|
+
|
|
7
|
+
| Package | GitHub repository | Workflow |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `cofounder-crew` | `eugeneyvt/cofounder-crew` | `publish-npm.yml` |
|
|
10
|
+
| `create-cofounder` | `eugeneyvt/cofounder-crew` | `publish-npm.yml` |
|
|
11
|
+
|
|
12
|
+
Release flow:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm version <new-version> --no-git-tag-version
|
|
16
|
+
npm version <new-version> --workspace create-cofounder --no-git-tag-version
|
|
17
|
+
git add package.json package-lock.json packages/create-cofounder/package.json
|
|
18
|
+
git commit -m "chore: release v<new-version>"
|
|
19
|
+
git tag v<new-version>
|
|
20
|
+
git push origin main --tags
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then publish the GitHub release for the `vX.Y.Z` tag. The workflow checks, builds, tests, and publishes both npm packages.
|
package/docs/runtime.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Runtime
|
|
2
|
+
|
|
3
|
+
Cofounder exposes the team to Codex through one MCP server. The primary Codex session coordinates tasks, while delegated members run as Codex subprocesses from the original project working directory.
|
|
4
|
+
|
|
5
|
+
## MCP Tools
|
|
6
|
+
|
|
7
|
+
| Tool | Purpose |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `team.list` | Read the roster and responsibility map. |
|
|
10
|
+
| `team.capabilities` | Inspect runtime capabilities. |
|
|
11
|
+
| `team.delegate` | Start a delegated task. |
|
|
12
|
+
| `team.wait` | Wait briefly and return current status, recent logs, and result metadata. |
|
|
13
|
+
| `team.result` | Read the final result with explicit empty and truncated flags. |
|
|
14
|
+
| `team.status` | Check task status and metadata. |
|
|
15
|
+
| `team.logs` | Read task events and logs. |
|
|
16
|
+
| `team.diff` | Inspect a worktree task patch. |
|
|
17
|
+
| `team.apply` | Apply a worktree task patch to the main tree. |
|
|
18
|
+
| `team.cancel` | Cancel a running task. |
|
|
19
|
+
| `team.interrupt` | Cancel and resume with steering instructions. |
|
|
20
|
+
|
|
21
|
+
## Task Files
|
|
22
|
+
|
|
23
|
+
Each delegated task creates a run directory:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
.cofounder/runs/<task_id>/
|
|
27
|
+
task.json
|
|
28
|
+
prompt.md
|
|
29
|
+
events.jsonl
|
|
30
|
+
stdout.log
|
|
31
|
+
stderr.log
|
|
32
|
+
result.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Worktree tasks can also produce an apply patch after completion.
|
|
36
|
+
|
|
37
|
+
`team.wait` timing out means the task is still running, not failed. Always check `team.status`, `team.logs`, and `team.result` before claiming delegated work is done.
|
|
38
|
+
|
|
39
|
+
An empty `result.md` means the delegated task did not return a usable final answer. Treat that as incomplete work, even if the subprocess ran commands.
|
|
40
|
+
|
|
41
|
+
## Direct Mode
|
|
42
|
+
|
|
43
|
+
```toml
|
|
44
|
+
[write]
|
|
45
|
+
mode = "direct"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The member runs in the main working tree. Use this for read-only analysis, reviews, or small trusted edits.
|
|
49
|
+
|
|
50
|
+
## Worktree Mode
|
|
51
|
+
|
|
52
|
+
```toml
|
|
53
|
+
[write]
|
|
54
|
+
mode = "worktree"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The member runs in `.cofounder/worktrees/<task_id>`. The primary Codex session can inspect the patch with:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
cofounder task diff <task_id>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Apply it with:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cofounder task apply <task_id>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Worktree mode requires a Git repository with at least one commit.
|
|
70
|
+
|
|
71
|
+
## Interruption
|
|
72
|
+
|
|
73
|
+
Codex `exec` subprocesses do not currently support true live stdin steering. Cofounder uses cancel-resume:
|
|
74
|
+
|
|
75
|
+
1. identify the running task
|
|
76
|
+
2. cancel the process
|
|
77
|
+
3. resume with revised instructions
|
|
78
|
+
|
|
79
|
+
Runtime capabilities report this as:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"live_interrupt": false,
|
|
84
|
+
"interrupt_mode": "cancel-resume"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Member Runtime
|
|
89
|
+
|
|
90
|
+
When a member needs isolated MCP or skills, Cofounder prepares a member runtime home under:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
.cofounder/members/<member>/home/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This directory can contain generated Codex config, linked skills, and a symlink to the local Codex auth file. It is ignored by `.cofounder/.gitignore`.
|
package/docs/updating.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Updating
|
|
2
|
+
|
|
3
|
+
Updates should be conservative. Do not re-run init over an existing team, and do not overwrite member prompts, settings, memory, MCP config, or `AGENTS.md`.
|
|
4
|
+
|
|
5
|
+
## Codex Prompt
|
|
6
|
+
|
|
7
|
+
Paste this into Codex from the project you want to update:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Update Cofounder Crew in this project.
|
|
11
|
+
|
|
12
|
+
Inspect first:
|
|
13
|
+
- whether command -v cofounder succeeds
|
|
14
|
+
- whether npm ls -g cofounder-crew --depth=0 works
|
|
15
|
+
- whether package.json contains cofounder-crew as an intentional project-local pin
|
|
16
|
+
- whether Codex MCP server "cofounder" exists and points to: npx -y --package cofounder-crew -- cofounder serve mcp
|
|
17
|
+
- whether .cofounder/team.yaml, member prompts/settings, memory, MCP config, project_context mode, and AGENTS.md exist
|
|
18
|
+
- whether .cofounder/.gitignore ignores runs/, worktrees/, and members/*/home/
|
|
19
|
+
|
|
20
|
+
Then update safely:
|
|
21
|
+
- If the global cofounder command is missing, install it with npm install -g cofounder-crew@latest.
|
|
22
|
+
- If cofounder-crew is pinned in package.json, report it and only update that pin when I explicitly ask.
|
|
23
|
+
- If MCP is missing or wrong, repair it.
|
|
24
|
+
- Do not re-run init over existing .cofounder/.
|
|
25
|
+
- Do not add cofounder-crew to package.json during update.
|
|
26
|
+
- Do not overwrite member prompts, settings, memory, MCP config, or AGENTS.md.
|
|
27
|
+
- If runtime ignore entries are missing, report the recommended entries but do not add them automatically.
|
|
28
|
+
- If project_context.mode is manual, ask before syncing .cofounder/project.md.
|
|
29
|
+
- If MCP changed, tell me to restart Codex from this project directory.
|
|
30
|
+
|
|
31
|
+
Summarize old versions, new versions, changed files, and manual follow-ups.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Command
|
|
35
|
+
|
|
36
|
+
Default flow:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
cofounder update
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Non-interactive:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cofounder update --yes
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If the global command is not available, run the latest updater from npm:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx -y --package cofounder-crew@latest -- cofounder update --yes
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
What it does:
|
|
55
|
+
|
|
56
|
+
- repairs the Codex MCP entry by default
|
|
57
|
+
- runs `cofounder doctor`
|
|
58
|
+
- leaves `.cofounder/`, prompts, settings, memory, MCP files, `package.json`, and `AGENTS.md` untouched
|
|
59
|
+
|
|
60
|
+
Skip MCP repair when you only want checks:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cofounder update --no-setup-codex
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Update a globally installed `cofounder` command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cofounder self update
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Project-local pinning is optional and explicit:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cofounder pin
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Check npm versions:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm view cofounder-crew version
|
|
82
|
+
npm view create-cofounder version
|
|
83
|
+
npm ls -g cofounder-crew --depth=0
|
|
84
|
+
npm ls cofounder-crew --depth=0 # only for pinned projects
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Manual context refresh when using `project_context.mode = "manual"`:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cofounder context sync
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Restart Codex after changing the MCP entry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cofounder-crew",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Codex-backed local team runtime",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codex",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"files": [
|
|
25
25
|
"dist/src",
|
|
26
|
-
"README.md"
|
|
26
|
+
"README.md",
|
|
27
|
+
"docs"
|
|
27
28
|
],
|
|
28
29
|
"exports": {
|
|
29
30
|
".": "./dist/src/runtime.js",
|