Scaffold matrix-bridge (standards-compliant; pre-Phase 0)

Single-user Matrix -> Claude Code bridge bot, scaffolded from a prior scoping
package (SPEC/DECISIONS/CLAUDE/KICKOFF) folded into the current new-project scheme:
- AGENTS.md (canonical) with core flow, stack, placement table, condensed D1-D10
  decisions, sovereignty constraint, and Phase 0 as the first milestone
- CLAUDE.md -> AGENTS.md relative symlink; ROADMAP.md (Phases 1-4+, falsifiable exits)
- scripts/launch-claude.sh first-draft Mac wrapper (D4); config.example.toml
- canonical deny-by-default .gitignore + Python ignores

No bot code yet, by design: Phase 0 is manual-chain validation (N=3).
This commit is contained in:
Keysat
2026-06-14 20:20:17 -05:00
commit 78e0de2e52
7 changed files with 291 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/zsh -l
# launch-claude.sh — the Mac-side environment seam for matrix-bridge (decision D4).
#
# Invoked over SSH by the bot: launch-claude.sh <repo_dir> <prompt...>
# Runs as a LOGIN shell (-l) on purpose: a non-interactive SSH shell otherwise gets a
# minimal env that loads neither ~/.zprofile nor ~/.zshrc, so PATH/credentials are missing
# and `claude` isn't found. Keep ALL Mac-environment knowledge here, not in the bot.
#
# FIRST DRAFT — validate by hand in Phase 0 (see AGENTS.md "Current state") before any bot
# code calls it. Watch for the keychain/credential caveat on the very first remote launch.
repo_dir="$1"
shift
prompt="$*"
if [[ -z "$repo_dir" || -z "$prompt" ]]; then
print -u2 "usage: launch-claude.sh <repo_dir> <prompt>"
exit 2
fi
# Fail loud on a bad directory — never launch Claude in the wrong place.
cd "$repo_dir" || { print -u2 "launch-claude: no such repo dir: $repo_dir"; exit 1; }
exec claude "$prompt"