Context
QoL suggestion (via MoneyAcademyKE): a VSCode-style explorer so you can browse and preview files from chat, fully away from keyboard. Refined with Adolfo into two focused surfaces:
/attach — browse and preview docs (.md plus docs dirs). Tap a folder to drill in, tap a file to preview it inline, then the agent edits on request.
/architecture — expose the structure of the repo. Bare invocation shows the current path; otherwise pick a dir and render the tree.
Decision: built-in tools, not skills
These touch the filesystem, so the safety gates must be deterministic compiled code, not an LLM-interpreted skill. A skill can drift or be nudged into reading something it should not; a built-in tool enforces the allowlist/denylist mechanically. Precedent: #242, where the /cd directory browser was usable by any allowlisted channel user, not just the owner.
Security requirements (hard)
- Owner/admin-only. Never exposed to arbitrary allowlisted members.
/attach is docs-only allowlist: .md and docs directories. Hidden files and dirs excluded. Non-doc files are not surfaced.
- Secrets denylist on any path resolution:
~/.ssh, *.pem, *.key, .env*, keys.toml, config.toml, and anything secret-shaped. Refuse and say why, never silently skip.
/architecture lists directory names only, excluding .git, node_modules, target, vendor dirs, and hidden entries, so structure output is useful and low-sensitivity.
- Previewing puts content in the chat log, which is why
/attach stays docs-only by default.
Proposed behavior
| Surface |
Behavior |
/attach |
glob docs in the workspace, tap-to-navigate folders, tap-to-preview a file inline, agent edits on request |
/architecture |
current-path tree by default, depth-limited, tap to drill into a subdir |
Acceptance criteria
- Both surfaces are compiled/built-in with the gates enforced in code, not prompt text.
- Hidden files and secrets are unreachable through either surface.
- Gated to owner/admin; a non-owner invocation is refused.
- Works channel-agnostically (Telegram first, then Discord/Slack/WhatsApp).
Related
Context
QoL suggestion (via MoneyAcademyKE): a VSCode-style explorer so you can browse and preview files from chat, fully away from keyboard. Refined with Adolfo into two focused surfaces:
/attach— browse and preview docs (.mdplus docs dirs). Tap a folder to drill in, tap a file to preview it inline, then the agent edits on request./architecture— expose the structure of the repo. Bare invocation shows the current path; otherwise pick a dir and render the tree.Decision: built-in tools, not skills
These touch the filesystem, so the safety gates must be deterministic compiled code, not an LLM-interpreted skill. A skill can drift or be nudged into reading something it should not; a built-in tool enforces the allowlist/denylist mechanically. Precedent: #242, where the
/cddirectory browser was usable by any allowlisted channel user, not just the owner.Security requirements (hard)
/attachis docs-only allowlist:.mdand docs directories. Hidden files and dirs excluded. Non-doc files are not surfaced.~/.ssh,*.pem,*.key,.env*,keys.toml,config.toml, and anything secret-shaped. Refuse and say why, never silently skip./architecturelists directory names only, excluding.git,node_modules,target, vendor dirs, and hidden entries, so structure output is useful and low-sensitivity./attachstays docs-only by default.Proposed behavior
/attach/architectureAcceptance criteria
Related
/cdowner-gate precedent to design around)