Skip to content

Commit 7ac1e77

Browse files
committed
docs(acp): state that opening a repository runs code from it
Creating a session imports Python from the workspace before any prompt is sent: every `.py` under `.agents/skills`, `.cursor/skills`, `.claude/skills` and `.claude/commands`; additional roots named by the repository's own `.nooa/settings.yaml` or legacy `.nooa/config.toml`, which are not confined to the workspace; and `<workspace>/.nooa/libs/`, whose directory stays on `sys.path` for the life of the process and so can shadow an import for later sessions on other workspaces. Module-level code runs during import, before anything checks whether the file defines a skill, so file contents are irrelevant. The agent runs as the user, in a process holding model credentials, with no consent prompt on these paths. This is how workspace skills are meant to work, and automatic discovery is being kept. Documenting it so the trade is visible rather than discovered: opening a folder is equivalent to running its build. The root README carries a short callout; the package README has the detail. Signed-off-by: Paul Furgale <pfurgale@nvidia.com>
1 parent b3b24b4 commit 7ac1e77

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ export NVIDIA_API_KEY=nvapi-...
210210
uv run nooa-acp
211211
```
212212

213+
> **Opening a repository runs code from it.** Creating a session imports Python
214+
> from the workspace — skill roots such as `.claude/skills`, additional roots
215+
> named by the repository's own `.nooa/settings.yaml`, and `.nooa/libs/` — before
216+
> you send a prompt. This is how workspace skills work, and it means opening a
217+
> folder is enough to execute code it contains, as you, in a process holding your
218+
> model credentials. Open repositories you would run; sandbox anything else. See
219+
> [`packages/nooa-acp/README.md`](packages/nooa-acp/README.md) for the detail.
220+
213221
`nooa-acp` runs the shared NOOA coding agent, CodeAct strategy, repository
214222
tools, persistent shell, installed skills, and durable project sessions over
215223
the standard Agent Client Protocol on stdin/stdout. File edits and terminal

packages/nooa-acp/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,34 @@ terminal path. Repository instructions (`AGENTS.md`), coding tools,
77
summarization, installed `nooa.skills` entry points, and semantic file and
88
terminal activity therefore do not have separate ACP implementations.
99

10+
## Opening a repository runs code from it
11+
12+
**Creating a session imports Python from the workspace, before you send a
13+
prompt.** This is deliberate — it is how workspace skills work — but it means
14+
opening a folder is enough to execute code it contains. Treat opening a
15+
repository with NOOA as equivalent to running its build.
16+
17+
Three paths load workspace code at `session/new` and `session/load`:
18+
19+
- **Skill roots.** Every `.py` file under `.agents/skills`, `.cursor/skills`,
20+
`.claude/skills`, or `.claude/commands` is imported. Module-level code runs
21+
during import, before anything checks whether the file defines a skill, so the
22+
contents are irrelevant.
23+
- **Workspace settings.** `<workspace>/.nooa/settings.yaml` and the legacy
24+
`.nooa/config.toml` may name *additional* skill roots. Those paths are not
25+
confined to the workspace: a relative path escaping it, an absolute path, or a
26+
symlink is accepted as written.
27+
- **Libraries.** `<workspace>/.nooa/libs/<package>/` is imported and its
28+
directory is prepended to `sys.path` for the life of the process. One ACP
29+
server serves several workspaces, so a package name there can shadow the same
30+
import for later sessions on other workspaces.
31+
32+
The agent runs as you, in a process holding your model credentials. There is no
33+
consent prompt on these paths.
34+
35+
**Open repositories you would run.** For anything else, use an OS-level sandbox,
36+
or start a separate server per workspace with credentials scoped to that task.
37+
1038
## Connect an ACP client
1139

1240
Set the model and its provider credentials, then configure the client to launch

0 commit comments

Comments
 (0)