Plugins · CCPP PQL
Scopes: FROM and MAKE
A scope is the directory Claude works in. FROM works in an existing directory, MAKE creates one; both are checked against the file system.
A scope frames every file creation, change and deletion of the objectives declared inside it. Reading outside the scope stays possible, subject to the policies in force.
| Keyword | Purpose | Parameter |
|---|---|---|
FROM | Work in an existing directory. | exactly 1 existing directory @ref |
MAKE | Create a missing directory, then work in it. | exactly 1 new directory @ref |
The first instruction of a program, comments aside, is FROM or MAKE.
Forms
FROM @packages/cpo; // root header: the scope of the whole program
MODIFY "The policy validation";FROM @packages { // block form
FROM @packages/cpo { MODIFY "The policy discovery"; }
MAKE @packages/parser { ADD "A typed parser"; }
}- The header form
FROM @a;takes every following statement: it equalsFROM @a { … }. - A program uses a single root header, or one or several root blocks, never both.
- A nested scope always uses braces.
- When a child block closes, the next statements are back in the parent scope. Sibling blocks are independent.
References
A directory is a path reference, a type of its own: FROM "x" is a type error. Every reference resolves against
the project directory where the prompt was submitted, whatever its nesting:
FROM @packages { FROM @packages/cpo { … } } targets packages/cpo.
| Written | Resolves to |
|---|---|
@packages/cpo, @./packages//cpo/ | packages/cpo (./, duplicate and trailing slashes removed, .. applied) |
@"path with spaces" | the quoted path |
@/abs/path | the absolute path, almost always outside the perimeter |
@~, @~/x | your home directory |
@ alone | empty: PQL-R001 |
Checks on the file system
FROM: the target must be an existing directory (PQL-R002,PQL-R003).MAKE: the target must be absent (PQL-R004), and no parent may be a file (PQL-R005). Missing parents are created with it. The compiler creates nothing: Claude does, after checking again.- A
FROMon a directory that aMAKEof the program only plans isPQL-R008, which suggestsMAKE. - A root scope stays inside the project, a child scope inside its parent, both by written path and by real path:
a symbolic link cannot leave the perimeter (
PQL-R006). - Nothing inside a
.gitdirectory can be a scope (PQL-R007).
Inside a condition branch, the checks that depend on the project's state (R002 to R005, R008) become
warnings: they are checked again when the branch is selected.
Inheritance
A child scope inherits the HOW directives, stop rules and policy references of its parent and cannot lift any
of them. SESSION SUCCESS belongs to a root scope only.