aai-coding 0.1.3__tar.gz → 0.1.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aai-coding
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Shared configuration, hooks, prompts, and skills for Answer.AI coding sessions
5
5
  Author: aai-coding contributors
6
6
  License-Expression: Apache-2.0
@@ -87,7 +87,7 @@ Replacing the default prompt removes its prose, its dynamic environment block an
87
87
 
88
88
  - Task skills use Python's packaging and discovery rather than a harness's skill machinery. Their instructions and executable tools can share a module. Host skills bootstrap the kernel and explain how to use its tools with the harness.
89
89
  - This repo's hooks are subcommands of `aai-hook` in `aai_coding/harness.py`. The kernel isolation hook for Claude Code and Antigravity comes from `clikernel`. Harness settings register the commands rather than copying their implementations.
90
- - Each harness's skills and the kernel startup file are symlinks into this checkout. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
90
+ - Each harness's skills and extra clikernel docs are symlinks into the workspace checkouts. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
91
91
  - Where the harnesses differ, a module gives each version in the same place, in a dictionary keyed by harness or in neighbouring bullets. There are no generated per-harness templates.
92
92
  - This repo contains agreed team guidance. Model choice, sounds, and personal workflows such as release management belong in each person's `CLAUDE.md`, settings, and local skills. `SETUP.md` identifies which settings are shared and which are personal.
93
93
 
@@ -68,7 +68,7 @@ Replacing the default prompt removes its prose, its dynamic environment block an
68
68
 
69
69
  - Task skills use Python's packaging and discovery rather than a harness's skill machinery. Their instructions and executable tools can share a module. Host skills bootstrap the kernel and explain how to use its tools with the harness.
70
70
  - This repo's hooks are subcommands of `aai-hook` in `aai_coding/harness.py`. The kernel isolation hook for Claude Code and Antigravity comes from `clikernel`. Harness settings register the commands rather than copying their implementations.
71
- - Each harness's skills and the kernel startup file are symlinks into this checkout. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
71
+ - Each harness's skills and extra clikernel docs are symlinks into the workspace checkouts. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
72
72
  - Where the harnesses differ, a module gives each version in the same place, in a dictionary keyed by harness or in neighbouring bullets. There are no generated per-harness templates.
73
73
  - This repo contains agreed team guidance. Model choice, sounds, and personal workflows such as release management belong in each person's `CLAUDE.md`, settings, and local skills. `SETUP.md` identifies which settings are shared and which are personal.
74
74
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4"
@@ -4,7 +4,6 @@
4
4
  import ast, io, json, os, re, sys, tokenize, tomllib
5
5
  from datetime import datetime
6
6
  from pathlib import Path
7
- from aai_coding import BOOT_CALLS
8
7
 
9
8
  __all__ = ['main']
10
9
 
@@ -220,7 +219,7 @@ def synthetic_resume(path):
220
219
 
221
220
  COMPACT_MSG = '**Post-compaction: your context was rewritten — doc() output is gone and skill texts are stale snapshots — but the kernel process survived untouched: namespace, imports, and current-notebook defaults are all still live, so do not re-run startup or re-import.** Read doc(f) again before using any tooling function whose docs you no longer hold. Re-invoke `persistent-python` now — the live SKILL.md always wins over a replayed snapshot. Then run `list_pyskills()`: compaction drops the pyskill catalog from context, and without it you will not know which tools exist. The summary\'s "resume directly / pick up the last task" instruction applies only when it records work actually in flight: if the last user message was already answered and no task is open, do not re-answer or resume anything from before the compact — reply with one short line and wait for the next message.'
222
221
  SYNTH_MSG = '**Post-compaction resume: the conversation context was rewritten and the kernel restarted with a clean namespace.** Tool documentation and skill text shown in the reconstructed history may be truncated or stale: read doc(f) again before using any tooling function whose docs you no longer hold. Re-invoke `persistent-python` now, and rebuild variables, current-notebook defaults, and monkeypatches on demand. Then run `list_pyskills()`: compaction drops the pyskill catalog from context, and without it you will not know which tools exist. The summary\'s "resume directly / pick up the last task" instruction applies only when it records work actually in flight: if the last user message was already answered and no task is open, do not re-answer or resume anything from before the compact — reply with one short line and wait for the next message.'
