docs: update AGENTS.md structure + ARCHITECTURE.md see-also for pi bring-up
AGENTS.md Structure block was stale (listed only 2 bin/ wrappers, no extensions/, no contrib/). Added full tree + a new 'What install.sh does' section enumerating all steps, gates, and probes so maintainers see at a glance what the installer touches. ARCHITECTURE.md is scoped to the producer side (feeding the palace); pi extension is consumer side, so out of scope for the main body. Added a pointer in the See also section so readers can find extensions/pi/README.md.
This commit is contained in:
@@ -9,16 +9,47 @@ Read [`ARCHITECTURE.md`](ARCHITECTURE.md) first — it's the canonical spec for
|
||||
## Structure
|
||||
|
||||
```
|
||||
install.sh # Idempotent installer — symlinks bin/* into ~/.local/bin
|
||||
# and SKILL.md into ~/.agents/skills/opencode-mempalace-bridge/
|
||||
install.sh # Idempotent installer — see "What install.sh does" below
|
||||
ARCHITECTURE.md # Canonical spec: diagrams, setup recipe, ops notes, upstream roadmap
|
||||
README.md # Human-facing quickstart + per-tool usage reference
|
||||
SKILL.md # Agent skill (symlinked into ~/.agents/skills/ on install)
|
||||
bin/
|
||||
mempalace-docs # Docs-only MemPalace miner (bash wrapper)
|
||||
mempalace-session # Opencode session → MemPalace bridge (bash + inline Python)
|
||||
mempalace-pi-session # pi session → MemPalace bridge (bash + inline Python)
|
||||
contrib/ # systemd / launchd / cron templates for scheduling feeders
|
||||
extensions/
|
||||
pi/ # pi coding-agent bring-up: MCP bridge, keybindings, settings template
|
||||
mempalace.ts # Symlinked into ~/.pi/agent/extensions/ (MCP <→ pi glue)
|
||||
keybindings.json # Symlinked into ~/.pi/agent/ (mosh/tmux newline fix)
|
||||
settings.example.json # Template; user copies + edits (pi rewrites settings.json at runtime)
|
||||
README.md # Extension internals, schema-passthrough gotcha, env setup
|
||||
```
|
||||
|
||||
## What `install.sh` does
|
||||
|
||||
Idempotent, safe to re-run. Always:
|
||||
|
||||
- Symlinks `bin/*` into `~/.local/bin/`.
|
||||
- Creates `~/.agents/skills/opencode-mempalace-bridge/` with a `SKILL.md` symlink and a `.skill-source` marker.
|
||||
|
||||
Gated on pi being installed (`~/.pi/agent/extensions/` exists):
|
||||
|
||||
- Symlinks `extensions/pi/mempalace.ts` into `~/.pi/agent/extensions/`. Backs up any real file in the way.
|
||||
- Symlinks `extensions/pi/keybindings.json` into `~/.pi/agent/`. Backs up any real file in the way.
|
||||
- `settings.example.json` is **not** symlinked — pi rewrites `settings.json` at runtime, so we'd dirty the repo. Installer warns if `settings.json` is missing and prints the `cp` command.
|
||||
|
||||
Probes (never halt, `warn` + `return 0`):
|
||||
|
||||
- `~/.local/bin` is on `$PATH`.
|
||||
- `~/.config/opencode/instructions/mempalace.md` exists (opencode wake-up protocol).
|
||||
- `mempalace` is registered as an MCP server in `~/.config/opencode/opencode.json`.
|
||||
- `~/.pi/agent/settings.json` exists (if pi is installed).
|
||||
- `AWS_PROFILE`/`AWS_REGION` set, but only if `settings.json` exists *and* selects `amazon-bedrock`. Silent otherwise.
|
||||
|
||||
All non-destructive: if something is already in place and points into this repo, prints "already linked" and moves on. If a non-symlink real file is in the way, backs it up with a timestamp.
|
||||
|
||||
|
||||
## Conventions
|
||||
|
||||
- **Standalone executables** in `bin/` with `#!/usr/bin/env bash` shebang, no extension, `chmod +x`. Must work in non-interactive contexts (agent processes, cron, CI).
|
||||
|
||||
Reference in New Issue
Block a user