agent-bios 0.19.0 → 0.19.2
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/DEPENDENCIES.md +27 -27
- package/INSTALL.md +4 -4
- package/README.md +58 -28
- package/claude/CLAUDE.md +1 -1
- package/claude/guides/claude-prompting.md +1 -1
- package/claude/guides/cli-multi-model-workflow.md +3 -3
- package/claude/guides/documentation-hygiene.md +3 -0
- package/claude/guides/gpt-prompting.md +1 -1
- package/claude/guides/korean-writing.md +153 -0
- package/claude/guides/learning-flow.md +4 -4
- package/claude/guides/session-distill-workflow.md +8 -8
- package/claude/guides/slide-writing/RUNBOOK.md +5 -5
- package/claude/skills/repo-charter/SKILL.md +3 -3
- package/claude/skills/understand/SKILL.md +58 -28
- package/codex/AGENTS.md +1 -1
- package/codex/guides/claude-prompting.md +1 -1
- package/codex/guides/cli-multi-model-workflow.md +3 -3
- package/codex/guides/documentation-hygiene.md +3 -0
- package/codex/guides/gpt-prompting.md +1 -1
- package/codex/guides/korean-writing.md +153 -0
- package/codex/guides/learning-flow.md +4 -4
- package/codex/guides/session-distill-workflow.md +8 -8
- package/codex/guides/slide-writing/RUNBOOK.md +5 -5
- package/compose/app_bridge/SKILL.md +12 -12
- package/compose/app_bridge/scripts/bridge.py +15 -7
- package/compose/assemble.py +5 -5
- package/compose/bootstrap/SKILL.md +18 -18
- package/compose/canary.sh +4 -4
- package/compose/check-domains.py +6 -6
- package/compose/corpus-state.py +16 -1168
- package/compose/corpus.py +13 -402
- package/compose/corpus_app.py +14 -450
- package/compose/corpus_catalog.py +15 -926
- package/compose/corpus_import.py +14 -523
- package/compose/corpus_install.py +14 -1841
- package/compose/corpus_session.py +16 -848
- package/compose/corpus_setup.py +16 -670
- package/compose/corpus_setup_cli.py +15 -577
- package/compose/corpus_setup_i18n.py +20 -318
- package/compose/corpus_setup_ui.py +18 -631
- package/compose/corpus_store.py +16 -1621
- package/compose/corpus_transaction.py +15 -284
- package/compose/corpus_ui.py +17 -972
- package/compose/corpus_ui_runtime.py +16 -274
- package/compose/corpus_understand.py +13 -520
- package/compose/domains.json +2 -1
- package/compose/instructions-state.py +1175 -0
- package/compose/instructions.py +409 -0
- package/compose/instructions_app.py +464 -0
- package/compose/instructions_catalog.py +931 -0
- package/compose/instructions_import.py +529 -0
- package/compose/instructions_install.py +1866 -0
- package/compose/instructions_session.py +852 -0
- package/compose/instructions_setup.py +676 -0
- package/compose/instructions_setup_cli.py +586 -0
- package/compose/instructions_setup_i18n.py +324 -0
- package/compose/instructions_setup_ui.py +647 -0
- package/compose/instructions_store.py +1668 -0
- package/compose/instructions_transaction.py +306 -0
- package/compose/instructions_ui.py +975 -0
- package/compose/instructions_ui_runtime.py +278 -0
- package/compose/instructions_understand.py +678 -0
- package/compose/register-hooks.py +1 -1
- package/compose/setup/START.md +24 -13
- package/docs/advanced-launch.md +11 -11
- package/docs/instructions-compatibility.md +86 -0
- package/docs/{corpus.md → instructions.md} +35 -8
- package/docs/recovery.md +8 -8
- package/docs/releases/0.19.2.md +38 -0
- package/docs/session-model.md +23 -20
- package/docs/setup.md +42 -25
- package/docs/understand.md +57 -9
- package/install.sh +70 -69
- package/launch/agent-launch.py +306 -295
- package/launch/agent-launch.toml +2 -2
- package/launch/i18n/en.toml +55 -55
- package/launch/i18n/ja.toml +56 -56
- package/launch/i18n/ko.toml +56 -56
- package/launch/shell_integration.py +4 -4
- package/learn/collect-learning.py +10 -10
- package/learn/learning.schema.json +1 -1
- package/learn/migrate-learnings.py +51 -51
- package/package.json +27 -11
- package/provenance.json +1 -1
- /package/docs/assets/{corpus-studio.svg → instructions-studio.svg} +0 -0
package/install.sh
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# agent-bios installer.
|
|
3
3
|
#
|
|
4
|
-
# Stores the
|
|
4
|
+
# Stores the instructions and runtime privately for explicitly activated sessions.
|
|
5
5
|
# Native global instructions and host discovery paths remain user-owned.
|
|
6
6
|
# AGENT_BIOS_LEGACY_INSTALL=1 selects the compatibility deployer.
|
|
7
7
|
#
|
|
8
8
|
# Usage: agent-bios help
|
|
9
|
-
# Private roots: AGENT_BIOS_STATE_DIR,
|
|
9
|
+
# Private roots: AGENT_BIOS_STATE_DIR, AGENT_BIOS_INSTRUCTIONS_DIR.
|
|
10
10
|
# Host/runtime overrides: CLAUDE_CONFIG_DIR, CODEX_HOME, AGENT_LAUNCH_VENV, ZDOTDIR.
|
|
11
11
|
set -euo pipefail
|
|
12
12
|
|
|
13
13
|
# Preserve caller input for explicit interactive setup and payload commands;
|
|
14
14
|
# dependency and compatibility child processes receive /dev/null by default.
|
|
15
|
-
# Preserve caller input on fd 3 for payload-bearing subcommands (learn,
|
|
15
|
+
# Preserve caller input on fd 3 for payload-bearing subcommands (learn, instructions,
|
|
16
16
|
# understand, and cost); other child processes see /dev/null.
|
|
17
17
|
# The braces matter. `exec` with redirections and no command applies them to the
|
|
18
18
|
# SHELL, permanently — so the bare `exec 3<&0 2>/dev/null` this used to be sent
|
|
@@ -81,11 +81,11 @@ CLEANUP_FAILED=0
|
|
|
81
81
|
# Set when the assembler reported the user-owned entry file needs a line added by hand. That
|
|
82
82
|
# is an outstanding ACTION, not a failed deployment: everything else really did land, and
|
|
83
83
|
# treating it as a failure made cmd_install exit 1 and the EXIT trap restore the previous
|
|
84
|
-
# manifest — leaving the new
|
|
84
|
+
# manifest — leaving the new instructions on disk with the record saying the old one was deployed.
|
|
85
85
|
ENTRY_NEEDS_ACTION=0
|
|
86
|
-
# Set when the required
|
|
87
|
-
# returned on the spot: the projection runs AFTER the
|
|
88
|
-
# there would fire the EXIT trap and restore the PREVIOUS manifest — leaving the new
|
|
86
|
+
# Set when the required instructions-status projection could not be written. Deferred rather than
|
|
87
|
+
# returned on the spot: the projection runs AFTER the instructions are deployed, and returning
|
|
88
|
+
# there would fire the EXIT trap and restore the PREVIOUS manifest — leaving the new instructions
|
|
89
89
|
# on disk with the record naming the old one, which is the split state above. The manifest
|
|
90
90
|
# is completed first so it describes what is really there, and the command then exits
|
|
91
91
|
# non-zero. The files, the record, and the exit code then each say something true.
|
|
@@ -169,7 +169,7 @@ shipped_skills() {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
# The selection, as the assembler receives it: an explicit --domains, else the saved
|
|
172
|
-
# selection.json, else every domain (what "full" means). One function so the
|
|
172
|
+
# selection.json, else every domain (what "full" means). One function so the instructions and
|
|
173
173
|
# the skills are always answered from the same selection — a skill decided from a
|
|
174
174
|
# different reading than the bundle would ship a package the bundle disagrees with.
|
|
175
175
|
selection_args() { # -> SEL_ARGS
|
|
@@ -261,7 +261,7 @@ prune_backups() {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
# Guides whose frontmatter declares `audience: author`. They document steps only
|
|
264
|
-
# the
|
|
264
|
+
# the instructions author can perform and name paths that exist in a checkout and
|
|
265
265
|
# nowhere else, so they are never installed. compose/assemble.py owns the
|
|
266
266
|
# declaration and withholds them from the destinations it writes; this asks it
|
|
267
267
|
# rather than keeping a second parser. Both callers below need that same answer
|
|
@@ -323,12 +323,12 @@ prune_withheld() {
|
|
|
323
323
|
done
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
# ----
|
|
327
|
-
# assemble.py owns the
|
|
326
|
+
# ---- instructions deploy -------------------------------------------------------
|
|
327
|
+
# assemble.py owns the instructions surfaces (central tree, entry seeding, codex marker region,
|
|
328
328
|
# settings merge). The entry CLAUDE.md and AGENTS.md are NOT manifested — the entry is
|
|
329
329
|
# user-owned after seeding and AGENTS.md holds a personal region — so uninstall removes our
|
|
330
330
|
# central tree and marked regions and leaves the user's file itself alone.
|
|
331
|
-
# There is ONE install shape. There used to be two: a "full" deploy that wrote the
|
|
331
|
+
# There is ONE install shape. There used to be two: a "full" deploy that wrote the instructions into
|
|
332
332
|
# the entry file, and a packaged one that assembled selected domains under `central/` and left the
|
|
333
333
|
# entry file to the user. They differed in the thing that matters most — who owns the entry file —
|
|
334
334
|
# so the same path was ours in one mode and theirs in the other, and no rule about user-owned
|
|
@@ -344,7 +344,7 @@ all_domains_csv() {
|
|
|
344
344
|
"$REPO/compose/domains.json"
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
assemble_instructions() {
|
|
348
348
|
local args=(--claude-dir "$CLAUDE_DIR" --codex-dir "$CODEX_DIR" --state-dir "$STATE_DIR") rc=0
|
|
349
349
|
# No flag and no saved selection: install everything. This is what "full" meant, expressed as
|
|
350
350
|
# a selection so it goes down the same path as every other one (selection_args).
|
|
@@ -740,15 +740,15 @@ remove_zsh_hook() {
|
|
|
740
740
|
info "removed zsh hook $ZSHRC"
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
# Promote -> migrate (collection loop, Phase 4): after the
|
|
743
|
+
# Promote -> migrate (collection loop, Phase 4): after the instructions are deployed,
|
|
744
744
|
# clear personal copies of learnings that have been promoted into the shared
|
|
745
|
-
#
|
|
745
|
+
# instructions AND are in this user's assembled bundle. Best-effort: a prune failure
|
|
746
746
|
# (or an absent manifest/script) never fails the install. Runs per host.
|
|
747
747
|
migrate_learnings() {
|
|
748
748
|
local script="$REPO/learn/migrate-learnings.py"
|
|
749
749
|
{ [ -f "$script" ] && [ -f "$REPO/learn/promotions.json" ]; } || return 0
|
|
750
750
|
local -a sel dry
|
|
751
|
-
# The SAME three-way
|
|
751
|
+
# The SAME three-way assemble_instructions resolves, because these two must be answering one
|
|
752
752
|
# question. Naming only the selection file made a fresh `--dry-run` preview migration as
|
|
753
753
|
# "skipped" — a dry run deliberately does not write selection.json, while the real run
|
|
754
754
|
# writes it moments earlier and then migrates for real. A preview that reports the
|
|
@@ -795,12 +795,12 @@ cmd_install() {
|
|
|
795
795
|
# Refuse loudly before doing any work: an unreadable declaration must not degrade
|
|
796
796
|
# into withholding nothing, which is the fail-open shape this rule exists to avoid.
|
|
797
797
|
WITHHELD_GUIDES="$(author_only_guides)" || exit 1
|
|
798
|
-
|
|
798
|
+
assemble_instructions || exit 1
|
|
799
799
|
# assemble.py withholds author-only guides and prunes the destinations it writes.
|
|
800
800
|
# $CLAUDE_DIR/guides is not one of them — it is where the pre-unification full
|
|
801
801
|
# install put guides, so a machine that installed then would keep its copy for good.
|
|
802
802
|
prune_withheld "$CLAUDE_DIR/guides"
|
|
803
|
-
migrate_learnings # Phase 4: clear personal copies now absorbed by the
|
|
803
|
+
migrate_learnings # Phase 4: clear personal copies now absorbed by the instructions
|
|
804
804
|
deploy_glob "$REPO/codex/agents" "*.toml" "$CODEX_DIR/agents"
|
|
805
805
|
# Resolved once, before the prune that reads it: an assembler that cannot answer must
|
|
806
806
|
# stop the install here, not let `for skill in $(...)` iterate an empty answer and
|
|
@@ -850,7 +850,7 @@ cmd_install() {
|
|
|
850
850
|
# of this comment claimed: the notice fires only for a key the FIRST SCREEN itself
|
|
851
851
|
# requests and the old catalogs lack. Adding keys anywhere is not enough. This
|
|
852
852
|
# release adds four and the root screen requests none of them — they are reached
|
|
853
|
-
# from the registration wizard and the
|
|
853
|
+
# from the registration wizard and the instructions screens — so for this release the
|
|
854
854
|
# ordering buys no diagnostic at all, only the smaller blast radius of a launcher
|
|
855
855
|
# that is newer than its catalogs rather than older. The shape-changed keys are
|
|
856
856
|
# silent in that direction too: an old value with no slot formats to itself and the
|
|
@@ -882,10 +882,10 @@ cmd_install() {
|
|
|
882
882
|
# The projection is REQUIRED, not best-effort. It used to be neither: stderr and the
|
|
883
883
|
# exit status were both discarded and every failure printed one guess of a note —
|
|
884
884
|
# "versions.json/ledger missing?" — which was wrong for the failure that actually
|
|
885
|
-
# happened. `compose/
|
|
886
|
-
# npm install rewrote the
|
|
885
|
+
# happened. `compose/instructions-state.py` was not in the npm package at all, so a real
|
|
886
|
+
# npm install rewrote the instructions, updated selection.json and version.json, passed
|
|
887
887
|
# verification, exited 0, and left corpus-status.json stale from a previous
|
|
888
|
-
# deployment. The launcher's
|
|
888
|
+
# deployment. The launcher's instructions panel reads that file, so the machine reported a
|
|
889
889
|
# selection the successful run had not recorded. A command that deploys the launcher
|
|
890
890
|
# and advertises its panel cannot call that a success.
|
|
891
891
|
#
|
|
@@ -894,15 +894,15 @@ cmd_install() {
|
|
|
894
894
|
# an unwritable destination, an invalid status, a missing interpreter. Those fail
|
|
895
895
|
# the install, and the reason reaches the operator instead of /dev/null.
|
|
896
896
|
if [ "$DRY_RUN" = 1 ]; then
|
|
897
|
-
info "[dry-run] project
|
|
897
|
+
info "[dry-run] project instructions-status"
|
|
898
898
|
else
|
|
899
899
|
local projection_log
|
|
900
|
-
projection_log="$(mktemp -t
|
|
901
|
-
if python3 "$REPO/compose/
|
|
902
|
-
info "
|
|
900
|
+
projection_log="$(mktemp -t instructions-projection)"
|
|
901
|
+
if python3 "$REPO/compose/instructions-state.py" project --repo "$REPO" >"$projection_log" 2>&1; then
|
|
902
|
+
info "instructions-status projected"
|
|
903
903
|
rm -f "$projection_log"
|
|
904
904
|
else
|
|
905
|
-
log "
|
|
905
|
+
log "instructions-status projection FAILED — the launcher's instructions panel would report a"
|
|
906
906
|
log "selection this run did not record. Its own output:"
|
|
907
907
|
sed 's/^/ /' "$projection_log"
|
|
908
908
|
log " full output: $projection_log"
|
|
@@ -910,7 +910,7 @@ cmd_install() {
|
|
|
910
910
|
fi
|
|
911
911
|
fi
|
|
912
912
|
# Deploy/system version marker for the launcher's TUI version line, read from
|
|
913
|
-
# package.json (version + releaseDate) — distinct from the
|
|
913
|
+
# package.json (version + releaseDate) — distinct from the instructions content
|
|
914
914
|
# version. Best-effort: a failure here never fails the install.
|
|
915
915
|
if [ "$DRY_RUN" != 1 ]; then
|
|
916
916
|
if python3 - "$REPO/package.json" "$STATE_DIR/version.json" "$REPO/provenance.json" \
|
|
@@ -971,7 +971,7 @@ PY
|
|
|
971
971
|
log ""
|
|
972
972
|
log "ONE STEP LEFT: add this line to $CLAUDE_DIR/CLAUDE.md (yours; we never rewrite it):"
|
|
973
973
|
log " @central/bundle.md"
|
|
974
|
-
log "Until then the deployed
|
|
974
|
+
log "Until then the deployed instructions will not load."
|
|
975
975
|
fi
|
|
976
976
|
# An untouched backup dir means nothing was replaced; that healthy state
|
|
977
977
|
# must not become a nonzero exit under set -e.
|
|
@@ -979,8 +979,8 @@ PY
|
|
|
979
979
|
prune_backups
|
|
980
980
|
if [ "$PROJECTION_FAILED" = 1 ]; then
|
|
981
981
|
log ""
|
|
982
|
-
log "INSTALL INCOMPLETE: the
|
|
983
|
-
log "
|
|
982
|
+
log "INSTALL INCOMPLETE: the instructions are deployed and the manifest records it, but the"
|
|
983
|
+
log "instructions-status projection failed above — the launcher's panel would describe a"
|
|
984
984
|
log "state this run did not record. Fix the cause and re-run: agent-bios install"
|
|
985
985
|
exit 1
|
|
986
986
|
fi
|
|
@@ -1011,7 +1011,7 @@ cmd_verify() {
|
|
|
1011
1011
|
done
|
|
1012
1012
|
done
|
|
1013
1013
|
[ -n "$verify_withheld" ] && info "author-only guides withheld: $(printf '%s' "$verify_withheld" | tr '\n' ' ')"
|
|
1014
|
-
#
|
|
1014
|
+
# Instructions surfaces are selection-derived, not repo-identical, so verify reads the assembled
|
|
1015
1015
|
# shape rather than byte-comparing against the repo. The entry file is user-owned — READ-check
|
|
1016
1016
|
# the import line, never rewrite it.
|
|
1017
1017
|
python3 "$REPO/compose/check-domains.py" >/dev/null 2>&1 && info "domains gate OK" || { log "domains gate FAILED"; fail=1; }
|
|
@@ -1022,10 +1022,10 @@ cmd_verify() {
|
|
|
1022
1022
|
# The install that just ran said this, and said it because the file is the user's and is
|
|
1023
1023
|
# never rewritten. Failing on it a second time turned a deployment that fully succeeded
|
|
1024
1024
|
# into one whose record was rolled back. Standalone `agent-bios verify` has this unset,
|
|
1025
|
-
# so it still reports
|
|
1025
|
+
# so it still reports instructions that are not loading as the failure they are.
|
|
1026
1026
|
log "ACTION NEEDED: add '@central/bundle.md' to $CLAUDE_DIR/CLAUDE.md — everything else deployed"
|
|
1027
1027
|
else
|
|
1028
|
-
log "entry $CLAUDE_DIR/CLAUDE.md lacks '@central/bundle.md' — central
|
|
1028
|
+
log "entry $CLAUDE_DIR/CLAUDE.md lacks '@central/bundle.md' — central instructions are NOT loading"; fail=1
|
|
1029
1029
|
fi
|
|
1030
1030
|
if grep -qF 'agent-bios:central:start' "$CODEX_DIR/AGENTS.md" 2>/dev/null; then
|
|
1031
1031
|
info "codex central region present"
|
|
@@ -1202,7 +1202,7 @@ cmd_uninstall() {
|
|
|
1202
1202
|
if [ -f "$MANIFEST" ]; then
|
|
1203
1203
|
# Back up before deleting, the way install backs up before overwriting. Full mode deploys the
|
|
1204
1204
|
# entry CLAUDE.md/AGENTS.md as ordinary targets, so they are manifested and removed here —
|
|
1205
|
-
# correct, since in that mode the entry file IS the
|
|
1205
|
+
# correct, since in that mode the entry file IS the instructions. What was wrong is that anything a
|
|
1206
1206
|
# user added to it disappeared with no copy, while the same file overwritten during install
|
|
1207
1207
|
# would have been backed up. Removal is symmetric with deployment; recoverability now is too.
|
|
1208
1208
|
[ "$DRY_RUN" = 1 ] || { mkdir -p "$STATE_DIR"; BACKUP_DIR="$STATE_DIR/backups/uninstall-$(date +%Y%m%d-%H%M%S)"; }
|
|
@@ -1307,7 +1307,7 @@ cmd_uninstall() {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
|
|
1309
1309
|
# Uninstall is a SECURITY operation — nothing of ours may survive it on the machine. That
|
|
1310
|
-
# conflicts with never destroying what a user added, because full mode writes the
|
|
1310
|
+
# conflicts with never destroying what a user added, because full mode writes the instructions into an
|
|
1311
1311
|
# entry file they then edit, so removal takes their work with it. One artifact settles both:
|
|
1312
1312
|
# everything removed leaves as a single archive that can be handed off or deleted in one act,
|
|
1313
1313
|
# and every managed location is then purged. The archive lands in $HOME, outside every path we
|
|
@@ -1438,7 +1438,7 @@ cmd_onboard() {
|
|
|
1438
1438
|
DOMAINS_ARG="$sel"; DOMAINS_SET=1
|
|
1439
1439
|
log "selection: ${sel:-<core+infra only>}"
|
|
1440
1440
|
# Subshelled so a failing install can still record its outcome: the launcher's
|
|
1441
|
-
#
|
|
1441
|
+
# instructions checklist reads `last_apply` from corpus-status.json, and an exit with
|
|
1442
1442
|
# nothing recorded reads as "nothing happened". cmd_install's shell state stays
|
|
1443
1443
|
# in the subshell; everything after here uses only top-level globals.
|
|
1444
1444
|
local apply_rc=0
|
|
@@ -1452,7 +1452,7 @@ cmd_onboard() {
|
|
|
1452
1452
|
apply_rc=$?
|
|
1453
1453
|
set -e
|
|
1454
1454
|
if [ "$apply_rc" -ne 0 ]; then
|
|
1455
|
-
python3 "$REPO/compose/
|
|
1455
|
+
python3 "$REPO/compose/instructions-state.py" record-apply \
|
|
1456
1456
|
--requested "$sel" --outcome install_failed >/dev/null 2>&1 || true
|
|
1457
1457
|
exit "$apply_rc"
|
|
1458
1458
|
fi
|
|
@@ -1466,7 +1466,7 @@ cmd_onboard() {
|
|
|
1466
1466
|
# probe" (no CLI/auth). Both leave the apply unproven, so both record as
|
|
1467
1467
|
# canary_failed — the tail carries which, so the panel's loud line does
|
|
1468
1468
|
# not send the operator to debug imports over an auth problem.
|
|
1469
|
-
python3 "$REPO/compose/
|
|
1469
|
+
python3 "$REPO/compose/instructions-state.py" record-apply \
|
|
1470
1470
|
--requested "$sel" --outcome canary_failed \
|
|
1471
1471
|
--error-tail "canary exit $canary_rc$([ "$canary_rc" = 3 ] && printf ' (could not probe)')" \
|
|
1472
1472
|
>/dev/null 2>&1 || true
|
|
@@ -1479,11 +1479,11 @@ cmd_onboard() {
|
|
|
1479
1479
|
# onboarding prints a completed summary over a status file that never learned the
|
|
1480
1480
|
# selection was applied. That is the state this whole change exists to remove, so it
|
|
1481
1481
|
# cannot be the one still guarded by `|| true`.
|
|
1482
|
-
record_log="$(mktemp -t
|
|
1483
|
-
if ! python3 "$REPO/compose/
|
|
1482
|
+
record_log="$(mktemp -t instructions-record-apply)"
|
|
1483
|
+
if ! python3 "$REPO/compose/instructions-state.py" record-apply \
|
|
1484
1484
|
--requested "$sel" --outcome applied >"$record_log" 2>&1; then
|
|
1485
|
-
log "ONBOARDING INCOMPLETE: the
|
|
1486
|
-
log "the
|
|
1485
|
+
log "ONBOARDING INCOMPLETE: the instructions applied, but recording that outcome failed —"
|
|
1486
|
+
log "the instructions panel would not show this selection as applied. Its own output:"
|
|
1487
1487
|
sed 's/^/ /' "$record_log"
|
|
1488
1488
|
log " full output: $record_log"
|
|
1489
1489
|
exit 1
|
|
@@ -1732,7 +1732,7 @@ cmd_update() {
|
|
|
1732
1732
|
if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" = 1 ]; then
|
|
1733
1733
|
cmd_install
|
|
1734
1734
|
else
|
|
1735
|
-
python3 "$REPO/compose/
|
|
1735
|
+
python3 "$REPO/compose/instructions_install.py" --repo "$REPO" install --non-interactive
|
|
1736
1736
|
fi
|
|
1737
1737
|
else
|
|
1738
1738
|
log "Installed as an npm package. Update with:"
|
|
@@ -1745,25 +1745,26 @@ cmd_update() {
|
|
|
1745
1745
|
|
|
1746
1746
|
usage() {
|
|
1747
1747
|
cat <<'EOF'
|
|
1748
|
-
agent-bios — manage private
|
|
1748
|
+
agent-bios — manage private instructions content for explicitly activated sessions.
|
|
1749
1749
|
|
|
1750
1750
|
agent-bios install open the Textual installation wizard
|
|
1751
|
-
agent-bios install --non-interactive --
|
|
1752
|
-
agent-bios install --
|
|
1751
|
+
agent-bios install --non-interactive --instructions none store runtime with no active instructions
|
|
1752
|
+
agent-bios install --instructions selected --select @scope/package select only that package
|
|
1753
1753
|
agent-bios onboard select domains for future activated sessions
|
|
1754
1754
|
agent-bios setup start report setup languages, execution target, and conversation guide
|
|
1755
|
-
agent-bios setup inspect --language ko inspect dependencies and
|
|
1755
|
+
agent-bios setup inspect --language ko inspect dependencies and instructions choices as JSON
|
|
1756
1756
|
agent-bios setup discover --project-root /path/to/project list eligible instruction sources
|
|
1757
1757
|
agent-bios setup plan --language ko --input request.json preview selected setup effects as JSON
|
|
1758
1758
|
agent-bios setup apply --input review.json --review-id ID --yes apply the accepted review
|
|
1759
1759
|
agent-bios setup status --review-id ID inspect a recorded setup outcome
|
|
1760
1760
|
agent-bios setup resume --review-id ID re-probe and prepare a fresh review without applying
|
|
1761
|
-
agent-bios corpus
|
|
1761
|
+
agent-bios corpus compatibility alias for instructions (existing scripts)
|
|
1762
|
+
agent-bios instructions open Instructions Studio; list/show/plan/apply also work non-TTY
|
|
1762
1763
|
agent-bios import discover/capture/review local instructions; --help lists source-preserving steps
|
|
1763
|
-
agent-bios app register an explicit Codex app bridge or manage per-task
|
|
1764
|
-
agent-bios app session use return selected
|
|
1764
|
+
agent-bios app register an explicit Codex app bridge or manage per-task instructions input
|
|
1765
|
+
agent-bios app session use return selected instructions as context for this Codex app task
|
|
1765
1766
|
agent-bios app session off stop future delivery; earlier context requires a new task to exclude
|
|
1766
|
-
agent-bios understand list
|
|
1767
|
+
agent-bios understand list instructions learning bundles; --help shows session/discovery commands
|
|
1767
1768
|
agent-bios shell show the optional zsh connection status
|
|
1768
1769
|
agent-bios shell restore make bare claude/codex open the launcher TUI
|
|
1769
1770
|
agent-bios shell remove return bare claude/codex to their native CLI
|
|
@@ -1786,8 +1787,8 @@ agent-bios — manage private corpus content for explicitly activated sessions.
|
|
|
1786
1787
|
Launcher (run in an interactive terminal):
|
|
1787
1788
|
agent-launch claude open the Claude launch TUI
|
|
1788
1789
|
agent-launch codex open the Codex launch TUI
|
|
1789
|
-
agent-launch --
|
|
1790
|
-
agent-launch --understand BUNDLE claude start
|
|
1790
|
+
agent-launch --instructions open Instructions Studio directly
|
|
1791
|
+
agent-launch --understand BUNDLE claude start an instruction understanding session
|
|
1791
1792
|
agent-launch --preset balanced claude launch with a named preset
|
|
1792
1793
|
|
|
1793
1794
|
Shell connection is opt-in and changes only zsh startup wiring, not global
|
|
@@ -1797,9 +1798,9 @@ the commands above. After restoring, open a new terminal or reload .zshrc.
|
|
|
1797
1798
|
Flags: --dry-run print actions without changing anything
|
|
1798
1799
|
--interactive open the Textual installation wizard (default)
|
|
1799
1800
|
--non-interactive opt out of the wizard and return JSON; required without a terminal
|
|
1800
|
-
--
|
|
1801
|
-
--
|
|
1802
|
-
--
|
|
1801
|
+
--instructions / --select seed wizard choices; --dry-run previews without Apply
|
|
1802
|
+
--instructions none deliver no instructions, including core and management bootstrap
|
|
1803
|
+
--instructions all select all instructions; --instructions selected uses repeated --select targets
|
|
1803
1804
|
Library assets remain in the private runtime; these choices govern delivery.
|
|
1804
1805
|
--domains a,b select named domains for future activated snapshots, plus
|
|
1805
1806
|
implicit core+infra; '--domains none' keeps that core-only meaning. Saved selections
|
|
@@ -1807,7 +1808,7 @@ Flags: --dry-run print actions without changing anything
|
|
|
1807
1808
|
installation selects every domain.
|
|
1808
1809
|
--with a,b optional dependency installation in explicit legacy mode only;
|
|
1809
1810
|
private installation rejects this option.
|
|
1810
|
-
Env: AGENT_BIOS_STATE_DIR,
|
|
1811
|
+
Env: AGENT_BIOS_STATE_DIR, AGENT_BIOS_INSTRUCTIONS_DIR (private runtime and user roots)
|
|
1811
1812
|
CLAUDE_CONFIG_DIR, CODEX_HOME (native host configuration)
|
|
1812
1813
|
AGENT_LAUNCH_VENV, ZDOTDIR
|
|
1813
1814
|
EOF
|
|
@@ -1818,10 +1819,10 @@ EOF
|
|
|
1818
1819
|
[ -n "$known" ] && printf ' --with names: %s\n' "${known% }"
|
|
1819
1820
|
|
|
1820
1821
|
if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
|
|
1821
|
-
printf '\nRecover: agent-bios
|
|
1822
|
-
printf ' through agent-bios
|
|
1822
|
+
printf '\nRecover: agent-bios instructions history --json; submit an operation=rollback request\n'
|
|
1823
|
+
printf ' through agent-bios instructions plan/apply for a baseline_ref or history_id.\n'
|
|
1823
1824
|
elif [ -e "$REPO/.git" ]; then
|
|
1824
|
-
printf '\nRecover: python3 %s/compose/
|
|
1825
|
+
printf '\nRecover: python3 %s/compose/instructions-state.py list, then rollback --version V\n' "$REPO"
|
|
1825
1826
|
else
|
|
1826
1827
|
printf '\nRecover: npm install -g agent-bios@<older-version> && agent-bios install\n'
|
|
1827
1828
|
fi
|
|
@@ -1834,20 +1835,20 @@ if [ $# -gt 0 ]; then shift; fi
|
|
|
1834
1835
|
# Private installation is the default path. The explicit legacy flag selects
|
|
1835
1836
|
# compatibility installation and its regression fixtures. No private operation
|
|
1836
1837
|
# falls through to a global writer.
|
|
1837
|
-
if [ "$CMD" = "corpus" ]; then
|
|
1838
|
-
exec python3 "$REPO/compose/
|
|
1838
|
+
if [ "$CMD" = "instructions" ] || [ "$CMD" = "corpus" ]; then
|
|
1839
|
+
exec python3 "$REPO/compose/instructions.py" --repo "$REPO" "$@" <&3
|
|
1839
1840
|
fi
|
|
1840
1841
|
if [ "$CMD" = "shell" ]; then
|
|
1841
1842
|
exec python3 "$REPO/launch/shell_integration.py" "$@" <&3
|
|
1842
1843
|
fi
|
|
1843
1844
|
if [ "$CMD" = "understand" ]; then
|
|
1844
|
-
exec python3 "$REPO/compose/
|
|
1845
|
+
exec python3 "$REPO/compose/instructions_understand.py" --repo "$REPO" "$@" <&3
|
|
1845
1846
|
fi
|
|
1846
1847
|
if [ "$CMD" = "app" ]; then
|
|
1847
|
-
exec python3 "$REPO/compose/
|
|
1848
|
+
exec python3 "$REPO/compose/instructions_app.py" --repo "$REPO" "$@" <&3
|
|
1848
1849
|
fi
|
|
1849
1850
|
if [ "$CMD" = "import" ]; then
|
|
1850
|
-
exec python3 "$REPO/compose/
|
|
1851
|
+
exec python3 "$REPO/compose/instructions_import.py" --repo "$REPO" "$@" <&3
|
|
1851
1852
|
fi
|
|
1852
1853
|
if [ "$CMD" = "setup" ]; then
|
|
1853
1854
|
if ! command -v python3 >/dev/null 2>&1 || ! python3 -c 'import sys; sys.exit(sys.version_info < (3, 11))' </dev/null; then
|
|
@@ -1855,7 +1856,7 @@ if [ "$CMD" = "setup" ]; then
|
|
|
1855
1856
|
log "Install Python with your operating system package manager, then rerun this command."
|
|
1856
1857
|
exit 1
|
|
1857
1858
|
fi
|
|
1858
|
-
exec python3 "$REPO/compose/
|
|
1859
|
+
exec python3 "$REPO/compose/instructions_setup_cli.py" --repo "$REPO" "$@" <&3
|
|
1859
1860
|
fi
|
|
1860
1861
|
if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
|
|
1861
1862
|
case "$CMD" in
|
|
@@ -1865,14 +1866,14 @@ if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
|
|
|
1865
1866
|
log "Install Python with your operating system package manager, then rerun this command."
|
|
1866
1867
|
exit 1
|
|
1867
1868
|
fi
|
|
1868
|
-
exec python3 "$REPO/compose/
|
|
1869
|
+
exec python3 "$REPO/compose/instructions_install.py" --repo "$REPO" "$CMD" "$@" <&3
|
|
1869
1870
|
;;
|
|
1870
1871
|
esac
|
|
1871
1872
|
fi
|
|
1872
1873
|
|
|
1873
1874
|
# `learn` forwards its arguments and stdin straight to the collector, so it must
|
|
1874
1875
|
# bypass the flag parser below (which rejects anything it does not know). This
|
|
1875
|
-
# subcommand is the only PATH-reachable entry to capture: the
|
|
1876
|
+
# subcommand is the only PATH-reachable entry to capture: the instructions guide used
|
|
1876
1877
|
# to invoke learn/collect-learning.py relative to the cwd, which works from a
|
|
1877
1878
|
# clone and silently fails for every other install.
|
|
1878
1879
|
if [ "$CMD" = "learn" ]; then
|