agent-bios 0.19.1 → 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.
Files changed (85) hide show
  1. package/DEPENDENCIES.md +27 -27
  2. package/INSTALL.md +4 -4
  3. package/README.md +53 -26
  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 +3 -3
  7. package/claude/guides/documentation-hygiene.md +3 -0
  8. package/claude/guides/gpt-prompting.md +1 -1
  9. package/claude/guides/korean-writing.md +153 -0
  10. package/claude/guides/learning-flow.md +4 -4
  11. package/claude/guides/session-distill-workflow.md +8 -8
  12. package/claude/guides/slide-writing/RUNBOOK.md +5 -5
  13. package/claude/skills/repo-charter/SKILL.md +3 -3
  14. package/claude/skills/understand/SKILL.md +5 -5
  15. package/codex/AGENTS.md +1 -1
  16. package/codex/guides/claude-prompting.md +1 -1
  17. package/codex/guides/cli-multi-model-workflow.md +3 -3
  18. package/codex/guides/documentation-hygiene.md +3 -0
  19. package/codex/guides/gpt-prompting.md +1 -1
  20. package/codex/guides/korean-writing.md +153 -0
  21. package/codex/guides/learning-flow.md +4 -4
  22. package/codex/guides/session-distill-workflow.md +8 -8
  23. package/codex/guides/slide-writing/RUNBOOK.md +5 -5
  24. package/compose/app_bridge/SKILL.md +12 -12
  25. package/compose/app_bridge/scripts/bridge.py +15 -7
  26. package/compose/assemble.py +5 -5
  27. package/compose/bootstrap/SKILL.md +18 -18
  28. package/compose/canary.sh +4 -4
  29. package/compose/check-domains.py +6 -6
  30. package/compose/corpus-state.py +16 -1168
  31. package/compose/corpus.py +13 -402
  32. package/compose/corpus_app.py +14 -450
  33. package/compose/corpus_catalog.py +15 -926
  34. package/compose/corpus_import.py +14 -523
  35. package/compose/corpus_install.py +14 -1847
  36. package/compose/corpus_session.py +16 -848
  37. package/compose/corpus_setup.py +16 -672
  38. package/compose/corpus_setup_cli.py +15 -580
  39. package/compose/corpus_setup_i18n.py +20 -324
  40. package/compose/corpus_setup_ui.py +18 -645
  41. package/compose/corpus_store.py +16 -1664
  42. package/compose/corpus_transaction.py +15 -284
  43. package/compose/corpus_ui.py +17 -972
  44. package/compose/corpus_ui_runtime.py +16 -274
  45. package/compose/corpus_understand.py +13 -671
  46. package/compose/domains.json +2 -1
  47. package/compose/instructions-state.py +1175 -0
  48. package/compose/instructions.py +409 -0
  49. package/compose/instructions_app.py +464 -0
  50. package/compose/instructions_catalog.py +931 -0
  51. package/compose/instructions_import.py +529 -0
  52. package/compose/instructions_install.py +1866 -0
  53. package/compose/instructions_session.py +852 -0
  54. package/compose/instructions_setup.py +676 -0
  55. package/compose/instructions_setup_cli.py +586 -0
  56. package/compose/instructions_setup_i18n.py +324 -0
  57. package/compose/instructions_setup_ui.py +647 -0
  58. package/compose/instructions_store.py +1668 -0
  59. package/compose/instructions_transaction.py +306 -0
  60. package/compose/instructions_ui.py +975 -0
  61. package/compose/instructions_ui_runtime.py +278 -0
  62. package/compose/instructions_understand.py +678 -0
  63. package/compose/register-hooks.py +1 -1
  64. package/compose/setup/START.md +11 -11
  65. package/docs/advanced-launch.md +11 -11
  66. package/docs/instructions-compatibility.md +86 -0
  67. package/docs/{corpus.md → instructions.md} +35 -8
  68. package/docs/recovery.md +10 -10
  69. package/docs/releases/0.19.2.md +38 -0
  70. package/docs/session-model.md +23 -20
  71. package/docs/setup.md +27 -26
  72. package/docs/understand.md +6 -6
  73. package/install.sh +70 -69
  74. package/launch/agent-launch.py +298 -290
  75. package/launch/agent-launch.toml +2 -2
  76. package/launch/i18n/en.toml +55 -55
  77. package/launch/i18n/ja.toml +56 -56
  78. package/launch/i18n/ko.toml +56 -56
  79. package/launch/shell_integration.py +4 -4
  80. package/learn/collect-learning.py +10 -10
  81. package/learn/learning.schema.json +1 -1
  82. package/learn/migrate-learnings.py +51 -51
  83. package/package.json +27 -11
  84. package/provenance.json +1 -1
  85. /package/docs/assets/{corpus-studio.svg → instructions-studio.svg} +0 -0
