Skip to content

feat: carry assistant skills into Colab notebooks via Gemini instructions (#324) - #325

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/colab-gemini-instructions
Oct 26, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/colab-gemini-instructions

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Carry assistant skills into generated Colab notebooks via Gemini instructions (#324, phase 1). At notebook generation each notebook gets metadata.colab.aiContexts[<uuid5(project)>] + selectedAiContext, assembled from the matching assistant's colab/contexts.yaml (preface + core rules naming the notebook + mapped skill text), capped at 20,000 chars. Idempotent; other metadata preserved; JSON layout kept so diffs are metadata-only.

  • build_util: COLAB_ASSISTANTS, loader/matcher/assembler, inject_gemini_instructions, validate_gemini_contexts, resolve_assistant_root; never_map enforced at load.
  • generate.py --assistant-root / PYAUTO_ASSISTANT_ROOT: every notebook name is validated before the notebooks/ rmtree; a root without a mapping fails loudly, no root warns and skips.
  • autohands gemini_context {apply,report}: standalone apply (CTI, phase 3) and the coverage report phase-4 upkeep and PyAutoBroca will read.
  • release.yml: assistant: matrix field (autolens_workspace + HowToLens → autolens_assistant; galaxy/fit empty until phase 2) and an anonymous read-only assistant checkout.

Merge order: PyAutoLabs/PyAutoBrain → PyAutoLabs/autolens_assistant → this PR. If this ships before the assistant's colab/contexts.yaml is on main, the lens/HowToLens generate step fails.

API Changes

Additive only: new build_util helpers, generate.py --assistant-root, autohands gemini_context subcommand. inject_colab_setup unchanged.

Test Plan

  • python -m pytest -q — 558 passed (22 new: metadata, uuid5, idempotency, preservation, matching, cap, never_map, fail-before-rmtree)
  • Scratch HowToLens generate.py --assistant-root: 51/51 stamped, second run zero diff
  • Independent review: no blockers; 4 findings fixed

Heart RED development override

Live human authorization 2026-10-26: "prm, I authorize shop on RED" (ship on RED) for PyAutoHands#324 phase 1. Exact current RED reasons: release validation FAILED (stage integrate); PyAutoHeart/workflows/Release Integrate: failure; PyAutoHeart/workflows/Workspace Smoke: failure; manifest_drift/checks/workspace checkouts (manifest ↔ disk): red; Release readiness: release validation FAILED (stage integrate); autolens: red; Workspace validation: NOT ready — 1429p / 1f / 125s @ cloud#40294511523; test_run: red; Release validation: NOT release_ready — v? profile=? (2026-10-26T07:48:52+00:00); validation_report/stages/integrate: fail; PyAutoBrain: red; PyAutoLens: red; autolens_profiling: red; Worktree drift: 1 orphan / 0 missing / 3 dirty. Branch gates passed: PyAutoHands 558 tests, autolens_assistant 14 colab tests + mapping check, PyAutoBrain 64 clone tests, independent review FINDINGS (no blockers) all fixed and re-tested. This PR does not repair Heart; no release.

Closes nothing yet — phases 2–4 remain on #324.

🤖 Generated with Claude Code

…ions (#324)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… firewall, #324)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f9b4f51 into main Oct 26, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/colab-gemini-instructions branch October 26, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant