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
@@ -0,0 +1,52 @@
1
+ """Bash-free entrypoint for the installed Windows application and direct Python use."""
2
+ from __future__ import annotations
3
+ import json
4
+ import os
5
+ from pathlib import Path
6
+ import runpy
7
+ import sys
8
+
9
+ ROOT = Path(__file__).resolve().parents[1]
10
+ sys.path.insert(0, str(ROOT / 'compose'))
11
+ sys.dont_write_bytecode = True
12
+
13
+
14
+ def main(args=None):
15
+ args = list(sys.argv[1:] if args is None else args)
16
+ os.environ.setdefault('HOME', str(Path.home()))
17
+ os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
18
+ if args and args[0] in ('--version', '-V'):
19
+ print(json.loads((ROOT / 'package.json').read_text(encoding='utf-8'))['version'])
20
+ return 0
21
+ command = args.pop(0) if args else ('instructions' if (Path(os.environ.get('AGENT_BIOS_STATE_DIR', str(Path.home()/'.local/share/agent-bios'))) / 'runtime/private-install.json').exists() else 'install')
22
+ if command in ('help', '--help', '-h'):
23
+ print('agent-bios: install | instructions | setup | app | import | learn | understand | launch | verify | status | uninstall | reset')
24
+ return 0
25
+ modules = {'instructions':'instructions', 'corpus':'instructions', 'setup':'instructions_setup_cli',
26
+ 'app':'instructions_app', 'import':'instructions_import', 'understand':'instructions_understand'}
27
+ if command in ('install', 'onboard', 'verify', 'status', 'uninstall', 'reset'):
28
+ import instructions_install
29
+ return instructions_install.main(['--repo', str(ROOT), command, *args])
30
+ if command in modules:
31
+ import importlib
32
+ module = importlib.import_module(modules[command])
33
+ if command in ('instructions', 'corpus'):
34
+ return module.main(['--repo', str(ROOT), *args], bundled_ui=True)
35
+ return module.main(['--repo', str(ROOT), *args])
36
+ if command == 'launch':
37
+ os.environ['AGENT_BIOS_PACKAGE_ROOT'] = str(ROOT)
38
+ os.environ['AGENT_BIOS_PRIVATE_INSTRUCTIONS'] = '1'
39
+ os.environ.pop('AGENT_BIOS_PRIVATE_CORPUS', None)
40
+ sys.argv = [str(ROOT / 'launch/agent-launch.py'), *args]
41
+ runpy.run_path(sys.argv[0], run_name='__main__')
42
+ return 0
43
+ if command == 'learn':
44
+ sys.argv = [str(ROOT / 'learn/collect-learning.py'), *args]
45
+ runpy.run_path(sys.argv[0], run_name='__main__')
46
+ return 0
47
+ print(f'Unknown or unsupported native command: {command}', file=sys.stderr)
48
+ return 2
49
+
50
+
51
+ if __name__ == '__main__':
52
+ raise SystemExit(main())
@@ -2,7 +2,7 @@
2
2
  """Legacy utility: merge canonical hook registrations into Claude settings.
3
3
 
4
4
  The private installer registers no global host hooks. Explicit native session
5
- activation is shared by Claude and Codex through corpus_catalog/corpus_session.
5
+ activation is shared by Claude and Codex through instructions_catalog/instructions_session.
6
6
  This compatibility utility retains the legacy Claude settings.json ownership
7
7
  and merge behavior by calling the assembler's merge_settings implementation.
8
8
 
@@ -0,0 +1,58 @@
1
+ """Application dependency entry for ordinary and isolated embeddable Python."""
2
+ from __future__ import annotations
3
+ import argparse
4
+ import importlib
5
+ import importlib.metadata
6
+ import os
7
+ from pathlib import Path
8
+ import runpy
9
+ import sys
10
+
11
+
12
+ def main(argv=None):
13
+ # A Windows PowerShell 5.1 caller may prefix piped input with a UTF-8 BOM.
14
+ for stream, encoding in ((sys.stdin, "utf-8-sig"), (sys.stdout, "utf-8"), (sys.stderr, "utf-8")):
15
+ if hasattr(stream, "reconfigure"):
16
+ stream.reconfigure(encoding=encoding, errors="strict")
17
+ argv = list(sys.argv[1:] if argv is None else argv)
18
+ parser = argparse.ArgumentParser(description=__doc__)
19
+ parser.add_argument('--dependencies', required=True, type=Path)
20
+ parser.add_argument('--probe', choices=['jsonschema'])
21
+ if '--script' in argv:
22
+ index = argv.index('--script')
23
+ if len(argv) <= index + 1:
24
+ parser.error('--script requires a file')
25
+ args = parser.parse_args(argv[:index])
26
+ script, tail = Path(argv[index+1]), argv[index+2:]
27
+ else:
28
+ args = parser.parse_args(argv)
29
+ script, tail = None, []
30
+ dependencies = args.dependencies.resolve(strict=True)
31
+ if not dependencies.is_dir():
32
+ parser.error('dependencies must be a directory')
33
+ sys.dont_write_bytecode = True
34
+ sys.path.insert(0, str(dependencies))
35
+ os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
36
+ os.environ['AGENT_BIOS_PYTHON_EXECUTABLE'] = str(Path(sys.executable).resolve())
37
+ os.environ['AGENT_BIOS_PYTHON_ENTRY'] = str(Path(__file__).resolve())
38
+ os.environ['AGENT_BIOS_PYTHON_DEPS'] = str(dependencies)
39
+ if args.probe:
40
+ module = importlib.import_module(args.probe)
41
+ getattr(module, 'Draft202012Validator')
42
+ print(importlib.metadata.version(args.probe))
43
+ return 0
44
+ if script is None:
45
+ parser.error('a script or probe is required')
46
+ script = script.resolve(strict=True)
47
+ if not script.is_file() or script.suffix != '.py':
48
+ parser.error('script must be a Python file')
49
+ # Isolated Python does not add the script directory to sys.path. Do this only
50
+ # for the explicitly selected application/helper, not a user's working directory.
51
+ sys.path.insert(0, str(script.parent))
52
+ sys.argv = [str(script), *tail]
53
+ runpy.run_path(str(script), run_name='__main__')
54
+ return 0
55
+
56
+
57
+ if __name__ == '__main__':
58
+ raise SystemExit(main())
@@ -59,24 +59,24 @@ and the user's activation-policy decision.
59
59
 
60
60
  Collect the six plan fields without asking the user to author JSON:
61
61
 
62
- - `selection_mode` and `targets`: keep saved policy, no active corpus, all available
63
- corpus, or specific returned package/domain/item targets. Start from the returned
64
- default. No active corpus retains private library assets but delivers no corpus.
62
+ - `selection_mode` and `targets`: keep saved policy, no active instructions, all available
63
+ instructions, or specific returned package/domain/item targets. Start from the returned
64
+ default. No active instructions retains private library assets but delivers no instructions.
65
65
  - `dependencies`: chosen installable inventory IDs; an empty list installs none.
66
66
  - `app_bridge`: the explicit **Connect to the Codex app** choice, adding `$agent-bios`
67
67
  for setup and personal instruction management. Registration enables discovery only;
68
- each task still requires its own explicit corpus use.
68
+ each task still requires its own explicit instructions use.
69
69
  - `project_roots` and `import_paths`: absolute project folders and explicitly
70
- selected files from discovery. Capture is independent of corpus selection.
70
+ selected files from discovery. Capture is independent of instructions selection.
71
71
 
72
- Keep saved policy uses `selection_mode: null` and `targets: null`. No active corpus
72
+ Keep saved policy uses `selection_mode: null` and `targets: null`. No active instructions
73
73
  uses `"none"` and `[]`. Explicit choices use `"selected"` and their target list;
74
- all available corpus uses `"selected"` and `["all"]`.
74
+ all available instructions uses `"selected"` and `["all"]`.
75
75
 
76
76
  Discovery checks known global instruction locations and the specified project
77
77
  roots. Show detected sources before selecting them. Capture preserves originals
78
78
  and prepares private evidence for later model review; it is not an automatically
79
- optimized personal corpus. Read the import procedure only when the user requests
79
+ optimized personal instructions. Read the import procedure only when the user requests
80
80
  that subsequent review.
81
81
 
82
82
  Save choices to a new caller-owned artifact. Run `plan` and save its complete
@@ -89,7 +89,7 @@ agent-bios setup plan --language ko --input /absolute/choices.json > /absolute/r
89
89
  The returned review envelope contains `review_id`, `context`, `language`,
90
90
  `preview` and `summary`. Keep the entire envelope; do not reconstruct it from the
91
91
  summary, copy only `preview`, change its IDs, or accept truncated output. Show the
92
- concrete private paths, selected dependency commands/destinations, corpus policy,
92
+ concrete private paths, selected dependency commands/destinations, instructions policy,
93
93
  app discovery change and selected capture sources. Keep the exact artifact
94
94
  available for inspection. Preparing these caller-owned files is separate from
95
95
  applying installation effects.
@@ -149,10 +149,10 @@ through its reviewed entrypoint/context; changing entrypoints requires a fresh
149
149
  review. Status and subsequent setup can use the verified handoff.
150
150
  Do not create a duplicate personal skill or edit host discovery settings to force
151
151
  refresh. Once discovered, `$agent-bios` is the ordinary entrypoint. Registration
152
- on disk is not proof of discovery or corpus loading.
152
+ on disk is not proof of discovery or instructions loading.
153
153
 
154
154
  If capture completed, report its actual capture ID and returned next action. Its
155
155
  semantic review, proposed consumption placement and revision-checked import are
156
156
  separate from installation. Setup enables no hooks, native agent registration,
157
157
  permissions or edits to global/project instruction files. Each app task requires
158
- its own explicit corpus use; neither setup nor opening the app performs it.
158
+ its own explicit instructions use; neither setup nor opening the app performs it.