223
- RESUME_MSG = '**Post-resume: your context is exactly as it was when the app closed — everything you can still see (doc() output) remains valid — but the kernel restarted with a clean namespace (startup.py re-ran, so its imports are back).** Rebuild other session state on demand (variables, set_dlg, monkeypatches).'
222
+ RESUME_MSG = '**Post-resume: your context is exactly as it was when the app closed — everything you can still see (doc() output) remains valid — but the kernel restarted with a clean namespace (kernel startup re-ran, so its imports are back).** Rebuild other session state on demand (variables, set_dlg, monkeypatches).'
224
223
  BOOTSTRAP_MSG = '**NEVER touch local files or run code before completing the bootstrap. "Touch" means any file read, edit, search, or listing (Read/Edit/Grep/Glob, Bash, `fd`/`rg`), any clikernel `py`, and any subagent that would do these on your behalf — however small it looks: one quick read counts, one search counts, "just checking one thing" counts. Bootstrap = invoke the `persistent-python` skill and follow its startup steps. Work that never reaches for the filesystem — pure discussion, web research, browser automation — never hits the trigger and needs no bootstrap. Why: this project runs on a persistent Python workbench with curated pyskills, and unbootstrapped sessions reliably regress to ad-hoc Bash and one-off scripts that cost more to review than the bootstrap costs to run.** After bootstrapping, map each task to a pyskill from the `list_pyskills()` catalog before writing ad hoc code, in Bash or the kernel, and read the project `README.md` and `DEV.md` before starting work.'
225
224
  NB_MSG = '**Notebook project ({loc}):** `# AUTOGENERATED!` `.py` files come from notebooks; never edit them. Before any read, review, or edit, MUST read `doc(fastship.notebooks)` if not in full in context (house style differs from priors; skipping it equals editing generated `.py`). Search by cell id (`nbrg()`), read and diff notebooks, edit via `exhash`.'
226
225
  BLOCK_EDIT_MSG = 'Native file write/edit tools are blocked in this environment: make the edit via the clikernel session instead (exhash / %%exhash, pyskills.edit, pyskills.ipynb).'
@@ -434,20 +433,23 @@ def claude_slop(o):
434
433
  except Exception as e: print(f'[slop] fail-open: {e!r}', file=sys.stderr)
435
434
 
436
435
 
437
- _BOOT_STR = ', '.join(f'`{c}`' for c in BOOT_CALLS)
438
- CODEX_COMPACT_MSG = f'Context was compacted (a summary does not count as in full). Before any local read, search, edit, notebook work, or Python execution, run any of {_BOOT_STR} not in full in context in one parallel batch of bare calls, follow their instructions, and read `doc()` for any matching task pyskill or `…`-truncated function before first use.'
436
+ def _boot_str():
437
+ from clikernel.core import boot_calls
438
+ return ', '.join(f'`{c}`' for c in boot_calls())
439
+
440
+ CODEX_COMPACT_MSG = 'Context was compacted (a summary does not count as in full). Before any local read, search, edit, notebook work, or Python execution, run any of {boot} not in full in context in one parallel batch, follow their instructions, and read `doc()` for any matching task pyskill or `…`-truncated function before first use.'
439
441
 
440
442
 
441
443
  def codex_orientation(o):
442
444
  "codex SessionStart(compact): inject post-compaction kernel/pyskills bootstrap notice"
443
445
  if o.get('source') == 'compact':
444
- print(json.dumps(dict(hookSpecificOutput=dict(hookEventName='SessionStart', additionalContext=CODEX_COMPACT_MSG))))
446
+ print(json.dumps(dict(hookSpecificOutput=dict(hookEventName='SessionStart', additionalContext=CODEX_COMPACT_MSG.format(boot=_boot_str())))))
445
447
 
446
448
 
447
449
  def _agy_inject(*msgs): print(json.dumps(dict(injectSteps=[dict(systemMessage=dict(systemMessage=m)) for m in msgs]) if msgs else {}))
448
450
 
449
451
 
