takomi 2.1.28 → 2.1.30
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/.pi/agents/coder.md +6 -0
- package/.pi/agents/orchestrator.md +16 -0
- package/.pi/extensions/oauth-router/README.md +4 -2
- package/.pi/extensions/oauth-router/commands.ts +38 -14
- package/.pi/extensions/oauth-router/config.ts +12 -3
- package/.pi/extensions/oauth-router/index.ts +1 -1
- package/.pi/extensions/oauth-router/oauth-flow.ts +105 -25
- package/.pi/extensions/oauth-router/provider.ts +112 -12
- package/.pi/extensions/oauth-router/state.ts +12 -1
- package/.pi/extensions/oauth-router/types.ts +17 -2
- package/.pi/extensions/takomi-runtime/context-panel.ts +153 -28
- package/.pi/extensions/takomi-runtime/index.ts +2 -0
- package/.pi/extensions/takomi-runtime/takomi-stats.js +679 -679
- package/.pi/prompts/build-prompt.md +15 -0
- package/.pi/prompts/genesis-prompt.md +8 -0
- package/.pi/prompts/takomi-prompt.md +16 -0
- package/package.json +7 -5
- package/src/pi-harness.js +53 -6
- package/src/takomi-stats.js +749 -679
|
@@ -11,6 +11,21 @@ Follow the blueprints precisely. Verify constantly.
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## Build Orchestration Readiness
|
|
15
|
+
|
|
16
|
+
If Build is being run through an orchestration session, do not start with bare board placeholders.
|
|
17
|
+
Before dispatching Build subagents, each Build task packet must include:
|
|
18
|
+
- exact FR IDs and mockup files covered
|
|
19
|
+
- objective and concrete scope boundaries
|
|
20
|
+
- dependencies and handoff assumptions
|
|
21
|
+
- expected files/artifacts
|
|
22
|
+
- definition of done and verification commands
|
|
23
|
+
- privacy/payment/security constraints that apply
|
|
24
|
+
|
|
25
|
+
If existing Build task packets say `Scope: None specified`, `Definition Of Done: None specified`, or `Expected Artifacts: None specified`, pause and repair the task packet before launching or continuing subagents.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
14
29
|
## Steps
|
|
15
30
|
|
|
16
31
|
### 1. Context Loading (MANDATORY)
|
|
@@ -138,3 +138,11 @@ Usually recommend:
|
|
|
138
138
|
- make decisive recommendations when the evidence is clear
|
|
139
139
|
- make the output strong enough that design/build can follow without guessing
|
|
140
140
|
- keep FRs and issue files aligned 1:1
|
|
141
|
+
|
|
142
|
+
## Tool-Use Safety for Genesis Artifacts
|
|
143
|
+
- Do not generate PRDs, coding guidelines, builder prompts, issue packs, or session docs by embedding huge markdown strings inside a single `bash` command.
|
|
144
|
+
- Prefer `write` for large markdown artifacts.
|
|
145
|
+
- For many repeated issue files, `write` a compact generator script first, then run that script with `bash`.
|
|
146
|
+
- Use `bash` for short filesystem commands, script execution, and verification only.
|
|
147
|
+
- Avoid massive inline heredocs because they can hit command-length limits and fail before writing anything.
|
|
148
|
+
- If `ENAMETOOLONG` appears, immediately switch to file-based writes or a written generator script; do not retry the same oversized inline command.
|
|
@@ -27,6 +27,22 @@ Always-on Takomi behavior.
|
|
|
27
27
|
- For implementation, verify before claiming completion.
|
|
28
28
|
- For planning/review, produce actionable handoffs rather than vague commentary.
|
|
29
29
|
|
|
30
|
+
## Large Generated Content / Bash Safety
|
|
31
|
+
- Do not place large generated documents or long scripts directly inside a `bash` command.
|
|
32
|
+
- If generating large content, use `write` for individual markdown/text files.
|
|
33
|
+
- If many files need generated content, first `write` a small generator script to disk, then run it with a short `bash` command.
|
|
34
|
+
- Keep `bash` commands short and focused on shell work: directory creation, running scripts, inspections, and verification.
|
|
35
|
+
- Never use massive inline heredocs for multi-file generation; they can fail with OS command-length limits such as `ENAMETOOLONG`, especially on Windows.
|
|
36
|
+
- If a command fails with `ENAMETOOLONG`, do not retry the same inline approach. Switch immediately to file-based writes or a written generator script.
|
|
37
|
+
|
|
38
|
+
## Launch-Ready Orchestration Tasks
|
|
39
|
+
- Never use `takomi_board` as a placeholder task generator for Design or Build stage work.
|
|
40
|
+
- Before `takomi_board init_session` or `takomi_board expand_stage`, author launch-ready task packets or provide full `taskMarkdown` for every non-trivial task.
|
|
41
|
+
- A launch-ready task packet must have non-empty Objective, Scope, Context, Definition of Done, Expected Artifacts, Dependencies, Verification/Review checkpoint, and exact prime-agent files to read.
|
|
42
|
+
- JSON task fields are tracking metadata only; they must not replace the human-readable task packet.
|
|
43
|
+
- If the subagent launch prompt is more detailed than the task packet, copy that launch prompt back into the task packet before or immediately after launch.
|
|
44
|
+
- Do not move to the next lifecycle stage with `Scope: None specified`, `Definition Of Done: None specified`, or `Expected Artifacts: None specified` task files.
|
|
45
|
+
|
|
30
46
|
## Provider / Model Selection
|
|
31
47
|
Before using `takomi_subagent`, setting a model override, or naming a provider/model:
|
|
32
48
|
- use the injected Pi model-registry context and active Takomi routing policy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "takomi",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.30",
|
|
4
4
|
"description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"postinstall": "node src/postinstall.js",
|
|
26
|
-
"test": "
|
|
26
|
+
"test": "node scripts/test-skill-selection.js",
|
|
27
27
|
"test:skills": "node scripts/test-skill-selection.js"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
"author": "J StaR Films Studios",
|
|
46
46
|
"license": "ISC",
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@earendil-works/pi-ai": "^0.78.1",
|
|
49
|
+
"@mariozechner/pi-agent-core": "^0.70.6",
|
|
50
|
+
"@mariozechner/pi-ai": "^0.70.2",
|
|
51
|
+
"@mariozechner/pi-coding-agent": "^0.70.2",
|
|
52
|
+
"@mariozechner/pi-tui": "^0.70.6",
|
|
48
53
|
"commander": "^13.1.0",
|
|
49
54
|
"figlet": "^1.8.0",
|
|
50
55
|
"fs-extra": "^11.3.0",
|
|
@@ -58,11 +63,8 @@
|
|
|
58
63
|
"homepage": "https://github.com/JStaRFilms/VibeCode-Protocol-Suite#readme",
|
|
59
64
|
"devDependencies": {
|
|
60
65
|
"@earendil-works/pi-agent-core": "^0.78.1",
|
|
61
|
-
"@earendil-works/pi-ai": "^0.78.1",
|
|
62
66
|
"@earendil-works/pi-coding-agent": "^0.78.1",
|
|
63
67
|
"@earendil-works/pi-tui": "^0.78.1",
|
|
64
|
-
"@mariozechner/pi-ai": "^0.70.2",
|
|
65
|
-
"@mariozechner/pi-coding-agent": "^0.70.2",
|
|
66
68
|
"@types/node": "^25.5.2",
|
|
67
69
|
"typebox": "^1.1.33",
|
|
68
70
|
"typescript": "^6.0.2"
|
package/src/pi-harness.js
CHANGED
|
@@ -213,6 +213,42 @@ function runCommand(command, args) {
|
|
|
213
213
|
return spawnSync(command, args, { stdio: 'pipe', encoding: 'utf8', shell: process.platform === 'win32' });
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
function runCommandWithTimeout(command, args, timeoutMs) {
|
|
217
|
+
return new Promise((resolve) => {
|
|
218
|
+
let stdout = '';
|
|
219
|
+
let stderr = '';
|
|
220
|
+
let settled = false;
|
|
221
|
+
let timedOut = false;
|
|
222
|
+
|
|
223
|
+
const child = spawn(command, args, {
|
|
224
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
225
|
+
shell: process.platform === 'win32',
|
|
226
|
+
windowsHide: true,
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
const finish = (result) => {
|
|
230
|
+
if (settled) return;
|
|
231
|
+
settled = true;
|
|
232
|
+
clearTimeout(timer);
|
|
233
|
+
resolve({ stdout, stderr, timedOut, ...result });
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const timer = setTimeout(() => {
|
|
237
|
+
timedOut = true;
|
|
238
|
+
try { child.kill(); } catch {}
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
try { child.kill('SIGKILL'); } catch {}
|
|
241
|
+
}, 1500).unref?.();
|
|
242
|
+
}, timeoutMs);
|
|
243
|
+
timer.unref?.();
|
|
244
|
+
|
|
245
|
+
child.stdout?.on('data', (chunk) => { stdout += chunk.toString(); });
|
|
246
|
+
child.stderr?.on('data', (chunk) => { stderr += chunk.toString(); });
|
|
247
|
+
child.on('error', (error) => finish({ status: 1, error }));
|
|
248
|
+
child.on('close', (code) => finish({ status: timedOut ? null : code }));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
216
252
|
export async function ensurePiInstalled() {
|
|
217
253
|
const before = await detectPiCommand();
|
|
218
254
|
if (before.installed) {
|
|
@@ -300,17 +336,28 @@ export function printPiSubagentsInstallResult(result) {
|
|
|
300
336
|
if (result.report) console.log(pc.dim(result.report.split(/\r?\n/).slice(-8).join('\n')));
|
|
301
337
|
}
|
|
302
338
|
|
|
303
|
-
export async function updatePiManagedPackages() {
|
|
339
|
+
export async function updatePiManagedPackages({ timeoutMs = 20_000 } = {}) {
|
|
340
|
+
if (process.env.TAKOMI_SKIP_PI_PACKAGE_UPDATE === '1') {
|
|
341
|
+
return { ok: true, changed: false, report: 'Skipped Pi package update because TAKOMI_SKIP_PI_PACKAGE_UPDATE=1.' };
|
|
342
|
+
}
|
|
343
|
+
|
|
304
344
|
const pi = await detectPiCommand();
|
|
305
345
|
if (!pi.installed) return { ok: false, changed: false, report: 'Pi is not installed.' };
|
|
306
346
|
|
|
307
|
-
// `pi update` reconciles
|
|
308
|
-
//
|
|
309
|
-
//
|
|
310
|
-
// know their names ahead of time.
|
|
347
|
+
// `pi update` reconciles packages from Pi settings, including user-installed
|
|
348
|
+
// npm/git/local packages. Treat this as a best-effort follow-up: third-party
|
|
349
|
+
// packages or manual extension entries must never hang Takomi installation.
|
|
311
350
|
const command = pi.path || 'pi';
|
|
312
|
-
const result =
|
|
351
|
+
const result = await runCommandWithTimeout(command, ['update'], timeoutMs);
|
|
313
352
|
const output = [result.stdout, result.stderr].filter(Boolean).join('\n').trim();
|
|
353
|
+
if (result.timedOut) {
|
|
354
|
+
return {
|
|
355
|
+
ok: false,
|
|
356
|
+
changed: false,
|
|
357
|
+
report: `Timed out after ${Math.round(timeoutMs / 1000)}s while running \`pi update\`. Takomi setup is complete; retry package updates later with \`pi update\` or skip this step with TAKOMI_SKIP_PI_PACKAGE_UPDATE=1. Last output:\n${output}`.trim(),
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
314
361
|
return {
|
|
315
362
|
ok: result.status === 0,
|
|
316
363
|
changed: result.status === 0,
|