@agentshouse/kit 0.1.0-alpha.24 → 0.1.0-alpha.26
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 +93 -27
- package/bin/connect-linux.sh +108 -6
- package/bootstrap.json +3 -3
- package/package.json +1 -1
- package/src/adapter-mcp.js +23 -1
- package/src/bridge.js +4 -0
- package/src/configuration.js +4 -0
- package/src/directory.js +6 -26
- package/src/how-we-work.md +25 -0
- package/src/launcher.js +11 -4
- package/src/mcp.js +5 -0
- package/src/skill-set/ask-matt/PHASE-BOUNDARIES.md +55 -0
- package/src/skill-set/ask-matt/SKILL.md +91 -0
- package/src/skill-set/ask-matt/agents/openai.yaml +4 -0
- package/src/skill-set/code-review/LICENSE +21 -0
- package/src/skill-set/code-review/SKILL.md +89 -0
- package/src/skill-set/code-review/agents/openai.yaml +3 -0
- package/src/skill-set/codebase-design/DEEPENING.md +37 -0
- package/src/skill-set/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/src/skill-set/codebase-design/LICENSE +21 -0
- package/src/skill-set/codebase-design/SKILL.md +116 -0
- package/src/skill-set/codebase-design/agents/openai.yaml +3 -0
- package/src/skill-set/diagnosing-bugs/LICENSE +21 -0
- package/src/skill-set/diagnosing-bugs/SKILL.md +140 -0
- package/src/skill-set/diagnosing-bugs/agents/openai.yaml +3 -0
- package/src/skill-set/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/src/skill-set/domain-modeling/ADR-FORMAT.md +47 -0
- package/src/skill-set/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/src/skill-set/domain-modeling/LICENSE +21 -0
- package/src/skill-set/domain-modeling/SKILL.md +76 -0
- package/src/skill-set/domain-modeling/agents/openai.yaml +3 -0
- package/src/skill-set/grill-me/LICENSE +21 -0
- package/src/skill-set/grill-me/SKILL.md +8 -0
- package/src/skill-set/grill-me/agents/openai.yaml +4 -0
- package/src/skill-set/grill-with-docs/LICENSE +21 -0
- package/src/skill-set/grill-with-docs/SKILL.md +8 -0
- package/src/skill-set/grill-with-docs/agents/openai.yaml +4 -0
- package/src/skill-set/grilling/LICENSE +21 -0
- package/src/{starter-set → skill-set}/grilling/SKILL.md +1 -1
- package/src/skill-set/handoff/LICENSE +21 -0
- package/src/skill-set/handoff/SKILL.md +17 -0
- package/src/skill-set/handoff/agents/openai.yaml +4 -0
- package/src/skill-set/implement/LICENSE +21 -0
- package/src/skill-set/implement/SKILL.md +16 -0
- package/src/skill-set/implement/agents/openai.yaml +4 -0
- package/src/skill-set/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/src/skill-set/improve-codebase-architecture/LICENSE +21 -0
- package/src/skill-set/improve-codebase-architecture/SKILL.md +72 -0
- package/src/skill-set/improve-codebase-architecture/agents/openai.yaml +4 -0
- package/src/skill-set/prototype/LICENSE +21 -0
- package/src/skill-set/prototype/LOGIC.md +67 -0
- package/src/skill-set/prototype/SKILL.md +28 -0
- package/src/skill-set/prototype/UI.md +112 -0
- package/src/skill-set/prototype/agents/openai.yaml +3 -0
- package/src/skill-set/research/LICENSE +21 -0
- package/src/skill-set/research/SKILL.md +14 -0
- package/src/skill-set/research/agents/openai.yaml +3 -0
- package/src/skill-set/resolving-merge-conflicts/LICENSE +21 -0
- package/src/skill-set/resolving-merge-conflicts/SKILL.md +16 -0
- package/src/skill-set/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/src/skill-set/tdd/LICENSE +21 -0
- package/src/skill-set/tdd/SKILL.md +40 -0
- package/src/skill-set/tdd/agents/openai.yaml +3 -0
- package/src/skill-set/tdd/mocking.md +59 -0
- package/src/skill-set/tdd/tests.md +77 -0
- package/src/skill-set/teach/GLOSSARY-FORMAT.md +35 -0
- package/src/skill-set/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/src/skill-set/teach/LICENSE +21 -0
- package/src/skill-set/teach/MISSION-FORMAT.md +31 -0
- package/src/skill-set/teach/RESOURCES-FORMAT.md +32 -0
- package/src/skill-set/teach/SKILL.md +141 -0
- package/src/skill-set/teach/agents/openai.yaml +4 -0
- package/src/skill-set/to-questionnaire/LICENSE +21 -0
- package/src/skill-set/to-questionnaire/SKILL.md +55 -0
- package/src/skill-set/to-questionnaire/agents/openai.yaml +4 -0
- package/src/skill-set/to-spec/LICENSE +21 -0
- package/src/skill-set/to-spec/SKILL.md +76 -0
- package/src/skill-set/to-spec/agents/openai.yaml +4 -0
- package/src/skill-set/to-tickets/LICENSE +21 -0
- package/src/skill-set/to-tickets/SKILL.md +106 -0
- package/src/skill-set/to-tickets/agents/openai.yaml +4 -0
- package/src/skill-set/wait-what/LICENSE +21 -0
- package/src/skill-set/wait-what/SKILL.md +8 -0
- package/src/skill-set/wait-what/agents/openai.yaml +4 -0
- package/src/skill-set/wayfinder/LICENSE +21 -0
- package/src/skill-set/wayfinder/SKILL.md +129 -0
- package/src/skill-set/wayfinder/agents/openai.yaml +4 -0
- package/src/skill-set/writing-for-agents/LICENSE +21 -0
- package/src/skill-set/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/src/skill-set/writing-for-agents/SKILL.md +83 -0
- package/src/skill-set/writing-for-agents/agents/openai.yaml +3 -0
- package/src/skill-set.js +85 -0
- package/src/worker.js +20 -8
- package/src/starter-set.js +0 -17
- /package/src/{starter-set/grilling → skill-set/ask-matt}/LICENSE +0 -0
- /package/src/{starter-set → skill-set}/grilling/agents/openai.yaml +0 -0
package/README.md
CHANGED
|
@@ -4,15 +4,38 @@ House Kit is a public package repository. Product development is planned and
|
|
|
4
4
|
coordinated in the [Agents House repository](https://github.com/trof3039/agents.house);
|
|
5
5
|
this repository contains only the package source and its operator documentation.
|
|
6
6
|
|
|
7
|
+
The Skill set Kit installs is Matt Pocock's
|
|
8
|
+
[`mattpocock/skills`](https://github.com/mattpocock/skills); thank you, Matt.
|
|
9
|
+
|
|
7
10
|
## Connect a Linux computer
|
|
8
11
|
|
|
9
|
-
On Linux `amd64` or `arm64
|
|
10
|
-
versioned bootstrap once:
|
|
12
|
+
On Linux `amd64` or `arm64`, run the published, versioned bootstrap once:
|
|
11
13
|
|
|
12
14
|
```sh
|
|
13
|
-
bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.
|
|
15
|
+
bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.26/connect-linux.sh)
|
|
14
16
|
```
|
|
15
17
|
|
|
18
|
+
The bootstrap first establishes Docker Engine from what it observes on the
|
|
19
|
+
computer. A Docker Engine that already answers is used as it is, on any
|
|
20
|
+
distribution. On Ubuntu 22.04, 24.04 or 26.04 LTS it follows Docker's
|
|
21
|
+
[apt repository recipe](https://docs.docker.com/engine/install/ubuntu/) for
|
|
22
|
+
whatever is missing: it installs `docker-ce`, `docker-ce-cli`,
|
|
23
|
+
`containerd.io`, `docker-buildx-plugin` and `docker-compose-plugin` from
|
|
24
|
+
`download.docker.com`, starts the `docker` service when it is stopped and adds
|
|
25
|
+
the account to the `docker` group. Every such step runs through `sudo`, which
|
|
26
|
+
asks for the password as it ordinarily does. A new group membership applies
|
|
27
|
+
from the account's next sign-in, so the invocation that grants it reaches
|
|
28
|
+
Docker Engine through `sudo` for the rest of its own run; a later invocation
|
|
29
|
+
from a session older than the membership is refused until the account signs
|
|
30
|
+
out and back in. The bootstrap refuses an Ubuntu computer whose installed
|
|
31
|
+
`docker.io`, `docker-compose`, `docker-compose-v2`, `docker-doc`,
|
|
32
|
+
`docker-buildx`, `podman-docker`, `containerd` or `runc` package conflicts with
|
|
33
|
+
that recipe rather than removing it. Any other distribution needs a working
|
|
34
|
+
Docker Engine supplied by its owner, and without one the bootstrap stops with
|
|
35
|
+
that missing prerequisite. A step that fails names its cause and changes
|
|
36
|
+
nothing further; running the same bootstrap again continues from the state it
|
|
37
|
+
left, including after a restart.
|
|
38
|
+
|
|
16
39
|
The release asset pins one immutable multi-architecture image digest. It creates
|
|
17
40
|
owner-protected `~/.house-kit` and `~/AgentsHouse`, mounts those as the complete
|
|
18
41
|
Kit home and `/agents/house`, enrolls through House Login in the host browser,
|
|
@@ -20,7 +43,10 @@ and starts the container with Docker's `unless-stopped` lifecycle. Pass
|
|
|
20
43
|
`--workspace /absolute/path` for one other workspace root or `--manual` for
|
|
21
44
|
the existing URL and one-time-code login route. `--house <origin>` selects
|
|
22
45
|
another House and is retained in Kit home. A repeated invocation reuses the
|
|
23
|
-
same container, credential and Environment.
|
|
46
|
+
same container, credential and Environment. Every invocation that is not a
|
|
47
|
+
forwarded command also sets `skills` in Kit's configuration: `--no-skills`
|
|
48
|
+
declines [the Skill set](#the-skill-set) and an invocation without it accepts
|
|
49
|
+
the set again.
|
|
24
50
|
|
|
25
51
|
Running a newer release's bootstrap the same way is the only update. When the
|
|
26
52
|
installed container runs another image, the bootstrap pulls this release's
|
|
@@ -207,7 +233,8 @@ never printed by Kit.
|
|
|
207
233
|
"settings": "/home/ada/.claude/settings.json"
|
|
208
234
|
}
|
|
209
235
|
],
|
|
210
|
-
"host": null
|
|
236
|
+
"host": null,
|
|
237
|
+
"skills": true
|
|
211
238
|
}
|
|
212
239
|
```
|
|
213
240
|
|
|
@@ -234,6 +261,11 @@ service owns the command that produces it.
|
|
|
234
261
|
no capacity; the section is required like the others, so a host is measured only
|
|
235
262
|
where the Environment owner says so.
|
|
236
263
|
|
|
264
|
+
`skills` is this Environment's choice of [the Skill set](#the-skill-set):
|
|
265
|
+
`true` accepts it and `false` declines it. A configuration that omits it
|
|
266
|
+
accepts the set. The bootstrap writes it on every invocation that is not a
|
|
267
|
+
forwarded command.
|
|
268
|
+
|
|
237
269
|
`clients` is the local Agent client catalogue and never leaves the installation.
|
|
238
270
|
Each entry names one client whose lifecycle hook configuration this Kit
|
|
239
271
|
reconciles: `kind` is `claude-code`, the one client this Kit installs a hook
|
|
@@ -375,7 +407,8 @@ them all, and no instance can read another's provider credential.
|
|
|
375
407
|
}
|
|
376
408
|
],
|
|
377
409
|
"clients": [],
|
|
378
|
-
"host": null
|
|
410
|
+
"host": null,
|
|
411
|
+
"skills": false
|
|
379
412
|
}
|
|
380
413
|
```
|
|
381
414
|
|
|
@@ -633,27 +666,12 @@ inside `/agents/house` is somebody else's default or an owner's own workspace,
|
|
|
633
666
|
never this Agent's. Every path that is not this exact equality, one deeper
|
|
634
667
|
inside `/agents/house` included, must
|
|
635
668
|
already exist in this Environment as a directory the installation can enter;
|
|
636
|
-
Kit never creates
|
|
637
|
-
|
|
638
|
-
When the Agent's own default directory is absent, Kit
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
directory and uses the directory the winner put there, so the pair still leaves
|
|
643
|
-
one complete directory and nothing partial. A present default directory -
|
|
644
|
-
including one whose starter files the owner edited or removed - launches
|
|
645
|
-
exactly as it is, and a deleted default directory is recreated with a fresh
|
|
646
|
-
starter set on its next launch.
|
|
647
|
-
|
|
648
|
-
The starter set is `AGENTS.md` with the single line ``The agents.house `house`
|
|
649
|
-
CLI is available: run `house --help`.``, `CLAUDE.md` as a relative symbolic link to it, `.agents/skills/grilling/`
|
|
650
|
-
vendored from [`mattpocock/skills`](https://github.com/mattpocock/skills)
|
|
651
|
-
`skills/productivity/grilling` at a pinned commit with its MIT license and a
|
|
652
|
-
provenance header naming that commit, and `.claude/skills` as a relative
|
|
653
|
-
symbolic link to `.agents/skills`. Once seeded the files belong to the owner:
|
|
654
|
-
Kit never syncs, refreshes, or restores them, and refreshing the vendored skill
|
|
655
|
-
for new Agents is an ordinary Kit release that never touches an already seeded
|
|
656
|
-
directory.
|
|
669
|
+
Kit never creates it.
|
|
670
|
+
|
|
671
|
+
When the Agent's own default directory is absent, Kit creates it empty; two
|
|
672
|
+
concurrent first launches create the same directory. A present default
|
|
673
|
+
directory launches exactly as it is, and a deleted one is created empty again
|
|
674
|
+
on its next launch. Kit writes no file into any working directory.
|
|
657
675
|
|
|
658
676
|
A relative, missing, inaccessible, or non-directory working directory refuses
|
|
659
677
|
with `kit_launch_directory_unavailable` before any provider process starts. Kit falls back to no other location - not the
|
|
@@ -661,6 +679,52 @@ base, not `$HOUSE_KIT_HOME`, and not its own current directory - and neither
|
|
|
661
679
|
connecting an installation nor launching a session moves, copies, overwrites,
|
|
662
680
|
or removes anything a working directory holds.
|
|
663
681
|
|
|
682
|
+
## The Skill set
|
|
683
|
+
|
|
684
|
+
The Skill set is every skill the `mattpocock/skills` plugin manifest names at
|
|
685
|
+
one pinned commit but `setup-matt-pocock-skills`, `triage` and `wizard`. Each
|
|
686
|
+
is vendored under `src/skill-set/<name>/` with every file it ships, the
|
|
687
|
+
upstream MIT `LICENSE` and a provenance header in `SKILL.md` naming the commit
|
|
688
|
+
and upstream path. Nothing else is edited but two lines: a
|
|
689
|
+
`disable-model-invocation: true` frontmatter line in `SKILL.md` and an
|
|
690
|
+
`allow_implicit_invocation: false` line in `agents/openai.yaml` are removed, so
|
|
691
|
+
an agent reaches every skill without being told its name.
|
|
692
|
+
|
|
693
|
+
Kit installs the Skill set once for the Environment, for every Agent whatever
|
|
694
|
+
its working directory, under the home it launches agent CLIs with: each skill
|
|
695
|
+
as the directory `$HOME/.agents/skills/<name>`, which Codex and Grok Build
|
|
696
|
+
read, and a relative symbolic link `$HOME/.claude/skills/<name>` to it, which
|
|
697
|
+
Claude Code reads; when `$HOME/.claude/skills` already resolves to
|
|
698
|
+
`$HOME/.agents/skills`, Claude Code reads the directory there and Kit makes no
|
|
699
|
+
link. In a container that home is Kit home, so the set survives
|
|
700
|
+
container recreation; on a native host it is the host user's home.
|
|
701
|
+
|
|
702
|
+
`$HOUSE_KIT_HOME/state/skill-set.json` records the names Kit installed and the
|
|
703
|
+
Kit version that installed them, and Kit owns exactly those names: the
|
|
704
|
+
directory and the link of each. At start and on every resident pass, when
|
|
705
|
+
the set is accepted and the record names another version or none, Kit deletes
|
|
706
|
+
every recorded name, installs the current Skill set and rewrites the record. A
|
|
707
|
+
name whose directory or link exists without being recorded is the owner's: Kit
|
|
708
|
+
leaves it untouched and installs nothing under it. Kit never compares, merges
|
|
709
|
+
or restores a file, so an edit to an installed skill is lost at the next
|
|
710
|
+
release and a copy under another name is kept. When `skills` is `false`, Kit
|
|
711
|
+
deletes every recorded name and the record and installs nothing.
|
|
712
|
+
|
|
713
|
+
After Kit first installs the Skill set, the first Session it launches whose
|
|
714
|
+
Profile ceiling lets it write the owner's How-we-work document
|
|
715
|
+
`/private/library/how-we-work.md` creates it, when it is absent, with the text
|
|
716
|
+
Kit ships in `src/how-we-work.md`, over the Session's own bridge before its
|
|
717
|
+
first prompt is built. Kit then notes in `$HOUSE_KIT_HOME/state/how-we-work`,
|
|
718
|
+
apart from the record, that the document exists, and a present document is
|
|
719
|
+
noted the same way without being touched. Nothing ever creates it again: a
|
|
720
|
+
release, a declined Skill set and a later acceptance leave the note, so an
|
|
721
|
+
owner's edit stands and a deleted document stays deleted. A Session whose
|
|
722
|
+
ceiling cannot write the document launches without it and leaves it for the
|
|
723
|
+
next one; any other refused creation refuses the attempt as
|
|
724
|
+
`kit_how_we_work_unwritable` with House's answer before a prompt is sent. A
|
|
725
|
+
Skill set Kit cannot install or remove refuses the pass as
|
|
726
|
+
`kit_skill_set_unavailable` and names the path.
|
|
727
|
+
|
|
664
728
|
## The declared agent CLIs
|
|
665
729
|
|
|
666
730
|
The Environment owner installs no adapter binary by hand. `kit agents update`
|
|
@@ -1688,6 +1752,8 @@ $HOUSE_KIT_HOME/
|
|
|
1688
1752
|
state/conversation-originals/<attachment identity>.json
|
|
1689
1753
|
state/sessions/<tmux session>.json
|
|
1690
1754
|
state/update-drain
|
|
1755
|
+
state/skill-set.json
|
|
1756
|
+
state/how-we-work
|
|
1691
1757
|
state/continuations/<run identity>.json
|
|
1692
1758
|
state/<instance>/credentials/google.json
|
|
1693
1759
|
state/<instance>/checkpoints/<service>.json
|
package/bin/connect-linux.sh
CHANGED
|
@@ -6,11 +6,16 @@ NAME='house-kit'
|
|
|
6
6
|
HOUSE='https://agents.house'
|
|
7
7
|
WORKSPACE="$HOME/AgentsHouse"
|
|
8
8
|
MANUAL=0
|
|
9
|
+
SKILLS=true
|
|
9
10
|
WORKSPACE_SELECTED=0
|
|
10
11
|
HOUSE_SELECTED=0
|
|
11
12
|
FORWARDING=0
|
|
12
13
|
FORWARDED=kit
|
|
13
14
|
FORWARD=()
|
|
15
|
+
UBUNTU_RELEASES=(jammy noble resolute)
|
|
16
|
+
DOCKER_PACKAGES=(docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin)
|
|
17
|
+
CONFLICTING_PACKAGES=(docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc)
|
|
18
|
+
DOCKER_GROUP=0
|
|
14
19
|
|
|
15
20
|
refuse() {
|
|
16
21
|
printf 'kit_bootstrap_refused: %s\n' "$1" >&2
|
|
@@ -42,6 +47,94 @@ start_resident() {
|
|
|
42
47
|
docker run -d --name "$NAME" --restart unless-stopped --user "$(id -u):$(id -g)" --mount "$KIT_HOME_MOUNT" --mount "$WORKSPACE_MOUNT" --label "agentshouse.house=$HOUSE" --env HOME=/kit-home --env HOUSE_KIT_HOME=/kit-home --env HOUSE_KIT_CONTAINER=1 "$IMAGE" resident >/dev/null
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
docker() {
|
|
51
|
+
if ((DOCKER_GROUP)); then
|
|
52
|
+
sudo -u "$(id -un)" docker "$@"
|
|
53
|
+
else
|
|
54
|
+
command docker "$@"
|
|
55
|
+
fi
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
elevated() {
|
|
59
|
+
if ((EUID == 0)); then
|
|
60
|
+
"$@"
|
|
61
|
+
else
|
|
62
|
+
sudo "$@"
|
|
63
|
+
fi
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
docker_member() {
|
|
67
|
+
[[ " $(id -nG "$@") " == *' docker '* ]]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
docker_answers() {
|
|
71
|
+
DOCKER_PLATFORM=$(docker info --format '{{.OSType}}/{{.Architecture}}' 2>/dev/null)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
docker_cause() {
|
|
75
|
+
docker info 2>&1 >/dev/null | tail -n 1
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
unanswered() {
|
|
79
|
+
type -P docker >/dev/null || return 0
|
|
80
|
+
printf '; Docker Engine does not answer: %s' "$(docker_cause)"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
installed_packages() {
|
|
84
|
+
{ dpkg-query -W -f='${db:Status-Status} ${Package}\n' "$@" 2>/dev/null || true; } | awk '$1 == "installed" { print $2 }'
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
install_docker_engine() {
|
|
88
|
+
printf 'Installing Docker Engine from Docker'\''s apt repository for %s; sudo may ask for your password.\n' "$1"
|
|
89
|
+
elevated apt-get update -qq >/dev/null || refuse 'apt could not refresh its package lists'
|
|
90
|
+
elevated apt-get install -y -qq ca-certificates curl >/dev/null || refuse 'apt could not install ca-certificates and curl'
|
|
91
|
+
elevated install -m 0755 -d /etc/apt/keyrings || refuse '/etc/apt/keyrings could not be created'
|
|
92
|
+
elevated curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc || refuse 'the Docker apt repository key could not be downloaded'
|
|
93
|
+
elevated chmod a+r /etc/apt/keyrings/docker.asc || refuse 'the Docker apt repository key could not be made readable'
|
|
94
|
+
printf 'Types: deb\nURIs: https://download.docker.com/linux/ubuntu\nSuites: %s\nComponents: stable\nArchitectures: %s\nSigned-By: /etc/apt/keyrings/docker.asc\n' "$2" "$(dpkg --print-architecture)" \
|
|
95
|
+
| elevated tee /etc/apt/sources.list.d/docker.sources >/dev/null || refuse 'the Docker apt repository could not be configured'
|
|
96
|
+
elevated apt-get update -qq >/dev/null || refuse 'apt could not read the Docker apt repository'
|
|
97
|
+
elevated apt-get install -y -qq "${DOCKER_PACKAGES[@]}" >/dev/null || refuse 'apt could not install Docker Engine'
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
establish_docker_engine() {
|
|
101
|
+
docker_answers && return
|
|
102
|
+
if ((EUID != 0)) && ! docker_member && docker_member "$(id -un)"; then
|
|
103
|
+
refuse "$(id -un) joined the docker group after this session began; sign out and back in, then rerun this bootstrap"
|
|
104
|
+
fi
|
|
105
|
+
local distribution='' release='' described='this Linux distribution' conflicting present
|
|
106
|
+
if [[ -r /etc/os-release ]]; then
|
|
107
|
+
distribution=$(. /etc/os-release && printf '%s' "${ID:-}")
|
|
108
|
+
release=$(. /etc/os-release && printf '%s' "${UBUNTU_CODENAME:-${VERSION_CODENAME:-}}")
|
|
109
|
+
described=$(. /etc/os-release && printf '%s' "${PRETTY_NAME:-$described}")
|
|
110
|
+
fi
|
|
111
|
+
if ((FORWARDING)); then
|
|
112
|
+
type -P docker >/dev/null || refuse 'House Kit is not installed; run this bootstrap without arguments first'
|
|
113
|
+
refuse "Docker Engine does not answer: $(docker_cause)"
|
|
114
|
+
fi
|
|
115
|
+
if [[ "$distribution" != ubuntu ]]; then
|
|
116
|
+
type -P docker >/dev/null || refuse "Docker Engine is not installed on $described; install a working Docker Engine, then rerun this bootstrap"
|
|
117
|
+
refuse "Docker Engine does not answer on $described: $(docker_cause)"
|
|
118
|
+
fi
|
|
119
|
+
[[ " ${UBUNTU_RELEASES[*]} " == *" $release "* ]] || refuse "this bootstrap installs Docker Engine only on Ubuntu 22.04, 24.04 and 26.04 LTS, not $described; install a working Docker Engine, then rerun this bootstrap$(unanswered)"
|
|
120
|
+
conflicting=$(installed_packages "${CONFLICTING_PACKAGES[@]}" | paste -sd ' ' -)
|
|
121
|
+
[[ -z "$conflicting" ]] || refuse "the installed packages $conflicting conflict with Docker Engine; remove them or make their Docker Engine work, then rerun this bootstrap$(unanswered)"
|
|
122
|
+
present=$(installed_packages "${DOCKER_PACKAGES[@]}" | wc -l)
|
|
123
|
+
((present == ${#DOCKER_PACKAGES[@]})) || install_docker_engine "$described" "$release"
|
|
124
|
+
if ! systemctl is-active --quiet docker.service; then
|
|
125
|
+
printf 'Starting Docker Engine; sudo may ask for your password.\n'
|
|
126
|
+
elevated systemctl start docker.service || refuse 'Docker Engine could not be started'
|
|
127
|
+
fi
|
|
128
|
+
if ((EUID != 0)); then
|
|
129
|
+
if ! docker_member "$(id -un)"; then
|
|
130
|
+
printf 'Adding %s to the docker group; it applies from your next sign-in, so this run reaches Docker Engine through sudo.\n' "$(id -un)"
|
|
131
|
+
elevated usermod -aG docker "$(id -un)" || refuse "$(id -un) could not be added to the docker group"
|
|
132
|
+
fi
|
|
133
|
+
docker_member || DOCKER_GROUP=1
|
|
134
|
+
fi
|
|
135
|
+
docker_answers || refuse "Docker Engine does not answer: $(docker_cause)"
|
|
136
|
+
}
|
|
137
|
+
|
|
45
138
|
if [[ "${1:-}" == kit || "${1:-}" == house ]]; then
|
|
46
139
|
FORWARDING=1
|
|
47
140
|
FORWARDED="$1"
|
|
@@ -68,6 +161,10 @@ while (($#)); do
|
|
|
68
161
|
MANUAL=1
|
|
69
162
|
shift
|
|
70
163
|
;;
|
|
164
|
+
--no-skills)
|
|
165
|
+
SKILLS=false
|
|
166
|
+
shift
|
|
167
|
+
;;
|
|
71
168
|
*) refuse "unknown argument $1" ;;
|
|
72
169
|
esac
|
|
73
170
|
done
|
|
@@ -80,8 +177,7 @@ case "$(uname -m)" in
|
|
|
80
177
|
*) refuse "unsupported Linux architecture $(uname -m)" ;;
|
|
81
178
|
esac
|
|
82
179
|
[[ "$WORKSPACE" == /* ]] || refuse 'workspace root must be an absolute path'
|
|
83
|
-
|
|
84
|
-
DOCKER_PLATFORM=$(docker info --format '{{.OSType}}/{{.Architecture}}' 2>/dev/null) || refuse 'Docker Engine is unavailable'
|
|
180
|
+
establish_docker_engine
|
|
85
181
|
case "$DOCKER_PLATFORM" in
|
|
86
182
|
linux/x86_64|linux/amd64) DOCKER_ARCH=amd64 ;;
|
|
87
183
|
linux/aarch64|linux/arm64) DOCKER_ARCH=arm64 ;;
|
|
@@ -117,6 +213,16 @@ if [[ -f "$KIT_HOME/house" ]]; then
|
|
|
117
213
|
HOUSE="$BOUND_HOUSE"
|
|
118
214
|
fi
|
|
119
215
|
[[ "$HOUSE" == https://* || "$HOUSE" == http://127.0.0.1:* || "$HOUSE" == http://localhost:* ]] || refuse 'House origin must use HTTPS or local loopback HTTP'
|
|
216
|
+
if ((FORWARDING == 0)); then
|
|
217
|
+
if [[ ! -f "$KIT_HOME/kit.json" ]]; then
|
|
218
|
+
printf '{"availability":"intermittent","execution_authority":"allow","migrators":[],"instances":[],"clients":[],"host":null,"skills":%s}\n' "$SKILLS" > "$KIT_HOME/kit.json"
|
|
219
|
+
elif grep -Eq '"skills"[[:space:]]*:' "$KIT_HOME/kit.json"; then
|
|
220
|
+
sed -E -i "s/(\"skills\"[[:space:]]*:[[:space:]]*)(true|false)/\\1$SKILLS/" "$KIT_HOME/kit.json" || refuse 'kit.json could not be updated'
|
|
221
|
+
else
|
|
222
|
+
sed -E -i "1s/^([[:space:]]*)\\{/\\1{\"skills\":$SKILLS,/" "$KIT_HOME/kit.json" || refuse 'kit.json could not be updated'
|
|
223
|
+
fi
|
|
224
|
+
grep -Eq "\"skills\"[[:space:]]*:[[:space:]]*$SKILLS" "$KIT_HOME/kit.json" || refuse 'kit.json could not be updated'
|
|
225
|
+
fi
|
|
120
226
|
DOCKER_RUN=(docker run --rm --network host --user "$(id -u):$(id -g)" --mount "$KIT_HOME_MOUNT" --mount "$WORKSPACE_MOUNT" --env HOME=/kit-home --env HOUSE_KIT_HOME=/kit-home --env HOUSE_KIT_CONTAINER=1 --env "HOUSE_KIT_HOSTNAME=$(hostname)" "$IMAGE")
|
|
121
227
|
|
|
122
228
|
if docker container inspect "$NAME" >/dev/null 2>&1; then
|
|
@@ -180,10 +286,6 @@ fi
|
|
|
180
286
|
|
|
181
287
|
docker pull --quiet --platform "linux/$ARCH" "$IMAGE" >/dev/null
|
|
182
288
|
|
|
183
|
-
if [[ ! -f "$KIT_HOME/kit.json" ]]; then
|
|
184
|
-
printf '{"availability":"intermittent","execution_authority":"allow","migrators":[],"instances":[],"clients":[],"host":null}\n' > "$KIT_HOME/kit.json"
|
|
185
|
-
fi
|
|
186
|
-
|
|
187
289
|
if [[ -f "$KIT_HOME/credential" ]]; then
|
|
188
290
|
"${DOCKER_RUN[@]}" credential check
|
|
189
291
|
else
|
package/bootstrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.26",
|
|
4
4
|
"hosts": {
|
|
5
5
|
"linux": {
|
|
6
|
-
"command": "bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.
|
|
6
|
+
"command": "bash <(curl -fsSL https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.26/connect-linux.sh)",
|
|
7
7
|
"asset": {
|
|
8
8
|
"name": "connect-linux.sh",
|
|
9
|
-
"url": "https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.
|
|
9
|
+
"url": "https://github.com/agentshouse/kit/releases/download/v0.1.0-alpha.26/connect-linux.sh"
|
|
10
10
|
},
|
|
11
11
|
"workspace": {
|
|
12
12
|
"argument": "--workspace",
|
package/package.json
CHANGED
package/src/adapter-mcp.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import {
|
|
2
3
|
COMMAND_ADAPTER_INITIALIZE_TIMEOUT_MS,
|
|
3
4
|
HOW_WE_WORK_PATH,
|
|
4
5
|
MCP_PROTOCOL_VERSION,
|
|
5
6
|
SHELL_RENDER,
|
|
6
7
|
} from "./contract.js";
|
|
7
|
-
import { answerText, bridgeCall } from "./mcp.js";
|
|
8
|
+
import { answerText, bridgeCall, editRefusal } from "./mcp.js";
|
|
8
9
|
import { KitRefusal } from "./refusal.js";
|
|
9
10
|
|
|
11
|
+
const HOW_WE_WORK_TEXT = readFileSync(new URL("how-we-work.md", import.meta.url), "utf8");
|
|
12
|
+
|
|
10
13
|
function readableDiscovery(discovery) {
|
|
11
14
|
const identity = discovery?._meta?.["io.modelcontextprotocol/serverInfo"];
|
|
12
15
|
return Array.isArray(discovery?.supportedVersions) &&
|
|
@@ -84,3 +87,22 @@ export async function commandHouseHowWeWork(bridge) {
|
|
|
84
87
|
} while (cursor !== null);
|
|
85
88
|
return pages.join("\n");
|
|
86
89
|
}
|
|
90
|
+
|
|
91
|
+
export async function commandHouseCreateHowWeWork(bridge) {
|
|
92
|
+
const frame = await bridgeCall(bridge, {
|
|
93
|
+
method: "tools/call",
|
|
94
|
+
params: {
|
|
95
|
+
name: "edit",
|
|
96
|
+
arguments: { changes: [{ op: "create", path: HOW_WE_WORK_PATH, content: HOW_WE_WORK_TEXT }] },
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
if (frame.error !== undefined) {
|
|
100
|
+
throw new KitRefusal("kit_how_we_work_unwritable", frame.error.message ?? null);
|
|
101
|
+
}
|
|
102
|
+
if (frame.result?.isError !== true) return true;
|
|
103
|
+
const text = answerText(frame.result);
|
|
104
|
+
const { code, conflicts } = editRefusal(text);
|
|
105
|
+
if (code === "room_not_found" || code === "operation_denied") return false;
|
|
106
|
+
if (code === "edit_conflict" && conflicts?.some((conflict) => conflict.code === "path_exists")) return true;
|
|
107
|
+
throw new KitRefusal("kit_how_we_work_unwritable", text);
|
|
108
|
+
}
|
package/src/bridge.js
CHANGED
|
@@ -228,6 +228,10 @@ export async function openBridge(options) {
|
|
|
228
228
|
else void Promise.resolve(reported).finally(() => state.interrupts.delete(frame.interrupt));
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
+
if (frame.type === "how_we_work") {
|
|
232
|
+
void options.howWeWork?.();
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
231
235
|
if (frame.type === "turn_ended") {
|
|
232
236
|
state.stop = {
|
|
233
237
|
providerContinuation: frame.provider_continuation === true,
|
package/src/configuration.js
CHANGED
|
@@ -388,6 +388,7 @@ export function parseConfiguration(document) {
|
|
|
388
388
|
"migrators",
|
|
389
389
|
"clients",
|
|
390
390
|
"host",
|
|
391
|
+
"skills",
|
|
391
392
|
],
|
|
392
393
|
"configuration",
|
|
393
394
|
);
|
|
@@ -397,6 +398,8 @@ export function parseConfiguration(document) {
|
|
|
397
398
|
if (!EXECUTION_AUTHORITIES.includes(declared.execution_authority)) {
|
|
398
399
|
refuse("execution_authority");
|
|
399
400
|
}
|
|
401
|
+
const skills = declared.skills === undefined ? true : declared.skills;
|
|
402
|
+
if (typeof skills !== "boolean") refuse("skills");
|
|
400
403
|
if (!Array.isArray(declared.instances)) refuse("instances");
|
|
401
404
|
if (!Array.isArray(declared.migrators)) refuse("migrators");
|
|
402
405
|
const instances = declared.instances.map((instance, position) =>
|
|
@@ -428,6 +431,7 @@ export function parseConfiguration(document) {
|
|
|
428
431
|
migrators,
|
|
429
432
|
clients,
|
|
430
433
|
host: hostOf(declared.host, "host"),
|
|
434
|
+
skills,
|
|
431
435
|
};
|
|
432
436
|
}
|
|
433
437
|
|
package/src/directory.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { constants } from "node:fs";
|
|
2
|
-
import { access, mkdir, realpath,
|
|
3
|
-
import {
|
|
4
|
-
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
2
|
+
import { access, mkdir, realpath, stat } from "node:fs/promises";
|
|
3
|
+
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
4
|
import { LAUNCH_DIRECTORY_BASE } from "./contract.js";
|
|
6
5
|
import { KitRefusal } from "./refusal.js";
|
|
7
|
-
import { seedStarterSet } from "./starter-set.js";
|
|
8
6
|
|
|
9
7
|
export function launchBase(dependencies = {}) {
|
|
10
8
|
return dependencies.launchBase ?? LAUNCH_DIRECTORY_BASE;
|
|
@@ -39,25 +37,9 @@ function unavailable(path, cause) {
|
|
|
39
37
|
return new KitRefusal("kit_launch_directory_unavailable", `${path} ${cause}`);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
async function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} catch {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async function seedDefaultDirectory(selected, base, path) {
|
|
51
|
-
const staging = join(base, `.${randomUUID()}.staging`);
|
|
52
|
-
try {
|
|
53
|
-
await seedStarterSet(staging);
|
|
54
|
-
await rename(staging, path);
|
|
55
|
-
} catch (error) {
|
|
56
|
-
await rm(staging, { recursive: true, force: true }).catch(() => undefined);
|
|
57
|
-
if (!(await isDirectory(path))) {
|
|
58
|
-
throw unavailable(selected, `could not be prepared (${error.code ?? "unknown"})`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
40
|
+
async function createDefaultDirectory(selected, path) {
|
|
41
|
+
const refused = await made(path);
|
|
42
|
+
if (refused !== null) throw unavailable(selected, `could not be created (${refused})`);
|
|
61
43
|
}
|
|
62
44
|
|
|
63
45
|
function within(base, selected) {
|
|
@@ -73,9 +55,7 @@ export async function readyLaunchDirectory(selected, base, agentId = null, optio
|
|
|
73
55
|
if (options.container && !within(resolve(base), path)) {
|
|
74
56
|
throw unavailable(selected, `resolves outside ${base}`);
|
|
75
57
|
}
|
|
76
|
-
if (path === defaultDirectory(base, agentId)
|
|
77
|
-
await seedDefaultDirectory(selected, base, path);
|
|
78
|
-
}
|
|
58
|
+
if (path === defaultDirectory(base, agentId)) await createDefaultDirectory(selected, path);
|
|
79
59
|
let described;
|
|
80
60
|
try {
|
|
81
61
|
described = await stat(path);
|
|
@@ -0,0 +1,25 @@
|
|
|
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. Read and write Rooms with the `house` CLI.
|
|
6
|
+
|
|
7
|
+
The skills are already set up; never run `setup-matt-pocock-skills`.
|
|
8
|
+
|
|
9
|
+
## Where skill output goes
|
|
10
|
+
|
|
11
|
+
- Glossary (`CONTEXT.md`): `library/glossary.md`
|
|
12
|
+
- Decisions (ADRs): `library/decisions/NNNN-<slug>.md`
|
|
13
|
+
- Plan (spec): `library/projects/<name>/plan.md`
|
|
14
|
+
- Tasks (tickets): `library/projects/<name>/tasks/NN-<slug>.md`, with a
|
|
15
|
+
`Status:` line (`needs-triage`, `needs-info`, `ready-for-agent`,
|
|
16
|
+
`ready-for-human`, `wontfix`), a `Blocked by:` line and comments under
|
|
17
|
+
`## Comments`
|
|
18
|
+
- Map (Wayfinding): `library/projects/<name>/map.md`, its tasks under
|
|
19
|
+
`tasks/` with `Type:`, `Status: claimed|resolved` and `Blocked by:` lines
|
|
20
|
+
- Research: `library/research/<slug>.md`
|
|
21
|
+
- Questionnaires: `library/questionnaires/<slug>.md`
|
|
22
|
+
- Learning: `library/learning/<topic>/`
|
|
23
|
+
- Files a person should open, such as HTML pages, are uploaded to the Room and
|
|
24
|
+
linked from the document they belong to; a prototype is one HTML file with
|
|
25
|
+
every variant on one page.
|
package/src/launcher.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
commandHouseCreateHowWeWork,
|
|
4
|
+
commandHouseHowWeWork,
|
|
5
|
+
commandHouseInstructions,
|
|
6
|
+
} from "./adapter-mcp.js";
|
|
3
7
|
import {
|
|
4
8
|
compiledContract,
|
|
5
9
|
initializeCommandAdapter,
|
|
@@ -129,8 +133,11 @@ async function configureSession(acp, contract, sessionId, adapter) {
|
|
|
129
133
|
}
|
|
130
134
|
}
|
|
131
135
|
|
|
132
|
-
async function sessionOpening(bridge,
|
|
133
|
-
|
|
136
|
+
async function sessionOpening(channel, bridge, start) {
|
|
137
|
+
if (start.create_how_we_work === true && (await commandHouseCreateHowWeWork(bridge))) {
|
|
138
|
+
channel.send({ type: "how_we_work" });
|
|
139
|
+
}
|
|
140
|
+
const parts = [HOUSE_CLI_LINE, start.base_instructions, await commandHouseHowWeWork(bridge)];
|
|
134
141
|
return [{ type: "text", text: parts.filter((part) => part.trim() !== "").join("\n\n") }];
|
|
135
142
|
}
|
|
136
143
|
|
|
@@ -185,7 +192,7 @@ async function runTurn(channel, start, bridge, turn) {
|
|
|
185
192
|
const instructions = await commandHouseInstructions(bridge);
|
|
186
193
|
let providerSessionId = start.provider_session ?? null;
|
|
187
194
|
const opening =
|
|
188
|
-
providerSessionId === null ? await sessionOpening(bridge, start
|
|
195
|
+
providerSessionId === null ? await sessionOpening(channel, bridge, start) : [];
|
|
189
196
|
const setup = { cwd: start.working_directory, mcpServers: [] };
|
|
190
197
|
if (providerSessionId === null) {
|
|
191
198
|
providerSessionId = openedSession(await acp.request("session/new", setup));
|
package/src/mcp.js
CHANGED
|
@@ -82,3 +82,8 @@ export function answerYaml(text) {
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
export function editRefusal(text) {
|
|
87
|
+
const conflicts = answerYaml(text.slice(text.indexOf("\n") + 1))?.conflicts;
|
|
88
|
+
return { code: text.split(":")[0].trim(), conflicts: Array.isArray(conflicts) ? conflicts : null };
|
|
89
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.
|