agent-bios 0.19.1 → 0.19.3

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.
Files changed (106) hide show
  1. package/DEPENDENCIES.md +58 -30
  2. package/INSTALL.md +4 -4
  3. package/README.md +105 -28
  4. package/claude/CLAUDE.md +1 -1
  5. package/claude/guides/claude-prompting.md +1 -1
  6. package/claude/guides/cli-multi-model-workflow.md +4 -4
  7. package/claude/guides/coding-staged-workflow.md +17 -0
  8. package/claude/guides/documentation-hygiene.md +3 -0
  9. package/claude/guides/gpt-prompting.md +1 -1
  10. package/claude/guides/korean-writing.md +153 -0
  11. package/claude/guides/learning-flow.md +4 -4
  12. package/claude/guides/llm-capability-boundary.md +7 -1
  13. package/claude/guides/session-distill-workflow.md +8 -8
  14. package/claude/guides/slide-writing/RUNBOOK.md +5 -5
  15. package/claude/guides/tooling-gotchas.md +20 -1
  16. package/claude/guides/ui-design/visual-direction.md +88 -0
  17. package/claude/guides/ui-design.md +90 -0
  18. package/claude/guides/verification-discipline.md +10 -1
  19. package/claude/hooks/tooling-gotchas-hook.py +41 -0
  20. package/claude/skills/repo-charter/SKILL.md +3 -3
  21. package/claude/skills/understand/SKILL.md +5 -5
  22. package/codex/AGENTS.md +1 -1
  23. package/codex/guides/claude-prompting.md +1 -1
  24. package/codex/guides/cli-multi-model-workflow.md +4 -4
  25. package/codex/guides/coding-staged-workflow.md +17 -0
  26. package/codex/guides/documentation-hygiene.md +3 -0
  27. package/codex/guides/gpt-prompting.md +1 -1
  28. package/codex/guides/korean-writing.md +153 -0
  29. package/codex/guides/learning-flow.md +4 -4
  30. package/codex/guides/llm-capability-boundary.md +7 -1
  31. package/codex/guides/session-distill-workflow.md +8 -8
  32. package/codex/guides/slide-writing/RUNBOOK.md +5 -5
  33. package/codex/guides/tooling-gotchas.md +20 -1
  34. package/codex/guides/ui-design/visual-direction.md +88 -0
  35. package/codex/guides/ui-design.md +90 -0
  36. package/codex/guides/verification-discipline.md +10 -1
  37. package/compose/app_bridge/SKILL.md +12 -12
  38. package/compose/app_bridge/scripts/bridge.py +35 -10
  39. package/compose/app_desktop/server.py +250 -0
  40. package/compose/assemble.py +5 -5
  41. package/compose/bootstrap/SKILL.md +18 -18
  42. package/compose/canary.sh +4 -4
  43. package/compose/check-domains.py +6 -6
  44. package/compose/corpus-state.py +16 -1168
  45. package/compose/corpus.py +13 -402
  46. package/compose/corpus_app.py +14 -450
  47. package/compose/corpus_catalog.py +15 -926
  48. package/compose/corpus_import.py +14 -523
  49. package/compose/corpus_install.py +14 -1847
  50. package/compose/corpus_session.py +16 -848
  51. package/compose/corpus_setup.py +16 -672
  52. package/compose/corpus_setup_cli.py +15 -580
  53. package/compose/corpus_setup_i18n.py +20 -324
  54. package/compose/corpus_setup_ui.py +18 -645
  55. package/compose/corpus_store.py +16 -1664
  56. package/compose/corpus_transaction.py +15 -284
  57. package/compose/corpus_ui.py +17 -972
  58. package/compose/corpus_ui_runtime.py +16 -274
  59. package/compose/corpus_understand.py +13 -671
  60. package/compose/domains.json +3 -1
  61. package/compose/host_platform.py +121 -0
  62. package/compose/instructions-state.py +1178 -0
  63. package/compose/instructions.py +409 -0
  64. package/compose/instructions_app.py +697 -0
  65. package/compose/instructions_catalog.py +931 -0
  66. package/compose/instructions_import.py +537 -0
  67. package/compose/instructions_install.py +1932 -0
  68. package/compose/instructions_session.py +852 -0
  69. package/compose/instructions_setup.py +713 -0
  70. package/compose/instructions_setup_cli.py +607 -0
  71. package/compose/instructions_setup_i18n.py +327 -0
  72. package/compose/instructions_setup_ui.py +647 -0
  73. package/compose/instructions_store.py +1668 -0
  74. package/compose/instructions_transaction.py +308 -0
  75. package/compose/instructions_ui.py +975 -0
  76. package/compose/instructions_ui_runtime.py +279 -0
  77. package/compose/instructions_understand.py +678 -0
  78. package/compose/native_cli.py +52 -0
  79. package/compose/register-hooks.py +1 -1
  80. package/compose/runtime_entry.py +58 -0
  81. package/compose/setup/START.md +11 -11
  82. package/compose/windows_deploy.py +719 -0
  83. package/docs/advanced-launch.md +11 -11
  84. package/docs/instructions-compatibility.md +86 -0
  85. package/docs/{corpus.md → instructions.md} +36 -8
  86. package/docs/recovery.md +10 -10
  87. package/docs/releases/0.19.2.md +38 -0
  88. package/docs/releases/0.19.3.md +107 -0
  89. package/docs/session-model.md +31 -20
  90. package/docs/setup.md +63 -26
  91. package/docs/understand.md +6 -6
  92. package/docs/windows.md +99 -0
  93. package/install.sh +71 -69
  94. package/launch/agent-launch.py +309 -293
  95. package/launch/agent-launch.toml +2 -2
  96. package/launch/agent-launch.zsh +11 -1
  97. package/launch/i18n/en.toml +55 -55
  98. package/launch/i18n/ja.toml +56 -56
  99. package/launch/i18n/ko.toml +56 -56
  100. package/launch/shell_integration.py +4 -4
  101. package/learn/collect-learning.py +10 -10
  102. package/learn/learning.schema.json +1 -1
  103. package/learn/migrate-learnings.py +51 -51
  104. package/package.json +33 -12
  105. package/provenance.json +1 -1
  106. /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 corpus and runtime privately for explicitly activated sessions.
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, AGENT_BIOS_CORPUS_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, corpus,
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 corpus on disk with the record saying the old one was deployed.
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 corpus-status projection could not be written. Deferred rather than
87
- # returned on the spot: the projection runs AFTER the corpus is deployed, and returning
88
- # there would fire the EXIT trap and restore the PREVIOUS manifest — leaving the new corpus
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 corpus and
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 corpus author can perform and name paths that exist in a checkout and
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
- # ---- corpus deploy -------------------------------------------------------
327
- # assemble.py owns the corpus surfaces (central tree, entry seeding, codex marker region,
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 corpus into
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
- assemble_corpus() {
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 corpus is deployed,
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
- # corpus AND are in this user's assembled bundle. Best-effort: a prune failure
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 assemble_corpus resolves, because these two must be answering one
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
- assemble_corpus || exit 1
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 corpus
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 corpus screens — so for this release 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/corpus-state.py` was not in the npm package at all, so a real
886
- # npm install rewrote the corpus, updated selection.json and version.json, passed
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 corpus panel reads that file, so the machine reported a
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 corpus-status"
897
+ info "[dry-run] project instructions-status"
898
898
  else
899
899
  local projection_log
900
- projection_log="$(mktemp -t corpus-projection)"
901
- if python3 "$REPO/compose/corpus-state.py" project --repo "$REPO" >"$projection_log" 2>&1; then
902
- info "corpus-status projected"
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 "corpus-status projection FAILED — the launcher's corpus panel would report a"
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 corpus content
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 corpus will not load."
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 corpus is deployed and the manifest records it, but the"
983
- log "corpus-status projection failed above — the launcher's panel would describe a"
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
- # Corpus surfaces are selection-derived, not repo-identical, so verify reads the assembled
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 a corpus that is not loading as the failure it is.
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 corpus is NOT loading"; fail=1
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 corpus. What was wrong is that anything a
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 corpus into an
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
- # corpus checklist reads `last_apply` from corpus-status.json, and an exit with
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/corpus-state.py" record-apply \
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/corpus-state.py" record-apply \
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 corpus-record-apply)"
1483
- if ! python3 "$REPO/compose/corpus-state.py" record-apply \
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 corpus applied, but recording that outcome failed —"
1486
- log "the corpus panel would not show this selection as applied. Its own output:"
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/corpus_install.py" --repo "$REPO" install --non-interactive
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,27 @@ cmd_update() {
1745
1745
 
1746
1746
  usage() {
1747
1747
  cat <<'EOF'
1748
- agent-bios — manage private corpus content for explicitly activated sessions.
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 --corpus none store runtime with no active corpus
1752
- agent-bios install --corpus selected --select @scope/package select only that corpus
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 corpus choices as JSON
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 open Corpus Studio; list/show/plan/apply also work non-TTY
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 corpus input
1764
- agent-bios app session use return selected corpus as context for this Codex app task
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 corpus learning bundles; --help shows session/discovery commands
1767
+ agent-bios app desktop write the Claude Desktop extension file; you install it in Desktop
1768
+ agent-bios understand list instructions learning bundles; --help shows session/discovery commands
1767
1769
  agent-bios shell show the optional zsh connection status
1768
1770
  agent-bios shell restore make bare claude/codex open the launcher TUI
1769
1771
  agent-bios shell remove return bare claude/codex to their native CLI
@@ -1786,8 +1788,8 @@ agent-bios — manage private corpus content for explicitly activated sessions.
1786
1788
  Launcher (run in an interactive terminal):
1787
1789
  agent-launch claude open the Claude launch TUI
1788
1790
  agent-launch codex open the Codex launch TUI
1789
- agent-launch --corpus open Corpus Studio directly
1790
- agent-launch --understand BUNDLE claude start a corpus understanding session
1791
+ agent-launch --instructions open Instructions Studio directly
1792
+ agent-launch --understand BUNDLE claude start an instruction understanding session
1791
1793
  agent-launch --preset balanced claude launch with a named preset
1792
1794
 
1793
1795
  Shell connection is opt-in and changes only zsh startup wiring, not global
@@ -1797,9 +1799,9 @@ the commands above. After restoring, open a new terminal or reload .zshrc.
1797
1799
  Flags: --dry-run print actions without changing anything
1798
1800
  --interactive open the Textual installation wizard (default)
1799
1801
  --non-interactive opt out of the wizard and return JSON; required without a terminal
1800
- --corpus / --select seed wizard choices; --dry-run previews without Apply
1801
- --corpus none deliver no corpus, including core and management bootstrap
1802
- --corpus all select all corpus; --corpus selected uses repeated --select targets
1802
+ --instructions / --select seed wizard choices; --dry-run previews without Apply
1803
+ --instructions none deliver no instructions, including core and management bootstrap
1804
+ --instructions all select all instructions; --instructions selected uses repeated --select targets
1803
1805
  Library assets remain in the private runtime; these choices govern delivery.
1804
1806
  --domains a,b select named domains for future activated snapshots, plus
1805
1807
  implicit core+infra; '--domains none' keeps that core-only meaning. Saved selections
@@ -1807,7 +1809,7 @@ Flags: --dry-run print actions without changing anything
1807
1809
  installation selects every domain.
1808
1810
  --with a,b optional dependency installation in explicit legacy mode only;
1809
1811
  private installation rejects this option.
1810
- Env: AGENT_BIOS_STATE_DIR, AGENT_BIOS_CORPUS_DIR (private runtime and user roots)
1812
+ Env: AGENT_BIOS_STATE_DIR, AGENT_BIOS_INSTRUCTIONS_DIR (private runtime and user roots)
1811
1813
  CLAUDE_CONFIG_DIR, CODEX_HOME (native host configuration)
1812
1814
  AGENT_LAUNCH_VENV, ZDOTDIR
1813
1815
  EOF
@@ -1818,10 +1820,10 @@ EOF
1818
1820
  [ -n "$known" ] && printf ' --with names: %s\n' "${known% }"
1819
1821
 
1820
1822
  if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
1821
- printf '\nRecover: agent-bios corpus history --json; submit an operation=rollback request\n'
1822
- printf ' through agent-bios corpus plan/apply for a baseline_ref or history_id.\n'
1823
+ printf '\nRecover: agent-bios instructions history --json; submit an operation=rollback request\n'
1824
+ printf ' through agent-bios instructions plan/apply for a baseline_ref or history_id.\n'
1823
1825
  elif [ -e "$REPO/.git" ]; then
1824
- printf '\nRecover: python3 %s/compose/corpus-state.py list, then rollback --version V\n' "$REPO"
1826
+ printf '\nRecover: python3 %s/compose/instructions-state.py list, then rollback --version V\n' "$REPO"
1825
1827
  else
1826
1828
  printf '\nRecover: npm install -g agent-bios@<older-version> && agent-bios install\n'
1827
1829
  fi
@@ -1834,20 +1836,20 @@ if [ $# -gt 0 ]; then shift; fi
1834
1836
  # Private installation is the default path. The explicit legacy flag selects
1835
1837
  # compatibility installation and its regression fixtures. No private operation
1836
1838
  # falls through to a global writer.
1837
- if [ "$CMD" = "corpus" ]; then
1838
- exec python3 "$REPO/compose/corpus.py" --repo "$REPO" "$@" <&3
1839
+ if [ "$CMD" = "instructions" ] || [ "$CMD" = "corpus" ]; then
1840
+ exec python3 "$REPO/compose/instructions.py" --repo "$REPO" "$@" <&3
1839
1841
  fi
1840
1842
  if [ "$CMD" = "shell" ]; then
1841
1843
  exec python3 "$REPO/launch/shell_integration.py" "$@" <&3
1842
1844
  fi
1843
1845
  if [ "$CMD" = "understand" ]; then
1844
- exec python3 "$REPO/compose/corpus_understand.py" --repo "$REPO" "$@" <&3
1846
+ exec python3 "$REPO/compose/instructions_understand.py" --repo "$REPO" "$@" <&3
1845
1847
  fi
1846
1848
  if [ "$CMD" = "app" ]; then
1847
- exec python3 "$REPO/compose/corpus_app.py" --repo "$REPO" "$@" <&3
1849
+ exec python3 "$REPO/compose/instructions_app.py" --repo "$REPO" "$@" <&3
1848
1850
  fi
1849
1851
  if [ "$CMD" = "import" ]; then
1850
- exec python3 "$REPO/compose/corpus_import.py" --repo "$REPO" "$@" <&3
1852
+ exec python3 "$REPO/compose/instructions_import.py" --repo "$REPO" "$@" <&3
1851
1853
  fi
1852
1854
  if [ "$CMD" = "setup" ]; then
1853
1855
  if ! command -v python3 >/dev/null 2>&1 || ! python3 -c 'import sys; sys.exit(sys.version_info < (3, 11))' </dev/null; then
@@ -1855,7 +1857,7 @@ if [ "$CMD" = "setup" ]; then
1855
1857
  log "Install Python with your operating system package manager, then rerun this command."
1856
1858
  exit 1
1857
1859
  fi
1858
- exec python3 "$REPO/compose/corpus_setup_cli.py" --repo "$REPO" "$@" <&3
1860
+ exec python3 "$REPO/compose/instructions_setup_cli.py" --repo "$REPO" "$@" <&3
1859
1861
  fi
1860
1862
  if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
1861
1863
  case "$CMD" in
@@ -1865,14 +1867,14 @@ if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
1865
1867
  log "Install Python with your operating system package manager, then rerun this command."
1866
1868
  exit 1
1867
1869
  fi
1868
- exec python3 "$REPO/compose/corpus_install.py" --repo "$REPO" "$CMD" "$@" <&3
1870
+ exec python3 "$REPO/compose/instructions_install.py" --repo "$REPO" "$CMD" "$@" <&3
1869
1871
  ;;
1870
1872
  esac
1871
1873
  fi
1872
1874
 
1873
1875
  # `learn` forwards its arguments and stdin straight to the collector, so it must
1874
1876
  # bypass the flag parser below (which rejects anything it does not know). This
1875
- # subcommand is the only PATH-reachable entry to capture: the corpus guide used
1877
+ # subcommand is the only PATH-reachable entry to capture: the instructions guide used
1876
1878
  # to invoke learn/collect-learning.py relative to the cwd, which works from a
1877
1879
  # clone and silently fails for every other install.
1878
1880
  if [ "$CMD" = "learn" ]; then