Skip to content

Add skill macros for the notes and the power supply - #73

Merged
andreisavu merged 2 commits into
mainfrom
claude/project-thread-bw4p7i
Oct 4, 2026
Merged

andreisavu merged 2 commits into
mainfrom
claude/project-thread-bw4p7i

Conversation

@andreisavu

Copy link
Copy Markdown
Contributor

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 in src/.

  • keep-notes/pull (repos, bash) clones ~/notes once, 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 not exited with code 0, it runs finally.py.

How: three macro files, the SKILL.md steps that name them, and a macros section in docs/skills.md. test/skill-macros.test.ts runs each macro in a scripted room on just-bash. A macro that uses repos needs a git server, so five tests now build the memory backend with labRepositories(':memory:'). Biome skips skills/**/macros, because a macro body uses a top-level return.

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 needs fetch, 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

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
@andreisavu andreisavu self-assigned this Oct 4, 2026
- 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
andreisavu marked this pull request as ready for review October 4, 2026 19:28
@andreisavu
andreisavu merged commit 7a01ccc into main Oct 4, 2026
1 check passed
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.

2 participants