cofounder-crew 0.1.8 → 0.1.9
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 +27 -1
- package/dist/src/projectContext.js +47 -7
- package/dist/src/projectContext.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,7 +147,7 @@ project_context:
|
|
|
147
147
|
file: project.md
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
`auto` is the default. Each delegated worker gets fresh context derived from `AGENTS.md`, with the
|
|
150
|
+
`auto` is the default. Each delegated worker gets fresh context derived from `AGENTS.md`, with the Cofounder bridge/orchestrator text removed. Project rules after the bridge are preserved even when there is no following heading.
|
|
151
151
|
|
|
152
152
|
`manual` makes workers read `.cofounder/project.md` instead. Use it when you want a curated worker context that does not change until you edit or sync it.
|
|
153
153
|
|
|
@@ -177,6 +177,8 @@ Add this bridge block so Codex adopts the Cofounder role:
|
|
|
177
177
|
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.
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
+
When `project_context.mode` is `auto`, keep this bridge text unchanged unless you know why you are changing it. Cofounder recognizes this orchestrator text and removes it from delegated worker context, so workers receive project rules without being told that they are the main orchestrator.
|
|
181
|
+
|
|
180
182
|
Cofounder keeps the full generated guidance in `.cofounder/codex-instructions.md`.
|
|
181
183
|
|
|
182
184
|
## Configuration
|
|
@@ -355,3 +357,27 @@ npm run check
|
|
|
355
357
|
npm test
|
|
356
358
|
npm run build
|
|
357
359
|
```
|
|
360
|
+
|
|
361
|
+
## Publishing
|
|
362
|
+
|
|
363
|
+
Publishing runs through GitHub Actions and npm Trusted Publishing.
|
|
364
|
+
|
|
365
|
+
One-time npm setup for both packages:
|
|
366
|
+
|
|
367
|
+
| Package | Trusted publisher |
|
|
368
|
+
| --- | --- |
|
|
369
|
+
| `cofounder-crew` | GitHub Actions, `eugeneyvt/cofounder-crew`, workflow `publish-npm.yml` |
|
|
370
|
+
| `create-cofounder` | GitHub Actions, `eugeneyvt/cofounder-crew`, workflow `publish-npm.yml` |
|
|
371
|
+
|
|
372
|
+
Release flow:
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
npm version <new-version> --no-git-tag-version
|
|
376
|
+
npm version <new-version> --workspace create-cofounder --no-git-tag-version
|
|
377
|
+
git add package.json package-lock.json packages/create-cofounder/package.json
|
|
378
|
+
git commit -m "chore: release v<new-version>"
|
|
379
|
+
git tag v<new-version>
|
|
380
|
+
git push origin main --tags
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Then publish the GitHub release for the new `vX.Y.Z` tag. The workflow checks, builds, tests, and publishes both npm packages.
|
|
@@ -52,7 +52,7 @@ export function deriveProjectInstructionsFromAgents(content) {
|
|
|
52
52
|
const projectDocMarker = "--- project-doc ---";
|
|
53
53
|
const markerIndex = content.indexOf(projectDocMarker);
|
|
54
54
|
const scoped = markerIndex === -1 ? content : content.slice(markerIndex + projectDocMarker.length);
|
|
55
|
-
const stripped =
|
|
55
|
+
const stripped = stripCofounderOrchestration(scoped)
|
|
56
56
|
.replace(/^<INSTRUCTIONS>\s*/i, "")
|
|
57
57
|
.replace(/\s*<\/INSTRUCTIONS>\s*$/i, "")
|
|
58
58
|
.trim();
|
|
@@ -85,27 +85,67 @@ async function readProjectContextFile(project, fallback, mode) {
|
|
|
85
85
|
derived: false
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function stripCofounderOrchestration(content) {
|
|
89
89
|
const lines = content.split(/\r?\n/);
|
|
90
90
|
const result = [];
|
|
91
|
+
const generatedDoc = /^\s*#\s+Cofounder Crew\s*$/im.test(content);
|
|
92
|
+
const generatedSectionTitles = new Set([
|
|
93
|
+
"your role",
|
|
94
|
+
"orchestration workflow",
|
|
95
|
+
"team configuration",
|
|
96
|
+
"if cofounder tools are missing"
|
|
97
|
+
]);
|
|
98
|
+
let cofounderLevel = null;
|
|
99
|
+
let stripIntro = false;
|
|
91
100
|
let skipLevel = null;
|
|
92
101
|
for (const line of lines) {
|
|
93
102
|
const heading = /^(#{1,6})\s+(.+?)\s*$/.exec(line);
|
|
103
|
+
if (skipLevel !== null) {
|
|
104
|
+
if (!heading) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const level = heading[1].length;
|
|
108
|
+
if (level > skipLevel) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
skipLevel = null;
|
|
112
|
+
}
|
|
94
113
|
if (heading) {
|
|
95
114
|
const level = heading[1].length;
|
|
96
115
|
const headingTitle = heading[2].trim().toLowerCase();
|
|
97
|
-
if (
|
|
98
|
-
|
|
116
|
+
if (headingTitle === "cofounder crew") {
|
|
117
|
+
cofounderLevel = level;
|
|
118
|
+
stripIntro = true;
|
|
119
|
+
continue;
|
|
99
120
|
}
|
|
100
|
-
if (
|
|
121
|
+
if (generatedDoc && cofounderLevel === 1 && level > cofounderLevel && generatedSectionTitles.has(headingTitle)) {
|
|
101
122
|
skipLevel = level;
|
|
123
|
+
stripIntro = false;
|
|
102
124
|
continue;
|
|
103
125
|
}
|
|
126
|
+
if (cofounderLevel !== null && level <= cofounderLevel) {
|
|
127
|
+
cofounderLevel = null;
|
|
128
|
+
stripIntro = false;
|
|
129
|
+
}
|
|
104
130
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
131
|
+
if (stripIntro) {
|
|
132
|
+
if (line.trim().length === 0 || isCofounderBridgeLine(line)) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
stripIntro = false;
|
|
107
136
|
}
|
|
137
|
+
result.push(line);
|
|
108
138
|
}
|
|
109
139
|
return result.join("\n");
|
|
110
140
|
}
|
|
141
|
+
function isCofounderBridgeLine(line) {
|
|
142
|
+
const normalized = line.trim().toLowerCase();
|
|
143
|
+
return (normalized.includes("this project uses cofounder crew") ||
|
|
144
|
+
normalized.includes("cofounder/orchestrator") ||
|
|
145
|
+
normalized.includes("cofounder mcp tools") ||
|
|
146
|
+
normalized.includes(".cofounder/codex-instructions.md") ||
|
|
147
|
+
normalized.includes("proactively delegate") ||
|
|
148
|
+
normalized.includes("do not perform specialist work yourself") ||
|
|
149
|
+
normalized.includes("coordinate the work"));
|
|
150
|
+
}
|
|
111
151
|
//# sourceMappingURL=projectContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectContext.js","sourceRoot":"","sources":["../../src/projectContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAUxD,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAAsB,EAAE,QAAgB;IACpF,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC;IAC7C,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,MAAM,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,wBAAwB,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9E,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5E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