package/docs/setup.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Setup, app connection, and personal instructions
2
2
 
3
- [← Overview](../README.md) · [Corpus](corpus.md) · [Sessions](session-model.md) · [Recovery](recovery.md)
3
+ [← Overview](../README.md) · [Instructions](instructions.md) · [Sessions](session-model.md) · [Recovery](recovery.md)
4
4
 
5
- Install `agent-bios@0.19.1` through the [README quick start](../README.md#quick-start)
5
+ Install `agent-bios@0.19.0` through the [README quick start](../README.md#quick-start)
6
6
  to use the guided installer, conversation setup, app bridge and instruction import.
7
7
  Commands below use the installed `agent-bios` CLI. From a source checkout, run
8
8
  `bash install.sh <command>` at its root instead.
@@ -33,7 +33,7 @@ older installation mode.
33
33
  Install the exact package version, then start setup:
34
34
 
35
35
  ```bash
36
- npm install -g agent-bios@0.19.1
36
+ npm install -g agent-bios@0.19.0
37
37
  agent-bios install
38
38
  ```
39
39
 
@@ -43,33 +43,33 @@ For the source alternative, obtain the repository through its Code menu and run
43
43
  `install` and `onboard` open the wizard by default. After the language choice,
44
44
  four stages collect the choices:
45
45
 
46
- 1. **Corpus:** no active corpus, all available corpus, selected packages/domains,
46
+ 1. **Instructions:** no active instructions, all available instructions, selected packages/domains,
47
47
  or saved policy on an existing installation. **Connect to the Codex app** is
48
48
  an independent option for adding `$agent-bios` to app conversations.
49
49
  2. **Personal instructions:** optionally add project folders and select detected
50
- global/project instruction files for capture. This is independent of corpus use.
50
+ global/project instruction files for capture. This is independent of instructions use.
51
51
  3. **Dependencies:** inspect the full inventory. Ready dependencies are checked
52
52
  and cannot be toggled; only missing dependencies with a supported recipe can
53
53
  be selected for installation. Leaving those unselected installs none.
54
54
  4. **Review:** inspect the effects and, when useful, expand exact commands and
55
55
  paths before Apply.
56
56
 
57
- The fresh wizard starts with no active corpus. Reinstalling keeps saved choices
58
- unless you change them. No active corpus retains the library privately but delivers
59
- no corpus instruction text or management bootstrap. Explicit selected mode includes
57
+ The fresh wizard starts with no active instructions. Reinstalling keeps saved choices
58
+ unless you change them. Selecting **No active instructions** retains the library privately but delivers
59
+ no agent-bios instruction text or management bootstrap. Explicit selected mode includes
60
60
  only its targets within applicable host/project scope; it does not add unrelated
61
61
  enabled items or implicit core content.
62
62
 
63
63
  Personal instructions and host learning records already on this device appear in
64
64
  a separate checked, read-only list with stored item counts. These entries describe
65
- retained content across project scopes, not the active corpus policy or new installation
66
- choices. No active corpus preserves them. Use Corpus Studio for personal content and
65
+ retained content across project scopes, not the active instructions policy or new installation
66
+ choices. Selecting **No active instructions** preserves them. Use Instructions Studio for personal content and
67
67
  selection changes; merely displaying stored content does not activate it. The list
68
68
  can also show retained content after private runtime removal.
69
69
 
70
- The installer, launcher and Corpus Studio use a verified UI bundle without downloading or installing
70
+ The installer, launcher and Instructions Studio use a verified UI bundle without downloading or installing
71
71
  Textual. Its extraction is temporary and removed on exit. Missing or damaged
72
- bundled UI fails explicitly. Language changes presentation, not corpus text,
72
+ bundled UI fails explicitly. Language changes presentation, not instructions text,
73
73
  identifiers or host settings.
74
74
 
75
75
  Back preserves your choices. Cancelling before Apply performs no planned setup
@@ -81,8 +81,8 @@ before retrying rather than assuming everything rolled back.
81
81
  Selection flags seed the wizard; they do not skip it:
82
82
 
83
83
  ```bash
84
- agent-bios install --corpus none
85
- agent-bios install --corpus selected --select '@agent-bios/core/builder-base'
84
+ agent-bios install --instructions none
85
+ agent-bios install --instructions selected --select '@agent-bios/core/builder-base'
86
86
  agent-bios install --dry-run
87
87
  ```
88
88
 
@@ -90,15 +90,15 @@ agent-bios install --dry-run
90
90
  machine route. Direct storage-only examples are:
91
91
 
92
92
  ```bash
93
- agent-bios install --non-interactive --corpus none
94
- agent-bios install --non-interactive --corpus all
95
- agent-bios install --non-interactive --corpus selected --select '@agent-bios/core/builder-base'
93
+ agent-bios install --non-interactive --instructions none
94
+ agent-bios install --non-interactive --instructions all
95
+ agent-bios install --non-interactive --instructions selected --select '@agent-bios/core/builder-base'
96
96
  ```
97
97
 
98
98
  Those direct commands do not collect dependency, app or import choices. Use the
99
99
  shared conversation protocol below for a complete machine setup plan. The legacy
100
100
  `--domains` flag requires `--non-interactive` and retains its implicit core/infra
101
- meaning; `--domains none` is different from `--corpus none`.
101
+ meaning; `--domains none` is different from `--instructions none`.
102
102
 
103
103
  ## Setup through conversation or automation
104
104
 
@@ -119,7 +119,7 @@ agent-bios setup resume --review-id REVIEW_ID
119
119
  `start` returns the supported languages, execution target and guide without
120
120
  dependency probes or private setup writes. Choose the language before `inspect`.
121
121
  The agent produces the six choice fields from your answers and saves the entire
122
- engine-issued review. It shows the selected commands, destinations, corpus policy,
122
+ engine-issued review. It shows the selected commands, destinations, instructions policy,
123
123
  app change and capture sources before applying authorized effects. The engine
124
124
  rejects a changed source, environment, plan or state; `--yes` alone is not evidence
125
125
  that the effects were reviewed.
@@ -127,7 +127,8 @@ that the effects were reviewed.
127
127
  Dependency readiness and installation intent are separate: an already available
128
128
  dependency never belongs in the requested `dependencies` list or new install actions.
129
129
  The separate `retained_corpus` inventory contains `{target, label, item_count}` rows,
130
- with localized labels in `display.retained_corpus`, and no instruction bodies. Source
130
+ with localized labels in `display.retained_corpus`, and no instruction bodies. These
131
+ serialized names remain for [compatibility](instructions-compatibility.md). Source
131
132
  package choices and the selected activation policy remain independent of that storage
132
133
  view; retained entries are not added to `targets` by being displayed.
133
134
 
@@ -139,7 +140,7 @@ it does not replay uncertain operations. The agent follows the full procedure in
139
140
  [START.md](../compose/setup/START.md), including exact review preservation and verified
140
141
  entrypoint handoff. Source and reviewed artifacts remain available for recovery.
141
142
 
142
- ## Use corpus in a Codex app task
143
+ ## Use instructions in a Codex app task
143
144
 
144
145
  Choose **Connect to the Codex app** during setup, or explicitly run:
145
146
 
@@ -155,7 +156,7 @@ entry is preserved. Registration on disk does not prove the app discovered it;
155
156
  setup can return a usable helper path to continue before discovery refreshes.
156
157
 
157
158
  Once discovered, use `$agent-bios` in the chosen task. Ask it to manage the library,
158
- change setup, show task status, or explicitly use selected corpus in this task.
159
+ change setup, show task status, or explicitly use selected instructions in this task.
159
160
  A setup or management request does not activate content. Each task starts with
160
161
  managed delivery off and requires its own explicit use.
161
162
 
@@ -165,13 +166,13 @@ Use previews a `ContentRef` and then returns the exact snapshot's
165
166
  Session operations require the real task ID, normally `CODEX_THREAD_ID`. Setup and
166
167
  management do not require that ID. App use enables no hooks, agents or permissions.
167
168
 
168
- Ask `$agent-bios` to turn corpus delivery off to stop consulting it in subsequent
169
+ Ask `$agent-bios` to turn instructions delivery off to stop consulting it in subsequent
169
170
  work. Text already returned cannot be erased; a fresh task is needed for clean
170
171
  exclusion. A resumed or forked conversation can carry earlier content independently
171
172
  of the new task's receipt. Native global/project instructions still follow host rules.
172
173
 
173
174
  `agent-bios app unregister` removes only the owned discovery link. It does not erase
174
- prior task context or personal corpus data. Corpus Studio can also run in the app's
175
+ prior task context or personal instructions data. Instructions Studio can also run in the app's
175
176
  integrated terminal; editing it changes future snapshots, not current task context.
176
177
 
177
178
  ## Import existing instructions
@@ -190,14 +191,14 @@ agent-bios import apply PLAN_ID --expected-revision REV --json
190
191
  Discovery checks known global locations and fixed filenames in chosen project
191
192
  roots. It does not crawl the home directory or follow instruction references.
192
193
  Capture preserves originals and stores redacted evidence with source digests
193
- privately. It is pending review, not an automatically optimized personal corpus.
194
+ privately. It is pending review, not an automatically optimized personal instructions.
194
195
 
195
196
  In an app task, ask `$agent-bios` to review the returned capture ID. The agent
196
197
  proposes content, `always`/`relevant`/`requested` placement, rationale, and source-line
197
198
  coverage or exclusions. The runtime checks the evidence and structure, and Apply
198
199
  requires the reviewed revision. Changed originals or conflicting edits require
199
200
  fresh review. Project-scoped imports remain limited to their recorded root and
200
- applicable hosts, even when all corpus or an enable override is selected.
201
+ applicable hosts, even when all instructions or an enable override is selected.
201
202
 
202
203
  Native hosts may still read the untouched originals. Importing a procedure as
203
204
  requested content does not suppress the same rule in a native file, and changing
@@ -1,8 +1,8 @@
1
- # Understand why the corpus works this way
1
+ # Understand why the instructions work this way
2
2
 
3
- [← Overview](../README.md) · [Setup](setup.md) · [Corpus](corpus.md) · [Sessions](session-model.md) · [Recovery](recovery.md) · [Launch](advanced-launch.md) · [Understand!](understand.md)
3
+ [← Overview](../README.md) · [Setup](setup.md) · [Instructions](instructions.md) · [Sessions](session-model.md) · [Recovery](recovery.md) · [Launch](advanced-launch.md) · [Understand!](understand.md)
4
4
 
5
- Understand! is learning for the person using the corpus, not model training. It explores reasons and limits through a conversation rather than asking you to memorize files.
5
+ Understand! is learning for the person using the instructions, not model training. It explores reasons and limits through a conversation rather than asking you to memorize files.
6
6
 
7
7
  ## Start a learning session
8
8
 
@@ -16,7 +16,7 @@ agent-launch --understand core-purpose claude # or codex
16
16
 
17
17
  The selection is a coherent bundle, not an individual file: core groups cover goals
18
18
  and scope, decision support, adaptation, evidence/safety, and retained learning;
19
- domain and personal bundles come from the effective corpus. A session freezes its
19
+ domain and personal bundles come from the effective instructions. A session freezes its
20
20
  selected source references and edited content. The tutor explains the purpose,
21
21
  background, mechanisms, tradeoffs, and limits, distinguishing documented rationale
22
22
  from inference. The tutor chooses a small finite set of core points and tracks their
@@ -74,11 +74,11 @@ ordering, and asks for a later exact save confirmation. Unsupported provenance l
74
74
  the award pending, without blocking learning. Significance and semantic originality
75
75
  remain explicit tutor/user judgments; transcript validation does not prove them or
76
76
  authenticate against an owner who can edit local files. Only a successfully saved
77
- requested-only personal corpus note can unlock the trophy. The CLI prints it, and the
77
+ requested-only personal instructions note can unlock the trophy. The CLI prints it, and the
78
78
  TUI shows it when there is room. Retries do not duplicate the note; updates and note
79
79
  deletion retain the trophy. Full reset archives the active unlock generation and clears
80
80
  the display; older discovery records cannot reactivate it. Native global files and
81
- corpus source rules are not rewritten by learning.
81
+ instructions source rules are not rewritten by learning.
82
82
 
83
83
  The runtime checks a new proposal's complete review-response size before storing
84
84
  its candidate. An oversized proposal can be shortened and retried without leaving
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,26 @@ 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 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 --corpus open Corpus Studio directly
1790
- agent-launch --understand BUNDLE claude start a corpus understanding session
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
- --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
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, AGENT_BIOS_CORPUS_DIR (private runtime and user roots)
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 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'
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/corpus-state.py list, then rollback --version V\n' "$REPO"
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/corpus.py" --repo "$REPO" "$@" <&3
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/corpus_understand.py" --repo "$REPO" "$@" <&3
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/corpus_app.py" --repo "$REPO" "$@" <&3
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/corpus_import.py" --repo "$REPO" "$@" <&3
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/corpus_setup_cli.py" --repo "$REPO" "$@" <&3
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/corpus_install.py" --repo "$REPO" "$CMD" "$@" <&3
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 corpus guide used
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