aai-coding 0.1.3__tar.gz → 0.1.5__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.
- {aai_coding-0.1.3 → aai_coding-0.1.5}/PKG-INFO +2 -2
- {aai_coding-0.1.3 → aai_coding-0.1.5}/README.md +1 -1
- aai_coding-0.1.5/aai_coding/__init__.py +1 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding/harness.py +15 -10
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/PKG-INFO +2 -2
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/SOURCES.txt +1 -2
- aai_coding-0.1.3/aai_coding/__init__.py +0 -2
- aai_coding-0.1.3/tests/test_startup.py +0 -12
- {aai_coding-0.1.3 → aai_coding-0.1.5}/LICENSE +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding/claudesub.py +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding/harness_docs.py +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/dependency_links.txt +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/entry_points.txt +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/requires.txt +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/aai_coding.egg-info/top_level.txt +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/pyproject.toml +0 -0
- {aai_coding-0.1.3 → aai_coding-0.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aai-coding
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
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
|
|
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
|
|
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.5"
|
|
@@ -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
|
|
|
@@ -218,9 +217,11 @@ def synthetic_resume(path):
|
|
|
218
217
|
return datetime.fromisoformat(bt.replace('Z', '+00:00')).timestamp() if bt else datetime.now().timestamp()
|
|
219
218
|
|
|
220
219
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
_COMPACT_RELOAD = 're-read all task skills and pyskills (`doc()`) referenced before compaction, plus all referenced `README`/`DEV` files'
|
|
221
|
+
_CC_COMPACT_TAIL = f'Re-invoke `persistent-python` now (live `SKILL.md` wins over snapshots), run `list_pyskills()`, {_COMPACT_RELOAD}, and read `doc(f)` before using any tooling function not in full in context. The summary\'s "resume directly / pick up the last task" applies only when work is 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 compaction — reply with one short line and wait.'
|
|
222
|
+
COMPACT_MSG = f'**Post-compaction: context was rewritten (`doc()` output gone, skill texts are stale snapshots), but the kernel process survived untouched — namespace, imports, and current-notebook defaults are live, so do not re-run startup or re-import.** {_CC_COMPACT_TAIL}'
|
|
223
|
+
SYNTH_MSG = f'**Post-compaction resume: context was rewritten (`doc()` and skill text in reconstructed history may be truncated or stale) and the kernel restarted with a clean namespace — rebuild variables, current-notebook defaults, and monkeypatches on demand.** {_CC_COMPACT_TAIL}'
|
|
224
|
+
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
225
|
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
226
|
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
227
|
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).'
|
|
@@ -297,7 +298,7 @@ def claude_subagent_start(o):
|
|
|
297
298
|
|
|
298
299
|
AIR_ROUNDS, AIR_RENUDGE, AIR_SUBSTANCE = 8, 5, 100
|
|
299
300
|
AIR_QUOTE, AIR_SHORT = 400, 20
|
|
300
|
-
AIR_MSG = '
|
|
301
|
+
AIR_MSG = '{0} tool rounds without surfacing (long runs collapse attention onto recent results). Surface with real text: what surprised you recently? Which part of the request does the next step serve{1}? Name your most questionable recent tool call (notebooks => nb tooling, pyskills over Bash, exhash for edits, unneeded str()/Path().expanduser(), unneeded final print()) and fix if wrong (omit from final reply). Upcoming user-facing text and any docstrings/docs/comments written since last surfacing: match write_docs. Reads like last surfacing => not reconnected.'
|
|
301
302
|
_NOT_PROMPT = ('<task-notification>', '<system-reminder>', '<command-', '<local-command', 'Caveat:', '[Request interrupted')
|
|
302
303
|
|
|
303
304
|
|
|
@@ -434,20 +435,23 @@ def claude_slop(o):
|
|
|
434
435
|
except Exception as e: print(f'[slop] fail-open: {e!r}', file=sys.stderr)
|
|
435
436
|
|
|
436
437
|
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
def _boot_str():
|
|
439
|
+
from clikernel.core import boot_calls
|
|
440
|
+
return ', '.join(f'`{c}`' for c in boot_calls())
|
|
441
|
+
|
|
442
|
+
CODEX_COMPACT_MSG = f'Post-compaction (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 and follow them; {_COMPACT_RELOAD}; read `doc()` for any matching task pyskill or `…`-truncated function before first use.'
|
|
439
443
|
|
|
440
444
|
|
|
441
445
|
def codex_orientation(o):
|
|
442
446
|
"codex SessionStart(compact): inject post-compaction kernel/pyskills bootstrap notice"
|
|
443
447
|
if o.get('source') == 'compact':
|
|
444
|
-
print(json.dumps(dict(hookSpecificOutput=dict(hookEventName='SessionStart', additionalContext=CODEX_COMPACT_MSG))))
|
|
448
|
+
print(json.dumps(dict(hookSpecificOutput=dict(hookEventName='SessionStart', additionalContext=CODEX_COMPACT_MSG.format(boot=_boot_str())))))
|
|
445
449
|
|
|
446
450
|
|
|
447
451
|
def _agy_inject(*msgs): print(json.dumps(dict(injectSteps=[dict(systemMessage=dict(systemMessage=m)) for m in msgs]) if msgs else {}))
|
|
448
452
|
|
|
449
453
|
|
|
450
|
-
AGY_COMPACT_MSG = f'Post-compaction (a summary does not count as in full). Before replying, judging, or spawning any fork: read
|
|
454
|
+
AGY_COMPACT_MSG = f'Post-compaction (a summary does not count as in full). Before replying, judging, or spawning any fork: read active/required skills (`better_swarm`, user-required skills); run any of {{boot}} not in full in context (create `py` kernel first if none active); {_COMPACT_RELOAD} — batching calls in parallel.'
|
|
451
455
|
|
|
452
456
|
|
|
453
457
|
def _agy_last_steps(path):
|
|
@@ -487,7 +491,8 @@ def agy_prompt_submit(o):
|
|
|
487
491
|
tmp = f.with_suffix(f'.{os.getpid()}.tmp')
|
|
488
492
|
tmp.write_text(json.dumps(dict(seen=key if new_turn else st.get('seen'), cp=cp if compact else st.get('cp'))))
|
|
489
493
|
tmp.replace(f)
|
|
490
|
-
msgs =
|
|
494
|
+
msgs = [AGY_COMPACT_MSG.format(boot=_boot_str())] if compact else []
|
|
495
|
+
if new_turn and (ns := prompt_notices(prompt, Q_NOTICE_CODEX)): msgs.append('\n'.join(ns))
|
|
491
496
|
_agy_inject(*msgs)
|
|
492
497
|
|
|
493
498
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aai-coding
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
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
|
|
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
|
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|