1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Preserve no-AST adapter bindings

This commit is contained in:
Andraxion 2026-07-29 02:59:15 -04:00
parent bb13258861
commit 6c05607b14
7 changed files with 209 additions and 13 deletions

View file

@ -162,3 +162,32 @@ does not expose canonical application.
DocForge pins the official stable Python MCP SDK to the compatible `mcp>=1.28,<2` release line.
Migration to a later major release requires a separate contract and protocol compatibility review.
## Preserved no-AST bindings
An owner may start the generic MCP server with `--no-ast`:
```bash
docforge-mcp --project-root /absolute/project --no-ast
```
Project-owned integrations select the same immutable process policy with
`create_project_server(..., no_ast=True)` or `create_read_only_server(..., no_ast=True)`.
The policy preserves the current adapter extraction strategy. It does not require an adapter API
migration and does not disable complete-projection loading or non-AST incremental fingerprinting,
invalidation, and caching.
Both `docforge_bootstrap` and `docforge_get_contract` report the exact policy. MCP server
instructions tell clients not to add Python AST, Tree-sitter, compiler-AST, or function-Logic
extraction. Under this binding:
- `docforge_get_logic` returns `adapter_policy_forbids_logic`;
- a nonempty Logic projection is rejected before index publication;
- `adapter_ast_upgrade` and `function_logic_extraction` appear as excluded operations; and
- changing the policy requires changing the process configuration and starting a new MCP process.
The policy governs the DocForge binding and conforming MCP clients. DocForge still exposes no
filesystem sandbox and cannot prevent an unrelated process with direct repository write access
from editing adapter files. Repository permissions and project instructions remain responsible for
that broader boundary.