Add skill macros for the notes and the power supply - #73
Merged
Merged
Conversation
A macro chains workspace tools in one compose call. Three macros replace steps of two skills. - keep-notes/pull clones and pulls the notes. It returns the head, the last 5 commits with their files, and the open disputes. - keep-notes/push commits all changes and pushes to origin main. It pulls once after a rejected push, and aborts a conflicting rebase. - drive-the-power-supply/stop cancels an actuator and reads its state. It runs finally.py unless the state is exited with code 0. The macros use repos, so the tests that build the team now give the memory backend a git server. Biome skips the macro files, which use a top-level return. docs/skills.md holds the rules for a macro. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7z2GtopJRsfvJU9rCMuCh
- keep-notes/push always pushes, also when nothing new is committed. It fetches after the push and fails when HEAD differs from origin/main. - keep-notes/push refuses to run while a rebase is in progress, and names git rebase --continue. It aborts the rebase only after a failed pull that left a rebase, and reports other pull errors as they are. - keep-notes/push guards a rejection that has no details. - drive-the-power-supply/stop reports the state unknown and runs finally.py when cancel fails for an unknown handle. - The just-bash git rejects git pull --autostash, so pull keeps git pull --rebase. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7z2GtopJRsfvJU9rCMuCh
andreisavu
marked this pull request as ready for review
October 4, 2026 19:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Andrei · project thread
Before: a seat follows the keep-notes steps one tool call at a time on each activation: clone, config, pull, log, fetch, and list the disputes. The early stop of a power supply actuator is three prose steps: cancel, read the state, and run
finally.py.After: each of these procedures is one
compose({ macro, args })call. Ambion 0.6.0 loads the macros from<skill>/macros/<name>.js, and the guidance of each seat lists them. Workbench needs no change insrc/.keep-notes/pull(repos, bash) clones~/notesonce, sets the identity, pulls, and returns the head, the last 5 commits, and the open disputes.keep-notes/push(bash) commits and pushes. On a rejected push, it rebases once and pushes again. On a conflict, it aborts the rebase and fails. It returns the full hash to cite.drive-the-power-supply/stop(cancel, wait, bash) cancels an actuator. If the end state is notexitedwith code 0, it runsfinally.py.How: three macro files, the SKILL.md steps that name them, and a macros section in
docs/skills.md.test/skill-macros.test.tsruns each macro in a scripted room on just-bash. A macro that usesreposneeds a git server, so five tests now build the memory backend withlabRepositories(':memory:'). Biome skipsskills/**/macros, because a macro body uses a top-levelreturn.Not tested: a real run of
finally.py. The just-bash python3 cannot import beside the script, so the stop tests check the decision and the call. A camera capture macro needsfetch, and Ambion refuses to build a seat whose macro names a tool that the backend lacks. That needs an Ambion change first.Review: https://claude.ai/artifact/UpTRSZ8FiUUHPjwQuvghaz
🤖 Generated with Claude Code
https://claude.ai/code/session_01V7z2GtopJRsfvJU9rCMuCh
Generated by Claude Code