450
- AGY_COMPACT_MSG = f'Post-compaction (a summary does not count as in full). Before replying, judging, or spawning any fork: read any active/required skills (`better_swarm`, user-required skills) and run any of {_BOOT_STR} not in full in context in one parallel clikernel batch (create `py` kernel first if none active).'
452
+ AGY_COMPACT_MSG = 'Post-compaction (a summary does not count as in full). Before replying, judging, or spawning any fork: read any active/required skills (`better_swarm`, user-required skills) and run any of {boot} not in full in context in one parallel clikernel batch (create `py` kernel first if none active).'
451
453
 
452
454
 
453
455
  def _agy_last_steps(path):
@@ -487,7 +489,8 @@ def agy_prompt_submit(o):
487
489
  tmp = f.with_suffix(f'.{os.getpid()}.tmp')
488
490
  tmp.write_text(json.dumps(dict(seen=key if new_turn else st.get('seen'), cp=cp if compact else st.get('cp'))))
489
491
  tmp.replace(f)
490
- msgs = ([AGY_COMPACT_MSG] if compact else []) + (['\n'.join(ns)] if new_turn and (ns := prompt_notices(prompt, Q_NOTICE_CODEX)) else [])
492
+ msgs = [AGY_COMPACT_MSG.format(boot=_boot_str())] if compact else []
493
+ if new_turn and (ns := prompt_notices(prompt, Q_NOTICE_CODEX)): msgs.append('\n'.join(ns))
491
494
  _agy_inject(*msgs)
492
495
 
493
496
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aai-coding
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Shared configuration, hooks, prompts, and skills for Answer.AI coding sessions
5
5
  Author: aai-coding contributors
6
6
  License-Expression: Apache-2.0
@@ -87,7 +87,7 @@ Replacing the default prompt removes its prose, its dynamic environment block an
87
87
 
88
88
  - Task skills use Python's packaging and discovery rather than a harness's skill machinery. Their instructions and executable tools can share a module. Host skills bootstrap the kernel and explain how to use its tools with the harness.
89
89
  - This repo's hooks are subcommands of `aai-hook` in `aai_coding/harness.py`. The kernel isolation hook for Claude Code and Antigravity comes from `clikernel`. Harness settings register the commands rather than copying their implementations.
90
- - Each harness's skills and the kernel startup file are symlinks into this checkout. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
90
+ - Each harness's skills and extra clikernel docs are symlinks into the workspace checkouts. Pulling updates them without copying files. The setup steps merge harness settings and personal instruction files with the user's existing configuration.
91
91
  - Where the harnesses differ, a module gives each version in the same place, in a dictionary keyed by harness or in neighbouring bullets. There are no generated per-harness templates.
92
92
  - This repo contains agreed team guidance. Model choice, sounds, and personal workflows such as release management belong in each person's `CLAUDE.md`, settings, and local skills. `SETUP.md` identifies which settings are shared and which are personal.
93
93
 
@@ -10,5 +10,4 @@ aai_coding.egg-info/SOURCES.txt
10
10
  aai_coding.egg-info/dependency_links.txt
11
11
  aai_coding.egg-info/entry_points.txt
12
12
  aai_coding.egg-info/requires.txt
13
- aai_coding.egg-info/top_level.txt
14
- tests/test_startup.py
13
+ aai_coding.egg-info/top_level.txt
@@ -1,2 +0,0 @@
1
- __version__ = "0.1.3"
2
- BOOT_CALLS = ('doc(clik, pysk)', 'doc(edsk)', 'doc(dsk)', 'doc(exh)', 'doc(rgsk)', 'doc(acp)', 'list_pyskills()')
@@ -1,12 +0,0 @@
1
- import runpy, pytest
2
- from pathlib import Path
3
-
4
-
5
- @pytest.mark.parametrize('project', [False, True])
6
- def test_startup_tools_in_any_directory(tmp_path, monkeypatch, project):
7
- startup = Path(__file__).parents[1]/'kernel/startup.py'
8
- if project: (tmp_path/'pyproject.toml').touch()
9
- monkeypatch.chdir(tmp_path)
10
- ns = runpy.run_path(startup)
11
- assert all(callable(ns[k]) for k in ('doc', 'list_pyskills', 'open_doc', 'file_exhash', 'rg'))
12
- assert all(k in ns for k in ('clik', 'pysk', 'edsk', 'dsk', 'exh', 'rgsk', 'acp'))
File without changes
File without changes
File without changes