@agentshouse/kit 0.2.1-ce3d2bb67177c → 0.2.1-ceeaf32286734
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 +6 -6
- package/dist/acp.js +57 -6
- package/dist/agents.js +6 -9
- package/dist/authority-main.js +2 -2
- package/dist/bridge.js +1 -1
- package/dist/building.js +46 -0
- package/dist/calls.js +11 -3
- package/dist/clis-main.js +2 -2
- package/dist/clis.js +39 -15
- package/dist/connection.js +20 -29
- package/dist/conversations.js +149 -47
- package/dist/end.js +8 -2
- package/dist/events.js +29 -8
- package/dist/files.js +33 -17
- package/dist/git.js +2 -2
- package/dist/house-cli.js +27 -55
- package/dist/house-main.js +3 -3
- package/dist/instructions.js +29 -9
- package/dist/kit-cli.js +2 -2
- package/dist/kit-main.js +3 -3
- package/dist/login.js +3 -1
- package/dist/mcp.js +2 -0
- package/dist/relay.js +21 -0
- package/dist/resident.js +17 -6
- package/dist/scripts.js +255 -0
- package/dist/sign-in.js +3 -2
- package/dist/silence.js +28 -0
- package/dist/skills.js +41 -96
- package/dist/transcription.js +32 -23
- package/dist/update.js +51 -8
- package/package.json +19 -20
- package/dist/bootstrap.json +0 -24
- package/how-we-work.md +0 -33
- package/skills/ask-matt/LICENSE +0 -21
- package/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/skills/ask-matt/SKILL.md +0 -97
- package/skills/ask-matt/agents/openai.yaml +0 -5
- package/skills/code-review/LICENSE +0 -21
- package/skills/code-review/SKILL.md +0 -89
- package/skills/code-review/agents/openai.yaml +0 -3
- package/skills/codebase-design/DEEPENING.md +0 -37
- package/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/skills/codebase-design/LICENSE +0 -21
- package/skills/codebase-design/SKILL.md +0 -114
- package/skills/codebase-design/agents/openai.yaml +0 -3
- package/skills/diagnosing-bugs/LICENSE +0 -21
- package/skills/diagnosing-bugs/SKILL.md +0 -138
- package/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +0 -60
- package/skills/domain-modeling/LICENSE +0 -21
- package/skills/domain-modeling/SKILL.md +0 -74
- package/skills/domain-modeling/agents/openai.yaml +0 -3
- package/skills/grill-me/LICENSE +0 -21
- package/skills/grill-me/SKILL.md +0 -7
- package/skills/grill-me/agents/openai.yaml +0 -5
- package/skills/grill-with-docs/LICENSE +0 -21
- package/skills/grill-with-docs/SKILL.md +0 -7
- package/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/skills/grilling/LICENSE +0 -21
- package/skills/grilling/SKILL.md +0 -30
- package/skills/grilling/agents/openai.yaml +0 -3
- package/skills/handoff/LICENSE +0 -21
- package/skills/handoff/SKILL.md +0 -16
- package/skills/handoff/agents/openai.yaml +0 -5
- package/skills/implement/LICENSE +0 -21
- package/skills/implement/SKILL.md +0 -17
- package/skills/implement/agents/openai.yaml +0 -5
- package/skills/implement-spec/LICENSE +0 -21
- package/skills/implement-spec/SKILL.md +0 -40
- package/skills/implement-spec/agents/openai.yaml +0 -5
- package/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/skills/improve-codebase-architecture/LICENSE +0 -21
- package/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/skills/pr/CREDITS.md +0 -3
- package/skills/pr/LICENSE +0 -21
- package/skills/pr/SKILL.md +0 -170
- package/skills/pr/agents/openai.yaml +0 -3
- package/skills/prototype/LICENSE +0 -21
- package/skills/prototype/LOGIC.md +0 -67
- package/skills/prototype/SKILL.md +0 -26
- package/skills/prototype/UI.md +0 -112
- package/skills/prototype/agents/openai.yaml +0 -3
- package/skills/research/LICENSE +0 -21
- package/skills/research/SKILL.md +0 -12
- package/skills/research/agents/openai.yaml +0 -3
- package/skills/retro/LICENSE +0 -21
- package/skills/retro/SKILL.md +0 -44
- package/skills/retro/agents/openai.yaml +0 -5
- package/skills/tdd/LICENSE +0 -21
- package/skills/tdd/SKILL.md +0 -38
- package/skills/tdd/agents/openai.yaml +0 -3
- package/skills/tdd/mocking.md +0 -59
- package/skills/tdd/tests.md +0 -77
- package/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/skills/teach/LICENSE +0 -21
- package/skills/teach/MISSION-FORMAT.md +0 -31
- package/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/skills/teach/SKILL.md +0 -140
- package/skills/teach/agents/openai.yaml +0 -5
- package/skills/to-questionnaire/LICENSE +0 -21
- package/skills/to-questionnaire/SKILL.md +0 -54
- package/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/skills/to-spec/LICENSE +0 -21
- package/skills/to-spec/SKILL.md +0 -75
- package/skills/to-spec/agents/openai.yaml +0 -5
- package/skills/to-tickets/LICENSE +0 -21
- package/skills/to-tickets/SKILL.md +0 -105
- package/skills/to-tickets/agents/openai.yaml +0 -5
- package/skills/triage/AGENT-BRIEF.md +0 -207
- package/skills/triage/LICENSE +0 -21
- package/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/skills/triage/SKILL.md +0 -112
- package/skills/triage/agents/openai.yaml +0 -5
- package/skills/wait-what/LICENSE +0 -21
- package/skills/wait-what/SKILL.md +0 -7
- package/skills/wait-what/agents/openai.yaml +0 -5
- package/skills/wayfinder/LICENSE +0 -21
- package/skills/wayfinder/SKILL.md +0 -128
- package/skills/wayfinder/agents/openai.yaml +0 -5
- package/skills/wizard/LICENSE +0 -21
- package/skills/wizard/SKILL.md +0 -44
- package/skills/wizard/agents/openai.yaml +0 -3
- package/skills/wizard/template.sh +0 -223
- package/skills/writing-for-agents/LICENSE +0 -21
- package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/skills/writing-for-agents/SKILL.md +0 -81
- package/skills/writing-for-agents/agents/openai.yaml +0 -3
package/dist/silence.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const SYSTEM_CLOCK = {
|
|
2
|
+
later: (delay, callback) => setTimeout(callback, delay),
|
|
3
|
+
clear: (timer) => clearTimeout(timer),
|
|
4
|
+
};
|
|
5
|
+
export class Silence {
|
|
6
|
+
timer = null;
|
|
7
|
+
interval;
|
|
8
|
+
silent;
|
|
9
|
+
clock;
|
|
10
|
+
constructor(interval, silent, clock = SYSTEM_CLOCK) {
|
|
11
|
+
this.interval = interval;
|
|
12
|
+
this.silent = silent;
|
|
13
|
+
this.clock = clock;
|
|
14
|
+
}
|
|
15
|
+
heard() {
|
|
16
|
+
this.stop();
|
|
17
|
+
this.timer = this.clock.later(this.interval, () => {
|
|
18
|
+
this.timer = null;
|
|
19
|
+
this.silent();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
stop() {
|
|
23
|
+
if (this.timer === null)
|
|
24
|
+
return;
|
|
25
|
+
this.clock.clear(this.timer);
|
|
26
|
+
this.timer = null;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/skills.js
CHANGED
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { readFileSync } from 'node:fs';
|
|
3
|
-
import { cp, lstat, mkdir, readdir, realpath, rm, symlink } from 'node:fs/promises';
|
|
1
|
+
import { cp, lstat, mkdir, realpath, rm, symlink, writeFile } from 'node:fs/promises';
|
|
4
2
|
import { homedir } from 'node:os';
|
|
5
3
|
import { join, relative } from 'node:path';
|
|
6
|
-
import {
|
|
4
|
+
import { GUIDE, listSkills } from '@agentshouse/skills';
|
|
7
5
|
import { parse } from 'yaml';
|
|
8
6
|
import { KIT_RELEASE } from './clis.js';
|
|
9
7
|
import { kitHome, readConfiguration, readHome, writeHome } from './home.js';
|
|
10
|
-
import { refusalOf } from './refusals.js';
|
|
11
|
-
const HOW_WE_WORK = '/rooms/private/how-we-work.md';
|
|
12
|
-
const SKILL_SET = fileURLToPath(new URL('../skills/', import.meta.url));
|
|
13
|
-
const HOW_WE_WORK_TEXT = readFileSync(new URL('../how-we-work.md', import.meta.url), 'utf8');
|
|
14
|
-
const SHIPPED_HOW_WE_WORK = [
|
|
15
|
-
'ae4dda60da7b174f22dc5fa9bf07fc27c25864932a74230de4f9f509ddd91f41',
|
|
16
|
-
'0bdcd43e1603ba6673a3cae56d70bbf90657cbeefd124e91a47be2ca1cbd6c93',
|
|
17
|
-
'4106a87ec66da6f7b2a10e74d18e6559d68d5f4fe7415dae68f5c7bdb9081968',
|
|
18
|
-
'ac814a2197038f037b657bb719340395f89f319ac9fcdd386629c3fe2cec68f1',
|
|
19
|
-
'29951ee394aad9979eecfed3e5dc32c2c86e2226b6a380db5dbd4f305f4d1156',
|
|
20
|
-
];
|
|
21
8
|
const RECORD = 'skill-set.json';
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const CHANGED = new Set(['base_revision_stale', 'path_absent']);
|
|
26
|
-
const UNREADABLE = /^(?:\S+: )?(?:path_not_found|room_not_found|operation_denied)\b/;
|
|
27
|
-
const FAILED = /^exit: [1-9]\d*$/;
|
|
28
|
-
const CUT = /^stderr: shell: output_cut (\d+) of \d+ bytes; continue with: (.+)$/;
|
|
9
|
+
const ENTRY = 'SKILL.md';
|
|
10
|
+
const FRONTMATTER = /^---\n([\s\S]*?)\n---\n/u;
|
|
11
|
+
const ORIGIN = '<origin>';
|
|
29
12
|
function skillsDirectory() {
|
|
30
13
|
return join(homedir(), '.agents', 'skills');
|
|
31
14
|
}
|
|
@@ -43,105 +26,67 @@ async function present(path) {
|
|
|
43
26
|
throw error;
|
|
44
27
|
}
|
|
45
28
|
}
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
function skillName(text) {
|
|
30
|
+
const front = FRONTMATTER.exec(text);
|
|
31
|
+
const fields = (front === null ? null : parse(front[1]));
|
|
32
|
+
return typeof fields?.name === 'string' && typeof fields.description === 'string' ? fields.name : undefined;
|
|
33
|
+
}
|
|
34
|
+
function skillSet(origin) {
|
|
35
|
+
const upstream = listSkills().map(({ name, directory }) => ({
|
|
36
|
+
name,
|
|
37
|
+
place: (destination) => cp(directory, destination, { recursive: true }),
|
|
38
|
+
}));
|
|
39
|
+
const pages = GUIDE.flatMap(({ text }) => {
|
|
40
|
+
const name = skillName(text);
|
|
41
|
+
if (name === undefined)
|
|
42
|
+
return [];
|
|
43
|
+
const place = async (destination) => {
|
|
44
|
+
await mkdir(destination);
|
|
45
|
+
await writeFile(join(destination, ENTRY), text.replaceAll(ORIGIN, origin));
|
|
46
|
+
};
|
|
47
|
+
return [{ name, place }];
|
|
48
|
+
});
|
|
49
|
+
return [...upstream, ...pages].sort((left, right) => (left.name < right.name ? -1 : 1));
|
|
50
|
+
}
|
|
51
|
+
async function install(origin) {
|
|
52
|
+
const placed = [];
|
|
53
|
+
for (const skill of skillSet(origin)) {
|
|
54
|
+
if (!(await present(join(skillsDirectory(), skill.name))) && !(await present(join(claudeDirectory(), skill.name)))) {
|
|
55
|
+
placed.push(skill);
|
|
51
56
|
}
|
|
52
57
|
}
|
|
58
|
+
const names = placed.map((skill) => skill.name);
|
|
53
59
|
await writeHome(RECORD, { names });
|
|
54
60
|
await mkdir(skillsDirectory(), { recursive: true });
|
|
55
61
|
await mkdir(claudeDirectory(), { recursive: true });
|
|
56
62
|
const skills = await realpath(skillsDirectory());
|
|
57
63
|
const claude = await realpath(claudeDirectory());
|
|
58
|
-
for (const name of
|
|
59
|
-
await
|
|
64
|
+
for (const { name, place } of placed) {
|
|
65
|
+
await place(join(skillsDirectory(), name));
|
|
60
66
|
if (claude !== skills)
|
|
61
67
|
await symlink(relative(claude, join(skills, name)), join(claudeDirectory(), name));
|
|
62
68
|
}
|
|
63
|
-
await writeHome(RECORD, { version: KIT_RELEASE, names });
|
|
69
|
+
await writeHome(RECORD, { version: KIT_RELEASE, origin, names });
|
|
64
70
|
}
|
|
65
|
-
export async function placeSkillSet() {
|
|
71
|
+
export async function placeSkillSet(origin) {
|
|
66
72
|
try {
|
|
67
|
-
await replaceSkillSet();
|
|
73
|
+
await replaceSkillSet(origin);
|
|
68
74
|
}
|
|
69
75
|
catch (error) {
|
|
70
76
|
process.stderr.write(`kit: the skills could not be placed: ${error.message}\n`);
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
|
-
async function replaceSkillSet() {
|
|
79
|
+
async function replaceSkillSet(origin) {
|
|
74
80
|
const accepted = (await readConfiguration()).skills;
|
|
75
81
|
const installed = await readHome(RECORD);
|
|
76
|
-
if (accepted && installed?.version === KIT_RELEASE)
|
|
82
|
+
if (accepted && installed?.version === KIT_RELEASE && installed.origin === origin)
|
|
77
83
|
return;
|
|
78
84
|
for (const name of installed?.names ?? []) {
|
|
79
85
|
await rm(join(claudeDirectory(), name), { recursive: true, force: true });
|
|
80
86
|
await rm(join(skillsDirectory(), name), { recursive: true, force: true });
|
|
81
87
|
}
|
|
82
88
|
if (accepted)
|
|
83
|
-
await install();
|
|
89
|
+
await install(origin);
|
|
84
90
|
else
|
|
85
91
|
await rm(join(kitHome(), RECORD), { force: true });
|
|
86
92
|
}
|
|
87
|
-
function sha256(text) {
|
|
88
|
-
return createHash('sha256').update(text).digest('hex');
|
|
89
|
-
}
|
|
90
|
-
function cutOf(lines) {
|
|
91
|
-
const cut = CUT.exec(lines[0] ?? '');
|
|
92
|
-
return cut !== null && Buffer.byteLength(lines.slice(1).join('\n')) === Number(cut[1]) ? cut : null;
|
|
93
|
-
}
|
|
94
|
-
export async function readHowWeWork(bridge) {
|
|
95
|
-
let document = '';
|
|
96
|
-
for (let command = `cat ${HOW_WE_WORK}`; command !== undefined;) {
|
|
97
|
-
const read = await bridge.tool('shell', { command });
|
|
98
|
-
const text = read.content.map((content) => content.text).join('\n');
|
|
99
|
-
const lines = text.split('\n');
|
|
100
|
-
if (read.isError === true || (FAILED.test(lines[0] ?? '') && lines[1]?.startsWith('stderr: '))) {
|
|
101
|
-
const refusal = read.isError === true ? text : lines.slice(1).join('\n').replace(/^stderr: /gm, '');
|
|
102
|
-
if (UNREADABLE.test(refusal))
|
|
103
|
-
return '';
|
|
104
|
-
throw new Error(refusal);
|
|
105
|
-
}
|
|
106
|
-
const cut = cutOf(lines);
|
|
107
|
-
document += lines.slice(cut === null ? 0 : 1).join('\n');
|
|
108
|
-
command = cut?.[2];
|
|
109
|
-
}
|
|
110
|
-
return document;
|
|
111
|
-
}
|
|
112
|
-
async function currentRevision(bridge) {
|
|
113
|
-
const inspected = await bridge.tool('inspect', { path: HOW_WE_WORK });
|
|
114
|
-
const text = inspected.content.map((content) => content.text).join('\n');
|
|
115
|
-
if (inspected.isError === true)
|
|
116
|
-
throw new Error(text);
|
|
117
|
-
return parse(text).revisions[0].revision;
|
|
118
|
-
}
|
|
119
|
-
async function edit(bridge, change, kept) {
|
|
120
|
-
const edited = await bridge.tool('edit', { changes: [{ ...change, path: HOW_WE_WORK, content: HOW_WE_WORK_TEXT }] });
|
|
121
|
-
if (edited.isError !== true)
|
|
122
|
-
return 'written';
|
|
123
|
-
const text = edited.content.map((content) => content.text).join('\n');
|
|
124
|
-
const refusal = refusalOf(text);
|
|
125
|
-
if (UNWRITABLE.has(refusal?.code ?? ''))
|
|
126
|
-
return 'unwritable';
|
|
127
|
-
if (refusal?.code === 'edit_conflict' && refusal.conflicts.some((conflict) => kept.has(conflict)))
|
|
128
|
-
return 'kept';
|
|
129
|
-
throw new Error(text);
|
|
130
|
-
}
|
|
131
|
-
export async function createHowWeWork(bridge) {
|
|
132
|
-
if (!(await readConfiguration()).skills || (await readHome(RECORD))?.version === undefined)
|
|
133
|
-
return;
|
|
134
|
-
const current = sha256(HOW_WE_WORK_TEXT);
|
|
135
|
-
if ((await readHome(WRITTEN)) === current)
|
|
136
|
-
return;
|
|
137
|
-
const created = await edit(bridge, { op: 'create' }, PRESENT);
|
|
138
|
-
if (created === 'unwritable')
|
|
139
|
-
return;
|
|
140
|
-
if (created === 'kept') {
|
|
141
|
-
const base = await currentRevision(bridge);
|
|
142
|
-
const held = sha256(await readHowWeWork(bridge));
|
|
143
|
-
if (held !== current && SHIPPED_HOW_WE_WORK.includes(held) && (await edit(bridge, { op: 'replace', base }, CHANGED)) === 'unwritable')
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
await writeHome(WRITTEN, current);
|
|
147
|
-
}
|
package/dist/transcription.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { createReadStream } from 'node:fs';
|
|
3
1
|
import { chmod, mkdir, mkdtemp, readdir, readFile, rename, rm, stat } from 'node:fs/promises';
|
|
4
2
|
import { availableParallelism, tmpdir } from 'node:os';
|
|
5
3
|
import { basename, join } from 'node:path';
|
|
6
|
-
import { pipeline } from 'node:stream/promises';
|
|
7
4
|
import { unlessAborted } from './abort.js';
|
|
5
|
+
import { downloadServed } from './building.js';
|
|
8
6
|
import { failureOf, run } from './clis.js';
|
|
9
7
|
import { downloaded, fetched } from './files.js';
|
|
10
8
|
import { kitHome } from './home.js';
|
|
11
9
|
const RELEASE = 'https://github.com/agentshouse/kit/releases/download/engine-2';
|
|
12
10
|
export const MODEL = {
|
|
13
|
-
|
|
11
|
+
name: 'ggml-parakeet-tdt-0.6b-v3-q4_k.bin',
|
|
12
|
+
from: 'https://huggingface.co/ggml-org/parakeet-GGUF/resolve/35156454d1a39de06863303dd209fd2bed6ee079/ggml-parakeet-tdt-0.6b-v3-q4_k.bin',
|
|
14
13
|
sha256: '8b205b8b39c6535e153de6fb11c51db46125d45c4f16ba496fe41a0fe71b885e',
|
|
14
|
+
bytes: 415_611_879,
|
|
15
15
|
executable: false,
|
|
16
16
|
};
|
|
17
17
|
export const ENGINES = {
|
|
18
18
|
'linux-x64': {
|
|
19
|
-
decoder: {
|
|
20
|
-
engine: {
|
|
19
|
+
decoder: { name: 'ffmpeg-linux-x86_64', from: `${RELEASE}/ffmpeg-linux-x86_64`, sha256: '1f8235d206428305afb89c6e8ab99d100425a0ba61e22bb4c7aff017db8c8de5', bytes: 5_175_832, executable: true },
|
|
20
|
+
engine: { name: 'parakeet-cli-linux-x86_64', from: `${RELEASE}/parakeet-cli-linux-x86_64`, sha256: 'bb2585695992fe1927a33960002cdf51b8a90a96ad65593c3d0a9f1fbc0865c2', bytes: 3_801_616, executable: true },
|
|
21
21
|
},
|
|
22
22
|
'linux-arm64': {
|
|
23
|
-
decoder: {
|
|
24
|
-
engine: {
|
|
23
|
+
decoder: { name: 'ffmpeg-linux-aarch64', from: `${RELEASE}/ffmpeg-linux-aarch64`, sha256: 'a7e08a0fae0179d1078312f6bb13d2a9aa4d4c71a1d82a022953f25dee452f5e', bytes: 4_590_208, executable: true },
|
|
24
|
+
engine: { name: 'parakeet-cli-linux-aarch64', from: `${RELEASE}/parakeet-cli-linux-aarch64`, sha256: 'cbc0bedc8daae97f1ef9dcee4200c06226218e300e0fd62ead1306d22742b7ed', bytes: 3_477_624, executable: true },
|
|
25
25
|
},
|
|
26
26
|
'darwin-arm64': {
|
|
27
|
-
decoder: {
|
|
28
|
-
engine: {
|
|
27
|
+
decoder: { name: 'ffmpeg-darwin-arm64', from: `${RELEASE}/ffmpeg-darwin-arm64`, sha256: '7abe154aaed3d6b49f5167ca7221bb66bed51388925d99a7e4261a41fe52fba6', bytes: 3_696_768, executable: true },
|
|
28
|
+
engine: { name: 'parakeet-cli-darwin-arm64', from: `${RELEASE}/parakeet-cli-darwin-arm64`, sha256: '9a2aafc0922ad7c0b6db6eff1641e96572ba32ac40bf995a1df242ed2febf297', bytes: 1_939_728, executable: true },
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
const CHUNK_SECONDS = 20;
|
|
@@ -46,7 +46,7 @@ function installed(artifact) {
|
|
|
46
46
|
return join(directory(), artifact.sha256);
|
|
47
47
|
}
|
|
48
48
|
async function executed(command, args, signal) {
|
|
49
|
-
// A
|
|
49
|
+
// A decode or a transcription runs as long as its audio needs; the setting turning off or the turn's interrupt or end aborts it instead.
|
|
50
50
|
const ran = await run(command, args, 0, false, signal);
|
|
51
51
|
if (ran.status !== 0)
|
|
52
52
|
throw new Error(failureOf(ran, basename(command)));
|
|
@@ -60,11 +60,6 @@ async function threads() {
|
|
|
60
60
|
const allowed = quota === 'max' ? Infinity : Math.ceil(Number(quota) / Number(period));
|
|
61
61
|
return Math.max(1, Math.floor(Math.min(availableParallelism(), allowed) / 2));
|
|
62
62
|
}
|
|
63
|
-
async function sha256(path) {
|
|
64
|
-
const hash = createHash('sha256');
|
|
65
|
-
await pipeline(createReadStream(path), hash);
|
|
66
|
-
return hash.digest('hex');
|
|
67
|
-
}
|
|
68
63
|
function causeOf(error) {
|
|
69
64
|
return error instanceof Error ? error.message : String(error);
|
|
70
65
|
}
|
|
@@ -85,6 +80,25 @@ function ready() {
|
|
|
85
80
|
function pinnedHere() {
|
|
86
81
|
return ENGINES[`${process.platform}-${process.arch}`];
|
|
87
82
|
}
|
|
83
|
+
const DOWNLOADS = 3;
|
|
84
|
+
async function downloadedAgain(artifact, signal) {
|
|
85
|
+
// An artifact arrives at a hundred kilobytes a second or its download ends, so a stalled Building cannot hold the install open.
|
|
86
|
+
const deadlineMs = Math.ceil(artifact.bytes / 100);
|
|
87
|
+
const deadline = AbortSignal.timeout(deadlineMs);
|
|
88
|
+
for (let attempt = 1;; attempt++) {
|
|
89
|
+
try {
|
|
90
|
+
return await downloadServed(artifact.name, artifact.sha256, `${installed(artifact)}.part`, AbortSignal.any([signal, deadline]), artifact.bytes);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (signal.aborted)
|
|
94
|
+
throw error;
|
|
95
|
+
if (deadline.aborted)
|
|
96
|
+
throw new Error(`${artifact.name} did not arrive within ${Math.ceil(deadlineMs / 1000)} seconds`);
|
|
97
|
+
if (attempt === DOWNLOADS)
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
88
102
|
async function install(artifacts, signal) {
|
|
89
103
|
await mkdir(directory(), { recursive: true });
|
|
90
104
|
const pinned = new Set(artifacts.map((artifact) => artifact.sha256));
|
|
@@ -97,13 +111,8 @@ async function install(artifacts, signal) {
|
|
|
97
111
|
if (!(await present(installed(artifact))))
|
|
98
112
|
missing.push(artifact);
|
|
99
113
|
try {
|
|
100
|
-
for (const artifact of missing)
|
|
101
|
-
|
|
102
|
-
// Three retries carry a large download past a dropped connection before the download fails.
|
|
103
|
-
await executed('curl', ['-fsSL', '--retry', '3', '-o', part, artifact.url], signal);
|
|
104
|
-
if ((await sha256(part)) !== artifact.sha256)
|
|
105
|
-
throw new Error(`${artifact.url} does not match its sha256`);
|
|
106
|
-
}
|
|
114
|
+
for (const artifact of missing)
|
|
115
|
+
await downloadedAgain(artifact, signal);
|
|
107
116
|
for (const artifact of missing) {
|
|
108
117
|
if (artifact.executable)
|
|
109
118
|
await chmod(`${installed(artifact)}.part`, 0o755);
|
package/dist/update.js
CHANGED
|
@@ -6,6 +6,13 @@ import { join } from 'node:path';
|
|
|
6
6
|
import { run } from './clis.js';
|
|
7
7
|
import { kitHome, workspaceRoot } from './home.js';
|
|
8
8
|
import { service, throughSudo } from './placement.js';
|
|
9
|
+
import { relayed } from './relay.js';
|
|
10
|
+
const BOOTSTRAP_BYTES = 1_000_000;
|
|
11
|
+
// A bootstrap is at most a million bytes, so two minutes carry it over ten kilobytes a second and no stalled host holds the update queue.
|
|
12
|
+
const BOOTSTRAP_MS = 120_000;
|
|
13
|
+
// A bootstrap's downloads and CLI updates take minutes, so one still running after an hour has hung and is ended before it keeps the Kit offline.
|
|
14
|
+
const RERUN_MS = 60 * 60_000;
|
|
15
|
+
const TIMED_OUT = '124';
|
|
9
16
|
function directory() {
|
|
10
17
|
return join(kitHome(), 'update');
|
|
11
18
|
}
|
|
@@ -31,7 +38,7 @@ function placement() {
|
|
|
31
38
|
return service() === 'user' ? ['--workspace', workspaceRoot()] : ['--linux'];
|
|
32
39
|
}
|
|
33
40
|
function record() {
|
|
34
|
-
return `outcome=$1; shift; bash "$0" "$@"; printf %s "$?" > "$outcome"; ${[...elevated(), 'systemctl', ...manager(), 'start', 'house-kit.service'].join(' ')}`;
|
|
41
|
+
return `outcome=$1; shift; timeout ${RERUN_MS / 1000} bash "$0" "$@"; printf %s "$?" > "$outcome"; ${[...elevated(), 'systemctl', ...manager(), 'start', 'house-kit.service'].join(' ')}`;
|
|
35
42
|
}
|
|
36
43
|
async function pendingCall() {
|
|
37
44
|
try {
|
|
@@ -45,6 +52,8 @@ async function recorded() {
|
|
|
45
52
|
const status = await readFile(outcome(), 'utf8').catch(() => null);
|
|
46
53
|
if (status === null)
|
|
47
54
|
return null;
|
|
55
|
+
if (status.trim() === TIMED_OUT)
|
|
56
|
+
return { refused: `the Kit bootstrap did not finish within ${RERUN_MS / 1000} seconds` };
|
|
48
57
|
return status.trim() === '0' ? {} : { refused: `the Kit bootstrap exited with ${status.trim()}` };
|
|
49
58
|
}
|
|
50
59
|
async function forget(callId) {
|
|
@@ -66,6 +75,17 @@ async function finished(callId) {
|
|
|
66
75
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
67
76
|
}
|
|
68
77
|
}
|
|
78
|
+
async function bounded(body, most) {
|
|
79
|
+
const chunks = [];
|
|
80
|
+
let bytes = 0;
|
|
81
|
+
for await (const chunk of body ?? []) {
|
|
82
|
+
bytes += chunk.length;
|
|
83
|
+
if (bytes > most)
|
|
84
|
+
return null;
|
|
85
|
+
chunks.push(chunk);
|
|
86
|
+
}
|
|
87
|
+
return Buffer.concat(chunks, bytes);
|
|
88
|
+
}
|
|
69
89
|
function rerun(script, callId, flags) {
|
|
70
90
|
return new Promise((resolve) => {
|
|
71
91
|
const [command, ...args] = [
|
|
@@ -94,9 +114,12 @@ function rerun(script, callId, flags) {
|
|
|
94
114
|
}
|
|
95
115
|
export class KitUpdate {
|
|
96
116
|
calls;
|
|
117
|
+
changed;
|
|
118
|
+
waiting = new Map();
|
|
97
119
|
queue = Promise.resolve();
|
|
98
|
-
constructor(calls) {
|
|
120
|
+
constructor(calls, changed) {
|
|
99
121
|
this.calls = calls;
|
|
122
|
+
this.changed = changed;
|
|
100
123
|
}
|
|
101
124
|
async resumed() {
|
|
102
125
|
const callId = await pendingCall();
|
|
@@ -104,8 +127,17 @@ export class KitUpdate {
|
|
|
104
127
|
return;
|
|
105
128
|
await this.enqueue(callId, () => finished(callId));
|
|
106
129
|
}
|
|
107
|
-
|
|
108
|
-
|
|
130
|
+
hold(call) {
|
|
131
|
+
this.waiting.set(call.input_id, call);
|
|
132
|
+
this.changed();
|
|
133
|
+
}
|
|
134
|
+
held() {
|
|
135
|
+
return this.waiting.size > 0;
|
|
136
|
+
}
|
|
137
|
+
apply(resume) {
|
|
138
|
+
const held = [...this.waiting.values()];
|
|
139
|
+
this.waiting.clear();
|
|
140
|
+
void Promise.all(held.map((call) => this.enqueue(call.input_id, () => this.carry(call)))).then(resume);
|
|
109
141
|
}
|
|
110
142
|
enqueue(callId, work) {
|
|
111
143
|
const before = this.queue;
|
|
@@ -119,10 +151,21 @@ export class KitUpdate {
|
|
|
119
151
|
async carry(call) {
|
|
120
152
|
if ((await pendingCall()) === call.input_id)
|
|
121
153
|
return finished(call.input_id);
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
154
|
+
const deadline = AbortSignal.timeout(BOOTSTRAP_MS);
|
|
155
|
+
let script;
|
|
156
|
+
try {
|
|
157
|
+
const answer = await fetch(relayed(call.bootstrap), { signal: deadline });
|
|
158
|
+
if (!answer.ok)
|
|
159
|
+
return { refused: `the Kit bootstrap could not be downloaded: ${answer.status}` };
|
|
160
|
+
script = await bounded(answer.body, BOOTSTRAP_BYTES);
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
if (!deadline.aborted)
|
|
164
|
+
throw error;
|
|
165
|
+
return { refused: `the Kit bootstrap did not arrive within ${BOOTSTRAP_MS / 1000} seconds` };
|
|
166
|
+
}
|
|
167
|
+
if (script === null)
|
|
168
|
+
return { refused: `the Kit bootstrap is larger than ${BOOTSTRAP_BYTES} bytes` };
|
|
126
169
|
if (createHash('sha256').update(script).digest('hex') !== call.sha256) {
|
|
127
170
|
return { refused: 'the Kit bootstrap does not match its sha256' };
|
|
128
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/kit",
|
|
3
|
-
"version": "0.2.1-
|
|
3
|
+
"version": "0.2.1-ceeaf32286734",
|
|
4
4
|
"description": "Kit connects an Environment to agents.house.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,28 +12,27 @@
|
|
|
12
12
|
"kit": "dist/kit-main.js",
|
|
13
13
|
"house": "dist/house-main.js"
|
|
14
14
|
},
|
|
15
|
-
"exports": {
|
|
16
|
-
"./bootstrap": "./dist/bootstrap.json"
|
|
17
|
-
},
|
|
18
15
|
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
"how-we-work.md",
|
|
21
|
-
"skills"
|
|
16
|
+
"dist"
|
|
22
17
|
],
|
|
23
18
|
"scripts": {
|
|
24
|
-
"
|
|
19
|
+
"bootstrap-manifest": "node scripts/bootstrap-manifest.mjs",
|
|
20
|
+
"build": "tsc -p tsconfig.build.json",
|
|
25
21
|
"engine": "mkdir -p tmp/engine && docker run --rm -v \"$PWD:/kit\" -w /kit alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6 sh scripts/engine.sh tmp/engine",
|
|
26
|
-
"
|
|
22
|
+
"follow-skills": "node scripts/follow-skills.mjs",
|
|
23
|
+
"release-files": "node scripts/release-files.mjs",
|
|
27
24
|
"test": "tsc -p tsconfig.json && vitest run"
|
|
28
25
|
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@agentclientprotocol/sdk": "
|
|
31
|
-
"@agentshouse/mdmodel": "0.1.0-
|
|
27
|
+
"@agentclientprotocol/sdk": "2.0.1",
|
|
28
|
+
"@agentshouse/mdmodel": "0.1.0-c4f4d37bc9d6a",
|
|
29
|
+
"@agentshouse/skills": "0.1.0-c27d55a17e1d8",
|
|
30
|
+
"@lydell/node-pty": "1.2.0-beta.15",
|
|
32
31
|
"yaml": "2.9.1"
|
|
33
32
|
},
|
|
34
33
|
"peerDependencies": {
|
|
35
|
-
"@agentclientprotocol/claude-agent-acp": "0.
|
|
36
|
-
"@agentclientprotocol/codex-acp": "2.
|
|
34
|
+
"@agentclientprotocol/claude-agent-acp": "0.94.0",
|
|
35
|
+
"@agentclientprotocol/codex-acp": "2.2.2"
|
|
37
36
|
},
|
|
38
37
|
"peerDependenciesMeta": {
|
|
39
38
|
"@agentclientprotocol/claude-agent-acp": {
|
|
@@ -44,26 +43,26 @@
|
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@types/node": "24.
|
|
46
|
+
"@types/node": "24.19.2",
|
|
48
47
|
"@types/ws": "8.18.2",
|
|
49
48
|
"typescript": "7.0.2",
|
|
50
|
-
"vitest": "5.0.
|
|
49
|
+
"vitest": "5.0.5",
|
|
51
50
|
"ws": "8.22.0"
|
|
52
51
|
},
|
|
53
|
-
"packageManager": "npm@11.19.
|
|
52
|
+
"packageManager": "npm@11.19.1",
|
|
54
53
|
"engines": {
|
|
55
|
-
"node": "24.
|
|
56
|
-
"npm": "11.19.
|
|
54
|
+
"node": "24.22.1",
|
|
55
|
+
"npm": "11.19.1"
|
|
57
56
|
},
|
|
58
57
|
"devEngines": {
|
|
59
58
|
"runtime": {
|
|
60
59
|
"name": "node",
|
|
61
|
-
"version": "24.
|
|
60
|
+
"version": "24.22.1",
|
|
62
61
|
"onFail": "error"
|
|
63
62
|
},
|
|
64
63
|
"packageManager": {
|
|
65
64
|
"name": "npm",
|
|
66
|
-
"version": "11.19.
|
|
65
|
+
"version": "11.19.1",
|
|
67
66
|
"onFail": "error"
|
|
68
67
|
}
|
|
69
68
|
}
|
package/dist/bootstrap.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"version": "0.2.1-ce3d2bb67177c",
|
|
4
|
-
"hosts": {
|
|
5
|
-
"macos": {
|
|
6
|
-
"asset": {
|
|
7
|
-
"name": "connect-linux.sh",
|
|
8
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ce3d2bb67177c/connect-linux.sh"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"linux": {
|
|
12
|
-
"asset": {
|
|
13
|
-
"name": "connect-linux.sh",
|
|
14
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ce3d2bb67177c/connect-linux.sh"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"windows": {
|
|
18
|
-
"asset": {
|
|
19
|
-
"name": "connect-windows.ps1",
|
|
20
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.2.1-ce3d2bb67177c/connect-windows.ps1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
package/how-we-work.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# How we work
|
|
2
|
-
|
|
3
|
-
A Room is where information people share is kept; it is not the place for
|
|
4
|
-
private information. Work goes into the Room it belongs to, or the First Room
|
|
5
|
-
when none is named.
|
|
6
|
-
|
|
7
|
-
Every House answer carries the `url` of what it names; send the User that link.
|
|
8
|
-
|
|
9
|
-
The skills are already set up; never run `setup-matt-pocock-skills`.
|
|
10
|
-
|
|
11
|
-
## Where skill output goes
|
|
12
|
-
|
|
13
|
-
- Glossary (`GLOSSARY.md`): `glossary.md`
|
|
14
|
-
- Decisions (ADRs): `decisions/NNNN-<slug>.md`
|
|
15
|
-
- Plan (spec): `projects/<name>/plan.md`
|
|
16
|
-
- Tasks (tickets): `projects/<name>/tasks/NN-<slug>.md`, with a
|
|
17
|
-
`Status:` line (`needs-triage`, `needs-info`, `ready-for-agent`,
|
|
18
|
-
`ready-for-human`, `wontfix`, or `done` once implemented), a
|
|
19
|
-
`Category:` line (`bug`, `enhancement`), a `Blocked by:` line and comments
|
|
20
|
-
under `## Comments`; triage takes no pull requests
|
|
21
|
-
- Rejected requests (triage): `out-of-scope/<concept>.md`
|
|
22
|
-
- Implementation notes (implement-spec): `projects/<name>/notes/`
|
|
23
|
-
- PR bodies (pr): `projects/<name>/prs/<branch>.md`
|
|
24
|
-
- Map (Wayfinding): `projects/<name>/map.md`, its tasks under
|
|
25
|
-
`tasks/` with `Type:`, `Status: claimed|resolved` and `Blocked by:` lines
|
|
26
|
-
- Research: `research/<slug>.md`
|
|
27
|
-
- Architecture reports (improve-codebase-architecture): `architecture/<slug>.html`
|
|
28
|
-
- Handoffs: `handoffs/<slug>.md`
|
|
29
|
-
- Questionnaires: `questionnaires/<slug>.md`
|
|
30
|
-
- Retrospectives (retro): `retros/<date>-<slug>.md`
|
|
31
|
-
- Wizards: `wizards/<slug>.sh`; the values they capture stay out of the Room
|
|
32
|
-
- Learning: `learning/<topic>/`
|
|
33
|
-
- Prototype: one HTML file with every variant on one page.
|
package/skills/ask-matt/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Matt Pocock
|
|
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.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Phase boundaries
|
|
2
|
-
|
|
3
|
-
A **phase** is a chunk of work inside a session: the grilling, the implementation, the QA. The definition is fuzzy on purpose: a phase ends when you think *"ok, we're done with that"*.
|
|
4
|
-
|
|
5
|
-
The **phase boundary** is the gap between two phases, and it is the only place this decision belongs. Mid-phase there is no decision to make: continue, or split the work that's left into subagents. Compacting mid-phase makes the agent lose the thread.
|
|
6
|
-
|
|
7
|
-
## The five options
|
|
8
|
-
|
|
9
|
-
| Option | What it does |
|
|
10
|
-
| ------------ | --------------------------------------------------------------- |
|
|
11
|
-
| **Continue** | Stay in the session. No context switch at all. |
|
|
12
|
-
| **`/clear`** | Empty the context window and start from nothing. |
|
|
13
|
-
| **`/handoff`** | Write a portable markdown file and seed a session anywhere with it. |
|
|
14
|
-
| **Subagent** | Send the task to its own context window and get a report back. |
|
|
15
|
-
| **`/compact`** | Compress this context and seed a fresh session with the summary. |
|
|
16
|
-
|
|
17
|
-
## The tree
|
|
18
|
-
|
|
19
|
-
Work top to bottom at the boundary. The first **yes** wins.
|
|
20
|
-
|
|
21
|
-
**1. Can you continue in this session?** Two things make the answer yes: the next phase needs this phase as a **primary source**, or you have enough [smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone) left (~150k tokens) for the next phase to fit. Grilling → implementation is the standard yes: the implementation wants the reasoning verbatim, not a summary of it. Continue costs nothing and loses nothing, so rule it out before anything else.
|
|
22
|
-
|
|
23
|
-
**2. Is the context irrelevant to what comes next?** Is everything in this session (the exploration, the decisions, the dead ends) disposable? If so, **`/clear`**. It is the cheapest move on the board: it takes no time and hands back the whole window. `/clear` also isn't terminal: the old session stays resumable.
|
|
24
|
-
|
|
25
|
-
The cost of getting this wrong is one-way. Clear a *relevant* context and you lose the **why** behind what you built, and no amount of reading the diff back gets it returned.
|
|
26
|
-
|
|
27
|
-
**3. Do you need to hand off?** `/handoff` is narrow. You need it only when you are:
|
|
28
|
-
|
|
29
|
-
- swapping to a **new harness** (Claude → Codex),
|
|
30
|
-
- moving to a **new directory** or repo,
|
|
31
|
-
- sending the work to a **colleague**,
|
|
32
|
-
- or forking a side task you found **mid-phase** without derailing what you're doing.
|
|
33
|
-
|
|
34
|
-
That list is the whole clause. What `/handoff` buys is **portability**: a file that travels. If nothing is travelling, you don't need it.
|
|
35
|
-
|
|
36
|
-
**4. Can the task be done AFK?** Is it scoped tightly enough to run with you away from the keyboard, no steering? Then send it to a **subagent** and leave this session untouched. Automated review is the standard case: the agent reads the diff and reports, and you aren't needed while it does.
|
|
37
|
-
|
|
38
|
-
**5. Otherwise, `/compact`.** Relevant context, same harness, same directory, and you need to stay in the loop: this is where the tree lands, and it lands here often. Pass it an instruction (`/compact we're going to QA this area`) so the summary keeps what the next phase needs.
|
|
39
|
-
|
|
40
|
-
`/compact` is the **default, not the first reach**. It sits at the bottom because the four questions above it are all cheaper or more precise. The failure mode when people start here is a fresh session that is confidently wrong about a decision the summary flattened.
|
|
41
|
-
|
|
42
|
-
## Primary and secondary sources
|
|
43
|
-
|
|
44
|
-
Every move except **Continue** turns a **primary source** into a **secondary source**: the session as it happened, replaced by a summary of it. The trade is always the same shape:
|
|
45
|
-
|
|
46
|
-
| Source | Information | Noise | Room to move |
|
|
47
|
-
| --------------------------------- | ----------- | ----- | ------------ |
|
|
48
|
-
| Primary (Continue) | Full | Lots | Little |
|
|
49
|
-
| Secondary (`/compact`, `/handoff`) | Lossy | Less | Lots |
|
|
50
|
-
|
|
51
|
-
This is why question 1 comes first. You only pay the lossiness when staying costs more than it saves.
|
|
52
|
-
|
|
53
|
-
## These are judgement calls
|
|
54
|
-
|
|
55
|
-
The questions are not objective: each has taste in it, and the same boundary can go two ways on two days. The value is in asking them **in order**, at the boundary rather than in the middle of the work.
|